@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.3 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 que=Object.defineProperty;var zue=(Lo,co,ci)=>co in Lo?que(Lo,co,{enumerable:!0,configurable:!0,writable:!0,value:ci}):Lo[co]=ci;var s7=(Lo,co,ci)=>(zue(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 a7(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 qN={exports:{}},em={},zN={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"),l7=Symbol.for("react.portal"),c7=Symbol.for("react.fragment"),u7=Symbol.for("react.strict_mode"),f7=Symbol.for("react.profiler"),d7=Symbol.for("react.provider"),p7=Symbol.for("react.context"),h7=Symbol.for("react.forward_ref"),m7=Symbol.for("react.suspense"),g7=Symbol.for("react.memo"),v7=Symbol.for("react.lazy"),HN=Symbol.iterator;function y7(e){return e===null||typeof e!="object"?null:(e=HN&&e[HN]||e["@@iterator"],typeof e=="function"?e:null)}var WN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GN=Object.assign,YN={};function qc(e,t,n){this.props=e,this.context=t,this.refs=YN,this.updater=n||WN}qc.prototype.isReactComponent={},qc.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")},qc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QN(){}QN.prototype=qc.prototype;function R1(e,t,n){this.props=e,this.context=t,this.refs=YN,this.updater=n||WN}var F1=R1.prototype=new QN;F1.constructor=R1,GN(F1,qc.prototype),F1.isPureReactComponent=!0;var KN=Array.isArray,JN=Object.prototype.hasOwnProperty,M1={current:null},XN={key:!0,ref:!0,__self:!0,__source:!0};function ZN(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)JN.call(t,r)&&!XN.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:M1.current}}function b7(e,t){return{$$typeof:Yf,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function P1(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yf}function E7(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var e_=/\/+/g;function $1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?E7(""+e.key):t.toString(36)}function tm(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 l7:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+$1(s,0):r,KN(o)?(n="",e!=null&&(n=e.replace(e_,"$&/")+"/"),tm(o,t,n,"",function(f){return f})):o!=null&&(P1(o)&&(o=b7(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(e_,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",KN(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+$1(i,l);s+=tm(i,t,n,c,o)}else if(c=y7(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+$1(i,l++),s+=tm(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 nm(e,t,n){if(e==null)return e;var r=[],o=0;return tm(e,r,"","",function(i){return t.call(n,i,o++)}),r}function w7(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 Rr={current:null},rm={transition:null},x7={ReactCurrentDispatcher:Rr,ReactCurrentBatchConfig:rm,ReactCurrentOwner:M1};ht.Children={map:nm,forEach:function(e,t,n){nm(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return nm(e,function(){t++}),t},toArray:function(e){return nm(e,function(t){return t})||[]},only:function(e){if(!P1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},ht.Component=qc,ht.Fragment=c7,ht.Profiler=f7,ht.PureComponent=R1,ht.StrictMode=u7,ht.Suspense=m7,ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x7,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=GN({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=M1.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)JN.call(t,c)&&!XN.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:p7,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:d7,_context:e},e.Consumer=e},ht.createElement=ZN,ht.createFactory=function(e){var t=ZN.bind(null,e);return t.type=e,t},ht.createRef=function(){return{current:null}},ht.forwardRef=function(e){return{$$typeof:h7,render:e}},ht.isValidElement=P1,ht.lazy=function(e){return{$$typeof:v7,_payload:{_status:-1,_result:e},_init:w7}},ht.memo=function(e,t){return{$$typeof:g7,type:e,compare:t===void 0?null:t}},ht.startTransition=function(e){var t=rm.transition;rm.transition={};try{e()}finally{rm.transition=t}},ht.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},ht.useCallback=function(e,t){return Rr.current.useCallback(e,t)},ht.useContext=function(e){return Rr.current.useContext(e)},ht.useDebugValue=function(){},ht.useDeferredValue=function(e){return Rr.current.useDeferredValue(e)},ht.useEffect=function(e,t){return Rr.current.useEffect(e,t)},ht.useId=function(){return Rr.current.useId()},ht.useImperativeHandle=function(e,t,n){return Rr.current.useImperativeHandle(e,t,n)},ht.useInsertionEffect=function(e,t){return Rr.current.useInsertionEffect(e,t)},ht.useLayoutEffect=function(e,t){return Rr.current.useLayoutEffect(e,t)},ht.useMemo=function(e,t){return Rr.current.useMemo(e,t)},ht.useReducer=function(e,t,n){return Rr.current.useReducer(e,t,n)},ht.useRef=function(e){return Rr.current.useRef(e)},ht.useState=function(e){return Rr.current.useState(e)},ht.useSyncExternalStore=function(e,t,n){return Rr.current.useSyncExternalStore(e,t,n)},ht.useTransition=function(){return Rr.current.useTransition()},ht.version="18.2.0",zN.exports=ht;var k=zN.exports;const ce=Ui(k),V1=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 S7=k,T7=Symbol.for("react.element"),C7=Symbol.for("react.fragment"),k7=Object.prototype.hasOwnProperty,N7=S7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_7={key:!0,ref:!0,__self:!0,__source:!0};function t_(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)k7.call(t,r)&&!_7.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:T7,type:e,key:i,ref:s,props:o,_owner:N7.current}}em.Fragment=C7,em.jsx=t_,em.jsxs=t_,qN.exports=em;var W=qN.exports,n_={exports:{}},uo={},r_={exports:{}},o_={};/**
* @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(O),O=-1),v=!0;var Z=m;try{for(C(K),g=n(c);g!==null&&(!(g.expirationTime>K)||Q&&!B());){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 D=!1,I=null,O=-1,R=5,P=-1;function B(){return!(e.unstable_now()-P<R)}function H(){if(I!==null){var Q=e.unstable_now();P=Q;var K=!0;try{K=I(!0,Q)}finally{K?z():(D=!1,I=null)}}else D=!1}var z;if(typeof x=="function")z=function(){x(H)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,F=q.port2;q.port1.onmessage=H,z=function(){F.postMessage(null)}}else z=function(){N(H,0)};function te(Q){I=Q,D||(D=!0,z())}function Y(Q,K){O=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"):R=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(O),O=-1):w=!0,Y(E,Z-re))):(Q.sortIndex=J,t(c,Q),b||v||(b=!0,te(_))),Q},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(Q){var K=m;return function(){var Z=m;m=K;try{return Q.apply(this,arguments)}finally{m=Z}}}})(o_),r_.exports=o_;var A7=r_.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 i_=k,fo=A7;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 s_=new Set,Qf={};function yl(e,t){zc(e,t),zc(e+"Capture",t)}function zc(e,t){for(Qf[e]=t,e=0;e<t.length;e++)s_.add(t[e])}var ds=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),j1=Object.prototype.hasOwnProperty,O7=/^[: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]*$/,a_={},l_={};function D7(e){return j1.call(l_,e)?!0:j1.call(a_,e)?!1:O7.test(e)?l_[e]=!0:(a_[e]=!0,!1)}function I7(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 L7(e,t,n,r){if(t===null||typeof t>"u"||I7(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 Fr(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 Fr(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 Fr(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){er[e]=new Fr(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){er[e]=new Fr(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 Fr(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){er[e]=new Fr(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){er[e]=new Fr(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){er[e]=new Fr(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){er[e]=new Fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var U1=/[\-:]([a-z])/g;function B1(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(U1,B1);er[t]=new Fr(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(U1,B1);er[t]=new Fr(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(U1,B1);er[t]=new Fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){er[e]=new Fr(e,1,!1,e.toLowerCase(),null,!1,!1)}),er.xlinkHref=new Fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){er[e]=new Fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function q1(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")&&(L7(t,n,o,r)&&(n=null),r||o===null?D7(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=i_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,om=Symbol.for("react.element"),Hc=Symbol.for("react.portal"),Wc=Symbol.for("react.fragment"),z1=Symbol.for("react.strict_mode"),H1=Symbol.for("react.profiler"),c_=Symbol.for("react.provider"),u_=Symbol.for("react.context"),W1=Symbol.for("react.forward_ref"),G1=Symbol.for("react.suspense"),Y1=Symbol.for("react.suspense_list"),Q1=Symbol.for("react.memo"),ra=Symbol.for("react.lazy"),f_=Symbol.for("react.offscreen"),d_=Symbol.iterator;function Kf(e){return e===null||typeof e!="object"?null:(e=d_&&e[d_]||e["@@iterator"],typeof e=="function"?e:null)}var tn=Object.assign,K1;function Jf(e){if(K1===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);K1=t&&t[1]||""}return`
`+K1+e}var J1=!1;function X1(e,t){if(!e||J1)return"";J1=!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{J1=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Jf(e):""}function R7(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=X1(e.type,!1),e;case 11:return e=X1(e.type.render,!1),e;case 1:return e=X1(e.type,!0),e;default:return""}}function Z1(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 Wc:return"Fragment";case Hc:return"Portal";case H1:return"Profiler";case z1:return"StrictMode";case G1:return"Suspense";case Y1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u_:return(e.displayName||"Context")+".Consumer";case c_:return(e._context.displayName||"Context")+".Provider";case W1: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:Z1(e.type)||"Memo";case ra:t=e._payload,e=e._init;try{return Z1(e(t))}catch{}}return null}function F7(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 Z1(t);case 8:return t===z1?"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 p_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M7(e){var t=p_(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 im(e){e._valueTracker||(e._valueTracker=M7(e))}function h_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=p_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function sm(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 eb(e,t){var n=t.checked;return tn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function m_(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 g_(e,t){t=t.checked,t!=null&&q1(e,"checked",t,!1)}function tb(e,t){g_(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")?nb(e,t.type,n):t.hasOwnProperty("defaultValue")&&nb(e,t.type,oa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function v_(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 nb(e,t,n){(t!=="number"||sm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xf=Array.isArray;function Gc(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 rb(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ne(91));return tn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function y_(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 b_(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 E_(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function w_(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 ob(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?w_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var am,x_=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(am=am||document.createElement("div"),am.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=am.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},P7=["Webkit","ms","Moz","O"];Object.keys(ed).forEach(function(e){P7.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ed[t]=ed[e]})});function S_(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 T_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=S_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var $7=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 ib(e,t){if(t){if($7[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 sb(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 ab=null;function lb(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cb=null,Yc=null,Qc=null;function C_(e){if(e=xd(e)){if(typeof cb!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=Om(t),cb(e.stateNode,e.type,t))}}function k_(e){Yc?Qc?Qc.push(e):Qc=[e]:Yc=e}function N_(){if(Yc){var e=Yc,t=Qc;if(Qc=Yc=null,C_(e),t)for(e=0;e<t.length;e++)C_(t[e])}}function __(e,t){return e(t)}function A_(){}var ub=!1;function O_(e,t,n){if(ub)return e(t,n);ub=!0;try{return __(e,t,n)}finally{ub=!1,(Yc!==null||Qc!==null)&&(A_(),N_())}}function td(e,t){var n=e.stateNode;if(n===null)return null;var r=Om(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 fb=!1;if(ds)try{var nd={};Object.defineProperty(nd,"passive",{get:function(){fb=!0}}),window.addEventListener("test",nd,nd),window.removeEventListener("test",nd,nd)}catch{fb=!1}function V7(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,lm=null,cm=!1,db=null,j7={onError:function(e){rd=!0,lm=e}};function U7(e,t,n,r,o,i,s,l,c){rd=!1,lm=null,V7.apply(j7,arguments)}function B7(e,t,n,r,o,i,s,l,c){if(U7.apply(this,arguments),rd){if(rd){var f=lm;rd=!1,lm=null}else throw Error(Ne(198));cm||(cm=!0,db=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 D_(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 I_(e){if(bl(e)!==e)throw Error(Ne(188))}function q7(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 I_(o),e;if(i===r)return I_(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 L_(e){return e=q7(e),e!==null?R_(e):null}function R_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=R_(e);if(t!==null)return t;e=e.sibling}return null}var F_=fo.unstable_scheduleCallback,M_=fo.unstable_cancelCallback,z7=fo.unstable_shouldYield,H7=fo.unstable_requestPaint,mn=fo.unstable_now,W7=fo.unstable_getCurrentPriorityLevel,pb=fo.unstable_ImmediatePriority,P_=fo.unstable_UserBlockingPriority,um=fo.unstable_NormalPriority,G7=fo.unstable_LowPriority,$_=fo.unstable_IdlePriority,fm=null,Bi=null;function Y7(e){if(Bi&&typeof Bi.onCommitFiberRoot=="function")try{Bi.onCommitFiberRoot(fm,e,void 0,(e.current.flags&128)===128)}catch{}}var ui=Math.clz32?Math.clz32:J7,Q7=Math.log,K7=Math.LN2;function J7(e){return e>>>=0,e===0?32:31-(Q7(e)/K7|0)|0}var dm=64,pm=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 hm(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 X7(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 Z7(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]=X7(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function hb(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function V_(){var e=dm;return dm<<=1,!(dm&4194240)&&(dm=64),e}function mb(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 e9(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 gb(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 j_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var U_,vb,B_,q_,z_,yb=!1,mm=[],ia=null,sa=null,aa=null,sd=new Map,ad=new Map,la=[],t9="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 H_(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&&vb(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function n9(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 W_(e){var t=El(e.target);if(t!==null){var n=bl(t);if(n!==null){if(t=n.tag,t===13){if(t=D_(n),t!==null){e.blockedOn=t,z_(e.priority,function(){B_(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 gm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Eb(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ab=r,n.target.dispatchEvent(r),ab=null}else return t=xd(n),t!==null&&vb(t),e.blockedOn=n,!1;t.shift()}return!0}function G_(e,t,n){gm(e)&&n.delete(t)}function r9(){yb=!1,ia!==null&&gm(ia)&&(ia=null),sa!==null&&gm(sa)&&(sa=null),aa!==null&&gm(aa)&&(aa=null),sd.forEach(G_),ad.forEach(G_)}function cd(e,t){e.blockedOn===t&&(e.blockedOn=null,yb||(yb=!0,fo.unstable_scheduleCallback(fo.unstable_NormalPriority,r9)))}function ud(e){function t(o){return cd(o,e)}if(0<mm.length){cd(mm[0],e);for(var n=1;n<mm.length;n++){var r=mm[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);)W_(n),n.blockedOn===null&&la.shift()}var Kc=ps.ReactCurrentBatchConfig,vm=!0;function o9(e,t,n,r){var o=_t,i=Kc.transition;Kc.transition=null;try{_t=1,bb(e,t,n,r)}finally{_t=o,Kc.transition=i}}function i9(e,t,n,r){var o=_t,i=Kc.transition;Kc.transition=null;try{_t=4,bb(e,t,n,r)}finally{_t=o,Kc.transition=i}}function bb(e,t,n,r){if(vm){var o=Eb(e,t,n,r);if(o===null)Pb(e,t,r,ym,n),H_(e,r);else if(n9(o,e,t,n,r))r.stopPropagation();else if(H_(e,r),t&4&&-1<t9.indexOf(e)){for(;o!==null;){var i=xd(o);if(i!==null&&U_(i),i=Eb(e,t,n,r),i===null&&Pb(e,t,r,ym,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Pb(e,t,r,null,n)}}var ym=null;function Eb(e,t,n,r){if(ym=null,e=lb(r),e=El(e),e!==null)if(t=bl(e),t===null)e=null;else if(n=t.tag,n===13){if(e=D_(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 ym=e,null}function Y_(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(W7()){case pb:return 1;case P_:return 4;case um:case G7:return 16;case $_:return 536870912;default:return 16}default:return 16}}var ca=null,wb=null,bm=null;function Q_(){if(bm)return bm;var e,t=wb,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 bm=o.slice(e,1<r?1-r:void 0)}function Em(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 wm(){return!0}function K_(){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)?wm:K_,this.isPropagationStopped=K_,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=wm)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wm)},persist:function(){},isPersistent:wm}),t}var Jc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xb=po(Jc),fd=tn({},Jc,{view:0,detail:0}),s9=po(fd),Sb,Tb,dd,xm=tn({},fd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kb,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"?(Sb=e.screenX-dd.screenX,Tb=e.screenY-dd.screenY):Tb=Sb=0,dd=e),Sb)},movementY:function(e){return"movementY"in e?e.movementY:Tb}}),J_=po(xm),a9=tn({},xm,{dataTransfer:0}),l9=po(a9),c9=tn({},fd,{relatedTarget:0}),Cb=po(c9),u9=tn({},Jc,{animationName:0,elapsedTime:0,pseudoElement:0}),f9=po(u9),d9=tn({},Jc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),p9=po(d9),h9=tn({},Jc,{data:0}),X_=po(h9),m9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g9={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"},v9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function y9(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=v9[e])?!!t[e]:!1}function kb(){return y9}var b9=tn({},fd,{key:function(e){if(e.key){var t=m9[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Em(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g9[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kb,charCode:function(e){return e.type==="keypress"?Em(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Em(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),E9=po(b9),w9=tn({},xm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Z_=po(w9),x9=tn({},fd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kb}),S9=po(x9),T9=tn({},Jc,{propertyName:0,elapsedTime:0,pseudoElement:0}),C9=po(T9),k9=tn({},xm,{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}),N9=po(k9),_9=[9,13,27,32],Nb=ds&&"CompositionEvent"in window,pd=null;ds&&"documentMode"in document&&(pd=document.documentMode);var A9=ds&&"TextEvent"in window&&!pd,eA=ds&&(!Nb||pd&&8<pd&&11>=pd),tA=" ",nA=!1;function rA(e,t){switch(e){case"keyup":return _9.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xc=!1;function O9(e,t){switch(e){case"compositionend":return oA(t);case"keypress":return t.which!==32?null:(nA=!0,tA);case"textInput":return e=t.data,e===tA&&nA?null:e;default:return null}}function D9(e,t){if(Xc)return e==="compositionend"||!Nb&&rA(e,t)?(e=Q_(),bm=wb=ca=null,Xc=!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 eA&&t.locale!=="ko"?null:t.data;default:return null}}var I9={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 iA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!I9[e.type]:t==="textarea"}function sA(e,t,n,r){k_(r),t=Nm(t,"onChange"),0<t.length&&(n=new xb("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hd=null,md=null;function L9(e){TA(e,0)}function Sm(e){var t=ru(e);if(h_(t))return e}function R9(e,t){if(e==="change")return t}var aA=!1;if(ds){var _b;if(ds){var Ab="oninput"in document;if(!Ab){var lA=document.createElement("div");lA.setAttribute("oninput","return;"),Ab=typeof lA.oninput=="function"}_b=Ab}else _b=!1;aA=_b&&(!document.documentMode||9<document.documentMode)}function cA(){hd&&(hd.detachEvent("onpropertychange",uA),md=hd=null)}function uA(e){if(e.propertyName==="value"&&Sm(md)){var t=[];sA(t,md,e,lb(e)),O_(L9,t)}}function F9(e,t,n){e==="focusin"?(cA(),hd=t,md=n,hd.attachEvent("onpropertychange",uA)):e==="focusout"&&cA()}function M9(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sm(md)}function P9(e,t){if(e==="click")return Sm(t)}function $9(e,t){if(e==="input"||e==="change")return Sm(t)}function V9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fi=typeof Object.is=="function"?Object.is:V9;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(!j1.call(t,o)||!fi(e[o],t[o]))return!1}return!0}function fA(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dA(e,t){var n=fA(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=fA(n)}}function pA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hA(){for(var e=window,t=sm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=sm(e.document)}return t}function Ob(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 j9(e){var t=hA(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pA(n.ownerDocument.documentElement,n)){if(r!==null&&Ob(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=dA(n,i);var s=dA(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 U9=ds&&"documentMode"in document&&11>=document.documentMode,Zc=null,Db=null,vd=null,Ib=!1;function mA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ib||Zc==null||Zc!==sm(r)||(r=Zc,"selectionStart"in r&&Ob(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=Nm(Db,"onSelect"),0<r.length&&(t=new xb("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zc)))}function Tm(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var eu={animationend:Tm("Animation","AnimationEnd"),animationiteration:Tm("Animation","AnimationIteration"),animationstart:Tm("Animation","AnimationStart"),transitionend:Tm("Transition","TransitionEnd")},Lb={},gA={};ds&&(gA=document.createElement("div").style,"AnimationEvent"in window||(delete eu.animationend.animation,delete eu.animationiteration.animation,delete eu.animationstart.animation),"TransitionEvent"in window||delete eu.transitionend.transition);function Cm(e){if(Lb[e])return Lb[e];if(!eu[e])return e;var t=eu[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in gA)return Lb[e]=t[n];return e}var vA=Cm("animationend"),yA=Cm("animationiteration"),bA=Cm("animationstart"),EA=Cm("transitionend"),wA=new Map,xA="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){wA.set(e,t),yl(t,[e])}for(var Rb=0;Rb<xA.length;Rb++){var Fb=xA[Rb],B9=Fb.toLowerCase(),q9=Fb[0].toUpperCase()+Fb.slice(1);ua(B9,"on"+q9)}ua(vA,"onAnimationEnd"),ua(yA,"onAnimationIteration"),ua(bA,"onAnimationStart"),ua("dblclick","onDoubleClick"),ua("focusin","onFocus"),ua("focusout","onBlur"),ua(EA,"onTransitionEnd"),zc("onMouseEnter",["mouseout","mouseover"]),zc("onMouseLeave",["mouseout","mouseover"]),zc("onPointerEnter",["pointerout","pointerover"]),zc("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(" "),z9=new Set("cancel close invalid load scroll toggle".split(" ").concat(yd));function SA(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,B7(r,t,void 0,e),e.currentTarget=null}function TA(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;SA(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;SA(o,l,f),i=c}}}if(cm)throw e=db,cm=!1,db=null,e}function Bt(e,t){var n=t[qb];n===void 0&&(n=t[qb]=new Set);var r=e+"__bubble";n.has(r)||(CA(t,e,2,!1),n.add(r))}function Mb(e,t,n){var r=0;t&&(r|=4),CA(n,e,r,t)}var km="_reactListening"+Math.random().toString(36).slice(2);function bd(e){if(!e[km]){e[km]=!0,s_.forEach(function(n){n!=="selectionchange"&&(z9.has(n)||Mb(n,!1,e),Mb(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[km]||(t[km]=!0,Mb("selectionchange",!1,t))}}function CA(e,t,n,r){switch(Y_(t)){case 1:var o=o9;break;case 4:o=i9;break;default:o=bb}n=o.bind(null,t,n,e),o=void 0,!fb||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 Pb(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}O_(function(){var f=i,d=lb(n),g=[];e:{var m=wA.get(e);if(m!==void 0){var v=xb,b=e;switch(e){case"keypress":if(Em(n)===0)break e;case"keydown":case"keyup":v=E9;break;case"focusin":b="focus",v=Cb;break;case"focusout":b="blur",v=Cb;break;case"beforeblur":case"afterblur":v=Cb;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=J_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=l9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=S9;break;case vA:case yA:case bA:v=f9;break;case EA:v=C9;break;case"scroll":v=s9;break;case"wheel":v=N9;break;case"copy":case"cut":case"paste":v=p9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Z_}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!==ab&&(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=J_,E="onMouseLeave",S="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(w=Z_,E="onPointerLeave",S="onPointerEnter",x="pointer"),N=v==null?m:ru(v),C=b==null?m:ru(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=tu(C))x++;for(C=0,E=S;E;E=tu(E))C++;for(;0<x-C;)w=tu(w),x--;for(;0<C-x;)S=tu(S),C--;for(;x--;){if(w===S||S!==null&&w===S.alternate)break t;w=tu(w),S=tu(S)}w=null}else w=null;v!==null&&kA(g,m,v,w,!1),b!==null&&N!==null&&kA(g,N,b,w,!0)}}e:{if(m=f?ru(f):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var _=R9;else if(iA(m))if(aA)_=$9;else{_=M9;var D=F9}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(_=P9);if(_&&(_=_(e,f))){sA(g,_,n,d);break e}D&&D(e,m,f),e==="focusout"&&(D=m._wrapperState)&&D.controlled&&m.type==="number"&&nb(m,"number",m.value)}switch(D=f?ru(f):window,e){case"focusin":(iA(D)||D.contentEditable==="true")&&(Zc=D,Db=f,vd=null);break;case"focusout":vd=Db=Zc=null;break;case"mousedown":Ib=!0;break;case"contextmenu":case"mouseup":case"dragend":Ib=!1,mA(g,n,d);break;case"selectionchange":if(U9)break;case"keydown":case"keyup":mA(g,n,d)}var I;if(Nb)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Xc?rA(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(eA&&n.locale!=="ko"&&(Xc||O!=="onCompositionStart"?O==="onCompositionEnd"&&Xc&&(I=Q_()):(ca=d,wb="value"in ca?ca.value:ca.textContent,Xc=!0)),D=Nm(f,O),0<D.length&&(O=new X_(O,e,null,n,d),g.push({event:O,listeners:D}),I?O.data=I:(I=oA(n),I!==null&&(O.data=I)))),(I=A9?O9(e,n):D9(e,n))&&(f=Nm(f,"onBeforeInput"),0<f.length&&(d=new X_("onBeforeInput","beforeinput",null,n,d),g.push({event:d,listeners:f}),d.data=I))}TA(g,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Nm(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 tu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function kA(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 H9=/\r\n?/g,W9=/\u0000|\uFFFD/g;function NA(e){return(typeof e=="string"?e:""+e).replace(H9,`
`).replace(W9,"")}function _m(e,t,n){if(t=NA(t),NA(e)!==t&&n)throw Error(Ne(425))}function Am(){}var $b=null,Vb=null;function jb(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 Ub=typeof setTimeout=="function"?setTimeout:void 0,G9=typeof clearTimeout=="function"?clearTimeout:void 0,_A=typeof Promise=="function"?Promise:void 0,Y9=typeof queueMicrotask=="function"?queueMicrotask:typeof _A<"u"?function(e){return _A.resolve(null).then(e).catch(Q9)}:Ub;function Q9(e){setTimeout(function(){throw e})}function Bb(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 AA(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 nu=Math.random().toString(36).slice(2),qi="__reactFiber$"+nu,wd="__reactProps$"+nu,hs="__reactContainer$"+nu,qb="__reactEvents$"+nu,K9="__reactListeners$"+nu,J9="__reactHandles$"+nu;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=AA(e);e!==null;){if(n=e[qi])return n;e=AA(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 ru(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ne(33))}function Om(e){return e[wd]||null}var zb=[],ou=-1;function da(e){return{current:e}}function qt(e){0>ou||(e.current=zb[ou],zb[ou]=null,ou--)}function Ft(e,t){ou++,zb[ou]=e.current,e.current=t}var pa={},gr=da(pa),Jr=da(!1),wl=pa;function iu(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 Dm(){qt(Jr),qt(gr)}function OA(e,t,n){if(gr.current!==pa)throw Error(Ne(168));Ft(gr,t),Ft(Jr,n)}function DA(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,F7(e)||"Unknown",o));return tn({},n,r)}function Im(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pa,wl=gr.current,Ft(gr,e),Ft(Jr,Jr.current),!0}function IA(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=DA(e,t,wl),r.__reactInternalMemoizedMergedChildContext=e,qt(Jr),qt(gr),Ft(gr,e)):qt(Jr),Ft(Jr,n)}var ms=null,Lm=!1,Hb=!1;function LA(e){ms===null?ms=[e]:ms.push(e)}function X9(e){Lm=!0,LA(e)}function ha(){if(!Hb&&ms!==null){Hb=!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,Lm=!1}catch(o){throw ms!==null&&(ms=ms.slice(e+1)),F_(pb,ha),o}finally{_t=t,Hb=!1}}return null}var su=[],au=0,Rm=null,Fm=0,Ro=[],Fo=0,xl=null,gs=1,vs="";function Sl(e,t){su[au++]=Fm,su[au++]=Rm,Rm=e,Fm=t}function RA(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 Wb(e){e.return!==null&&(Sl(e,1),RA(e,1,0))}function Gb(e){for(;e===Rm;)Rm=su[--au],su[au]=null,Fm=su[--au],su[au]=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,Kt=!1,di=null;function FA(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 MA(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 Yb(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qb(e){if(Kt){var t=mo;if(t){var n=t;if(!MA(e,t)){if(Yb(e))throw Error(Ne(418));t=fa(n.nextSibling);var r=ho;t&&MA(e,t)?FA(r,n):(e.flags=e.flags&-4097|2,Kt=!1,ho=e)}}else{if(Yb(e))throw Error(Ne(418));e.flags=e.flags&-4097|2,Kt=!1,ho=e}}}function PA(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ho=e}function Mm(e){if(e!==ho)return!1;if(!Kt)return PA(e),Kt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jb(e.type,e.memoizedProps)),t&&(t=mo)){if(Yb(e))throw $A(),Error(Ne(418));for(;t;)FA(e,t),t=fa(t.nextSibling)}if(PA(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 $A(){for(var e=mo;e;)e=fa(e.nextSibling)}function lu(){mo=ho=null,Kt=!1}function Kb(e){di===null?di=[e]:di.push(e)}var Z9=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 Pm=da(null),$m=null,cu=null,Jb=null;function Xb(){Jb=cu=$m=null}function Zb(e){var t=Pm.current;qt(Pm),e._currentValue=t}function eE(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 uu(e,t){$m=e,Jb=cu=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(Jb!==e)if(e={context:e,memoizedValue:t,next:null},cu===null){if($m===null)throw Error(Ne(308));cu=e,$m.dependencies={lanes:0,firstContext:e}}else cu=cu.next=e;return t}var Tl=null;function tE(e){Tl===null?Tl=[e]:Tl.push(e)}function VA(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,tE(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 nE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jA(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,Et&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,tE(r)):(t.next=o.next,o.next=t),r.interleaved=t,ys(e,n)}function Vm(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,gb(e,n)}}function UA(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 jm(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 BA(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 qA=new i_.Component().refs;function rE(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 Um={isMounted:function(e){return(e=e._reactInternals)?bl(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pr(),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),Vm(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pr(),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),Vm(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pr(),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),Vm(t,e,r))}};function zA(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 HA(e,t,n){var r=!1,o=pa,i=t.contextType;return typeof i=="object"&&i!==null?i=Mo(i):(o=Xr(t)?wl:gr.current,r=t.contextTypes,i=(r=r!=null)?iu(e,o):pa),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Um,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function WA(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&&Um.enqueueReplaceState(t,t.state,null)}function oE(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=qA,nE(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Mo(i):(i=Xr(t)?wl:gr.current,o.context=iu(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(rE(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&&Um.enqueueReplaceState(o,o.state,null),jm(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===qA&&(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 Bm(e,t){throw e=Object.prototype.toString.call(t),Error(Ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function GA(e){var t=e._init;return t(e._payload)}function YA(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=UE(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 _===Wc?d(S,x,C.props.children,E,C.key):x!==null&&(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ra&&GA(_)===x.type)?(E=o(x,C.props),E.ref=Sd(S,x,C),E.return=S,E):(E=ag(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=BE(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=UE(""+x,S.mode,C),x.return=S,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case om:return C=ag(x.type,x.key,x.props,null,S.mode,C),C.ref=Sd(S,null,x),C.return=S,C;case Hc:return x=BE(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;Bm(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 om:return C.key===_?c(S,x,C,E):null;case Hc: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);Bm(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 om:return S=S.get(E.key===null?C:E.key)||null,c(x,S,E,_);case Hc:return S=S.get(E.key===null?C:E.key)||null,f(x,S,E,_);case ra:var D=E._init;return v(S,x,C,D(E._payload),_)}if(Xf(E)||Kf(E))return S=S.get(C)||null,d(x,S,E,_,null);Bm(x,E)}return null}function b(S,x,C,E){for(var _=null,D=null,I=x,O=x=0,R=null;I!==null&&O<C.length;O++){I.index>O?(R=I,I=null):R=I.sibling;var P=m(S,I,C[O],E);if(P===null){I===null&&(I=R);break}e&&I&&P.alternate===null&&t(S,I),x=i(P,x,O),D===null?_=P:D.sibling=P,D=P,I=R}if(O===C.length)return n(S,I),Kt&&Sl(S,O),_;if(I===null){for(;O<C.length;O++)I=g(S,C[O],E),I!==null&&(x=i(I,x,O),D===null?_=I:D.sibling=I,D=I);return Kt&&Sl(S,O),_}for(I=r(S,I);O<C.length;O++)R=v(I,S,O,C[O],E),R!==null&&(e&&R.alternate!==null&&I.delete(R.key===null?O:R.key),x=i(R,x,O),D===null?_=R:D.sibling=R,D=R);return e&&I.forEach(function(B){return t(S,B)}),Kt&&Sl(S,O),_}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 D=_=null,I=x,O=x=0,R=null,P=C.next();I!==null&&!P.done;O++,P=C.next()){I.index>O?(R=I,I=null):R=I.sibling;var B=m(S,I,P.value,E);if(B===null){I===null&&(I=R);break}e&&I&&B.alternate===null&&t(S,I),x=i(B,x,O),D===null?_=B:D.sibling=B,D=B,I=R}if(P.done)return n(S,I),Kt&&Sl(S,O),_;if(I===null){for(;!P.done;O++,P=C.next())P=g(S,P.value,E),P!==null&&(x=i(P,x,O),D===null?_=P:D.sibling=P,D=P);return Kt&&Sl(S,O),_}for(I=r(S,I);!P.done;O++,P=C.next())P=v(I,S,O,P.value,E),P!==null&&(e&&P.alternate!==null&&I.delete(P.key===null?O:P.key),x=i(P,x,O),D===null?_=P:D.sibling=P,D=P);return e&&I.forEach(function(H){return t(S,H)}),Kt&&Sl(S,O),_}function N(S,x,C,E){if(typeof C=="object"&&C!==null&&C.type===Wc&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case om:e:{for(var _=C.key,D=x;D!==null;){if(D.key===_){if(_=C.type,_===Wc){if(D.tag===7){n(S,D.sibling),x=o(D,C.props.children),x.return=S,S=x;break e}}else if(D.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ra&&GA(_)===D.type){n(S,D.sibling),x=o(D,C.props),x.ref=Sd(S,D,C),x.return=S,S=x;break e}n(S,D);break}else t(S,D);D=D.sibling}C.type===Wc?(x=Dl(C.props.children,S.mode,E,C.key),x.return=S,S=x):(E=ag(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 Hc:e:{for(D=C.key;x!==null;){if(x.key===D)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=BE(C,S.mode,E),x.return=S,S=x}return s(S);case ra:return D=C._init,N(S,x,D(C._payload),E)}if(Xf(C))return b(S,x,C,E);if(Kf(C))return w(S,x,C,E);Bm(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=UE(C,S.mode,E),x.return=S,S=x),s(S)):n(S,x)}return N}var fu=YA(!0),QA=YA(!1),Td={},zi=da(Td),Cd=da(Td),kd=da(Td);function Cl(e){if(e===Td)throw Error(Ne(174));return e}function iE(e,t){switch(Ft(kd,t),Ft(Cd,e),Ft(zi,Td),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ob(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ob(t,e)}qt(zi),Ft(zi,t)}function du(){qt(zi),qt(Cd),qt(kd)}function KA(e){Cl(kd.current);var t=Cl(zi.current),n=ob(t,e.type);t!==n&&(Ft(Cd,e),Ft(zi,n))}function sE(e){Cd.current===e&&(qt(zi),qt(Cd))}var nn=da(0);function qm(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 aE=[];function lE(){for(var e=0;e<aE.length;e++)aE[e]._workInProgressVersionPrimary=null;aE.length=0}var zm=ps.ReactCurrentDispatcher,cE=ps.ReactCurrentBatchConfig,kl=0,rn=null,Rn=null,Hn=null,Hm=!1,Nd=!1,_d=0,ej=0;function vr(){throw Error(Ne(321))}function uE(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 fE(e,t,n,r,o,i){if(kl=i,rn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,zm.current=e===null||e.memoizedState===null?oj:ij,e=n(r,o),Nd){i=0;do{if(Nd=!1,_d=0,25<=i)throw Error(Ne(301));i+=1,Hn=Rn=null,t.updateQueue=null,zm.current=sj,e=n(r,o)}while(Nd)}if(zm.current=Ym,t=Rn!==null&&Rn.next!==null,kl=0,Hn=Rn=rn=null,Hm=!1,t)throw Error(Ne(300));return e}function dE(){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(Rn===null){var e=rn.alternate;e=e!==null?e.memoizedState:null}else e=Rn.next;var t=Hn===null?rn.memoizedState:Hn.next;if(t!==null)Hn=t,Rn=e;else{if(e===null)throw Error(Ne(310));Rn=e,e={memoizedState:Rn.memoizedState,baseState:Rn.baseState,baseQueue:Rn.baseQueue,queue:Rn.queue,next:null},Hn===null?rn.memoizedState=Hn=e:Hn=Hn.next=e}return Hn}function Ad(e,t){return typeof t=="function"?t(e):t}function pE(e){var t=Po(),n=t.queue;if(n===null)throw Error(Ne(311));n.lastRenderedReducer=e;var r=Rn,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 hE(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 JA(){}function XA(e,t){var n=rn,r=Po(),o=t(),i=!fi(r.memoizedState,o);if(i&&(r.memoizedState=o,Zr=!0),r=r.queue,mE(tO.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Hn!==null&&Hn.memoizedState.tag&1){if(n.flags|=2048,Od(9,eO.bind(null,n,r,o,t),void 0,null),Wn===null)throw Error(Ne(349));kl&30||ZA(n,t,o)}return o}function ZA(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 eO(e,t,n,r){t.value=n,t.getSnapshot=r,nO(t)&&rO(e)}function tO(e,t,n){return n(function(){nO(t)&&rO(e)})}function nO(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fi(e,n)}catch{return!0}}function rO(e){var t=ys(e,1);t!==null&&gi(t,e,1,-1)}function oO(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:Ad,lastRenderedState:e},t.queue=e,e=e.dispatch=rj.bind(null,rn,e),[t.memoizedState,e]}function Od(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 iO(){return Po().memoizedState}function Wm(e,t,n,r){var o=Hi();rn.flags|=e,o.memoizedState=Od(1|t,n,void 0,r===void 0?null:r)}function Gm(e,t,n,r){var o=Po();r=r===void 0?null:r;var i=void 0;if(Rn!==null){var s=Rn.memoizedState;if(i=s.destroy,r!==null&&uE(r,s.deps)){o.memoizedState=Od(t,n,i,r);return}}rn.flags|=e,o.memoizedState=Od(1|t,n,i,r)}function sO(e,t){return Wm(8390656,8,e,t)}function mE(e,t){return Gm(2048,8,e,t)}function aO(e,t){return Gm(4,2,e,t)}function lO(e,t){return Gm(4,4,e,t)}function cO(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 uO(e,t,n){return n=n!=null?n.concat([e]):null,Gm(4,4,cO.bind(null,t,e),n)}function gE(){}function fO(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&uE(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dO(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&uE(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pO(e,t,n){return kl&21?(fi(n,t)||(n=V_(),rn.lanes|=n,Nl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Zr=!0),e.memoizedState=n)}function tj(e,t){var n=_t;_t=n!==0&&4>n?n:4,e(!0);var r=cE.transition;cE.transition={};try{e(!1),t()}finally{_t=n,cE.transition=r}}function hO(){return Po().memoizedState}function nj(e,t,n){var r=Ea(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mO(e))gO(t,n);else if(n=VA(e,t,n,r),n!==null){var o=Pr();gi(n,e,r,o),vO(n,t,r)}}function rj(e,t,n){var r=Ea(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mO(e))gO(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,tE(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=VA(e,t,o,r),n!==null&&(o=Pr(),gi(n,e,r,o),vO(n,t,r))}}function mO(e){var t=e.alternate;return e===rn||t!==null&&t===rn}function gO(e,t){Nd=Hm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vO(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gb(e,n)}}var Ym={readContext:Mo,useCallback:vr,useContext:vr,useEffect:vr,useImperativeHandle:vr,useInsertionEffect:vr,useLayoutEffect:vr,useMemo:vr,useReducer:vr,useRef:vr,useState:vr,useDebugValue:vr,useDeferredValue:vr,useTransition:vr,useMutableSource:vr,useSyncExternalStore:vr,useId:vr,unstable_isNewReconciler:!1},oj={readContext:Mo,useCallback:function(e,t){return Hi().memoizedState=[e,t===void 0?null:t],e},useContext:Mo,useEffect:sO,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wm(4194308,4,cO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wm(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=nj.bind(null,rn,e),[r.memoizedState,e]},useRef:function(e){var t=Hi();return e={current:e},t.memoizedState=e},useState:oO,useDebugValue:gE,useDeferredValue:function(e){return Hi().memoizedState=e},useTransition:function(){var e=oO(!1),t=e[0];return e=tj.bind(null,e[1]),Hi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=rn,o=Hi();if(Kt){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),Wn===null)throw Error(Ne(349));kl&30||ZA(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,sO(tO.bind(null,r,i,e),[e]),r.flags|=2048,Od(9,eO.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Hi(),t=Wn.identifierPrefix;if(Kt){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=ej++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ij={readContext:Mo,useCallback:fO,useContext:Mo,useEffect:mE,useImperativeHandle:uO,useInsertionEffect:aO,useLayoutEffect:lO,useMemo:dO,useReducer:pE,useRef:iO,useState:function(){return pE(Ad)},useDebugValue:gE,useDeferredValue:function(e){var t=Po();return pO(t,Rn.memoizedState,e)},useTransition:function(){var e=pE(Ad)[0],t=Po().memoizedState;return[e,t]},useMutableSource:JA,useSyncExternalStore:XA,useId:hO,unstable_isNewReconciler:!1},sj={readContext:Mo,useCallback:fO,useContext:Mo,useEffect:mE,useImperativeHandle:uO,useInsertionEffect:aO,useLayoutEffect:lO,useMemo:dO,useReducer:hE,useRef:iO,useState:function(){return hE(Ad)},useDebugValue:gE,useDeferredValue:function(e){var t=Po();return Rn===null?t.memoizedState=e:pO(t,Rn.memoizedState,e)},useTransition:function(){var e=hE(Ad)[0],t=Po().memoizedState;return[e,t]},useMutableSource:JA,useSyncExternalStore:XA,useId:hO,unstable_isNewReconciler:!1};function pu(e,t){try{var n="",r=t;do n+=R7(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 vE(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function yE(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var aj=typeof WeakMap=="function"?WeakMap:Map;function yO(e,t,n){n=bs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){tg||(tg=!0,LE=r),yE(e,t)},n}function bO(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(){yE(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){yE(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 EO(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new aj;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=wj.bind(null,e,t,n),t.then(e,e))}function wO(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 xO(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 lj=ps.ReactCurrentOwner,Zr=!1;function Mr(e,t,n,r){t.child=e===null?QA(t,null,n,r):fu(t,e.child,n,r)}function SO(e,t,n,r,o){n=n.render;var i=t.ref;return uu(t,o),r=fE(e,t,n,r,i,o),n=dE(),e!==null&&!Zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Es(e,t,o)):(Kt&&n&&Wb(t),t.flags|=1,Mr(e,t,r,o),t.child)}function TO(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!jE(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,CO(e,t,i,r,o)):(e=ag(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 CO(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 bE(e,t,n,r,o)}function kO(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},Ft(mu,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,Ft(mu,go),go|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ft(mu,go),go|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ft(mu,go),go|=r;return Mr(e,t,o,n),t.child}function NO(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function bE(e,t,n,r,o){var i=Xr(n)?wl:gr.current;return i=iu(t,i),uu(t,o),n=fE(e,t,n,r,i,o),r=dE(),e!==null&&!Zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Es(e,t,o)):(Kt&&r&&Wb(t),t.flags|=1,Mr(e,t,n,o),t.child)}function _O(e,t,n,r,o){if(Xr(n)){var i=!0;Im(t)}else i=!1;if(uu(t,o),t.stateNode===null)Km(e,t),HA(t,n,r),oE(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:gr.current,f=iu(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)&&WA(t,s,r,f),ma=!1;var m=t.memoizedState;s.state=m,jm(t,r,s,o),c=t.memoizedState,l!==r||m!==c||Jr.current||ma?(typeof d=="function"&&(rE(t,n,d,r),c=t.memoizedState),(l=ma||zA(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,jA(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:gr.current,c=iu(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)&&WA(t,s,r,c),ma=!1,m=t.memoizedState,s.state=m,jm(t,r,s,o);var b=t.memoizedState;l!==g||m!==b||Jr.current||ma?(typeof v=="function"&&(rE(t,n,v,r),b=t.memoizedState),(f=ma||zA(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 EE(e,t,n,r,i,o)}function EE(e,t,n,r,o,i){NO(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&IA(t,n,!1),Es(e,t,i);r=t.stateNode,lj.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=fu(t,e.child,null,i),t.child=fu(t,null,l,i)):Mr(e,t,l,i),t.memoizedState=r.state,o&&IA(t,n,!0),t.child}function AO(e){var t=e.stateNode;t.pendingContext?OA(e,t.pendingContext,t.pendingContext!==t.context):t.context&&OA(e,t.context,!1),iE(e,t.containerInfo)}function OO(e,t,n,r,o){return lu(),Kb(o),t.flags|=256,Mr(e,t,n,r),t.child}var wE={dehydrated:null,treeContext:null,retryLane:0};function xE(e){return{baseLanes:e,cachePool:null,transitions:null}}function DO(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),Ft(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=lg(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=xE(n),t.memoizedState=wE,e):SE(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return cj(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?xE(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=wE,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 SE(e,t){return t=lg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qm(e,t,n,r){return r!==null&&Kb(r),fu(t,e.child,null,n),e=SE(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cj(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=vE(Error(Ne(422))),Qm(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=lg({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&&fu(t,e.child,null,s),t.child.memoizedState=xE(s),t.memoizedState=wE,i);if(!(t.mode&1))return Qm(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=vE(i,r,void 0),Qm(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 VE(),r=vE(Error(Ne(421))),Qm(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=xj.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,mo=fa(o.nextSibling),ho=t,Kt=!0,di=null,e!==null&&(Ro[Fo++]=gs,Ro[Fo++]=vs,Ro[Fo++]=xl,gs=e.id,vs=e.overflow,xl=t),t=SE(t,r.children),t.flags|=4096,t)}function IO(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),eE(e.return,t,n)}function TE(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 LO(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Mr(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&&IO(e,n,t);else if(e.tag===19)IO(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(Ft(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&&qm(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),TE(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&&qm(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}TE(t,!0,n,null,i);break;case"together":TE(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Km(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 uj(e,t,n){switch(t.tag){case 3:AO(t),lu();break;case 5:KA(t);break;case 1:Xr(t.type)&&Im(t);break;case 4:iE(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ft(Pm,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ft(nn,nn.current&1),t.flags|=128,null):n&t.child.childLanes?DO(e,t,n):(Ft(nn,nn.current&1),e=Es(e,t,n),e!==null?e.sibling:null);Ft(nn,nn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return LO(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ft(nn,nn.current),r)break;return null;case 22:case 23:return t.lanes=0,kO(e,t,n)}return Es(e,t,n)}var RO,CE,FO,MO;RO=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}},CE=function(){},FO=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=eb(e,o),r=eb(e,r),i=[];break;case"select":o=tn({},o,{value:void 0}),r=tn({},r,{value:void 0}),i=[];break;case"textarea":o=rb(e,o),r=rb(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Am)}ib(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"&&Bt("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)}},MO=function(e,t,n,r){n!==r&&(t.flags|=4)};function Dd(e,t){if(!Kt)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 yr(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 fj(e,t,n){var r=t.pendingProps;switch(Gb(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yr(t),null;case 1:return Xr(t.type)&&Dm(),yr(t),null;case 3:return r=t.stateNode,du(),qt(Jr),qt(gr),lE(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Mm(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,di!==null&&(ME(di),di=null))),CE(e,t),yr(t),null;case 5:sE(t);var o=Cl(kd.current);if(n=t.type,e!==null&&t.stateNode!=null)FO(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 yr(t),null}if(e=Cl(zi.current),Mm(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":Bt("cancel",r),Bt("close",r);break;case"iframe":case"object":case"embed":Bt("load",r);break;case"video":case"audio":for(o=0;o<yd.length;o++)Bt(yd[o],r);break;case"source":Bt("error",r);break;case"img":case"image":case"link":Bt("error",r),Bt("load",r);break;case"details":Bt("toggle",r);break;case"input":m_(r,i),Bt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Bt("invalid",r);break;case"textarea":y_(r,i),Bt("invalid",r)}ib(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&&_m(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&_m(r.textContent,l,e),o=["children",""+l]):Qf.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Bt("scroll",r)}switch(n){case"input":im(r),v_(r,i,!0);break;case"textarea":im(r),E_(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Am)}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=w_(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,RO(e,t,!1,!1),t.stateNode=e;e:{switch(s=sb(n,r),n){case"dialog":Bt("cancel",e),Bt("close",e),o=r;break;case"iframe":case"object":case"embed":Bt("load",e),o=r;break;case"video":case"audio":for(o=0;o<yd.length;o++)Bt(yd[o],e);o=r;break;case"source":Bt("error",e),o=r;break;case"img":case"image":case"link":Bt("error",e),Bt("load",e),o=r;break;case"details":Bt("toggle",e),o=r;break;case"input":m_(e,r),o=eb(e,r),Bt("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=tn({},r,{value:void 0}),Bt("invalid",e);break;case"textarea":y_(e,r),o=rb(e,r),Bt("invalid",e);break;default:o=r}ib(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?T_(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&x_(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"&&Bt("scroll",e):c!=null&&q1(e,i,c,s))}switch(n){case"input":im(e),v_(e,r,!1);break;case"textarea":im(e),E_(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?Gc(e,!!r.multiple,i,!1):r.defaultValue!=null&&Gc(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Am)}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 yr(t),null;case 6:if(e&&t.stateNode!=null)MO(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),Mm(t)){if(r=t.stateNode,n=t.memoizedProps,r[qi]=t,(i=r.nodeValue!==n)&&(e=ho,e!==null))switch(e.tag){case 3:_m(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_m(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 yr(t),null;case 13:if(qt(nn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Kt&&mo!==null&&t.mode&1&&!(t.flags&128))$A(),lu(),t.flags|=98560,i=!1;else if(i=Mm(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 lu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yr(t),i=!1}else di!==null&&(ME(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?Fn===0&&(Fn=3):VE())),t.updateQueue!==null&&(t.flags|=4),yr(t),null);case 4:return du(),CE(e,t),e===null&&bd(t.stateNode.containerInfo),yr(t),null;case 10:return Zb(t.type._context),yr(t),null;case 17:return Xr(t.type)&&Dm(),yr(t),null;case 19:if(qt(nn),i=t.memoizedState,i===null)return yr(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Dd(i,!1);else{if(Fn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=qm(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 Ft(nn,nn.current&1|2),t.child}e=e.sibling}i.tail!==null&&mn()>gu&&(t.flags|=128,r=!0,Dd(i,!1),t.lanes=4194304)}else{if(!r)if(e=qm(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&&!Kt)return yr(t),null}else 2*mn()-i.renderingStartTime>gu&&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=mn(),t.sibling=null,n=nn.current,Ft(nn,r?n&1|2:n&1),t):(yr(t),null);case 22:case 23:return $E(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?go&1073741824&&(yr(t),t.subtreeFlags&6&&(t.flags|=8192)):yr(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function dj(e,t){switch(Gb(t),t.tag){case 1:return Xr(t.type)&&Dm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return du(),qt(Jr),qt(gr),lE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sE(t),null;case 13:if(qt(nn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));lu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qt(nn),null;case 4:return du(),null;case 10:return Zb(t.type._context),null;case 22:case 23:return $E(),null;case 24:return null;default:return null}}var Jm=!1,br=!1,pj=typeof WeakSet=="function"?WeakSet:Set,$e=null;function hu(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){dn(e,t,r)}else n.current=null}function kE(e,t,n){try{n()}catch(r){dn(e,t,r)}}var PO=!1;function hj(e,t){if($b=vm,e=hA(),Ob(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(Vb={focusedElem:e,selectionRange:n},vm=!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){dn(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}return b=PO,PO=!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&&kE(t,n,i)}o=o.next}while(o!==r)}}function Xm(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 NE(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 $O(e){var t=e.alternate;t!==null&&(e.alternate=null,$O(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[qb],delete t[K9],delete t[J9])),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 VO(e){return e.tag===5||e.tag===3||e.tag===4}function jO(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VO(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 _E(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=Am));else if(r!==4&&(e=e.child,e!==null))for(_E(e,t,n),e=e.sibling;e!==null;)_E(e,t,n),e=e.sibling}function AE(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(AE(e,t,n),e=e.sibling;e!==null;)AE(e,t,n),e=e.sibling}var tr=null,hi=!1;function va(e,t,n){for(n=n.child;n!==null;)UO(e,t,n),n=n.sibling}function UO(e,t,n){if(Bi&&typeof Bi.onCommitFiberUnmount=="function")try{Bi.onCommitFiberUnmount(fm,n)}catch{}switch(n.tag){case 5:br||hu(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?Bb(e.parentNode,n):e.nodeType===1&&Bb(e,n),ud(e)):Bb(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(!br&&(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)&&kE(n,t,s),o=o.next}while(o!==r)}va(e,t,n);break;case 1:if(!br&&(hu(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){dn(n,t,l)}va(e,t,n);break;case 21:va(e,t,n);break;case 22:n.mode&1?(br=(r=br)||n.memoizedState!==null,va(e,t,n),br=r):va(e,t,n);break;default:va(e,t,n)}}function BO(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new pj),t.forEach(function(r){var o=Sj.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));UO(i,s,o),tr=null,hi=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(f){dn(o,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)qO(t,e),t=t.sibling}function qO(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),Xm(3,e)}catch(w){dn(e,e.return,w)}try{Id(5,e,e.return)}catch(w){dn(e,e.return,w)}}break;case 1:mi(t,e),Wi(e),r&512&&n!==null&&hu(n,n.return);break;case 5:if(mi(t,e),Wi(e),r&512&&n!==null&&hu(n,n.return),e.flags&32){var o=e.stateNode;try{Zf(o,"")}catch(w){dn(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&&g_(o,i),sb(l,s);var f=sb(l,i);for(s=0;s<c.length;s+=2){var d=c[s],g=c[s+1];d==="style"?T_(o,g):d==="dangerouslySetInnerHTML"?x_(o,g):d==="children"?Zf(o,g):q1(o,d,g,f)}switch(l){case"input":tb(o,i);break;case"textarea":b_(o,i);break;case"select":var m=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?Gc(o,!!i.multiple,v,!1):m!==!!i.multiple&&(i.defaultValue!=null?Gc(o,!!i.multiple,i.defaultValue,!0):Gc(o,!!i.multiple,i.multiple?[]:"",!1))}o[wd]=i}catch(w){dn(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){dn(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){dn(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||(IE=mn())),r&4&&BO(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(br=(f=br)||d,mi(t,e),br=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:hu(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){dn(r,n,w)}}break;case 5:hu(m,m.return);break;case 22:if(m.memoizedState!==null){WO(g);continue}}v!==null?(v.return=m,$e=v):WO(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=S_("display",s))}catch(w){dn(e,e.return,w)}}}else if(g.tag===6){if(d===null)try{g.stateNode.nodeValue=f?"":g.memoizedProps}catch(w){dn(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&&BO(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(VO(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=jO(e);AE(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=jO(e);_E(e,l,s);break;default:throw Error(Ne(161))}}catch(c){dn(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function mj(e,t,n){$e=e,zO(e)}function zO(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||Jm;if(!s){var l=o.alternate,c=l!==null&&l.memoizedState!==null||br;l=Jm;var f=br;if(Jm=s,(br=c)&&!f)for($e=o;$e!==null;)s=$e,c=s.child,s.tag===22&&s.memoizedState!==null?GO(o):c!==null?(c.return=s,$e=c):GO(o);for(;i!==null;)$e=i,zO(i),i=i.sibling;$e=o,Jm=l,br=f}HO(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,$e=i):HO(e)}}function HO(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:br||Xm(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!br)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&&BA(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}BA(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))}br||t.flags&512&&NE(t)}catch(m){dn(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 WO(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 GO(e){for(;$e!==null;){var t=$e;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xm(4,t)}catch(c){dn(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){dn(t,o,c)}}var i=t.return;try{NE(t)}catch(c){dn(t,i,c)}break;case 5:var s=t.return;try{NE(t)}catch(c){dn(t,s,c)}}}catch(c){dn(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 gj=Math.ceil,Zm=ps.ReactCurrentDispatcher,OE=ps.ReactCurrentOwner,$o=ps.ReactCurrentBatchConfig,Et=0,Wn=null,kn=null,nr=0,go=0,mu=da(0),Fn=0,Ld=null,Nl=0,eg=0,DE=0,Rd=null,eo=null,IE=0,gu=1/0,ws=null,tg=!1,LE=null,ya=null,ng=!1,ba=null,rg=0,Fd=0,RE=null,og=-1,ig=0;function Pr(){return Et&6?mn():og!==-1?og:og=mn()}function Ea(e){return e.mode&1?Et&2&&nr!==0?nr&-nr:Z9.transition!==null?(ig===0&&(ig=V_()),ig):(e=_t,e!==0||(e=window.event,e=e===void 0?16:Y_(e.type)),e):1}function gi(e,t,n,r){if(50<Fd)throw Fd=0,RE=null,Error(Ne(185));id(e,n,r),(!(Et&2)||e!==Wn)&&(e===Wn&&(!(Et&2)&&(eg|=n),Fn===4&&wa(e,nr)),to(e,r),n===1&&Et===0&&!(t.mode&1)&&(gu=mn()+500,Lm&&ha()))}function to(e,t){var n=e.callbackNode;Z7(e,t);var r=hm(e,e===Wn?nr:0);if(r===0)n!==null&&M_(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&M_(n),t===1)e.tag===0?X9(QO.bind(null,e)):LA(QO.bind(null,e)),Y9(function(){!(Et&6)&&ha()}),n=null;else{switch(j_(r)){case 1:n=pb;break;case 4:n=P_;break;case 16:n=um;break;case 536870912:n=$_;break;default:n=um}n=rD(n,YO.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function YO(e,t){if(og=-1,ig=0,Et&6)throw Error(Ne(327));var n=e.callbackNode;if(vu()&&e.callbackNode!==n)return null;var r=hm(e,e===Wn?nr:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=sg(e,r);else{t=r;var o=Et;Et|=2;var i=JO();(Wn!==e||nr!==t)&&(ws=null,gu=mn()+500,Al(e,t));do try{bj();break}catch(l){KO(e,l)}while(!0);Xb(),Zm.current=i,Et=o,kn!==null?t=0:(Wn=null,nr=0,t=Fn)}if(t!==0){if(t===2&&(o=hb(e),o!==0&&(r=o,t=FE(e,o))),t===1)throw n=Ld,Al(e,0),wa(e,r),to(e,mn()),n;if(t===6)wa(e,r);else{if(o=e.current.alternate,!(r&30)&&!vj(o)&&(t=sg(e,r),t===2&&(i=hb(e),i!==0&&(r=i,t=FE(e,i))),t===1))throw n=Ld,Al(e,0),wa(e,r),to(e,mn()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(Ne(345));case 2:Ol(e,eo,ws);break;case 3:if(wa(e,r),(r&130023424)===r&&(t=IE+500-mn(),10<t)){if(hm(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Pr(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ub(Ol.bind(null,e,eo,ws),t);break}Ol(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=mn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gj(r/1960))-r,10<r){e.timeoutHandle=Ub(Ol.bind(null,e,eo,ws),r);break}Ol(e,eo,ws);break;case 5:Ol(e,eo,ws);break;default:throw Error(Ne(329))}}}return to(e,mn()),e.callbackNode===n?YO.bind(null,e):null}function FE(e,t){var n=Rd;return e.current.memoizedState.isDehydrated&&(Al(e,t).flags|=256),e=sg(e,t),e!==2&&(t=eo,eo=n,t!==null&&ME(t)),e}function ME(e){eo===null?eo=e:eo.push.apply(eo,e)}function vj(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&=~DE,t&=~eg,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 QO(e){if(Et&6)throw Error(Ne(327));vu();var t=hm(e,0);if(!(t&1))return to(e,mn()),null;var n=sg(e,t);if(e.tag!==0&&n===2){var r=hb(e);r!==0&&(t=r,n=FE(e,r))}if(n===1)throw n=Ld,Al(e,0),wa(e,t),to(e,mn()),n;if(n===6)throw Error(Ne(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ol(e,eo,ws),to(e,mn()),null}function PE(e,t){var n=Et;Et|=1;try{return e(t)}finally{Et=n,Et===0&&(gu=mn()+500,Lm&&ha())}}function _l(e){ba!==null&&ba.tag===0&&!(Et&6)&&vu();var t=Et;Et|=1;var n=$o.transition,r=_t;try{if($o.transition=null,_t=1,e)return e()}finally{_t=r,$o.transition=n,Et=t,!(Et&6)&&ha()}}function $E(){go=mu.current,qt(mu)}function Al(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,G9(n)),kn!==null)for(n=kn.return;n!==null;){var r=n;switch(Gb(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Dm();break;case 3:du(),qt(Jr),qt(gr),lE();break;case 5:sE(r);break;case 4:du();break;case 13:qt(nn);break;case 19:qt(nn);break;case 10:Zb(r.type._context);break;case 22:case 23:$E()}n=n.return}if(Wn=e,kn=e=xa(e.current,null),nr=go=t,Fn=0,Ld=null,DE=eg=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 KO(e,t){do{var n=kn;try{if(Xb(),zm.current=Ym,Hm){for(var r=rn.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Hm=!1}if(kl=0,Hn=Rn=rn=null,Nd=!1,_d=0,OE.current=null,n===null||n.return===null){Fn=1,Ld=t,kn=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=wO(s);if(v!==null){v.flags&=-257,xO(v,s,l,i,t),v.mode&1&&EO(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)){EO(i,f,t),VE();break e}c=Error(Ne(426))}}else if(Kt&&l.mode&1){var N=wO(s);if(N!==null){!(N.flags&65536)&&(N.flags|=256),xO(N,s,l,i,t),Kb(pu(c,l));break e}}i=c=pu(c,l),Fn!==4&&(Fn=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=yO(i,c,t);UA(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=bO(i,l,t);UA(i,E);break e}}i=i.return}while(i!==null)}ZO(n)}catch(_){t=_,kn===n&&n!==null&&(kn=n=n.return);continue}break}while(!0)}function JO(){var e=Zm.current;return Zm.current=Ym,e===null?Ym:e}function VE(){(Fn===0||Fn===3||Fn===2)&&(Fn=4),Wn===null||!(Nl&268435455)&&!(eg&268435455)||wa(Wn,nr)}function sg(e,t){var n=Et;Et|=2;var r=JO();(Wn!==e||nr!==t)&&(ws=null,Al(e,t));do try{yj();break}catch(o){KO(e,o)}while(!0);if(Xb(),Et=n,Zm.current=r,kn!==null)throw Error(Ne(261));return Wn=null,nr=0,Fn}function yj(){for(;kn!==null;)XO(kn)}function bj(){for(;kn!==null&&!z7();)XO(kn)}function XO(e){var t=nD(e.alternate,e,go);e.memoizedProps=e.pendingProps,t===null?ZO(e):kn=t,OE.current=null}function ZO(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=dj(n,t),n!==null){n.flags&=32767,kn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fn=6,kn=null;return}}else if(n=fj(n,t,go),n!==null){kn=n;return}if(t=t.sibling,t!==null){kn=t;return}kn=t=e}while(t!==null);Fn===0&&(Fn=5)}function Ol(e,t,n){var r=_t,o=$o.transition;try{$o.transition=null,_t=1,Ej(e,t,n,r)}finally{$o.transition=o,_t=r}return null}function Ej(e,t,n,r){do vu();while(ba!==null);if(Et&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(e9(e,i),e===Wn&&(kn=Wn=null,nr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ng||(ng=!0,rD(um,function(){return vu(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=$o.transition,$o.transition=null;var s=_t;_t=1;var l=Et;Et|=4,OE.current=null,hj(e,n),qO(n,e),j9(Vb),vm=!!$b,Vb=$b=null,e.current=n,mj(n),H7(),Et=l,_t=s,$o.transition=i}else e.current=n;if(ng&&(ng=!1,ba=e,rg=o),i=e.pendingLanes,i===0&&(ya=null),Y7(n.stateNode),to(e,mn()),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(tg)throw tg=!1,e=LE,LE=null,e;return rg&1&&e.tag!==0&&vu(),i=e.pendingLanes,i&1?e===RE?Fd++:(Fd=0,RE=e):Fd=0,ha(),null}function vu(){if(ba!==null){var e=j_(rg),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,rg=0,Et&6)throw Error(Ne(331));var o=Et;for(Et|=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($O(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:Xm(9,l)}}catch(_){dn(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(Et=o,ha(),Bi&&typeof Bi.onPostCommitFiberRoot=="function")try{Bi.onPostCommitFiberRoot(fm,e)}catch{}r=!0}return r}finally{_t=n,$o.transition=t}}return!1}function eD(e,t,n){t=pu(n,t),t=yO(e,t,1),e=ga(e,t,1),t=Pr(),e!==null&&(id(e,1,t),to(e,t))}function dn(e,t,n){if(e.tag===3)eD(e,e,n);else for(;t!==null;){if(t.tag===3){eD(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=pu(n,e),e=bO(t,e,1),t=ga(t,e,1),e=Pr(),t!==null&&(id(t,1,e),to(t,e));break}}t=t.return}}function wj(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Pr(),e.pingedLanes|=e.suspendedLanes&n,Wn===e&&(nr&n)===n&&(Fn===4||Fn===3&&(nr&130023424)===nr&&500>mn()-IE?Al(e,0):DE|=n),to(e,t)}function tD(e,t){t===0&&(e.mode&1?(t=pm,pm<<=1,!(pm&130023424)&&(pm=4194304)):t=1);var n=Pr();e=ys(e,t),e!==null&&(id(e,t,n),to(e,n))}function xj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tD(e,n)}function Sj(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),tD(e,n)}var nD;nD=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,uj(e,t,n);Zr=!!(e.flags&131072)}else Zr=!1,Kt&&t.flags&1048576&&RA(t,Fm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Km(e,t),e=t.pendingProps;var o=iu(t,gr.current);uu(t,n),o=fE(null,t,r,e,o,n);var i=dE();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,Im(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,nE(t),o.updater=Um,t.stateNode=o,o._reactInternals=t,oE(t,r,e,n),t=EE(null,t,r,!0,i,n)):(t.tag=0,Kt&&i&&Wb(t),Mr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Km(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Cj(r),e=pi(r,e),o){case 0:t=bE(null,t,r,e,n);break e;case 1:t=_O(null,t,r,e,n);break e;case 11:t=SO(null,t,r,e,n);break e;case 14:t=TO(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),bE(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:pi(r,o),_O(e,t,r,o,n);case 3:e:{if(AO(t),e===null)throw Error(Ne(387));r=t.pendingProps,i=t.memoizedState,o=i.element,jA(e,t),jm(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=pu(Error(Ne(423)),t),t=OO(e,t,r,n,o);break e}else if(r!==o){o=pu(Error(Ne(424)),t),t=OO(e,t,r,n,o);break e}else for(mo=fa(t.stateNode.containerInfo.firstChild),ho=t,Kt=!0,di=null,n=QA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(lu(),r===o){t=Es(e,t,n);break e}Mr(e,t,r,n)}t=t.child}return t;case 5:return KA(t),e===null&&Qb(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,jb(r,o)?s=null:i!==null&&jb(r,i)&&(t.flags|=32),NO(e,t),Mr(e,t,s,n),t.child;case 6:return e===null&&Qb(t),null;case 13:return DO(e,t,n);case 4:return iE(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fu(t,null,r,n):Mr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:pi(r,o),SO(e,t,r,o,n);case 7:return Mr(e,t,t.pendingProps,n),t.child;case 8:return Mr(e,t,t.pendingProps.children,n),t.child;case 12:return Mr(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,Ft(Pm,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),eE(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),eE(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}Mr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,uu(t,n),o=Mo(o),r=r(o),t.flags|=1,Mr(e,t,r,n),t.child;case 14:return r=t.type,o=pi(r,t.pendingProps),o=pi(r.type,o),TO(e,t,r,o,n);case 15:return CO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:pi(r,o),Km(e,t),t.tag=1,Xr(r)?(e=!0,Im(t)):e=!1,uu(t,n),HA(t,r,o),oE(t,r,o,n),EE(null,t,r,!0,e,n);case 19:return LO(e,t,n);case 22:return kO(e,t,n)}throw Error(Ne(156,t.tag))};function rD(e,t){return F_(e,t)}function Tj(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 Tj(e,t,n,r)}function jE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cj(e){if(typeof e=="function")return jE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W1)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 ag(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")jE(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wc:return Dl(n.children,o,i,t);case z1:s=8,o|=8;break;case H1:return e=Vo(12,n,t,o|2),e.elementType=H1,e.lanes=i,e;case G1:return e=Vo(13,n,t,o),e.elementType=G1,e.lanes=i,e;case Y1:return e=Vo(19,n,t,o),e.elementType=Y1,e.lanes=i,e;case f_:return lg(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c_:s=10;break e;case u_:s=9;break e;case W1: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 lg(e,t,n,r){return e=Vo(22,e,r,t),e.elementType=f_,e.lanes=n,e.stateNode={isHidden:!1},e}function UE(e,t,n){return e=Vo(6,e,null,t),e.lanes=n,e}function BE(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 kj(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=mb(0),this.expirationTimes=mb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mb(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function qE(e,t,n,r,o,i,s,l,c){return e=new kj(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},nE(i),e}function Nj(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hc,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function oD(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 DA(e,n,t)}return t}function iD(e,t,n,r,o,i,s,l,c){return e=qE(n,r,!0,e,o,i,s,l,c),e.context=oD(null),n=e.current,r=Pr(),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 cg(e,t,n,r){var o=t.current,i=Pr(),s=Ea(o);return n=oD(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),Vm(e,o,s)),s}function ug(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 sD(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zE(e,t){sD(e,t),(e=e.alternate)&&sD(e,t)}function _j(){return null}var aD=typeof reportError=="function"?reportError:function(e){console.error(e)};function HE(e){this._internalRoot=e}fg.prototype.render=HE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ne(409));cg(e,t,null,null)},fg.prototype.unmount=HE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_l(function(){cg(null,e,null,null)}),t[hs]=null}};function fg(e){this._internalRoot=e}fg.prototype.unstable_scheduleHydration=function(e){if(e){var t=q_();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&&W_(e)}};function WE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function dg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lD(){}function Aj(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var f=ug(s);i.call(f)}}var s=iD(t,r,e,0,null,!1,!1,"",lD);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=ug(c);l.call(f)}}var c=qE(e,0,!1,null,null,!1,!1,"",lD);return e._reactRootContainer=c,e[hs]=c.current,bd(e.nodeType===8?e.parentNode:e),_l(function(){cg(t,c,n,r)}),c}function pg(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=ug(s);l.call(c)}}cg(t,s,e,o)}else s=Aj(n,t,e,o,r);return ug(s)}U_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=od(t.pendingLanes);n!==0&&(gb(t,n|1),to(t,mn()),!(Et&6)&&(gu=mn()+500,ha()))}break;case 13:_l(function(){var r=ys(e,1);if(r!==null){var o=Pr();gi(r,e,1,o)}}),zE(e,1)}},vb=function(e){if(e.tag===13){var t=ys(e,134217728);if(t!==null){var n=Pr();gi(t,e,134217728,n)}zE(e,134217728)}},B_=function(e){if(e.tag===13){var t=Ea(e),n=ys(e,t);if(n!==null){var r=Pr();gi(n,e,t,r)}zE(e,t)}},q_=function(){return _t},z_=function(e,t){var n=_t;try{return _t=e,t()}finally{_t=n}},cb=function(e,t,n){switch(t){case"input":if(tb(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=Om(r);if(!o)throw Error(Ne(90));h_(r),tb(r,o)}}}break;case"textarea":b_(e,n);break;case"select":t=n.value,t!=null&&Gc(e,!!n.multiple,t,!1)}},__=PE,A_=_l;var Oj={usingClientEntryPoint:!1,Events:[xd,ru,Om,k_,N_,PE]},Md={findFiberByHostInstance:El,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Dj={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=L_(e),e===null?null:e.stateNode},findFiberByHostInstance:Md.findFiberByHostInstance||_j,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 hg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hg.isDisabled&&hg.supportsFiber)try{fm=hg.inject(Dj),Bi=hg}catch{}}uo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Oj,uo.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!WE(t))throw Error(Ne(200));return Nj(e,t,null,n)},uo.createRoot=function(e,t){if(!WE(e))throw Error(Ne(299));var n=!1,r="",o=aD;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=qE(e,1,!1,null,null,n,!1,r,o),e[hs]=t.current,bd(e.nodeType===8?e.parentNode:e),new HE(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=L_(t),e=e===null?null:e.stateNode,e},uo.flushSync=function(e){return _l(e)},uo.hydrate=function(e,t,n){if(!dg(t))throw Error(Ne(200));return pg(null,e,t,!0,n)},uo.hydrateRoot=function(e,t,n){if(!WE(e))throw Error(Ne(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=aD;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=iD(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 fg(t)},uo.render=function(e,t,n){if(!dg(t))throw Error(Ne(200));return pg(null,e,t,!1,n)},uo.unmountComponentAtNode=function(e){if(!dg(e))throw Error(Ne(40));return e._reactRootContainer?(_l(function(){pg(null,null,e,!1,function(){e._reactRootContainer=null,e[hs]=null})}),!0):!1},uo.unstable_batchedUpdates=PE,uo.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!dg(n))throw Error(Ne(200));if(e==null||e._reactInternals===void 0)throw Error(Ne(38));return pg(e,t,n,!1,r)},uo.version="18.2.0-next-9e3b772b8-20220608";function cD(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cD)}catch(e){console.error(e)}}cD(),n_.exports=uo;var Pd=n_.exports;const mg=Ui(Pd);function uD(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=uD(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=uD(e))&&(r&&(r+=" "),r+=t);return r}const Ij="16.8.1",GE=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 gn(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Lj=/\r\n|[\n\r]/g;function gg(e,t){let n=0,r=1;for(const o of e.body.matchAll(Lj)){if(typeof o.index=="number"||gn(!1),o.index>=t)break;n=o.index+o[0].length,r+=1}return{line:r,column:t+1-n}}function fD(e){return YE(e.source,gg(e.source,e.start))}function YE(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+dD([[`${s} |`,b[0]],...b.slice(1,m+1).map(w=>["|",w]),["|","^".padStart(v)],["|",b[m+1]]])}return f+dD([[`${s-1} |`,d[o-1]],[`${s} |`,g],["|","^".padStart(c)],[`${s+1} |`,d[o+1]]])}function dD(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 Rj(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}=Rj(n);super(t),this.name="GraphQLError",this.path=f??void 0,this.originalError=d??void 0,this.nodes=pD(Array.isArray(s)?s:s?[s]:void 0);const m=pD((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=>gg(l,b)):m==null?void 0:m.map(b=>gg(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+=`
`+fD(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
`+YE(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 pD(e){return e===void 0||e.length===0?void 0:e}function Fj(e){return e.toString()}function Mj(e){return e.toJSON()}function Mn(e,t,n){return new he(`Syntax Error: ${n}`,{source:e,positions:[t]})}let hD=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 mD={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"]},Pj=new Set(Object.keys(mD));function KE(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&Pj.has(t)}var Pn;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Pn||(Pn={}));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 JE(e){return e===9||e===32}function $d(e){return e>=48&&e<=57}function gD(e){return e>=97&&e<=122||e>=65&&e<=90}function XE(e){return gD(e)||e===95}function vD(e){return gD(e)||$d(e)||e===95}function $j(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=Vj(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 Vj(e){let t=0;for(;t<e.length&&JE(e.charCodeAt(t));)++t;return t}function jj(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 yD(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||JE(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&&JE(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 ZE{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=Uj(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===ge.COMMENT);return t}}function bD(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 yu(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function vg(e,t){return ED(e.charCodeAt(t))&&wD(e.charCodeAt(t+1))}function ED(e){return e>=55296&&e<=56319}function wD(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 Nn(e,t,n,r,o){const i=e.line,s=1+n-e.lineStart;return new QE(t,n,r,i,s,o)}function Uj(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 Bj(e,o);case 33:return Nn(e,ge.BANG,o,o+1);case 36:return Nn(e,ge.DOLLAR,o,o+1);case 38:return Nn(e,ge.AMP,o,o+1);case 40:return Nn(e,ge.PAREN_L,o,o+1);case 41:return Nn(e,ge.PAREN_R,o,o+1);case 46:if(n.charCodeAt(o+1)===46&&n.charCodeAt(o+2)===46)return Nn(e,ge.SPREAD,o,o+3);break;case 58:return Nn(e,ge.COLON,o,o+1);case 61:return Nn(e,ge.EQUALS,o,o+1);case 64:return Nn(e,ge.AT,o,o+1);case 91:return Nn(e,ge.BRACKET_L,o,o+1);case 93:return Nn(e,ge.BRACKET_R,o,o+1);case 123:return Nn(e,ge.BRACE_L,o,o+1);case 124:return Nn(e,ge.PIPE,o,o+1);case 125:return Nn(e,ge.BRACE_R,o,o+1);case 34:return n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34?Yj(e,o):zj(e,o)}if($d(i)||i===45)return qj(e,o,i);if(XE(i))return Qj(e,o);throw Mn(e.source,o,i===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:yu(i)||vg(n,o)?`Unexpected character: ${Il(e,o)}.`:`Invalid character: ${Il(e,o)}.`)}return Nn(e,ge.EOF,r,r)}function Bj(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(yu(i))++o;else if(vg(n,o))o+=2;else break}return Nn(e,ge.COMMENT,t,o,n.slice(t+1,o))}function qj(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 Mn(e.source,o,`Invalid number, unexpected digit after 0: ${Il(e,o)}.`)}else o=ew(e,o,i),i=r.charCodeAt(o);if(i===46&&(s=!0,i=r.charCodeAt(++o),o=ew(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=ew(e,o,i),i=r.charCodeAt(o)),i===46||XE(i))throw Mn(e.source,o,`Invalid number, expected digit but got: ${Il(e,o)}.`);return Nn(e,s?ge.FLOAT:ge.INT,t,o,r.slice(t,o))}function ew(e,t,n){if(!$d(n))throw Mn(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 zj(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),Nn(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?Hj(e,o):Wj(e,o):Gj(e,o);s+=c.value,o+=c.size,i=o;continue}if(l===10||l===13)break;if(yu(l))++o;else if(vg(n,o))o+=2;else throw Mn(e.source,o,`Invalid character within String: ${Il(e,o)}.`)}throw Mn(e.source,o,"Unterminated string.")}function Hj(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||!yu(r))break;return{value:String.fromCodePoint(r),size:o}}if(r=r<<4|Vd(i),r<0)break}throw Mn(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+o)}".`)}function Wj(e,t){const n=e.source.body,r=xD(n,t+2);if(yu(r))return{value:String.fromCodePoint(r),size:6};if(ED(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const o=xD(n,t+8);if(wD(o))return{value:String.fromCodePoint(r,o),size:12}}throw Mn(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function xD(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 Gj(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 Mn(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Yj(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=Nn(e,ge.BLOCK_STRING,t,i+3,$j(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(yu(f))++i;else if(vg(n,i))i+=2;else throw Mn(e.source,i,`Invalid character within String: ${Il(e,i)}.`)}throw Mn(e.source,i,"Unterminated string.")}function Qj(e,t){const n=e.source.body,r=n.length;let o=t+1;for(;o<r;){const i=n.charCodeAt(o);if(vD(i))++o;else break}return Nn(e,ge.NAME,t,o,n.slice(t,o))}const Kj=10,SD=2;function ye(e){return yg(e,[])}function yg(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Jj(e,t);default:return String(e)}}function Jj(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Xj(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:yg(r,n)}else if(Array.isArray(e))return eU(e,n);return Zj(e,n)}function Xj(e){return typeof e.toJSON=="function"}function Zj(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>SD?"["+tU(e)+"]":"{ "+n.map(([o,i])=>o+": "+yg(i,t)).join(", ")+" }"}function eU(e,t){if(e.length===0)return"[]";if(t.length>SD)return"[Array]";const n=Math.min(Kj,e.length),r=e.length-n,o=[];for(let i=0;i<n;++i)o.push(yg(e[i],t));return r===1?o.push("... 1 more item"):r>1&&o.push(`... ${r} more items`),"["+o.join(", ")+"]"}function tU(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 TD(e){return vi(e,jd)}function rr(e,t){return new bg(e,t).parseDocument()}function CD(e,t){const n=new bg(e,t);n.expectToken(ge.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(ge.EOF),r}function nU(e,t){const n=new bg(e,t);n.expectToken(ge.SOF);const r=n.parseConstValueLiteral();return n.expectToken(ge.EOF),r}function rU(e,t){const n=new bg(e,t);n.expectToken(ge.SOF);const r=n.parseTypeReference();return n.expectToken(ge.EOF),r}class bg{constructor(t,n={}){const r=TD(t)?t:new jd(t);this._lexer=new ZE(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 Mn(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:Pn.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 Pn.QUERY;case"mutation":return Pn.MUTATION;case"subscription":return Pn.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 Mn(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 Mn(this._lexer.source,this._lexer.token.start,`${Eg(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 hD(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 Mn(this._lexer.source,n.start,`Expected ${kD(t)}, found ${Eg(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 Mn(this._lexer.source,n.start,`Expected "${t}", found ${Eg(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 Mn(this._lexer.source,n.start,`Unexpected ${Eg(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 Mn(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function Eg(e){const t=e.value;return kD(e.kind)+(t!=null?` "${t}"`:"")}function kD(e){return bD(e)?`"${e}"`:e}const oU=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,oU),l=s.pop();return o+s.join(", ")+", or "+l+"?"}function ND(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(wg(o)&&wg(i)){let s=0;do++n,s=s*10+o-tw,o=e.charCodeAt(n);while(wg(o)&&s>0);let l=0;do++r,l=l*10+i-tw,i=t.charCodeAt(r);while(wg(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 tw=48,iU=57;function wg(e){return!isNaN(e)&&tw<=e&&e<=iU}function Ta(e,t){const n=Object.create(null),r=new sU(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 sU{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=_D(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=_D(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 _D(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 aU(e){return`"${e.replace(lU,cU)}"`}const lU=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function cU(e){return uU[e.charCodeAt(0)]}const uU=["\\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 Jt(e,t,n=mD){const r=new Map;for(const S of Object.values(U))r.set(S,bu(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[_,D]of c){const I=_-E;D===null?(f.splice(I,1),E++):f[I]=D}}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;KE(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(KE(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 nw(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}=bu(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 bu(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 fU(e,t,n){const{enter:r,leave:o}=bu(e,t);return n?o:r}function ft(e){return Jt(e,pU)}const dU=80,pU={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>dU&&(s=i+mt(`(
`,xg(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?yD(e):aU(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+(AD(n)?mt(`(
`,xg(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+(AD(n)?mt(`(
`,xg(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(`{
`,xg(Be(e,`
`)),`
}`)}function mt(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function xg(e){return mt(" ",e.replace(/\n/g,`
`))}function AD(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(`
`)))!==null&&t!==void 0?t:!1}function Sg(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=>Sg(n,t));case U.OBJECT:return Sa(e.fields,n=>n.name.value,n=>Sg(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(!vD(e.charCodeAt(t)))throw new he(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!XE(e.charCodeAt(0)))throw new he(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function OD(e){if(e==="true"||e==="false"||e==="null")throw new he(`Enum values cannot be named: ${e}`);return bo(e)}function Eu(e){return or(e)||We(e)||Je(e)||Mt(e)||Rt(e)||gt(e)||vt(e)||He(e)}function hU(e){if(!Eu(e))throw new Error(`Expected ${ye(e)} to be a GraphQL type.`);return e}function or(e){return vi(e,Uo)}function mU(e){if(!or(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Scalar type.`);return e}function We(e){return vi(e,$n)}function DD(e){if(!We(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Object type.`);return e}function Je(e){return vi(e,$r)}function ID(e){if(!Je(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Interface type.`);return e}function Mt(e){return vi(e,Na)}function gU(e){if(!Mt(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Union type.`);return e}function Rt(e){return vi(e,Er)}function vU(e){if(!Rt(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Enum type.`);return e}function gt(e){return vi(e,Vr)}function yU(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,zt)}function bU(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 EU(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)||Rt(e)||gt(e)||Bd(e)&&ir(e.ofType)}function wU(e){if(!ir(e))throw new Error(`Expected ${ye(e)} to be a GraphQL input type.`);return e}function Cs(e){return or(e)||We(e)||Je(e)||Mt(e)||Rt(e)||Bd(e)&&Cs(e.ofType)}function xU(e){if(!Cs(e))throw new Error(`Expected ${ye(e)} to be a GraphQL output type.`);return e}function Yn(e){return or(e)||Rt(e)}function SU(e){if(!Yn(e))throw new Error(`Expected ${ye(e)} to be a GraphQL leaf type.`);return e}function on(e){return We(e)||Je(e)||Mt(e)}function TU(e){if(!on(e))throw new Error(`Expected ${ye(e)} to be a GraphQL composite type.`);return e}function sn(e){return Je(e)||Mt(e)}function LD(e){if(!sn(e))throw new Error(`Expected ${ye(e)} to be a GraphQL abstract type.`);return e}class zt{constructor(t){Eu(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){Tg(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 CU(e){if(!Bd(e))throw new Error(`Expected ${ye(e)} to be a GraphQL wrapping type.`);return e}function Tg(e){return Eu(e)&&!He(e)}function RD(e){if(!Tg(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)||We(e)||Je(e)||Mt(e)||Rt(e)||gt(e)}function kU(e){if(!ks(e))throw new Error(`Expected ${ye(e)} to be a GraphQL named type.`);return e}function yt(e){if(e){let t=e;for(;Bd(t);)t=t.ofType;return t}}function rw(e){return typeof e=="function"?e():e}function ow(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:ND;this.name=bo(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:ND,this.parseValue=s,this.parseLiteral=(o=t.parseLiteral)!==null&&o!==void 0?o:(l,c)=>s(Sg(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=()=>MD(t),this._interfaces=()=>FD(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:$D(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function FD(e){var t;const n=rw((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 MD(e){const t=ow(e.fields);return wu(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;wu(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 wu(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:PD(i),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:jo(n.extensions),astNode:n.astNode}})}function PD(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 wu(e){return yo(e)&&!Array.isArray(e)}function $D(e){return Ts(e,t=>({description:t.description,type:t.type,args:VD(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function VD(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 $r{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=MD.bind(void 0,t),this._interfaces=FD.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:$D(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=NU.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 NU(e){const t=rw(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=_U(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}.`+Cg(this,r))}const n=this.getValue(t);if(n==null)throw new he(`Value "${t}" does not exist in "${this.name}" enum.`+Cg(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}.`+Cg(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.`+Cg(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 Cg(e,t){const n=e.getValues().map(o=>o.name),r=Ta(t,n);return xs("the enum value",r)}function _U(e,t){return wu(t)||lt(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(wu(r)||lt(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${ye(r)}.`),{name:OD(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:jo(r.extensions),astNode:r.astNode}))}class Vr{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=AU.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 AU(e){const t=ow(e.fields);return wu(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 kg(e){return He(e.type)&&e.defaultValue===void 0}function Ng(e,t){return e===t?!0:He(e)&&He(t)||vt(e)&&vt(t)?Ng(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:sn(n)&&(Je(t)||We(t))&&e.isSubType(n,t)}function qd(e,t,n){return t===n?!0:sn(t)?sn(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):sn(n)?e.isSubType(n,t):!1}const _g=2147483647,Ag=-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>_g||n<Ag)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>_g||e<Ag)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>_g||t<Ag)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)}}),Pt=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}}),Ht=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([Pt,zd,Hd,Ht,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 Og(e){return vi(e,Eo)}function OU(e){if(!Og(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=PD(o)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:VD(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const Dg=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(Ht),description:"Included when true."}}}),Ig=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(Ht),description:"Skipped when true."}}}),iw="No longer supported",Lg=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:Pt,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:iw}}}),sw=new Eo({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Fe.SCALAR],args:{url:{type:new tt(Pt),description:"The URL that specifies the behavior of this scalar."}}}),_a=Object.freeze([Dg,Ig,Lg,sw]);function Rg(e){return _a.some(({name:t})=>t===e.name)}function aw(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(aw(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(Yn(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 jD.test(r)?{kind:U.INT,value:r}:{kind:U.FLOAT,value:r}}if(typeof n=="string")return Rt(t)?{kind:U.ENUM,value:n}:t===Wd&&jD.test(n)?{kind:U.INT,value:n}:{kind:U.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${ye(n)}.`)}gn(!1,"Unexpected input type: "+ye(t))}const jD=/^-?(?:0|[1-9][0-9]*)$/,Fg=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:Pt,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new tt(new zt(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 zt(new tt(lw))),resolve:e=>e.getDirectives()}})}),lw=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(Pt),resolve:e=>e.name},description:{type:Pt,resolve:e=>e.description},isRepeatable:{type:new tt(Ht),resolve:e=>e.isRepeatable},locations:{type:new tt(new zt(new tt(cw))),resolve:e=>e.locations},args:{type:new tt(new zt(new tt(Kd))),args:{includeDeprecated:{type:Ht,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),cw=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(dw),resolve(e){if(or(e))return Dt.SCALAR;if(We(e))return Dt.OBJECT;if(Je(e))return Dt.INTERFACE;if(Mt(e))return Dt.UNION;if(Rt(e))return Dt.ENUM;if(gt(e))return Dt.INPUT_OBJECT;if(vt(e))return Dt.LIST;if(He(e))return Dt.NON_NULL;gn(!1,`Unexpected type: "${ye(e)}".`)}},name:{type:Pt,resolve:e=>"name"in e?e.name:void 0},description:{type:Pt,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Pt,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new zt(new tt(uw)),args:{includeDeprecated:{type:Ht,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(We(e)||Je(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new zt(new tt(Bo)),resolve(e){if(We(e)||Je(e))return e.getInterfaces()}},possibleTypes:{type:new zt(new tt(Bo)),resolve(e,t,n,{schema:r}){if(sn(e))return r.getPossibleTypes(e)}},enumValues:{type:new zt(new tt(fw)),args:{includeDeprecated:{type:Ht,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Rt(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new zt(new tt(Kd)),args:{includeDeprecated:{type:Ht,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}})}),uw=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(Pt),resolve:e=>e.name},description:{type:Pt,resolve:e=>e.description},args:{type:new tt(new zt(new tt(Kd))),args:{includeDeprecated:{type:Ht,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(Ht),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Pt,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(Pt),resolve:e=>e.name},description:{type:Pt,resolve:e=>e.description},type:{type:new tt(Bo),resolve:e=>e.type},defaultValue:{type:Pt,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(Ht),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Pt,resolve:e=>e.deprecationReason}})}),fw=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(Pt),resolve:e=>e.name},description:{type:Pt,resolve:e=>e.description},isDeprecated:{type:new tt(Ht),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Pt,resolve:e=>e.deprecationReason}})});var Dt;(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"})(Dt||(Dt={}));const dw=new Er({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Dt.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Dt.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Dt.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Dt.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Dt.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Dt.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Dt.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Dt.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),qo={name:"__schema",type:new tt(Fg),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(Pt),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(Pt),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([Fg,lw,cw,Bo,uw,Kd,fw,dw]);function Fl(e){return Jd.some(({name:t})=>e.name===t)}function Mg(e){return vi(e,Ml)}function pw(e){if(!Mg(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(Og(i))for(const s of i.args)bi(s.type,o);bi(Fg,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,Je(i)){for(const l of i.getInterfaces())if(Je(l)){let c=this._implementationsMap[l.name];c===void 0&&(c=this._implementationsMap[l.name]={objects:[],interfaces:[]}),c.interfaces.push(i)}}else if(We(i)){for(const l of i.getInterfaces())if(Je(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 Pn.QUERY:return this.getQueryType();case Pn.MUTATION:return this.getMutationType();case Pn.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Mt(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),Mt(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=yt(e);if(!t.has(n)){if(t.add(n),Mt(n))for(const r of n.getTypes())bi(r,t);else if(We(n)||Je(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 Pg(e){if(pw(e),e.__validationErrors)return e.__validationErrors;const t=new DU(e);IU(t),LU(t),RU(t);const n=t.getErrors();return e.__validationErrors=n,n}function $g(e){const t=Pg(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
`))}class DU{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 IU(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!We(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${ye(n)}.`,(r=hw(t,Pn.QUERY))!==null&&r!==void 0?r:n.astNode)}const o=t.getMutationType();if(o&&!We(o)){var i;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${ye(o)}.`,(i=hw(t,Pn.MUTATION))!==null&&i!==void 0?i:o.astNode)}const s=t.getSubscriptionType();if(s&&!We(s)){var l;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${ye(s)}.`,(l=hw(t,Pn.SUBSCRIPTION))!==null&&l!==void 0?l:s.astNode)}}function hw(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 LU(e){for(const n of e.schema.getDirectives()){if(!Og(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.`,[mw(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 RU(e){const t=jU(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),We(r)||Je(r)?(UD(e,r),BD(e,r)):Mt(r)?PU(e,r):Rt(r)?$U(e,r):gt(r)&&(VU(e,r),t(r))}}function UD(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.`,[mw(l.astNode),(i=l.astNode)===null||i===void 0?void 0:i.type])}}}}function BD(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!Je(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,MU(e,t,r),FU(e,t,r)}}function FU(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(!Ng(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 MU(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 PU(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.`,qD(t,o.name));continue}r[o.name]=!0,We(o)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${ye(o)}.`,qD(t,String(o)))}}function $U(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 VU(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(kg(i)&&i.deprecationReason!=null){var o;e.reportError(`Required input field ${t.name}.${i.name} cannot be deprecated.`,[mw(i.astNode),(o=i.astNode)===null||o===void 0?void 0:o.type])}}}function jU(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 qD(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 mw(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Lg.name)}function Qn(e,t){switch(t.kind){case U.LIST_TYPE:{const n=Qn(e,t.type);return n&&new zt(n)}case U.NON_NULL_TYPE:{const n=Qn(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??UU,n&&(ir(n)&&this._inputTypeStack.push(n),on(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=yt(this.getType());this._parentTypeStack.push(on(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(We(o)?o:void 0);break}case U.INLINE_FRAGMENT:case U.FRAGMENT_DEFINITION:{const o=t.typeCondition,i=o?Qn(n,o):yt(this.getType());this._typeStack.push(Cs(i)?i:void 0);break}case U.VARIABLE_DEFINITION:{const o=Qn(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=yt(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=yt(this.getInputType());let i;Rt(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 UU(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&&on(t))return wo;if(We(t)||Je(t))return t.getFields()[r]}function $l(e,t){return{enter(...n){const r=n[0];e.enter(r);const o=bu(t,r.kind).enter;if(o){const i=o.apply(t,n);return i!==void 0&&(e.leave(r),KE(i)&&e.enter(i)),i}},leave(...n){const r=n[0],o=bu(t,r.kind).leave;let i;return o&&(i=o.apply(t,n)),e.leave(r),i}}}function BU(e){return gw(e)||Vg(e)||yw(e)}function gw(e){return e.kind===U.OPERATION_DEFINITION||e.kind===U.FRAGMENT_DEFINITION}function qU(e){return e.kind===U.FIELD||e.kind===U.FRAGMENT_SPREAD||e.kind===U.INLINE_FRAGMENT}function zD(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 vw(e){return zD(e)&&(e.kind===U.LIST?e.values.some(vw):e.kind===U.OBJECT?e.fields.some(t=>vw(t.value)):e.kind!==U.VARIABLE)}function zU(e){return e.kind===U.NAMED_TYPE||e.kind===U.LIST_TYPE||e.kind===U.NON_NULL_TYPE}function Vg(e){return e.kind===U.SCHEMA_DEFINITION||xu(e)||e.kind===U.DIRECTIVE_DEFINITION}function xu(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 yw(e){return e.kind===U.SCHEMA_EXTENSION||jg(e)}function jg(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 bw(e){return{Document(t){for(const n of t.definitions)if(!gw(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 HD(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",HU(o,n,i));s===""&&(s=xs(WU(n,i))),e.reportError(new he(`Cannot query field "${i}" on type "${n.name}".`+s,{nodes:t}))}}}}function HU(e,t,n){if(!sn(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:Je(s)&&e.isSubType(s,l)?-1:Je(l)&&e.isSubType(l,s)?1:Ud(s.name,l.name)}).map(s=>s.name)}function WU(e,t){if(We(e)||Je(e)){const n=Object.keys(e.getFields());return Ta(t,n)}return[]}function WD(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=Qn(e.getSchema(),n);if(r&&!on(r)){const o=ft(n);e.reportError(new he(`Fragment cannot condition on non composite type "${o}".`,{nodes:n}))}}},FragmentDefinition(t){const n=Qn(e.getSchema(),t.typeCondition);if(n&&!on(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 GD(e){return{...YD(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 YD(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 Ug(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=GU(f);m&&!g.includes(m)&&e.reportError(new he(`Directive "@${d}" may not be used on ${m}.`,{nodes:i}))}}}function GU(e){const t=e[e.length-1];switch("kind"in t||gn(!1),t.kind){case U.OPERATION_DEFINITION:return YU(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||gn(!1),n.kind===U.INPUT_OBJECT_TYPE_DEFINITION?Fe.INPUT_FIELD_DEFINITION:Fe.ARGUMENT_DEFINITION}default:gn(!1,"Unexpected kind: "+ye(t.kind))}}function YU(e){switch(e){case Pn.QUERY:return Fe.QUERY;case Pn.MUTATION:return Fe.MUTATION;case Pn.SUBSCRIPTION:return Fe.SUBSCRIPTION}}function Ew(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new he(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function Bg(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const i of e.getDocument().definitions)xu(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&&QU(m);if(v&&QD.includes(d))return;const b=Ta(d,v?QD.concat(o):o);e.reportError(new he(`Unknown type "${d}".`+xs(b),{nodes:i}))}}}}const QD=[...Gd,...Jd].map(e=>e.name);function QU(e){return"kind"in e&&(Vg(e)||yw(e))}function KD(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 ww(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 JD(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 XD(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 xw(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 ZD(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 qg(e){switch(e.kind){case U.OBJECT:return{...e,fields:KU(e.fields)};case U.LIST:return{...e,values:e.values.map(qg)};case U.INT:case U.FLOAT:case U.STRING:case U.BOOLEAN:case U.NULL:case U.ENUM:case U.VARIABLE:return e}}function KU(e){return e.map(t=>({...t,value:qg(t.value)})).sort((t,n)=>Ud(t.name.value,n.name.value))}function e2(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+e2(n)).join(" and "):e}function t2(e){const t=new nB,n=new Map;return{SelectionSet(r){const o=JU(e,n,t,e.getParentType(),r);for(const[[i,s],l,c]of o){const f=e2(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 JU(e,t,n,r,o){const i=[],[s,l]=Wg(e,t,r,o);if(ZU(e,i,t,n,s),l.length!==0)for(let c=0;c<l.length;c++){zg(e,i,t,n,!1,s,l[c]);for(let f=c+1;f<l.length;f++)Hg(e,i,t,n,!1,l[c],l[f])}return i}function zg(e,t,n,r,o,i,s){const l=e.getFragment(s);if(!l)return;const[c,f]=Cw(e,n,l);if(i!==c){Sw(e,t,n,r,o,i,c);for(const d of f)r.has(d,s,o)||(r.add(d,s,o),zg(e,t,n,r,o,i,d))}}function Hg(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]=Cw(e,n,l),[g,m]=Cw(e,n,c);Sw(e,t,n,r,o,f,g);for(const v of m)Hg(e,t,n,r,o,i,v);for(const v of d)Hg(e,t,n,r,o,v,s)}function XU(e,t,n,r,o,i,s,l){const c=[],[f,d]=Wg(e,t,o,i),[g,m]=Wg(e,t,s,l);Sw(e,c,t,n,r,f,g);for(const v of m)zg(e,c,t,n,r,f,v);for(const v of d)zg(e,c,t,n,r,g,v);for(const v of d)for(const b of m)Hg(e,c,t,n,r,v,b);return c}function ZU(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=n2(e,n,r,!1,i,s[l],s[c]);f&&t.push(f)}}function Sw(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=n2(e,n,r,o,l,d,g);m&&t.push(m)}}}function n2(e,t,n,r,o,i,s){const[l,c,f]=i,[d,g,m]=s,v=r||l!==d&&We(l)&&We(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(!eB(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&&Tw(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=XU(e,t,n,v,yt(b),N,yt(w),S);return tB(x,o,c,g)}}function eB(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:r2(s)===r2(l)})}function r2(e){return ft(qg(e))}function Tw(e,t){return vt(e)?vt(t)?Tw(e.ofType,t.ofType):!0:vt(t)?!0:He(e)?He(t)?Tw(e.ofType,t.ofType):!0:He(t)?!0:Yn(e)||Yn(t)?e!==t:!1}function Wg(e,t,n,r){const o=t.get(r);if(o)return o;const i=Object.create(null),s=Object.create(null);o2(e,n,r,i,s);const l=[i,Object.keys(s)];return t.set(r,l),l}function Cw(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const o=Qn(e.getSchema(),n.typeCondition);return Wg(e,t,o,n.selectionSet)}function o2(e,t,n,r,o){for(const i of n.selections)switch(i.kind){case U.FIELD:{const s=i.name.value;let l;(We(t)||Je(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?Qn(e.getSchema(),s):t;o2(e,l,i.selectionSet,r,o);break}}}function tB(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 nB{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 i2(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(on(n)&&on(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=rB(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 rB(e,t){const n=e.getFragment(t);if(n){const r=Qn(e.getSchema(),n.typeCondition);if(on(r))return r}}function kw(e){const t=e.getSchema(),n=Object.create(null);for(const o of e.getDocument().definitions)xu(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=oB[s.kind]:l&&(c=iB(l)),c){if(c!==o.kind){const f=sB(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 oB={[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 iB(e){if(or(e))return U.SCALAR_TYPE_EXTENSION;if(We(e))return U.OBJECT_TYPE_EXTENSION;if(Je(e))return U.INTERFACE_TYPE_EXTENSION;if(Mt(e))return U.UNION_TYPE_EXTENSION;if(Rt(e))return U.ENUM_TYPE_EXTENSION;if(gt(e))return U.INPUT_OBJECT_TYPE_EXTENSION;gn(!1,"Unexpected type: "+ye(e))}function sB(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:gn(!1,"Unexpected kind: "+ye(e))}}function s2(e){return{...a2(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 a2(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(aB),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=Eu(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 aB(e){return e.type.kind===U.NON_NULL_TYPE&&e.defaultValue==null}function l2(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(Yn(yt(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 c2(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function Su(e,t,n){return{prev:e,key:t,typename:n}}function wr(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Nw(e,t,n=lB){return Zd(e,t,n,void 0)}function lB(e,t,n){let r="Invalid value "+ye(t);throw e.length>0&&(r+=` at "value${c2(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(wr(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 aw(e)?Array.from(e,(i,s)=>{const l=Su(r,s,void 0);return Zd(i,o,n,l)}):[Zd(e,o,n,r)]}if(gt(t)){if(!yo(e)){n(wr(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(wr(r),e,new he(`Field "${s.name}" of required type "${c}" was not provided.`))}continue}o[s.name]=Zd(l,s.type,n,Su(r,s.name,t.name))}for(const s of Object.keys(e))if(!i[s]){const l=Ta(s,Object.keys(t.getFields()));n(wr(r),e,new he(`Field "${s}" is not defined by type "${t.name}".`+xs(l)))}return o}if(Yn(t)){let o;try{o=t.parseValue(e)}catch(i){i instanceof he?n(wr(r),e,i):n(wr(r),e,new he(`Expected type "${t.name}". `+i.message,{originalError:i}));return}return o===void 0&&n(wr(r),e,new he(`Expected type "${t.name}".`)),o}gn(!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(u2(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||u2(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(Yn(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}gn(!1,"Unexpected input type: "+ye(t))}}function u2(e,t){return e.kind===U.VARIABLE&&(t==null||t[e.name.value]===void 0)}function f2(e,t,n,r){const o=[],i=r==null?void 0:r.maxErrors;try{const s=cB(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 cB(e,t,n,r){const o={};for(const i of t){const s=i.variable.name.value,l=Qn(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(!d2(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]=Nw(c,l,(f,d,g)=>{let m=`Variable "$${s}" got invalid value `+ye(d);f.length>0&&(m+=` at "${s}${c2(f)}"`),r(new he(m+"; "+g.message,{nodes:i,originalError:g}))})}return o}function Gg(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||!d2(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 As(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 Gg(e,o,n)}function d2(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _w(e,t,n,r,o){const i=new Map;return Yg(e,t,n,r,o,i,new Set),i}function uB(e,t,n,r,o){const i=new Map,s=new Set;for(const l of o)l.selectionSet&&Yg(e,t,n,r,l.selectionSet,i,s);return i}function Yg(e,t,n,r,o,i,s){for(const l of o.selections)switch(l.kind){case U.FIELD:{if(!Aw(n,l))continue;const c=fB(l),f=i.get(c);f!==void 0?f.push(l):i.set(c,[l]);break}case U.INLINE_FRAGMENT:{if(!Aw(n,l)||!p2(e,l,r))continue;Yg(e,t,n,r,l.selectionSet,i,s);break}case U.FRAGMENT_SPREAD:{const c=l.name.value;if(s.has(c)||!Aw(n,l))continue;s.add(c);const f=t[c];if(!f||!p2(e,f,r))continue;Yg(e,t,n,r,f.selectionSet,i,s);break}}}function Aw(e,t){const n=As(Ig,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=As(Dg,t,e);return(r==null?void 0:r.if)!==!1}function p2(e,t,n){const r=t.typeCondition;if(!r)return!0;const o=Qn(e,r);return o===n?!0:sn(o)?e.isSubType(o,n):!1}function fB(e){return e.alias?e.alias.value:e.name.value}function h2(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=_w(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 Ow(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 m2(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=Ow(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 Qg(e){return{Field:t,Directive:t};function t(n){var r;const o=(r=n.arguments)!==null&&r!==void 0?r:[],i=Ow(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 Dw(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 Kg(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(xu(l)||jg(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 Iw(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];Rt(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 Lw(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;dB(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 dB(e,t){return We(e)||Je(e)||gt(e)?e.getFields()[t]!=null:!1}function g2(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 Jg(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||gn(!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 v2(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 Rw(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 Fw(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 y2(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],o=Ow(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 b2(e){return{ListValue(t){const n=Ca(e.getParentInputType());if(!vt(n))return Vl(e,t),!1},ObjectValue(t){const n=yt(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]&&kg(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=yt(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=yt(n);if(!Yn(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 E2(e){return{VariableDefinition(t){const n=Qn(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 w2(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=Qn(f,c.type);if(d&&!pB(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 pB(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 Mw=Object.freeze([bw,v2,KD,h2,Bg,WD,E2,l2,HD,g2,Ew,xw,i2,JD,y2,XD,ZD,Ug,Kg,GD,Qg,b2,s2,w2,t2,Jg]),hB=Object.freeze([ww,Rw,Fw,Iw,Lw,m2,Dw,Bg,Ug,Kg,kw,YD,Qg,Jg,a2]);class x2{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 mB extends x2{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class S2 extends x2{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);Jt(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=Mw,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."),$g(e);const l=Object.freeze({}),c=[],f=new S2(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=nw(n.map(g=>g(f)));try{Jt(t,$l(o,d))}catch(g){if(g!==l)throw g}return c}function T2(e,t,n=hB){const r=[],o=new mB(e,t,s=>{r.push(s)}),i=n.map(s=>s(o));return Jt(e,nw(i)),r}function gB(e){const t=T2(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
`))}function vB(e,t){const n=T2(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
`))}function yB(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 C2(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 bB(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 EB(e){return e instanceof Error?e:new wB(e)}class wB extends Error{constructor(t){super("Unexpected error value: "+ye(t)),this.name="NonErrorThrown",this.thrownValue=t}}function vn(e,t,n){var r;const o=EB(e);return xB(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 xB(e){return Array.isArray(e.path)}const SB=yB((e,t,n)=>uB(e.schema,e.fragments,e.variableValues,t,n));function Xg(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;N2(t,n,r);const i=_2(e);if(!("schema"in i))return{errors:i};try{const{operation:s}=i,l=TB(i,s,o);return vo(l)?l.then(c=>Zg(c,i.errors),c=>(i.errors.push(c),Zg(null,i.errors))):Zg(l,i.errors)}catch(s){return i.errors.push(s),Zg(null,i.errors)}}function k2(e){const t=Xg(e);if(vo(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function Zg(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function N2(e,t,n){t||lt(!1,"Must provide document."),$g(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 _2(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=f2(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??nv,typeResolver:d??L2,subscribeFieldResolver:g??nv,errors:[]}}function TB(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=_w(e.schema,e.fragments,e.variableValues,r,t.selectionSet),i=void 0;switch(t.operation){case Pn.QUERY:return ev(e,r,n,i,o);case Pn.MUTATION:return CB(e,r,n,i,o);case Pn.SUBSCRIPTION:return ev(e,r,n,i,o)}}function CB(e,t,n,r,o){return bB(o.entries(),(i,[s,l])=>{const c=Su(r,s,t.name),f=A2(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 ev(e,t,n,r,o){const i=Object.create(null);let s=!1;try{for(const[l,c]of o.entries()){const f=Su(r,l,t.name),d=A2(e,t,n,c,f);d!==void 0&&(i[l]=d,vo(d)&&(s=!0))}}catch(l){if(s)return C2(i).finally(()=>{throw l});throw l}return s?C2(i):i}function A2(e,t,n,r,o){var i;const s=R2(e.schema,t,r[0]);if(!s)return;const l=s.type,c=(i=s.resolve)!==null&&i!==void 0?i:e.fieldResolver,f=O2(e,s,r,t,o);try{const d=Gg(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=vn(b,r,wr(o));return tv(w,l,e)}):v}catch(d){const g=vn(d,r,wr(o));return tv(g,l,e)}}function O2(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 tv(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 kB(e,t,n,r,o,i);if(Yn(t))return NB(t,i);if(sn(t))return _B(e,t,n,r,o,i);if(We(t))return Pw(e,t,n,r,o,i);gn(!1,"Cannot complete value of unexpected output type: "+ye(t))}function kB(e,t,n,r,o,i){if(!aw(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=Su(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=vn(v,n,wr(g));return tv(b,s,e)})):m}catch(m){const v=vn(m,n,wr(g));return tv(v,s,e)}});return l?Promise.all(c):c}function NB(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 _B(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=>Pw(e,D2(d,e,t,n,r,i),n,r,o,i)):Pw(e,D2(f,e,t,n,r,i),n,r,o,i)}function D2(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(We(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(!We(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 Pw(e,t,n,r,o,i){const s=SB(e,t,n);if(t.isTypeOf){const l=t.isTypeOf(i,e.contextValue,r);if(vo(l))return l.then(c=>{if(!c)throw I2(t,i,n);return ev(e,t,i,o,s)});if(!l)throw I2(t,i,n)}return ev(e,t,i,o,s)}function I2(e,t,n){return new he(`Expected value of type "${e.name}" but got: ${ye(t)}.`,{nodes:n})}const L2=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})},nv=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 R2(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 AB(e){return new Promise(t=>t(F2(e)))}function OB(e){const t=F2(e);if(vo(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function F2(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=Pg(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}:Xg({schema:t,document:d,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:l,typeResolver:c})}function M2(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function DB(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 IB(e){arguments.length<2||lt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await P2(e);return M2(t)?DB(t,r=>Xg({...e,rootValue:r})):t}function LB(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 P2(...e){const t=LB(e),{schema:n,document:r,variableValues:o}=t;N2(n,r,o);const i=_2(t);if(!("schema"in i))return{errors:i};try{const s=await RB(i);if(!M2(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 RB(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=_w(t,n,o,s,r.selectionSet),[c,f]=[...l.entries()][0],d=R2(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=Su(void 0,c,s.name),m=O2(e,d,f,s,g);try{var v;const b=Gg(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 vn(b,f,wr(g))}}function $2(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||gn(!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||gn(!1),e.reportError(new he(`Field "${i.name}.${s.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=yt(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=yt(e.getInputType());o!=null||gn(!1),e.reportError(new he(`The enum value "${o.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function FB(e){return{Field(t){const n=yt(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 rv(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 $w(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 MB(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 PB(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=rr(rv(n)),o=k2({schema:e,document:r});return!o.errors&&o.data||gn(!1),o.data}function Vw(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,R=>R.name,R=>m(R));for(const R of[...Gd,...Jd])r[R.name]&&(r[R.name]=R);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(O):[];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(R){if(R.kind===Dt.LIST){const P=R.ofType;if(!P)throw new Error("Decorated type deeper than introspection query.");return new zt(c(P))}if(R.kind===Dt.NON_NULL){const P=R.ofType;if(!P)throw new Error("Decorated type deeper than introspection query.");const B=c(P);return new tt(RD(B))}return f(R)}function f(R){const P=R.name;if(!P)throw new Error(`Unknown type reference: ${ye(R)}.`);const B=r[P];if(!B)throw new Error(`Invalid or incomplete schema, unknown type: ${P}. Ensure that a full introspection query is used in order to build a client schema.`);return B}function d(R){return DD(f(R))}function g(R){return ID(f(R))}function m(R){if(R!=null&&R.name!=null&&R.kind!=null)switch(R.kind){case Dt.SCALAR:return v(R);case Dt.OBJECT:return w(R);case Dt.INTERFACE:return N(R);case Dt.UNION:return S(R);case Dt.ENUM:return x(R);case Dt.INPUT_OBJECT:return C(R)}const P=ye(R);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${P}.`)}function v(R){return new Uo({name:R.name,description:R.description,specifiedByURL:R.specifiedByURL})}function b(R){if(R.interfaces===null&&R.kind===Dt.INTERFACE)return[];if(!R.interfaces){const P=ye(R);throw new Error(`Introspection result missing interfaces: ${P}.`)}return R.interfaces.map(g)}function w(R){return new $n({name:R.name,description:R.description,interfaces:()=>b(R),fields:()=>E(R)})}function N(R){return new $r({name:R.name,description:R.description,interfaces:()=>b(R),fields:()=>E(R)})}function S(R){if(!R.possibleTypes){const P=ye(R);throw new Error(`Introspection result missing possibleTypes: ${P}.`)}return new Na({name:R.name,description:R.description,types:()=>R.possibleTypes.map(d)})}function x(R){if(!R.enumValues){const P=ye(R);throw new Error(`Introspection result missing enumValues: ${P}.`)}return new Er({name:R.name,description:R.description,values:Sa(R.enumValues,P=>P.name,P=>({description:P.description,deprecationReason:P.deprecationReason}))})}function C(R){if(!R.inputFields){const P=ye(R);throw new Error(`Introspection result missing inputFields: ${P}.`)}return new Vr({name:R.name,description:R.description,fields:()=>D(R.inputFields)})}function E(R){if(!R.fields)throw new Error(`Introspection result missing fields: ${ye(R)}.`);return Sa(R.fields,P=>P.name,_)}function _(R){const P=c(R.type);if(!Cs(P)){const B=ye(P);throw new Error(`Introspection must provide output type for fields, but received: ${B}.`)}if(!R.args){const B=ye(R);throw new Error(`Introspection result missing field args: ${B}.`)}return{description:R.description,deprecationReason:R.deprecationReason,type:P,args:D(R.args)}}function D(R){return Sa(R,P=>P.name,I)}function I(R){const P=c(R.type);if(!ir(P)){const H=ye(P);throw new Error(`Introspection must provide input type for arguments, but received: ${H}.`)}const B=R.defaultValue!=null?Ho(CD(R.defaultValue),P):void 0;return{description:R.description,type:P,defaultValue:B,deprecationReason:R.deprecationReason}}function O(R){if(!R.args){const P=ye(R);throw new Error(`Introspection result missing directive args: ${P}.`)}if(!R.locations){const P=ye(R);throw new Error(`Introspection result missing directive locations: ${P}.`)}return new Eo({name:R.name,description:R.description,isRepeatable:R.isRepeatable,locations:R.locations.slice(),args:D(R.args)})}}function $B(e,t,n){pw(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&&vB(t,e);const r=e.toConfig(),o=V2(r,t,n);return r===o?e:new Ml(o)}function V2(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(xu(J))l.push(J);else if(jg(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=j2[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&&B([d]),...B(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(q)],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 zt(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,P)})}function x(J){if(Fl(J)||Yd(J))return J;if(or(J))return _(J);if(We(J))return D(J);if(Je(J))return I(J);if(Mt(J))return O(J);if(Rt(J))return E(J);if(gt(J))return C(J);gn(!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 Vr({...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=U2(xe))!==null&&de!==void 0?de:le}return new Uo({...ne,specifiedByURL:le,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 $n({...ne,interfaces:()=>[...J.getInterfaces().map(N),...K(ae)],fields:()=>({...Ts(ne.fields,R),...F(ae)}),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 $r({...ne,interfaces:()=>[...J.getInterfaces().map(N),...K(ae)],fields:()=>({...Ts(ne.fields,R),...F(ae)}),extensionASTNodes:ne.extensionASTNodes.concat(ae)})}function O(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 R(J){return{...J,type:w(J.type),args:J.args&&Ts(J.args,P)}}function P(J){return{...J,type:w(J.type)}}function B(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=j2[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 zt(z(J.type)):J.kind===U.NON_NULL_TYPE?new tt(z(J.type)):H(J)}function q(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 F(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:ov(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:ov(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:ov(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:ov(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 Ae=[J,...ae];return new $n({name:ne,description:(le=J.description)===null||le===void 0?void 0:le.value,interfaces:()=>K(Ae),fields:()=>F(Ae),astNode:J,extensionASTNodes:ae})}case U.INTERFACE_TYPE_DEFINITION:{var de;const Ae=[J,...ae];return new $r({name:ne,description:(de=J.description)===null||de===void 0?void 0:de.value,interfaces:()=>K(Ae),fields:()=>F(Ae),astNode:J,extensionASTNodes:ae})}case U.ENUM_TYPE_DEFINITION:{var xe;const Ae=[J,...ae];return new Er({name:ne,description:(xe=J.description)===null||xe===void 0?void 0:xe.value,values:Q(Ae),astNode:J,extensionASTNodes:ae})}case U.UNION_TYPE_DEFINITION:{var ve;const Ae=[J,...ae];return new Na({name:ne,description:(ve=J.description)===null||ve===void 0?void 0:ve.value,types:()=>Z(Ae),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:U2(J),astNode:J,extensionASTNodes:ae})}case U.INPUT_OBJECT_TYPE_DEFINITION:{var Ie;const Ae=[J,...ae];return new Vr({name:ne,description:(Ie=J.description)===null||Ie===void 0?void 0:Ie.value,fields:()=>Y(Ae),astNode:J,extensionASTNodes:ae})}}}}const j2=Ss([...Gd,...Jd],e=>e.name);function ov(e){const t=As(Lg,e);return t==null?void 0:t.reason}function U2(e){const t=As(sw,e);return t==null?void 0:t.url}function iv(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&&gB(e);const r=V2({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 jw(e,t){const n=rr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return iv(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function VB(e){const t=e.toConfig(),n=Sa(Uw(t.types),m=>m.name,g);return new Ml({...t,types:Object.values(n),directives:Uw(t.directives).map(s),query:i(t.query),mutation:i(t.mutation),subscription:i(t.subscription)});function r(m){return vt(m)?new zt(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:B2(v.locations,b=>b),args:l(v.args)})}function l(m){return sv(m,v=>({...v,type:r(v.type)}))}function c(m){return sv(m,v=>({...v,type:r(v.type),args:v.args&&l(v.args)}))}function f(m){return sv(m,v=>({...v,type:r(v.type)}))}function d(m){return Uw(m).map(o)}function g(m){if(or(m)||Fl(m))return m;if(We(m)){const v=m.toConfig();return new $n({...v,interfaces:()=>d(v.interfaces),fields:()=>c(v.fields)})}if(Je(m)){const v=m.toConfig();return new $r({...v,interfaces:()=>d(v.interfaces),fields:()=>c(v.fields)})}if(Mt(m)){const v=m.toConfig();return new Na({...v,types:()=>d(v.types)})}if(Rt(m)){const v=m.toConfig();return new Er({...v,values:sv(v.values,b=>b)})}if(gt(m)){const v=m.toConfig();return new Vr({...v,fields:()=>f(v.fields)})}gn(!1,"Unexpected type: "+ye(m))}}function sv(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(Ud))n[r]=t(e[r]);return n}function Uw(e){return B2(e,t=>t.name)}function B2(e,t){return e.slice().sort((n,r)=>{const o=t(n),i=t(r);return Ud(o,i)})}function jB(e){return q2(e,t=>!Rg(t),BB)}function UB(e){return q2(e,Rg,Fl)}function BB(e){return!Yd(e)&&!Fl(e)}function q2(e,t,n){const r=e.getDirectives().filter(t),o=Object.values(e.getTypeMap()).filter(n);return[qB(e),...r.map(i=>JB(i)),...o.map(i=>z2(i))].filter(Boolean).join(`
`)}function qB(e){if(e.description==null&&zB(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 zB(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 z2(e){if(or(e))return HB(e);if(We(e))return WB(e);if(Je(e))return GB(e);if(Mt(e))return YB(e);if(Rt(e))return QB(e);if(gt(e))return KB(e);gn(!1,"Unexpected type: "+ye(e))}function HB(e){return Wo(e)+`scalar ${e.name}`+XB(e)}function H2(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function WB(e){return Wo(e)+`type ${e.name}`+H2(e)+W2(e)}function GB(e){return Wo(e)+`interface ${e.name}`+H2(e)+W2(e)}function YB(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Wo(e)+"union "+e.name+n}function QB(e){const t=e.getValues().map((n,r)=>Wo(n," ",!r)+" "+n.name+zw(n.deprecationReason));return Wo(e)+`enum ${e.name}`+Bw(t)}function KB(e){const t=Object.values(e.getFields()).map((n,r)=>Wo(n," ",!r)+" "+qw(n));return Wo(e)+`input ${e.name}`+Bw(t)}function W2(e){const t=Object.values(e.getFields()).map((n,r)=>Wo(n," ",!r)+" "+n.name+G2(n.args," ")+": "+String(n.type)+zw(n.deprecationReason));return Bw(t)}function Bw(e){return e.length!==0?` {
`+e.join(`
`)+`
}`:""}function G2(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(qw).join(", ")+")":`(
`+e.map((n,r)=>Wo(n," "+t,!r)+" "+t+qw(n)).join(`
`)+`
`+t+")"}function qw(e){const t=Ns(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${ft(t)}`),n+zw(e.deprecationReason)}function JB(e){return Wo(e)+"directive @"+e.name+G2(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function zw(e){return e==null?"":e!==iw?` @deprecated(reason: ${ft({kind:U.STRING,value:e})})`:" @deprecated"}function XB(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:jj(r)});return(t&&!n?`
`+t:t)+o.replace(/\n/g,`
`+t)+`
`}function ZB(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:U.DOCUMENT,definitions:t}}function eq(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]=Q2(o.selectionSet);break}const r=Object.create(null);for(const o of t){const i=new Set;for(const l of Q2(o.selectionSet))Y2(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 Y2(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const o of r)Y2(e,t,o)}}function Q2(e){const t=[];return Jt(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function K2(e){const t=TD(e)?e:new jd(e),n=t.body,r=new ZE(t);let o="",i=!1;for(;r.advance().kind!==ge.EOF;){const s=r.token,l=s.kind,c=!bD(s.kind);i&&(c||s.kind===ge.SPREAD)&&(o+=" ");const f=n.slice(s.start,s.end);l===ge.BLOCK_STRING?o+=yD(s.value,{minimize:!0}):o+=f,i=c}return o}function tq(e){const t=J2(e);if(t)throw t;return e}function J2(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 pn;(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"})(pn||(pn={}));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 nq(e,t){return X2(e,t).filter(n=>n.type in pn)}function rq(e,t){return X2(e,t).filter(n=>n.type in Ei)}function X2(e,t){return[...iq(e,t),...oq(e,t)]}function oq(e,t){const n=[],r=Os(e.getDirectives(),t.getDirectives());for(const o of r.removed)n.push({type:pn.DIRECTIVE_REMOVED,description:`${o.name} was removed.`});for(const[o,i]of r.persisted){const s=Os(o.args,i.args);for(const l of s.added)ka(l)&&n.push({type:pn.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:pn.DIRECTIVE_ARG_REMOVED,description:`${l.name} was removed from ${o.name}.`});o.isRepeatable&&!i.isRepeatable&&n.push({type:pn.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${o.name}.`});for(const l of o.locations)i.locations.includes(l)||n.push({type:pn.DIRECTIVE_LOCATION_REMOVED,description:`${l} was removed from ${o.name}.`})}return n}function iq(e,t){const n=[],r=Os(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const o of r.removed)n.push({type:pn.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)Rt(o)&&Rt(i)?n.push(...lq(o,i)):Mt(o)&&Mt(i)?n.push(...aq(o,i)):gt(o)&>(i)?n.push(...sq(o,i)):We(o)&&We(i)?n.push(...eI(o,i),...Z2(o,i)):Je(o)&&Je(i)?n.push(...eI(o,i),...Z2(o,i)):o.constructor!==i.constructor&&n.push({type:pn.TYPE_CHANGED_KIND,description:`${o.name} changed from ${tI(o)} to ${tI(i)}.`});return n}function sq(e,t){const n=[],r=Os(Object.values(e.getFields()),Object.values(t.getFields()));for(const o of r.added)kg(o)?n.push({type:pn.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:pn.FIELD_REMOVED,description:`${e.name}.${o.name} was removed.`});for(const[o,i]of r.persisted)rp(o.type,i.type)||n.push({type:pn.FIELD_CHANGED_KIND,description:`${e.name}.${o.name} changed type from ${String(o.type)} to ${String(i.type)}.`});return n}function aq(e,t){const n=[],r=Os(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:pn.TYPE_REMOVED_FROM_UNION,description:`${o.name} was removed from union type ${e.name}.`});return n}function lq(e,t){const n=[],r=Os(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:pn.VALUE_REMOVED_FROM_ENUM,description:`${o.name} was removed from enum type ${e.name}.`});return n}function Z2(e,t){const n=[],r=Os(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:pn.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${o.name}.`});return n}function eI(e,t){const n=[],r=Os(Object.values(e.getFields()),Object.values(t.getFields()));for(const o of r.removed)n.push({type:pn.FIELD_REMOVED,description:`${e.name}.${o.name} was removed.`});for(const[o,i]of r.persisted)n.push(...cq(e,o,i)),np(o.type,i.type)||n.push({type:pn.FIELD_CHANGED_KIND,description:`${e.name}.${o.name} changed type from ${String(o.type)} to ${String(i.type)}.`});return n}function cq(e,t,n){const r=[],o=Os(t.args,n.args);for(const i of o.removed)r.push({type:pn.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:pn.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=nI(i.defaultValue,i.type),f=nI(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:pn.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 tI(e){if(or(e))return"a Scalar type";if(We(e))return"an Object type";if(Je(e))return"an Interface type";if(Mt(e))return"a Union type";if(Rt(e))return"an Enum type";if(gt(e))return"an Input type";gn(!1,"Unexpected type: "+ye(e))}function nI(e,t){const n=Ns(e,t);return n!=null||gn(!1),ft(qg(n))}function Os(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 uq=Object.freeze(Object.defineProperty({__proto__:null,BREAK:Ll,get BreakingChangeType(){return pn},DEFAULT_DEPRECATION_REASON:iw,get DangerousChangeType(){return Ei},get DirectiveLocation(){return Fe},ExecutableDefinitionsRule:bw,FieldsOnCorrectTypeRule:HD,FragmentsOnCompositeTypesRule:WD,GRAPHQL_MAX_INT:_g,GRAPHQL_MIN_INT:Ag,GraphQLBoolean:Ht,GraphQLDeprecatedDirective:Lg,GraphQLDirective:Eo,GraphQLEnumType:Er,GraphQLError:he,GraphQLFloat:Hd,GraphQLID:Wd,GraphQLIncludeDirective:Dg,GraphQLInputObjectType:Vr,GraphQLInt:zd,GraphQLInterfaceType:$r,GraphQLList:zt,GraphQLNonNull:tt,GraphQLObjectType:$n,GraphQLScalarType:Uo,GraphQLSchema:Ml,GraphQLSkipDirective:Ig,GraphQLSpecifiedByDirective:sw,GraphQLString:Pt,GraphQLUnionType:Na,get Kind(){return U},KnownArgumentNamesRule:GD,KnownDirectivesRule:Ug,KnownFragmentNamesRule:Ew,KnownTypeNamesRule:Bg,Lexer:ZE,Location:hD,LoneAnonymousOperationRule:KD,LoneSchemaDefinitionRule:ww,NoDeprecatedCustomRule:$2,NoFragmentCyclesRule:JD,NoSchemaIntrospectionCustomRule:FB,NoUndefinedVariablesRule:XD,NoUnusedFragmentsRule:xw,NoUnusedVariablesRule:ZD,get OperationTypeNode(){return Pn},OverlappingFieldsCanBeMergedRule:t2,PossibleFragmentSpreadsRule:i2,PossibleTypeExtensionsRule:kw,ProvidedRequiredArgumentsRule:s2,ScalarLeafsRule:l2,SchemaMetaFieldDef:qo,SingleFieldSubscriptionsRule:h2,Source:jd,Token:QE,get TokenKind(){return ge},TypeInfo:_s,get TypeKind(){return Dt},TypeMetaFieldDef:zo,TypeNameMetaFieldDef:wo,UniqueArgumentDefinitionNamesRule:m2,UniqueArgumentNamesRule:Qg,UniqueDirectiveNamesRule:Dw,UniqueDirectivesPerLocationRule:Kg,UniqueEnumValueNamesRule:Iw,UniqueFieldDefinitionNamesRule:Lw,UniqueFragmentNamesRule:g2,UniqueInputFieldNamesRule:Jg,UniqueOperationNamesRule:v2,UniqueOperationTypesRule:Rw,UniqueTypeNamesRule:Fw,UniqueVariableNamesRule:y2,ValidationContext:S2,ValuesOfCorrectTypeRule:b2,VariablesAreInputTypesRule:E2,VariablesInAllowedPositionRule:w2,__Directive:lw,__DirectiveLocation:cw,__EnumValue:fw,__Field:uw,__InputValue:Kd,__Schema:Fg,__Type:Bo,__TypeKind:dw,assertAbstractType:LD,assertCompositeType:TU,assertDirective:OU,assertEnumType:vU,assertEnumValueName:OD,assertInputObjectType:yU,assertInputType:wU,assertInterfaceType:ID,assertLeafType:SU,assertListType:bU,assertName:bo,assertNamedType:kU,assertNonNullType:EU,assertNullableType:RD,assertObjectType:DD,assertOutputType:xU,assertScalarType:mU,assertSchema:pw,assertType:hU,assertUnionType:gU,assertValidName:tq,assertValidSchema:$g,assertWrappingType:CU,astFromValue:Ns,buildASTSchema:iv,buildClientSchema:Vw,buildSchema:jw,coerceInputValue:Nw,concatAST:ZB,createSourceEventStream:P2,defaultFieldResolver:nv,defaultTypeResolver:L2,doTypesOverlap:qd,execute:Xg,executeSync:k2,extendSchema:$B,findBreakingChanges:nq,findDangerousChanges:rq,formatError:Mj,getArgumentValues:Gg,getDirectiveValues:As,getEnterLeaveForKind:bu,getIntrospectionQuery:rv,getLocation:gg,getNamedType:yt,getNullableType:Ca,getOperationAST:$w,getOperationRootType:MB,getVariableValues:f2,getVisitFn:fU,graphql:AB,graphqlSync:OB,introspectionFromSchema:PB,introspectionTypes:Jd,isAbstractType:sn,isCompositeType:on,isConstValueNode:vw,isDefinitionNode:BU,isDirective:Og,isEnumType:Rt,isEqualType:Ng,isExecutableDefinitionNode:gw,isInputObjectType:gt,isInputType:ir,isInterfaceType:Je,isIntrospectionType:Fl,isLeafType:Yn,isListType:vt,isNamedType:ks,isNonNullType:He,isNullableType:Tg,isObjectType:We,isOutputType:Cs,isRequiredArgument:ka,isRequiredInputField:kg,isScalarType:or,isSchema:Mg,isSelectionNode:qU,isSpecifiedDirective:Rg,isSpecifiedScalarType:Yd,isType:Eu,isTypeDefinitionNode:xu,isTypeExtensionNode:jg,isTypeNode:zU,isTypeSubTypeOf:Rl,isTypeSystemDefinitionNode:Vg,isTypeSystemExtensionNode:yw,isUnionType:Mt,isValidNameError:J2,isValueNode:zD,isWrappingType:Bd,lexicographicSortSchema:VB,locatedError:vn,parse:rr,parseConstValue:nU,parseType:rU,parseValue:CD,print:ft,printError:Fj,printIntrospectionSchema:UB,printLocation:fD,printSchema:jB,printSourceLocation:YE,printType:z2,resolveObjMapThunk:ow,resolveReadonlyArrayThunk:rw,responsePathAsArray:wr,separateOperations:eq,specifiedDirectives:_a,specifiedRules:Mw,specifiedScalarTypes:Gd,stripIgnoredCharacters:K2,subscribe:IB,syntaxError:Mn,typeFromAST:Qn,validate:ep,validateSchema:Pg,valueFromAST:Ho,valueFromASTUntyped:Sg,version:Ij,versionInfo:GE,visit:Jt,visitInParallel:nw,visitWithTypeInfo:$l},Symbol.toStringTag,{value:"Module"}));var rI=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 oI(e){return typeof e=="object"&&e!==null&&typeof e.then=="function"}function fq(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 iI(e){return typeof e=="object"&&e!==null&&"subscribe"in e&&typeof e.subscribe=="function"}function sI(e){return typeof e=="object"&&e!==null&&(e[Symbol.toStringTag]==="AsyncGenerator"||Symbol.asyncIterator in e)}function dq(e){var t;return rI(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 aI(e){return rI(this,void 0,void 0,function*(){const t=yield e;return sI(t)?dq(t):iI(t)?fq(t):t})}var pq=new TextDecoder;async function hq(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=pq.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 _={},D=C.indexOf(`\r
\r
`)+4,I=String(m.slice(0,D)).trim().split(`\r
`);let O;for(;O=I.shift();)O=O.split(": "),_[O.shift().toLowerCase()]=O.join(": ");const R=C.lastIndexOf(`\r
`,D);let P=C.substring(D,R>-1?void 0:R),B=!1;if(O=_["content-type"],O&&~O.indexOf("application/json"))try{P=JSON.parse(P),B=!0}catch{}if(O={headers:_,body:P,json:B},d?yield O:b.push(O),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 Hw=function(e){return this instanceof Hw?(this.v=e,this):new Hw(e)};function Ww(e){return JSON.stringify(e,null,2)}function mq(e){return Object.assign(Object.assign({},e),{message:e.message,stack:e.stack})}function lI(e){return e instanceof Error?mq(e):e}function op(e){return Array.isArray(e)?Ww({errors:e.map(t=>lI(t))}):Ww({errors:[lI(e)]})}function Gw(e){return Ww(e)}function gq(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||vq,s=new _s(e);return Jt(o,{leave(l){s.leave(l)},enter(l){if(s.enter(l),l.kind==="Field"&&!l.selectionSet){const c=s.getType(),f=cI(Eq(c),i);if(f&&l.loc){const d=bq(t,l.loc.start);r.push({index:l.loc.end,string:" "+ft(f).replaceAll(`
`,`
`+d)})}}}}),{insertions:r,result:yq(t,r)}}function vq(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))Yn(t[r].type)&&n.push(r);return n}function cI(e,t){const n=yt(e);if(!e||Yn(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:cI(s,t)}})}}function yq(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 bq(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 Eq(e){if(e)return e}function wq(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 uI(e,t,n){var r;const o=n?yt(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(...uI(e,l.selectionSet.selections,n));continue}}i.push(l)}return i}function xq(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=uI(r,f,c),Object.assign(Object.assign({},l),{selections:f})},FragmentDefinition(){return null}},i=Jt(e,n?$l(n,o):o);return Jt(i,{SelectionSet(l){let{selections:c}=l;return c=wq(c,f=>f.alias?f.alias.value:f.name.value),Object.assign(Object.assign({},l),{selections:c})},FragmentDefinition(){return null}})}function Sq(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 Tq(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 Yw{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(`${av}:`)===0&&(n+=1);return n},clear(){for(const n in window.localStorage)n.indexOf(`${av}:`)===0&&window.localStorage.removeItem(n)}}}get(t){if(!this.storage)return null;const n=`${av}:${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=`${av}:${t}`;if(n)try{this.storage.setItem(i,n)}catch(s){o=s instanceof Error?s:new Error(`${s}`),r=Tq(this.storage,s)}else this.storage.removeItem(i)}return{isQuotaError:r,error:o}}clear(){this.storage&&this.storage.clear()}}const av="graphiql";class fI{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 Cq=1e5;class kq{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 fI("queries",this.storage,this.maxHistoryLength),this.favorite=new fI("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>Cq?!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 Nq(e){let t;return pI(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function dI(e,t,n){return n===qo.name&&e.getQueryType()===t?qo:n===zo.name&&e.getQueryType()===t?zo:n===wo.name&&on(t)?wo:"getFields"in t?t.getFields()[n]:null}function pI(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 an(e,t){return _q(t,hI(e.string))}function _q(e,t){if(!t)return Qw(e,r=>!r.isDeprecated);const n=e.map(r=>({proximity:Aq(hI(r.label),t),entry:r}));return Qw(Qw(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 Qw(e,t){const n=e.filter(t);return n.length===0?e:n}function hI(e){return e.toLowerCase().replaceAll(/\W/g,"")}function Aq(e,t){let n=Oq(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function Oq(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 mI;(function(e){function t(n){return typeof n=="string"}e.is=t})(mI||(mI={}));var Kw;(function(e){function t(n){return typeof n=="string"}e.is=t})(Kw||(Kw={}));var gI;(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})(gI||(gI={}));var lv;(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})(lv||(lv={}));var wi;(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=lv.MAX_VALUE),o===Number.MAX_VALUE&&(o=lv.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 yn;(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})(yn||(yn={}));var cv;(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&yn.is(o.range)&&(ue.string(o.uri)||ue.undefined(o.uri))}e.is=n})(cv||(cv={}));var vI;(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)&&yn.is(o.targetRange)&&ue.string(o.targetUri)&&yn.is(o.targetSelectionRange)&&(yn.is(o.originSelectionRange)||ue.undefined(o.originSelectionRange))}e.is=n})(vI||(vI={}));var Jw;(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})(Jw||(Jw={}));var yI;(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&yn.is(o.range)&&Jw.is(o.color)}e.is=n})(yI||(yI={}));var bI;(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})(bI||(bI={}));var EI;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(EI||(EI={}));var wI;(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})(wI||(wI={}));var Xw;(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&cv.is(o.location)&&ue.string(o.message)}e.is=n})(Xw||(Xw={}));var xI;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(xI||(xI={}));var SI;(function(e){e.Unnecessary=1,e.Deprecated=2})(SI||(SI={}));var TI;(function(e){function t(n){var r=n;return ue.objectLiteral(r)&&ue.string(r.href)}e.is=t})(TI||(TI={}));var uv;(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)&&yn.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,Xw.is))}e.is=n})(uv||(uv={}));var Tu;(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})(Tu||(Tu={}));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)&&yn.is(s.range)}e.is=o})(Ds||(Ds={}));var Cu;(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})(Cu||(Cu={}));var xr;(function(e){function t(n){var r=n;return ue.string(r)}e.is=t})(xr||(xr={}));var Aa;(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)&&(Cu.is(s.annotationId)||xr.is(s.annotationId))}e.is=o})(Aa||(Aa={}));var fv;(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&pv.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(fv||(fv={}));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||xr.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||xr.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||xr.is(o.annotationId))}e.is=n})(ap||(ap={}));var Zw;(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):fv.is(o)}))}e.is=t})(Zw||(Zw={}));var dv=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):xr.is(r)?(i=r,o=Aa.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Aa.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):xr.is(r)?(i=r,o=Aa.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Aa.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):xr.is(n)?(o=n,r=Aa.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Aa.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}(),CI=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(xr.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 CI(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(fv.is(r)){var o=new dv(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=o}})):t.changes&&Object.keys(t.changes).forEach(function(r){var o=new dv(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(pv.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 dv(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 dv(o),this._textEditChanges[t]=r}return r}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new CI,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;Cu.is(n)||xr.is(n)?o=n:r=n;var i,s;if(o===void 0?i=ip.create(t,r):(s=xr.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;Cu.is(r)||xr.is(r)?i=r:o=r;var s,l;if(i===void 0?s=sp.create(t,n,o):(l=xr.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;Cu.is(n)||xr.is(n)?o=n:r=n;var i,s;if(o===void 0?i=ap.create(t,r):(s=xr.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 kI;(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})(kI||(kI={}));var NI;(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})(NI||(NI={}));var pv;(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})(pv||(pv={}));var _I;(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})(_I||(_I={}));var ex;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){var r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(ex||(ex={}));var lp;(function(e){function t(n){var r=n;return ue.objectLiteral(n)&&ex.is(r.kind)&&ue.string(r.value)}e.is=t})(lp||(lp={}));var AI;(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})(AI||(AI={}));var tx;(function(e){e.PlainText=1,e.Snippet=2})(tx||(tx={}));var OI;(function(e){e.Deprecated=1})(OI||(OI={}));var DI;(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)&&yn.is(o.insert)&&yn.is(o.replace)}e.is=n})(DI||(DI={}));var II;(function(e){e.asIs=1,e.adjustIndentation=2})(II||(II={}));var LI;(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})(LI||(LI={}));var RI;(function(e){function t(n){return{label:n}}e.create=t})(RI||(RI={}));var FI;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(FI||(FI={}));var hv;(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})(hv||(hv={}));var MI;(function(e){function t(n){var r=n;return!!r&&ue.objectLiteral(r)&&(lp.is(r.contents)||hv.is(r.contents)||ue.typedArray(r.contents,hv.is))&&(n.range===void 0||yn.is(n.range))}e.is=t})(MI||(MI={}));var PI;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(PI||(PI={}));var $I;(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})($I||($I={}));var VI;(function(e){e.Text=1,e.Read=2,e.Write=3})(VI||(VI={}));var jI;(function(e){function t(n,r){var o={range:n};return ue.number(r)&&(o.kind=r),o}e.create=t})(jI||(jI={}));var UI;(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})(UI||(UI={}));var BI;(function(e){e.Deprecated=1})(BI||(BI={}));var qI;(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})(qI||(qI={}));var zI;(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})(zI||(zI={}));var HI;(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)&&yn.is(o.range)&&yn.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})(HI||(HI={}));var WI;(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"})(WI||(WI={}));var mv;(function(e){e.Invoked=1,e.Automatic=2})(mv||(mv={}));var GI;(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,uv.is)&&(o.only===void 0||ue.typedArray(o.only,ue.string))&&(o.triggerKind===void 0||o.triggerKind===mv.Invoked||o.triggerKind===mv.Automatic)}e.is=n})(GI||(GI={}));var YI;(function(e){function t(r,o,i){var s={title:r},l=!0;return typeof o=="string"?(l=!1,s.kind=o):Tu.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,uv.is))&&(o.kind===void 0||ue.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Tu.is(o.command))&&(o.isPreferred===void 0||ue.boolean(o.isPreferred))&&(o.edit===void 0||Zw.is(o.edit))}e.is=n})(YI||(YI={}));var QI;(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)&&yn.is(o.range)&&(ue.undefined(o.command)||Tu.is(o.command))}e.is=n})(QI||(QI={}));var KI;(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})(KI||(KI={}));var JI;(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)&&yn.is(o.range)&&(ue.undefined(o.target)||ue.string(o.target))}e.is=n})(JI||(JI={}));var XI;(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&yn.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(XI||(XI={}));var ZI;(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"})(ZI||(ZI={}));var eL;(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"})(eL||(eL={}));var tL;(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})(tL||(tL={}));var nL;(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){var o=r;return o!=null&&yn.is(o.range)&&ue.string(o.text)}e.is=n})(nL||(nL={}));var rL;(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&&yn.is(o.range)&&ue.boolean(o.caseSensitiveLookup)&&(ue.string(o.variableName)||o.variableName===void 0)}e.is=n})(rL||(rL={}));var oL;(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){var o=r;return o!=null&&yn.is(o.range)&&(ue.string(o.expression)||o.expression===void 0)}e.is=n})(oL||(oL={}));var iL;(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&yn.is(r.stoppedLocation)}e.is=n})(iL||(iL={}));var nx;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(nx||(nx={}));var rx;(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||cv.is(o.location))&&(o.command===void 0||Tu.is(o.command))}e.is=n})(rx||(rx={}));var sL;(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,rx.is))&&(o.kind===void 0||nx.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})(sL||(sL={}));var aL;(function(e){function t(n){var r=n;return ue.objectLiteral(r)&&Kw.is(r.uri)&&ue.string(r.name)}e.is=t})(aL||(aL={}));var lL;(function(e){function t(i,s,l,c){return new Dq(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}})(lL||(lL={}));var Dq=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 ox{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 Xt(e){return{ofRule:e}}function ct(e,t){return{ofRule:e,isList:!0,separator:t}}function Iq(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 cL=e=>e===" "||e===" "||e===","||e===`
`||e==="\r"||e==="\uFEFF"||e===" ",uL={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:/^#.*/},fL={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"),Xt($t("def")),Xt("VariableDefinitions"),ct("Directive"),"SelectionSet"],Mutation:[sr("mutation"),Xt($t("def")),Xt("VariableDefinitions"),ct("Directive"),"SelectionSet"],Subscription:[sr("subscription"),Xt($t("def")),Xt("VariableDefinitions"),ct("Directive"),"SelectionSet"],VariableDefinitions:[Ve("("),ct("VariableDefinition"),Ve(")")],VariableDefinition:["Variable",Ve(":"),"Type",Xt("DefaultValue")],Variable:[Ve("$","variable"),$t("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:[$t("property"),Ve(":"),$t("qualifier"),Xt("Arguments"),ct("Directive"),Xt("SelectionSet")],Field:[$t("property"),Xt("Arguments"),ct("Directive"),Xt("SelectionSet")],Arguments:[Ve("("),ct("Argument"),Ve(")")],Argument:[$t("attribute"),Ve(":"),"Value"],FragmentSpread:[Ve("..."),$t("def"),ct("Directive")],InlineFragment:[Ve("..."),Xt("TypeCondition"),ct("Directive"),"SelectionSet"],FragmentDefinition:[sr("fragment"),Xt(Iq($t("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:[$t("string-2")],ListValue:[Ve("["),ct("Value"),Ve("]")],ObjectValue:[Ve("{"),ct("ObjectField"),Ve("}")],ObjectField:[$t("attribute"),Ve(":"),"Value"],Type(e){return e.value==="["?"ListType":"NonNullType"},ListType:[Ve("["),"Type",Ve("]"),Xt(Ve("!"))],NonNullType:["NamedType",Xt(Ve("!"))],NamedType:[Lq("atom")],Directive:[Ve("@","meta"),$t("meta"),Xt("Arguments")],DirectiveDef:[sr("directive"),Ve("@","meta"),$t("meta"),Xt("ArgumentsDef"),sr("on"),ct("DirectiveLocation",Ve("|"))],InterfaceDef:[sr("interface"),$t("atom"),Xt("Implements"),ct("Directive"),Ve("{"),ct("FieldDef"),Ve("}")],Implements:[sr("implements"),ct("NamedType",Ve("&"))],DirectiveLocation:[$t("string-2")],SchemaDef:[sr("schema"),ct("Directive"),Ve("{"),ct("OperationTypeDef"),Ve("}")],OperationTypeDef:[$t("keyword"),Ve(":"),$t("atom")],ScalarDef:[sr("scalar"),$t("atom"),ct("Directive")],ObjectTypeDef:[sr("type"),$t("atom"),Xt("Implements"),ct("Directive"),Ve("{"),ct("FieldDef"),Ve("}")],FieldDef:[$t("property"),Xt("ArgumentsDef"),Ve(":"),"Type",ct("Directive")],ArgumentsDef:[Ve("("),ct("InputValueDef"),Ve(")")],InputValueDef:[$t("attribute"),Ve(":"),"Type",Xt("DefaultValue"),ct("Directive")],UnionDef:[sr("union"),$t("atom"),ct("Directive"),Ve("="),ct("UnionMember",Ve("|"))],UnionMember:["NamedType"],EnumDef:[sr("enum"),$t("atom"),ct("Directive"),Ve("{"),ct("EnumValueDef"),Ve("}")],EnumValueDef:[$t("string-2"),ct("Directive")],InputDef:[sr("input"),$t("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 $t(e){return{style:e,match:t=>t.kind==="Name",update(t,n){t.name=n.value}}}function Lq(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(cL),lexRules:uL,parseRules:fL,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 Rq(t,n,e)}}}function Rq(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?sx(t):t.needsAdvance&&(t.needsAdvance=!1,ax(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=Mq(o,e);if(!c)return e.match(/\S+/)||e.match(/\s/),up(ix,t,"Invalid"),"invalidchar";if(c.kind==="Comment")return up(ix,t,"Comment"),"comment";const f=dL({},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"?ax(t,!0):t.needsAdvance=!0,d.style}Fq(t)}return dL(t,f),up(ix,t,"Invalid"),"invalidchar"}function dL(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}const ix={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 sx(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 ax(e,t){var n;if(pL(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);)sx(e),e.rule&&(pL(e)?!((n=e.rule)===null||n===void 0)&&n[e.step].separator&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}function pL(e){const t=Array.isArray(e.rule)&&typeof e.rule[e.step]!="string"&&e.rule[e.step];return t&&t.isList}function Fq(e){for(;e.rule&&!(Array.isArray(e.rule)&&e.rule[e.step].ofRule);)sx(e);e.rule&&ax(e,!1)}function Mq(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 Pq={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),Pq),hL={command:"editor.action.triggerSuggest",title:"Suggestions"},$q=e=>{const t=[];if(e)try{Jt(rr(e),{FragmentDefinition(n){t.push(n)}})}catch{return[]}return t},Vq=[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],jq=e=>{let t=!1;if(e)try{Jt(rr(e),{enter(n){if(n.kind!=="Document")return Vq.includes(n.kind)?(t=!0,Ll):!1}})}catch{return t}return t};function Uq(e,t,n,r,o,i){var s;const l=Object.assign(Object.assign({},i),{schema:e}),c=r||tz(t,n,1),f=c.state.kind==="Invalid"?c.state.prevState:c.state,d=(i==null?void 0:i.mode)||oz(t,i==null?void 0:i.uri);if(!f)return[];const{kind:g,step:m,prevState:v}=f,b=rz(e,c.state);if(g===_e.DOCUMENT)return d===Ul.TYPE_SYSTEM?qq(c):zq(c);if(g===_e.EXTEND_DEF)return Hq(c);if(((s=v==null?void 0:v.prevState)===null||s===void 0?void 0:s.kind)===_e.EXTENSION_DEFINITION&&f.name)return an(c,[]);if((v==null?void 0:v.kind)===U.SCALAR_TYPE_EXTENSION)return an(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 an(c,Object.values(e.getTypeMap()).filter(N=>We(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:st.Function})));if((v==null?void 0:v.kind)===U.INTERFACE_TYPE_EXTENSION)return an(c,Object.values(e.getTypeMap()).filter(Je).map(N=>({label:N.name,kind:st.Function})));if((v==null?void 0:v.kind)===U.UNION_TYPE_EXTENSION)return an(c,Object.values(e.getTypeMap()).filter(Mt).map(N=>({label:N.name,kind:st.Function})));if((v==null?void 0:v.kind)===U.ENUM_TYPE_EXTENSION)return an(c,Object.values(e.getTypeMap()).filter(N=>Rt(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 an(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 Yq(c,f,e,t,b);if(g===_e.SELECTION_SET||g===_e.FIELD||g===_e.ALIASED_FIELD)return Wq(c,b,l);if(g===_e.ARGUMENTS||g===_e.ARGUMENT&&m===0){const{argDefs:N}=b;if(N)return an(c,N.map(S=>{var x;return{label:S.name,insertText:S.name+": ",command:hL,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 an(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 Gq(c,b,t,e);if(g===_e.VARIABLE&&m===1){const N=yt(b.inputType),S=mL(t,e,c);return an(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 Qq(c,b,e);if(g===_e.FRAGMENT_SPREAD&&m===1)return Kq(c,b,e,t,Array.isArray(o)?o:$q(o));const w=gL(f);if(d===Ul.TYPE_SYSTEM&&!w.needsAdvance&&g===_e.NAMED_TYPE||g===_e.LIST_TYPE){if(w.kind===_e.FIELD_DEF)return an(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 an(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)?Zq(c,e):g===_e.DIRECTIVE?ez(c,f,e):[]}const gv=` {
$1
}`,Bq=e=>{const{type:t}=e;return on(t)||vt(t)&&on(t.ofType)||He(t)&&(on(t.ofType)||vt(t.ofType)&&on(t.ofType.ofType))?gv:null};function qq(e){return an(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 zq(e){return an(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 Hq(e){return an(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 Wq(e,t,n){var r;if(t.parentType){const{parentType:o}=t;let i=[];return"getFields"in o&&(i=jl(o.getFields())),on(o)&&i.push(wo),o===((r=n==null?void 0:n.schema)===null||r===void 0?void 0:r.getQueryType())&&i.push(qo,zo),an(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=Bq(s);d&&(f.insertText=s.name+d,f.insertTextFormat=tx.Snippet,f.command=hL)}return f}))}return[]}function Gq(e,t,n,r){const o=yt(t.inputType),i=mL(n,r,e).filter(s=>s.detail===o.name);if(o instanceof Er){const s=o.getValues();return an(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===Ht?an(e,i.concat([{label:"true",detail:String(Ht),documentation:"Not false.",kind:st.Variable,type:Ht},{label:"false",detail:String(Ht),documentation:"Not true.",kind:st.Variable,type:Ht}])):i}function Yq(e,t,n,r,o){if(t.needsSeparator)return[];const i=n.getTypeMap(),s=jl(i).filter(Je),l=s.map(({name:v})=>v),c=new Set;vv(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:I})=>I===b.name))return;const _=n.getType(b.name),D=(S=o.interfaceDef)===null||S===void 0?void 0:S.toConfig();o.interfaceDef=new $r(Object.assign(Object.assign({},D),{interfaces:[...D.interfaces,_||new $r({name:b.name,fields:{}})]}))}else if(o.objectTypeDef){if((x=o.objectTypeDef)===null||x===void 0?void 0:x.getInterfaces().find(({name:I})=>I===b.name))return;const _=n.getType(b.name),D=(C=o.objectTypeDef)===null||C===void 0?void 0:C.toConfig();o.objectTypeDef=new $n(Object.assign(Object.assign({},D),{interfaces:[...D.interfaces,_||new $r({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 an(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 Qq(e,t,n,r){let o;if(t.parentType)if(sn(t.parentType)){const i=LD(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=>on(s)&&!s.name.startsWith("__"))}return an(e,o.map(i=>{const s=yt(i);return{label:String(i),documentation:(s==null?void 0:s.description)||"",kind:st.Field}}))}function Kq(e,t,n,r,o){if(!r)return[];const i=n.getTypeMap(),s=Nq(e.state),l=Xq(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)&&on(t.parentType)&&on(i[f.typeCondition.name.value])&&qd(n,t.parentType,i[f.typeCondition.name.value]));return an(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 Jq=(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 mL(e,t,n){let r=null,o;const i=Object.create({});return vv(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=Jq(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 Xq(e){const t=[];return vv(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 Zq(e,t,n){const r=t.getTypeMap(),o=jl(r).filter(ir);return an(e,o.map(i=>({label:i.name,documentation:i.description,kind:st.Variable})))}function ez(e,t,n,r){var o;if(!((o=t.prevState)===null||o===void 0)&&o.kind){const i=n.getDirectives().filter(s=>nz(t.prevState,s));return an(e,i.map(s=>({label:s.name,documentation:s.description||"",kind:st.Function})))}return[]}function tz(e,t,n=0){let r=null,o=null,i=null;const s=vv(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 vv(e,t){const n=e.split(`
`),r=cp();let o=r.startState(),i="",s=new ox("");for(let l=0;l<n.length;l++){for(s=new ox(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 nz(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 rz(e,t){let n,r,o,i,s,l,c,f,d,g,m;return pI(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?dI(e,d,v.name):null,g=s?s.type:null);break}case _e.SELECTION_SET:d=yt(g);break;case _e.DIRECTIVE:o=v.name?e.getDirective(v.name):null;break;case _e.INTERFACE_DEF:v.name&&(c=null,m=new $r({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?dI(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=yt(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 zt?N.ofType:null;break;case _e.OBJECT_VALUE:const S=yt(l);f=S instanceof Vr?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 oz(e,t){return t!=null&&t.endsWith(".graphqls")||jq(e)?Ul.TYPE_SYSTEM:Ul.EXECUTABLE}function gL(e){return e.prevState&&e.kind&&[_e.NAMED_TYPE,_e.LIST_TYPE,_e.TYPE,_e.NON_NULL_TYPE].includes(e.kind)?gL(e.prevState):e}var yv={exports:{}};function vL(e,t){if(e!=null)return e;var n=new Error(t!==void 0?t:"Got unexpected "+e);throw n.framesToPop=1,n}yv.exports=vL,yv.exports.default=vL,Object.defineProperty(yv.exports,"__esModule",{value:!0});var iz=yv.exports;const yL=Ui(iz),sz=(e,t)=>{if(!t)return[];const n=new Map,r=new Set;Jt(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(yL(t.get(s)));const i=[];for(const s of o)Jt(s,{FragmentSpread(l){!r.has(l.name.value)&&t.get(l.name.value)&&(o.add(yL(t.get(l.name.value))),r.add(l.name.value))}}),n.has(s.name.value)||i.push(s);return i};class bL{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 az=[ww,Rw,Fw,Iw,Lw,Dw,Bg,Ug,Kg,kw,Qg,Jg];function lz(e,t,n,r,o){const i=Mw.filter(l=>!(l===xw||l===bw||r&&l===Ew));return n&&Array.prototype.push.apply(i,n),o&&Array.prototype.push.apply(i,az),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 cz(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=Qn(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 uz(e,t){const n=t?cz(t,e):void 0,r=[];return Jt(e,{OperationDefinition(o){r.push(o)}}),{variableToType:n,operations:r}}function fz(e,t){if(t)try{const n=rr(t);return Object.assign(Object.assign({},uz(n,e)),{documentAST:n})}catch{return}}const bv={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},lx={[bv.Error]:1,[bv.Warning]:2,[bv.Information]:3,[bv.Hint]:4},Ev=(e,t)=>{if(!e)throw new Error(t)};function dz(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=hz((s=(i=d.locations)===null||i===void 0?void 0:i[0])!==null&&s!==void 0?s:{line:0,column:0},f);return[{severity:lx.Error,message:d.message,source:"GraphQL: Syntax",range:g}]}throw d}return pz(l,t,n,r)}function pz(e,t=null,n,r){if(!t)return[];const o=lz(t,e,n,r).flatMap(s=>EL(s,lx.Error,"Validation")),i=ep(t,e,[$2]).flatMap(s=>EL(s,lx.Warning,"Deprecation"));return o.concat(i)}function EL(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){Ev(e.locations,"GraphQL validation error requires locations.");const l=e.locations[o],c=mz(s),f=l.column+(c.end-c.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new bL(new Bl(l.line-1,l.column-1),new Bl(l.line-1,f))})}}return r}function hz(e,t){const n=cp(),r=n.startState(),o=t.split(`
`);Ev(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 ox(o[f]);!i.eol()&&n.token(i,r)!=="invalidchar";);Ev(i,"Expected Parser stream to be available.");const s=e.line-1,l=i.getStartOfToken(),c=i.getCurrentPosition();return new bL(new Bl(s,l),new Bl(s,c))}function mz(e){const n=e.loc;return Ev(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 gz=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 vz=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 yz=vz;function wL(e){return yz(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var bz=function(t){var n,r;return!(wL(t)===!1||(n=t.constructor,typeof n!="function")||(r=n.prototype,wL(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:Ez}=Reflect,wz=gz,xL=bz,SL=e=>typeof e=="object"&&e!==null||typeof e=="function",xz=e=>e==="__proto__"||e==="constructor"||e==="prototype",cx=e=>{if(!wz(e))throw new TypeError("Object keys must be strings or symbols");if(xz(e))throw new Error(`Cannot set unsafe key: "${e}"`)},Sz=e=>Array.isArray(e)?e.flat().map(String).join(","):e,Tz=(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},Cz=(e,t,n)=>{const r=Sz(t?Tz(e,t):e);cx(r);const o=ql.cache.get(r)||n();return ql.cache.set(r,o),o},kz=(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},TL=(e,t)=>t&&typeof t.split=="function"?t.split(e):typeof e=="symbol"?[e]:Array.isArray(e)?e:Cz(e,t,()=>kz(e,t)),Nz=(e,t,n,r)=>{if(cx(t),n===void 0)Ez(e,t);else if(r&&r.merge){const o=r.merge==="function"?r.merge:Object.assign;o&&xL(e[t])&&xL(n)?e[t]=o(e[t],n):e[t]=n}else e[t]=n;return e},ql=(e,t,n,r)=>{if(!t||!SL(e))return e;const o=TL(t,r);let i=e;for(let s=0;s<o.length;s++){const l=o[s],c=o[s+1];if(cx(l),c===void 0){Nz(i,l,n,r);break}if(typeof c=="number"&&!Array.isArray(i[l])){i=i[l]=[];continue}SL(i[l])||(i[l]={}),i=i[l]}return e};ql.split=TL,ql.cache=new Map,ql.clear=()=>{ql.cache=new Map};var _z=ql;const Az=Ui(_z);var Oz=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()}},Dz=Oz,CL={"text/plain":"Text","text/html":"Url",default:"Text"},Iz="Copy to clipboard: #{key}, Enter";function Lz(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Rz(e,t){var n,r,o,i,s,l,c=!1;t||(t={}),n=t.debug||!1;try{o=Dz(),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=CL[t.format]||CL.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=Lz("message"in t?t.message:Iz),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),l&&document.body.removeChild(l),o()}return c}var Fz=Rz;const Mz=Ui(Fz);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 Pz(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ux(...e){return t=>e.forEach(n=>Pz(n,t))}function ar(...e){return k.useCallback(ux(...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,$z(o,...t)]}function $z(...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 ku=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},Vz=V1.useId||(()=>{});let jz=0;function Hl(e){const[t,n]=k.useState(Vz());return ku(()=>{e||n(r=>r??String(jz++))},[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 wv({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Uz({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 Uz({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 Nu=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(Bz);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(fx,Ze({},r,{ref:t}),k.isValidElement(s)?k.cloneElement(s,void 0,l):null)}return k.createElement(fx,Ze({},r,{ref:t}),n)});Nu.displayName="Slot";const fx=k.forwardRef((e,t)=>{const{children:n,...r}=e;return k.isValidElement(n)?k.cloneElement(n,{...qz(r,n.props),ref:t?ux(t,n.ref):n.ref}):k.Children.count(n)>1?k.Children.only(null):null});fx.displayName="SlotClone";const kL=({children:e})=>k.createElement(k.Fragment,null,e);function Bz(e){return k.isValidElement(e)&&e.type===kL}function qz(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?Nu: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 NL(e,t){e&&Pd.flushSync(()=>e.dispatchEvent(t))}function zz(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 dx="dismissableLayer.update",Hz="dismissableLayer.pointerDownOutside",Wz="dismissableLayer.focusOutside";let _L;const Gz=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),px=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(Gz),[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,O=>m(O)),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,D=Yz(O=>{const R=O.target,P=[...d.branches].some(B=>B.contains(R));!_||P||(i==null||i(O),l==null||l(O),O.defaultPrevented||c==null||c())},v),I=Qz(O=>{const R=O.target;[...d.branches].some(B=>B.contains(R))||(s==null||s(O),l==null||l(O),O.defaultPrevented||c==null||c())},v);return zz(O=>{C===d.layers.size-1&&(o==null||o(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))},v),k.useEffect(()=>{if(g)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(_L=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(g)),d.layers.add(g),AL(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=_L)}},[g,v,r,d]),k.useEffect(()=>()=>{g&&(d.layers.delete(g),d.layersWithOutsidePointerEventsDisabled.delete(g),AL())},[g,d]),k.useEffect(()=>{const O=()=>b({});return document.addEventListener(dx,O),()=>document.removeEventListener(dx,O)},[]),k.createElement(lr.div,Ze({},f,{ref:w,style:{pointerEvents:E?_?"auto":"none":void 0,...e.style},onFocusCapture:dt(e.onFocusCapture,I.onFocusCapture),onBlurCapture:dt(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:dt(e.onPointerDownCapture,D.onPointerDownCapture)}))});function Yz(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(){OL(Hz,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 Qz(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&&OL(Wz,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 AL(){const e=new CustomEvent(dx);document.dispatchEvent(e)}function OL(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?NL(o,i):o.dispatchEvent(i)}const hx="focusScope.autoFocusOnMount",mx="focusScope.autoFocusOnUnmount",DL={bubbles:!1,cancelable:!0},IL=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:Oa(g.current,{select:!0})},N=function(C){if(v.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||Oa(g.current,{select:!0}))},S=function(C){if(document.activeElement===document.body)for(const _ of C)_.removedNodes.length>0&&Oa(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){FL.add(v);const w=document.activeElement;if(!l.contains(w)){const S=new CustomEvent(hx,DL);l.addEventListener(hx,f),l.dispatchEvent(S),S.defaultPrevented||(Kz(tH(LL(l)),{select:!0}),document.activeElement===w&&Oa(l))}return()=>{l.removeEventListener(hx,f),setTimeout(()=>{const S=new CustomEvent(mx,DL);l.addEventListener(mx,d),l.dispatchEvent(S),S.defaultPrevented||Oa(w??document.body,{select:!0}),l.removeEventListener(mx,d),FL.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]=Jz(x);C&&E?!w.shiftKey&&S===E?(w.preventDefault(),n&&Oa(C,{select:!0})):w.shiftKey&&S===C&&(w.preventDefault(),n&&Oa(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 Kz(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Oa(r,{select:t}),document.activeElement!==n)return}function Jz(e){const t=LL(e),n=RL(t,e),r=RL(t.reverse(),e);return[n,r]}function LL(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 RL(e,t){for(const n of e)if(!Xz(n,{upTo:t}))return n}function Xz(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 Zz(e){return e instanceof HTMLInputElement&&"select"in e}function Oa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zz(e)&&t&&e.select()}}const FL=eH();function eH(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ML(e,t),e.unshift(t)},remove(t){var n;e=ML(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ML(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tH(e){return e.filter(t=>t.tagName!=="A")}const gx=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?mg.createPortal(k.createElement(lr.div,Ze({},o,{ref:t})),r):null});function nH(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=rH(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 rH(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),s=e?"mounted":"unmounted",[l,c]=nH(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const f=xv(r.current);i.current=l==="mounted"?f:"none"},[l]),ku(()=>{const f=r.current,d=o.current;if(d!==e){const m=i.current,v=xv(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]),ku(()=>{if(t){const f=g=>{const v=xv(r.current).includes(g.animationName);g.target===t&&v&&Pd.flushSync(()=>c("ANIMATION_END"))},d=g=>{g.target===t&&(i.current=xv(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 xv(e){return(e==null?void 0:e.animationName)||"none"}let vx=0;function PL(){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:$L()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:$L()),vx++,()=>{vx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vx--}},[])}function $L(){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 yx=function(e,t){return yx=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])},yx(e,t)};function VL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yx(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 Sr(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 Zt(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 Sv="right-scroll-bar-position",Tv="width-before-scroll-bar",oH="with-scroll-bars-hidden",iH="--removed-body-scroll-bar-size";function sH(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function aH(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 lH(e,t){return aH(t||null,function(n){return e.forEach(function(r){return sH(r,n)})})}function cH(e){return e}function uH(e,t){t===void 0&&(t=cH);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 fH(e){e===void 0&&(e={});var t=uH(null);return t.options=Se({async:!0,ssr:!1},e),t}var jL=function(e){var t=e.sideCar,n=Sr(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))};jL.isSideCarExport=!0;function dH(e,t){return e.useMedium(t),jL}var UL=fH(),bx=function(){},Cv=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:bx,onWheelCapture:bx,onTouchMoveCapture:bx}),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=Sr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),C=m,E=lH([n,t]),_=Se(Se({},x),o);return k.createElement(k.Fragment,null,d&&k.createElement(C,{sideCar:UL,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))});Cv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Cv.classNames={fullWidth:Tv,zeroRight:Sv};var pH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hH(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pH();return t&&e.setAttribute("nonce",t),e}function mH(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gH(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vH=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hH())&&(mH(t,n),gH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yH=function(){var e=vH();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},BL=function(){var e=yH(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},bH={left:0,top:0,right:0,gap:0},Ex=function(e){return parseInt(e||"",10)||0},EH=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[Ex(n),Ex(r),Ex(o)]},wH=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bH;var t=EH(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])}},xH=BL(),SH=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(oH,` {
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(Sv,` {
right: `).concat(l,"px ").concat(r,`;
}
.`).concat(Tv,` {
margin-right: `).concat(l,"px ").concat(r,`;
}
.`).concat(Sv," .").concat(Sv,` {
right: 0 `).concat(r,`;
}
.`).concat(Tv," .").concat(Tv,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(iH,": ").concat(l,`px;
}
`)},TH=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=k.useMemo(function(){return wH(o)},[o]);return k.createElement(xH,{styles:SH(i,!t,o,n?"":"!important")})},wx=!1;if(typeof window<"u")try{var kv=Object.defineProperty({},"passive",{get:function(){return wx=!0,!0}});window.addEventListener("test",kv,kv),window.removeEventListener("test",kv,kv)}catch{wx=!1}var _u=wx?{passive:!1}:!1,CH=function(e){return e.tagName==="TEXTAREA"},qL=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!CH(e)&&n[t]==="visible")},kH=function(e){return qL(e,"overflowY")},NH=function(e){return qL(e,"overflowX")},zL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=HL(e,n);if(r){var o=WL(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},_H=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},AH=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},HL=function(e,t){return e==="v"?kH(t):NH(t)},WL=function(e,t){return e==="v"?_H(t):AH(t)},OH=function(e,t){return e==="h"&&t==="rtl"?-1:1},DH=function(e,t,n,r,o){var i=OH(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=WL(e,l),b=v[0],w=v[1],N=v[2],S=w-N-i*b;(b||S)&&HL(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},Nv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},GL=function(e){return[e.deltaX,e.deltaY]},YL=function(e){return e&&"current"in e?e.current:e},IH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},LH=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},RH=0,Au=[];function FH(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),o=k.useState(RH++)[0],i=k.useState(function(){return BL()})[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(YL),!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=Nv(w),x=n.current,C="deltaX"in w?w.deltaX:x[0]-S[0],E="deltaY"in w?w.deltaY:x[1]-S[1],_,D=w.target,I=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&D.type==="range")return!1;var O=zL(I,D);if(!O)return!0;if(O?_=I:(_=I==="v"?"h":"v",O=zL(I,D)),!O)return!1;if(!r.current&&"changedTouches"in w&&(C||E)&&(r.current=_),!_)return!0;var R=r.current||_;return DH(R,N,w,R==="h"?C:E,!0)},[]),c=k.useCallback(function(w){var N=w;if(!(!Au.length||Au[Au.length-1]!==i)){var S="deltaY"in N?GL(N):Nv(N),x=t.current.filter(function(_){return _.name===N.type&&_.target===N.target&&IH(_.delta,S)})[0];if(x&&x.should){N.cancelable&&N.preventDefault();return}if(!x){var C=(s.current.shards||[]).map(YL).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=Nv(w),r.current=void 0},[]),g=k.useCallback(function(w){f(w.type,GL(w),w.target,l(w,e.lockRef.current))},[]),m=k.useCallback(function(w){f(w.type,Nv(w),w.target,l(w,e.lockRef.current))},[]);k.useEffect(function(){return Au.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",c,_u),document.addEventListener("touchmove",c,_u),document.addEventListener("touchstart",d,_u),function(){Au=Au.filter(function(w){return w!==i}),document.removeEventListener("wheel",c,_u),document.removeEventListener("touchmove",c,_u),document.removeEventListener("touchstart",d,_u)}},[]);var v=e.removeScrollBar,b=e.inert;return k.createElement(k.Fragment,null,b?k.createElement(i,{styles:LH(o)}):null,v?k.createElement(TH,{gapMode:"margin"}):null)}const MH=dH(UL,FH);var QL=k.forwardRef(function(e,t){return k.createElement(Cv,Se({},e,{ref:t,sideCar:MH}))});QL.classNames=Cv.classNames;const KL=QL;var PH=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ou=new WeakMap,_v=new WeakMap,Av={},xx=0,JL=function(e){return e&&(e.host||JL(e.parentNode))},$H=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=JL(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})},VH=function(e,t,n,r){var o=$H(t,Array.isArray(e)?e:[e]);Av[n]||(Av[n]=new WeakMap);var i=Av[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&&_v.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(),xx++,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||(_v.has(g)||g.removeAttribute(r),_v.delete(g)),v||g.removeAttribute(n)}),xx--,xx||(Ou=new WeakMap,Ou=new WeakMap,_v=new WeakMap,Av={})}},XL=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||PH(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),VH(r,o,n,"aria-hidden")):function(){return null}};const ZL="Dialog",[eR,Wue]=zl(ZL),[jH,Si]=eR(ZL),UH=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]=wv({prop:r,defaultProp:o,onChange:i});return k.createElement(jH,{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)},BH="DialogTrigger",qH=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(BH,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":Tx(o.open)},r,{ref:i,onClick:dt(e.onClick,o.onOpenToggle)}))}),tR="DialogPortal",[zH,nR]=eR(tR,{forceMount:void 0}),HH=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Si(tR,t);return k.createElement(zH,{scope:t,forceMount:n},k.Children.map(r,s=>k.createElement(Da,{present:n||i.open},k.createElement(gx,{asChild:!0,container:o},s))))},Sx="DialogOverlay",WH=k.forwardRef((e,t)=>{const n=nR(Sx,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Si(Sx,e.__scopeDialog);return i.modal?k.createElement(Da,{present:r||i.open},k.createElement(GH,Ze({},o,{ref:t}))):null}),GH=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(Sx,n);return k.createElement(KL,{as:Nu,allowPinchZoom:!0,shards:[o.contentRef]},k.createElement(lr.div,Ze({"data-state":Tx(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Du="DialogContent",rR=k.forwardRef((e,t)=>{const n=nR(Du,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Si(Du,e.__scopeDialog);return k.createElement(Da,{present:r||i.open},i.modal?k.createElement(YH,Ze({},o,{ref:t})):k.createElement(QH,Ze({},o,{ref:t})))}),YH=k.forwardRef((e,t)=>{const n=Si(Du,e.__scopeDialog),r=k.useRef(null),o=ar(t,n.contentRef,r);return k.useEffect(()=>{const i=r.current;if(i)return XL(i)},[]),k.createElement(oR,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())}))}),QH=k.forwardRef((e,t)=>{const n=Si(Du,e.__scopeDialog),r=k.useRef(!1),o=k.useRef(!1);return k.createElement(oR,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()}}))}),oR=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=Si(Du,n),c=k.useRef(null),f=ar(t,c);return PL(),k.createElement(k.Fragment,null,k.createElement(IL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},k.createElement(px,Ze({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Tx(l.open)},s,{ref:f,onDismiss:()=>l.onOpenChange(!1)}))),!1)}),iR="DialogTitle",sR=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(iR,n);return k.createElement(lr.h2,Ze({id:o.titleId},r,{ref:t}))}),aR="DialogDescription",lR=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(aR,n);return k.createElement(lr.p,Ze({id:o.descriptionId},r,{ref:t}))}),cR="DialogClose",uR=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(cR,n);return k.createElement(lr.button,Ze({type:"button"},r,{ref:t,onClick:dt(e.onClick,()=>o.onOpenChange(!1))}))});function Tx(e){return e?"open":"closed"}const KH=UH,JH=qH,XH=HH,ZH=WH,eW=rR,tW=sR,nW=lR,rW=uR,fR=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 dR(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(Nu,{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(Nu,{[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 oW=k.createContext(void 0);function pR(e){const t=k.useContext(oW);return e||t||"ltr"}const iW=["top","right","bottom","left"],Ia=Math.min,So=Math.max,Ov=Math.round,Dv=Math.floor,La=e=>({x:e,y:e}),sW={left:"right",right:"left",bottom:"top",top:"bottom"},aW={start:"end",end:"start"};function Cx(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 Iu(e){return e.split("-")[1]}function kx(e){return e==="x"?"y":"x"}function Nx(e){return e==="y"?"height":"width"}function Lu(e){return["top","bottom"].includes(Ls(e))?"y":"x"}function _x(e){return kx(Lu(e))}function lW(e,t,n){n===void 0&&(n=!1);const r=Iu(e),o=_x(e),i=Nx(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Iv(s)),[s,Iv(s)]}function cW(e){const t=Iv(e);return[Ax(e),t,Ax(t)]}function Ax(e){return e.replace(/start|end/g,t=>aW[t])}function uW(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 fW(e,t,n,r){const o=Iu(e);let i=uW(Ls(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ax)))),i}function Iv(e){return e.replace(/left|right|bottom|top/g,t=>sW[t])}function dW(e){return{top:0,right:0,bottom:0,left:0,...e}}function hR(e){return typeof e!="number"?dW(e):{top:e,right:e,bottom:e,left:e}}function Lv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function mR(e,t,n){let{reference:r,floating:o}=e;const i=Lu(t),s=_x(t),l=Nx(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(Iu(t)){case"start":v[s]-=m*(n&&f?-1:1);break;case"end":v[s]+=m*(n&&f?-1:1);break}return v}const pW=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}=mR(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}=mR(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=hR(v),N=l[m?g==="floating"?"reference":"floating":g],S=Lv(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},_=Lv(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 hW=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=hR(d),m={x:n,y:r},v=_x(o),b=Nx(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],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let I=D?D[C]:0;(!I||!await(s.isElement==null?void 0:s.isElement(D)))&&(I=l.floating[C]||i.floating[b]);const O=E/2-_/2,R=I/2-w[b]/2-1,P=Ia(g[S],R),B=Ia(g[x],R),H=P,z=I-w[b]-B,q=I/2-w[b]/2+O,F=Cx(H,q,z),te=!c.arrow&&Iu(o)!=null&&q!==F&&i.reference[b]/2-(q<H?P:B)-w[b]/2<0,Y=te?q<H?q-H:q-z:0;return{[v]:m[v]+Y,data:{[v]:F,centerOffset:q-F-Y,...te&&{alignmentOffset:Y}},reset:te}}}),mW=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?[Iv(l)]:cW(l));!m&&b!=="none"&&E.push(...fW(l,w,b,C));const _=[l,...E],D=await fp(t,N),I=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&I.push(D[S]),g){const H=lW(o,s,C);I.push(D[H[0]],D[H[1]])}if(O=[...O,{placement:o,overflows:I}],!I.every(H=>H<=0)){var R,P;const H=(((R=i.flip)==null?void 0:R.index)||0)+1,z=_[H];if(z)return{data:{index:H,overflows:O},reset:{placement:z}};let q=(P=O.filter(F=>F.overflows[0]<=0).sort((F,te)=>F.overflows[1]-te.overflows[1])[0])==null?void 0:P.placement;if(!q)switch(v){case"bestFit":{var B;const F=(B=O.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:B[0];F&&(q=F);break}case"initialPlacement":q=l;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function gR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vR(e){return iW.some(t=>e[t]>=0)}const gW=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=gR(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:vR(s)}}}case"escaped":{const i=await fp(t,{...o,altBoundary:!0}),s=gR(i,n.floating);return{data:{escapedOffsets:s,escaped:vR(s)}}}default:return{}}}}};async function vW(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=Iu(n),c=Lu(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 yW=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 vW(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}}}}},bW=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=Lu(Ls(o)),m=kx(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=Cx(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=Cx(x,b,C)}const w=l.fn({...t,[m]:v,[g]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},EW=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=Lu(o),m=kx(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),D=i.reference[g]+i.reference[C]+(E?0:((x=s.offset)==null?void 0:x[g])||0)-(E?N.crossAxis:0);b<_?b=_:b>D&&(b=D)}return{[m]:v,[g]:b}}}},wW=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=Iu(n),g=Lu(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 D=m-c.left-c.right;E=d||x?Ia(S,D):D}else{const D=v-c.top-c.bottom;C=d||x?Ia(N,D):D}if(x&&!d){const D=So(c.left,0),I=So(c.right,0),O=So(c.top,0),R=So(c.bottom,0);g?E=m-2*(D!==0||I!==0?D+I:So(c.left,c.right)):C=v-2*(O!==0||R!==0?O+R: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 yR(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=(yR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yR(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 bR(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 xW(e){return["table","td","th"].includes(Ra(e))}function Ox(e){const t=Dx(),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 SW(e){let t=Ru(e);for(;Yi(t)&&!Rv(t);){if(Ox(t))return t;t=Ru(t)}return null}function Dx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Rv(e){return["html","body","#document"].includes(Ra(e))}function Go(e){return To(e).getComputedStyle(e)}function Fv(e){return Fs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ru(e){if(Ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bR(e)&&e.host||Rs(e);return bR(t)?t.host:t}function ER(e){const t=Ru(e);return Rv(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yi(t)&&dp(t)?t:ER(t)}function pp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ER(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 wR(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=Ov(n)!==i||Ov(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Ix(e){return Fs(e)?e:e.contextElement}function Fu(e){const t=Ix(e);if(!Yi(t))return La(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wR(t);let s=(i?Ov(n.width):n.width)/r,l=(i?Ov(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const TW=La(0);function xR(e){const t=To(e);return!Dx()||!t.visualViewport?TW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CW(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=Ix(e);let s=La(1);t&&(r?Fs(r)&&(s=Fu(r)):s=Fu(e));const l=CW(i,n,r)?xR(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=Fu(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 Lv({width:d,height:g,x:c,y:f})}const kW=[":popover-open",":modal"];function SR(e){return kW.some(t=>{try{return e.matches(t)}catch{return!1}})}function NW(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Rs(r),l=t?SR(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=Fv(r)),Yi(r))){const m=Wl(r);f=Fu(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 _W(e){return Array.from(e.getClientRects())}function TR(e){return Wl(Rs(e)).left+Fv(e).scrollLeft}function AW(e){const t=Rs(e),n=Fv(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+TR(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 OW(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=Dx();(!f||f&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:l,y:c}}function DW(e,t){const n=Wl(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Yi(e)?Fu(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 CR(e,t,n){let r;if(t==="viewport")r=OW(e,n);else if(t==="document")r=AW(Rs(e));else if(Fs(t))r=DW(t,n);else{const o=xR(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Lv(r)}function kR(e,t){const n=Ru(e);return n===t||!Fs(n)||Rv(n)?!1:Go(n).position==="fixed"||kR(n,t)}function IW(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?Ru(e):e;for(;Fs(s)&&!Rv(s);){const l=Go(s),c=Ox(s);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||dp(s)&&!c&&kR(e,s))?r=r.filter(d=>d!==s):o=l,s=Ru(s)}return t.set(e,r),r}function LW(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?IW(t,this._c):[].concat(n),r],l=s[0],c=s.reduce((f,d)=>{const g=CR(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},CR(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function RW(e){const{width:t,height:n}=wR(e);return{width:t,height:n}}function FW(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=Fv(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=TR(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 NR(e,t){return!Yi(e)||Go(e).position==="fixed"?null:t?t(e):e.offsetParent}function _R(e,t){const n=To(e);if(!Yi(e)||SR(e))return n;let r=NR(e,t);for(;r&&xW(r)&&Go(r).position==="static";)r=NR(r,t);return r&&(Ra(r)==="html"||Ra(r)==="body"&&Go(r).position==="static"&&!Ox(r))?n:r||SW(e)||n}const MW=async function(e){const t=this.getOffsetParent||_R,n=this.getDimensions;return{reference:FW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function PW(e){return Go(e).direction==="rtl"}const $W={convertOffsetParentRelativeRectToViewportRelativeRect:NW,getDocumentElement:Rs,getClippingRect:LW,getOffsetParent:_R,getElementRects:MW,getClientRects:_W,getDimensions:RW,getScale:Fu,isElement:Fs,isRTL:PW};function VW(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=Dv(d),b=Dv(o.clientWidth-(f+g)),w=Dv(o.clientHeight-(d+m)),N=Dv(f),x={rootMargin:-v+"px "+-b+"px "+-w+"px "+-N+"px",threshold:So(0,Ia(1,c))||1};let C=!0;function E(_){const D=_[0].intersectionRatio;if(D!==c){if(!C)return s();D?s(!1,D):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 jW(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=Ix(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?VW(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 UW=bW,BW=mW,qW=wW,zW=gW,AR=hW,HW=EW,WW=(e,t,n)=>{const r=new Map,o={platform:$W,...n},i={...o.platform,_c:r};return pW(e,t,{...o,platform:i})},GW=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?AR({element:r.current,padding:o}).fn(n):{}:r?AR({element:r,padding:o}).fn(n):{}}}};var Mv=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Pv(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(!Pv(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)&&!Pv(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function OR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function DR(e,t){const n=OR(e);return Math.round(t*n)/n}function IR(e){const t=k.useRef(e);return Mv(()=>{t.current=e}),t}function YW(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);Pv(m,r)||v(r);const[b,w]=k.useState(null),[N,S]=k.useState(null),x=k.useCallback(Y=>{Y!==D.current&&(D.current=Y,w(Y))},[]),C=k.useCallback(Y=>{Y!==I.current&&(I.current=Y,S(Y))},[]),E=i||b,_=s||N,D=k.useRef(null),I=k.useRef(null),O=k.useRef(d),R=c!=null,P=IR(c),B=IR(o),H=k.useCallback(()=>{if(!D.current||!I.current)return;const Y={placement:t,strategy:n,middleware:m};B.current&&(Y.platform=B.current),WW(D.current,I.current,Y).then(Q=>{const K={...Q,isPositioned:!0};z.current&&!Pv(O.current,K)&&(O.current=K,Pd.flushSync(()=>{g(K)}))})},[m,t,n,B]);Mv(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,g(Y=>({...Y,isPositioned:!1})))},[f]);const z=k.useRef(!1);Mv(()=>(z.current=!0,()=>{z.current=!1}),[]),Mv(()=>{if(E&&(D.current=E),_&&(I.current=_),E&&_){if(P.current)return P.current(E,_,H);H()}},[E,_,H,P,R]);const q=k.useMemo(()=>({reference:D,floating:I,setReference:x,setFloating:C}),[x,C]),F=k.useMemo(()=>({reference:E,floating:_}),[E,_]),te=k.useMemo(()=>{const Y={position:n,left:0,top:0};if(!F.floating)return Y;const Q=DR(F.floating,d.x),K=DR(F.floating,d.y);return l?{...Y,transform:"translate("+Q+"px, "+K+"px)",...OR(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:K}},[n,l,F.floating,d.x,d.y]);return k.useMemo(()=>({...d,update:H,refs:q,elements:F,floatingStyles:te}),[d,H,q,F,te])}const QW=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 KW(e){const[t,n]=k.useState(void 0);return ku(()=>{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 LR="Popper",[RR,$v]=zl(LR),[JW,FR]=RR(LR),XW=e=>{const{__scopePopper:t,children:n}=e,[r,o]=k.useState(null);return k.createElement(JW,{scope:t,anchor:r,onAnchorChange:o},n)},ZW="PopperAnchor",eG=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=FR(ZW,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}))}),MR="PopperContent",[tG,nG]=RR(MR),rG=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:D,...I}=e,O=FR(MR,d),[R,P]=k.useState(null),B=ar(t,je=>P(je)),[H,z]=k.useState(null),q=KW(H),F=(n=q==null?void 0:q.width)!==null&&n!==void 0?n:0,te=(r=q==null?void 0:q.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(sG),altBoundary:Z},{refs:J,floatingStyles:ie,placement:ne,isPositioned:ae,middlewareData:le}=YW({strategy:"fixed",placement:Y,whileElementsMounted:(...je)=>jW(...je,{animationFrame:_==="always"}),elements:{reference:O.anchor},middleware:[yW({mainAxis:m+te,alignmentAxis:b}),N&&UW({mainAxis:!0,crossAxis:!1,limiter:C==="partial"?HW():void 0,...re}),N&&BW({...re}),qW({...re,apply:({elements:je,rects:It,availableWidth:_r,availableHeight:jt})=>{const{width:Sn,height:os}=It.reference,dr=je.floating.style;dr.setProperty("--radix-popper-available-width",`${_r}px`),dr.setProperty("--radix-popper-available-height",`${jt}px`),dr.setProperty("--radix-popper-anchor-width",`${Sn}px`),dr.setProperty("--radix-popper-anchor-height",`${os}px`)}}),H&&GW({element:H,padding:w}),aG({arrowWidth:F,arrowHeight:te}),E&&zW({strategy:"referenceHidden",...re})]}),[de,xe]=$R(ne),ve=Gi(D);ku(()=>{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,Ae=((s=le.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[it,Ot]=k.useState();return ku(()=>{R&&Ot(window.getComputedStyle(R).zIndex)},[R]),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(tG,{scope:d,placedSide:de,onArrowChange:z,arrowX:qe,arrowY:Ie,shouldHideArrow:Ae},k.createElement(lr.div,Ze({"data-side":de,"data-align":xe},I,{ref:B,style:{...I.style,animation:ae?void 0:"none",opacity:(f=le.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))}),PR="PopperArrow",oG={top:"bottom",right:"left",bottom:"top",left:"right"},iG=k.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=nG(PR,r),s=oG[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(QW,Ze({},o,{ref:n,style:{...o.style,display:"block"}})))});function sG(e){return e!==null}const aG=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]=$R(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 $R(e){const[t,n="center"]=e.split("-");return[t,n]}const VR=XW,jR=eG,UR=rG,Lx="rovingFocusGroup.onEntryFocus",lG={bubbles:!1,cancelable:!0},Rx="RovingFocusGroup",[Fx,BR,cG]=dR(Rx),[uG,qR]=zl(Rx,[cG]),[fG,dG]=uG(Rx),pG=k.forwardRef((e,t)=>k.createElement(Fx.Provider,{scope:e.__scopeRovingFocusGroup},k.createElement(Fx.Slot,{scope:e.__scopeRovingFocusGroup},k.createElement(hG,Ze({},e,{ref:t}))))),hG=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=pR(i),[b=null,w]=wv({prop:s,defaultProp:l,onChange:c}),[N,S]=k.useState(!1),x=Gi(f),C=BR(n),E=k.useRef(!1),[_,D]=k.useState(0);return k.useEffect(()=>{const I=g.current;if(I)return I.addEventListener(Lx,x),()=>I.removeEventListener(Lx,x)},[x]),k.createElement(fG,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:b,onItemFocus:k.useCallback(I=>w(I),[w]),onItemShiftTab:k.useCallback(()=>S(!0),[]),onFocusableItemAdd:k.useCallback(()=>D(I=>I+1),[]),onFocusableItemRemove:k.useCallback(()=>D(I=>I-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,I=>{const O=!E.current;if(I.target===I.currentTarget&&O&&!N){const R=new CustomEvent(Lx,lG);if(I.currentTarget.dispatchEvent(R),!R.defaultPrevented){const P=C().filter(F=>F.focusable),B=P.find(F=>F.active),H=P.find(F=>F.id===b),q=[B,H,...P].filter(Boolean).map(F=>F.ref.current);zR(q)}}E.current=!1}),onBlur:dt(e.onBlur,()=>S(!1))})))}),mG="RovingFocusGroupItem",gG=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,l=Hl(),c=i||l,f=dG(mG,n),d=f.currentTabStopId===c,g=BR(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=f;return k.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),k.createElement(Fx.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=bG(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?EG(S,x+1):S.slice(x+1)}setTimeout(()=>zR(S))}})})))}),vG={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yG(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bG(e,t,n){const r=yG(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vG[r]}function zR(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function EG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const wG=pG,xG=gG,SG=["Enter"," "],TG=["ArrowDown","PageUp","Home"],HR=["ArrowUp","PageDown","End"],CG=[...TG,...HR],Vv="Menu",[Mx,kG,NG]=dR(Vv),[Gl,WR]=zl(Vv,[NG,$v,qR]),Px=$v(),GR=qR(),[_G,hp]=Gl(Vv),[AG,$x]=Gl(Vv),OG=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,l=Px(t),[c,f]=k.useState(null),d=k.useRef(!1),g=Gi(i),m=pR(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(VR,l,k.createElement(_G,{scope:t,open:n,onOpenChange:g,content:c,onContentChange:f},k.createElement(AG,{scope:t,onClose:k.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:d,dir:m,modal:s},r)))},DG=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Px(n);return k.createElement(jR,Ze({},o,r,{ref:t}))}),YR="MenuPortal",[IG,LG]=Gl(YR,{forceMount:void 0}),RG=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=hp(YR,t);return k.createElement(IG,{scope:t,forceMount:n},k.createElement(Da,{present:n||i.open},k.createElement(gx,{asChild:!0,container:o},r)))},Fa="MenuContent",[FG,QR]=Gl(Fa),MG=k.forwardRef((e,t)=>{const n=LG(Fa,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=hp(Fa,e.__scopeMenu),s=$x(Fa,e.__scopeMenu);return k.createElement(Mx.Provider,{scope:e.__scopeMenu},k.createElement(Da,{present:r||i.open},k.createElement(Mx.Slot,{scope:e.__scopeMenu},s.modal?k.createElement(PG,Ze({},o,{ref:t})):k.createElement($G,Ze({},o,{ref:t})))))}),PG=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 XL(i)},[]),k.createElement(KR,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)}))}),$G=k.forwardRef((e,t)=>{const n=hp(Fa,e.__scopeMenu);return k.createElement(KR,Ze({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),KR=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=$x(Fa,n),x=Px(n),C=GR(n),E=kG(n),[_,D]=k.useState(null),I=k.useRef(null),O=ar(t,I,N.onContentChange),R=k.useRef(0),P=k.useRef(""),B=k.useRef(0),H=k.useRef(null),z=k.useRef("right"),q=k.useRef(0),F=b?KL:k.Fragment,te=b?{as:Nu,allowPinchZoom:!0}:void 0,Y=K=>{var Z,re;const J=P.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=zG(le,J,ae),xe=(re=ie.find(ve=>ve.textValue===de))===null||re===void 0?void 0:re.ref.current;(function ve(qe){P.current=qe,window.clearTimeout(R.current),qe!==""&&(R.current=window.setTimeout(()=>ve(""),1e3))})(J),xe&&setTimeout(()=>xe.focus())};k.useEffect(()=>()=>window.clearTimeout(R.current),[]),PL();const Q=k.useCallback(K=>{var Z,re;return z.current===((Z=H.current)===null||Z===void 0?void 0:Z.side)&&WG(K,(re=H.current)===null||re===void 0?void 0:re.area)},[]);return k.createElement(FG,{scope:n,searchRef:P,onItemEnter:k.useCallback(K=>{Q(K)&&K.preventDefault()},[Q]),onItemLeave:k.useCallback(K=>{var Z;Q(K)||((Z=I.current)===null||Z===void 0||Z.focus(),D(null))},[Q]),onTriggerLeave:k.useCallback(K=>{Q(K)&&K.preventDefault()},[Q]),pointerGraceTimerRef:B,onPointerGraceIntentChange:k.useCallback(K=>{H.current=K},[])},k.createElement(F,te,k.createElement(IL,{asChild:!0,trapped:o,onMountAutoFocus:dt(i,K=>{var Z;K.preventDefault(),(Z=I.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:s},k.createElement(px,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:g,onInteractOutside:m,onDismiss:v},k.createElement(wG,Ze({asChild:!0},C,{dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:D,onEntryFocus:dt(c,K=>{S.isUsingKeyboardRef.current||K.preventDefault()})}),k.createElement(UR,Ze({role:"menu","aria-orientation":"vertical","data-state":UG(N.open),"data-radix-menu-content":"",dir:S.dir},x,w,{ref:O,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=I.current;if(K.target!==ne||!CG.includes(K.key))return;K.preventDefault();const le=E().filter(de=>!de.disabled).map(de=>de.ref.current);HR.includes(K.key)&&le.reverse(),BG(le)}),onBlur:dt(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(R.current),P.current="")}),onPointerMove:dt(e.onPointerMove,jx(K=>{const Z=K.target,re=q.current!==K.clientX;if(K.currentTarget.contains(Z)&&re){const J=K.clientX>q.current?"right":"left";z.current=J,q.current=K.clientX}}))})))))))}),Vx="MenuItem",JR="menu.itemSelect",VG=k.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=k.useRef(null),s=$x(Vx,e.__scopeMenu),l=QR(Vx,e.__scopeMenu),c=ar(t,i),f=k.useRef(!1),d=()=>{const g=i.current;if(!n&&g){const m=new CustomEvent(JR,{bubbles:!0,cancelable:!0});g.addEventListener(JR,v=>r==null?void 0:r(v),{once:!0}),NL(g,m),m.defaultPrevented?f.current=!1:s.onClose()}};return k.createElement(jG,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===" "||SG.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),jG=k.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=QR(Vx,n),l=GR(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(Mx.ItemSlot,{scope:n,disabled:r,textValue:o??m},k.createElement(xG,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,jx(b=>{r?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:dt(e.onPointerLeave,jx(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 UG(e){return e?"open":"closed"}function BG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function zG(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=qG(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 HG(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 WG(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HG(n,t)}function jx(e){return t=>t.pointerType==="mouse"?e(t):void 0}const GG=OG,YG=DG,QG=RG,KG=MG,JG=VG,XR="DropdownMenu",[XG,Xue]=zl(XR,[WR]),mp=WR(),[ZG,ZR]=XG(XR),eY=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]=wv({prop:o,defaultProp:i,onChange:s});return k.createElement(ZG,{scope:t,triggerId:Hl(),triggerRef:f,contentId:Hl(),open:d,onOpenChange:g,onOpenToggle:k.useCallback(()=>g(m=>!m),[g]),modal:l},k.createElement(GG,Ze({},c,{open:d,onOpenChange:g,dir:r,modal:l}),n))},tY="DropdownMenuTrigger",nY=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=ZR(tY,n),s=mp(n);return k.createElement(YG,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:ux(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())})})))}),rY=e=>{const{__scopeDropdownMenu:t,...n}=e,r=mp(t);return k.createElement(QG,Ze({},r,n))},oY="DropdownMenuContent",iY=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ZR(oY,n),i=mp(n),s=k.useRef(!1);return k.createElement(KG,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)"}}))}),sY=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mp(n);return k.createElement(JG,Ze({},o,r,{ref:t}))}),aY=eY,lY=nY,cY=rY,uY=iY,fY=sY;var Tt={},eF={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:""},Ux=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,Mu={},tF={};function dY(e){var t,n,r=tF[e];if(r)return r;for(r=tF[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 jv(e,t,n){var r,o,i,s,l,c="";for(typeof t!="string"&&(n=t,t=jv.defaultChars),typeof n>"u"&&(n=!0),l=dY(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}jv.defaultChars=";/?:@&=+$,-_.!~*'()#",jv.componentChars="-_.!~*'()";var pY=jv,nF={};function hY(e){var t,n,r=nF[e];if(r)return r;for(r=nF[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 Uv(e,t){var n;return typeof t!="string"&&(t=Uv.defaultChars),n=hY(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})}Uv.defaultChars=";/?:@&=+$,#",Uv.componentChars="";var mY=Uv,gY=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 Bv(){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 vY=/^([a-z0-9.+-]+:)/i,yY=/:[0-9]*$/,bY=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,EY=["<",">",'"',"`"," ","\r",`
`," "],wY=["{","}","|","\\","^","`"].concat(EY),xY=["'"].concat(wY),rF=["%","/","?",";","#"].concat(xY),oF=["/","?","#"],SY=255,iF=/^[+a-z0-9A-Z_-]{0,63}$/,TY=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,sF={javascript:!0,"javascript:":!0},aF={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function CY(e,t){if(e&&e instanceof Bv)return e;var n=new Bv;return n.parse(e,t),n}Bv.prototype.parse=function(e,t){var n,r,o,i,s,l=e;if(l=l.trim(),!t&&e.split("#").length===1){var c=bY.exec(l);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var f=vY.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&&sF[f])&&(l=l.substr(2),this.slashes=!0)),!sF[f]&&(s||f&&!aF[f])){var d=-1;for(n=0;n<oF.length;n++)i=l.indexOf(oF[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<rF.length;n++)i=l.indexOf(rF[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(iF)){for(var S="",x=0,C=N.length;x<C;x++)N.charCodeAt(x)>127?S+="x":S+=N[x];if(!S.match(iF)){var E=w.slice(0,n),_=w.slice(n+1),D=N.match(TY);D&&(E.push(D[1]),_.unshift(D[2])),_.length&&(l=_.join(".")+l),this.hostname=E.join(".");break}}}}this.hostname.length>SY&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var I=l.indexOf("#");I!==-1&&(this.hash=l.substr(I),l=l.slice(0,I));var O=l.indexOf("?");return O!==-1&&(this.search=l.substr(O),l=l.slice(0,O)),l&&(this.pathname=l),aF[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Bv.prototype.parseHost=function(e){var t=yY.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 kY=CY;Mu.encode=pY,Mu.decode=mY,Mu.format=gY,Mu.parse=kY;var Yl={},Bx,lF;function cF(){return lF||(lF=1,Bx=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Bx}var qx,uF;function fF(){return uF||(uF=1,qx=/[\0-\x1F\x7F-\x9F]/),qx}var zx,dF;function NY(){return dF||(dF=1,zx=/[\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]/),zx}var Hx,pF;function hF(){return pF||(pF=1,Hx=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Hx}var mF;function _Y(){return mF||(mF=1,Yl.Any=cF(),Yl.Cc=fF(),Yl.Cf=NY(),Yl.P=Ux,Yl.Z=hF()),Yl}(function(e){function t(q){return Object.prototype.toString.call(q)}function n(q){return t(q)==="[object String]"}var r=Object.prototype.hasOwnProperty;function o(q,F){return r.call(q,F)}function i(q){var F=Array.prototype.slice.call(arguments,1);return F.forEach(function(te){if(te){if(typeof te!="object")throw new TypeError(te+"must be object");Object.keys(te).forEach(function(Y){q[Y]=te[Y]})}}),q}function s(q,F,te){return[].concat(q.slice(0,F),te,q.slice(F+1))}function l(q){return!(q>=55296&&q<=57343||q>=64976&&q<=65007||(q&65535)===65535||(q&65535)===65534||q>=0&&q<=8||q===11||q>=14&&q<=31||q>=127&&q<=159||q>1114111)}function c(q){if(q>65535){q-=65536;var F=55296+(q>>10),te=56320+(q&1023);return String.fromCharCode(F,te)}return String.fromCharCode(q)}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=eF;function b(q,F){var te=0;return o(v,F)?v[F]:F.charCodeAt(0)===35&&m.test(F)&&(te=F[1].toLowerCase()==="x"?parseInt(F.slice(2),16):parseInt(F.slice(1),10),l(te))?c(te):q}function w(q){return q.indexOf("\\")<0?q:q.replace(f,"$1")}function N(q){return q.indexOf("\\")<0&&q.indexOf("&")<0?q:q.replace(g,function(F,te,Y){return te||b(F,Y)})}var S=/[&<>"]/,x=/[&<>"]/g,C={"&":"&","<":"<",">":">",'"':"""};function E(q){return C[q]}function _(q){return S.test(q)?q.replace(x,E):q}var D=/[.?*+^$[\]\\(){}|-]/g;function I(q){return q.replace(D,"\\$&")}function O(q){switch(q){case 9:case 32:return!0}return!1}function R(q){if(q>=8192&&q<=8202)return!0;switch(q){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 P=Ux;function B(q){return P.test(q)}function H(q){switch(q){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(q){return q=q.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(q=q.replace(/ẞ/g,"ß")),q.toLowerCase().toUpperCase()}e.lib={},e.lib.mdurl=Mu,e.lib.ucmicro=_Y(),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=O,e.isWhiteSpace=R,e.isMdAsciiPunct=H,e.isPunctChar=B,e.escapeRE=I,e.normalizeReference=z})(Tt);var qv={},AY=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},gF=Tt.unescapeAll,OY=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=gF(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=gF(t.slice(l,n)),c.lines=s,c.pos=n,c.ok=!0),c},DY=Tt.unescapeAll,IY=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=DY(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};qv.parseLinkLabel=AY,qv.parseLinkDestination=OY,qv.parseLinkTitle=IY;var LY=Tt.assign,RY=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?RY(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 Pu(){this.rules=LY({},Qi)}Pu.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},Pu.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)},Pu.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},Pu.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},Pu.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 FY=Pu;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 Wx=Ti,MY=/\r\n?|\n/g,PY=/\0/g,$Y=function(t){var n;n=t.src.replace(MY,`
`),n=n.replace(PY,"�"),t.src=n},VY=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)},jY=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)},UY=Tt.arrayReplaceAt;function BY(e){return/^<a[>\s]/i.test(e)}function qY(e){return/^<\/a\s*>/i.test(e)}var zY=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"&&(BY(l.content)&&b>0&&b--,qY(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=UY(i,n,c)}}}},vF=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,HY=/\((c|tm|r|p)\)/i,WY=/\((c|tm|r|p)\)/ig,GY={c:"©",r:"®",p:"§",tm:"™"};function YY(e,t){return GY[t.toLowerCase()]}function QY(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(WY,YY)),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}function KY(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)n=e[t],n.type==="text"&&!r&&vF.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 JY=function(t){var n;if(t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type==="inline"&&(HY.test(t.tokens[n].content)&&QY(t.tokens[n].children),vF.test(t.tokens[n].content)&&KY(t.tokens[n].children))},yF=Tt.isWhiteSpace,bF=Tt.isPunctChar,EF=Tt.isMdAsciiPunct,XY=/['"]/,wF=/['"]/g,xF="’";function zv(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function ZY(e,t){var n,r,o,i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_,D;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&&(wF.lastIndex=s,i=wF.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=EF(d)||bF(String.fromCharCode(d)),v=EF(g)||bF(String.fromCharCode(g)),b=yF(d),w=yF(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=zv(r.content,i.index,xF));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],D=t.md.options.quotes[3]):(_=t.md.options.quotes[0],D=t.md.options.quotes[1]),r.content=zv(r.content,i.index,D),e[f.token].content=zv(e[f.token].content,f.pos,_),s+=D.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=zv(r.content,i.index,xF))}}}}var eQ=function(t){var n;if(t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type!=="inline"||!XY.test(t.tokens[n].content)||ZY(t.tokens[n].children,t)};function $u(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}$u.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},$u.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},$u.prototype.attrSet=function(t,n){var r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o},$u.prototype.attrGet=function(t){var n=this.attrIndex(t),r=null;return n>=0&&(r=this.attrs[n][1]),r},$u.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 Gx=$u,tQ=Gx;function SF(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}SF.prototype.Token=tQ;var nQ=SF,rQ=Wx,Yx=[["normalize",$Y],["block",VY],["inline",jY],["linkify",zY],["replacements",JY],["smartquotes",eQ]];function Qx(){this.ruler=new rQ;for(var e=0;e<Yx.length;e++)this.ruler.push(Yx[e][0],Yx[e][1])}Qx.prototype.process=function(e){var t,n,r;for(r=this.ruler.getRules(""),t=0,n=r.length;t<n;t++)r[t](e)},Qx.prototype.State=nQ;var oQ=Qx,Kx=Tt.isSpace;function Jx(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function TF(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 iQ=function(t,n,r,o){var i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_,D;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]||(D=t.src.charCodeAt(l++),D!==124&&D!==45&&D!==58&&!Kx(D))||_===45&&Kx(D))return!1;for(;l<t.eMarks[d];){if(i=t.src.charCodeAt(l),i!==124&&i!==45&&i!==58&&!Kx(i))return!1;l++}for(s=Jx(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=Jx(t,n).trim(),s.indexOf("|")===-1||t.sCount[n]-t.blkIndent>=4||(g=TF(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=Jx(t,d).trim(),!s)||t.sCount[d]-t.blkIndent>=4)break;for(g=TF(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},sQ=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},aQ=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},CF=Tt.isSpace,lQ=function(t,n,r,o){var i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_,D,I,O,R=t.lineMax,P=t.bMarks[n]+t.tShift[n],B=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||t.src.charCodeAt(P++)!==62)return!1;if(o)return!0;for(c=v=t.sCount[n]+1,t.src.charCodeAt(P)===32?(P++,c++,v++,i=!1,E=!0):t.src.charCodeAt(P)===9?(E=!0,(t.bsCount[n]+v)%4===3?(P++,c++,v++,i=!1):i=!0):E=!1,b=[t.bMarks[n]],t.bMarks[n]=P;P<B&&(s=t.src.charCodeAt(P),CF(s));){s===9?v+=4-(v+t.bsCount[n]+(i?1:0))%4:v++;P++}for(w=[t.bsCount[n]],t.bsCount[n]=t.sCount[n]+1+(E?1:0),d=P>=B,x=[t.sCount[n]],t.sCount[n]=v-c,C=[t.tShift[n]],t.tShift[n]=P-t.bMarks[n],D=t.md.block.ruler.getRules("blockquote"),S=t.parentType,t.parentType="blockquote",m=n+1;m<r&&(O=t.sCount[m]<t.blkIndent,P=t.bMarks[m]+t.tShift[m],B=t.eMarks[m],!(P>=B));m++){if(t.src.charCodeAt(P++)===62&&!O){for(c=v=t.sCount[m]+1,t.src.charCodeAt(P)===32?(P++,c++,v++,i=!1,E=!0):t.src.charCodeAt(P)===9?(E=!0,(t.bsCount[m]+v)%4===3?(P++,c++,v++,i=!1):i=!0):E=!1,b.push(t.bMarks[m]),t.bMarks[m]=P;P<B&&(s=t.src.charCodeAt(P),CF(s));){s===9?v+=4-(v+t.bsCount[m]+(i?1:0))%4:v++;P++}d=P>=B,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]=P-t.bMarks[m];continue}if(d)break;for(_=!1,l=0,f=D.length;l<f;l++)if(D[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,I=t.push("blockquote_open","blockquote",1),I.markup=">",I.map=g=[n,0],t.md.block.tokenize(t,n,m),I=t.push("blockquote_close","blockquote",-1),I.markup=">",t.lineMax=R,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},cQ=Tt.isSpace,uQ=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&&!cQ(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)},kF=Tt.isSpace;function NF(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),!kF(i))?-1:r}function _F(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),!kF(n))?-1:o}function fQ(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 dQ=function(t,n,r,o){var i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_,D,I,O,R,P,B,H,z,q,F,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),(B=_F(t,n))>=0){if(g=!0,z=t.bMarks[n]+t.tShift[n],S=Number(t.src.slice(z,B-1)),Y&&S!==1)return!1}else if((B=NF(t,n))>=0)g=!1;else return!1;if(Y&&t.skipSpaces(B)>=t.eMarks[n])return!1;if(N=t.src.charCodeAt(B-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,F=t.md.block.ruler.getRules("list"),D=t.parentType,t.parentType="list";C<r;){for(P=B,x=t.eMarks[C],d=E=t.sCount[C]+B-(t.bMarks[n]+t.tShift[n]);P<x;){if(i=t.src.charCodeAt(P),i===9)E+=4-(E+t.bsCount[C])%4;else if(i===32)E++;else break;P++}if(s=P,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,B-1)),R=t.tight,O=t.tShift[n],I=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]=O,t.sCount[n]=I,t.tight=R,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(q=!1,l=0,v=F.length;l<v;l++)if(F[l](t,C,r,!0)){q=!0;break}if(q)break;if(g){if(B=_F(t,C),B<0)break;z=t.bMarks[C]+t.tShift[C]}else if(B=NF(t,C),B<0)break;if(N!==t.src.charCodeAt(B-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=D,Q&&fQ(t,w),!0},pQ=Tt.normalizeReference,Hv=Tt.isSpace,hQ=function(t,n,r,o){var i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_=0,D=t.bMarks[n]+t.tShift[n],I=t.eMarks[n],O=n+1;if(t.sCount[n]-t.blkIndent>=4||t.src.charCodeAt(D)!==91)return!1;for(;++D<I;)if(t.src.charCodeAt(D)===93&&t.src.charCodeAt(D-1)!==92){if(D+1===I||t.src.charCodeAt(D+1)!==58)return!1;break}for(c=t.lineMax,C=t.md.block.ruler.getRules("reference"),b=t.parentType,t.parentType="reference";O<c&&!t.isEmpty(O);O++)if(!(t.sCount[O]-t.blkIndent>3)&&!(t.sCount[O]<0)){for(x=!1,d=0,g=C.length;d<g;d++)if(C[d](t,O,c,!0)){x=!0;break}if(x)break}for(S=t.getLines(n,O,t.blkIndent,!1).trim(),I=S.length,D=1;D<I;D++){if(i=S.charCodeAt(D),i===91)return!1;if(i===93){v=D;break}else i===10?_++:i===92&&(D++,D<I&&S.charCodeAt(D)===10&&_++)}if(v<0||S.charCodeAt(v+1)!==58)return!1;for(D=v+2;D<I;D++)if(i=S.charCodeAt(D),i===10)_++;else if(!Hv(i))break;if(w=t.md.helpers.parseLinkDestination(S,D,I),!w.ok||(f=t.md.normalizeLink(w.str),!t.md.validateLink(f)))return!1;for(D=w.pos,_+=w.lines,s=D,l=_,N=D;D<I;D++)if(i=S.charCodeAt(D),i===10)_++;else if(!Hv(i))break;for(w=t.md.helpers.parseLinkTitle(S,D,I),D<I&&N!==D&&w.ok?(E=w.str,D=w.pos,_+=w.lines):(E="",D=s,_=l);D<I&&(i=S.charCodeAt(D),!!Hv(i));)D++;if(D<I&&S.charCodeAt(D)!==10&&E)for(E="",D=s,_=l;D<I&&(i=S.charCodeAt(D),!!Hv(i));)D++;return D<I&&S.charCodeAt(D)!==10||(m=pQ(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)},mQ=["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"],Wv={},gQ="[a-zA-Z_:][a-zA-Z0-9:._-]*",vQ="[^\"'=<>`\\x00-\\x20]+",yQ="'[^']*'",bQ='"[^"]*"',EQ="(?:"+vQ+"|"+yQ+"|"+bQ+")",wQ="(?:\\s+"+gQ+"(?:\\s*=\\s*"+EQ+")?)",AF="<[A-Za-z][A-Za-z0-9\\-]*"+wQ+"*\\s*\\/?>",OF="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",xQ="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",SQ="<[?][\\s\\S]*?[?]>",TQ="<![A-Z]+\\s+[^>]*>",CQ="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",kQ=new RegExp("^(?:"+AF+"|"+OF+"|"+xQ+"|"+SQ+"|"+TQ+"|"+CQ+")"),NQ=new RegExp("^(?:"+AF+"|"+OF+")");Wv.HTML_TAG_RE=kQ,Wv.HTML_OPEN_CLOSE_TAG_RE=NQ;var _Q=mQ,AQ=Wv.HTML_OPEN_CLOSE_TAG_RE,Vu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+_Q.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(AQ.source+"\\s*$"),/^$/,!1]],OQ=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<Vu.length&&!Vu[i][0].test(c);i++);if(i===Vu.length)return!1;if(o)return Vu[i][2];if(s=n+1,!Vu[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),Vu[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},DF=Tt.isSpace,DQ=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&&!DF(i)?!1:(o||(d=t.skipSpacesBack(d,f),l=t.skipCharsBack(d,35,f),l>f&&DF(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)},IQ=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},LQ=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},IF=Gx,Gv=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(Gv(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 IF(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),!!Gv(n));t++);return t},Ki.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!Gv(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),Gv(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=IF;var RQ=Ki,FQ=Wx,Yv=[["table",iQ,["paragraph","reference"]],["code",sQ],["fence",aQ,["paragraph","reference","blockquote","list"]],["blockquote",lQ,["paragraph","reference","blockquote","list"]],["hr",uQ,["paragraph","reference","blockquote","list"]],["list",dQ,["paragraph","reference","blockquote"]],["reference",hQ],["html_block",OQ,["paragraph","reference","blockquote"]],["heading",DQ,["paragraph","reference","blockquote"]],["lheading",IQ],["paragraph",LQ]];function Qv(){this.ruler=new FQ;for(var e=0;e<Yv.length;e++)this.ruler.push(Yv[e][0],Yv[e][1],{alt:(Yv[e][2]||[]).slice()})}Qv.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)}},Qv.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))},Qv.prototype.State=RQ;var MQ=Qv;function PQ(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 $Q=function(t,n){for(var r=t.pos;r<t.posMax&&!PQ(t.src.charCodeAt(r));)r++;return r===t.pos?!1:(n||(t.pending+=t.src.slice(t.pos,r)),t.pos=r,!0)},VQ=Tt.isSpace,jQ=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&&VQ(t.src.charCodeAt(s));)s++;return t.pos=s,!0},UQ=Tt.isSpace,Xx=[],LF=0;LF<256;LF++)Xx.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Xx[e.charCodeAt(0)]=1});var BQ=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&&Xx[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),!!UQ(r));)o++;return t.pos=o,!0}}return n||(t.pending+="\\"),t.pos++,!0},qQ=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},Kv={};Kv.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 RF(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)}}Kv.postProcess=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(RF(t,t.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&RF(t,r[n].delimiters)};var Jv={};Jv.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 FF(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--))}Jv.postProcess=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(FF(t,t.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&FF(t,r[n].delimiters)};var zQ=Tt.normalizeReference,Zx=Tt.isSpace,HQ=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),!(!Zx(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),!(!Zx(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),!(!Zx(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[zQ(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},WQ=Tt.normalizeReference,eS=Tt.isSpace,GQ=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),!(!eS(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),!(!eS(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),!(!eS(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[WQ(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},YQ=/^([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])?)*)$/,QQ=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,KQ=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),QQ.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):YQ.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},JQ=Wv.HTML_TAG_RE;function XQ(e){var t=e|32;return t>=97&&t<=122}var ZQ=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&&!XQ(r))||(o=t.src.slice(l).match(JQ),!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)},MF=eF,eK=Tt.has,tK=Tt.isValidEntityCode,PF=Tt.fromCodePoint,nK=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,rK=/^&([a-z][a-z0-9]{1,31});/i,oK=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(nK),i)return n||(o=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),t.pending+=tK(o)?PF(o):PF(65533)),t.pos+=i[0].length,!0}else if(i=t.src.slice(s).match(rK),i&&eK(MF,i[1]))return n||(t.pending+=MF[i[1]]),t.pos+=i[0].length,!0}return n||(t.pending+="&"),t.pos++,!0};function $F(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 iK=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for($F(t,t.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&$F(t,r[n].delimiters)},sK=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)},tS=Gx,VF=Tt.isWhiteSpace,jF=Tt.isPunctChar,UF=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 tS("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 tS(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=UF(r)||jF(String.fromCharCode(r)),g=UF(o)||jF(String.fromCharCode(o)),c=VF(r),d=VF(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=tS;var aK=gp,BF=Wx,nS=[["text",$Q],["newline",jQ],["escape",BQ],["backticks",qQ],["strikethrough",Kv.tokenize],["emphasis",Jv.tokenize],["link",HQ],["image",GQ],["autolink",KQ],["html_inline",ZQ],["entity",oK]],rS=[["balance_pairs",iK],["strikethrough",Kv.postProcess],["emphasis",Jv.postProcess],["text_collapse",sK]];function vp(){var e;for(this.ruler=new BF,e=0;e<nS.length;e++)this.ruler.push(nS[e][0],nS[e][1]);for(this.ruler2=new BF,e=0;e<rS.length;e++)this.ruler2.push(rS[e][0],rS[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=aK;var lK=vp,oS,qF;function cK(){return qF||(qF=1,oS=function(e){var t={};t.src_Any=cF().source,t.src_Cc=fF().source,t.src_Z=hF().source,t.src_P=Ux.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}),oS}function iS(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 Xv(e){return Object.prototype.toString.call(e)}function uK(e){return Xv(e)==="[object String]"}function fK(e){return Xv(e)==="[object Object]"}function dK(e){return Xv(e)==="[object RegExp]"}function zF(e){return Xv(e)==="[object Function]"}function pK(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var HF={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function hK(e){return Object.keys(e||{}).reduce(function(t,n){return t||HF.hasOwnProperty(n)},!1)}var mK={"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}}},gK="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]",vK="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function yK(e){e.__index__=-1,e.__text_cache__=""}function bK(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function WF(){return function(e,t){t.normalize(e)}}function Zv(e){var t=e.re=cK()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(gK),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,fK(c)){dK(c.validate)?f.validate=bK(c.validate):zF(c.validate)?f.validate=c.validate:i(l,c),zF(c.normalize)?f.normalize=c.normalize:c.normalize?i(l,c):f.normalize=WF();return}if(uK(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:WF()};var s=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(pK).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"),yK(e)}function EK(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 GF(e,t){var n=new EK(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||hK(e)&&(t=e,e={}),this.__opts__=iS({},HF,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=iS({},mK,e),this.__compiled__={},this.__tlds__=vK,this.__tlds_replaced__=!1,this.re={},Zv(this)}Yo.prototype.add=function(t,n){return this.__schemas__[t]=n,Zv(this),this},Yo.prototype.set=function(t){return this.__opts__=iS(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(GF(this,n)),n=this.__last_index__);for(var o=n?t.slice(n):t;this.test(o);)r.push(GF(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(),Zv(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Zv(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 wK=Yo,e0={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */e0.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,D=String.fromCharCode,I;function O(Z){throw RangeError(C[Z])}function R(Z,re){for(var J=Z.length,ie=[];J--;)ie[J]=re(Z[J]);return ie}function P(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=R(ne,re).join(".");return ie+ae}function B(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 R(Z,function(re){var J="";return re>65535&&(re-=65536,J+=D(re>>>10&1023|55296),re=56320|re&1023),J+=D(re),J}).join("")}function z(Z){return Z-48<10?Z-22:Z-65<26?Z-65:Z-97<26?Z-97:c}function q(Z,re){return Z+22+75*(Z<26)-((re!=0)<<5)}function F(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,Ae,it,Ot,je;for(de=Z.lastIndexOf(w),de<0&&(de=0),xe=0;xe<de;++xe)Z.charCodeAt(xe)>=128&&O("not-basic"),re.push(Z.charCodeAt(xe));for(ve=de>0?de+1:0;ve<J;){for(qe=ne,Ie=1,Ae=c;ve>=J&&O("invalid-input"),it=z(Z.charCodeAt(ve++)),(it>=c||it>_((l-ne)/Ie))&&O("overflow"),ne+=it*Ie,Ot=Ae<=le?f:Ae>=le+d?d:Ae-le,!(it<Ot);Ae+=c)je=c-Ot,Ie>_(l/je)&&O("overflow"),Ie*=je;ie=re.length+1,le=F(ne-qe,ie,qe==0),_(ne/ie)>l-ae&&O("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,Ae=[],it,Ot,je,It;for(Z=B(Z),it=Z.length,re=b,J=0,ae=v,le=0;le<it;++le)Ie=Z[le],Ie<128&&Ae.push(D(Ie));for(ie=ne=Ae.length,ne&&Ae.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)&&O("overflow"),J+=(de-re)*Ot,re=de,le=0;le<it;++le)if(Ie=Z[le],Ie<re&&++J>l&&O("overflow"),Ie==re){for(xe=J,ve=c;qe=ve<=ae?f:ve>=ae+d?d:ve-ae,!(xe<qe);ve+=c)It=xe-qe,je=c-qe,Ae.push(D(q(qe+It%je,0))),xe=_(It/je);Ae.push(D(q(xe,0))),ae=F(J,Ot,ie==ne),J=0,++ie}++J,++re}return Ae.join("")}function Q(Z){return P(Z,function(re){return N.test(re)?te(re.slice(4).toLowerCase()):re})}function K(Z){return P(Z,function(re){return S.test(re)?"xn--"+Y(re):re})}if(s={version:"1.3.2",ucs2:{decode:B,encode:H},decode:te,encode:Y,toASCII:K,toUnicode:Q},r&&o)if(e.exports==r)o.exports=s;else for(I in s)s.hasOwnProperty(I)&&(r[I]=s[I]);else n.punycode=s})(ci)}(e0,e0.exports);var xK=e0.exports,SK={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},TK={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"]}}},CK={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,kK=qv,NK=FY,_K=oQ,AK=MQ,OK=lK,DK=wK,Kl=Mu,YF=xK,IK={default:SK,zero:TK,commonmark:CK},LK=/^(vbscript|javascript|file|data):/,RK=/^data:image\/(gif|png|jpeg|webp);/;function FK(e){var t=e.trim().toLowerCase();return LK.test(t)?!!RK.test(t):!0}var QF=["http:","https:","mailto:"];function MK(e){var t=Kl.parse(e,!0);if(t.hostname&&(!t.protocol||QF.indexOf(t.protocol)>=0))try{t.hostname=YF.toASCII(t.hostname)}catch{}return Kl.encode(Kl.format(t))}function PK(e){var t=Kl.parse(e,!0);if(t.hostname&&(!t.protocol||QF.indexOf(t.protocol)>=0))try{t.hostname=YF.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 OK,this.block=new AK,this.core=new _K,this.renderer=new NK,this.linkify=new DK,this.validateLink=FK,this.normalizeLink=MK,this.normalizeLinkText=PK,this.utils=yp,this.helpers=yp.assign({},kK),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=IK[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 $K=Qo,VK=$K;const jK=Ui(VK);var UK="production",KF=typeof process>"u"||process.env===void 0?UK:"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 BK(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?bp.projectionNodeConstructor=e[t]:bp[t].Component=e[t])}var t0=function(){},JF=k.createContext({strict:!1}),XF=Object.keys(bp),qK=XF.length;function zK(e,t,n){var r=[],o=k.useContext(JF);if(!t)return null;KF!=="production"&&n&&o.strict;for(var i=0;i<qK;i++){var s=XF[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 n0=k.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),r0=k.createContext({});function HK(){return k.useContext(r0).visualElement}var o0=k.createContext(null),ju=typeof document<"u",sS=ju?k.useLayoutEffect:k.useEffect,aS={current:null},ZF=!1;function WK(){if(ZF=!0,!!ju)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return aS.current=e.matches};e.addListener(t),t()}else aS.current=!1}function GK(){!ZF&&WK();var e=Zt(k.useState(aS.current),1),t=e[0];return t}function YK(){var e=GK(),t=k.useContext(n0).reducedMotion;return t==="never"?!1:t==="always"?!0:e}function QK(e,t,n,r){var o=k.useContext(JF),i=HK(),s=k.useContext(o0),l=YK(),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 sS(function(){f==null||f.syncRender()}),k.useEffect(function(){var d;(d=f==null?void 0:f.animationState)===null||d===void 0||d.animateChanges()}),sS(function(){return function(){return f==null?void 0:f.notifyUnmount()}},[]),f}function Uu(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function KK(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):Uu(n)&&(n.current=r))},[t])}function eM(e){return Array.isArray(e)}function Ci(e){return typeof e=="string"||eM(e)}function JK(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.get()}),t}function XK(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.getVelocity()}),t}function tM(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 i0(e,t,n){var r=e.getProps();return tM(r,t,n??r.custom,JK(e),XK(e))}function s0(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 nM(e){return!!(s0(e)||e.variants)}function ZK(e,t){if(s0(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 eJ(e){var t=ZK(e,k.useContext(r0)),n=t.initial,r=t.animate;return k.useMemo(function(){return{initial:n,animate:r}},[rM(n),rM(r)])}function rM(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},tJ=1;function nJ(){return Ma(function(){if(Ep.hasEverUpdated)return tJ++})}var oM=k.createContext({}),iM=k.createContext({});function rJ(e,t,n,r){var o,i=t.layoutId,s=t.layout,l=t.drag,c=t.dragConstraints,f=t.layoutScroll,d=k.useContext(iM);!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&&Uu(c),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof s=="string"?s:"both",initialPromotionConfig:d,layoutScroll:f}))}var oJ=function(e){VL(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 iJ(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.projectionNodeConstructor,o=e.useRender,i=e.useVisualState,s=e.Component;t&&BK(t);function l(c,f){var d=sJ(c);c=Se(Se({},c),{layoutId:d});var g=k.useContext(n0),m=null,v=eJ(c),b=g.isStatic?void 0:nJ(),w=i(c,g.isStatic);return!g.isStatic&&ju&&(v.visualElement=QK(s,w,Se(Se({},g),c),n),rJ(b,c,v.visualElement,r||bp.projectionNodeConstructor),m=zK(c,v.visualElement,t)),k.createElement(oJ,{visualElement:v.visualElement,props:Se(Se({},g),c)},m,k.createElement(r0.Provider,{value:v},o(s,c,b,KK(w,v.visualElement,f),w,g.isStatic,v.visualElement)))}return k.forwardRef(l)}function sJ(e){var t,n=e.layoutId,r=(t=k.useContext(oM))===null||t===void 0?void 0:t.id;return r&&n!==void 0?r+"-"+n:n}function aJ(e){function t(r,o){return o===void 0&&(o={}),iJ(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 lJ=["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 lS(e){return typeof e!="string"||e.includes("-")?!1:!!(lJ.indexOf(e)>-1||/[A-Z]/.test(e))}var a0={};function cJ(e){Object.assign(a0,e)}var cS=["","X","Y","Z"],uJ=["translate","scale","rotate","skew"],wp=["transformPerspective","x","y","z"];uJ.forEach(function(e){return cS.forEach(function(t){return wp.push(e+t)})});function fJ(e,t){return wp.indexOf(e)-wp.indexOf(t)}var dJ=new Set(wp);function xp(e){return dJ.has(e)}var pJ=new Set(["originX","originY","originZ"]);function sM(e){return pJ.has(e)}function aM(e,t){var n=t.layout,r=t.layoutId;return xp(e)||sM(e)||(n||r!==void 0)&&(!!a0[e]||e==="opacity")}var Ji=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},hJ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function mJ(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(fJ);for(var g=!1,m=i.length,v=0;v<m;v++){var b=i[v];d+="".concat(hJ[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 gJ(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 lM(e){return e.startsWith("--")}var vJ=function(e,t){return t&&typeof e=="number"?t.transform(e):e};const cM=(e,t)=>n=>Math.max(Math.min(n,t),e),Sp=e=>e%1?Number(e.toFixed(5)):e,Tp=/(-)?([\d]*\.?[\d])+/g,uS=/(#[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,yJ=/^(#[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:cM(0,1)}),l0=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"),bJ=Np("vh"),EJ=Np("vw"),uM=Object.assign(Object.assign({},Xi),{parse:e=>Xi.parse(e)/100,transform:e=>Xi.transform(e*100)}),fS=(e,t)=>n=>!!(Cp(n)&&yJ.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),fM=(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:fS("hsl","hue"),parse:fM("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))+")"},wJ=cM(0,255),dS=Object.assign(Object.assign({},Jl),{transform:e=>Math.round(wJ(e))}),$a={test:fS("rgb","red"),parse:fM("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+dS.transform(e)+", "+dS.transform(t)+", "+dS.transform(n)+", "+Sp(kp.transform(r))+")"};function xJ(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 pS={test:fS("#"),parse:xJ,transform:$a.transform},jr={test:e=>$a.test(e)||pS.test(e)||Xl.test(e),parse:e=>$a.test(e)?$a.parse(e):Xl.test(e)?Xl.parse(e):pS.parse(e),transform:e=>Cp(e)?e:e.hasOwnProperty("red")?$a.transform(e):Xl.transform(e)},dM="${c}",pM="${n}";function SJ(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(uS))===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0)>0}function hM(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(uS);r&&(n=r.length,e=e.replace(uS,dM),t.push(...r.map(jr.parse)));const o=e.match(Tp);return o&&(e=e.replace(Tp,pM),t.push(...o.map(Jl.parse))),{values:t,numColors:n,tokenised:e}}function mM(e){return hM(e).values}function gM(e){const{values:t,numColors:n,tokenised:r}=hM(e),o=t.length;return i=>{let s=r;for(let l=0;l<o;l++)s=s.replace(l<n?dM:pM,l<n?jr.transform(i[l]):Sp(i[l]));return s}}const TJ=e=>typeof e=="number"?0:e;function CJ(e){const t=mM(e);return gM(e)(t.map(TJ))}const Ps={test:SJ,parse:mM,createTransformer:gM,getAnimatableNone:CJ},kJ=new Set(["brightness","contrast","saturate","opacity"]);function NJ(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=kJ.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const _J=/([a-z-]*)\(.*?\)/g,hS=Object.assign(Object.assign({},Ps),{getAnimatableNone:e=>{const t=e.match(_J);return t?t.map(NJ).join(" "):e}});var vM=Se(Se({},Jl),{transform:Math.round}),yM={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:l0,scaleX:l0,scaleY:l0,scaleZ:l0,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:uM,originY:uM,originZ:et,zIndex:vM,fillOpacity:kp,strokeOpacity:kp,numOctaves:vM};function mS(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(lM(v)){s[v]=b;continue}var w=yM[v],N=vJ(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 sM(v)?(f[v]=N,g=!0):i[v]=N}d?i.transform=mJ(e,n,m,r):r?i.transform=r({},""):!t.transform&&i.transform&&(i.transform="none"),g&&(i.transformOrigin=gJ(f))}var gS=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function bM(e,t,n){for(var r in t)!Ji(t[r])&&!aM(r,n)&&(e[r]=t[r])}function AJ(e,t,n){var r=e.transformTemplate;return k.useMemo(function(){var o=gS();mS(o,t,{enableHardwareAcceleration:!n},r);var i=o.vars,s=o.style;return Se(Se({},i),s)},[t])}function OJ(e,t,n){var r=e.style||{},o={};return bM(o,r,e),Object.assign(o,AJ(e,t,n)),e.transformValues&&(o=e.transformValues(o)),o}function DJ(e,t,n){var r={},o=OJ(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 IJ=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 c0(e){return IJ.has(e)}var EM=function(e){return!c0(e)};function LJ(e){e&&(EM=function(t){return t.startsWith("on")?!c0(t):e(t)})}try{LJ(require("@emotion/is-prop-valid").default)}catch{}function RJ(e,t,n){var r={};for(var o in e)(EM(o)||n===!0&&c0(o)||!t&&!c0(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function wM(e,t,n){return typeof e=="string"?e:et.transform(t+n*e)}function FJ(e,t,n){var r=wM(t,e.x,e.width),o=wM(n,e.y,e.height);return"".concat(r," ").concat(o)}var MJ={offset:"stroke-dashoffset",array:"stroke-dasharray"},PJ={offset:"strokeDashoffset",array:"strokeDasharray"};function $J(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?MJ:PJ;e[i.offset]=et.transform(-r);var s=et.transform(t),l=et.transform(n);e[i.array]="".concat(s," ").concat(l)}function vS(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=Sr(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);mS(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=FJ(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&&$J(b,c,d,m,!1)}var xM=function(){return Se(Se({},gS()),{attrs:{}})};function VJ(e,t){var n=k.useMemo(function(){var o=xM();return vS(o,t,{enableHardwareAcceleration:!1},e.transformTemplate),Se(Se({},o.attrs),{style:Se({},o.style)})},[t]);if(e.style){var r={};bM(r,e.style,e),n.style=Se(Se({},r),n.style)}return n}function jJ(e){e===void 0&&(e=!1);var t=function(n,r,o,i,s,l){var c=s.latestValues,f=lS(n)?VJ:DJ,d=f(r,c,l),g=RJ(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 UJ=/([a-z])([A-Z])/g,BJ="$1-$2",SM=function(e){return e.replace(UJ,BJ).toLowerCase()};function TM(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 CM=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function kM(e,t,n,r){TM(e,t,void 0,r);for(var o in t.attrs)e.setAttribute(CM.has(o)?o:SM(o),t.attrs[o])}function yS(e){var t=e.style,n={};for(var r in t)(Ji(t[r])||aM(r,e))&&(n[r]=t[r]);return n}function NM(e){var t=yS(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 bS(e){return typeof e=="object"&&typeof e.start=="function"}var _p=function(e){return Array.isArray(e)},qJ=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},_M=function(e){return _p(e)?e[e.length-1]||0:e};function u0(e){var t=Ji(e)?e.get():e;return qJ(t)?t.toValue():t}function AM(e,t,n,r){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,s=e.onMount,l={latestValues:zJ(t,n,r,o),renderState:i()};return s&&(l.mount=function(c){return s(t,c,l)}),l}var OM=function(e){return function(t,n){var r=k.useContext(r0),o=k.useContext(o0);return n?AM(e,t,r,o):Ma(function(){return AM(e,t,r,o)})}};function zJ(e,t,n,r){var o={},i=(n==null?void 0:n.initial)===!1,s=r(e);for(var l in s)o[l]=u0(s[l]);var c=e.initial,f=e.animate,d=s0(e),g=nM(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"&&!bS(v)){var b=Array.isArray(v)?v:[v];b.forEach(function(w){var N=tM(e,w);if(N){var S=N.transitionEnd;N.transition;var x=Sr(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 HJ={useVisualState:OM({scrapeMotionValuesFromProps:NM,createRenderState:xM,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}}vS(r,o,{enableHardwareAcceleration:!1},e.transformTemplate),kM(t,r)}})},WJ={useVisualState:OM({scrapeMotionValuesFromProps:yS,createRenderState:gS})};function GJ(e,t,n,r,o){var i=t.forwardMotionProps,s=i===void 0?!1:i,l=lS(e)?HJ:WJ;return Se(Se({},l),{preloadedFeatures:n,useRender:jJ(s),createVisualElement:r,projectionNodeConstructor:o,Component:e})}var Vt;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Vt||(Vt={}));function f0(e,t,n,r){return r===void 0&&(r={passive:!0}),e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function ES(e,t,n,r){k.useEffect(function(){var o=e.current;if(n&&o)return f0(o,t,n,r)},[e,t,n,r])}function YJ(e){var t=e.whileFocus,n=e.visualElement,r=function(){var i;(i=n.animationState)===null||i===void 0||i.setActive(Vt.Focus,!0)},o=function(){var i;(i=n.animationState)===null||i===void 0||i.setActive(Vt.Focus,!1)};ES(n,"focus",t?r:void 0),ES(n,"blur",t?o:void 0)}function DM(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function IM(e){var t=!!e.touches;return t}function QJ(e){return function(t){var n=t instanceof MouseEvent,r=!n||n&&t.button===0;r&&e(t)}}var KJ={pageX:0,pageY:0};function JJ(e,t){t===void 0&&(t="page");var n=e.touches[0]||e.changedTouches[0],r=n||KJ;return{x:r[t+"X"],y:r[t+"Y"]}}function XJ(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function wS(e,t){return t===void 0&&(t="page"),{point:IM(e)?JJ(e,t):XJ(e,t)}}var LM=function(e,t){t===void 0&&(t=!1);var n=function(r){return e(r,wS(r))};return t?QJ(n):n},ZJ=function(){return ju&&window.onpointerdown===null},eX=function(){return ju&&window.ontouchstart===null},tX=function(){return ju&&window.onmousedown===null},nX={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},rX={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function RM(e){return ZJ()?e:eX()?rX[e]:tX()?nX[e]:e}function Bu(e,t,n,r){return f0(e,RM(t),LM(n,t==="pointerdown"),r)}function d0(e,t,n,r){return ES(e,RM(t),n&&LM(n,t==="pointerdown"),r)}function FM(e){var t=null;return function(){var n=function(){t=null};return t===null?(t=e,n):!1}}var MM=FM("dragHorizontal"),PM=FM("dragVertical");function $M(e){var t=!1;if(e==="y")t=PM();else if(e==="x")t=MM();else{var n=MM(),r=PM();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function VM(){var e=$M(!0);return e?(e(),!1):!0}function jM(e,t,n){return function(r,o){var i;!DM(r)||VM()||((i=e.animationState)===null||i===void 0||i.setActive(Vt.Hover,t),n==null||n(r,o))}}function oX(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;d0(o,"pointerenter",t||r?jM(o,!0,t):void 0,{passive:!t}),d0(o,"pointerleave",n||r?jM(o,!1,n):void 0,{passive:!n})}var UM=function(e,t){return t?e===t?!0:UM(e,t.parentElement):!1};function BM(e){return k.useEffect(function(){return function(){return e()}},[])}const p0=(e,t,n)=>Math.min(Math.max(n,e),t),xS=.001,iX=.01,sX=10,aX=.05,lX=1;function cX({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,s=1-t;s=p0(aX,lX,s),e=p0(iX,sX,e/1e3),s<1?(o=f=>{const d=f*s,g=d*e,m=d-n,v=SS(f,s),b=Math.exp(-g);return xS-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=SS(Math.pow(f,2),s);return(-o(f)+xS>0?-1:1)*((m-v)*b)/w}):(o=f=>{const d=Math.exp(-f*e),g=(f-n)*e+1;return-xS+d*g},i=f=>{const d=Math.exp(-f*e),g=(n-f)*(e*e);return d*g});const l=5/e,c=fX(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 uX=12;function fX(e,t,n){let r=n;for(let o=1;o<uX;o++)r=r-e(r)/t(r);return r}function SS(e,t){return e*Math.sqrt(1-t*t)}const dX=["duration","bounce"],pX=["stiffness","damping","mass"];function qM(e,t){return t.some(n=>e[n]!==void 0)}function hX(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!qM(e,pX)&&qM(e,dX)){const n=cX(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function TS(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:o}=e,i=Sr(e,["from","to","restSpeed","restDelta"]);const s={done:!1,value:t};let{stiffness:l,damping:c,mass:f,velocity:d,duration:g,isResolvedFromDuration:m}=hX(i),v=zM,b=zM;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=SS(C,x);v=_=>{const D=Math.exp(-x*C*_);return n-D*((N+x*C*S)/E*Math.sin(E*_)+S*Math.cos(E*_))},b=_=>{const D=Math.exp(-x*C*_);return x*C*D*(Math.sin(E*_)*(N+x*C*S)/E+S*Math.cos(E*_))-D*(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 D=Math.exp(-x*C*_),I=Math.min(E*_,300);return n-D*((N+x*C*S)*Math.sinh(I)+E*S*Math.cosh(I))/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()}}}TS.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const zM=e=>0,Ap=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ln=(e,t,n)=>-n*e+n*t+e;function CS(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 HM({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=CS(c,l,e+1/3),i=CS(c,l,e),s=CS(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}const mX=(e,t,n)=>{const r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},gX=[pS,$a,Xl],WM=e=>gX.find(t=>t.test(e)),GM=(e,t)=>{let n=WM(e),r=WM(t),o=n.parse(e),i=r.parse(t);n===Xl&&(o=HM(o),n=$a),r===Xl&&(i=HM(i),r=$a);const s=Object.assign({},o);return l=>{for(const c in s)c!=="alpha"&&(s[c]=mX(o[c],i[c],l));return s.alpha=ln(o.alpha,i.alpha,l),n.transform(s)}},kS=e=>typeof e=="number",vX=(e,t)=>n=>t(e(n)),h0=(...e)=>e.reduce(vX);function YM(e,t){return kS(e)?n=>ln(e,t,n):jr.test(e)?GM(e,t):JM(e,t)}const QM=(e,t)=>{const n=[...e],r=n.length,o=e.map((i,s)=>YM(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}},yX=(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]=YM(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}};function KM(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 JM=(e,t)=>{const n=Ps.createTransformer(t),r=KM(e),o=KM(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?h0(QM(r.parsed,o.parsed),n):s=>`${s>0?t:e}`},bX=(e,t)=>n=>ln(e,t,n);function EX(e){if(typeof e=="number")return bX;if(typeof e=="string")return jr.test(e)?GM:JM;if(Array.isArray(e))return QM;if(typeof e=="object")return yX}function wX(e,t,n){const r=[],o=n||EX(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=h0(c,l)}r.push(l)}return r}function xX([e,t],[n]){return r=>n(Ap(e,t,r))}function SX(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=Ap(e[i],e[i+1],o);return t[i](l)}}function NS(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;t0(i===t.length),t0(!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=wX(t,r,o),l=i===2?xX(e,s):SX(e,s);return n?c=>l(p0(e[0],e[i-1],c)):l}const m0=e=>t=>1-e(1-t),_S=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,TX=e=>t=>Math.pow(t,e),XM=e=>t=>t*t*((e+1)*t-e),CX=e=>{const t=XM(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},ZM=1.525,kX=4/11,NX=8/11,_X=9/10,AS=e=>e,OS=TX(2),AX=m0(OS),eP=_S(OS),tP=e=>1-Math.sin(Math.acos(e)),DS=m0(tP),OX=_S(DS),IS=XM(ZM),DX=m0(IS),IX=_S(IS),LX=CX(ZM),RX=4356/361,FX=35442/1805,MX=16061/1805,g0=e=>{if(e===1||e===0)return e;const t=e*e;return e<kX?7.5625*t:e<NX?9.075*t-9.9*e+3.4:e<_X?RX*t-FX*e+MX:10.8*e*e-20.52*e+10.72},PX=m0(g0),$X=e=>e<.5?.5*(1-g0(1-e*2)):.5*g0(e*2-1)+.5;function VX(e,t){return e.map(()=>t||eP).splice(0,e.length-1)}function jX(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function UX(e,t){return e.map(n=>n*t)}function v0({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=UX(r&&r.length===s.length?r:jX(s),o);function c(){return NS(l,s,{ease:Array.isArray(n)?n:VX(s,n)})}let f=c();return{next:d=>(i.value=f(d),i.done=d>=o,i),flipTarget:()=>{s.reverse(),f=c()}}}function BX({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 nP={keyframes:v0,spring:TS,decay:BX};function qX(e){if(Array.isArray(e.to))return v0;if(nP[e.type])return nP[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?v0:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?TS:v0}const rP=1/60*1e3,zX=typeof performance<"u"?()=>performance.now():()=>Date.now(),oP=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(zX()),rP);function HX(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 WX=40;let LS=!0,Op=!1,RS=!1;const qu={delta:0,timestamp:0},Dp=["read","update","preRender","render","postRender"],y0=Dp.reduce((e,t)=>(e[t]=HX(()=>Op=!0),e),{}),ki=Dp.reduce((e,t)=>{const n=y0[t];return e[t]=(r,o=!1,i=!1)=>(Op||YX(),n.schedule(r,o,i)),e},{}),zu=Dp.reduce((e,t)=>(e[t]=y0[t].cancel,e),{}),FS=Dp.reduce((e,t)=>(e[t]=()=>y0[t].process(qu),e),{}),GX=e=>y0[e].process(qu),iP=e=>{Op=!1,qu.delta=LS?rP:Math.max(Math.min(e-qu.timestamp,WX),1),qu.timestamp=e,RS=!0,Dp.forEach(GX),RS=!1,Op&&(LS=!1,oP(iP))},YX=()=>{Op=!0,LS=!0,RS||oP(iP)},b0=()=>qu;function sP(e,t,n=0){return e-t-n}function QX(e,t,n=0,r=!0){return r?sP(t+-e,t,n):t-(e-t)+n}function KX(e,t,n,r){return r?e>=t+n:e<=-n}const JX=e=>{const t=({delta:n})=>e(n);return{start:()=>ki.update(t,!0),stop:()=>zu.update(t)}};function aP(e){var t,n,{from:r,autoplay:o=!0,driver:i=JX,elapsed:s=0,repeat:l=0,repeatType:c="loop",repeatDelay:f=0,onPlay:d,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=Sr(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,D=!0,I;const O=qX(w);!((n=(t=O).needsInterpolation)===null||n===void 0)&&n.call(t,r,N)&&(I=NS([0,100],[r,N],{clamp:!1}),r=0,N=100);const R=O(Object.assign(Object.assign({},w),{from:r,to:N}));function P(){x++,c==="reverse"?(D=x%2===0,s=QX(s,C,f,D)):(s=sP(s,C,f),c==="mirror"&&R.flipTarget()),_=!1,v&&v()}function B(){S.stop(),m&&m()}function H(q){if(D||(q=-q),s+=q,!_){const F=R.next(Math.max(0,s));E=F.value,I&&(E=I(E)),_=D?F.done:s<=0}b==null||b(E),_&&(x===0&&(C??(C=s)),x<l?KX(s,C,f,D)&&P():B())}function z(){d==null||d(),S=i(H),S.start()}return o&&z(),{stop:()=>{g==null||g(),S.stop()}}}function lP(e,t){return t?e*(1e3/t):0}function XX({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=aP(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 D,I;const O=R=>{D=I,I=R,t=lP(R-D,b0().delta),(_===1&&R>E||_===-1&&R<E)&&x({from:R,to:E,velocity:t})};S({type:"decay",from:e,velocity:t,timeConstant:i,power:o,restDelta:c,modifyTarget:f,onUpdate:w(C)?O:void 0})}return{stop:()=>b==null?void 0:b.stop()}}const MS=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),cP=e=>MS(e)&&e.hasOwnProperty("z"),E0=(e,t)=>Math.abs(e-t);function uP(e,t){if(kS(e)&&kS(t))return E0(e,t);if(MS(e)&&MS(t)){const n=E0(e.x,t.x),r=E0(e.y,t.y),o=cP(e)&&cP(t)?E0(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}const fP=(e,t)=>1-3*t+3*e,dP=(e,t)=>3*t-6*e,pP=e=>3*e,w0=(e,t,n)=>((fP(t,n)*e+dP(t,n))*e+pP(t))*e,hP=(e,t,n)=>3*fP(t,n)*e*e+2*dP(t,n)*e+pP(t),ZX=1e-7,eZ=10;function tZ(e,t,n,r,o){let i,s,l=0;do s=t+(n-t)/2,i=w0(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>ZX&&++l<eZ);return s}const nZ=8,rZ=.001;function oZ(e,t,n,r){for(let o=0;o<nZ;++o){const i=hP(t,n,r);if(i===0)return t;const s=w0(t,n,r)-e;t-=s/i}return t}const x0=11,S0=1/(x0-1);function iZ(e,t,n,r){if(e===t&&n===r)return AS;const o=new Float32Array(x0);for(let s=0;s<x0;++s)o[s]=w0(s*S0,e,n);function i(s){let l=0,c=1;const f=x0-1;for(;c!==f&&o[c]<=s;++c)l+=S0;--c;const d=(s-o[c])/(o[c+1]-o[c]),g=l+d*S0,m=hP(g,e,n);return m>=rZ?oZ(s,g,e,n):m===0?g:tZ(s,l,l+S0,e,n)}return s=>s===0||s===1?s:w0(i(s),t,r)}function sZ(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(Vt.Tap,!1),!VM()}function m(w,N){g()&&(UM(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=h0(Bu(window,"pointerup",m,f),Bu(window,"pointercancel",v,f)),(S=i.animationState)===null||S===void 0||S.setActive(Vt.Tap,!0),n==null||n(w,N))}d0(i,"pointerdown",s?b:void 0,f),BM(d)}var mP=new Set;function aZ(e,t,n){e||mP.has(t)||(console.warn(t),n&&console.warn(n),mP.add(t))}var PS=new WeakMap,$S=new WeakMap,lZ=function(e){var t;(t=PS.get(e.target))===null||t===void 0||t(e)},cZ=function(e){e.forEach(lZ)};function uZ(e){var t=e.root,n=Sr(e,["root"]),r=t||document;$S.has(r)||$S.set(r,{});var o=$S.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(cZ,Se({root:t},n))),o[i]}function fZ(e,t,n){var r=uZ(t);return PS.set(e,n),r.observe(e),function(){PS.delete(e),r.unobserve(e)}}function dZ(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"?mZ:hZ;f(c,l.current,t,s)}var pZ={some:0,all:1};function hZ(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:pZ[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(Vt.InView,v);var b=n.getProps(),w=v?b.onViewportEnter:b.onViewportLeave;w==null||w(g)}};return fZ(n.getInstance(),f,d)}},[e,o,i,l])}function mZ(e,t,n,r){var o=r.fallback,i=o===void 0?!0:o;k.useEffect(function(){!e||!i||(KF!=="production"&&aZ(!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(Vt.InView,!0)}))},[e])}var Va=function(e){return function(t){return e(t),null}},gZ={inView:Va(dZ),tap:Va(sZ),focus:Va(YJ),hover:Va(oX)},vZ=0,yZ=function(){return vZ++},bZ=function(){return Ma(yZ)};function gP(){var e=k.useContext(o0);if(e===null)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=bZ();k.useEffect(function(){return r(o)},[]);var i=function(){return n==null?void 0:n(o)};return!t&&n?[!1,i]:[!0]}function vP(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 T0=function(e){return e*1e3},EZ={linear:AS,easeIn:OS,easeInOut:eP,easeOut:AX,circIn:tP,circInOut:OX,circOut:DS,backIn:IS,backInOut:IX,backOut:DX,anticipate:LX,bounceIn:PX,bounceInOut:$X,bounceOut:g0},yP=function(e){if(Array.isArray(e)){t0(e.length===4);var t=Zt(e,4),n=t[0],r=t[1],o=t[2],i=t[3];return iZ(n,r,o,i)}else if(typeof e=="string")return EZ[e];return e},wZ=function(e){return Array.isArray(e)&&typeof e[0]!="number"},bP=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}},C0=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}},VS=function(){return{type:"keyframes",ease:"linear",duration:.3}},xZ=function(e){return{type:"keyframes",duration:.8,values:e}},EP={x:Zl,y:Zl,z:Zl,rotate:Zl,rotateX:Zl,rotateY:Zl,rotateZ:Zl,scaleX:C0,scaleY:C0,scale:C0,opacity:VS,backgroundColor:VS,color:VS,default:C0},SZ=function(e,t){var n;return _p(t)?n=xZ:n=EP[e]||EP.default,Se({to:t},n(t))},TZ=Se(Se({},yM),{color:jr,backgroundColor:jr,outlineColor:jr,fill:jr,stroke:jr,borderColor:jr,borderTopColor:jr,borderRightColor:jr,borderBottomColor:jr,borderLeftColor:jr,filter:hS,WebkitFilter:hS}),jS=function(e){return TZ[e]};function US(e,t){var n,r=jS(e);return r!==hS&&(r=Ps),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}function CZ(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=Sr(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}function kZ(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,i=e.loop,s=Sr(e,["ease","times","yoyo","flip","loop"]),l=Se({},s);return n&&(l.offset=n),s.duration&&(l.duration=T0(s.duration)),s.repeatDelay&&(l.repeatDelay=T0(s.repeatDelay)),t&&(l.ease=wZ(t)?t.map(yP):yP(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 NZ(e,t){var n,r,o=BS(e,t)||{};return(r=(n=o.delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function _Z(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=xi([],Zt(e.to),!1),e.to[0]=e.from),e}function AZ(e,t,n){var r;return Array.isArray(t.to)&&((r=e.duration)!==null&&r!==void 0||(e.duration=.8)),_Z(t),CZ(e)||(e=Se(Se({},e),SZ(n,t.to))),Se(Se({},t),kZ(e))}function OZ(e,t,n,r,o){var i,s=BS(r,e),l=(i=s.from)!==null&&i!==void 0?i:t.get(),c=bP(e,n);l==="none"&&c&&typeof n=="string"?l=US(e,n):wP(l)&&typeof n=="string"?l=xP(n):!Array.isArray(n)&&wP(n)&&typeof l=="string"&&(n=xP(l));var f=bP(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"?XX(Se(Se({},m),s)):aP(Se(Se({},AZ(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=_M(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 wP(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function xP(e){return typeof e=="number"?0:US("",e)}function BS(e,t){return e[t]||e.default||e}function qS(e,t,n,r){return r===void 0&&(r={}),t.start(function(o){var i,s,l=OZ(e,t,n,r,o),c=NZ(r,e),f=function(){return s=l()};return c?i=window.setTimeout(f,T0(c)):f(),function(){clearTimeout(i),s==null||s.stop()}})}var DZ=function(e){return/^\-?\d*\.?\d+$/.test(e)},IZ=function(e){return/^0[^.\s]+$/.test(e)};function zS(e,t){e.indexOf(t)===-1&&e.push(t)}function HS(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function LZ(e,t,n){var r=Zt(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=Zt(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 zS(this.subscriptions,t),function(){return HS(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}(),RZ=function(e){return!isNaN(parseFloat(e))},FZ=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=b0(),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=RZ(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?lP(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 FZ(e)}var SP=function(e){return function(t){return t.test(e)}},MZ={test:function(e){return e==="auto"},parse:function(e){return e}},TP=[Jl,et,Xi,Pa,EJ,bJ,MZ],Lp=function(e){return TP.find(SP(e))},PZ=xi(xi([],Zt(TP),!1),[jr,Ps],!1),$Z=function(e){return PZ.find(SP(e))};function VZ(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ec(n))}function jZ(e,t){var n=i0(e,t),r=n?e.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,i=o===void 0?{}:o;r.transition;var s=Sr(r,["transitionEnd","transition"]);s=Se(Se({},s),i);for(var l in s){var c=_M(s[l]);VZ(e,l,c)}}function UZ(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"&&(DZ(m)||IZ(m))?m=parseFloat(m):!$Z(m)&&Ps.test(g)&&(m=US(d,g)),e.addValue(d,ec(m)),(i=(s=n)[d])!==null&&i!==void 0||(s[d]=m),e.setBaseTarget(d,m))}}function BZ(e,t){if(t){var n=t[e]||t.default||t;return n.from}}function qZ(e,t,n){var r,o,i={};for(var s in e)i[s]=(r=BZ(s,t))!==null&&r!==void 0?r:(o=n.getValue(s))===null||o===void 0?void 0:o.get();return i}function zZ(e,t,n){n===void 0&&(n={}),e.notifyAnimationStart(t);var r;if(Array.isArray(t)){var o=t.map(function(s){return WS(e,s,n)});r=Promise.all(o)}else if(typeof t=="string")r=WS(e,t,n);else{var i=typeof t=="function"?i0(e,t,n.custom):t;r=CP(e,i,n)}return r.then(function(){return e.notifyAnimationComplete(t)})}function WS(e,t,n){var r;n===void 0&&(n={});var o=i0(e,t,n.custom),i=(o||{}).transition,s=i===void 0?e.getDefaultTransition()||{}:i;n.transitionOverride&&(s=n.transitionOverride);var l=o?function(){return CP(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 HZ(e,t,w+v,N,S,n)}:function(){return Promise.resolve()},f=s.when;if(f){var d=Zt(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 CP(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=Sr(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&&GZ(w,N))){var C=Se({delay:s},g);e.shouldReduceMotion&&xp(N)&&(C=Se(Se({},C),{type:!1,delay:0}));var E=qS(N,S,x,C);b.push(E)}}return Promise.all(b).then(function(){m&&jZ(e,m)})}function HZ(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(WZ).forEach(function(f,d){s.push(WS(f,t,Se(Se({},i),{delay:n+c(d)})).then(function(){return f.notifyAnimationComplete(t)}))}),Promise.all(s)}function WZ(e,t){return e.sortNodePosition(t)}function GZ(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&r[t]!==!0;return r[t]=!1,o}var GS=[Vt.Animate,Vt.InView,Vt.Focus,Vt.Hover,Vt.Tap,Vt.Drag,Vt.Exit],YZ=xi([],Zt(GS),!1).reverse(),QZ=GS.length;function KZ(e){return function(t){return Promise.all(t.map(function(n){var r=n.animation,o=n.options;return zZ(e,r,o)}))}}function JZ(e){var t=KZ(e),n=ZZ(),r={},o=!0,i=function(d,g){var m=i0(e,g);if(m){m.transition;var v=m.transitionEnd,b=Sr(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(I){var O=YZ[I],R=n[O],P=(m=v[O])!==null&&m!==void 0?m:b[O],B=Ci(P),H=O===g?R.isActive:null;H===!1&&(x=I);var z=P===b[O]&&P!==v[O]&&B;if(z&&o&&e.manuallyAnimateOnMount&&(z=!1),R.protectedKeys=Se({},S),!R.isActive&&H===null||!P&&!R.prevProp||bS(P)||typeof P=="boolean")return"continue";var q=XZ(R.prevProp,P),F=q||O===g&&R.isActive&&!z&&B||I>x&&B,te=Array.isArray(P)?P:[P],Y=te.reduce(i,{});H===!1&&(Y={});var Q=R.prevResolvedValues,K=Q===void 0?{}:Q,Z=Se(Se({},K),Y),re=function(ae){F=!0,N.delete(ae),R.needsAnimating[ae]=!0};for(var J in Z){var ie=Y[J],ne=K[J];S.hasOwnProperty(J)||(ie!==ne?_p(ie)&&_p(ne)?!vP(ie,ne)||q?re(J):R.protectedKeys[J]=!0:ie!==void 0?re(J):N.add(J):ie!==void 0&&N.has(J)?re(J):R.protectedKeys[J]=!0)}R.prevProp=P,R.prevResolvedValues=Y,R.isActive&&(S=Se(Se({},S),Y)),o&&e.blockInitialAnimation&&(F=!1),F&&!z&&w.push.apply(w,xi([],Zt(te.map(function(ae){return{animation:ae,options:Se({type:O},d)}})),!1))},E=0;E<QZ;E++)C(E);if(r=Se({},S),N.size){var _={};N.forEach(function(I){var O=e.getBaseTarget(I);O!==void 0&&(_[I]=O)}),w.push({animation:_})}var D=!!w.length;return o&&v.initial===!1&&!e.manuallyAnimateOnMount&&(D=!1),o=!1,D?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 XZ(e,t){return typeof t=="string"?t!==e:eM(t)?!vP(t,e):!1}function tc(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ZZ(){var e;return e={},e[Vt.Animate]=tc(!0),e[Vt.InView]=tc(),e[Vt.Hover]=tc(),e[Vt.Tap]=tc(),e[Vt.Drag]=tc(),e[Vt.Focus]=tc(),e[Vt.Exit]=tc(),e}var eee={animation:Va(function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=JZ(t)),bS(n)&&k.useEffect(function(){return n.subscribe(t)},[n])}),exit:Va(function(e){var t=e.custom,n=e.visualElement,r=Zt(gP(),2),o=r[0],i=r[1],s=k.useContext(o0);k.useEffect(function(){var l,c;n.isPresent=o;var f=(l=n.animationState)===null||l===void 0?void 0:l.setActive(Vt.Exit,!o,{custom:(c=s==null?void 0:s.custom)!==null&&c!==void 0?c:t});!o&&(f==null||f.then(i))},[o])})},kP=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=QS(o.lastMoveEventInfo,o.history),v=o.startEvent!==null,b=uP(m.offset,{x:0,y:0})>=3;if(!(!v&&!b)){var w=m.point,N=b0().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=YS(v,o.transformPagePoint),DM(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=QS(YS(v,o.transformPagePoint),o.history);o.startEvent&&w&&w(m,S),N&&N(m,S)},!(IM(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=s;var l=wS(t),c=YS(l,this.transformPagePoint),f=c.point,d=b0().timestamp;this.history=[Se(Se({},f),{timestamp:d})];var g=n.onSessionStart;g&&g(t,QS(c,this.history)),this.removeListeners=h0(Bu(window,"pointermove",this.handlePointerMove),Bu(window,"pointerup",this.handlePointerUp),Bu(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),zu.update(this.updatePoint)},e}();function YS(e,t){return t?{point:t(e.point)}:e}function NP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function QS(e,t){var n=e.point;return{point:n,delta:NP(n,_P(t)),offset:NP(n,tee(t)),velocity:nee(t,.1)}}function tee(e){return e[0]}function _P(e){return e[e.length-1]}function nee(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=_P(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>T0(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 AP(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=.01),uP(e,t)<n}function OP(e,t,n,r){r===void 0&&(r=.5),e.origin=r,e.originPoint=ln(t.min,t.max,e.origin),e.scale=$s(n)/$s(t),(AP(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ln(n.min,n.max,e.origin)-e.originPoint,(AP(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Rp(e,t,n,r){OP(e.x,t.x,n.x,r==null?void 0:r.originX),OP(e.y,t.y,n.y,r==null?void 0:r.originY)}function DP(e,t,n){e.min=n.min+t.min,e.max=e.min+$s(t)}function ree(e,t,n){DP(e.x,t.x,n.x),DP(e.y,t.y,n.y)}function IP(e,t,n){e.min=t.min-n.min,e.max=e.min+$s(t)}function Fp(e,t,n){IP(e.x,t.x,n.x),IP(e.y,t.y,n.y)}function oee(e,t,n){var r=t.min,o=t.max;return r!==void 0&&e<r?e=n?ln(r,e,n.min):Math.max(e,r):o!==void 0&&e>o&&(e=n?ln(o,e,n.max):Math.min(e,o)),e}function LP(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 iee(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:LP(e.x,r,i),y:LP(e.y,n,o)}}function RP(e,t){var n,r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=Zt([o,r],2),r=n[0],o=n[1]),{min:r,max:o}}function see(e,t){return{x:RP(e.x,t.x),y:RP(e.y,t.y)}}function aee(e,t){var n=.5,r=$s(e),o=$s(t);return o>r?n=Ap(t.min,t.max-r,e.min):r>o&&(n=Ap(e.min,e.max-o,t.min)),p0(0,1,n)}function lee(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 KS=.35;function cee(e){return e===void 0&&(e=KS),e===!1?e=0:e===!0&&(e=KS),{x:FP(e,"left","right"),y:FP(e,"top","bottom")}}function FP(e,t,n){return{min:MP(e,t),max:MP(e,n)}}function MP(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}var PP=function(){return{translate:0,scale:1,origin:0,originPoint:0}},Mp=function(){return{x:PP(),y:PP()}},$P=function(){return{min:0,max:0}},Tr=function(){return{x:$P(),y:$P()}};function Zi(e){return[e("x"),e("y")]}function VP(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 uee(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function fee(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 JS(e){return e===void 0||e===1}function jP(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!JS(t)||!JS(n)||!JS(r)}function ja(e){return jP(e)||UP(e.x)||UP(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function UP(e){return e&&e!=="0%"}function k0(e,t,n){var r=e-n,o=t*r;return n+o}function BP(e,t,n,r,o){return o!==void 0&&(e=k0(e,o,r)),k0(e,n,r)+t}function XS(e,t,n,r,o){t===void 0&&(t=0),n===void 0&&(n=1),e.min=BP(e.min,t,n,r,o),e.max=BP(e.max,t,n,r,o)}function qP(e,t){var n=t.x,r=t.y;XS(e.x,n.translate,n.scale,n.originPoint),XS(e.y,r.translate,r.scale,r.originPoint)}function dee(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&&Hu(e,{x:-l.scroll.x,y:-l.scroll.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,qP(e,c)),r&&ja(l.latestValues)&&Hu(e,l.latestValues))}}function Ua(e,t){e.min=e.min+t,e.max=e.max+t}function zP(e,t,n){var r=Zt(n,3),o=r[0],i=r[1],s=r[2],l=t[s]!==void 0?t[s]:.5,c=ln(e.min,e.max,l);XS(e,t[o],t[i],c,t.scale)}var pee=["x","scaleX","originX"],hee=["y","scaleY","originY"];function Hu(e,t){zP(e.x,t,pee),zP(e.y,t,hee)}function HP(e,t){return VP(fee(e.getBoundingClientRect(),t))}function mee(e,t,n){var r=HP(e,n),o=t.scroll;return o&&(Ua(r.x,o.x),Ua(r.y,o.y)),r}var gee=new WeakMap,vee=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=Tr(),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(wS(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=$M(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 D=(E=(C=r.visualElement.projection)===null||C===void 0?void 0:C.layout)===null||E===void 0?void 0:E.actual[x];if(D){var I=$s(D);_=I*(parseFloat(_)/100)}}r.originPoint[x]=_}),S==null||S(g,m),(v=r.visualElement.animationState)===null||v===void 0||v.setActive(Vt.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=yee(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 kP(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(Vt.Drag,!1)},e.prototype.updateAxis=function(t,n,r){var o=this.getProps().drag;if(!(!r||!N0(t,o,this.currentDirection))){var i=this.getAxisMotionValue(t),s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=oee(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&&Uu(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&i?this.constraints=iee(i.actual,r):this.constraints=!1,this.elastic=cee(o),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Zi(function(l){t.getAxisMotionValue(l)&&(t.constraints[l]=lee(i.actual[l],t.constraints[l]))})},e.prototype.resolveRefConstraints=function(){var t=this.getProps(),n=t.dragConstraints,r=t.onMeasureDragConstraints;if(!n||!Uu(n))return!1;var o=n.current,i=this.visualElement.projection;if(!i||!i.layout)return!1;var s=mee(o,i.root,this.visualElement.getTransformPagePoint()),l=see(i.layout.actual,s);if(r){var c=r(uee(l));this.hasMutatedConstraints=!!c,c&&(l=VP(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(N0(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 qS(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(N0(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]-ln(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(!(!Uu(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]=aee({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(N0(f,o,null)){var d=t.getAxisMotionValue(f),g=t.constraints[f],m=g.min,v=g.max;d.set(ln(m,v,l[f]))}})}},e.prototype.addListeners=function(){var t=this,n;gee.set(this.visualElement,this);var r=this.visualElement.getInstance(),o=Bu(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;Uu(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=f0(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?KS: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 N0(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yee(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 bee(e){var t=e.dragControls,n=e.visualElement,r=Ma(function(){return new vee(n)});k.useEffect(function(){return t&&t.subscribe(r)},[r,t]),k.useEffect(function(){return r.addListeners()},[r])}function Eee(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(n0).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 kP(g,f,{transformPagePoint:c})}d0(i,"pointerdown",s&&d),BM(function(){return l.current&&l.current.end()})}var wee={pan:Va(Eee),drag:Va(bee)},_0=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function xee(){var e=_0.map(function(){return new Ip}),t={},n={clearAllListeners:function(){return e.forEach(function(r){return r.clear()})},updatePropListeners:function(r){_0.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"+_0[o]]=function(i){return r.add(i)},n["notify"+_0[o]]=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r.notify.apply(r,xi([],Zt(i),!1))}}),n}function See(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 WP=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,D=x.renderState,I,O=xee(),R=new Map,P=new Map,B={},H=Se({},_),z;function q(){!I||!E||(F(),l(I,D,w.style,ie.projection))}function F(){r(ie,D,_,v,w)}function te(){O.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);P.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=s0(w),J=nM(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!!I},mount:function(ne){E=!0,I=ie.current=ne,ie.projection&&ie.projection.mount(ne),J&&b&&!re&&(z=b==null?void 0:b.addVariantChild(ie)),R.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(),zu.update(te),zu.render(q),P.forEach(function(ae){return ae()}),z==null||z(),b==null||b.children.delete(ie),O.clearAllListeners(),I=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 I},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(I,w)},addValue:function(ne,ae){ie.hasValue(ne)&&ie.removeValue(ne),R.set(ne,ae),_[ne]=ae.get(),Y(ne,ae)},removeValue:function(ne){var ae;R.delete(ne),(ae=P.get(ne))===null||ae===void 0||ae(),P.delete(ne),delete _[ne],f(ne,D)},hasValue:function(ne){return R.has(ne)},getValue:function(ne,ae){var le=R.get(ne);return le===void 0&&ae!==void 0&&(le=ec(ae),ie.addValue(ne,le)),le},forEachValue:function(ne){return R.forEach(ne)},readValue:function(ne){var ae;return(ae=_[ne])!==null&&ae!==void 0?ae:c(I,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]}},O),{build:function(){return F(),D},scheduleRender:function(){ki.render(q,!1,!0)},syncRender:q,setProps:function(ne){(ne.transformTemplate||w.transformTemplate)&&ie.scheduleRender(),w=ne,O.updatePropListeners(ne),B=See(ie,g(w),B)},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<Tee;de++){var xe=GP[de],ve=w[xe];(Ci(ve)||ve===!1)&&(le[xe]=ve)}return le}});return ie}},GP=xi(["initial"],Zt(GS),!1),Tee=GP.length;function ZS(e){return typeof e=="string"&&e.startsWith("var(--")}var YP=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Cee(e){var t=YP.exec(e);if(!t)return[,];var n=Zt(t,3),r=n[1],o=n[2];return[r,o]}function eT(e,t,n){var r=Zt(Cee(e),2),o=r[0],i=r[1];if(o){var s=window.getComputedStyle(t).getPropertyValue(o);return s?s.trim():ZS(i)?eT(i,t):i}}function kee(e,t,n){var r,o=Sr(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(ZS(d)){var g=eT(d,i);g&&f.set(g)}});for(var s in o){var l=o[s];if(ZS(l)){var c=eT(l,i);c&&(o[s]=c,n&&((r=n[s])!==null&&r!==void 0||(n[s]=l)))}}return{target:o,transitionEnd:n}}var Nee=new Set(["width","height","top","left","right","bottom","x","y"]),QP=function(e){return Nee.has(e)},_ee=function(e){return Object.keys(e).some(QP)},KP=function(e,t){e.set(t,!1),e.set(t)},JP=function(e){return e===Jl||e===et},XP;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(XP||(XP={}));var ZP=function(e,t){return parseFloat(e.split(", ")[t])},e3=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 ZP(i[1],t);var s=o.match(/^matrix\((.+)\)$/);return s?ZP(s[1],e):0}},Aee=new Set(["x","y","z"]),Oee=wp.filter(function(e){return!Aee.has(e)});function Dee(e){var t=[];return Oee.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 t3={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:e3(4,13),y:e3(5,14)},Iee=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]=t3[f](r,i)}),t.syncRender();var c=t.measureViewportBox();return n.forEach(function(f){var d=t.getValue(f);KP(d,l[f]),e[f]=t3[f](c,i)}),e},Lee=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(QP),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?t0(Lp(b[x])===w):w=Lp(b[x])}else w=Lp(b);if(v!==w)if(JP(v)&&JP(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=Dee(e),s=!0),l.push(d),r[d]=r[d]!==void 0?r[d]:t[d],KP(g,b))}}),l.length){var c=l.indexOf("height")>=0?window.pageYOffset:null,f=Iee(t,e,l);return i.length&&i.forEach(function(d){var g=Zt(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 Ree(e,t,n,r){return _ee(t)?Lee(e,t,n,r):{target:t,transitionEnd:r}}var Fee=function(e,t,n,r){var o=kee(e,t,r);return t=o.target,r=o.transitionEnd,Ree(e,t,n,r)};function Mee(e){return window.getComputedStyle(e)}var n3={treeType:"dom",readValueFromInstance:function(e,t){if(xp(t)){var n=jS(t);return n&&n.default||0}else{var r=Mee(e);return(lM(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 HP(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=Sr(t,["transition","transitionEnd"]),c=qZ(l,i||{},e);if(o&&(s&&(s=o(s)),l&&(l=o(l)),c&&(c=o(c))),r){UZ(e,l,c);var f=Fee(e,l,c,s);s=f.transitionEnd,l=f.target}return Se({transition:i,transitionEnd:s},l)},scrapeMotionValuesFromProps:yS,build:function(e,t,n,r,o){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),mS(t,n,r,o.transformTemplate)},render:TM},Pee=WP(n3),$ee=WP(Se(Se({},n3),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return xp(t)?((n=jS(t))===null||n===void 0?void 0:n.default)||0:(t=CM.has(t)?t:SM(t),e.getAttribute(t))},scrapeMotionValuesFromProps:NM,build:function(e,t,n,r,o){vS(t,n,r,o.transformTemplate)},render:kM})),Vee=function(e,t){return lS(e)?$ee(t,{enableHardwareAcceleration:!1}):Pee(t,{enableHardwareAcceleration:!0})};function r3(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=r3(e,t.target.x),r=r3(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},o3="_$css",jee={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,o=e,i=e.includes("var("),s=[];i&&(e=e.replace(YP,function(w){return s.push(w),o3}));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=ln(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(o3,function(){var w=s[b];return b++,w})}return v}},Uee=function(e){VL(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;cJ(qee),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 Bee(e){var t=Zt(gP(),2),n=t[0],r=t[1],o=k.useContext(oM);return ce.createElement(Uee,Se({},e,{layoutGroup:o,switchLayoutGroup:k.useContext(iM),isPresent:n,safeToRemove:r}))}var qee={borderRadius:Se(Se({},Pp),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Pp,borderTopRightRadius:Pp,borderBottomLeftRadius:Pp,borderBottomRightRadius:Pp,boxShadow:jee},zee={measureLayout:Bee};function Hee(e,t,n){n===void 0&&(n={});var r=Ji(e)?e:ec(e);return qS("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var i3=["TopLeft","TopRight","BottomLeft","BottomRight"],Wee=i3.length,s3=function(e){return typeof e=="string"?parseFloat(e):e},a3=function(e){return typeof e=="number"||et.test(e)};function Gee(e,t,n,r,o,i){var s,l,c,f;o?(e.opacity=ln(0,(s=n.opacity)!==null&&s!==void 0?s:1,Yee(r)),e.opacityExit=ln((l=t.opacity)!==null&&l!==void 0?l:1,0,Qee(r))):i&&(e.opacity=ln((c=t.opacity)!==null&&c!==void 0?c:1,(f=n.opacity)!==null&&f!==void 0?f:1,r));for(var d=0;d<Wee;d++){var g="border".concat(i3[d],"Radius"),m=l3(t,g),v=l3(n,g);if(!(m===void 0&&v===void 0)){m||(m=0),v||(v=0);var b=m===0||v===0||a3(m)===a3(v);b?(e[g]=Math.max(ln(s3(m),s3(v),r),0),(Xi.test(v)||Xi.test(m))&&(e[g]+="%")):e[g]=v}}(t.rotate||n.rotate)&&(e.rotate=ln(t.rotate||0,n.rotate||0,r))}function l3(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}var Yee=c3(0,.5,DS),Qee=c3(.5,.95,AS);function c3(e,t,n){return function(r){return r<e?0:r>t?1:n(Ap(e,t,r))}}function u3(e,t){e.min=t.min,e.max=t.max}function Ni(e,t){u3(e.x,t.x),u3(e.y,t.y)}function f3(e,t,n,r,o){return e-=t,e=k0(e,1/n,r),o!==void 0&&(e=k0(e,1/o,r)),e}function Kee(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=ln(s.min,s.max,t/100);t=l-s.min}if(typeof t=="number"){var c=ln(i.min,i.max,r);e===i&&(c-=t),e.min=f3(e.min,t,n,c,o),e.max=f3(e.max,t,n,c,o)}}function d3(e,t,n,r,o){var i=Zt(n,3),s=i[0],l=i[1],c=i[2];Kee(e,t[s],t[l],t[c],t.scale,r,o)}var Jee=["x","scaleX","originX"],Xee=["y","scaleY","originY"];function p3(e,t,n,r){d3(e.x,t,Jee,n==null?void 0:n.x,r==null?void 0:r.x),d3(e.y,t,Xee,n==null?void 0:n.y,r==null?void 0:r.y)}function h3(e){return e.translate===0&&e.scale===1}function m3(e){return h3(e.x)&&h3(e.y)}function g3(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 Zee=function(){function e(){this.members=[]}return e.prototype.add=function(t){zS(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(HS(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}(),ete="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function v3(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===ete?"none":i}var tte=function(e,t){return e.depth-t.depth},nte=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){zS(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){HS(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(tte),this.isDirty=!1,this.children.forEach(t)},e}(),y3=1e3;function b3(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(lte),d.nodes.forEach(cte)},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([],Zt(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 nte)}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([],Zt(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(ate))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&b&&(m||v)&&this.addEventListener("didUpdate",function(S){var x,C,E,_,D,I=S.delta,O=S.hasLayoutChanged,R=S.hasRelativeTargetChanged,P=S.layout;if(f.isTreeAnimationBlocked()){f.target=void 0,f.relativeTarget=void 0;return}var B=(C=(x=f.options.transition)!==null&&x!==void 0?x:b.getDefaultTransition())!==null&&C!==void 0?C:hte,H=b.getProps(),z=H.onLayoutAnimationStart,q=H.onLayoutAnimationComplete,F=!f.targetLayout||!g3(f.targetLayout,P)||R,te=!O&&R;if(!((E=f.resumeFrom)===null||E===void 0)&&E.instance||te||O&&(F||!f.currentAnimation)){f.resumeFrom&&(f.resumingFrom=f.resumeFrom,f.resumingFrom.resumingFrom=void 0),f.setAnimationOrigin(I,te);var Y=Se(Se({},BS(B,"layout")),{onPlay:z,onComplete:q});b.shouldReduceMotion&&(Y.delay=0,Y.type=!1),f.startAnimation(Y)}else!O&&f.animationProgress===0&&f.finishAnimation(),f.isLead()&&((D=(_=f.options).onExitComplete)===null||D===void 0||D.call(_));f.targetLayout=P})}},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,zu.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(ute))},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(E3);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(mte),this.potentialNodes.clear()),this.nodes.forEach(ste),this.nodes.forEach(rte),this.nodes.forEach(ote),this.clearAllSnapshots(),FS.update(),FS.preRender(),FS.render())},s.prototype.clearAllSnapshots=function(){this.nodes.forEach(ite),this.sharedNodes.forEach(fte)},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));T3(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();T3(d);var g=this.layout;this.layout={measured:d,actual:this.removeElementScroll(d)},this.layoutCorrected=Tr(),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&&!m3(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 Tr();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=Tr();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=Tr();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&&Hu(f,{x:-g.scroll.x,y:-g.scroll.y}),ja(g.latestValues)&&Hu(f,g.latestValues)}return ja(this.latestValues)&&Hu(f,this.latestValues),f},s.prototype.removeTransform=function(l){var c,f=Tr();Ni(f,l);for(var d=0;d<this.path.length;d++){var g=this.path[d];if(g.instance&&ja(g.latestValues)){jP(g.latestValues)&&g.updateSnapshot();var m=Tr(),v=g.measure();Ni(m,v),p3(f,g.latestValues,(c=g.snapshot)===null||c===void 0?void 0:c.layout,m)}}return ja(this.latestValues)&&p3(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=Tr(),this.relativeTargetOrigin=Tr(),Fp(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),Ni(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Tr(),this.targetWithTransforms=Tr()),this.relativeTarget&&this.relativeTargetOrigin&&(!((l=this.relativeParent)===null||l===void 0)&&l.target)?ree(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):Ni(this.target,this.layout.actual),qP(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=Tr(),this.relativeTargetOrigin=Tr(),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),dee(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=v3(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=Tr(),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(pte));this.animationProgress=0,this.mixTargetDelta=function(C){var E,_=C/1e3;w3(b.x,l.x,_),w3(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),dte(f.relativeTarget,f.relativeTargetOrigin,w,_)),N&&(f.animationValues=v,Gee(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&&(zu.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ki.update(function(){Ep.hasAnimatedSinceResize=!0,c.currentAnimation=Hee(0,y3,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,y3),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),Hu(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 Zee);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<cS.length;d++){var g=cS[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=u0(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=u0(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=v3(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 D in a0)if(x[D]!==void 0){var I=a0[D],O=I.correct,R=I.applyTo,P=O(x[D],N);if(R)for(var B=R.length,H=0;H<B;H++)b[R[H]]=P;else b[D]=P}return this.options.layoutId&&(b.pointerEvents=N===this?u0(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(E3),this.root.sharedNodes.clear()},s}()}function rte(e){e.updateLayout()}function ote(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=!m3(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=Tr();Fp(N,i.layout,b.layout);var S=Tr();Fp(S,l,w.actual),g3(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 ite(e){e.clearSnapshot()}function E3(e){e.clearMeasurements()}function ste(e){var t=e.options.visualElement;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function ate(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function lte(e){e.resolveTargetDelta()}function cte(e){e.calcProjection()}function ute(e){e.resetRotation()}function fte(e){e.removeLeadSnapshot()}function w3(e,t,n){e.translate=ln(t.translate,0,n),e.scale=ln(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function x3(e,t,n,r){e.min=ln(t.min,n.min,r),e.max=ln(t.max,n.max,r)}function dte(e,t,n,r){x3(e.x,t.x,n.x,r),x3(e.y,t.y,n.y,r)}function pte(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var hte={duration:.45,ease:[.4,0,.1,1]};function mte(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 S3(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function T3(e){S3(e.x),S3(e.y)}var gte=b3({attachResizeListener:function(e,t){return f0(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),tT={current:void 0},vte=b3({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!tT.current){var e=new gte(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),tT.current=e}return tT.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),yte=Se(Se(Se(Se({},eee),gZ),wee),zee),C3=aJ(function(e,t){return GJ(e,t,yte,Vee,vte)}),k3=k.createContext(null);function bte(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=ln(c.min,c.max,.5);return i===1&&l.layout.max+n>f||i===-1&&l.layout.min+n<f?LZ(e,o,o+i):e}function Ete(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=Sr(e,["children","as","axis","onReorder","values"]),d=Ma(function(){return C3(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(Ste))},updateOrder:function(b,w,N){if(!m.current){var S=bte(g,b,w,N);g!==S&&(m.current=!0,l(S.map(xte).filter(function(x){return c.indexOf(x)!==-1})))}}};return k.useEffect(function(){m.current=!1}),k.createElement(d,Se({},f,{ref:t}),k.createElement(k3.Provider,{value:v},n))}var wte=k.forwardRef(Ete);function xte(e){return e.value}function Ste(e,t){return e.layout.min-t.layout.min}function N3(e){var t=Ma(function(){return ec(e)}),n=k.useContext(n0).isStatic;if(n){var r=Zt(k.useState(e),2),o=r[1];k.useEffect(function(){return t.onChange(o)},[])}return t}var Tte=function(e){return typeof e=="object"&&e.mix},Cte=function(e){return Tte(e)?e.mix:void 0};function kte(){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=NS(i,s,Se({mixer:Cte(s[0])},l));return n?c(o):c}function Nte(e,t){sS(function(){var n=e.map(function(r){return r.onChange(t)});return function(){return n.forEach(function(r){return r()})}})}function _te(e,t){var n=N3(t()),r=function(){return n.set(t())};return r(),Nte(e,function(){return ki.update(r,!1,!0)}),n}function Ate(e,t,n,r){var o=typeof t=="function"?t:kte(t,n,r);return Array.isArray(e)?_3(e,o):_3([e],function(i){var s=Zt(i,1),l=s[0];return o(l)})}function _3(e,t){var n=Ma(function(){return[]});return _te(e,function(){n.length=0;for(var r=e.length,o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function A3(e,t){return t===void 0&&(t=0),Ji(e)?e:N3(t)}function Ote(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=Sr(e,["children","style","value","as","onDrag","layout"]),g=Ma(function(){return C3(s)}),m=k.useContext(k3),v={x:A3(r==null?void 0:r.x),y:A3(r==null?void 0:r.y)},b=Ate([v.x,v.y],function(E){var _=Zt(E,2),D=_[0],I=_[1];return D||I?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 D=_.velocity;D[S]&&C(o,v[S].get(),D[S]),l==null||l(E,_)},onLayoutMeasure:function(E){w.current=E},ref:t}),n)}var Dte=k.forwardRef(Ote),O3={Group:wte,Item:Dte};const[A0,vje]=zl("Tooltip",[$v]),nT=$v(),Ite="TooltipProvider",Lte=700,rT="tooltip.open",[Rte,oT]=A0(Ite),Fte=e=>{const{__scopeTooltip:t,delayDuration:n=Lte,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(Rte,{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)},iT="Tooltip",[Mte,$p]=A0(iT),Pte=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=e,c=oT(iT,e.__scopeTooltip),f=nT(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]=wv({prop:r,defaultProp:o,onChange:I=>{I?(c.onOpen(),document.dispatchEvent(new CustomEvent(rT))):c.onClose(),i==null||i(I)}}),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]),D=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(VR,f,k.createElement(Mte,{scope:t,contentId:m,open:S,stateAttribute:C,trigger:d,onTriggerChange:g,onTriggerEnter:k.useCallback(()=>{c.isOpenDelayed?D():E()},[c.isOpenDelayed,D,E]),onTriggerLeave:k.useCallback(()=>{b?_():window.clearTimeout(v.current)},[_,b]),onOpen:E,onClose:_,disableHoverableContent:b},n))},D3="TooltipTrigger",$te=k.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$p(D3,n),i=oT(D3,n),s=nT(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(jR,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)})))}),I3="TooltipPortal",[Vte,jte]=A0(I3,{forceMount:void 0}),Ute=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=$p(I3,t);return k.createElement(Vte,{scope:t,forceMount:n},k.createElement(Da,{present:n||i.open},k.createElement(gx,{asChild:!0,container:o},r)))},Vp="TooltipContent",Bte=k.forwardRef((e,t)=>{const n=jte(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(L3,Ze({side:o},i,{ref:t})):k.createElement(qte,Ze({side:o},i,{ref:t})))}),qte=k.forwardRef((e,t)=>{const n=$p(Vp,e.__scopeTooltip),r=oT(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=Hte(S,N.getBoundingClientRect()),C=Wte(S,x),E=Gte(w.getBoundingClientRect()),_=Qte([...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=!Yte(S,s);x?m():C&&(m(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,s,f,m]),k.createElement(L3,Ze({},e,{ref:i}))}),[zte,yje]=A0(iT,{isInside:!1}),L3=k.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,c=$p(Vp,n),f=nT(n),{onClose:d}=c;return k.useEffect(()=>(document.addEventListener(rT,d),()=>document.removeEventListener(rT,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(px,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:g=>g.preventDefault(),onDismiss:d},k.createElement(UR,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(kL,null,r),k.createElement(zte,{scope:n,isInside:!0},k.createElement(fR,{id:c.contentId,role:"tooltip"},o||r))))});function Hte(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 Wte(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 Gte(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 Yte(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 Qte(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),Kte(t)}function Kte(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 Jte=Fte,Xte=Pte,Zte=$te,ene=Ute,tne=Bte;function Wu(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 sT(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}const nne=(e,t)=>Math.abs(e-t)<1,rne=e=>e,one=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},ine=(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)}},sne=(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)}},ane=(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"])},lne=(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 cne{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:rne,rangeExtractor:one,onChange:()=>{},measureElement:ane,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=Wu(()=>(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=Wu(()=>[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=Wu(()=>[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=Wu(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,r,o)=>this.range=n.length>0&&r>0?une({measurements:n,outerSize:r,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Wu(()=>[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=Wu(()=>[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 sT(r[R3(0,r.length-1,o=>sT(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=sT(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);nne(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 R3=(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 une({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,i=R3(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 fne=typeof document<"u"?k.useLayoutEffect:k.useEffect;function dne(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 cne(n));return r.setOptions(n),k.useEffect(()=>r._didMount(),[]),fne(()=>r._willUpdate()),r}function pne(e){return dne({observeElementRect:ine,observeElementOffset:sne,scrollToFn:lne,...e})}var hne=Object.defineProperty,mne=(e,t,n)=>t in e?hne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aT=(e,t,n)=>(mne(e,typeof t!="symbol"?t+"":t,n),n);let gne=class{constructor(){aT(this,"current",this.detect()),aT(this,"handoffState","pending"),aT(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 gne,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 lT(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 vne(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 yne(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function O0(){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 yne(()=>{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=O0();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 cT(){let[e]=k.useState(O0);return k.useEffect(()=>()=>e.dispose(),[e]),e}function bne(){let e=typeof document>"u";return"useSyncExternalStore"in V1?(t=>t.useSyncExternalStore)(V1)(()=>()=>{},()=>!1,()=>!e):!1}function Ene(){let e=bne(),[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 F3;let Up=(F3=ce.useId)!=null?F3:function(){let e=Ene(),[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 uT(e){return nc.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let M3=["[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 wne=(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))(wne||{}),xne=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xne||{}),Sne=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Sne||{}),P3=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(P3||{});function Tne(e,t=0){var n;return e===((n=uT(e))==null?void 0:n.body)?!1:Vs(t,{0(){return e.matches(M3)},1(){let r=e;for(;r!==null;){if(r.matches(M3))return!0;r=r.parentElement}return!1}})}var Cne=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Cne||{});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 kne(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 Nne(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _ne(){return/Android/gi.test(window.navigator.userAgent)}function $3(){return Nne()||_ne()}function D0(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 Ane(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 One(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!Tne(c,P3.Loose)&&c.tabIndex!==-1&&s.preventDefault(),t(s,c)}let i=k.useRef(null);D0("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),D0("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),D0("click",s=>{$3()||i.current&&(o(s,()=>i.current),i.current=null)},!0),D0("touchend",s=>o(s,()=>s.target instanceof HTMLElement?s.target:null),!0),Ane("blur",s=>o(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Dne(...e){return k.useMemo(()=>uT(...e),[...e])}function V3(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 Ine(e,t){let[n,r]=k.useState(()=>V3(e));return Ur(()=>{r(V3(e))},[e.type,e.as]),Ur(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let Lne=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[Lne]))?void 0:n}function j3(e){return[e.screenX,e.screenY]}function Rne(){let e=k.useRef([-1,-1]);return{wasMoved(t){let n=j3(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=j3(t)}}}function Fne({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=uT(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 U3(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 B3(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var fT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(fT||{}),Mne=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Mne||{});function rc({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:l}){l=l??Pne;let c=q3(t,e);if(i)return I0(c,n,r,s,l);let f=o??0;if(f&2){let{static:d=!1,...g}=c;if(d)return I0(g,n,r,s,l)}if(f&1){let{unmount:d=!0,...g}=c;return Vs(d?0:1,{0(){return null},1(){return I0({...g,hidden:!0,style:{display:"none"}},n,r,s,l)}})}return I0(c,n,r,s,l)}function I0(e,t={},n,r,o){let{as:i=n,children:s,refName:l="ref",...c}=pT(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(dT(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)=>B3(m==null?void 0:m.className(...w),c.className):B3(m==null?void 0:m.className,c.className),b=v?{className:v}:{};return k.cloneElement(d,Object.assign({},q3(d.props,dT(pT(c,["ref"]))),g,f,{ref:o(d.ref,f.ref)},b))}return k.createElement(i,Object.assign({},pT(c,["ref"]),i!==k.Fragment&&f,i!==k.Fragment&&g),d)}function Pne(...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 q3(...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 dT(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function pT(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let $ne="div";var z3=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(z3||{});function Vne(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:$ne,name:"Hidden"})}let jne=oc(Vne),hT=k.createContext(null);hT.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 Une(){return k.useContext(hT)}function Bne({value:e,children:t}){return ce.createElement(hT.Provider,{value:e},t)}function qne(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let ic=[];qne(()=>{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 zne(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&&Hne(n)?!1:r}function Hne(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function Wne(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 H3(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:Wne(e)}}function W3(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Y3(n,G3(t,r),o);return n}function G3(e,t){return e?e+"["+t+"]":t}function Y3(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Y3(e,G3(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,""]):W3(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||{}),Gne=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Gne||{}),Yne=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Yne||{}),Qne=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Qne||{}),Kne=(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))(Kne||{});function mT(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):kne(r,s=>s.dataRef.current.domRef.current),i=n?o.indexOf(n):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let Jne={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:H3(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=mT(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:H3(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=mT(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=mT(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})}}},gT=k.createContext(null);gT.displayName="ComboboxActionsContext";function zp(e){let t=k.useContext(gT);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 Q3=k.createContext(null);function Xne(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=pne({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(Q3.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 vT=k.createContext(null);vT.displayName="ComboboxDataContext";function sc(e){let t=k.useContext(vT);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 Zne(e,t){return Vs(t.type,Jne,e,t)}let ere=k.Fragment;function tre(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]=vne(n,o,r),[C,E]=k.useReducer(Zne,{dataRef:k.createRef(),comboboxState:f?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),_=k.useRef(!1),D=k.useRef({static:!1,hold:!1}),I=k.useRef(null),O=k.useRef(null),R=k.useRef(null),P=k.useRef(null),B=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=>B(qe.dataRef.current.value,ve))),z=k.useCallback(ve=>Vs(F.mode,{1:()=>S.some(qe=>B(qe,ve)),0:()=>B(S,ve)}),[S]),q=kt(ve=>C.activeOptionIndex===H(ve)),F=k.useMemo(()=>({...C,immediate:w,optionsPropsRef:D,labelRef:I,inputRef:O,buttonRef:R,optionsRef:P,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:B,isSelected:z,isActive:q,nullable:d,__demoMode:f}),[S,r,c,g,d,f,C,N]);Ur(()=>{},[N,void 0]),Ur(()=>{C.dataRef.current=F},[F]),One([F.buttonRef,F.inputRef,F.optionsRef],()=>ae.closeCombobox(),F.comboboxState===0);let te=k.useMemo(()=>{var ve,qe,Ie;return{open:F.comboboxState===0,disabled:c,activeIndex:F.activeOptionIndex,activeOption:F.activeOptionIndex===null?null:F.virtual?F.virtual.options[(ve=F.activeOptionIndex)!=null?ve:0]:(Ie=(qe=F.options[F.activeOptionIndex])==null?void 0:qe.dataRef.current.value)!=null?Ie:null,value:S}},[F,c,S]),Y=kt(()=>{if(F.activeOptionIndex!==null){if(F.virtual)ie(F.virtual.options[F.activeOptionIndex]);else{let{dataRef:ve}=F.options[F.activeOptionIndex];ie(ve.current.value)}ae.goToOption(Vn.Specific,F.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}}),()=>{F.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(F.mode,{0(){return x==null?void 0:x(ve)},1(){let qe=F.value.slice(),Ie=qe.findIndex(Ae=>B(Ae,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=cT();return k.useEffect(()=>{de.current&&r!==void 0&&xe.addEventListener(de.current,"reset",()=>{x==null||x(r)})},[de,x]),ce.createElement(gT.Provider,{value:ae},ce.createElement(vT.Provider,{value:F},ce.createElement(Bne,{value:Vs(F.comboboxState,{0:qp.Open,1:qp.Closed})},s!=null&&S!=null&&W3({[s]:S}).map(([ve,qe],Ie)=>ce.createElement(jne,{features:z3.Hidden,ref:Ie===0?Ae=>{var it;de.current=(it=Ae==null?void 0:Ae.closest("form"))!=null?it:null}:void 0,...dT({key:ve,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,name:ve,value:qe})})),rc({ourProps:le,theirProps:b,slot:te,defaultTag:ere,name:"Combobox"}))))}let nre="input";function rre(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=Dne(v.inputRef),S=k.useRef(!1),x=cT(),C=kt(()=>{b.onChange(null),v.optionsRef.current&&(v.optionsRef.current.scrollTop=0),b.goToOption(Vn.Nothing)}),E=function(){var F;return typeof d=="function"&&v.value!==void 0?(F=d(v.value))!=null?F:"":typeof v.value=="string"?v.value:""}();U3(([F,te],[Y,Q])=>{if(S.current)return;let K=v.inputRef.current;K&&((Q===0&&te===1||F!==Y)&&(K.value=F),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]),U3(([F],[te])=>{if(F===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),D=kt(()=>{_.current=!0}),I=kt(()=>{x.nextFrame(()=>{_.current=!1})}),O=kt(F=>{switch(S.current=!0,F.key){case Co.Enter:if(S.current=!1,v.comboboxState!==0||_.current)return;if(F.preventDefault(),F.stopPropagation(),v.activeOptionIndex===null){b.closeCombobox();return}b.selectActiveOption(),v.mode===0&&b.closeCombobox();break;case Co.ArrowDown:return S.current=!1,F.preventDefault(),F.stopPropagation(),Vs(v.comboboxState,{0:()=>b.goToOption(Vn.Next),1:()=>b.openCombobox()});case Co.ArrowUp:return S.current=!1,F.preventDefault(),F.stopPropagation(),Vs(v.comboboxState,{0:()=>b.goToOption(Vn.Previous),1:()=>{b.openCombobox(),x.nextFrame(()=>{v.value||b.goToOption(Vn.Last)})}});case Co.Home:if(F.shiftKey)break;return S.current=!1,F.preventDefault(),F.stopPropagation(),b.goToOption(Vn.First);case Co.PageUp:return S.current=!1,F.preventDefault(),F.stopPropagation(),b.goToOption(Vn.First);case Co.End:if(F.shiftKey)break;return S.current=!1,F.preventDefault(),F.stopPropagation(),b.goToOption(Vn.Last);case Co.PageDown:return S.current=!1,F.preventDefault(),F.stopPropagation(),b.goToOption(Vn.Last);case Co.Escape:return S.current=!1,v.comboboxState!==0?void 0:(F.preventDefault(),v.optionsRef.current&&!v.optionsPropsRef.current.static&&F.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}}),R=kt(F=>{f==null||f(F),v.nullable&&v.mode===0&&F.target.value===""&&C(),b.openCombobox()}),P=kt(F=>{var te,Y,Q;let K=(te=F.relatedTarget)!=null?te:ic.find(Z=>Z!==F.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 F.preventDefault(),v.mode===0&&(v.nullable&&v.value===null?C():v.activationTrigger!==1&&b.selectActiveOption()),b.closeCombobox()}),B=kt(F=>{var te,Y,Q;let K=(te=F.relatedTarget)!=null?te:ic.find(Z=>Z!==F.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=lT(()=>{if(v.labelId)return[v.labelId].join(" ")},[v.labelId]),z=k.useMemo(()=>({open:v.comboboxState===0,disabled:v.disabled}),[v]),q={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(F=>{var te;return!((te=v.virtual)!=null&&te.disabled(F.dataRef.current.value))&&v.compare(F.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:D,onCompositionEnd:I,onKeyDown:O,onChange:R,onFocus:B,onBlur:P};return rc({ourProps:q,theirProps:m,slot:z,defaultTag:nre,name:"Combobox.Input"})}let ore="button";function ire(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=cT(),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(zne(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=lT(()=>{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:Ine(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:ore,name:"Combobox.Button"})}let sre="label";function are(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:sre,name:"Combobox.Label"})}let lre="ul",cre=fT.RenderStrategy|fT.Static;function ure(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=Une(),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]),Fne({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=lT(()=>{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(Xne,null,i.children)}),rc({ourProps:m,theirProps:i,slot:g,defaultTag:lre,features:cre,visible:f,name:"Combobox.Options"})}let fre="li";function dre(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(Q3),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 P=O0();return P.requestAnimationFrame(()=>{x.current=!0}),P.dispose},[f.virtual,f.__demoMode]),Ur(()=>{if(!x.current||f.comboboxState!==0||!g||f.activationTrigger===0)return;let P=O0();return P.requestAnimationFrame(()=>{var B,H;(H=(B=v.current)==null?void 0:B.scrollIntoView)==null||H.call(B,{block:"nearest"})}),P.dispose},[v,g,f.comboboxState,f.activationTrigger,f.activeOptionIndex]);let C=kt(P=>{var B;if(i||(B=f.virtual)!=null&&B.disabled(s))return P.preventDefault();S(),$3()||requestAnimationFrame(()=>{var H;return(H=f.inputRef.current)==null?void 0:H.focus({preventScroll:!0})}),f.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),E=kt(()=>{var P;if(i||(P=f.virtual)!=null&&P.disabled(s))return d.goToOption(Vn.Nothing);let B=f.calculateIndex(s);d.goToOption(Vn.Specific,B)}),_=Rne(),D=kt(P=>_.update(P)),I=kt(P=>{var B;if(!_.wasMoved(P)||i||(B=f.virtual)!=null&&B.disabled(s)||g)return;let H=f.calculateIndex(s);d.goToOption(Vn.Specific,H,0)}),O=kt(P=>{var B;_.wasMoved(P)&&(i||(B=f.virtual)!=null&&B.disabled(s)||g&&(f.optionsPropsRef.current.hold||d.goToOption(Vn.Nothing)))}),R=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:D,onMouseEnter:D,onPointerMove:I,onMouseMove:I,onPointerLeave:O,onMouseLeave:O},theirProps:c,slot:R,defaultTag:fre,name:"Combobox.Option"})}let pre=oc(tre),hre=oc(ire),mre=oc(rre),gre=oc(are),vre=oc(ure),yre=oc(dre),Gu=Object.assign(pre,{Input:mre,Button:hre,Label:gre,Options:vre,Option:yre});var bre=Object.defineProperty,fe=(e,t)=>bre(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 K3=Ba("StorageContext");function J3(e){const t=k.useRef(!0),[n,r]=k.useState(new Yw(e.storage));return k.useEffect(()=>{t.current?t.current=!1:r(new Yw(e.storage))},[e.storage]),W.jsx(K3.Provider,{value:n,children:e.children})}fe(J3,"StorageContextProvider");const za=qa(K3),Ere=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"),wre=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"),xre=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"),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:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronUp"),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:"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"),Cre=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"),kre=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"),Nre=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"),_re=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"),Are=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"),Ore=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"),Dre=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"),Ire=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"),Lre=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"),Rre=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"),Fre=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"),Mre=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"),Pre=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"),$re=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"),Vre=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"),jre=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"),Ure=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"),Bre=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"),qre=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"),zre=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"),Hre=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"),Wre=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"),Gre=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"),Yre=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"),Qre=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"),Kre=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"),Jre=wt(Ere),Xre=wt(wre),Zre=wt(xre),eoe=wt(Sre),yT=wt(Tre),toe=wt(Cre),noe=wt(kre),roe=wt(Nre),ooe=wt(_re),ioe=wt(Are),soe=wt(Ore,"filled docs icon"),aoe=wt(Dre),loe=wt(Ire),coe=wt(Lre),uoe=wt(Rre),foe=wt(Fre),doe=wt(Mre),poe=wt(Pre),hoe=wt($re),moe=wt(Vre),goe=wt(jre),voe=wt(Ure),yoe=wt(Bre),boe=wt(qre),Eoe=wt(zre),woe=wt(Hre),xoe=wt(Wre,"filled star icon"),Soe=wt(Gre),Toe=wt(Yre),Coe=wt(Qre,"trash icon"),L0=wt(Kre);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 bT=k.forwardRef((e,t)=>W.jsx("div",{...e,ref:t,className:Gn("graphiql-button-group",e.className)}));bT.displayName="ButtonGroup";const Hp=fe((e,t)=>Object.entries(t).reduce((n,[r,o])=>(n[r]=o,n),e),"createComponentGroup"),X3=k.forwardRef((e,t)=>W.jsx(rW,{asChild:!0,children:W.jsxs(jn,{...e,ref:t,type:"button",className:Gn("graphiql-dialog-close",e.className),children:[W.jsx(fR,{children:"Close dialog"}),W.jsx(yT,{})]})}));X3.displayName="Dialog.Close";function Z3({children:e,...t}){return W.jsx(KH,{...t,children:W.jsxs(XH,{children:[W.jsx(ZH,{className:"graphiql-dialog-overlay"}),W.jsx(eW,{className:"graphiql-dialog",children:e})]})})}fe(Z3,"DialogRoot");const Yu=Hp(Z3,{Close:X3,Title:tW,Trigger:JH,Description:nW}),e$=k.forwardRef((e,t)=>W.jsx(lY,{asChild:!0,children:W.jsx("button",{...e,ref:t,className:Gn("graphiql-un-styled",e.className)})}));e$.displayName="DropdownMenuButton";function t$({children:e,align:t="start",sideOffset:n=5,className:r,...o}){return W.jsx(cY,{children:W.jsx(uY,{align:t,sideOffset:n,className:Gn("graphiql-dropdown-content",r),...o,children:e})})}fe(t$,"Content");const koe=fe(({className:e,children:t,...n})=>W.jsx(fY,{className:Gn("graphiql-dropdown-item",e),...n,children:t}),"Item"),Ha=Hp(aY,{Button:e$,Item:koe,Content:t$}),R0=new jK({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:R0.render(e)}}));es.displayName="MarkdownContent";const ET=k.forwardRef((e,t)=>W.jsx("div",{...e,ref:t,className:Gn("graphiql-spinner",e.className)}));ET.displayName="Spinner";function n$({children:e,align:t="start",side:n="bottom",sideOffset:r=5,label:o}){return W.jsxs(Xte,{children:[W.jsx(Zte,{asChild:!0,children:e}),W.jsx(ene,{children:W.jsx(tne,{className:"graphiql-tooltip",align:t,side:n,sideOffset:r,children:o})})]})}fe(n$,"TooltipRoot");const Cr=Hp(n$,{Provider:Jte}),r$=k.forwardRef(({isActive:e,value:t,children:n,className:r,...o},i)=>W.jsx(O3.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}));r$.displayName="Tab";const o$=k.forwardRef((e,t)=>W.jsx(jn,{...e,ref:t,type:"button",className:Gn("graphiql-tab-button",e.className),children:e.children}));o$.displayName="Tab.Button";const i$=k.forwardRef((e,t)=>W.jsx(Cr,{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(yT,{})})}));i$.displayName="Tab.Close";const wT=Hp(r$,{Button:o$,Close:i$}),s$=k.forwardRef(({values:e,onReorder:t,children:n,className:r,...o},i)=>W.jsx(O3.Group,{...o,ref:i,values:e,onReorder:t,axis:"x",role:"tablist",className:Gn("graphiql-tabs",r),children:n}));s$.displayName="Tabs";const a$=Ba("HistoryContext");function l$(e){var t;const n=za(),r=k.useRef(new kq(n||new Yw(null),e.maxHistoryLength||Noe)),[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(a$.Provider,{value:g,children:e.children})}fe(l$,"HistoryContextProvider");const F0=qa(a$),Noe=20;function c$(){const{items:e,deleteFromHistory:t}=F0({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(c$,"History");function Wp(e){const{editLabel:t,toggleFavorite:n,deleteFromHistory:r,setActive:o}=F0({nonNull:!0,caller:Wp}),{headerEditor:i,queryEditor:s,variableEditor:l}=Kn({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||u$(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(yT,{})})]}):W.jsxs(W.Fragment,{children:[W.jsx(Cr,{label:"Set active",children:W.jsx(jn,{type:"button",className:"graphiql-history-item-label",onClick:N,"aria-label":"Set active",children:m})}),W.jsx(Cr,{label:"Edit label",children:W.jsx(jn,{type:"button",className:"graphiql-history-item-action",onClick:w,"aria-label":"Edit label",children:W.jsx(moe,{"aria-hidden":"true"})})}),W.jsx(Cr,{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(xoe,{"aria-hidden":"true"}):W.jsx(Soe,{"aria-hidden":"true"})})}),W.jsx(Cr,{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(Coe,{"aria-hidden":"true"})})})]})})}fe(Wp,"HistoryItem");function u$(e){return e==null?void 0:e.split(`
`).map(t=>t.replace(/#(.*)/,"")).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")}fe(u$,"formatQuery");const f$=Ba("ExecutionContext");function M0({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}=Kn({nonNull:!0,caller:M0}),d=F0(),g=G0({getDefaultFieldNames:t,caller:M0}),[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 D=N.current;let I=g()||s.getValue();const O=c==null?void 0:c.getValue();let R;try{R=xT({json:O,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(z){_(z instanceof Error?z.message:`${z}`);return}const P=i==null?void 0:i.getValue();let B;try{B=xT({json:P,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?sz(s.documentAST,o):[];z.length>0&&(I+=`
`+z.map(q=>ft(q)).join(`
`))}_(""),v(!0);const H=r??s.operationName??void 0;d==null||d.addToHistory({query:I,variables:O,headers:P,operationName:H});try{let z={data:{}};const q=fe(Y=>{if(D!==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}`);Az(K.data,J,ie,{merge:!0})}else ie&&(K.data=ie);z={...K,...ae}}v(!1),_(Gw(z))}else{const K=Gw(Y);v(!1),_(K)}},"handleResponse"),F=e({query:I,variables:R,operationName:H},{headers:B??void 0,documentAST:s.documentAST??void 0}),te=await Promise.resolve(F);if(iI(te))w(te.subscribe({next(Y){q(Y)},error(Y){v(!1),Y&&_(op(Y)),w(null)},complete(){v(!1),w(null)}}));else if(sI(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)q(Y);v(!1),w(null)}else q(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(f$.Provider,{value:E,children:n})}fe(M0,"ExecutionContextProvider");const Qu=qa(f$);function xT({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(xT,"tryParseJsonObject");const P0="graphiql",$0="sublime";let d$=!1;typeof window=="object"&&(d$=window.navigator.platform.toLowerCase().indexOf("mac")===0);const V0={[d$?"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 Ku(e,t){const n=await Promise.resolve().then(()=>wce).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(()=>Tce).then(r=>r.s),Promise.resolve().then(()=>Ace).then(r=>r.m),Promise.resolve().then(()=>Ice).then(r=>r.c),Promise.resolve().then(()=>i6).then(r=>r.b),Promise.resolve().then(()=>u6).then(r=>r.f),Promise.resolve().then(()=>jce).then(r=>r.l),Promise.resolve().then(()=>g6).then(r=>r.s),Promise.resolve().then(()=>w6).then(r=>r.j),Promise.resolve().then(()=>y6).then(r=>r.d),Promise.resolve().then(()=>T6).then(r=>r.s),...e]),n}fe(Ku,"importCodeMirror");const _oe=fe(e=>e?ft(e):"","printDefault");function ST({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:_oe(t)})]}):null}fe(ST,"DefaultValue");const p$=Ba("SchemaContext");function TT(e){if(!e.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:t,headerEditor:n}=Kn({nonNull:!0,caller:TT}),[r,o]=k.useState(),[i,s]=k.useState(!1),[l,c]=k.useState(null),f=k.useRef(0);k.useEffect(()=>{o(Mg(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}=h$({inputValueDeprecation:e.inputValueDeprecation,introspectionQueryName:e.introspectionQueryName,schemaDescription:e.schemaDescription}),{fetcher:b,onSchemaChange:w,dangerouslyAssumeSchemaIsValid:N,children:S}=e,x=k.useCallback(()=>{if(Mg(e.schema)||e.schema===null)return;const _=++f.current,D=e.schema;async function I(){if(D)return D;const O=m$(d.current);if(!O.isValidJSON){c("Introspection failed as headers are invalid.");return}const R=O.headers?{headers:O.headers}:{},P=aI(b({query:g,operationName:m},R));if(!oI(P)){c("Fetcher did not return a Promise for introspection.");return}s(!0),c(null);let B=await P;if(typeof B!="object"||B===null||!("data"in B)){const z=aI(b({query:v,operationName:m},R));if(!oI(z))throw new Error("Fetcher did not return a Promise for introspection.");B=await z}if(s(!1),B!=null&&B.data&&"__schema"in B.data)return B.data;const H=typeof B=="string"?B:Gw(B);c(H)}fe(I,"fetchIntrospectionData"),I().then(O=>{if(!(_!==f.current||!O))try{const R=Vw(O);o(R),w==null||w(R)}catch(R){c(op(R))}}).catch(O=>{_===f.current&&(c(op(O)),s(!1))})},[b,m,g,v,w,e.schema]);k.useEffect(()=>{x()},[x]),k.useEffect(()=>{function _(D){D.ctrlKey&&D.key==="R"&&x()}return fe(_,"triggerIntrospection"),window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)});const C=k.useMemo(()=>!r||N?[]:Pg(r),[r,N]),E=k.useMemo(()=>({fetchError:l,introspect:x,isFetching:i,schema:r,validationErrors:C}),[l,x,i,r,C]);return W.jsx(p$.Provider,{value:E,children:S})}fe(TT,"SchemaContextProvider");const Ai=qa(p$);function h$({inputValueDeprecation:e,introspectionQueryName:t,schemaDescription:n}){return k.useMemo(()=>{const r=t||"IntrospectionQuery";let o=rv({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(h$,"useIntrospectionQuery");function m$(e){let t=null,n=!0;try{e&&(t=JSON.parse(e))}catch{n=!1}return{headers:t,isValidJSON:n}}fe(m$,"parseHeaderString");const j0={name:"Docs"},g$=Ba("ExplorerContext");function CT(e){const{schema:t,validationErrors:n}=Ai({nonNull:!0,caller:CT}),[r,o]=k.useState([j0]),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:[j0])},[]);k.useEffect(()=>{t==null||n.length>0?l():o(f=>{if(f.length===1)return f;const d=[j0];let g=null;for(const m of f)if(m!==j0)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(We(g)||gt(g)){const v=g.getFields()[m.name];if(v)d.push({name:m.name,def:v});else break}else{if(or(g)||Rt(g)||Je(g)||Mt(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(g$.Provider,{value:c,children:e.children})}fe(CT,"ExplorerContextProvider");const Wa=qa(g$);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 Oi(e){const{push:t}=Wa({nonNull:!0,caller:Oi});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(Oi,"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(Oi,{type:e.type}),t!==!1&&W.jsx(ST,{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 kT(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(kT,"DeprecationReason");function v$({directive:e}){return W.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",e.name.value]})}fe(v$,"Directive");function ko(e){const t=Aoe[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 Aoe={Arguments:Jre,"Deprecated Arguments":noe,"Deprecated Enum Values":roe,"Deprecated Fields":ooe,Directives:ioe,"Enum Values":loe,Fields:coe,Implements:foe,Implementations:L0,"Possible Types":L0,"Root Types":Eoe,Type:L0,"All Schema Types":L0};function y$(e){return W.jsxs(W.Fragment,{children:[e.field.description?W.jsx(es,{type:"description",children:e.field.description}):null,W.jsx(kT,{preview:!1,children:e.field.deprecationReason}),W.jsx(ko,{title:"Type",children:W.jsx(Oi,{type:e.field.type})}),W.jsx(b$,{field:e.field}),W.jsx(E$,{field:e.field})]})}fe(y$,"FieldDocumentation");function b$({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(b$,"Arguments");function E$({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(v$,{directive:r})},r.name.value))})}fe(E$,"Directives");function w$(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(Oi,{type:i})]}):null,s&&W.jsxs("div",{children:[W.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",W.jsx(Oi,{type:s})]}),l&&W.jsxs("div",{children:[W.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",W.jsx(Oi,{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(Oi,{type:d})},d.name))})})]})}fe(w$,"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 NT(){const{explorerNavStack:e,push:t}=Wa({nonNull:!0,caller:NT}),n=k.useRef(null),r=U0(),[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||We(f.def)||Je(f.def)||gt(f.def)?W.jsxs(Gu,{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(poe,{}),W.jsx(Gu.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(Gu.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(Gu.Option,{value:v,"data-cy":"doc-explorer-option",children:W.jsx(_T,{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(Gu.Option,{value:v,"data-cy":"doc-explorer-option",children:W.jsx(q0,{type:v.type})},`type-${b}`)),s.fields.map((v,b)=>W.jsxs(Gu.Option,{value:v,"data-cy":"doc-explorer-option",children:[W.jsx(q0,{type:v.type}),".",W.jsx(_T,{field:v.field,argument:v.argument})]},`field-${b}`))]})]}):null}fe(NT,"Search");function U0(e){const{explorerNavStack:t}=Wa({nonNull:!0,caller:e||U0}),{schema:n}=Ai({nonNull:!0,caller:e||U0}),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&&B0(f,o)&&i.types.push({type:d}),!We(d)&&!Je(d)&&!gt(d))continue;const g=d.getFields();for(const m in g){const v=g[m];let b;if(!B0(m,o))if("args"in v){if(b=v.args.filter(w=>B0(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(U0,"useSearchResults");function B0(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(B0,"isMatch");function q0(e){return W.jsx("span",{className:"graphiql-doc-explorer-search-type",children:e.type.name})}fe(q0,"Type");function _T({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(q0,{type:n})),")"]}):null]})}fe(_T,"Field$1");function x$(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(x$,"FieldLink");function S$(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(T$,{type:e.type}),W.jsx(C$,{type:e.type}),W.jsx(k$,{type:e.type}),W.jsx(N$,{type:e.type})]}):null}fe(S$,"TypeDocumentation");function T$({type:e}){return We(e)&&e.getInterfaces().length>0?W.jsx(ko,{title:"Implements",children:e.getInterfaces().map(t=>W.jsx("div",{children:W.jsx(Oi,{type:t})},t.name))}):null}fe(T$,"ImplementsInterfaces");function C$({type:e}){const[t,n]=k.useState(!1),r=k.useCallback(()=>{n(!0)},[]);if(!We(e)&&!Je(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(AT,{field:l},l.name))}):null,s.length>0?t||i.length===0?W.jsx(ko,{title:"Deprecated Fields",children:s.map(l=>W.jsx(AT,{field:l},l.name))}):W.jsx(_i,{type:"button",onClick:r,children:"Show Deprecated Fields"}):null]})}fe(C$,"Fields");function AT({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(x$,{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(Oi,{type:e.type}),W.jsx(ST,{field:e})]}),e.description?W.jsx(es,{type:"description",onlyShowFirstChild:!0,children:e.description}):null,W.jsx(kT,{children:e.deprecationReason})]})}fe(AT,"Field");function k$({type:e}){const[t,n]=k.useState(!1),r=k.useCallback(()=>{n(!0)},[]);if(!Rt(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(OT,{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(OT,{value:s},s.name))}):W.jsx(_i,{type:"button",onClick:r,children:"Show Deprecated Values"}):null]})}fe(k$,"EnumValues");function OT({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(OT,"EnumValue");function N$({type:e}){const{schema:t}=Ai({nonNull:!0});return!t||!sn(e)?null:W.jsx(ko,{title:Je(e)?"Implementations":"Possible Types",children:t.getPossibleTypes(e).map(n=>W.jsx("div",{children:W.jsx(Oi,{type:n})},n.name))})}fe(N$,"PossibleTypes");function z0(){const{fetchError:e,isFetching:t,schema:n,validationErrors:r}=Ai({nonNull:!0,caller:z0}),{explorerNavStack:o,pop:i}=Wa({nonNull:!0,caller:z0}),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(ET,{}):n?o.length===1?l=W.jsx(w$,{schema:n}):Eu(s.def)?l=W.jsx(S$,{type:s.def}):s.def&&(l=W.jsx(y$,{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(Zre,{}),c]}),W.jsx("div",{className:"graphiql-doc-explorer-title",children:s.name})]}),W.jsx(NT,{},s.name)]}),W.jsx("div",{className:"graphiql-doc-explorer-content",children:l})]})}fe(z0,"DocExplorer");const Qp={title:"Documentation Explorer",icon:fe(function(){const e=H0();return(e==null?void 0:e.visiblePlugin)===Qp?W.jsx(soe,{}):W.jsx(aoe,{})},"Icon"),content:z0},_$={title:"History",icon:uoe,content:c$},A$=Ba("PluginContext");function O$(e){const t=za(),n=Wa(),r=F0(),o=!!n,i=!!r,s=k.useMemo(()=>{const v=[],b={};o&&(v.push(Qp),b[Qp.title]=!0),i&&(v.push(_$),b[_$.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(D$);return s.find(w=>w.title===v)||(v&&(t==null||t.set(D$,"")),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(A$.Provider,{value:m,children:d})}fe(O$,"PluginContextProvider");const H0=qa(A$),D$="visiblePlugin";function I$(e,t,n,r,o,i){Ku([],{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 D=parseInt(window.getComputedStyle(c).paddingBottom.replace(/px$/,""),10)||0,I=parseInt(window.getComputedStyle(c).maxHeight.replace(/px$/,""),10)||0,O=fe(()=>{c&&(c.style.paddingTop=C.scrollTop+D+"px",c.style.maxHeight=C.scrollTop+I+"px")},"handleScroll");C.addEventListener("scroll",O);let R;C.addEventListener("DOMNodeRemoved",R=fe(P=>{P.target===C&&(C.removeEventListener("scroll",O),C.removeEventListener("DOMNodeRemoved",R),c&&c.removeEventListener("click",s),c=null,f=null,d=null,g=null,m=null,v=null,b=null,w=null,N=null,R=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=R0.render(S.description)):(b.style.display="none",b.innerHTML="")),w&&N&&(S.deprecationReason?(w.style.display="block",N.innerHTML=R0.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(I$,"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 DT(e,t,n,r,o){const{updateActiveTabValues:i}=Kn({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(DT,"useChangeHandler");function IT(e,t,n){const{schema:r}=Ai({nonNull:!0,caller:n}),o=Wa(),i=H0();k.useEffect(()=>{if(!e)return;const s=fe((l,c)=>{I$(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(IT,"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 W0({caller:e,onCopyQuery:t}={}){const{queryEditor:n}=Kn({nonNull:!0,caller:e||W0});return k.useCallback(()=>{if(!n)return;const r=n.getValue();Mz(r),t==null||t(r)},[n,t])}fe(W0,"useCopyQuery");function lc({caller:e}={}){const{queryEditor:t}=Kn({nonNull:!0,caller:e||lc}),{schema:n}=Ai({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(xq(r,n)))},[t,n])}fe(lc,"useMergeQuery");function Ju({caller:e}={}){const{queryEditor:t,headerEditor:n,variableEditor:r}=Kn({nonNull:!0,caller:e||Ju});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(Ju,"usePrettifyEditors");function G0({getDefaultFieldNames:e,caller:t}={}){const{schema:n}=Ai({nonNull:!0,caller:t||G0}),{queryEditor:r}=Kn({nonNull:!0,caller:t||G0});return k.useCallback(()=>{if(!r)return;const o=r.getValue(),{insertions:i,result:s}=gq(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(G0,"useAutoCompleteLeafs");const Ooe=fe(e=>{const t=Kn({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"),Doe=fe(()=>Ooe("query"),"useOperationsEditorState");function L$([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(L$,"useOptimisticState");function Xu({editorTheme:e=P0,keyMap:t=$0,onEdit:n,readOnly:r=!1}={},o){const{initialHeaders:i,headerEditor:s,setHeaderEditor:l,shouldPersistHeaders:c}=Kn({nonNull:!0,caller:o||Xu}),f=Qu(),d=lc({caller:o||Xu}),g=Ju({caller:o||Xu}),m=k.useRef(null);return k.useEffect(()=>{let v=!0;return Ku([Promise.resolve().then(()=>Zce).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:V0});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,D=C.startsWith("Key"),I=!_&&C.startsWith("Digit");(D||I||E==="_"||E==='"')&&S.execCommand("autocomplete")}),l(N)}),()=>{v=!1}},[e,i,r,l]),Jp(s,"keyMap",t),DT(s,n,c?Y0:null,"headers",Xu),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(Xu,"useHeaderEditor");const Y0="headers",Ioe=Array.from({length:11},(e,t)=>String.fromCharCode(8192+t)).concat(["\u2028","\u2029"," "," "]),Loe=new RegExp("["+Ioe.join("")+"]","g");function R$(e){return e.replace(Loe," ")}fe(R$,"normalizeWhitespace");function Ga({editorTheme:e=P0,keyMap:t=$0,onClickReference:n,onCopyQuery:r,onEdit:o,readOnly:i=!1}={},s){const{schema:l}=Ai({nonNull:!0,caller:s||Ga}),{externalFragments:c,initialQuery:f,queryEditor:d,setOperationName:g,setQueryEditor:m,validationRules:v,variableEditor:b,updateActiveTabValues:w}=Kn({nonNull:!0,caller:s||Ga}),N=Qu(),S=za(),x=Wa(),C=H0(),E=W0({caller:s||Ga,onCopyQuery:r}),_=lc({caller:s||Ga}),D=Ju({caller:s||Ga}),I=k.useRef(null),O=k.useRef(),R=k.useRef(()=>{});k.useEffect(()=>{R.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 Ku([Promise.resolve().then(()=>nue).then(z=>z.c),Promise.resolve().then(()=>D6).then(z=>z.s),Promise.resolve().then(()=>iue),Promise.resolve().then(()=>aue),Promise.resolve().then(()=>hue),Promise.resolve().then(()=>vue),Promise.resolve().then(()=>Sue)]).then(z=>{if(!H)return;O.current=z;const q=I.current;if(!q)return;const F=z(q,{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:q,externalFragments:void 0},info:{schema:void 0,renderDescription:Y=>R0.render(Y),onClick(Y){R.current(Y)}},jump:{schema:void 0,onClick(Y){R.current(Y)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...V0,"Cmd-S"(){},"Ctrl-S"(){}}});F.addKeyMap({"Cmd-Space"(){F.showHint({completeSingle:!0,container:q})},"Ctrl-Space"(){F.showHint({completeSingle:!0,container:q})},"Alt-Space"(){F.showHint({completeSingle:!0,container:q})},"Shift-Space"(){F.showHint({completeSingle:!0,container:q})},"Shift-Alt-Space"(){F.showHint({completeSingle:!0,container:q})}}),F.on("keyup",(Y,Q)=>{Roe.test(Q.key)&&Y.execCommand("autocomplete")});let te=!1;F.on("startCompletion",()=>{te=!0}),F.on("endCompletion",()=>{te=!1}),F.on("keydown",(Y,Q)=>{Q.key==="Escape"&&te&&Q.stopPropagation()}),F.on("beforeChange",(Y,Q)=>{var K;if(Q.origin==="paste"){const Z=Q.text.map(R$);(K=Q.update)==null||K.call(Q,Q.from,Q.to,Z)}}),F.documentAST=null,F.operationName=null,F.operations=null,F.variableToType=null,m(F)}),()=>{H=!1}},[e,f,i,m]),Jp(d,"keyMap",t),k.useEffect(()=>{if(!d)return;function H(q){var F;const te=fz(l,q.getValue()),Y=Sq(q.operations??void 0,q.operationName??void 0,te==null?void 0:te.operations);return q.documentAST=(te==null?void 0:te.documentAST)??null,q.operationName=Y??null,q.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,(F=O.current)==null||F.signal(b,"change",b)),te?{...te,operationName:Y}:null}fe(H,"getAndUpdateOperationFacts");const z=ac(100,q=>{const F=q.getValue();S==null||S.set($$,F);const te=q.operationName,Y=H(q);(Y==null?void 0:Y.operationName)!==void 0&&(S==null||S.set(Foe,Y.operationName)),o==null||o(F,Y==null?void 0:Y.documentAST),Y!=null&&Y.operationName&&te!==Y.operationName&&g(Y.operationName),w({query:F,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]),F$(d,l??null,O),M$(d,v??null,O),P$(d,c,O),IT(d,n||null,Ga);const P=N==null?void 0:N.run,B=k.useCallback(()=>{var H;if(!P||!d||!d.operations||!d.hasFocus()){P==null||P();return}const z=d.indexFromPos(d.getCursor());let q;for(const F of d.operations)F.loc&&F.loc.start<=z&&F.loc.end>=z&&(q=(H=F.name)==null?void 0:H.value);q&&q!==d.operationName&&g(q),P()},[d,P,g]);return Di(d,["Cmd-Enter","Ctrl-Enter"],B),Di(d,["Shift-Ctrl-C"],E),Di(d,["Shift-Ctrl-P","Shift-Ctrl-F"],D),Di(d,["Shift-Ctrl-M"],_),I}fe(Ga,"useQueryEditor");function F$(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(F$,"useSynchronizeSchema");function M$(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(M$,"useSynchronizeValidationRules");function P$(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(P$,"useSynchronizeExternalFragments");const Roe=/^[a-zA-Z0-9_@(]$/,$$="query",Foe="operationName";function V$({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(j$(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?Q0(o):null;f.tabs.push({id:PT(),hash:g,title:v||$T,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(FT)}}}fe(V$,"getDefaultTabState");function j$(e){return e&&typeof e=="object"&&!Array.isArray(e)&&B$(e,"activeTabIndex")&&"tabs"in e&&Array.isArray(e.tabs)&&e.tabs.every(U$)}fe(j$,"isTabsState");function U$(e){return e&&typeof e=="object"&&!Array.isArray(e)&<(e,"id")&<(e,"title")&&Zu(e,"query")&&Zu(e,"variables")&&Zu(e,"headers")&&Zu(e,"operationName")&&Zu(e,"response")}fe(U$,"isTabState");function B$(e,t){return t in e&&typeof e[t]=="number"}fe(B$,"hasNumberKey");function LT(e,t){return t in e&&typeof e[t]=="string"}fe(LT,"hasStringKey");function Zu(e,t){return t in e&&(typeof e[t]=="string"||e[t]===null)}fe(Zu,"hasStringOrNullKey");function q$({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 MT(o,{query:i,variables:s,headers:l,response:f,operationName:c})},[e,t,n,r])}fe(q$,"useSynchronizeActiveTabValues");function RT(e,t=!1){return JSON.stringify(e,(n,r)=>n==="hash"||n==="response"||!t&&n==="headers"?null:r)}fe(RT,"serializeTabState");function z$({storage:e,shouldPersistHeaders:t}){const n=k.useMemo(()=>ac(500,r=>{e==null||e.set(Zp,r)}),[e]);return k.useCallback(r=>{n(RT(r,t))},[t,n])}fe(z$,"useStoreTabs");function H$({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(H$,"useSetEditorValues");function FT({query:e=null,variables:t=null,headers:n=null}={}){return{id:PT(),hash:Xp({query:e,variables:t,headers:n}),title:e&&Q0(e)||$T,query:e,variables:t,headers:n,operationName:null,response:null}}fe(FT,"createTab");function MT(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?Q0(o.query):void 0)||$T}})}}fe(MT,"setPropertiesInActiveTab");function PT(){const e=fe(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}fe(PT,"guid");function Xp(e){return[e.query??"",e.variables??"",e.headers??""].join("|")}fe(Xp,"hashFromTabContents");function Q0(e){const t=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e);return(t==null?void 0:t[2])??null}fe(Q0,"fuzzyExtractOperationName");function W$(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(W$,"clearHeadersFromTabs");const $T="<untitled>",Zp="tabState";function cc({editorTheme:e=P0,keyMap:t=$0,onClickReference:n,onEdit:r,readOnly:o=!1}={},i){const{initialVariables:s,variableEditor:l,setVariableEditor:c}=Kn({nonNull:!0,caller:i||cc}),f=Qu(),d=lc({caller:i||cc}),g=Ju({caller:i||cc}),m=k.useRef(null),v=k.useRef();return k.useEffect(()=>{let b=!0;return Ku([Promise.resolve().then(()=>Cue),Promise.resolve().then(()=>Nue),Promise.resolve().then(()=>Iue)]).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:V0});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:D}=C,I=E.startsWith("Key"),O=!D&&E.startsWith("Digit");(I||O||_==="_"||_==='"')&&x.execCommand("autocomplete")}),c(S)}),()=>{b=!1}},[e,s,o,c]),Jp(l,"keyMap",t),DT(l,r,G$,"variables",cc),IT(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 G$="variables",Y$=Ba("EditorContext");function Q$(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(VT))!==null;return e.shouldPersistHeaders!==!1&&Y?(t==null?void 0:t.get(VT))==="true":!!e.shouldPersistHeaders});Kp(n,e.headers),Kp(o,e.query),Kp(s,e.response),Kp(c,e.variables);const m=z$({storage:t,shouldPersistHeaders:d}),[v]=k.useState(()=>{const Y=e.query??(t==null?void 0:t.get($$))??null,Q=e.variables??(t==null?void 0:t.get(G$))??null,K=e.headers??(t==null?void 0:t.get(Y0))??null,Z=e.response??"",re=V$({query:Y,variables:Q,headers:K,defaultTabs:e.defaultTabs,defaultQuery:e.defaultQuery||Moe,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(Y0,(n==null?void 0:n.getValue())??"");const Q=RT(b,!0);t==null||t.set(Zp,Q)}else t==null||t.set(Y0,""),W$(t);g(Y),t==null||t.set(VT,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=q$({queryEditor:o,variableEditor:c,headerEditor:n,responseEditor:s}),C=H$({queryEditor:o,variableEditor:c,headerEditor:n,responseEditor:s}),{onTabChange:E,defaultHeaders:_,children:D}=e,I=k.useCallback(()=>{w(Y=>{const Q=x(Y),K={tabs:[...Q.tabs,FT({headers:_})],activeTabIndex:Q.tabs.length};return m(K),C(K.tabs[K.activeTabIndex]),E==null||E(K),K})},[_,E,C,m,x]),O=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]),R=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]),P=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]),B=k.useCallback(Y=>{w(Q=>{const K=MT(Q,Y);return m(K),E==null||E(K),K})},[E,m]),{onEditOperationName:H}=e,z=k.useCallback(Y=>{o&&(o.operationName=Y,B({operationName:Y}),H==null||H(Y))},[H,o,B]),q=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")Jt(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]),F=k.useMemo(()=>e.validationRules||[],[e.validationRules]),te=k.useMemo(()=>({...b,addTab:I,changeTab:O,moveTab:R,closeTab:P,updateActiveTabValues:B,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:q,validationRules:F,shouldPersistHeaders:d,setShouldPersistHeaders:N}),[b,I,O,R,P,B,n,o,s,c,z,v,q,F,d,N]);return W.jsx(Y$.Provider,{value:te,children:D})}fe(Q$,"EditorContextProvider");const Kn=qa(Y$),VT="shouldPersistHeaders",Moe=`# 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 K0({isHidden:e,...t}){const{headerEditor:n}=Kn({nonNull:!0,caller:K0}),r=Xu(t,K0);return k.useEffect(()=>{e||n==null||n.refresh()},[n,e]),W.jsx("div",{className:Gn("graphiql-editor",e&&"hidden"),ref:r})}fe(K0,"HeaderEditor");function J0(e){var t;const[n,r]=k.useState({width:null,height:null}),[o,i]=k.useState(null),s=k.useRef(null),l=(t=jT(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(J0,"ImagePreview"),J0.shouldRender=fe(function(e){const t=jT(e);return t?K$(t):!1},"shouldRender");function jT(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(jT,"tokenToURL");function K$(e){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(e.pathname)}fe(K$,"isImageURL");function UT(e){const t=Ga(e,UT);return W.jsx("div",{className:"graphiql-editor",ref:t})}fe(UT,"QueryEditor");function X0({responseTooltip:e,editorTheme:t=P0,keyMap:n=$0}={},r){const{fetchError:o,validationErrors:i}=Ai({nonNull:!0,caller:r||X0}),{initialResponse:s,responseEditor:l,setResponseEditor:c}=Kn({nonNull:!0,caller:r||X0}),f=k.useRef(null),d=k.useRef(e);return k.useEffect(()=>{d.current=e},[e]),k.useEffect(()=>{let g=!0;return Ku([Promise.resolve().then(()=>u6).then(m=>m.f),Promise.resolve().then(()=>i6).then(m=>m.b),Promise.resolve().then(()=>y6).then(m=>m.d),Promise.resolve().then(()=>D6).then(m=>m.s),Promise.resolve().then(()=>g6).then(m=>m.s),Promise.resolve().then(()=>w6).then(m=>m.j),Promise.resolve().then(()=>T6).then(m=>m.s),Promise.resolve().then(()=>Fue),Promise.resolve().then(()=>due)],{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})),J0.shouldRender(N)&&E.push(W.jsx(J0,{token:N},"image-preview")),E.length?(mg.render(E,v),v):(mg.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:V0});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(X0,"useResponseEditor");function BT(e){const t=X0(e,BT);return W.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:t})}fe(BT,"ResponseEditor");function Z0({isHidden:e,...t}){const{variableEditor:n}=Kn({nonNull:!0,caller:Z0}),r=cc(t,Z0);return k.useEffect(()=>{n&&!e&&n.refresh()},[n,e]),W.jsx("div",{className:Gn("graphiql-editor",e&&"hidden"),ref:r})}fe(Z0,"VariableEditor");function qT({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:D,storage:I,validationRules:O,variables:R,visiblePlugin:P}){return W.jsx(J3,{storage:I,children:W.jsx(l$,{maxHistoryLength:g,children:W.jsx(Q$,{defaultQuery:n,defaultHeaders:r,defaultTabs:o,externalFragments:i,headers:c,onEditOperationName:m,onTabChange:b,query:x,response:C,shouldPersistHeaders:D,validationRules:O,variables:R,children:W.jsx(TT,{dangerouslyAssumeSchemaIsValid:t,fetcher:s,inputValueDeprecation:f,introspectionQueryName:d,onSchemaChange:v,schema:E,schemaDescription:_,children:W.jsx(M0,{getDefaultFieldNames:l,fetcher:s,operationName:N,children:W.jsx(CT,{children:W.jsx(O$,{onTogglePluginVisibility:w,plugins:S,visiblePlugin:P,children:e})})})})})})})}fe(qT,"GraphiQLProvider");function J$(){const e=za(),[t,n]=k.useState(()=>{if(!e)return null;const o=e.get(zT);switch(o){case"light":return"light";case"dark":return"dark";default:return typeof o=="string"&&e.set(zT,""),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(zT,o||""),n(o)},[e]);return k.useMemo(()=>({theme:t,setTheme:r}),[t,r])}fe(J$,"useTheme");const zT="theme";function ey({defaultSizeRelation:e=Poe,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===ty||n==="first"?"first":x===ny||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===ty||x===ny?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!==ty&&E!==ny&&(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",D=t==="horizontal"?"left":"top",I=t==="horizontal"?"right":"bottom",O=t==="horizontal"?"clientWidth":"clientHeight";function R(B){B.preventDefault();const H=B[_]-x.getBoundingClientRect()[D];function z(F){if(F.buttons===0)return q();const te=F[_]-E.getBoundingClientRect()[D]-H,Y=E.getBoundingClientRect()[I]-F[_]+H-x[O];if(te<o)g("first"),c(ty);else if(Y<i)g("second"),c(ny);else{g(null);const Q=`${te/Y}`;C.style.flex=Q,c(Q)}}fe(z,"handleMouseMove");function q(){document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",q)}fe(q,"handleMouseUp"),document.addEventListener("mousemove",z),document.addEventListener("mouseup",q)}fe(R,"handleMouseDown"),x.addEventListener("mousedown",R);function P(){m.current&&(m.current.style.flex=w.current),c(w.current),g(null)}return fe(P,"reset"),x.addEventListener("dblclick",P),()=>{x.removeEventListener("mousedown",R),x.removeEventListener("dblclick",P)}},[t,g,o,i,c]),k.useMemo(()=>({dragBarRef:v,hiddenElement:f,firstRef:m,setHiddenElement:d,secondRef:b}),[f,d])}fe(ey,"useDragResize");const Poe=1,ty="hide-first",ny="hide-second",ry=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(Cr,{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"]})})});ry.displayName="ToolbarButton";function oy(){const{queryEditor:e,setOperationName:t}=Kn({nonNull:!0,caller:oy}),{isFetching:n,isSubscribed:r,operationName:o,run:i,stop:s}=Qu({nonNull:!0,caller:oy}),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(Toe,{}):W.jsx(goe,{}),"aria-label":d};return c&&!f?W.jsxs(Ha,{children:[W.jsx(Cr,{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(Cr,{label:d,children:W.jsx("button",{...g,onClick:()=>{f?s():i()}})})}fe(oy,"ExecuteButton"),Hp(fe(({button:e,children:t,label:n,...r})=>W.jsxs(Ha,{...r,children:[W.jsx(Cr,{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 iy={},sy={};const $oe=a7(uq);Object.defineProperty(sy,"__esModule",{value:!0});var Voe=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},X$=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}}();sy.defaultValue=WT;var joe=k,Ee=Uoe(joe),rt=$oe;function Uoe(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 Z$(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 bn(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 HT(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Boe={keyword:"#B11A04",def:"#D2054E",property:"#1F61A0",qualifier:"#1C92A9",attribute:"#8B2BB9",number:"#2882F9",string:"#D64292",builtin:"#D47509",string2:"#0B7FC7",variable:"#397D13",atom:"#CA9800"},qoe=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"})),zoe=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"})),Hoe=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"})),Woe=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 ay(e){return e.checked?e.styleConfig.checkboxChecked:e.styleConfig.checkboxUnchecked}function e5(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 t5(e){return(0,rt.isNonNullType)(e.type)&&e.defaultValue===void 0}function Goe(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 n5(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 Yoe=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=bn(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:ly(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=n5(N,x));var E=o.props.modifyFields((b.fields||[]).map(function(_){var D=_===w,I=D?Ct({},_,{value:C}):_;return I}),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),bn(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(o5,{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 WT(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 r5(e,t,n){return WT(n)}var 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=bn(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:ly(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=n5(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),bn(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(o5,{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 Koe(e){return e.ctrlKey&&e.key==="Enter"}function Joe(e){return e!=="FragmentDefinition"}var Xoe=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=bn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o._handleChange=function(f){o.props.setArgValue(f,!0)},r),bn(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),o5=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=bn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.state={displayArgActions:!1},r),bn(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(Xoe,{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(Yoe,{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:[]},D=function(re){return(r.props.definition.variableDefinitions||[]).find(function(J){return J.variable.name.value===re})},I=void 0,O={};if(typeof i<"u"&&i!==null){var R=(0,rt.visit)(i,{Variable:function(re){var J=re.name.value,ie=D(J);if(O[J]=O[J]+1||1,!!ie)return ie.defaultValue}}),P=_.type.kind==="NonNullType",B=P?Ct({},_,{type:_.type.type}):_;I=Ct({},B,{defaultValue:R})}else I=_;var H=Object.entries(O).filter(function(Z){var re=X$(Z,2);re[0];var J=re[1];return J<2}).map(function(Z){var re=X$(Z,2),J=re[0];return re[1],J});if(I){var z=r.props.setArgValue(I,!1);if(z){var q=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}),F=[].concat(Ko(q.variableDefinitions||[]),[I]).filter(function(Z){return H.indexOf(Z.variable.name.value)===-1}),te=Ct({},q,{variableDefinitions:F}),Y=z.definitions,Q=Y.map(function(Z){return q===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(B){return B.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(B){return B.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 D=E.variableDefinitions||[];_<2&&(D=D.filter(function(B){return B.variable.name.value!==N}));var I=Ct({},E,{variableDefinitions:D}),O=C.definitions,R=O.map(function(B){return E===B?I:B}),P=Ct({},C,{definitions:R});r.props.onCommit(P)}}}},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(ay,{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,t5(s)?"*":"",": ",b," ")," "),f||Ee.createElement("span",null)," ")}}]),t}(Ee.PureComponent),Zoe=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=bn(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),bn(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(ay,{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(s5,{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),eie=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=bn(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),bn(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(ay,{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 ly(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:ly(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 i5(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(t5(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:ly(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 s5=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=bn(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:i5(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:i5(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),bn(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=Goe(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(ay,{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(B){return B.name.value.startsWith(E)}).length;_>0&&(E=""+E+_);var D=f?f.selectionSet?f.selectionSet.selections:[]:[],I=[{kind:"FragmentSpread",name:{kind:"Name",value:E},directives:[]}],O={kind:"FragmentDefinition",name:{kind:"Name",value:E},typeCondition:{kind:"NamedType",name:{kind:"Name",value:d.name}},directives:[],selectionSet:{kind:"SelectionSet",selections:D}},R=r._modifyChildSelections(I,!1);if(R){var P=Ct({},R,{definitions:[].concat(Ko(R.definitions),[O])});r.props.onCommit(P)}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(Qoe,{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(eie,{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(Zoe,{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 tie(e){try{return e.trim()?(0,rt.parse)(e,{noLocation:!0}):null}catch(t){return new Error(t)}}var nie={kind:"OperationDefinition",operation:"query",variableDefinitions:[],name:{kind:"Name",value:"MyQuery"},directives:[],selectionSet:{kind:"SelectionSet",selections:[]}},cy={kind:"Document",definitions:[nie]},ef=null;function rie(e){if(ef&&ef[0]===e)return ef[1];var t=tie(e);return t?t instanceof Error?ef?ef[1]:cy:(ef=[e,t],t):cy}var a5={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"}},oie=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=bn(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){Koe(f)&&Joe(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),bn(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||HT(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:HT(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(s5,{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 iie(){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 l5=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=bn(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),bn(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||Boe,checkboxChecked:this.props.checkboxChecked||Hoe,checkboxUnchecked:this.props.checkboxUnchecked||Woe,arrowClosed:this.props.arrowClosed||zoe,arrowOpen:this.props.arrowOpen||qoe,styles:this.props.styles?Ct({},a5,this.props.styles):a5},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=rie(s),N=this.props.getDefaultFieldNames||e5,S=this.props.getDefaultScalarArgValue||r5,x=w.definitions,C=x.map(function(F){return F.kind==="FragmentDefinition"||F.kind==="OperationDefinition"?F:null}).filter(Boolean),E=C.length===0?cy.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})},D=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})},I=function(te){var Y=w.definitions,Q=Y.filter(function(K){return te!==K});return Ct({},w,{definitions:Q})},O=function(te){var Y=w.definitions,Q=w.definitions.length===1&&w.definitions[0]===cy.definitions[0],K=Q?[]:Y.filter(function(le){return le.kind==="OperationDefinition"?le.operation===te:!1}),Z="My"+HT(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))},R=[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),P=R.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"}},R),Ee.createElement("button",{type:"submit",className:"toolbar-button",onClick:function(){return r.state.newOperationType?O(r.state.newOperationType):null},style:Ct({},c.styles.buttonStyle,{height:"22px",width:"22px"})},Ee.createElement("span",null,"+")))),B=this.props.externalFragments&&this.props.externalFragments.reduce(function(F,te){if(te.kind==="FragmentDefinition"){var Y=te.typeCondition.name.value,Q=F[Y]||[],K=[].concat(Ko(Q),[te]).sort(function(Z,re){return Z.name.value.localeCompare(re.name.value)});return Ct({},F,Z$({},Y,K))}return F},{}),H=E.reduce(function(F,te){if(te.kind==="FragmentDefinition"){var Y=te.typeCondition.name.value,Q=F[Y]||[],K=[].concat(Ko(Q),[te]).sort(function(Z,re){return Z.name.value.localeCompare(re.name.value)});return Ct({},F,Z$({},Y,K))}return F},{}),z=Ct({},H,B),q=this.props.showAttribution?Ee.createElement(iie,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(F,te){var Y=F&&F.name&&F.name.value,Q=F.kind==="FragmentDefinition"?"fragment":F&&F.operation||"query",K=function(xe){var ve=_(F,xe);r.props.onEdit((0,rt.print)(ve))},Z=function(){var xe=D(F);r.props.onEdit((0,rt.print)(xe))},re=function(){var xe=I(F);r.props.onEdit((0,rt.print)(xe))},J=F.kind==="FragmentDefinition"&&F.typeCondition.kind==="NamedType"&&i.getType(F.typeCondition.name.value),ie=J instanceof rt.GraphQLObjectType?J.getFields():null,ne=Q==="query"?m:Q==="mutation"?v:Q==="subscription"?b:F.kind==="FragmentDefinition"?ie:null,ae=F.kind==="FragmentDefinition"?F.typeCondition.name.value:null,le=function(xe){var ve=(0,rt.print)(xe);r.props.onEdit(ve)};return Ee.createElement(oie,{key:te,isLast:te===E.length-1,fields:ne,operationType:Q,name:Y,definition:F,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":Voe(ve))==="object"&&typeof ve.commit<"u"?qe=ve.commit:qe=!0,xe){var Ie=Ct({},w,{definitions:w.definitions.map(function(Ae){return Ae===F?xe:Ae})});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})}),q),P)}}]),t}(Ee.PureComponent);l5.defaultProps={getDefaultFieldNames:e5,getDefaultScalarArgValue:r5};var sie=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=bn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.state={hasError:!1,error:null,errorInfo:null},r),bn(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),GT=function(e){Ri(t,e);function t(){return Li(this,t),bn(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(sie,null,Ee.createElement(l5,this.props))))}}]),t}(Ee.PureComponent);GT.defaultValue=WT,GT.defaultProps={width:320,title:"Explorer"},sy.default=GT,Object.defineProperty(iy,"__esModule",{value:!0});var c5=iy.Explorer=void 0,aie=sy,u5=lie(aie);function lie(e){return e&&e.__esModule?e:{default:e}}c5=iy.Explorer=u5.default,iy.default=u5.default;const cie={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))"},uie=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"})),fie=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"})),die=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"})),pie=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"})),hie={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 mie(e){const{setOperationName:t}=Kn({nonNull:!0}),{schema:n}=Ai({nonNull:!0}),{run:r}=Qu({nonNull:!0}),o=k.useCallback(l=>{l&&t(l),r()},[r,t]),[i,s]=L$(Doe());return ce.createElement(c5,{schema:n,onRunOperation:o,explorerIsOpen:!0,colors:cie,arrowOpen:uie,arrowClosed:fie,checkboxUnchecked:die,checkboxChecked:pie,styles:hie,query:i,onEdit:s,...e})}function gie(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(mie,{...e})}}var YT=function(){return YT=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},YT.apply(this,arguments)},vie=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},uy=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},yie=parseInt(ce.version.slice(0,2),10);if(yie<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,D=e.shouldPersistHeaders,I=e.storage,O=e.validationRules,R=e.variables,P=e.visiblePlugin,B=e.defaultHeaders,H=vie(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(qT,{getDefaultFieldNames:l,dangerouslyAssumeSchemaIsValid:n,defaultQuery:r,defaultHeaders:B,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:P,operationName:N,query:x,response:C,schema:E,schemaDescription:_,shouldPersistHeaders:D,storage:I,validationRules:O,variables:R},ce.createElement(f5,YT({showPersistHeadersSettings:D!==!1,disableTabs:(t=H.disableTabs)!==null&&t!==void 0?t:!1},H)))}Qa.Logo=d5,Qa.Toolbar=p5,Qa.Footer=h5;function f5(e){var t,n,r,o,i=(t=e.isHeadersEditorEnabled)!==null&&t!==void 0?t:!0,s=Kn({nonNull:!0}),l=Qu({nonNull:!0}),c=Ai({nonNull:!0}),f=za(),d=H0(),g=W0({onCopyQuery:e.onCopyQuery}),m=lc(),v=Ju(),b=J$(),w=b.theme,N=b.setTheme,S=(n=d==null?void 0:d.visiblePlugin)===null||n===void 0?void 0:n.content,x=ey({defaultSizeRelation:1/3,direction:"horizontal",initiallyHidden:d!=null&&d.visiblePlugin?void 0:"first",onHiddenElementChange:function(Ae){Ae==="first"&&(d==null||d.setVisiblePlugin(null))},sizeThresholdSecond:200,storageKey:"docExplorerFlex"}),C=ey({direction:"horizontal",storageKey:"editorFlex"}),E=ey({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"}),_=uy(k.useState(function(){return e.defaultEditorToolsVisibility==="variables"||e.defaultEditorToolsVisibility==="headers"?e.defaultEditorToolsVisibility:!s.initialVariables&&s.initialHeaders&&i?"headers":"variables"}),2),D=_[0],I=_[1],O=uy(k.useState(null),2),R=O[0],P=O[1],B=uy(k.useState(null),2),H=B[0],z=B[1],q=ce.Children.toArray(e.children),F=q.find(function(Ae){return KT(Ae,Qa.Logo)})||ce.createElement(Qa.Logo,null),te=q.find(function(Ae){return KT(Ae,Qa.Toolbar)})||ce.createElement(ce.Fragment,null,ce.createElement(ry,{onClick:v,label:"Prettify query (Shift-Ctrl-P)"},ce.createElement(yoe,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),ce.createElement(ry,{onClick:m,label:"Merge fragments into query (Shift-Ctrl-M)"},ce.createElement(hoe,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),ce.createElement(ry,{onClick:g,label:"Copy query (Shift-Ctrl-C)"},ce.createElement(toe,{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=q.find(function(Ae){return KT(Ae,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(Ae){s.setShouldPersistHeaders(Ae.currentTarget.dataset.value==="true")},[s]),re=k.useCallback(function(Ae){var it=Ae.currentTarget.dataset.theme;N(it||null)},[N]),J=s.addTab,ie=c.introspect,ne=s.moveTab,ae=k.useCallback(function(Ae){P(Ae.currentTarget.dataset.value)},[]),le=k.useCallback(function(Ae){var it=d,Ot=Number(Ae.currentTarget.dataset.index),je=it.plugins.find(function(_r,jt){return Ot===jt}),It=je===it.visiblePlugin;It?(it.setVisiblePlugin(null),x.setHiddenElement("first")):(it.setVisiblePlugin(je),x.setHiddenElement(null))},[d,x]),de=k.useCallback(function(Ae){E.hiddenElement==="second"&&E.setHiddenElement(null),I(Ae.currentTarget.dataset.name)},[E]),xe=k.useCallback(function(){E.setHiddenElement(E.hiddenElement==="second"?null:"second")},[E]),ve=k.useCallback(function(Ae){Ae||P(null)},[]),qe=k.useCallback(function(Ae){Ae||(P(null),z(null))},[]),Ie=ce.createElement(Cr,{label:"Add tab"},ce.createElement(jn,{type:"button",className:"graphiql-tab-add",onClick:J,"aria-label":"Add tab"},ce.createElement(voe,{"aria-hidden":"true"})));return ce.createElement(Cr.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(Ae,it){var Ot=Ae===d.visiblePlugin,je="".concat(Ot?"Hide":"Show"," ").concat(Ae.title),It=Ae.icon;return ce.createElement(Cr,{key:Ae.title,label:je},ce.createElement(jn,{type:"button",className:Ot?"active":"",onClick:le,"data-index":it,"aria-label":je},ce.createElement(It,{"aria-hidden":"true"})))})),ce.createElement("div",{className:"graphiql-sidebar-section"},ce.createElement(Cr,{label:"Re-fetch GraphQL schema"},ce.createElement(jn,{type:"button",disabled:c.isFetching,onClick:ie,"aria-label":"Re-fetch GraphQL schema"},ce.createElement(boe,{className:c.isFetching?"graphiql-spin":"","aria-hidden":"true"}))),ce.createElement(Cr,{label:"Open short keys dialog"},ce.createElement(jn,{type:"button","data-value":"short-keys",onClick:ae,"aria-label":"Open short keys dialog"},ce.createElement(doe,{"aria-hidden":"true"}))),ce.createElement(Cr,{label:"Open settings dialog"},ce.createElement(jn,{type:"button","data-value":"settings",onClick:ae,"aria-label":"Open settings dialog"},ce.createElement(woe,{"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(s$,{values:s.tabs,onReorder:ne,"aria-label":"Select active operation"},s.tabs.length>1&&ce.createElement(ce.Fragment,null,s.tabs.map(function(Ae,it){return ce.createElement(wT,{key:Ae.id,value:Ae,isActive:it===s.activeTabIndex},ce.createElement(wT.Button,{"aria-controls":"graphiql-session",id:"graphiql-session-tab-".concat(it),onClick:function(){l.stop(),s.changeTab(it)}},Ae.title),ce.createElement(wT.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,F)),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(UT,{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(oy,null),te))),ce.createElement("div",{ref:E.dragBarRef},ce.createElement("div",{className:"graphiql-editor-tools"},ce.createElement(jn,{type:"button",className:D==="variables"&&E.hiddenElement!=="second"?"active":"",onClick:de,"data-name":"variables"},"Variables"),i&&ce.createElement(jn,{type:"button",className:D==="headers"&&E.hiddenElement!=="second"?"active":"",onClick:de,"data-name":"headers"},"Headers"),ce.createElement(Cr,{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(eoe,{className:"graphiql-chevron-icon","aria-hidden":"true"}):ce.createElement(Xre,{className:"graphiql-chevron-icon","aria-hidden":"true"}))))),ce.createElement("div",{ref:E.secondRef},ce.createElement("section",{className:"graphiql-editor-tool","aria-label":D==="variables"?"Variables":"Headers"},ce.createElement(Z0,{editorTheme:e.editorTheme,isHidden:D!=="variables",keyMap:e.keyMap,onEdit:e.onEditVariables,onClickReference:Q,readOnly:e.readOnly}),i&&ce.createElement(K0,{editorTheme:e.editorTheme,isHidden:D!=="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(ET,null):null,ce.createElement(BT,{editorTheme:e.editorTheme,responseTooltip:e.responseTooltip,keyMap:e.keyMap}),Y))))),ce.createElement(Yu,{open:R==="short-keys",onOpenChange:ve},ce.createElement("div",{className:"graphiql-dialog-header"},ce.createElement(Yu.Title,{className:"graphiql-dialog-title"},"Short Keys"),ce.createElement(Yu.Close,null)),ce.createElement("div",{className:"graphiql-dialog-section"},ce.createElement(Eie,{keyMap:e.keyMap||"sublime"}))),ce.createElement(Yu,{open:R==="settings",onOpenChange:qe},ce.createElement("div",{className:"graphiql-dialog-header"},ce.createElement(Yu.Title,{className:"graphiql-dialog-title"},"Settings"),ce.createElement(Yu.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(bT,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(bT,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 QT=typeof window<"u"&&window.navigator.platform.toLowerCase().indexOf("mac")===0?"Cmd":"Ctrl",bie=Object.entries({"Search in editor":[QT,"F"],"Search in documentation":[QT,"K"],"Execute query":[QT,"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 Eie(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,bie.map(function(n){var r=uy(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 d5(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"))}d5.displayName="GraphiQLLogo";function p5(e){return ce.createElement(ce.Fragment,null,e.children)}p5.displayName="GraphiQLToolbar";function h5(e){return ce.createElement("div",{className:"graphiql-footer"},e.children)}h5.displayName="GraphiQLFooter";function KT(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 tf=null;typeof WebSocket<"u"?tf=WebSocket:typeof MozWebSocket<"u"?tf=MozWebSocket:typeof global<"u"?tf=global.WebSocket||global.MozWebSocket:typeof window<"u"?tf=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(tf=self.WebSocket||self.MozWebSocket);const m5=tf;function wie(e){return e!=null&&typeof e.then=="function"}const xie=e=>{throw e};class Wt{constructor(t){s7(this,"state");let n;try{n=t()}catch(r){this.state={status:"rejected",value:r};return}if(wie(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 Wt(()=>r.value.then(t,n));const o=typeof n=="function"?n:xie;if(r.status==="rejected")return new Wt(()=>o(r.value));try{const i=typeof t=="function"?t:void 0;return i===void 0?new Wt(()=>r.value):new Wt(()=>i(r.value))}catch(i){return new Wt(()=>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 Wt(()=>{throw r})):new Wt(()=>Promise.all(i)):new Wt(()=>i)}}function no(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function uc(e){return no(e)==="object"}function Sie(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function g5(e,t){return e.length<124?e:t}const Tie="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 En;(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"})(En||(En={}));function v5(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 En.ConnectionInit:case En.ConnectionAck:case En.Ping:case En.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 En.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 En.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 En.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(!Sie(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 En.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 Cie(e,t){return v5(typeof e=="string"?JSON.parse(e,t):e)}function eh(e,t){return v5(e),JSON.stringify(e,t)}var nf=function(e){return this instanceof nf?(this.v=e,this):new nf(e)},kie=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 nf?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 Nie(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=JT,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(!Aie(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 F=(()=>{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?[F.emit,v.message]:[F.emit],closed:v!=null&&v.closed?[v.closed]:[],error:v!=null&&v.error?[v.error]:[]};return{onMessage:F.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 _(F){const te=[E.on("error",Y=>{te.forEach(Q=>Q()),F(Y)}),E.on("closed",Y=>{te.forEach(Q=>Q()),F(Y)})]}let D,I=0,O,R=!1,P=0,B=!1;async function H(){clearTimeout(O);const[F,te]=await(D??(D=new Promise((K,Z)=>(async()=>{if(R){if(await d(P),!I)return D=void 0,Z({code:1e3,reason:"All Subscriptions Gone"});P++}E.emit("connecting",R);const re=new C(typeof t=="function"?await t():t,Tie);let J,ie;function ne(){isFinite(s)&&s>0&&(clearTimeout(ie),ie=setTimeout(()=>{re.readyState===C.OPEN&&(re.send(eh({type:En.Ping})),E.emit("ping",!1,void 0))},s))}_(le=>{D=void 0,clearTimeout(J),clearTimeout(ie),Z(le),le instanceof y5&&(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:En.ConnectionInit,payload:le}:{type:En.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,g5(le instanceof Error?le.message:new Error(le).message,"Internal client error"))}};let ae=!1;re.onmessage=({data:le})=>{try{const de=Cie(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:En.Pong,payload:de.payload}:{type:En.Pong})),E.emit("pong",!1,de.payload));return}if(ae)return;if(de.type!==En.ConnectionAck)throw new Error(`First message cannot be of type ${de.type}`);clearTimeout(J),ae=!0,E.emit("connected",re,de.payload,R),R=!1,P=0,K([re,new Promise((xe,ve)=>_(ve))])}catch(de){re.onmessage=null,E.emit("error",de),re.close(No.BadResponse,g5(de instanceof Error?de.message:new Error(de).message,"Bad response"))}}})())));F.readyState===C.CLOSING&&await te;let Y=()=>{};const Q=new Promise(K=>Y=K);return[F,Y,Promise.race([Q.then(()=>{if(!I){const K=()=>F.close(1e3,"Normal Closure");isFinite(i)&&i>0?O=setTimeout(()=>{F.readyState===C.OPEN&&K()},i):K()}}),te])]}function z(F){if(JT(F)&&(_ie(F.code)||[No.InternalServerError,No.InternalClientError,No.BadRequest,No.BadResponse,No.Unauthorized,No.SubprotocolNotAcceptable,No.SubscriberAlreadyExists,No.TooManyInitialisationRequests].includes(F.code)))throw F;if(B)return!1;if(JT(F)&&F.code===1e3)return I>0;if(!f||P>=f||!g(F)||m!=null&&m(F))throw F;return R=!0}r||(async()=>{for(I++;;)try{const[,,F]=await H();await F}catch(F){try{if(!z(F))return}catch(te){return o==null?void 0:o(te)}}})();function q(F,te){const Y=w(F);let Q=!1,K=!1,Z=()=>{I--,Q=!0};return(async()=>{for(I++;;)try{const[re,J,ie]=await H();if(Q)return J();const ne=E.onMessage(Y,ae=>{switch(ae.type){case En.Next:{te.next(ae.payload);return}case En.Error:{K=!0,Q=!0,te.error(ae.payload),Z();return}case En.Complete:{Q=!0,Z();return}}});re.send(eh({id:Y,type:En.Subscribe,payload:F},N)),Z=()=>{!Q&&re.readyState===C.OPEN&&re.send(eh({id:Y,type:En.Complete},N)),I--,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:q,iterate(F){const te=[],Y={done:!1,error:null,resolve:()=>{}},Q=q(F,{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 kie(this,arguments,function*(){for(;;){for(te.length||(yield nf(new Promise(J=>Y.resolve=J)));te.length;)yield yield nf(te.shift());if(Y.error)throw Y.error;if(Y.done)return yield nf(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(B=!0,D){const[F]=await D;F.close(1e3,"Normal Closure")}},terminate(){D&&E.emit("closed",new y5)}}}class y5 extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function JT(e){return uc(e)&&"code"in e&&"reason"in e}function _ie(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function Aie(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}const Oie=e=>Array.isArray(e)?e:e?[e]:[];function Die(e){return e!=null}const b5=3;function cr(e){return fy(e,[])}function fy(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Iie(e,t);default:return String(e)}}function E5(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message};
${e.stack}`}function Iie(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?E5(e)+`
`+w5(e.errors,t):E5(e);if(t.includes(e))return"[Circular]";const n=[...t,e];if(Lie(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:fy(r,n)}else if(Array.isArray(e))return w5(e,n);return Rie(e,n)}function Lie(e){return typeof e.toJSON=="function"}function Rie(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>b5?"["+Fie(e)+"]":"{ "+n.map(([o,i])=>o+": "+fy(i,t)).join(", ")+" }"}function w5(e,t){if(e.length===0)return"[]";if(t.length>b5)return"[Array]";const n=e.length,r=[];for(let o=0;o<n;++o)r.push(fy(e[o],t));return"["+r.join(", ")+"]"}function Fie(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 Mie=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function Pie(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>Mie.includes(t))}function ut(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Pie(t.originalError)&&(t.originalError=ut(t.originalError.message,t.originalError)),GE.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 XT(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 $ie(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function x5(e){return typeof e=="object"&&e!==null}function At(e){return(e==null?void 0:e.then)!=null}function Vie(e,t,n){let r=n;for(const o of e)r=At(r)?r.then(i=>t(i,o)):t(r,o);return r}function S5(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function T5(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 "${cr(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||!S5(n,v)){if(c!==void 0)r[s]=c;else if(He(l))throw ut(`Argument "${s}" of required type "${cr(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 "${cr(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 ZT(e){if(He(e)){const t=ZT(e.ofType);if(t.kind===U.NON_NULL_TYPE)throw new Error(`Invalid type node ${cr(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:ZT(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 eC(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 jie(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 C5(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 g=new WeakMap;l.set(o,g);const m=new WeakMap;g.set(i,m);const v=e(r,o,i,s);return m.set(s,v),v}let c=l.get(o);if(!c){c=new WeakMap,l.set(o,c);const g=new WeakMap;c.set(i,g);const m=e(r,o,i,s);return g.set(s,m),m}const f=c.get(i);if(!f){const g=new WeakMap;c.set(i,g);const m=e(r,o,i,s);return g.set(s,m),m}const d=f.get(s);if(d===void 0){const g=e(r,o,i,s);return f.set(s,g),g}return d}}function Uie(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 Bie(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 dy(e,t,n){const o=tC(e).get(t);if(o==null)throw ut(`Schema is not configured to execute ${t} operation.`,{nodes:n});return o}const qie=js(function(t){const n=zie(t);return new Set([...n].map(r=>r.name))}),zie=js(function(t){const n=tC(t);return new Set(n.values())}),tC=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}),Hie=80;let k5={};function Wie(e){return`
# `+e.replace(/\n/g,`
# `)}function Ue(e,t){return e?e.filter(n=>n).join(t||""):""}function N5(e){return(e==null?void 0:e.some(t=>t.includes(`
`)))??!1}function Gie(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")&&k5[c]&&f.push(...k5[c]),Ue([...f.map(Wie),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 cn(e,t,n){return t?e+t+(n||""):""}function Yie(e,t=!1){const n=e.replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(`
`)===-1?`"""${n.replace(/"$/,`"
`)}"""`:`"""
${t?n:th(n)}
"""`}const _5={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ue(e.definitions,`
`)},OperationDefinition:{leave:e=>{const t=cn("(",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+cn(" = ",n)+cn(" ",Ue(r," "))},SelectionSet:{leave:({selections:e})=>Fi(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:o}){const i=cn("",e,": ")+t;let s=i+cn("(",Ue(n,", "),")");return s.length>Hie&&(s=i+cn(`(
`,th(Ue(n,`
`)),`
)`)),Ue([s,Ue(r," "),o]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+cn(" ",Ue(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Ue(["...",cn("on ",e),Ue(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:o})=>`fragment ${e}${cn("(",Ue(n,", "),")")} on ${t} ${cn("",Ue(r," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Yie(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+cn("(",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,cn("implements ",Ue(t," & ")),Ue(n," "),Fi(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(N5(t)?cn(`(
`,th(Ue(t,`
`)),`
)`):cn("(",Ue(t,", "),")"))+": "+n+cn(" ",Ue(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>Ue([e+": "+t,cn("= ",n),Ue(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ue(["interface",e,cn("implements ",Ue(t," & ")),Ue(n," "),Fi(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>Ue(["union",e,Ue(t," "),cn("= ",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+(N5(t)?cn(`(
`,th(Ue(t,`
`)),`
)`):cn("(",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,cn("implements ",Ue(t," & ")),Ue(n," "),Fi(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ue(["extend interface",e,cn("implements ",Ue(t," & ")),Ue(n," "),Fi(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Ue(["extend union",e,Ue(t," "),cn("= ",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(_5).reduce((e,t)=>({...e,[t]:{leave:Gie(_5[t].leave)}}),{});function Qie(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 Kie(e){const t=e.split(/\r\n|[\n\r]/g),n=Jie(t);if(n!==0)for(let r=1;r<t.length;r++)t[r]=t[r].slice(n);for(;t.length>0&&O5(t[0]);)t.shift();for(;t.length>0&&O5(t[t.length-1]);)t.pop();return t.join(`
`)}function Jie(e){let t=null;for(let n=1;n<e.length;n++){const r=e[n],o=A5(r);if(o!==r.length&&(t===null||o<t)&&(t=o,t===0))break}return t===null?0:t}function A5(e){let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" ");)t++;return t}function O5(e){return A5(e)===e.length}function Xie(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=Zie(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 Zie(e,t={}){const n=rr(e,{...t,noLocation:!1});return Jt(n,{leave:o=>{if(ese(o)){const i=Qie(o);if(i!==void 0){const s=Kie(`
`+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 ese(e){return Vg(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 rf(e,t){if(t){const n=e[t.name];if(We(n))return n}}function tse(e){if("getFields"in e){const t=e.getFields();for(const n in t)return t[n].name==="_fake"}return!1}function nse(e){switch(e.name){case zd.name:return zd;case Hd.name:return Hd;case Pt.name:return Pt;case Ht.name:return Ht;case Wd.name:return Wd;default:return e}}function rse(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(Rg(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(We(m)){const v=m.toConfig(),b={...v,fields:()=>c(v.fields),interfaces:()=>d(v.interfaces)};return new $n(b)}else if(Je(m)){const v=m.toConfig(),b={...v,fields:()=>c(v.fields)};return"interfaces"in b&&(b.interfaces=()=>d(v.interfaces)),new $r(b)}else if(Mt(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 Vr(b)}else if(Rt(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 zt(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=tse(m)?nse(m):l(m),r[v.name]=n[m.name]=v),v!=null?r[v.name]:null}return null}}function py(e,t,n=null,r=null){if(t==null)return t;const o=Ca(e);if(Yn(o))return n!=null?n(o,t):t;if(vt(o))return Oie(t).map(i=>py(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]=py(c.type,t[l],n,r))}return r!=null?r(o,s):s}}function hy(e,t){return py(e,t,(n,r)=>{try{return n.serialize(r)}catch{return r}})}function ose(e,t){return py(e,t,(n,r)=>{try{return n.parseValue(r)}catch{return r}})}function ise(e,t={}){const n=L5(I5(nC(D5(sse(nC(D5(e.getTypeMap(),e,hy),e,t,l=>Yn(l)),e,t),e,ose),e,t,l=>!Yn(l)),e,t),e,t),r=e.getDirectives(),o=ase(r,e,t),{typeMap:i,directives:s}=rse(n,o);return new Ml({...e.toConfig(),query:rf(i,rf(n,e.getQueryType())),mutation:rf(i,rf(n,e.getMutationType())),subscription:rf(i,rf(n,e.getSubscriptionType())),types:Object.values(i),directives:s})}function nC(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=cse(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 sse(e,t,n){const r=hse(n);return r?nC(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 gy(new Er({...i,values:l}))}},o=>Rt(o)):e}function D5(e,t,n){const r=L5(e,t,{[ot.ARGUMENT]:o=>{if(o.defaultValue===void 0)return o;const i=my(e,o.type);if(i!=null)return{...o,defaultValue:n(i,o.defaultValue)}}});return I5(r,t,{[ot.INPUT_OBJECT_FIELD]:o=>{if(o.defaultValue===void 0)return o;const i=my(r,o.type);if(i!=null)return{...o,defaultValue:n(i,o.defaultValue)}}})}function my(e,t){if(vt(t)){const n=my(e,t.ofType);return n!=null?new zt(n):null}else if(He(t)){const n=my(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 I5(e,t,n){const r={};for(const o in e)if(!o.startsWith("__")){const i=e[o];if(!We(i)&&!Je(i)&&!gt(i)){r[o]=i;continue}const s=fse(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)}We(i)?r[o]=gy(new $n({...l,fields:f})):Je(i)?r[o]=gy(new $r({...l,fields:f})):r[o]=gy(new Vr({...l,fields:f}))}return r}function L5(e,t,n){const r={};for(const o in e)if(!o.startsWith("__")){const i=e[o];if(!We(i)&&!Je(i)){r[o]=i;continue}const s=dse(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}}We(i)?r[o]=new $n({...l,fields:f}):Je(i)?r[o]=new $r({...l,fields:f}):r[o]=new Vr({...l,fields:f})}return r}function ase(e,t,n){const r=pse(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 lse(e,t){var o,i,s;const n=e.getType(t),r=[ot.TYPE];return We(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):Je(n)?r.push(ot.COMPOSITE_TYPE,ot.ABSTRACT_TYPE,ot.INTERFACE_TYPE):Mt(n)?r.push(ot.COMPOSITE_TYPE,ot.ABSTRACT_TYPE,ot.UNION_TYPE):Rt(n)?r.push(ot.ENUM_TYPE):or(n)&&r.push(ot.SCALAR_TYPE),r}function cse(e,t,n){const r=lse(e,n);let o;const i=[...r];for(;!o&&i.length>0;){const s=i.pop();o=t[s]}return o??null}function use(e,t){var o,i,s;const n=e.getType(t),r=[ot.FIELD];return We(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)):Je(n)?r.push(ot.COMPOSITE_FIELD,ot.INTERFACE_FIELD):gt(n)&&r.push(ot.INPUT_OBJECT_FIELD),r}function fse(e,t,n){const r=use(e,n);let o;const i=[...r];for(;!o&&i.length>0;){const s=i.pop();o=t[s]}return o??null}function dse(e){const t=e[ot.ARGUMENT];return t??null}function pse(e){const t=e[ot.DIRECTIVE];return t??null}function hse(e){const t=e[ot.ENUM_VALUE];return t??null}function gy(e){if(We(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(Je(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 $r(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 Vr(t)}else if(Rt(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 nh(e,t=!1,n=!1,r=!1){if(n&&r){let i;if(e.every(l=>{if(Array.isArray(l)){if(i===void 0)return i=l.length,!0;if(i===l.length)return!0}return!1}))return new Array(i).fill(null).map((l,c)=>nh(e.map(f=>f[c]),t,n,r))}const o={};t&&Object.setPrototypeOf(o,Object.create(Object.getPrototypeOf(e[0])));for(const i of e)if(R5(i)){if(t){const s=Object.getPrototypeOf(o),l=Object.getPrototypeOf(i);if(l)for(const c of Object.getOwnPropertyNames(l)){const f=Object.getOwnPropertyDescriptor(l,c);Die(f)&&Object.defineProperty(s,c,f)}}for(const s in i)R5(i[s])?s in o?o[s]=nh([o[s],i[s]],t,n,r):Object.assign(o,{[s]:i[s]}):n&&Array.isArray(o[s])?Array.isArray(i[s])?r&&o[s].length===i[s].length?o[s]=nh([o[s],i[s]],t,n,r):o[s].push(...i[s]):o[s].push(i[s]):Object.assign(o,{[s]:i[s]})}return o}function R5(e){return e&&typeof e=="object"&&!Array.isArray(e)}function rC(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}function oC(e,t,n,r){let o,i,s;r&&(s=f=>{const d=r();return At(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:F5(f.value,t).then(M5,i)}let c;if(n){const f=n;c=d=>F5(d,f).then(M5,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 F5(e,t){return new Promise(n=>n(t(e)))}function M5(e){return{value:e,done:!1}}function P5(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:ZT(i)},s!==void 0){n[o]=s;return}o in n&&delete n[o]}function $5(e){let t=0;return n=>{let r;do r=`_v${(t++).toString()}_${n}`;while(r in e);return r}}function vy(e,t,n){return n==null||t==null?!1:t===n?!0:on(t)&&on(n)?qd(e,t,n):!1}function mse(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 yy 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 gse=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(Ht),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Pt,description:"Unique name"}}}),vse=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(Ht),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Pt,description:"Unique name"},initialCount:{defaultValue:0,type:zd,description:"Number of items to return immediately"}}});function of(e,t,n,r,o,i,s,l){for(const c of o.selections)switch(c.kind){case U.FIELD:{if(!sC(n,c))continue;i.add(yse(c),c);break}case U.INLINE_FRAGMENT:{if(!sC(n,c)||!V5(e,c,r))continue;const f=j5(n,c);if(f){const d=new yy;of(e,t,n,r,c.selectionSet,d,s,l),s.push({label:f.label,fields:d})}else of(e,t,n,r,c.selectionSet,i,s,l);break}case U.FRAGMENT_SPREAD:{const f=c.name.value;if(!sC(n,c))continue;const d=j5(n,c);if(l.has(f)&&!d)continue;const g=t[f];if(!g||!V5(e,g,r))continue;if(d||l.add(f),d){const m=new yy;of(e,t,n,r,g.selectionSet,m,s,l),s.push({label:d.label,fields:m})}else of(e,t,n,r,g.selectionSet,i,s,l);break}}}function iC(e,t,n,r,o){const i=new yy,s=[];return of(e,t,n,r,o,i,s,new Set),{fields:i,patches:s}}function sC(e,t){const n=As(Ig,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=As(Dg,t,e);return(r==null?void 0:r.if)!==!1}function V5(e,t,n){const r=t.typeCondition;if(!r)return!0;const o=Qn(e,r);return o===n?!0:sn(o)?e.getPossibleTypes(o).includes(n):!1}function yse(e){return e.alias?e.alias.value:e.name.value}function j5(e,t){const n=As(gse,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}const bse=Uie(function(t,n,r,o,i){const s=new yy,l=new Set,c=[],f={fields:s,patches:c};for(const d of i)d.selectionSet&&of(t,n,r,o,d.selectionSet,s,c,l);return f});function Ese(e,t){const n=$w(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}const fc=js(function(t){return Ese(t.document,t.operationName)});function Ka(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}async function wse(e){return{value:e,done:!0}}const U5=eC(function(t,n){return function(...o){return Reflect.apply(n,t,o)}});function xse(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||wse;return async function(c){const f=await t(c);return Reflect.apply(s,n,[f])}}else if(typeof i=="function")return U5(n,i);return i}})}function Sse(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 xse(l,t)}:typeof i=="function"?U5(n,i):i}})}function sf(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 Tse(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function aC(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]=aC(e[n],t[n]);else for(n in t){if(n==="__proto__"||n==="constructor"||n==="prototype")break;e[n]=aC(e[n],t[n])}return e}return t}function lC(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?aC(i[l],n):typeof(s=i[l])==typeof t?s:t[r]*0!==0||~(""+t[r]).indexOf(".")?{}:[]}function B5({incrementalResult:e,executionResult:t}){const n=["data",...e.path??[]];if(e.items)for(const r of e.items)lC(t,n,r),n[n.length-1]++;e.data&&lC(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&lC(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(r=>{B5({incrementalResult:r,executionResult:t})})}function Cse(e){return"subscribe"in e}function kse(e){let t,n={};return Cse(e)?t=e:(t=Nie({...e,webSocketImpl:m5,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 q5=globalThis.fetch,Nse=globalThis.FormData,_se=globalThis.File,z5=globalThis.TextDecoder,Ase=class{constructor({uri:t,name:n,type:r}){this.uri=t,this.name=n,this.type=r}};const Ose=Ase;var H5=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof Ose};const Dse=Ui(H5),Ise=H5;var Lse=function(t,n="",r=Ise){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 Rse=Ui(Lse);function Fse(e){return typeof e.createReadStream=="function"}function Mse({query:e,variables:t,operationName:n,extensions:r},{File:o=_se,FormData:i=Nse}){const s=Object.assign({},t),{clone:l,files:c}=Rse(s,"variables",b=>Dse(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(At(b))return b.then(x=>v(x,w));if(Pse(b))m.append(N,b,S);else if(Fse(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 Wt.all(d.map((b,w)=>new Wt(()=>v(b,w)))).then(()=>m).resolve()}function Pse(e){return typeof e.arrayBuffer=="function"}const W5=new WeakMap;function $se(e){let t=W5.get(e);return t||(t=ft(e),W5.set(e,t)),t}function G5(e,t){return Sse(e,()=>{t.signal.aborted||t.abort()})}const Y5=`
`;async function*Vse(e){var r,o;const t=new z5;let n="";e:for await(const i of e)for(n+=typeof i=="string"?i:t.decode(i);;){const s=n.indexOf(Y5);if(s===-1)continue e;const l=n.slice(0,s);n=n.slice(s+Y5.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 cC=function(e,t){return cC=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])},cC(e,t)};function jse(e,t){cC(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function af(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 lf(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 rh(e){return this instanceof rh?(this.v=e,this):new rh(e)}function Use(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 rh?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 Q5=function(e){jse(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 uC(e){e!=null&&typeof e.then=="function"&&e.then(wy,wy)}var fC=0,K5=1,dc=2,by=3,dC=4,Ey=1024,wy=function(){};function cf(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>=by;return Promise.resolve(t).then(function(r){return!n&&e.state>=dC?cf(e).then(function(o){return{value:o,done:!0}}):{value:r,done:n}})}function pC(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))oh(e);else try{for(var o=lf(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 oh(e){var t,n;if(!(e.state>=by)){e.state<dc&&pC(e),e.state=by,e.buffer=void 0;try{for(var r=lf(e.nexts),o=r.next();!o.done;o=r.next()){var i=o.value,s=e.pending===void 0?cf(e):e.pending.then(function(){return cf(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 J5(e){e.state>=dC||(e.state<by&&oh(e),e.state=dC)}function Bse(e,t){if(uC(t),e.pushes.length>=Ey)throw new Q5("No more than "+Ey+" 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),J5(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,J5(e)}),s}function qse(e){var t=pC.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 zse(e){if(!(e.state>=K5)){e.state=K5;var t=Bse.bind(null,e),n=qse(e);e.execution=new Promise(function(r){return r(e.executor(t,n))}),e.execution.catch(function(){return pC(e)})}}var xy=new WeakMap,ih=function(){function e(t,n){xy.set(this,{executor:t,buffer:n,err:void 0,state:fC,pushes:[],nexts:[],pending:void 0,execution:void 0,onnext:wy,onstop:wy})}return e.prototype.next=function(t){uC(t);var n=xy.get(this);if(n===void 0)throw new Error("WeakMap error");if(n.nexts.length>=Ey)throw new Q5("No more than "+Ey+" pending calls to next are allowed on a single repeater.");if(n.state<=fC&&zse(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 oh(n),pc(n,cf(n));return new Promise(function(s){return n.nexts.push({resolve:s,value:t})})},e.prototype.return=function(t){uC(t);var n=xy.get(this);if(n===void 0)throw new Error("WeakMap error");return oh(n),n.execution=Promise.resolve(n.execution).then(function(){return t}),pc(n,cf(n))},e.prototype.throw=function(t){var n=xy.get(this);if(n===void 0)throw new Error("WeakMap error");return n.state<=fC||n.state>=dc||typeof n.buffer<"u"&&!n.buffer.empty?(oh(n),n.err==null&&(n.err=t),pc(n,cf(n))):this.next(Promise.reject(t))},e.prototype[Symbol.asyncIterator]=function(){return this},e.race=Hse,e.merge=Wse,e.zip=Gse,e.latest=Yse,e}();function Sy(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 Use(this,arguments,function(){return Ja(this,function(m){switch(m.label){case 0:return t.yieldValues?[4,rh(f)]:[3,3];case 1:return[4,m.sent()];case 2:m.sent(),m.label=3;case 3:return t.returnValues?[4,rh(f)]:[3,5];case 4:return[2,m.sent()];case 5:return[2]}})})}())};try{for(var s=lf(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 Hse(e){var t=this,n=Sy(e,{returnValues:!0});return new ih(function(r,o){return af(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,lf(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 Wse(e){var t=this,n=Sy(e,{yieldValues:!0});return new ih(function(r,o){return af(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=lf(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 af(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 Gse(e){var t=this,n=Sy(e,{returnValues:!0});return new ih(function(r,o){return af(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 Yse(e){var t=this,n=Sy(e,{yieldValues:!0,returnValues:!0});return new ih(function(r,o){return af(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=lf(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 af(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 Qse(e){const t=new z5;return new ih(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 Kse(e){return e&&typeof e.getReader=="function"}function Jse(e,t){const n=e.body;if(n){if(Ka(n)){const r=Vse(n);return t?G5(r,t):r}if(Kse(n))return Qse(n)}throw new Error("Response body is expected to be a readable stream but got; "+cr(n))}async function Xse(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 D;for(;D=_.shift();)D=D.split(": "),C[D.shift().toLowerCase()]=D.join(": ");const I=S.lastIndexOf(`\r
`,E);let O=S.slice(E,I>-1?void 0:I),R=!1;if(D=C["content-type"],D&&~D.indexOf("application/json"))try{O=JSON.parse(String(O)),R=!0}catch{}if(D={headers:C,body:O,json:R},f?yield D:v.push(D),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 Zse(e){return e!=null&&typeof e=="object"&&"pipe"in e}async function eae(e,t){const n=e.body,r=e.headers.get("content-type")||"";let o;if(Zse(n)){n.headers={"content-type":r};const l=await Xse(n);"next"in l&&(o=l)}else{const l=await hq(e);"next"in l&&(o=l)}const i={};if(o==null)return i;const s=oC(o,l=>{if(l.json){const c=l.body;return B5({incrementalResult:c,executionResult:i}),i}});return t?G5(s,t):s}const X5=js(function(t){var n;return t.operation==="query"&&((n=t.directives)==null?void 0:n.some(r=>r.name.value==="live"))});function tae({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",K2(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 nae(e){const t=(e==null?void 0:e.print)??$se,n=r=>{var w,N,S,x,C;const o=((w=r.extensions)==null?void 0:w.fetch)??(e==null?void 0:e.fetch)??q5;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"||X5(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 Wt(()=>{switch(s){case"GET":{const E=tae({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 Wt(()=>Mse({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")?Jse(E,i):_!=null&&_.includes("multipart/mixed")?eae(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 Wt(()=>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 uf=null;typeof WebSocket<"u"?uf=WebSocket:typeof MozWebSocket<"u"?uf=MozWebSocket:typeof global<"u"?uf=global.WebSocket||global.MozWebSocket:typeof window<"u"?uf=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(uf=self.WebSocket||self.MozWebSocket);const Z5=uf;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 rae(e,t,n){let r={},o=null;const i=(l=c=>console.error(c))=>{(o==null||o.readyState!==Z5.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 mse({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)===Z5.OPEN&&(o==null||o.send(JSON.stringify({type:Jo.STOP,id:f}))),s()}}}})}}const hC=eC(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 oae{constructor(t){this.name=t.name,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=hC(this.schema,this)),this._transformedSchema}set transformedSchema(t){this._transformedSchema=t}}function iae(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}const sae=new WeakMap,e4=Symbol("PLAN_LEFT_OVER");function t4(e){if(e!=null&&typeof e=="object")return e[e4]}const hc=Symbol.for("subschemaErrors"),mC=Symbol.for("initialSubschema"),sh=Symbol.for("subschemaMap");function Ty(e){return e[hc]!==void 0}function aae(e,t,n,r){return Object.defineProperties(e,{[mC]:{value:n},[sh]:{value:r},[hc]:{value:t}}),e}function gC(e,t){var n;return((n=e[sh])==null?void 0:n[t])??e[mC]}function n4(e){return e[hc]}const lae=[],Cy=Object.create(null),cae=js(function(e){return[e]});function uae(e,t,n,r,o){var f;const i=e.delegationPlanBuilder(o.schema,n,o.variableValues!=null&&Object.keys(o.variableValues).length>0?o.variableValues:Cy,o.fragments!=null&&Object.keys(o.fragments).length>0?o.fragments:Cy,(f=o.fieldNodes)!=null&&f.length?o.fieldNodes.length===1?cae(o.fieldNodes[0]):o.fieldNodes:lae),s=sae.get(i);s&&(t[e4]=s);const l=i.reduce((d,g)=>{function m(){return fae(e,g,t,r,o)}return At(d)?d.then(m):m()},void 0);function c(){return t}return At(l)?l.then(c):c()}function ah(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}=iC(d,Cy,Cy,g,n),v={};for(const[b,w]of m){const N=[...s,b];e instanceof he?v[b]=XT(e,N):e instanceof Error?v[b]=vn(e,w,N):v[b]=null}e=v}else e[hc]&&l.push(...e[hc]);const c=e[mC],f=e[sh];for(const d in e){if(d==="__proto__")continue;const g=r[d],m=e[d];d==="__typename"&&g!==m&&sn(t.transformedSchema.getType(m))||((m!=null||g==null)&&(g!=null&&typeof g=="object"&&Object.keys(g).length>0?Array.isArray(g)&&Array.isArray(m)&&g.length===m.length?r[d]=g.map((v,b)=>m instanceof Error?v:nh([v,m[b]])):m instanceof Error||(r[d]=nh([g,m])):r[d]=m),o[d]=(f==null?void 0:f[d])??c??t)}}function fae(e,t,n,r,o){const i=n[hc],s=wr(o.path),l=n[sh],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);At(b)?c.push(b.then(w=>ah(w,f,d,n,l,o,s,i)).catch(w=>ah(w,f,d,n,l,o,s,i))):ah(b,f,d,n,l,o,s,i)}catch(b){ah(b,f,d,n,l,o,s,i)}}if(c.length)return c.length===1?c[0]:Promise.all(c)}function lh(e,t,n,r,o,i=mae(o),s){const l=Ca(i);if(e instanceof Error)return e;if(e==null)return hae(t);if("parseValue"in l)return l.parseValue(e);if(on(l))return dae(l,e,t,n,r,o,s);if(vt(l))return Array.isArray(e)?pae(l,e,t,n,r,o,s):lh(e,t,n,r,o,l.ofType,s)}function dae(e,t,n,r,o,i,s){var d,g,m,v;if(Ty(t)||aae(t,n,r,Object.create(null)),s||i==null)return t;const l=(d=i.schema.extensions)==null?void 0:d.stitchingInfo;if(l==null)return t;let c;const f=[t.__typename,e.name];for(const b of f)if(b!=null&&((v=(m=(g=l.mergedTypes[b])==null?void 0:g.targetSubschemas)==null?void 0:m.get(r))!=null&&v.length)){c=l.mergedTypes[b];break}return c?uae(c,t,r,o,i):t}function pae(e,t,n,r,o,i,s){return t.map(l=>lh(l,n,r,o,i,e.ofType,s))}const r4=new WeakMap;function hae(e){if(e.length){const t=[];for(const n of e)r4.has(n)||(t.push(n),r4.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 vn(n,void 0,t[0].path)}}return null}function mae(e){if(e==null)throw new Error("Return type cannot be inferred without a source schema.");return e.returnType}function gae(e={data:null,errors:[]},t){const{context:n,info:r,fieldName:o=vae(r),subschema:i,returnType:s=yae(r),skipTypeMerging:l,onLocatedError:c}=t,{data:f,unpathedErrors:d}=o4(e.data==null?void 0:e.data[o],e.errors==null?[]:e.errors,r!=null&&r.path?wr(r.path):void 0,c);return lh(f,d,i,n,r,s,l)}function o4(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:XT(t[0],g),unpathedErrors:[]}}const c=new AggregateError(t,t.map(d=>d.message).join(`,
`));return{data:vn(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}=o4(e[c],f,n,r,o+1);e[c]=d,i.push(...g)}else i.push(...f);return{data:e,unpathedErrors:i}}function vae(e){if(e==null)throw new Error("Data cannot be extracted from result without an explicit key or source schema.");return rC(e)}function yae(e){if(e==null)throw new Error("Return type cannot be inferred without a source schema.");return e.returnType}function i4(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 bae(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=dy(e,g.operation),{selectionSet:v,usedFragments:b,usedVariables:w}=s4(e,m,c,g.selectionSet);o=ch(o,b);const{usedVariables:N,newFragments:S,fragmentSet:x}=Sae(e,f,l,c,o),C=ch(w,N);r=ch(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 Eae(e,t){let{document:n,variables:r}=e,{operations:o,fragments:i}=i4(n);const{targetSchema:s,args:l}=t;if(l){const g=wae(s,o,l);o=g.newOperations,r=Object.assign({},r??{},g.newVariables)}const{usedVariables:c,newDocument:f}=bae(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 wae(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=dy(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&&xae(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 xae(e,t,n,r,o){const i=$5(n);for(const s of e.args){const l=s.name,c=s.type;l in o&&P5(t,n,r,l,i(l),c,hy(c,o[l]))}}function Sae(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}=s4(e,m,r,f.selectionSet);i=ch(i,b),s=ch(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 Tae={SelectionSet:["selections"],Field:["selectionSet"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]},Cae={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 s4(e,t,n,r){const o=[],i=[],s=GE.major<16?new _s(e,void 0,t):new _s(e,t),l=Jt(r,$l(s,{[U.FIELD]:{enter:c=>{const f=s.getParentType();if(We(f)||Je(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}}}if(Mt(f)&&s.getType()==null){const d=[];for(const g of f.getTypes())g.getFields()[c.name.value]!=null&&d.push(g.name);if(d.length>0)return d.map(g=>({kind:U.INLINE_FRAGMENT,typeCondition:{kind:U.NAMED_TYPE,name:{kind:U.NAME,value:g}},selectionSet:{kind:U.SELECTION_SET,selections:[c]}}))}},leave:c=>{var g;const f=s.getType();if(f==null)return console.warn(`Invalid type for node: ${(g=s.getParentType())==null?void 0:g.name}.${c.name.value}`),null;const d=yt(f);if(!e.getType(d.name)==null)return null;if(We(d)||Je(d)){const m=c.selectionSet!=null?c.selectionSet.selections:null;if(m==null||m.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(!vy(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(Mt(f)&&f.getTypes().some(g=>g.name===(d==null?void 0:d.name)))return c;if(!vy(e,f,d))return null}},leave:c=>{var f,d;if(!((d=(f=c.selectionSet)==null?void 0:f.selections)!=null&&d.length))return null}},[U.SELECTION_SET]:{leave:c=>{const f=s.getParentType();if(f!=null&&sn(f)){const d=c.selections.concat([{kind:U.FIELD,name:{kind:U.NAME,value:"__typename"}}]);return{...c,selections:d}}}}}),Tae);return Jt(l,{[U.VARIABLE]:c=>{i.push(c.name.value)}},Cae),{selectionSet:l,usedFragments:o,usedVariables:i}}function ch(...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}const a4=Symbol("OverlappingAliases");class kae{transformRequest(t,n,r){const o=Jt(t.document,{[U.SELECTION_SET]:i=>{const s=new Set,l=new Set;return{...i,selections:i.selections.map(c=>{var f;if(c.kind===U.INLINE_FRAGMENT){const d=(f=c.typeCondition)==null?void 0:f.name.value;if(d){const g=n.transformedSchema.getType(d);if(g&&"getFields"in g){const m=g.getFields();return{...c,selectionSet:{...c.selectionSet,selections:c.selectionSet.selections.map(v=>{if(v.kind===U.FIELD){const b=v.name.value;if(!v.alias){const w=m[b];if(w){let N;if(Tg(w.type)?(l.add(b),N=!0):(s.add(b),N=!1),l.has(b)&&s.has(b))return r[a4]=!0,{...v,alias:{kind:U.NAME,value:N?`_nullable_${b}`:`_nonNullable_${b}`}}}}}return v})}}}}}return c})}}});return{...t,document:o}}transformResult(t,n,r){return r[a4]?ky(t):t}}function ky(e){if(e!=null){if(Array.isArray(e))return e.map(ky);if(typeof e=="object"){const t={};for(const n in e)if(n.startsWith("_nullable_")||n.startsWith("_nonNullable_")){const r=n.replace(/^_nullable_/,"").replace(/^_nonNullable_/,"");t[r]=ky(e[n])}else t[n]=ky(e[n]);return t}}return e}const Nae=C5(function e(t,n,r,o){if(Yn(n))return[];if(Mt(n)){const l=[];for(const c of n.getTypes()){const f={...r,selections:r.selections.filter(d=>d.kind===U.INLINE_FRAGMENT?d.typeCondition?d.typeCondition.name.value===c.name:!1:!0)};l.push(...e(t,c,f,o))}return l}const i=n.getFields(),s=[];for(const l of r.selections)if(l.kind===U.FIELD){if(l.name.value==="__typename")continue;const c=l.name.value,f=i[c];if(!f)o(n,l)&&s.push(l);else{const d=l4(t,f,l,o);d.length&&s.push({...l,selectionSet:{kind:U.SELECTION_SET,selections:d}})}}else if(l.kind===U.INLINE_FRAGMENT){const c=l.typeCondition?t.getType(l.typeCondition.name.value):n;if(c===n||(We(c)||Je(c))&&sn(n)&&t.isSubType(n,c)){const f=e(t,c,l.selectionSet,o);f.length&&s.push({...l,selectionSet:{kind:U.SELECTION_SET,selections:f}})}}return s}),l4=C5(function(t,n,r,o){if(r.selectionSet){const i=yt(n.type);return Nae(t,i,r.selectionSet,o)}return[]});function _ae(e,t,n,r){let o=Rae(n,t,e);if(r==null)return o;const i=new WeakSet;o=Jt(o,{[U.SELECTION_SET](E){const _=[];for(const D of E.selections){if(D.kind===U.INLINE_FRAGMENT&&D.typeCondition!=null&&!i.has(D)){i.add(D);const I=D.typeCondition.name.value,O=r.getType(I);if(sn(O)){const P=r.getPossibleTypes(O);for(const B of P)_.push({...D,typeCondition:{kind:U.NAMED_TYPE,name:{kind:U.NAME,value:B.name}}})}const R=t.getType(I);if(!R)for(const P of D.selectionSet.selections)_.push(P);if(R&&"getFields"in R){const P=R.getFields();for(const B of D.selectionSet.selections)if(B.kind===U.FIELD){const H=B.name.value;P[H]||_.push(B)}}}_.push(D)}return{...E,selections:_}}});const{possibleTypesMap:s,reversePossibleTypesMap:l,interfaceExtensionsMap:c,fieldNodesByType:f,fieldNodesByField:d,dynamicSelectionSetsByField:g}=Dae(r,t),{operations:m,fragments:v,fragmentNames:b}=i4(o),{expandedFragments:w,fragmentReplacements:N}=Lae(v,b,s),S=new _s(t),x={kind:U.DOCUMENT,definitions:[...m,...v,...w]},C={Document:["definitions"],OperationDefinition:["selectionSet"],SelectionSet:["selections"],Field:["selectionSet"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]};return Jt(x,$l(S,{[U.SELECTION_SET]:E=>Oae(E,N,t,S,s,l,c,f,d,g)}),C)}const Aae=()=>!0;function Oae(e,t,n,r,o,i,s,l,c,f){var m,v,b,w;const d=new Set,g=r.getParentType();if(g!=null){const N=yt(g),S=N.name,x=l[S];if(x)for(const _ of x)d.add(_);const C=s[N.name],E=[];for(const _ of e.selections)if(_.kind===U.INLINE_FRAGMENT){if(_.typeCondition!=null){const D=o[_.typeCondition.name.value];if(D==null){const I=(m=c[S])==null?void 0:m.__typename;if(I)for(const O of I)d.add(O);d.add(_);continue}for(const I of D){const O=n.getType(I);O!=null&&vy(n,N,O)&&d.add(c4(I,_.selectionSet))}D.length===0&&d.add(_)}}else if(_.kind===U.FRAGMENT_SPREAD){const D=_.name.value;if(!t[D]){d.add(_);continue}for(const I of t[D]){const O=I.typeName;n.getType(O)!=null&&vy(n,N,g)&&d.add({kind:U.FRAGMENT_SPREAD,name:{kind:U.NAME,value:I.fragmentName}})}}else{const D=_.name.value;let I=!1;if(sn(N)){I=!1;const O=(v=c[S])==null?void 0:v.__typename;if(O)for(const R of O)d.add(R)}else if(We(N)||Je(N)){const R=N.getFields()[D];R&&(I=l4(n,R,_,Aae).length===0)}if(!I){const O=(b=c[S])==null?void 0:b[D];if(O!=null)for(const P of O)d.add(P);const R=(w=f[S])==null?void 0:w[D];if(R!=null)for(const P of R){const B=P(_);if(B!=null)for(const H of B.selections)d.add(H)}}C!=null&&C[D]?E.push(_):d.add(_)}if(i[N.name]&&d.add({kind:U.FIELD,name:{kind:U.NAME,value:"__typename"}}),E.length){const _=o[N.name];if(_!=null)for(const D of _)d.add(c4(D,{kind:U.SELECTION_SET,selections:E}))}return{...e,selections:Array.from(d)}}return e}function c4(e,t){return{kind:U.INLINE_FRAGMENT,typeCondition:{kind:U.NAMED_TYPE,name:{kind:U.NAME,value:e}},selectionSet:t}}const Dae=eC((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(sn(f)){const d=r[c];if(Je(f)&&Je(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]||!sn(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:Iae(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 Iae(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 Lae(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 Rae(e,t,n){const r=yt(e);if(Yn(r))return n;let o=sn(r)?t.getPossibleTypes(r):[r];o.length===0&&(o=[r]);const i=qie(t),s=new _s(t),l={Document:["definitions"],OperationDefinition:["selectionSet"],SelectionSet:["selections"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]};return Jt(n,$l(s,{[U.FRAGMENT_DEFINITION]:c=>{const f=c.typeCondition.name.value;if(!i.has(f))return!1},[U.FIELD]:c=>{const f=s.getType();if(f){const d=yt(f);if(sn(d)&&d.name!==r.name&&o.length>0)return{...c,selectionSet:{kind:U.SELECTION_SET,selections:o.map(g=>({kind:U.INLINE_FRAGMENT,typeCondition:{kind:U.NAMED_TYPE,name:{kind:U.NAME,value:g.name}},selectionSet:c.selectionSet}))}}}}}),l)}class Fae{constructor(t){this.transformations=[],this.delegationContext=t;const r=t.transforms.slice().reverse();for(const o of r)this.addTransform(o);this.addTransform(new kae)}addTransform(t,n={}){this.transformations.push({transform:t,context:n})}transformRequest(t){var r;let n={...t,document:_ae(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 Eae(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 gae(n,this.delegationContext)}}function Mae(e,t){return e===t.getMutationType()?"mutation":e===t.getSubscriptionType()?"subscription":"query"}function Pae({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 O,R;let b;const w=Object.create(null);if(d!=null)b=d;else{const P=[];for(const H of g||[])if(H.selectionSet)for(const z of H.selectionSet.selections)P.push(z);b=P.length?{kind:U.SELECTION_SET,selections:P}:void 0;const B=(O=g==null?void 0:g[0])==null?void 0:O.arguments;if(B)for(const H of B)w[H.name.value]=H}const N=Object.create(null),S=Object.create(null);if(e!=null&&o!=null)for(const P of o){const B=P.variable.name.value;S[B]=P;const H=Qn(e,P.type),z=hy(H,i==null?void 0:i[B]);z!==void 0&&(N[B]=z)}t!=null&&n!=null&&$ae(t,n,w,S,N);const x=f??((R=g==null?void 0:g[0])==null?void 0:R.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,D=[{kind:U.OPERATION_DEFINITION,name:E,operation:c,variableDefinitions:Object.values(S),selectionSet:{kind:U.SELECTION_SET,selections:[C]}}];if(r!=null)for(const P in r){const B=r[P];D.push(B)}return{document:{kind:U.DOCUMENT,definitions:D},variables:N,rootValue:s,operationName:l,context:m,info:v,operationType:c}}function $ae(e,t,n,r,o){const i=$5(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&&P5(n,r,o,c,i(c),f,hy(f,d))}}}function Vae(e,t,n,r){if(!e)return null;const o=rC(r);if(!Ty(e))return nv(e,t,n,r);if(!Object.prototype.hasOwnProperty.call(e,o)){const i=t4(e);if(i){let s=i.missingFieldsParentMap.get(e);s||(s=[],i.missingFieldsParentMap.set(e,s)),s.push(...r.fieldNodes.filter(f=>i.unproxiableFieldNodes.some(d=>d===f)));let l=i.missingFieldsParentDeferredMap.get(e);l||(l=new Map,i.missingFieldsParentDeferredMap.set(e,l));const c=iae();return l.set(o,c),c.promise}return}return u4(e,o,n,r)}function u4(e,t,n,r){const o=gC(e,t),i=e[t],s=n4(e),l=lh(i,s,o,n,r),c=t4(e);if(c){if(At(l))return l.then(f=>(e[t]=f,f4(e,n,r,c),f));e[t]=l,f4(e,n,r,c)}return l}function f4(e,t,n,r){var i;const o=(i=n.schema.extensions)==null?void 0:i.stitchingInfo;if(o)for(const s of r.nonProxiableSubschemas){const l=n.parentType.name,c=o.mergedTypes[l].selectionSets.get(s);if(c){const f=_y(e);At(f)?f.then(d=>{d4(d,s,c,r,o,l,t,n)}):d4(f,s,c,r,o,l,t,n)}}}function d4(e,t,n,r,o,i,s,l){if(Ny(e,n))for(const[c,f]of r.missingFieldsParentMap){const d=o.mergedTypes[i].resolvers.get(t);if(d)try{Object.assign(c,e);const g={kind:U.SELECTION_SET,selections:f},m=d(c,s,l,t,g,l.parentType,l.parentType);At(m)?m.then(v=>p4(v,t,g,c,r,s,l)).catch(v=>h4(r,c,v)):p4(m,t,g,c,r,s,l)}catch(g){h4(r,c,g)}}}function p4(e,t,n,r,o,i,s){ah(e,t,n,r,r[sh],s,wr(s.path),r[hc]);const l=o.missingFieldsParentDeferredMap.get(r);if(l){for(const[c,f]of l)Object.prototype.hasOwnProperty.call(e,c)&&f.resolve(u4(r,c,i,s));o.missingFieldsParentDeferredMap.delete(r)}}function h4(e,t,n){const r=e.missingFieldsParentDeferredMap.get(t);if(r){for(const[o,i]of r)i.reject(n);e.missingFieldsParentDeferredMap.delete(t)}}function Ny(e,t){var r;if(Array.isArray(e)){const o=new Set;for(const i of e){const s=Ny(i,t);if(s===void 0)return;for(const l of s)o.add(l)}return o}if(e===null)return new Set;if(e===void 0)return;const n=new Set;for(const o of t.selections)if(o.kind===U.FIELD){const i=((r=o.alias)==null?void 0:r.value)??o.name.value;if(e[i]===void 0)return;if(Ty(e)){const s=gC(e,i);s&&n.add(s)}if(e[i]===null)continue;if(o.selectionSet!=null){const s=Ny(e[i],o.selectionSet);if(s===void 0)return;for(const l of s)n.add(l)}}else if(o.kind===U.INLINE_FRAGMENT){const i=Ny(e,o.selectionSet);if(i===void 0)return;for(const s of i)n.add(s)}return n}function _y(e){if(At(e))return e.then(_y);if(Array.isArray(e))return Promise.all(e.map(_y));if(e!=null&&typeof e=="object"){const t=[],n={};for(const r in e){const o=_y(e[r]);At(o)?t.push(o.then(i=>{n[r]=i})):n[r]=o}return t.length?Promise.all(t).then(()=>n):n}return e}var jae=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=zae(r),this._batchScheduleFn=Hae(r),this._cacheKeyFn=Wae(r),this._cacheMap=Gae(r),this._batch=null,this.name=Yae(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=Bae(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(!m4(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}(),Uae=typeof process=="object"&&typeof process.nextTick=="function"?function(e){vC||(vC=Promise.resolve()),vC.then(function(){process.nextTick(e)})}:typeof setImmediate=="function"?function(e){setImmediate(e)}:function(e){setTimeout(e)},vC;function Bae(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(){qae(e,n)}),n}function qae(e,t){if(t.hasDispatched=!0,t.keys.length===0){bC(t);return}var n;try{n=e._batchLoadFn(t.keys)}catch(r){return yC(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 yC(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(!m4(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)));bC(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){yC(e,t,r)})}function yC(e,t,n){bC(t);for(var r=0;r<t.keys.length;r++)e.clear(t.keys[r]),t.callbacks[r].reject(n)}function bC(e){if(e.cacheHits)for(var t=0;t<e.cacheHits.length;t++)e.cacheHits[t]()}function zae(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 Hae(e){var t=e&&e.batchScheduleFn;if(t===void 0)return Uae;if(typeof t!="function")throw new TypeError("batchScheduleFn must be a function: "+t);return t}function Wae(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 Gae(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 Yae(e){return e&&e.name?e.name:null}function m4(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 Qae=jae;const g4=Ui(Qae);function Kae(e){return`_${e}_`}function v4(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 Jae(e){const t=v4(e);if(!t)throw new Error(`Key ${e} is not correctly prefixed`);return t}function Xae(e){let t=0,n=null;for(;!n&&t<e.length;t++){const r=e[t];typeof r=="string"&&(n=v4(r))}if(!n)throw new Error(`Path ${e.join(".")} does not contain correctly prefixed key`);return{...n,keyOffset:t}}function Zae(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=ele(Kae(b),w);for(const S of N.document.definitions)ole(S)&&(o.push(...S.selectionSet.selections),S.variableDefinitions&&r.push(...S.variableDefinitions)),Ay(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 ele(e,t){const n=t.variables??{};function r(f){return E4(f,e)}let o=tle(e,t.document);const i=Object.keys(n),s=t.document.definitions.some(f=>Ay(f)),l={};(i.length>0||s)&&(o=Jt(o,{[U.VARIABLE]:r,[U.FRAGMENT_DEFINITION]:r,[U.FRAGMENT_SPREAD]:f=>(f=E4(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=>!Ay(f)||l[f.name.value])}),{document:o,variables:c}}function tle(e,t){const n={[U.OPERATION_DEFINITION]:r=>{const{selections:o}=r.selectionSet;return{...r,selectionSet:{...r.selectionSet,selections:y4(e,o,t)}}}};return Jt(t,n,{[U.DOCUMENT]:["definitions"]})}function y4(e,t,n){return t.map(r=>{switch(r.kind){case U.INLINE_FRAGMENT:return b4(e,r,n);case U.FRAGMENT_SPREAD:{const o=nle(r,n);return b4(e,o,n)}case U.FIELD:default:return rle(r,e)}})}function b4(e,t,n){const{selections:r}=t.selectionSet;return{...t,selectionSet:{...t.selectionSet,selections:y4(e,r,n)}}}function nle(e,t){const n=t.definitions.find(i=>Ay(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 E4(e,t){return{...e,name:{...e.name,value:t+e.name.value}}}function rle(e,t){const n=e.alias?e.alias:e.name;return{...e,alias:{...n,value:t+n.value}}}function ole(e){return e.kind===U.OPERATION_DEFINITION}function Ay(e){return e.kind===U.FRAGMENT_DEFINITION}function ile({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}=Jae(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}=Xae(o.path),c=XT(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 sle(e,t,n=lle){const r=ale(e,n),o=new g4(r,t),i=new g4(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 ale(e,t){return function(r){if(r.length===1)return new Wt(()=>e(r[0])).then(i=>[i]).catch(i=>[i]);const o=Zae(r,t);return new Wt(()=>e(o)).then(i=>{if(Ka(i))throw new Error("Executor must not return incremental results for batching");return ile(i,r.length)})}}function lle(e,t){const n=t.extensions;return n!=null&&Object.assign(e,n),e}const cle=Bie(function(t,n,r,o){return sle(n,r,o)});function ule(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 w4(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}async function x4(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 fle(e,t,n,r){const o=[],i=r==null?void 0:r.maxErrors;try{const s=dle(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 dle(e,t,n,r){const o={};for(const i of t){const s=i.variable.name.value,l=Qn(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(!S5(n,s)){if(i.defaultValue)o[s]=Ho(i.defaultValue,l);else if(He(l)){const f=cr(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=cr(l);r(ut(`Variable "$${s}" of non-null type "${f}" must not be null.`,{nodes:i}));continue}o[s]=Nw(c,l,(f,d,g)=>{let m=`Variable "$${s}" got invalid value `+cr(d);f.length>0&&(m+=` at "${s}${Tse(f)}"`),r(ut(m+"; "+g.message,{nodes:i,originalError:g.originalError}))})}return o}const ple=jie((e,t,n)=>bse(e.schema,e.fragments,e.variableValues,t,n));function hle(e){const t=C4(e);return"schema"in t?S4(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 S4(e){var n;if((n=e.signal)!=null&&n.aborted)throw e.signal.reason;return new Wt(()=>vle(e)).then(r=>{const o=T4(r,e.errors);return e.subsequentPayloads.size>0?{initialResult:{...o,hasNext:!0},subsequentResults:Ile(e)}:o},r=>{var o;if((o=e.signal)!=null&&o.aborted)throw e.signal.reason;return e.errors.push(r),T4(null,e.errors)}).resolve()}function T4(e,t){return t.length===0?{data:e}:{errors:t,data:e}}const mle=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 C4(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;$g(t);const g=mle(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=fle(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??L4,typeResolver:c??Sle,subscribeFieldResolver:f??L4,subsequentPayloads:new Set,errors:[],signal:d}}function gle(e,t){return{...e,rootValue:t,subsequentPayloads:new Set,errors:[]}}function vle(e){const{operation:t,schema:n,fragments:r,variableValues:o,rootValue:i}=e,s=dy(n,t.operation,[t]);s==null&&ut(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const{fields:l,patches:c}=iC(n,r,o,s,t.selectionSet),f=void 0;let d;t.operation==="mutation"?d=yle(e,s,i,f,l):d=EC(e,s,i,f,l);for(const g of c){const{label:m,fields:v}=g;P4(e,s,i,v,m,f)}return d}function yle(e,t,n,r,o){return Vie(o,(i,[s,l])=>{var f;const c=sf(r,s,t.name);if((f=e.signal)!=null&&f.aborted)throw e.signal.reason;return new Wt(()=>k4(e,t,n,l,c)).then(d=>(d===void 0||(i[s]=d),i))},Object.create(null)).resolve()}function EC(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=sf(r,f,t.name),m=k4(e,t,n,d,g,i);m!==void 0&&(s[f]=m,At(m)&&(l=!0))}}catch(f){if(l)return x4(s,e.signal).finally(()=>{throw f});throw f}return l?x4(s,e.signal):s}function k4(e,t,n,r,o,i){const s=(i==null?void 0:i.errors)??e.errors,l=V4(e.schema,t,r[0]);if(!l)return;const c=l.type,f=l.resolve??e.fieldResolver,d=N4(e,l,r,t,o);try{const g=T5(l,r[0],e.variableValues),m=e.contextValue,v=f(n,g,m,d);let b;return At(v)?b=v.then(w=>Xa(e,c,r,d,o,w,i)):b=Xa(e,c,r,d,o,v,i),At(b)?b.then(void 0,w=>{const N=vn(w,r,Br(o)),S=ts(N,c,s);return Xo(e,o,i),S}):b}catch(g){const m=vn(g,r,Br(o)),v=ts(m,c,s);return Xo(e,o,i),v}}function N4(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 Ele(e,t,n,r,o,i,s);if(Yn(t))return wle(t,i);if(sn(t))return xle(e,t,n,r,o,i,s);if(We(t))return wC(e,t,n,r,o,i,s);console.assert(!1,"Cannot complete value of unexpected output type: "+cr(t))}function _4(e,t,n){if(typeof n.key=="number")return;const r=As(vse,t[0],e.variableValues);if(r&&r.if!==!1)return w4(typeof r.initialCount=="number","initialCount must be a number"),w4(r.initialCount>=0,"initialCount must be a positive integer"),{initialCount:r.initialCount,label:typeof r.label=="string"?r.label:void 0}}async function ble(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=_4(e,n,o);let f=!1;const d=[];let g=0;for(;;){if(c&&typeof c.initialCount=="number"&&g>=c.initialCount){Ole(g,i,e,n,r,t,o,c.label,s);break}const v=sf(o,g,void 0);let b;try{if(b=await i.next(),b.done)break}catch(w){const N=vn(w,n,Br(v));d.push(ts(N,t,l));break}A4(b.value,d,l,e,t,n,r,v,s)&&(f=!0),g+=1}return f?Promise.all(d):d}function Ele(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 ble(e,l,n,r,o,b,s)}if(!$ie(i))throw ut(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const f=_4(e,n,o);let d=!1,g=s;const m=[];let v=0;for(const b of i){const w=sf(o,v,void 0);if(f&&typeof f.initialCount=="number"&&v>=f.initialCount){g=_le(o,w,b,e,n,r,l,f.label,g),v++;continue}A4(b,m,c,e,l,n,r,w,s)&&(d=!0),v++}return d?Promise.all(m):m}function A4(e,t,n,r,o,i,s,l,c){try{let f;if(At(e)?f=e.then(d=>Xa(r,o,i,s,l,d,c)):f=Xa(r,o,i,s,l,e,c),At(f))return t.push(f.then(void 0,d=>{const g=vn(d,i,Br(l)),m=ts(g,o,n);return Xo(r,l,c),m})),!0;t.push(f)}catch(f){const d=vn(f,i,Br(l)),g=ts(d,o,n);Xo(r,l,c),t.push(g)}return!1}function wle(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 \`${cr(e)}.serialize(${cr(t)})\` to return non-nullable value, returned: ${cr(n)}`);return n}function xle(e,t,n,r,o,i,s){const l=t.resolveType??e.typeResolver,c=e.contextValue,f=l(i,c,r,t);return At(f)?f.then(d=>wC(e,O4(d,e,t,n,r,i),n,r,o,i,s)):wC(e,O4(f,e,t,n,r,i),n,r,o,i,s)}function O4(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(We(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 ${cr(i)}, received "${cr(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(!We(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 wC(e,t,n,r,o,i,s){if(t.isTypeOf){const l=t.isTypeOf(i,e.contextValue,r);if(At(l))return l.then(c=>{if(!c)throw D4(t,i,n);return I4(e,t,n,o,i,s)});if(!l)throw D4(t,i,n)}return I4(e,t,n,o,i,s)}function D4(e,t,n){return ut(`Expected value of type "${e.name}" but got: ${cr(t)}.`,{nodes:n})}function I4(e,t,n,r,o,i){const{fields:s,patches:l}=ple(e,t,n),c=EC(e,t,o,r,s,i);for(const f of l){const{label:d,fields:g}=f;P4(e,t,o,g,d,r,i)}return c}const Sle=function(e,t,n,r){if(x5(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(At(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})},L4=function(e,t,n,r){if(x5(e)||typeof e=="function"){const o=e[r.fieldName];return typeof o=="function"?e[r.fieldName](t,n,r):o}};function Tle(e){const t=C4(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=kle(t);return At(n)?n.then(r=>F4(t,r)):F4(t,n)}function R4(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*Cle(e){"initialResult"in e?yield*R4(e):yield e}function F4(e,t){return Ka(t)?ule(oC(t[Symbol.asyncIterator](),async n=>Cle(await S4(gle(e,n))),n=>{throw ut(n.message,{originalError:n,nodes:[e.operation]})})):t}function kle(e){try{const t=Nle(e);return At(t)?t.then(void 0,n=>({errors:[n]})):t}catch(t){return{errors:[t]}}}function Nle(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}=iC(t,n,o,s,r.selectionSet),[c,f]=[...l.entries()][0],d=f[0].name.value,g=V4(t,s,f[0]);if(!g)throw ut(`The subscription field "${d}" is not defined.`,{nodes:f});const m=sf(void 0,c,s.name),v=N4(e,g,f,s,m);try{const b=T5(g,f[0],o),w=e.contextValue,S=(g.subscribe??e.subscribeFieldResolver)(i,b,w,v);return At(S)?S.then(M4).then(void 0,x=>{throw vn(x,f,Br(m))}):M4(S,e.signal)}catch(b){throw vn(b,f,Br(m))}}function M4(e,t){if(e instanceof Error)throw e;if(!Ka(e))throw ut(`Subscription field must return Async Iterable. Received: ${cr(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 P4(e,t,n,r,o,i,s){const l=new Lle({label:o,path:i,parentContext:s,exeContext:e});let c;try{c=EC(e,t,n,i,r,l),At(c)&&(c=c.then(null,f=>(l.errors.push(f),null)))}catch(f){l.errors.push(f),c=null}l.addData(c)}function _le(e,t,n,r,o,i,s,l,c){const f=new $4({label:l,path:t,parentContext:c,exeContext:r});let d;try{try{At(n)?d=n.then(m=>Xa(r,s,o,i,t,m,f)):d=Xa(r,s,o,i,t,n,f),At(d)&&(d=d.then(void 0,m=>{const v=vn(m,o,Br(t)),b=ts(v,s,f.errors);return Xo(r,t,f),b}))}catch(m){const v=vn(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 At(d)?g=d.then(m=>[m],m=>(f.errors.push(m),Xo(r,e,f),null)):g=[d],f.addItems(g),f}async function Ale(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=vn(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),At(c)&&(c=c.then(void 0,f=>{const d=vn(f,n,Br(s)),g=ts(d,o,i.errors);return Xo(t,s,i),g})),{done:!1,value:c}}catch(f){const d=vn(f,n,Br(s)),g=ts(d,o,i.errors);return Xo(t,s,i),{done:!1,value:g}}}async function Ole(e,t,n,r,o,i,s,l,c){let f=e,d=c??void 0;for(;;){const g=sf(s,f,void 0),m=new $4({label:l,path:g,parentContext:d,iterator:t,exeContext:n});let v;try{v=await Ale(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(At(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;xC(o)&&((i=o.iterator)!=null&&i.return)&&o.iterator.return().catch(()=>{}),e.subsequentPayloads.delete(o)}})}function Dle(e){const t=[];for(const n of e.subsequentPayloads){const r={};if(n.isCompleted){if(e.subsequentPayloads.delete(n),xC(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 Ile(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=Dle(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;xC(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 Lle{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 $4{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 xC(e){return e.type==="stream"}function V4(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 Rle(e){const t=$w(e.document,e.operationName);if(t==null)throw new Error("Must provide an operation.");return t.operation==="subscription"?Tle(e):new Wt(()=>hle(e)).then(n=>"initialResult"in n?R4(n):n).resolve()}function Fle(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=Pae({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 Ple({...e,request:d})}function j4(e,t,n){const r=dy(e,t),o=r.getFields()[n];if(!o)throw new Error(`Unable to find field '${n}' in type '${r}'.`);return o.type}function Ple(e){const t=$le(e),n=new Fae(t),r=n.transformRequest(e.request);e.validateRequest&&Vle(t,r.document);const i=Ule(t)(r);function s(l){if(Ka(l)){const c=l[Symbol.asyncIterator]();return oC(c,f=>n.transformResult(f))}return n.transformResult(l)}return At(i)?i.then(s):s(i)}function $le({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(Fle(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)??j4(w,v,d),transforms:m.transforms!=null?m.transforms.concat(s):s,transformedSchema:l??(m instanceof oae?m.transformedSchema:hC(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)??j4(m,v,d),transforms:s,transformedSchema:l??m,skipTypeMerging:c}}function Vle(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 jle={};function Ule(e){const{subschemaConfig:t,targetSchema:n,context:r}=e;let o=(t==null?void 0:t.executor)||Ble(n);if(t!=null&&t.batch){const i=t==null?void 0:t.batchingOptions;o=cle(r??jle,o,i==null?void 0:i.dataLoaderOptions,i==null?void 0:i.extensionsReducer)}return o}const Ble=js(function(t){return function(r){return Rle({schema:t,document:r.document,rootValue:r.rootValue,contextValue:r.context,variableValues:r.variables,operationName:r.operationName})}});function qle(e){const t=e.schema,n=e.createProxyingResolver??Wle,r=tC(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=Hle(e,d);i==="subscription"?o[l][f]={subscribe:g,resolve:zle}:o[l][f]={resolve:g}}}return o}function zle(e){return e}function Hle(e,t){return function(r,o,i,s){if(r!=null){const l=rC(s);if(Ty(r)){const c=n4(r),f=gC(r,l);if(e===f&&r[l]!==void 0)return lh(r[l],c,f,i,s)}}return t(r,o,i,s)}}function Wle({subschemaConfig:e,operation:t}){return function(r,o,i,s){return Mle({schema:e,operation:t,context:i,info:s})}}const U4=js(function(t){const n=t.schema,r=qle(t),o=Gle(n,r);return hC(o,t)});function Gle(e,t){return ise(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:Vae,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 $r({...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 Yle(e,t){var n;if((n=e==null?void 0:e.data)!=null&&n.__schema)return Vw(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;
${cr(e)}`)}function B4(e,t,n){const r=rr(rv(n),n);return new Wt(()=>e({document:r,context:t})).then(o=>Ka(o)?o[Symbol.asyncIterator]().next().then(({value:s})=>s):o).then(o=>Yle(o,n)).resolve()}const Qle=async(e,t)=>q5(e,t),SC=new TextEncoder;function Us(...e){const t=new Us.Request(...e),n=new XMLHttpRequest;n.withCredentials=t.credentials==="include",n.timeout=t[Ye].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[Ye].url=n.responseURL,o[Ye].redirected=n.responseURL!==t.url,o}const Ye=Symbol("SyncFetch Internals"),Kle=["mode","cache","redirect","referrer","integrity"],Jle={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 uh{constructor(t,n={}){for(const r of Kle)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[Ye]={method:n.method||"GET",headers:new Us.Headers(n.headers),body:n.body?SC.encode(n.body):null,credentials:n.credentials||"omit",timeout:n.timeout||0},typeof t=="string")this[Ye].url=t;else if(t instanceof uh)this[Ye].url=t.url,n.method||(this[Ye].method=t.method),n.headers||(this[Ye].headers=t.headers),n.body||(this[Ye].body=t[Ye].body),n.credentials||(this[Ye].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[Ye].credentials}get destination(){return""}get headers(){return this[Ye].headers}get integrity(){return""}get method(){return this[Ye].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[Ye].url}clone(){return TC(this),new uh(this.url,this[Ye])}}class Oy{constructor(t,n={}){this[Ye]={body:t?SC.encode(t):null,bodyUsed:!1,headers:new Us.Headers(n.headers),status:n.status,statusText:n.statusText}}get headers(){return this[Ye].headers}get ok(){const t=this[Ye].status;return t>=200&&t<300}get redirected(){return this[Ye].redirected}get status(){return this[Ye].status}get statusText(){return this[Ye].statusText}get url(){return this[Ye].url}clone(){return this.redirect(this[Ye].url,this[Ye].status)}redirect(t,n){TC(this);const r=new Oy(this[Ye].body,{headers:this[Ye].headers,status:n||this[Ye].status,statusText:Jle[n]||this[Ye].statusText});return r[Ye].url=t||this[Ye].url,r[Ye].redirected=this[Ye].redirected,r}}class fh{constructor(t){this[Ye]={body:SC.encode(t),bodyUsed:!1}}get bodyUsed(){return this[Ye].bodyUsed}static mixin(t){for(const n of Object.getOwnPropertyNames(fh.prototype)){if(n==="constructor")continue;const r=Object.getOwnPropertyDescriptor(fh.prototype,n);Object.defineProperty(t,n,{...r,enumerable:!0})}}arrayBuffer(){const t=dh(this);return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}blob(){const t=this.headers&&this.headers.get("content-type");return new Blob([dh(this)],t&&{type:t})}text(){return dh(this).toString()}json(){try{return JSON.parse(dh(this).toString())}catch(t){throw new TypeError(`invalid json response body at ${this.url} reason: ${t.message}`,"invalid-json")}}buffer(){return dh(this).clone()}}function TC(e){if(e.bodyUsed)throw new TypeError(`body used already for: ${e.url}`)}function dh(e){return TC(e),e[Ye].bodyUsed=!0,e[Ye].body||Buffer.alloc(0)}fh.mixin(uh.prototype),fh.mixin(Oy.prototype);class Xle{constructor(t){if(t instanceof Us.Headers)this[Ye]={...t[Ye]};else if(this[Ye]={},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[Ye][t]||(this[Ye][t]=[]),this[Ye][t].push(n)}delete(t){delete this[Ye][t.toLowerCase()]}set(t,n){this[Ye][t.toLowerCase()]=[n]}entries(){const t=[];for(const n in this[Ye])for(const r of this[Ye][n])t.push([n,r]);return t}get(t){return t=t.toLowerCase(),t in this[Ye]?this[Ye][t].join(", "):null}keys(){return Object.keys(this[Ye])}has(t){return t.toLowerCase()in this[Ye]}values(){const t=[];for(const n in this[Ye])for(const r of this[Ye][n])t.push(r);return t}*[Symbol.iterator](){for(const t in this[Ye])for(const n of this[Ye][t])yield[t,n]}}Us.Headers=Xle,Us.Request=uh,Us.Response=Oy;var Zle=Us;const ece=Ui(Zle),tce=(e,t)=>(typeof e=="string"?t==null||delete t.signal:delete e.signal,ece(e,t)),CC=e=>import(`${e}`),q4=e=>require(`${e}`);var mc;(function(e){e.WS="WS",e.LEGACY_WS="LEGACY_WS",e.SSE="SSE",e.GRAPHQL_SSE="GRAPHQL_SSE"})(mc||(mc={}));const nce=["http:","https:","ws:","wss:"];function z4(e){try{const t=new URL(e);return nce.includes(t.protocol)}catch{return!1}}class rce{buildHTTPExecutor(t,n,r){const o=kC(t,{wss:"https",ws:"http"});return nae({endpoint:o,fetch:n,...r})}buildWSExecutor(t,n,r){const o=kC(t,{https:"wss",http:"ws"});return kse({url:o,webSocketImpl:n,connectionParams:r})}buildWSLegacyExecutor(t,n,r){const o=kC(t,{https:"wss",http:"ws"});return rae(o,n,r)}getFetch(t,n){if(t){if(typeof t=="string"){const[r,o]=t.split("#");return new Wt(()=>n(r)).then(i=>o?i[o]:i).resolve()}else if(typeof t=="function")return t}return n===CC?Qle:tce}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 Wt(()=>t(r)).then(i=>o?i[o]:i).resolve()}else return(n==null?void 0:n.webSocketImpl)||m5}buildSubscriptionExecutor(t,n,r,o){if((o==null?void 0:o.subscriptionsProtocol)===mc.SSE)return this.buildHTTPExecutor(t,n,o);if((o==null?void 0:o.subscriptionsProtocol)===mc.GRAPHQL_SSE)return o!=null&&o.subscriptionsEndpoint||(t+="/stream"),this.buildHTTPExecutor(t,n,o);{const s=new Wt(()=>this.getWebSocketImpl(r,o)).then(l=>(o==null?void 0:o.subscriptionsProtocol)===mc.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 Wt(()=>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)!==mc.SSE){let l=function(c){var f;return c.operationType=c.operationType||((f=fc(c))==null?void 0:f.operation),c.operationType==="subscription"&&X5(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,CC,n)}getExecutorSync(t,n){return this.getExecutor(t,q4,n)}handleSDL(t,n,r){const o=this.getDefaultMethodFromOptions(r==null?void 0:r.method,"GET");return new Wt(()=>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=>Xie(t,i,r)).resolve()}async load(t,n){if(!z4(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,CC);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?iv(r.document,n):r.rawSDL?jw(r.rawSDL,n):void 0)}else o=this.getExecutorAsync(t,n),r.schema=await B4(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=U4({schema:r.schema,executor:o,batch:n==null?void 0:n.batch})),[r]}loadSync(t,n){if(!z4(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,q4);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?iv(r.document,n):r.rawSDL?jw(r.rawSDL,n):void 0)}else o=this.getExecutorSync(t,n),r.schema=B4(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=U4({schema:r.schema,executor:o})),[r]}}function kC(e,t){return Object.entries(t).reduce((n,[r,o])=>n.replace(`${r}://`,`${o}://`).replace(`${r}:\\`,`${o}:\\`),e)}var NC={};const oce=(...e)=>NC.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 NC.stringify!="function"&&(NC.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 ice(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 _,D=C[E];return D&&typeof D=="object"&&Object.keys(D).forEach(function(I){_=x(D,I),_!==void 0?D[I]=_:delete D[I]}),N.call(C,E,D)}({"":S},""):S}}let gc;typeof globalThis<"u"?gc=globalThis:typeof self<"u"?gc=self:typeof window<"u"?gc=window:typeof ci<"u"&&(gc=ci),gc.BigInt.prototype.toJSON=function(){return this},gc.JSON.parse=ice(),gc.JSON.stringify=oce;const Dy=function(){},_C={popstate:[]};let sce={URL:function(){return{searchParams:{set:Dy,append:Dy,delete:Dy}}},location:{href:"",search:""},history:{pushState:Dy},fireEvent:function(e){_C[e].forEach(t=>{t()})},addEventListener:function(e,t){_C[e].push(t)},removeEventListener:function(e,t){const n=_C[e],r=n.findIndex(o=>o===t);n.splice(r,1)}};function Za(){return typeof window<"u"?window:sce}const H4=[Number,String,Boolean,Date];function ace(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 lce(e){return Array.isArray(e)&&e.length>0&&e.every(t=>typeof t=="number"||typeof t=="string"||typeof t=="boolean")}function cce(e={}){if(!Object.values(e).every(n=>H4.includes(n)||lce(n)||typeof n=="function"))throw new Error(`Unsupported param types. Must be one of [${H4.map(n=>n.name).join(", ")}]`)}function uce(e={},t={},n=!1){t&&cce(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]=dce(g,m,t,e)}),d},[i]);function l(f){const d=ace(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 fce={true:!0,false:!1};function dce(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?fce[i]:o===Date?new Date(i):Array.isArray(o)?o.find(s=>s==i)||r[e]:typeof o=="function"?o(i):i}const pce=()=>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"})]})]})]}),hce=(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 mce(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 rce,[]),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:mc.GRAPHQL_SSE,subscriptionsEndpoint:n,credentials:"same-origin",specifiedByUrl:!0,directiveIsRepeatable:!0,...e,headers:e.additionalHeaders||{}});return function(b,w){const N=hce(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]=uce({query:e.defaultQuery||t},r,!1),[c,f]=k.useState((g=s.query)==null?void 0:g.toString()),d=gie({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(qT,{shouldPersistHeaders:!0,plugins:[d],schemaDescription:!0,query:c,...e,fetcher:i,children:W.jsx(f5,{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(pce,{})}),W.jsx("span",{children:(e==null?void 0:e.title)||W.jsxs(W.Fragment,{children:["Yoga Graph",W.jsx("em",{children:"i"}),"QL"]})})]})})})})})}function gce(e,t){mg.render(W.jsx(mce,{...t}),e)}globalThis.React=ce;var vce=Object.defineProperty,$=(e,t)=>vce(e,"name",{value:t,configurable:!0}),yce=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}$(qr,"getDefaultExportFromCjs");var W4={exports:{}},G4;function kr(){return G4||(G4=1,function(e,t){(function(n,r){e.exports=r()})(yce,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),D=/win/i.test(r),I=v&&n.match(/Version\/(\d*\.\d*)/);I&&(I=Number(I[1])),I&&I>=15&&(v=!1,d=!0);var O=E&&(g||v&&(I==null||I<12.11)),R=o||c&&f>=9;function P(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}$(P,"classTest");var B=$(function(a,u){var h=a.className,p=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}$(H,"removeChildren");function z(a,u){return H(a).appendChild(u)}$(z,"removeChildrenAndAdd");function q(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}$(q,"elt");function F(a,u,h,p){var y=q(a,u,h,p);return y.setAttribute("role","presentation"),y}$(F,"eltP");var te;document.createRange?te=$(function(a,u,h,p){var y=document.createRange();return y.setEnd(p||a,h),y.setStart(a,u),y},"range"):te=$(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)}$(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}$(Q,"activeElt");function K(a,u){var h=a.className;P(u).test(h)||(a.className+=(h?" ":"")+u)}$(K,"addClass");function Z(a,u){for(var h=a.split(" "),p=0;p<h.length;p++)h[p]&&!P(h[p]).test(u)&&(u+=" "+h[p]);return u}$(Z,"joinClasses");var re=$(function(a){a.select()},"selectInput");S?re=$(function(a){a.selectionStart=0,a.selectionEnd=a.value.length},"selectInput"):c&&(re=$(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)}}$(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}$(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,A=y||0;;){var L=a.indexOf(" ",T);if(L<0||L>=u)return A+(u-T);A+=L-T,A+=h-A%h,T=L+1}}$(ne,"countColumn");var ae=$(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}$(le,"indexOf");var de=50,xe={toString:function(){return"CodeMirror.Pass"}},ve={scroll:!1},qe={origin:"*mouse"},Ie={origin:"+move"};function Ae(a,u,h){for(var p=0,y=0;;){var T=a.indexOf(" ",p);T==-1&&(T=a.length);var A=T-p;if(T==a.length||y+A>=u)return p+Math.min(A,u-y);if(y+=T-p,y+=h-y%h,p=T+1,y>=u)return p}}$(Ae,"findColumn");var it=[""];function Ot(a){for(;it.length<=a;)it.push(je(it)+" ");return it[a]}$(Ot,"spaceStr");function je(a){return a[a.length-1]}$(je,"lst");function It(a,u){for(var h=[],p=0;p<a.length;p++)h[p]=u(a[p],p);return h}$(It,"map");function _r(a,u,h){for(var p=0,y=h(u);p<a.length&&h(a[p])<=y;)p++;a.splice(p,0,u)}$(_r,"insertSorted");function jt(){}$(jt,"nothing");function Sn(a,u){var h;return Object.create?h=Object.create(a):(jt.prototype=a,h=new jt),u&&ie(u,h),h}$(Sn,"createObj");var os=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function dr(a){return/\w/.test(a)||a>""&&(a.toUpperCase()!=a.toLowerCase()||os.test(a))}$(dr,"isWordCharBasic");function nl(a,u){return u?u.source.indexOf("\\w")>-1&&dr(a)?!0:u.test(a):dr(a)}$(nl,"isWordChar");function mf(a){for(var u in a)if(a.hasOwnProperty(u)&&a[u])return!1;return!0}$(mf,"isEmpty");var Uy=/[\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 Ec(a){return a.charCodeAt(0)>=768&&Uy.test(a)}$(Ec,"isExtendingChar");function gf(a,u,h){for(;(h<0?u>0:u<a.length)&&Ec(a.charAt(u));)u+=h;return u}$(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}}$(ei,"findFirst");function yh(a,u,h,p){if(!a)return p(u,h,"ltr",0);for(var y=!1,T=0;T<a.length;++T){var A=a[T];(A.from<h&&A.to>u||u==h&&A.to==u)&&(p(Math.max(A.from,u),Math.min(A.to,h),A.level==1?"rtl":"ltr",T),y=!0)}y||p(u,h,"ltr")}$(yh,"iterateBidiSections");var io=null;function Yt(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}$(Yt,"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"}$(h,"charType");var p=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,y=/[stwN]/,T=/[LRr]/,A=/[Lb1n]/,L=/[1n]/;function M(V,G,X){this.level=V,this.from=G,this.to=X}return $(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 Oe=oe[be];Oe=="m"?oe[be]=ke:ke=Oe}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 Qe=1,ze=oe[0];Qe<se-1;++Qe){var at=oe[Qe];at=="+"&&ze=="1"&&oe[Qe+1]=="1"?oe[Qe]="1":at==","&&ze==oe[Qe+1]&&(ze=="1"||ze=="n")&&(oe[Qe]=ze),ze=at}for(var Lt=0;Lt<se;++Lt){var qn=oe[Lt];if(qn==",")oe[Lt]="N";else if(qn=="%"){var Qt=void 0;for(Qt=Lt+1;Qt<se&&oe[Qt]=="%";++Qt);for(var Gr=Lt&&oe[Lt-1]=="!"||Qt<se&&oe[Qt]=="1"?"1":"N",Yr=Lt;Yr<Qt;++Yr)oe[Yr]=Gr;Lt=Qt-1}}for(var Tn=0,Qr=X;Tn<se;++Tn){var Zn=oe[Tn];Qr=="L"&&Zn=="1"?oe[Tn]="L":T.test(Zn)&&(Qr=Zn)}for(var Ln=0;Ln<se;++Ln)if(y.test(oe[Ln])){var Cn=void 0;for(Cn=Ln+1;Cn<se&&y.test(oe[Cn]);++Cn);for(var fn=(Ln?oe[Ln-1]:X)=="L",Kr=(Cn<se?oe[Cn]:X)=="L",Wf=fn==Kr?fn?"L":"R":X,vl=Ln;vl<Cn;++vl)oe[vl]=Wf;Ln=Cn-1}for(var mr=[],fs,zn=0;zn<se;)if(A.test(oe[zn])){var UN=zn;for(++zn;zn<se&&A.test(oe[zn]);++zn);mr.push(new M(0,UN,zn))}else{var na=zn,Uc=mr.length,Bc=G=="rtl"?1:0;for(++zn;zn<se&&oe[zn]!="L";++zn);for(var Lr=na;Lr<zn;)if(L.test(oe[Lr])){na<Lr&&(mr.splice(Uc,0,new M(1,na,Lr)),Uc+=Bc);var Gf=Lr;for(++Lr;Lr<zn&&L.test(oe[Lr]);++Lr);mr.splice(Uc,0,new M(2,Gf,Lr)),Uc+=Bc,na=Lr}else++Lr;na<zn&&mr.splice(Uc,0,new M(1,na,zn))}return G=="ltr"&&(mr[0].level==1&&(fs=V.match(/^\s+/))&&(mr[0].from=fs[0].length,mr.unshift(new M(0,0,fs[0].length))),je(mr).level==1&&(fs=V.match(/\s+$/))&&(je(mr).to-=fs[0].length,mr.push(new M(0,se-fs[0].length,se)))),G=="rtl"?mr.reverse():mr}}();function Ar(a,u){var h=a.order;return h==null&&(h=a.order=rl(a.text,u)),h}$(Ar,"getOrder");var is=[],Ge=$(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}$(ol,"getHandlers");function pr(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)))}}}$(pr,"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)}$(Ke,"signal");function un(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}$(un,"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])}$(il,"signalCursorActivity");function An(a,u){return ol(a,u).length>0}$(An,"hasHandler");function ti(a){a.prototype.on=function(u,h){Ge(this,u,h)},a.prototype.off=function(u,h){pr(this,u,h)}}$(ti,"eventMixin");function Bn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}$(Bn,"e_preventDefault");function sl(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}$(sl,"e_stopPropagation");function zr(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}$(zr,"e_defaultPrevented");function Hs(a){Bn(a),sl(a)}$(Hs,"e_stop");function ss(a){return a.target||a.srcElement}$(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}$(vf,"e_button");var yf=function(){if(c&&f<9)return!1;var a=q("div");return"draggable"in a||"dragDrop"in a}(),Or;function bf(a){if(Or==null){var u=q("span","");z(a,q("span",[u,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Or=u.offsetWidth<=1&&u.offsetHeight>2&&!(c&&f<8))}var h=Or?q("span",""):q("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return h.setAttribute("cm-text",""),h}$(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}$(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),A=T.indexOf("\r");A!=-1?(h.push(T.slice(0,A)),u+=A+1):(h.push(T),u=y+1)}return h}:function(a){return a.split(/\r\n?|\n/)},bh=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},Eh=function(){var a=q("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,q("span","x")),h=u.getBoundingClientRect(),p=te(u,0,1).getBoundingClientRect();return xf=Math.abs(h.left-p.left)>1}$(as,"hasBadZoomedRects");var Oo={},so={};function Sf(a,u){arguments.length>2&&(u.dependencies=Array.prototype.slice.call(arguments,2)),Oo[a]=u}$(Sf,"defineMode");function Pi(a,u){so[a]=u}$(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=Sn(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"}}$(al,"resolveMode");function ll(a,u){u=al(u);var h=Oo[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 A in u.modeProps)p[A]=u.modeProps[A];return p}$(ll,"getMode");var ri={};function Do(a,u){var h=ri.hasOwnProperty(a)?ri[a]:ri[a]={};ie(u,h)}$(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}$(ao,"copyState");function wc(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}}$(wc,"innerMode");function xc(a,u,h){return a.startState?a.startState(u,h):!0}$(xc,"startState");var en=$(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=$(function(A){return h?A.toLowerCase():A},"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]}$(Pe,"getLine");function oi(a,u,h){var p=[],y=u.line;return a.iter(u.line,h.line+1,function(T){var A=T.text;y==h.line&&(A=A.slice(0,h.ch)),y==u.line&&(A=A.slice(u.ch)),p.push(A),++y}),p}$(oi,"getBetween");function Sc(a,u,h){var p=[];return a.iter(u,h,function(y){p.push(y.text)}),p}$(Sc,"getLines");function Dr(a,u){var h=u-a.height;if(h)for(var p=a;p;p=p.parent)p.height+=h}$(Dr,"updateLineHeight");function bt(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}$(bt,"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 A=0;A<a.lines.length;++A){var L=a.lines[A],M=L.height;if(u<M)break;u-=M}return h+A}$(ii,"lineAtHeight");function Ws(a,u){return u>=a.first&&u<a.first+a.size}$(Ws,"isLine");function Tc(a,u){return String(a.lineNumberFormatter(u+a.firstLineNumber))}$(Tc,"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}$(we,"Pos");function j(a,u){return a.line-u.line||a.ch-u.ch}$(j,"cmp");function ee(a,u){return a.sticky==u.sticky&&j(a,u)==0}$(ee,"equalCursorPos");function me(a){return we(a.line,a.ch)}$(me,"copyPos");function Te(a,u){return j(a,u)<0?u:a}$(Te,"maxPos");function Xe(a,u){return j(a,u)<0?a:u}$(Xe,"minPos");function pt(a,u){return Math.max(a.first,Math.min(u,a.first+a.size-1))}$(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)}$(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}$(Jn,"clipToLen");function lo(a,u){for(var h=[],p=0;p<u.length;p++)h[p]=Re(a,u[p]);return h}$(lo,"clipPosArray");var Tf=$(function(a,u){this.state=a,this.lookAhead=u},"SavedContext"),ls=$(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 YC(a,u,h,p){var y=[a.state.modeGen],T={};ZC(a,u.text,a.doc.mode,h,function(V,G){return y.push(V,G)},T,p);for(var A=h.state,L=$(function(V){h.baseTokens=y;var G=a.state.overlays[V],X=1,se=0;h.state=!0,ZC(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 Oe=y[be+1];y[be+1]=(Oe?Oe+" ":"")+"overlay "+pe}},T),h.state=A,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}}$(YC,"highlightLine");function QC(a,u,h){if(!u.styles||u.styles[0]!=a.state.modeGen){var p=Cf(a,bt(u)),y=u.text.length>a.options.maxHighlightLength&&ao(a.doc.mode,p.state),T=YC(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}$(QC,"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=lV(a,u,h),A=T>p.first&&Pe(p,T-1).stateAfter,L=A?ls.fromSaved(p,A,T):new ls(p,xc(p.mode),T);return p.iter(T,u,function(M){By(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}$(Cf,"getContextBefore");function By(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==""&&KC(y,h.state);!T.eol();)qy(y,T,h.state),T.start=T.pos}$(By,"processLine");function KC(a,u){if(a.blankLine)return a.blankLine(u);if(a.innerMode){var h=wc(a,u);if(h.mode.blankLine)return h.mode.blankLine(h.state)}}$(KC,"callBlankLine");function qy(a,u,h,p){for(var y=0;y<10;y++){p&&(p[0]=wc(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.")}$(qy,"readToken");var aV=$(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 JC(a,u,h,p){var y=a.doc,T=y.mode,A;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,A=qy(T,V,M.state),p&&G.push(new aV(V,A,ao(y.mode,M.state)));return p?G:new aV(V,A,M.state)}$(JC,"takeToken");function XC(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}$(XC,"extractLineClasses");function ZC(a,u,h,p,y,T,A){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==""&&XC(KC(h,p.state),T);!G.eol();){if(G.pos>a.options.maxHighlightLength?(L=!1,A&&By(a,u,p,G.pos),G.pos=u.length,X=null):X=XC(qy(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}}$(ZC,"runMode");function lV(a,u,h){for(var p,y,T=a.doc,A=h?-1:u-(a.doc.mode.innerMode?1e3:100),L=u;L>A;--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}$(lV,"findStartLine");function cV(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)}}$(cV,"retreatFrontier");var uV=!1,Gs=!1;function fV(){uV=!0}$(fV,"seeReadOnlySpans");function dV(){Gs=!0}$(dV,"seeCollapsedSpans");function wh(a,u,h){this.marker=a,this.from=u,this.to=h}$(wh,"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}}$(kf,"getMarkedSpanFor");function pV(a,u){for(var h,p=0;p<a.length;++p)a[p]!=u&&(h||(h=[])).push(a[p]);return h}$(pV,"removeMarkedSpan");function hV(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)}$(hV,"addMarkedSpan");function mV(a,u,h){var p;if(a)for(var y=0;y<a.length;++y){var T=a[y],A=T.marker,L=T.from==null||(A.inclusiveLeft?T.from<=u:T.from<u);if(L||T.from==u&&A.type=="bookmark"&&(!h||!T.marker.insertLeft)){var M=T.to==null||(A.inclusiveRight?T.to>=u:T.to>u);(p||(p=[])).push(new wh(A,T.from,M?null:T.to))}}return p}$(mV,"markedSpansBefore");function gV(a,u,h){var p;if(a)for(var y=0;y<a.length;++y){var T=a[y],A=T.marker,L=T.to==null||(A.inclusiveRight?T.to>=u:T.to>u);if(L||T.from==u&&A.type=="bookmark"&&(!h||T.marker.insertLeft)){var M=T.from==null||(A.inclusiveLeft?T.from<=u:T.from<u);(p||(p=[])).push(new wh(A,M?null:T.from-u,T.to==null?null:T.to-u))}}return p}$(gV,"markedSpansAfter");function zy(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,A=j(u.from,u.to)==0,L=mV(h,y,A),M=gV(p,T,A),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=ek(L)),M&&M!=L&&(M=ek(M));var Oe=[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 wh(L[Me].marker,null,null));for(var Qe=0;Qe<Le;++Qe)Oe.push(De);Oe.push(M)}return Oe}$(zy,"stretchSpansOverChange");function ek(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}$(ek,"clearEmptySpans");function vV(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 A=p[T],L=A.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||!A.inclusiveLeft&&!X)&&G.push({from:V.from,to:L.from}),(se>0||!A.inclusiveRight&&!se)&&G.push({from:L.to,to:V.to}),y.splice.apply(y,G),M+=G.length-3}}return y}$(vV,"removeReadOnlyRanges");function tk(a){var u=a.markedSpans;if(u){for(var h=0;h<u.length;++h)u[h].marker.detachLine(a);a.markedSpans=null}}$(tk,"detachMarkedSpans");function nk(a,u){if(u){for(var h=0;h<u.length;++h)u[h].marker.attachLine(a);a.markedSpans=u}}$(nk,"attachMarkedSpans");function xh(a){return a.inclusiveLeft?-1:0}$(xh,"extraLeft");function Sh(a){return a.inclusiveRight?1:0}$(Sh,"extraRight");function Hy(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)||xh(a)-xh(u);if(T)return-T;var A=j(p.to,y.to)||Sh(a)-Sh(u);return A||u.id-a.id}$(Hy,"compareCollapsedMarkers");function rk(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||Hy(p,y.marker)<0)&&(p=y.marker);return p}$(rk,"collapsedSpanAtSide");function ok(a){return rk(a,!0)}$(ok,"collapsedSpanAtStart");function Th(a){return rk(a,!1)}$(Th,"collapsedSpanAtEnd");function yV(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||Hy(p,T.marker)<0)&&(p=T.marker)}return p}$(yV,"collapsedSpanAround");function ik(a,u,h,p,y){var T=Pe(a,u),A=Gs&&T.markedSpans;if(A)for(var L=0;L<A.length;++L){var M=A[L];if(M.marker.collapsed){var V=M.marker.find(0),G=j(V.from,h)||xh(M.marker)-xh(y),X=j(V.to,p)||Sh(M.marker)-Sh(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}}}$(ik,"conflictingCollapsedRange");function si(a){for(var u;u=ok(a);)a=u.find(-1,!0).line;return a}$(si,"visualLine");function bV(a){for(var u;u=Th(a);)a=u.find(1,!0).line;return a}$(bV,"visualLineEnd");function EV(a){for(var u,h;u=Th(a);)a=u.find(1,!0).line,(h||(h=[])).push(a);return h}$(EV,"visualLineContinued");function Wy(a,u){var h=Pe(a,u),p=si(h);return h==p?u:bt(p)}$(Wy,"visualLineNo");function sk(a,u){if(u>a.lastLine())return u;var h=Pe(a,u),p;if(!Ys(a,h))return u;for(;p=Th(h);)h=p.find(1,!0).line;return bt(h)+1}$(sk,"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&&Gy(a,u,p)))return!0}}$(Ys,"lineIsHidden");function Gy(a,u,h){if(h.to==null){var p=h.marker.find(1,!0);return Gy(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)&&Gy(a,u,y))return!0}$(Gy,"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 A=0;A<T.children.length;++A){var L=T.children[A];if(L==h)break;u+=L.height}return u}$(cs,"heightAtLine");function Ch(a){if(a.height==0)return 0;for(var u=a.text.length,h,p=a;h=ok(p);){var y=h.find(0,!0);p=y.from.line,u+=y.from.ch-y.to.ch}for(p=a;h=Th(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}$(Ch,"lineLength");function Yy(a){var u=a.display,h=a.doc;u.maxLine=Pe(h,h.first),u.maxLineLength=Ch(u.maxLine),u.maxLineChanged=!0,h.iter(function(p){var y=Ch(p);y>u.maxLineLength&&(u.maxLineLength=y,u.maxLine=p)})}$(Yy,"findMaxLine");var Nf=$(function(a,u,h){this.text=a,nk(this,u),this.height=h?h(this):1},"Line");Nf.prototype.lineNo=function(){return bt(this)},ti(Nf);function wV(a,u,h,p){a.text=u,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),tk(a),nk(a,h);var y=p?p(a):1;y!=a.height&&Dr(a,y)}$(wV,"updateLine");function xV(a){a.parent=null,tk(a)}$(xV,"cleanUpLine");var Mue={},Pue={};function ak(a,u){if(!a||/^\s*$/.test(a))return null;var h=u.addModeClass?Pue:Mue;return h[a]||(h[a]=a.replace(/\S+/g,"cm-$&"))}$(ak,"interpretTokenStyle");function lk(a,u){var h=F("span",null,null,d?"padding-right: .1px":null),p={pre:F("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,A=void 0;p.pos=0,p.addToken=TV,ni(a.display.measure)&&(A=Ar(T,a.doc.direction))&&(p.addToken=kV(p.addToken,A)),p.map=[];var L=u!=a.display.externalMeasured&&bt(T);NV(T,p,QC(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}$(lk,"buildLineContent");function SV(a){var u=q("span","•","cm-invalidchar");return u.title="\\u"+a.charCodeAt(0).toString(16),u.setAttribute("aria-label",u.title),u}$(SV,"defaultSpecialCharPlaceholder");function TV(a,u,h,p,y,T,A){if(u){var L=a.splitSpaces?CV(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(q("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,Oe=ke-a.col%ke;be=G.appendChild(q("span",Ot(Oe),"cm-tab")),be.setAttribute("role","presentation"),be.setAttribute("cm-text"," "),a.col+=Oe}else se[0]=="\r"||se[0]==`
`?(be=G.appendChild(q("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(q("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||A){var Le=h||"";p&&(Le+=p),y&&(Le+=y);var De=q("span",[G],Le,T);if(A)for(var Me in A)A.hasOwnProperty(Me)&&Me!="style"&&Me!="class"&&De.setAttribute(Me,A[Me]);return a.content.appendChild(De)}a.content.appendChild(G)}}$(TV,"buildToken");function CV(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}$(CV,"splitSpaces");function kV(a,u){return function(h,p,y,T,A,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,A,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}}}$(kV,"buildTokenBadBidi");function ck(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}$(ck,"buildCollapsedSpan");function NV(a,u,h){var p=a.markedSpans,y=a.text,T=0;if(!p){for(var A=1;A<h.length;A+=2)u.addToken(u,y.slice(T,T=h[A]),ak(h[A+1],u.cm.options));return}for(var L=y.length,M=0,V=1,G="",X,se,oe=0,pe,be,ke,Oe,Le;;){if(oe==M){pe=be=ke=se="",Le=null,Oe=null,oe=1/0;for(var De=[],Me=void 0,Qe=0;Qe<p.length;++Qe){var ze=p[Qe],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 Lt in at.attributes)(Le||(Le={}))[Lt]=at.attributes[Lt];at.collapsed&&(!Oe||Hy(Oe.marker,at)<0)&&(Oe=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(!Oe||Oe.from==M)for(var Qt=0;Qt<De.length;++Qt)ck(u,0,De[Qt]);if(Oe&&(Oe.from||0)==M){if(ck(u,(Oe.to==null?L+1:Oe.to)-M,Oe.marker,Oe.from==null),Oe.to==null)return;Oe.to==M&&(Oe=!1)}}if(M>=L)break;for(var Gr=Math.min(L,oe);;){if(G){var Yr=M+G.length;if(!Oe){var Tn=Yr>Gr?G.slice(0,Gr-M):G;u.addToken(u,Tn,X?X+pe:pe,ke,M+Tn.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=ak(h[V++],u.cm.options)}}}$(NV,"insertLineContent");function uk(a,u,h){this.line=u,this.rest=EV(u),this.size=this.rest?bt(je(this.rest))-h+1:1,this.node=this.text=null,this.hidden=Ys(a,u)}$(uk,"LineView");function kh(a,u,h){for(var p=[],y,T=u;T<h;T=y){var A=new uk(a.doc,Pe(a.doc,T),T);y=T+A.size,p.push(A)}return p}$(kh,"buildViewArray");var _f=null;function _V(a){_f?_f.ops.push(a):a.ownsGroup=_f={ops:[a],delayedCallbacks:[]}}$(_V,"pushOperation");function AV(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)}$(AV,"fireCallbacksForOps");function OV(a,u){var h=a.ownsGroup;if(h)try{AV(h)}finally{_f=null,u(h)}}$(OV,"finishOperation");var Nh=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:Nh?y=Nh:(y=Nh=[],setTimeout(DV,0));for(var T=$(function(L){y.push(function(){return h[L].apply(null,p)})},"loop"),A=0;A<h.length;++A)T(A)}}$(On,"signalLater");function DV(){var a=Nh;Nh=null;for(var u=0;u<a.length;++u)a[u]()}$(DV,"fireOrphanDelayed");function fk(a,u,h,p){for(var y=0;y<u.changes.length;y++){var T=u.changes[y];T=="text"?LV(a,u):T=="gutter"?pk(a,u,h,p):T=="class"?Qy(a,u):T=="widget"&&RV(a,u,p)}u.changes=null}$(fk,"updateLineForChanges");function Af(a){return a.node==a.text&&(a.node=q("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}$(Af,"ensureLineWrapped");function IV(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=Af(u);u.background=p.insertBefore(q("div",null,h),p.firstChild),a.display.input.setUneditable(u.background)}}$(IV,"updateLineBackground");function dk(a,u){var h=a.display.externalMeasured;return h&&h.line==u.line?(a.display.externalMeasured=null,u.measure=h.measure,h.built):lk(a,u)}$(dk,"getLineContent");function LV(a,u){var h=u.text.className,p=dk(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)}$(LV,"updateLineText");function Qy(a,u){IV(a,u),u.line.wrapClass?Af(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||""}$(Qy,"updateLineClasses");function pk(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=Af(u);u.gutterBackground=q("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 A=Af(u),L=u.gutter=q("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),A.insertBefore(L,u.text),u.line.gutterClass&&(L.className+=" "+u.line.gutterClass),a.options.lineNumbers&&(!T||!T["CodeMirror-linenumbers"])&&(u.lineNumber=L.appendChild(q("div",Tc(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(q("div",[G],"CodeMirror-gutter-elt","left: "+p.gutterLeft[V]+"px; width: "+p.gutterWidth[V]+"px"))}}}$(pk,"updateLineGutter");function RV(a,u,h){u.alignable&&(u.alignable=null);for(var p=P("CodeMirror-linewidget"),y=u.node.firstChild,T=void 0;y;y=T)T=y.nextSibling,p.test(y.className)&&u.node.removeChild(y);hk(a,u,h)}$(RV,"updateLineWidgets");function FV(a,u,h,p){var y=dk(a,u);return u.text=u.node=y.pre,y.bgClass&&(u.bgClass=y.bgClass),y.textClass&&(u.textClass=y.textClass),Qy(a,u),pk(a,u,h,p),hk(a,u,p),u.node}$(FV,"buildLineElement");function hk(a,u,h){if(mk(a,u.line,u,h,!0),u.rest)for(var p=0;p<u.rest.length;p++)mk(a,u.rest[p],u,h,!1)}$(hk,"insertLineWidgets");function mk(a,u,h,p,y){if(u.widgets)for(var T=Af(h),A=0,L=u.widgets;A<L.length;++A){var M=L[A],V=q("div",[M.node],"CodeMirror-linewidget"+(M.className?" "+M.className:""));M.handleMouseEvents||V.setAttribute("cm-ignore-events","true"),MV(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")}}$(mk,"insertLineWidgetsFor");function MV(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"))}$(MV,"positionLineWidget");function Of(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,q("div",[a.node],null,h))}return a.height=a.node.parentNode.offsetHeight}$(Of,"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}$(us,"eventInWidget");function _h(a){return a.lineSpace.offsetTop}$(_h,"paddingTop");function Ky(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}$(Ky,"paddingVert");function gk(a){if(a.cachedPaddingH)return a.cachedPaddingH;var u=z(a.measure,q("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}$(gk,"paddingH");function $i(a){return de-a.display.nativeBarWidth}$($i,"scrollGap");function cl(a){return a.display.scroller.clientWidth-$i(a)-a.display.barWidth}$(cl,"displayWidth");function Jy(a){return a.display.scroller.clientHeight-$i(a)-a.display.barHeight}$(Jy,"displayHeight");function PV(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 A=u.text.firstChild.getClientRects(),L=0;L<A.length-1;L++){var M=A[L],V=A[L+1];Math.abs(M.bottom-V.bottom)>2&&T.push((M.bottom+V.top)/2-h.top)}}T.push(h.bottom-h.top)}}$(PV,"ensureLineHeights");function vk(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(bt(a.rest[y])>h)return{map:a.measure.maps[y],cache:a.measure.caches[y],before:!0}}}$(vk,"mapFromLineView");function $V(a,u){u=si(u);var h=bt(u),p=a.display.externalMeasured=new uk(a.doc,u,h);p.lineN=h;var y=p.built=lk(a,p);return p.text=y.pre,z(a.display.lineMeasure,y.pre),p}$($V,"updateExternalMeasurement");function yk(a,u,h,p){return Vi(a,Cc(a,u),h,p)}$(yk,"measureChar");function Xy(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}$(Xy,"findViewForLine");function Cc(a,u){var h=bt(u),p=Xy(a,h);p&&!p.text?p=null:p&&p.changes&&(fk(a,p,h,r1(a)),a.curOp.forceUpdate=!0),p||(p=$V(a,u));var y=vk(p,u,h);return{line:u,view:p,rect:null,map:y.map,cache:y.cache,before:y.before,hasHeights:!1}}$(Cc,"prepareMeasureForLine");function Vi(a,u,h,p,y){u.before&&(h=-1);var T=h+(p||""),A;return u.cache.hasOwnProperty(T)?A=u.cache[T]:(u.rect||(u.rect=u.view.text.getBoundingClientRect()),u.hasHeights||(PV(a,u.view,u.rect),u.hasHeights=!0),A=UV(a,u,h,p),A.bogus||(u.cache[T]=A)),{left:A.left,right:A.right,top:y?A.rtop:A.top,bottom:y?A.rbottom:A.bottom}}$(Vi,"measureCharPrepared");var VV={left:0,right:0,top:0,bottom:0};function bk(a,u,h){for(var p,y,T,A,L,M,V=0;V<a.length;V+=3)if(L=a[V],M=a[V+1],u<L?(y=0,T=1,A="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&&(A="right")),y!=null){if(p=a[V+2],L==M&&h==(p.insertLeft?"left":"right")&&(A=h),h=="left"&&y==0)for(;V&&a[V-2]==a[V-3]&&a[V-1].insertLeft;)p=a[(V-=3)+2],A="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],A="right";break}return{node:p,start:y,end:T,collapse:A,coverStart:L,coverEnd:M}}$(bk,"nodeAndOffsetInLineMap");function jV(a,u){var h=VV;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}$(jV,"getUsefulRect");function UV(a,u,h,p){var y=bk(u.map,h,p),T=y.node,A=y.start,L=y.end,M=y.collapse,V;if(T.nodeType==3){for(var G=0;G<4;G++){for(;A&&Ec(u.line.text.charAt(y.coverStart+A));)--A;for(;y.coverStart+L<y.coverEnd&&Ec(u.line.text.charAt(y.coverStart+L));)++L;if(c&&f<9&&A==0&&L==y.coverEnd-y.coverStart?V=T.parentNode.getBoundingClientRect():V=jV(te(T,A,L).getClientRects(),p),V.left||V.right||A==0)break;L=A,A=A-1,M="right"}c&&f<11&&(V=BV(a.display.measure,V))}else{A>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&&!A&&(!V||!V.left&&!V.right)){var se=T.parentNode.getClientRects()[0];se?V={left:se.left,right:se.left+_c(a.display),top:se.top,bottom:se.bottom}:V=VV}for(var oe=V.top-u.rect.top,pe=V.bottom-u.rect.top,be=(oe+pe)/2,ke=u.view.measure.heights,Oe=0;Oe<ke.length-1&&!(be<ke[Oe]);Oe++);var Le=Oe?ke[Oe-1]:0,De=ke[Oe],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}$(UV,"measureCharInner");function BV(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}}$(BV,"maybeUpdateRectForZooming");function Ek(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]={}}$(Ek,"clearLineMeasurementCacheFor");function wk(a){a.display.externalMeasure=null,H(a.display.lineMeasure);for(var u=0;u<a.display.view.length;u++)Ek(a.display.view[u])}$(wk,"clearLineMeasurementCache");function Df(a){wk(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}$(Df,"clearCaches");function xk(){return m&&x?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}$(xk,"pageScrollX");function Sk(){return m&&x?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}$(Sk,"pageScrollY");function Zy(a){var u=si(a),h=u.widgets,p=0;if(h)for(var y=0;y<h.length;++y)h[y].above&&(p+=Of(h[y]));return p}$(Zy,"widgetTopHeight");function Ah(a,u,h,p,y){if(!y){var T=Zy(u);h.top+=T,h.bottom+=T}if(p=="line")return h;p||(p="local");var A=cs(u);if(p=="local"?A+=_h(a.display):A-=a.display.viewOffset,p=="page"||p=="window"){var L=a.display.lineSpace.getBoundingClientRect();A+=L.top+(p=="window"?0:Sk());var M=L.left+(p=="window"?0:xk());h.left+=M,h.right+=M}return h.top+=A,h.bottom+=A,h}$(Ah,"intoCoordSystem");function Tk(a,u,h){if(h=="div")return u;var p=u.left,y=u.top;if(h=="page")p-=xk(),y-=Sk();else if(h=="local"||!h){var T=a.display.sizer.getBoundingClientRect();p+=T.left,y+=T.top}var A=a.display.lineSpace.getBoundingClientRect();return{left:p-A.left,top:y-A.top}}$(Tk,"fromCoordSystem");function Oh(a,u,h,p,y){return p||(p=Pe(a.doc,u.line)),Ah(a,p,yk(a,p,u.ch,y),h)}$(Oh,"charCoords");function ai(a,u,h,p,y,T){p=p||Pe(a.doc,u.line),y||(y=Cc(a,p));function A(pe,be){var ke=Vi(a,y,pe,be?"right":"left",T);return be?ke.left=ke.right:ke.right=ke.left,Ah(a,p,ke,h)}$(A,"get");var L=Ar(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 A(V=="before"?M-1:M,V=="before");function G(pe,be,ke){var Oe=L[be],Le=Oe.level==1;return A(ke?pe-1:pe,Le!=ke)}$(G,"getBidi");var X=Yt(L,M,V),se=io,oe=G(M,X,V=="before");return se!=null&&(oe.other=G(M,se,V!="before")),oe}$(ai,"cursorCoords");function Ck(a,u){var h=0;u=Re(a.doc,u),a.options.lineWrapping||(h=_c(a.display)*u.ch);var p=Pe(a.doc,u.line),y=cs(p)+_h(a.display);return{left:h,right:h,top:y,bottom:y+p.height}}$(Ck,"estimateCoords");function e1(a,u,h,p,y){var T=we(a,u,h);return T.xRel=y,p&&(T.outside=p),T}$(e1,"PosWithInfo");function t1(a,u,h){var p=a.doc;if(h+=a.display.viewOffset,h<0)return e1(p.first,0,null,-1,-1);var y=ii(p,h),T=p.first+p.size-1;if(y>T)return e1(p.first+p.size-1,Pe(p,T).text.length,null,1,1);u<0&&(u=0);for(var A=Pe(p,y);;){var L=qV(a,A,y,u,h),M=yV(A,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;A=Pe(p,y=V.line)}}$(t1,"coordsChar");function kk(a,u,h,p){p-=Zy(u);var y=u.text.length,T=ei(function(A){return Vi(a,h,A-1).bottom<=p},y,0);return y=ei(function(A){return Vi(a,h,A).top>p},T,y),{begin:T,end:y}}$(kk,"wrappedLineExtent");function Nk(a,u,h,p){h||(h=Cc(a,u));var y=Ah(a,u,Vi(a,h,p),"line").top;return kk(a,u,h,y)}$(Nk,"wrappedLineExtentChar");function n1(a,u,h,p){return a.bottom<=h?!1:a.top>h?!0:(p?a.left:a.right)>u}$(n1,"boxIsAfter");function qV(a,u,h,p,y){y-=cs(u);var T=Cc(a,u),A=Zy(u),L=0,M=u.text.length,V=!0,G=Ar(u,a.doc.direction);if(G){var X=(a.options.lineWrapping?HV:zV)(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(Qe){var ze=Vi(a,T,Qe);return ze.top+=A,ze.bottom+=A,n1(ze,p,y,!1)?(ze.top<=y&&ze.left<=p&&(se=Qe,oe=ze),!0):!1},L,M),be,ke,Oe=!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+A<=y==V?"after":"before";var Me=ai(a,we(h,pe,ke),"line",u,T);be=Me.left,Oe=y<Me.top?-1:y>=Me.bottom?1:0}return pe=gf(u.text,pe,1),e1(h,pe,ke,Oe,p-be)}$(qV,"coordsCharInner");function zV(a,u,h,p,y,T,A){var L=ei(function(X){var se=y[X],oe=se.level!=1;return n1(ai(a,we(h,oe?se.to:se.from,oe?"before":"after"),"line",u,p),T,A,!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);n1(G,T,A,!0)&&G.top>A&&(M=y[L-1])}return M}$(zV,"coordsBidiPart");function HV(a,u,h,p,y,T,A){var L=kk(a,u,p,A),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}$(HV,"coordsBidiPartWrapped");var kc;function Nc(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(kc==null){kc=q("pre",null,"CodeMirror-line-like");for(var u=0;u<49;++u)kc.appendChild(document.createTextNode("x")),kc.appendChild(q("br"));kc.appendChild(document.createTextNode("x"))}z(a.measure,kc);var h=kc.offsetHeight/50;return h>3&&(a.cachedTextHeight=h),H(a.measure),h||1}$(Nc,"textHeight");function _c(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var u=q("span","xxxxxxxxxx"),h=q("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}$(_c,"charWidth");function r1(a){for(var u=a.display,h={},p={},y=u.gutters.clientLeft,T=u.gutters.firstChild,A=0;T;T=T.nextSibling,++A){var L=a.display.gutterSpecs[A].className;h[L]=T.offsetLeft+T.clientLeft+y,p[L]=T.clientWidth}return{fixedPos:o1(u),gutterTotalWidth:u.gutters.offsetWidth,gutterLeft:h,gutterWidth:p,wrapperWidth:u.wrapper.clientWidth}}$(r1,"getDimensions");function o1(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}$(o1,"compensateForHScroll");function _k(a){var u=Nc(a.display),h=a.options.lineWrapping,p=h&&Math.max(5,a.display.scroller.clientWidth/_c(a.display)-3);return function(y){if(Ys(a.doc,y))return 0;var T=0;if(y.widgets)for(var A=0;A<y.widgets.length;A++)y.widgets[A].height&&(T+=y.widgets[A].height);return h?T+(Math.ceil(y.text.length/p)||1)*u:T+u}}$(_k,"estimateHeight");function i1(a){var u=a.doc,h=_k(a);u.iter(function(p){var y=h(p);y!=p.height&&Dr(p,y)})}$(i1,"estimateLineHeights");function ul(a,u,h,p){var y=a.display;if(!h&&ss(u).getAttribute("cm-not-content")=="true")return null;var T,A,L=y.lineSpace.getBoundingClientRect();try{T=u.clientX-L.left,A=u.clientY-L.top}catch{return null}var M=t1(a,T,A),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-gk(a.display).left)/_c(a.display))-G))}return M}$(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}$(fl,"findViewIndex");function Ir(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&&Wy(a.doc,u)<y.viewTo&&Ks(a);else if(h<=y.viewFrom)Gs&&sk(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=Dh(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 A=Dh(a,u,u,-1);A?(y.view=y.view.slice(0,A.index),y.viewTo=A.lineN):Ks(a)}else{var L=Dh(a,u,u,-1),M=Dh(a,h,h+p,1);L&&M?(y.view=y.view.slice(0,L.index).concat(kh(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))}$(Ir,"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 A=T.changes||(T.changes=[]);le(A,h)==-1&&A.push(h)}}}$(Qs,"regLineChange");function Ks(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}$(Ks,"resetView");function Dh(a,u,h,p){var y=fl(a,u),T,A=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+=A[M].size;if(L!=u){if(p>0){if(y==A.length-1)return null;T=L+A[y].size-u,y++}else T=L-u;u+=T,h+=T}for(;Wy(a.doc,h)!=h;){if(y==(p<0?0:A.length-1))return null;h+=p*A[y-(p<0?1:0)].size,y+=p}return{index:y,lineN:h}}$(Dh,"viewCuttingPoint");function WV(a,u,h){var p=a.display,y=p.view;y.length==0||u>=p.viewTo||h<=p.viewFrom?(p.view=kh(a,u,h),p.viewFrom=u):(p.viewFrom>u?p.view=kh(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(kh(a,p.viewTo,h)):p.viewTo>h&&(p.view=p.view.slice(0,fl(a,h)))),p.viewTo=h}$(WV,"adjustView");function Ak(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}$(Ak,"countDirtyView");function If(a){a.display.input.showSelection(a.display.input.prepareSelection())}$(If,"updateSelection");function Ok(a,u){u===void 0&&(u=!0);var h=a.doc,p={},y=p.cursors=document.createDocumentFragment(),T=p.selection=document.createDocumentFragment(),A=a.options.$customCursor;A&&(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(A){var G=A(a,M);G&&s1(a,G,y)}else(V||a.options.showCursorWhenSelecting)&&s1(a,M.head,y);V||GV(a,M,T)}}return p}$(Ok,"prepareSelection");function s1(a,u,h){var p=ai(a,u,"div",null,null,!a.options.singleCursorHeightPerLine),y=h.appendChild(q("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=Oh(a,u,"div",null,null),A=T.right-T.left;y.style.width=(A>0?A:a.defaultCharWidth())+"px"}if(p.other){var L=h.appendChild(q("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"}}$(s1,"drawSelectionCursor");function Ih(a,u){return a.top-u.top||a.left-u.left}$(Ih,"cmpCoords");function GV(a,u,h){var p=a.display,y=a.doc,T=document.createDocumentFragment(),A=gk(a.display),L=A.left,M=Math.max(p.sizerWidth,cl(a)-p.sizer.offsetLeft)-A.right,V=y.direction=="ltr";function G(De,Me,Qe,ze){Me<0&&(Me=0),Me=Math.round(Me),ze=Math.round(ze),T.appendChild(q("div",null,"CodeMirror-selected","position: absolute; left: "+De+`px;
top: `+Me+"px; width: "+(Qe??M-De)+`px;
height: `+(ze-Me)+"px"))}$(G,"add");function X(De,Me,Qe){var ze=Pe(y,De),at=ze.text.length,Lt,qn;function Qt(Tn,Qr){return Oh(a,we(De,Tn),"div",ze,Qr)}$(Qt,"coords");function Gr(Tn,Qr,Zn){var Ln=Nk(a,ze,null,Tn),Cn=Qr=="ltr"==(Zn=="after")?"left":"right",fn=Zn=="after"?Ln.begin:Ln.end-(/\s/.test(ze.text.charAt(Ln.end-1))?2:1);return Qt(fn,Cn)[Cn]}$(Gr,"wrapX");var Yr=Ar(ze,y.direction);return yh(Yr,Me||0,Qe??at,function(Tn,Qr,Zn,Ln){var Cn=Zn=="ltr",fn=Qt(Tn,Cn?"left":"right"),Kr=Qt(Qr-1,Cn?"right":"left"),Wf=Me==null&&Tn==0,vl=Qe==null&&Qr==at,mr=Ln==0,fs=!Yr||Ln==Yr.length-1;if(Kr.top-fn.top<=3){var zn=(V?Wf:vl)&&mr,UN=(V?vl:Wf)&&fs,na=zn?L:(Cn?fn:Kr).left,Uc=UN?M:(Cn?Kr:fn).right;G(na,fn.top,Uc-na,fn.bottom)}else{var Bc,Lr,Gf,BN;Cn?(Bc=V&&Wf&&mr?L:fn.left,Lr=V?M:Gr(Tn,Zn,"before"),Gf=V?L:Gr(Qr,Zn,"after"),BN=V&&vl&&fs?M:Kr.right):(Bc=V?Gr(Tn,Zn,"before"):L,Lr=!V&&Wf&&mr?M:fn.right,Gf=!V&&vl&&fs?L:Kr.left,BN=V?Gr(Qr,Zn,"after"):M),G(Bc,fn.top,Lr-Bc,fn.bottom),fn.bottom<Kr.top&&G(L,fn.bottom,null,Kr.top),G(Gf,Kr.top,BN-Gf,Kr.bottom)}(!Lt||Ih(fn,Lt)<0)&&(Lt=fn),Ih(Kr,Lt)<0&&(Lt=Kr),(!qn||Ih(fn,qn)<0)&&(qn=fn),Ih(Kr,qn)<0&&(qn=Kr)}),{start:Lt,end:qn}}$(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),Oe=X(se.line,se.ch,ke?pe.text.length+1:null).end,Le=X(oe.line,ke?0:null,oe.ch).start;ke&&(Oe.top<Le.top-2?(G(Oe.right,Oe.top,null,Oe.bottom),G(L,Le.top,Le.left,Le.bottom)):G(Oe.right,Oe.top,Le.left-Oe.right,Oe.bottom)),Oe.bottom<Le.top&&G(L,Oe.bottom,null,Le.top)}h.appendChild(T)}$(GV,"drawSelectionRange");function a1(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()||Ac(a),u.cursorDiv.style.visibility=(h=!h)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(u.cursorDiv.style.visibility="hidden")}}$(a1,"restartBlink");function Dk(a){a.hasFocus()||(a.display.input.focus(),a.state.focused||c1(a))}$(Dk,"ensureFocus");function l1(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,a.state.focused&&Ac(a))},100)}$(l1,"delayBlurEvent");function c1(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()),a1(a))}$(c1,"onFocus");function Ac(a,u){a.state.delayingBlurEvent||(a.state.focused&&(Ke(a,"blur",a,u),a.state.focused=!1,B(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}$(Ac,"onBlur");function Lh(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,A=0;A<u.view.length;A++){var L=u.view[A],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),Dr(L.line,V),Ik(L.line),L.rest))for(var pe=0;pe<L.rest.length;pe++)Ik(L.rest[pe]);if(G>a.display.sizerWidth){var be=Math.ceil(G/_c(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)}$(Lh,"updateHeightsInViewport");function Ik(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)}}$(Ik,"updateWidgetHeight");function Rh(a,u,h){var p=h&&h.top!=null?Math.max(0,h.top):a.scroller.scrollTop;p=Math.floor(p-_h(a));var y=h&&h.bottom!=null?h.bottom:p+a.wrapper.clientHeight,T=ii(u,p),A=ii(u,y);if(h&&h.ensure){var L=h.ensure.from.line,M=h.ensure.to.line;L<T?(T=L,A=ii(u,cs(Pe(u,L))+a.wrapper.clientHeight)):Math.min(M,u.lastLine())>=A&&(T=ii(u,cs(Pe(u,M))-a.wrapper.clientHeight),A=M)}return{from:T,to:Math.max(A,T+1)}}$(Rh,"visibleLines");function YV(a,u){if(!un(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=q("div","",null,`position: absolute;
top: `+(u.top-h.viewOffset-_h(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)}}}$(YV,"maybeScrollWindow");function QV(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 A=!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=u1(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&&(A=!0)),V.scrollLeft!=null&&(dl(a,V.scrollLeft),Math.abs(a.doc.scrollLeft-X)>1&&(A=!0)),!A)break}return y}$(QV,"scrollPosIntoView");function KV(a,u){var h=u1(a,u);h.scrollTop!=null&&Rf(a,h.scrollTop),h.scrollLeft!=null&&dl(a,h.scrollLeft)}$(KV,"scrollIntoView");function u1(a,u){var h=a.display,p=Nc(a.display);u.top<0&&(u.top=0);var y=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:h.scroller.scrollTop,T=Jy(a),A={};u.bottom-u.top>T&&(u.bottom=u.top+T);var L=a.doc.height+Ky(h),M=u.top<p,V=u.bottom>L-p;if(u.top<y)A.scrollTop=M?0:u.top;else if(u.bottom>y+T){var G=Math.min(u.top,(V?L:u.bottom)-T);G!=y&&(A.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?A.scrollLeft=0:u.left<se?A.scrollLeft=Math.max(0,u.left+X-(pe?0:10)):u.right>oe+se-3&&(A.scrollLeft=u.right+(pe?0:10)-oe),A}$(u1,"calculateScrollPos");function f1(a,u){u!=null&&(Fh(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+u)}$(f1,"addToScrollTop");function Oc(a){Fh(a);var u=a.getCursor();a.curOp.scrollToPos={from:u,to:u,margin:a.options.cursorScrollMargin}}$(Oc,"ensureCursorVisible");function Lf(a,u,h){(u!=null||h!=null)&&Fh(a),u!=null&&(a.curOp.scrollLeft=u),h!=null&&(a.curOp.scrollTop=h)}$(Lf,"scrollToCoords");function JV(a,u){Fh(a),a.curOp.scrollToPos=u}$(JV,"scrollToRange");function Fh(a){var u=a.curOp.scrollToPos;if(u){a.curOp.scrollToPos=null;var h=Ck(a,u.from),p=Ck(a,u.to);Lk(a,h,p,u.margin)}}$(Fh,"resolveScrollToPos");function Lk(a,u,h,p){var y=u1(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)}$(Lk,"scrollToCoordsRange");function Rf(a,u){Math.abs(a.doc.scrollTop-u)<2||(o||h1(a,{top:u}),Rk(a,u,!0),o&&h1(a),Mf(a,100))}$(Rf,"updateScrollTop");function Rk(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))}$(Rk,"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,$k(a),a.display.scroller.scrollLeft!=u&&(a.display.scroller.scrollLeft=u),a.display.scrollbars.setScrollLeft(u))}$(dl,"setScrollLeft");function Ff(a){var u=a.display,h=u.gutters.offsetWidth,p=Math.round(a.doc.height+Ky(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}}$(Ff,"measureForScrollbars");var Dc=$(function(a,u,h){this.cm=h;var p=this.vert=q("div",[q("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),y=this.horiz=q("div",[q("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");p.tabIndex=y.tabIndex=-1,a(p),a(y),Ge(p,"scroll",function(){p.clientHeight&&u(p.scrollTop,"vertical")}),Ge(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");Dc.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}},Dc.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dc.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dc.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},Dc.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,"maybeDisable"),u.set(1e3,p)},Dc.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var Mh=$(function(){},"NullScrollbars");Mh.prototype.update=function(){return{bottom:0,right:0}},Mh.prototype.setScrollLeft=function(){},Mh.prototype.setScrollTop=function(){},Mh.prototype.clear=function(){};function Ic(a,u){u||(u=Ff(a));var h=a.display.barWidth,p=a.display.barHeight;Fk(a,u);for(var y=0;y<4&&h!=a.display.barWidth||p!=a.display.barHeight;y++)h!=a.display.barWidth&&a.options.lineWrapping&&Lh(a),Fk(a,Ff(a)),h=a.display.barWidth,p=a.display.barHeight}$(Ic,"updateScrollbars");function Fk(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=""}$(Fk,"updateScrollbarsInner");var XV={native:Dc,null:Mh};function Mk(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&B(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new XV[a.options.scrollbarStyle](function(u){a.display.wrapper.insertBefore(u,a.display.scrollbarFiller),Ge(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)}$(Mk,"initScrollbars");var $ue=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:++$ue,markArrays:null},_V(a.curOp)}$(pl,"startOperation");function hl(a){var u=a.curOp;u&&OV(u,function(h){for(var p=0;p<h.ops.length;p++)h.ops[p].cm.curOp=null;ZV(h)})}$(hl,"endOperation");function ZV(a){for(var u=a.ops,h=0;h<u.length;h++)e8(u[h]);for(var p=0;p<u.length;p++)t8(u[p]);for(var y=0;y<u.length;y++)n8(u[y]);for(var T=0;T<u.length;T++)r8(u[T]);for(var A=0;A<u.length;A++)o8(u[A])}$(ZV,"endOperations");function e8(a){var u=a.cm,h=u.display;s8(u),a.updateMaxLine&&Yy(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 d1(u,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}$(e8,"endOperation_R1");function t8(a){a.updatedDisplay=a.mustUpdate&&p1(a.cm,a.update)}$(t8,"endOperation_W1");function n8(a){var u=a.cm,h=u.display;a.updatedDisplay&&Lh(u),a.barMeasure=Ff(u),h.maxLineChanged&&!u.options.lineWrapping&&(a.adjustWidthTo=yk(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())}$(n8,"endOperation_R2");function r8(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)&&Ic(u,a.barMeasure),a.updatedDisplay&&g1(u,a.barMeasure),a.selectionChanged&&a1(u),u.state.focused&&a.updateInput&&u.display.input.reset(a.typing),h&&Dk(a.cm)}$(r8,"endOperation_W2");function o8(a){var u=a.cm,h=u.display,p=u.doc;if(a.updatedDisplay&&Pk(u,a.update),h.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(h.wheelStartX=h.wheelStartY=null),a.scrollTop!=null&&Rk(u,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&dl(u,a.scrollLeft,!0,!0),a.scrollToPos){var y=QV(u,Re(p,a.scrollToPos.from),Re(p,a.scrollToPos.to),a.scrollToPos.margin);YV(u,y)}var T=a.maybeHiddenMarkers,A=a.maybeUnhiddenMarkers;if(T)for(var L=0;L<T.length;++L)T[L].lines.length||Ke(T[L],"hide");if(A)for(var M=0;M<A.length;++M)A[M].lines.length&&Ke(A[M],"unhide");h.wrapper.offsetHeight&&(p.scrollTop=u.display.scroller.scrollTop),a.changeObjs&&Ke(u,"changes",u,a.changeObjs),a.update&&a.update.finish()}$(o8,"endOperation_finish");function Hr(a,u){if(a.curOp)return u();pl(a);try{return u()}finally{hl(a)}}$(Hr,"runInOp");function Dn(a,u){return function(){if(a.curOp)return u.apply(a,arguments);pl(a);try{return u.apply(a,arguments)}finally{hl(a)}}}$(Dn,"operation");function hr(a){return function(){if(this.curOp)return a.apply(this,arguments);pl(this);try{return a.apply(this,arguments)}finally{hl(this)}}}$(hr,"methodOp");function In(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)}}}$(In,"docMethodOp");function Mf(a,u){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(u,J(i8,a))}$(Mf,"startWorker");function i8(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 A=T.styles,L=T.text.length>a.options.maxHighlightLength?ao(u.mode,p.state):null,M=YC(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=!A||A.length!=T.styles.length||V!=G&&(!V||!G||V.bgClass!=G.bgClass||V.textClass!=G.textClass),se=0;!X&&se<A.length;++se)X=A[se]!=T.styles[se];X&&y.push(p.line),T.stateAfter=p.save(),p.nextLine()}else T.text.length<=a.options.maxHighlightLength&&By(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")})}}$(i8,"highlightWorker");var d1=$(function(a,u,h){var p=a.display;this.viewport=u,this.visible=Rh(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=r1(a),this.events=[]},"DisplayUpdate");d1.prototype.signal=function(a,u){An(a,u)&&this.events.push(arguments)},d1.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Ke.apply(null,this.events[a])};function s8(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)}$(s8,"maybeClipScrollbars");function a8(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}$(a8,"selectionSnapshot");function l8(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)}}$(l8,"restoreSelection");function p1(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&&Ak(a)==0)return!1;Vk(a)&&(Ks(a),u.dims=r1(a));var y=p.first+p.size,T=Math.max(u.visible.from-a.options.viewportMargin,p.first),A=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>A&&h.viewTo-A<20&&(A=Math.min(y,h.viewTo)),Gs&&(T=Wy(a.doc,T),A=sk(a.doc,A));var L=T!=h.viewFrom||A!=h.viewTo||h.lastWrapHeight!=u.wrapperHeight||h.lastWrapWidth!=u.wrapperWidth;WV(a,T,A),h.viewOffset=cs(Pe(a.doc,h.viewFrom)),a.display.mover.style.top=h.viewOffset+"px";var M=Ak(a);if(!L&&M==0&&!u.force&&h.renderedView==h.view&&(h.updateLineNumbers==null||h.updateLineNumbers>=h.viewTo))return!1;var V=a8(a);return M>4&&(h.lineDiv.style.display="none"),c8(a,h.updateLineNumbers,u.dims),M>4&&(h.lineDiv.style.display=""),h.renderedView=h.view,l8(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}$(p1,"updateDisplayIfNeeded");function Pk(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+Ky(a.display)-Jy(a),h.top)}),u.visible=Rh(a.display,a.doc,h),u.visible.from>=a.display.viewFrom&&u.visible.to<=a.display.viewTo)break}else p&&(u.visible=Rh(a.display,a.doc,h));if(!p1(a,u))break;Lh(a);var y=Ff(a);If(a),Ic(a,y),g1(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)}$(Pk,"postUpdateDisplay");function h1(a,u){var h=new d1(a,u);if(p1(a,h)){Lh(a),Pk(a,h);var p=Ff(a);If(a),Ic(a,p),g1(a,p),h.finish()}}$(h1,"updateDisplaySimple");function c8(a,u,h){var p=a.display,y=a.options.lineNumbers,T=p.lineDiv,A=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}$(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=FV(a,X,V,h);T.insertBefore(se,A)}else{for(;A!=X.node;)A=L(A);var oe=y&&u!=null&&u<=V&&X.lineNumber;X.changes&&(le(X.changes,"gutter")>-1&&(oe=!1),fk(a,X,V,h)),oe&&(H(X.lineNumber),X.lineNumber.appendChild(document.createTextNode(Tc(a.options,V)))),A=X.node.nextSibling}V+=X.size}for(;A;)A=L(A)}$(c8,"patchDisplay");function m1(a){var u=a.gutters.offsetWidth;a.sizer.style.marginLeft=u+"px",On(a,"gutterChanged",a)}$(m1,"updateGutterSpace");function g1(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"}$(g1,"setDocumentHeight");function $k(a){var u=a.display,h=u.view;if(!(!u.alignWidgets&&(!u.gutters.firstChild||!a.options.fixedGutter))){for(var p=o1(u)-u.scroller.scrollLeft+a.doc.scrollLeft,y=u.gutters.offsetWidth,T=p+"px",A=0;A<h.length;A++)if(!h[A].hidden){a.options.fixedGutter&&(h[A].gutter&&(h[A].gutter.style.left=T),h[A].gutterBackground&&(h[A].gutterBackground.style.left=T));var L=h[A].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")}}$($k,"alignHorizontally");function Vk(a){if(!a.options.lineNumbers)return!1;var u=a.doc,h=Tc(a.options,u.first+u.size-1),p=a.display;if(h.length!=p.lineNumChars){var y=p.measure.appendChild(q("div",[q("div",h)],"CodeMirror-linenumber CodeMirror-gutter-elt")),T=y.firstChild.offsetWidth,A=y.offsetWidth-T;return p.lineGutter.style.width="",p.lineNumInnerWidth=Math.max(T,p.lineGutter.offsetWidth-A)+1,p.lineNumWidth=p.lineNumInnerWidth+A,p.lineNumChars=p.lineNumInnerWidth?h.length:-1,p.lineGutter.style.width=p.lineNumWidth+"px",m1(a.display),!0}return!1}$(Vk,"maybeUpdateLineNumberWidth");function v1(a,u){for(var h=[],p=!1,y=0;y<a.length;y++){var T=a[y],A=null;if(typeof T!="string"&&(A=T.style,T=T.className),T=="CodeMirror-linenumbers")if(u)p=!0;else continue;h.push({className:T,style:A})}return u&&!p&&h.push({className:"CodeMirror-linenumbers",style:null}),h}$(v1,"getGutters");function jk(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,A=y.style,L=u.appendChild(q("div",null,"CodeMirror-gutter "+T));A&&(L.style.cssText=A),T=="CodeMirror-linenumbers"&&(a.lineGutter=L,L.style.width=(a.lineNumWidth||1)+"px")}u.style.display=h.length?"":"none",m1(a)}$(jk,"renderGutters");function Pf(a){jk(a.display),Ir(a),$k(a)}$(Pf,"updateGutters");function u8(a,u,h,p){var y=this;this.input=h,y.scrollbarFiller=q("div",null,"CodeMirror-scrollbar-filler"),y.scrollbarFiller.setAttribute("cm-not-content","true"),y.gutterFiller=q("div",null,"CodeMirror-gutter-filler"),y.gutterFiller.setAttribute("cm-not-content","true"),y.lineDiv=F("div",null,"CodeMirror-code"),y.selectionDiv=q("div",null,null,"position: relative; z-index: 1"),y.cursorDiv=q("div",null,"CodeMirror-cursors"),y.measure=q("div",null,"CodeMirror-measure"),y.lineMeasure=q("div",null,"CodeMirror-measure"),y.lineSpace=F("div",[y.measure,y.lineMeasure,y.selectionDiv,y.cursorDiv,y.lineDiv],null,"position: relative; outline: none");var T=F("div",[y.lineSpace],"CodeMirror-lines");y.mover=q("div",[T],null,"position: relative"),y.sizer=q("div",[y.mover],"CodeMirror-sizer"),y.sizerWidth=null,y.heightForcer=q("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),y.gutters=q("div",null,"CodeMirror-gutters"),y.lineGutter=null,y.scroller=q("div",[y.sizer,y.heightForcer,y.gutters],"CodeMirror-scroll"),y.scroller.setAttribute("tabIndex","-1"),y.wrapper=q("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=v1(p.gutters,p.lineNumbers),jk(y),h.init(y)}$(u8,"Display");var y1=0,Js=null;c?Js=-.53:o?Js=15:m?Js=-.7:b&&(Js=-1/3);function Uk(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}}$(Uk,"wheelEventDelta");function f8(a){var u=Uk(a);return u.x*=Js,u.y*=Js,u}$(f8,"wheelEventPixels");function Bk(a,u){var h=Uk(u),p=h.x,y=h.y,T=Js;u.deltaMode===0&&(p=u.deltaX,y=u.deltaY,T=1);var A=a.display,L=A.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=A.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),A.wheelStartX=null;return}if(y&&T!=null){var oe=y*T,pe=a.doc.scrollTop,be=pe+A.wrapper.clientHeight;oe<0?pe=Math.max(0,pe+oe-50):be=Math.min(a.doc.height,be+oe+50),h1(a,{top:pe,bottom:be})}y1<20&&u.deltaMode!==0&&(A.wheelStartX==null?(A.wheelStartX=L.scrollLeft,A.wheelStartY=L.scrollTop,A.wheelDX=p,A.wheelDY=y,setTimeout(function(){if(A.wheelStartX!=null){var ke=L.scrollLeft-A.wheelStartX,Oe=L.scrollTop-A.wheelStartY,Le=Oe&&A.wheelDY&&Oe/A.wheelDY||ke&&A.wheelDX&&ke/A.wheelDX;A.wheelStartX=A.wheelStartY=null,Le&&(Js=(Js*y1+Le)/(y1+1),++y1)}},200)):(A.wheelDX+=p,A.wheelDY+=y))}}$(Bk,"onScrollWheel");var Io=$(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=$(function(a,u){this.anchor=a,this.head=u},"Range");St.prototype.from=function(){return Xe(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 A=u[T],L=u[T-1],M=j(L.to(),A.from());if(p&&!A.empty()?M>0:M>=0){var V=Xe(L.from(),A.from()),G=Te(L.to(),A.to()),X=L.empty()?A.from()==A.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)}$(li,"normalizeSelection");function Xs(a,u){return new Io([new St(a,u||a)],0)}$(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}$(Zs,"changeEnd");function qk(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)}$(qk,"adjustForChange");function b1(a,u){for(var h=[],p=0;p<a.sel.ranges.length;p++){var y=a.sel.ranges[p];h.push(new St(qk(y.anchor,u),qk(y.head,u)))}return li(a.cm,h,a.sel.primIndex)}$(b1,"computeSelAfterChange");function zk(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)}$(zk,"offsetPos");function d8(a,u,h){for(var p=[],y=we(a.first,0),T=y,A=0;A<u.length;A++){var L=u[A],M=zk(L.from,y,T),V=zk(Zs(L),y,T);if(y=L.to,T=V,h=="around"){var G=a.sel.ranges[A],X=j(G.head,G.anchor)<0;p[A]=new St(X?V:M,X?M:V)}else p[A]=new St(M,M)}return new Io(p,a.sel.primIndex)}$(d8,"computeReplacedSel");function E1(a){a.doc.mode=ll(a.options,a.doc.modeOption),$f(a)}$(E1,"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&&Ir(a)}$($f,"resetModeState");function Hk(a,u){return u.from.ch==0&&u.to.ch==0&&je(u.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}$(Hk,"isWholeLineUpdate");function w1(a,u,h,p){function y(Le){return h?h[Le]:null}$(y,"spansFor");function T(Le,De,Me){wV(Le,De,Me,p),On(Le,"change",Le,u)}$(T,"update");function A(Le,De){for(var Me=[],Qe=Le;Qe<De;++Qe)Me.push(new Nf(V[Qe],y(Qe),p));return Me}$(A,"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,A(0,V.length)),a.remove(V.length,a.size-V.length);else if(Hk(a,u)){var be=A(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=A(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 Oe=A(1,V.length-1);pe>1&&a.remove(L.line+1,pe-1),a.insert(L.line+1,Oe)}On(a,"change",a,u)}$(w1,"updateDoc");function ea(a,u,h){function p(y,T,A){if(y.linked)for(var L=0;L<y.linked.length;++L){var M=y.linked[L];if(M.doc!=T){var V=A&&M.sharedHist;h&&!V||(u(M.doc,V),p(M.doc,y,V))}}}$(p,"propagate"),p(a,null,!0)}$(ea,"linkedDocs");function Wk(a,u){if(u.cm)throw new Error("This document is already in use.");a.doc=u,u.cm=a,i1(a),E1(a),Gk(a),a.options.direction=u.direction,a.options.lineWrapping||Yy(a),a.options.mode=u.modeOption,Ir(a)}$(Wk,"attachDoc");function Gk(a){(a.doc.direction=="rtl"?K:B)(a.display.lineDiv,"CodeMirror-rtl")}$(Gk,"setDirectionClass");function p8(a){Hr(a,function(){Gk(a),Ir(a)})}$(p8,"directionChanged");function Ph(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}$(Ph,"History");function x1(a,u){var h={from:me(u.from),to:Zs(u),text:oi(a,u.from,u.to)};return Kk(a,h,u.from.line,u.to.line+1),ea(a,function(p){return Kk(p,h,u.from.line,u.to.line+1)},!0),h}$(x1,"historyChangeFromChange");function Yk(a){for(;a.length;){var u=je(a);if(u.ranges)a.pop();else break}}$(Yk,"clearSelectionEvents");function h8(a,u){if(u)return Yk(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)}$(h8,"lastChangeEvent");function Qk(a,u,h,p){var y=a.history;y.undone.length=0;var T=+new Date,A,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)=="*"))&&(A=h8(y,y.lastOp==p)))L=je(A.changes),j(u.from,u.to)==0&&j(u.from,L.to)==0?L.to=Zs(u):A.changes.push(x1(a,u));else{var M=je(y.done);for((!M||!M.ranges)&&$h(a.sel,y.done),A={changes:[x1(a,u)],generation:y.generation},y.done.push(A);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")}$(Qk,"addChangeToHistory");function m8(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)}$(m8,"selectionEventCanBeMerged");function g8(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||m8(a,T,je(y.done),u))?y.done[y.done.length-1]=u:$h(u,y.done),y.lastSelTime=+new Date,y.lastSelOrigin=T,y.lastSelOp=h,p&&p.clearRedo!==!1&&Yk(y.undone)}$(g8,"addSelectionToHistory");function $h(a,u){var h=je(u);h&&h.ranges&&h.equals(a)||u.push(a)}$($h,"pushSelectionToHistory");function Kk(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(A){A.markedSpans&&((y||(y=u["spans_"+a.id]={}))[T]=A.markedSpans),++T})}$(Kk,"attachLocalSpans");function v8(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}$(v8,"removeClearedSpans");function y8(a,u){var h=u["spans_"+a.id];if(!h)return null;for(var p=[],y=0;y<u.text.length;++y)p.push(v8(h[y]));return p}$(y8,"getOldSpans");function Jk(a,u){var h=y8(a,u),p=zy(a,u);if(!h)return p;if(!p)return h;for(var y=0;y<h.length;++y){var T=h[y],A=p[y];if(T&&A)e:for(var L=0;L<A.length;++L){for(var M=A[L],V=0;V<T.length;++V)if(T[V].marker==M.marker)continue e;T.push(M)}else A&&(h[y]=A)}return h}$(Jk,"mergeOldSpans");function Lc(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 A=T.changes,L=[];p.push({changes:L});for(var M=0;M<A.length;++M){var V=A[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}$(Lc,"copyHistoryArray");function S1(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)}$(S1,"extendRange");function Vh(a,u,h,p,y){y==null&&(y=a.cm&&(a.cm.display.shift||a.extend)),Xn(a,new Io([S1(a.sel.primary(),u,h,y)],0),p)}$(Vh,"extendSelection");function Xk(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]=S1(a.sel.ranges[T],u[T],null,y);var A=li(a.cm,p,a.sel.primIndex);Xn(a,A,h)}$(Xk,"extendSelections");function T1(a,u,h,p){var y=a.sel.ranges.slice(0);y[u]=h,Xn(a,li(a.cm,y,a.sel.primIndex),p)}$(T1,"replaceOneSelection");function Zk(a,u,h,p){Xn(a,Xs(u,h),p)}$(Zk,"setSimpleSelection");function b8(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}$(b8,"filterSelectionChange");function eN(a,u,h){var p=a.history.done,y=je(p);y&&y.ranges?(p[p.length-1]=u,jh(a,u,h)):Xn(a,u,h)}$(eN,"setSelectionReplaceHistory");function Xn(a,u,h){jh(a,u,h),g8(a,a.sel,a.cm?a.cm.curOp.id:NaN,h)}$(Xn,"setSelection");function jh(a,u,h){(An(a,"beforeSelectionChange")||a.cm&&An(a.cm,"beforeSelectionChange"))&&(u=b8(a,u,h));var p=h&&h.bias||(j(u.primary().head,a.sel.primary().head)<0?-1:1);tN(a,rN(a,u,p,!0)),!(h&&h.scroll===!1)&&a.cm&&a.cm.getOption("readOnly")!="nocursor"&&Oc(a.cm)}$(jh,"setSelectionNoUndo");function tN(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))}$(tN,"setSelectionInner");function nN(a){tN(a,rN(a,a.sel,null,!1))}$(nN,"reCheckSelection");function rN(a,u,h,p){for(var y,T=0;T<u.ranges.length;T++){var A=u.ranges[T],L=u.ranges.length==a.sel.ranges.length&&a.sel.ranges[T],M=Uh(a,A.anchor,L&&L.anchor,h,p),V=Uh(a,A.head,L&&L.head,h,p);(y||M!=A.anchor||V!=A.head)&&(y||(y=u.ranges.slice(0,T)),y[T]=new St(M,V))}return y?li(a.cm,y,u.primIndex):u}$(rN,"skipAtomicInSelection");function Rc(a,u,h,p,y){var T=Pe(a,u.line);if(T.markedSpans)for(var A=0;A<T.markedSpans.length;++A){var L=T.markedSpans[A],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){--A;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=oN(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 Rc(a,X,u,p,y)}var oe=M.find(p<0?-1:1);return(p<0?V:G)&&(oe=oN(a,oe,p,oe.line==u.line?T:null)),oe?Rc(a,oe,u,p,y):null}}return u}$(Rc,"skipAtomicInner");function Uh(a,u,h,p,y){var T=p||1,A=Rc(a,u,h,T,y)||!y&&Rc(a,u,h,T,!0)||Rc(a,u,h,-T,y)||!y&&Rc(a,u,h,-T,!0);return A||(a.cantEdit=!0,we(a.first,0))}$(Uh,"skipAtomic");function oN(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)}$(oN,"movePos");function iN(a){a.setSelection(we(a.firstLine(),0),we(a.lastLine()),ve)}$(iN,"selectAll");function sN(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,A,L){y&&(p.from=Re(a,y)),T&&(p.to=Re(a,T)),A&&(p.text=A),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}}$(sN,"filterChange");function Fc(a,u,h){if(a.cm){if(!a.cm.curOp)return Dn(a.cm,Fc)(a,u,h);if(a.cm.state.suppressEdits)return}if(!((An(a,"beforeChange")||a.cm&&An(a.cm,"beforeChange"))&&(u=sN(a,u,!0),!u))){var p=uV&&!h&&vV(a,u.from,u.to);if(p)for(var y=p.length-1;y>=0;--y)aN(a,{from:p[y].from,to:p[y].to,text:y?[""]:u.text,origin:u.origin});else aN(a,u)}}$(Fc,"makeChange");function aN(a,u){if(!(u.text.length==1&&u.text[0]==""&&j(u.from,u.to)==0)){var h=b1(a,u);Qk(a,u,h,a.cm?a.cm.curOp.id:NaN),Vf(a,u,h,zy(a,u));var p=[];ea(a,function(y,T){!T&&le(p,y.history)==-1&&(fN(y.history,u),p.push(y.history)),Vf(y,u,null,zy(y,u))})}}$(aN,"makeChangeInner");function Bh(a,u,h){var p=a.cm&&a.cm.state.suppressEdits;if(!(p&&!h)){for(var y=a.history,T,A=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($h(T,M),h&&!T.equals(a.sel)){Xn(a,T,{clearRedo:!1});return}A=T}else if(p){L.push(T);return}else break;var G=[];$h(A,M),M.push({changes:G,generation:y.generation}),y.generation=T.generation||++y.maxGeneration;for(var X=An(a,"beforeChange")||a.cm&&An(a.cm,"beforeChange"),se=$(function(be){var ke=T.changes[be];if(ke.origin=u,X&&!sN(a,ke,!1))return L.length=0,{};G.push(x1(a,ke));var Oe=be?b1(a,ke):je(L);Vf(a,ke,Oe,Jk(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&&(fN(De.history,ke),Le.push(De.history)),Vf(De,ke,null,Jk(De,ke))})},"loop"),oe=T.changes.length-1;oe>=0;--oe){var pe=se(oe);if(pe)return pe.v}}}}$(Bh,"makeChangeFromHistory");function lN(a,u){if(u!=0&&(a.first+=u,a.sel=new Io(It(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)){Ir(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")}}$(lN,"shiftDoc");function Vf(a,u,h,p){if(a.cm&&!a.cm.curOp)return Dn(a.cm,Vf)(a,u,h,p);if(u.to.line<a.first){lN(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);lN(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=b1(a,u)),a.cm?E8(a.cm,u,p):w1(a,u,p),jh(a,h,ve),a.cantEdit&&Uh(a,we(a.firstLine(),0))&&(a.cantEdit=!1)}}$(Vf,"makeChangeSingleDoc");function E8(a,u,h){var p=a.doc,y=a.display,T=u.from,A=u.to,L=!1,M=T.line;a.options.lineWrapping||(M=bt(si(Pe(p,T.line))),p.iter(M,A.line+1,function(oe){if(oe==y.maxLine)return L=!0,!0})),p.sel.contains(u.from,u.to)>-1&&il(a),w1(p,u,h,_k(a)),a.options.lineWrapping||(p.iter(M,T.line+u.text.length,function(oe){var pe=Ch(oe);pe>y.maxLineLength&&(y.maxLine=oe,y.maxLineLength=pe,y.maxLineChanged=!0,L=!1)}),L&&(a.curOp.updateMaxLine=!0)),cV(p,T.line),Mf(a,400);var V=u.text.length-(A.line-T.line)-1;u.full?Ir(a):T.line==A.line&&u.text.length==1&&!Hk(a.doc,u)?Qs(a,T.line,"text"):Ir(a,T.line,A.line+1,V);var G=An(a,"changes"),X=An(a,"change");if(X||G){var se={from:T,to:A,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}$(E8,"makeChangeSingleDocInEditor");function Mc(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)),Fc(a,{from:h,to:p,text:u,origin:y})}$(Mc,"replaceRange");function cN(a,u,h,p){h<a.line?a.line+=p:u<a.line&&(a.line=u,a.ch=0)}$(cN,"rebaseHistSelSingle");function uN(a,u,h,p){for(var y=0;y<a.length;++y){var T=a[y],A=!0;if(T.ranges){T.copied||(T=a[y]=T.deepCopy(),T.copied=!0);for(var L=0;L<T.ranges.length;L++)cN(T.ranges[L].anchor,u,h,p),cN(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){A=!1;break}}A||(a.splice(0,y+1),y=0)}}$(uN,"rebaseHistArray");function fN(a,u){var h=u.from.line,p=u.to.line,y=u.text.length-(p-h)-1;uN(a.done,h,p,y),uN(a.undone,h,p,y)}$(fN,"rebaseHist");function jf(a,u,h,p){var y=u,T=u;return typeof u=="number"?T=Pe(a,pt(a,u)):y=bt(u),y==null?null:(p(T,y)&&a.cm&&Qs(a.cm,y,h),T)}$(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}$(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,xV(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}$(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),A=p.height;if(p.removeInner(a,T),this.height-=A-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 A=y.lines.length%25+25,L=A;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,A),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 A=Math.min(u,T-a);if(y.iterN(a,A,h))return!0;if((u-=A)==0)break;a=0}else a-=T}}};var qh=$(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");qh.prototype.clear=function(){var a=this.doc.cm,u=this.line.widgets,h=this.line,p=bt(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=Of(this);Dr(h,Math.max(0,h.height-T)),a&&(Hr(a,function(){dN(a,h,-T),Qs(a,p,"widget")}),On(a,"lineWidgetCleared",a,this,p))}},qh.prototype.changed=function(){var a=this,u=this.height,h=this.doc.cm,p=this.line;this.height=null;var y=Of(this)-u;y&&(Ys(this.doc,p)||Dr(p,p.height+y),h&&Hr(h,function(){h.curOp.forceUpdate=!0,dN(h,p,y),On(h,"lineWidgetChanged",h,a,bt(p))}))},ti(qh);function dN(a,u,h){cs(u)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&f1(a,h)}$(dN,"adjustScrollWhenAboveVisible");function w8(a,u,h,p){var y=new qh(a,h,p),T=a.cm;return T&&y.noHScroll&&(T.display.alignWidgets=!0),jf(a,u,"widget",function(A){var L=A.widgets||(A.widgets=[]);if(y.insertAt==null?L.push(y):L.splice(Math.min(L.length,Math.max(0,y.insertAt)),0,y),y.line=A,T&&!Ys(a,A)){var M=cs(A)<a.scrollTop;Dr(A,A.height+Of(y)),M&&f1(T,y.height),T.curOp.forceUpdate=!0}return!0}),T&&On(T,"lineWidgetAdded",T,y,typeof u=="number"?u:bt(u)),y}$(w8,"addLineWidget");var x8=0,ml=$(function(a,u){this.lines=[],this.type=u,this.doc=a,this.id=++x8},"TextMarker");ml.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,u=a&&!a.curOp;if(u&&pl(a),An(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 A=this.lines[T],L=kf(A.markedSpans,this);a&&!this.collapsed?Qs(a,bt(A),"text"):a&&(L.to!=null&&(y=bt(A)),L.from!=null&&(p=bt(A))),A.markedSpans=pV(A.markedSpans,L),L.from==null&&this.collapsed&&!Ys(this.doc,A)&&a&&Dr(A,Nc(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=Ch(V);G>a.display.maxLineLength&&(a.display.maxLine=V,a.display.maxLineLength=G,a.display.maxLineChanged=!0)}p!=null&&a&&this.collapsed&&Ir(a,p,y+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&nN(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],A=kf(T.markedSpans,this);if(A.from!=null&&(h=we(u?T:bt(T),A.from),a==-1))return h;if(A.to!=null&&(p=we(u?T:bt(T),A.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=bt(u.line),A=Xy(p,T);if(A&&(Ek(A),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=Of(h)-L;M&&Dr(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 Pc(a,u,h,p,y){if(p&&p.shared)return S8(a,u,h,p,y);if(a.cm&&!a.cm.curOp)return Dn(a.cm,Pc)(a,u,h,p,y);var T=new ml(a,y),A=j(u,h);if(p&&ie(p,T,!1),A>0||A==0&&T.clearWhenEmpty!==!1)return T;if(T.replacedWith&&(T.collapsed=!0,T.widgetNode=F("span",[T.replacedWith],"CodeMirror-widget"),p.handleMouseEvents||T.widgetNode.setAttribute("cm-ignore-events","true"),p.insertLeft&&(T.widgetNode.insertLeft=!0)),T.collapsed){if(ik(a,u.line,u,h,T)||u.line!=h.line&&ik(a,h.line,u,h,T))throw new Error("Inserting collapsed marker partially overlapping an existing one");dV()}T.addToHistory&&Qk(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&&Dr(X,0),hV(X,new wh(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)&&Dr(X,0)}),T.clearOnEnter&&Ge(T,"beforeCursorEnter",function(){return T.clear()}),T.readOnly&&(fV(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),T.collapsed&&(T.id=++x8,T.atomic=!0),M){if(V&&(M.curOp.updateMaxLine=!0),T.collapsed)Ir(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&&nN(M.doc),On(M,"markerAdded",M,T)}return T}$(Pc,"markText");var zh=$(function(a,u){this.markers=a,this.primary=u;for(var h=0;h<a.length;++h)a[h].parent=this},"SharedTextMarker");zh.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")}},zh.prototype.find=function(a,u){return this.primary.find(a,u)},ti(zh);function S8(a,u,h,p,y){p=ie(p),p.shared=!1;var T=[Pc(a,u,h,p,y)],A=T[0],L=p.widgetNode;return ea(a,function(M){L&&(p.widgetNode=L.cloneNode(!0)),T.push(Pc(M,Re(M,u),Re(M,h),p,y));for(var V=0;V<M.linked.length;++V)if(M.linked[V].isParent)return;A=je(T)}),new zh(T,A)}$(S8,"markTextShared");function pN(a){return a.findMarks(we(a.first,0),a.clipPos(we(a.lastLine())),function(u){return u.parent})}$(pN,"findSharedMarkers");function T8(a,u){for(var h=0;h<u.length;h++){var p=u[h],y=p.find(),T=a.clipPos(y.from),A=a.clipPos(y.to);if(j(T,A)){var L=Pc(a,T,A,p.primary,p.primary.type);p.markers.push(L),L.parent=p}}}$(T8,"copySharedMarkers");function C8(a){for(var u=$(function(p){var y=a[p],T=[y.primary.doc];ea(y.primary.doc,function(M){return T.push(M)});for(var A=0;A<y.markers.length;A++){var L=y.markers[A];le(T,L.doc)==-1&&(L.parent=null,y.markers.splice(A--,1))}},"loop"),h=0;h<a.length;h++)u(h)}$(C8,"detachSharedMarkers");var Vue=0,Wr=$(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 Ph(null),this.id=++Vue,this.modeOption=u,this.lineSep=p,this.direction=y=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),w1(this,{from:T,to:T,text:a}),Xn(this,Xs(T),ve)},"Doc");Wr.prototype=Sn(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=Sc(this,this.first,this.first+this.size);return a===!1?u:u.join(a||this.lineSeparator())},setValue:In(function(a){var u=we(this.first,0),h=this.first+this.size-1;Fc(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,Mc(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 bt(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:In(function(a,u,h){Zk(this,Re(this,typeof a=="number"?we(a,u||0):a),null,h)}),setSelection:In(function(a,u,h){Zk(this,Re(this,a),Re(this,u||a),h)}),extendSelection:In(function(a,u,h){Vh(this,Re(this,a),u&&Re(this,u),h)}),extendSelections:In(function(a,u){Xk(this,lo(this,a),u)}),extendSelectionsBy:In(function(a,u){var h=It(this.sel.ranges,a);Xk(this,lo(this,h),u)}),setSelections:In(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:In(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:In(function(a,u,h){for(var p=[],y=this.sel,T=0;T<y.ranges.length;T++){var A=y.ranges[T];p[T]={from:A.from(),to:A.to(),text:this.splitLines(a[T]),origin:h}}for(var L=u&&u!="end"&&d8(this,p,u),M=p.length-1;M>=0;M--)Fc(this,p[M]);L?eN(this,L):this.cm&&Oc(this.cm)}),undo:In(function(){Bh(this,"undo")}),redo:In(function(){Bh(this,"redo")}),undoSelection:In(function(){Bh(this,"undo",!0)}),redoSelection:In(function(){Bh(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 Ph(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:Lc(this.history.done),undone:Lc(this.history.undone)}},setHistory:function(a){var u=this.history=new Ph(this.history);u.done=Lc(a.done.slice(0),null,!0),u.undone=Lc(a.undone.slice(0),null,!0)},setGutterMarker:In(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:In(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=bt(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:In(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(P(h).test(p[y]))return!1;p[y]+=" "+h}return!0})}),removeLineClass:In(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 A=T.match(P(h));if(!A)return!1;var L=A.index+A[0].length;p[y]=T.slice(0,A.index)+(!A.index||L==T.length?"":" ")+T.slice(L)||null}else return!1;return!0})}),addLineWidget:In(function(a,u,h){return w8(this,a,u,h)}),removeLineWidget:function(a){a.clear()},markText:function(a,u,h){return Pc(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),Pc(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 A=T.markedSpans;if(A)for(var L=0;L<A.length;L++){var M=A[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(Sc(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(Sc(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}],T8(p,pN(this)),p},unlinkDoc:function(a){if(a instanceof Ut&&(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),C8(pN(this));break}}if(a.history==this.history){var p=[a.id];ea(a,function(y){return p.push(y.id)},!0),a.history=new Ph(null),a.history.done=Lc(this.history.done,p),a.history.undone=Lc(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:In(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(u){return u.order=null}),this.cm&&p8(this.cm))})}),Wr.prototype.eachLine=Wr.prototype.iter;var k8=0;function N8(a){var u=this;if(hN(u),!(un(u,a)||us(u.display,a))){Bn(a),c&&(k8=+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),A=0,L=$(function(){++A==y&&Dn(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"};Fc(u.doc,oe),eN(u.doc,Xs(Re(u.doc,h),Re(u.doc,Zs(oe))))})()},"markAsReadAndPasteIfAllFilesAreRead"),M=$(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()),jh(u.doc,Xs(h,h)),X)for(var se=0;se<X.length;++se)Mc(u.doc,"",X[se].anchor,X[se].head,"drag");u.replaceSelection(G,"around","paste"),u.display.input.focus()}}catch{}}}}$(N8,"onDrop");function _8(a,u){if(c&&(!a.state.draggingText||+new Date-k8<100)){Hs(u);return}if(!(un(a,u)||us(a.display,u))&&(u.dataTransfer.setData("Text",a.getSelection()),u.dataTransfer.effectAllowed="copyMove",u.dataTransfer.setDragImage&&!b)){var h=q("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)}}$(_8,"onDragStart");function A8(a,u){var h=ul(a,u);if(h){var p=document.createDocumentFragment();s1(a,h,p),a.display.dragCursor||(a.display.dragCursor=q("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),z(a.display.dragCursor,p)}}$(A8,"onDragOver");function hN(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}$(hN,"clearDragCursor");function mN(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])})}}$(mN,"forEachCodeMirror");var O8=!1;function D8(){O8||(I8(),O8=!0)}$(D8,"ensureGlobalHandlers");function I8(){var a;Ge(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,mN(L8)},100))}),Ge(window,"blur",function(){return mN(Ac)})}$(I8,"registerGlobalHandlers");function L8(a){var u=a.display;u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.scrollbarsClipped=!1,a.setSize()}$(L8,"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"},Hh=0;Hh<10;Hh++)gl[Hh+48]=gl[Hh+96]=String(Hh);for(var C1=65;C1<=90;C1++)gl[C1]=String.fromCharCode(C1);for(var Wh=1;Wh<=12;Wh++)gl[Wh+111]=gl[Wh+63235]="F"+Wh;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 R8(a){var u=a.split(/-(?!$)/);a=u[u.length-1];for(var h,p,y,T,A=0;A<u.length-1;A++){var L=u[A];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}$(R8,"normalizeKeyName");function F8(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=It(h.split(" "),R8),T=0;T<y.length;T++){var A=void 0,L=void 0;T==y.length-1?(L=y.join(" "),A=p):(L=y.slice(0,T+1).join(" "),A="...");var M=u[L];if(!M)u[L]=A;else if(M!=A)throw new Error("Inconsistent bindings for "+L)}delete a[h]}for(var V in u)a[V]=u[V];return a}$(F8,"normalizeKeyMap");function $c(a,u,h,p){u=Gh(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 $c(a,u.fallthrough,h,p);for(var T=0;T<u.fallthrough.length;T++){var A=$c(a,u.fallthrough[T],h,p);if(A)return A}}}$($c,"lookupKey");function gN(a){var u=typeof a=="string"?a:gl[a.keyCode];return u=="Ctrl"||u=="Alt"||u=="Shift"||u=="Mod"}$(gN,"isModifierKey");function vN(a,u,h){var p=a;return u.altKey&&p!="Alt"&&(a="Alt-"+a),(O?u.metaKey:u.ctrlKey)&&p!="Ctrl"&&(a="Ctrl-"+a),(O?u.ctrlKey:u.metaKey)&&p!="Mod"&&(a="Cmd-"+a),!h&&u.shiftKey&&p!="Shift"&&(a="Shift-"+a),a}$(vN,"addModifierNames");function yN(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),vN(h,a,u))}$(yN,"keyName");function Gh(a){return typeof a=="string"?ta[a]:a}$(Gh,"getKeyMap");function Vc(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 A=p.pop();if(j(A.from,T.from)<0){T.from=A.from;break}}p.push(T)}Hr(a,function(){for(var L=p.length-1;L>=0;L--)Mc(a.doc,"",p[L].from,p[L].to,"+delete");Oc(a)})}$(Vc,"deleteNearSelection");function k1(a,u,h){var p=gf(a.text,u+h,h);return p<0||p>a.text.length?null:p}$(k1,"moveCharLogically");function N1(a,u,h){var p=k1(a,u.ch,h);return p==null?null:new we(u.line,p,h<0?"after":"before")}$(N1,"moveLogically");function _1(a,u,h,p,y){if(a){u.doc.direction=="rtl"&&(y=-y);var T=Ar(h,u.doc.direction);if(T){var A=y<0?je(T):T[0],L=y<0==(A.level==1),M=L?"after":"before",V;if(A.level>0||u.doc.direction=="rtl"){var G=Cc(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==(A.level==1)?A.from:A.to-1,V),M=="before"&&(V=k1(h,V,1))}else V=y<0?A.to:A.from;return new we(p,V,M)}}return new we(p,y<0?h.text.length:0,y<0?"before":"after")}$(_1,"endOfLine");function M8(a,u,h,p){var y=Ar(u,a.doc.direction);if(!y)return N1(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=Yt(y,h.ch,h.sticky),A=y[T];if(a.doc.direction=="ltr"&&A.level%2==0&&(p>0?A.to>h.ch:A.from<h.ch))return N1(u,h,p);var L=$(function(Oe,Le){return k1(u,Oe instanceof we?Oe.ch:Oe,Le)},"mv"),M,V=$(function(Oe){return a.options.lineWrapping?(M=M||Cc(a,u),Nk(a,u,M,Oe)):{begin:0,end:u.text.length}},"getWrappedLineExtent"),G=V(h.sticky=="before"?L(h,-1):h.ch);if(a.doc.direction=="rtl"||A.level==1){var X=A.level==1==p<0,se=L(h,X?1:-1);if(se!=null&&(X?se<=A.to&&se<=G.end:se>=A.from&&se>=G.begin)){var oe=X?"before":"after";return new we(h.line,se,oe)}}var pe=$(function(Oe,Le,De){for(var Me=$(function(Lt,qn){return qn?new we(h.line,L(Lt,1),"before"):new we(h.line,Lt,"after")},"getRes");Oe>=0&&Oe<y.length;Oe+=Le){var Qe=y[Oe],ze=Le>0==(Qe.level!=1),at=ze?De.begin:L(De.end,-1);if(Qe.from<=at&&at<Qe.to||(at=ze?Qe.from:L(Qe.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}$(M8,"moveVisually");var Yh={selectAll:iN,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),ve)},killLine:function(a){return Vc(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 Vc(a,function(u){return{from:we(u.from().line,0),to:Re(a.doc,we(u.to().line+1,0))}})},delLineLeft:function(a){return Vc(a,function(u){return{from:we(u.from().line,0),to:u.from()}})},delWrappedLineLeft:function(a){return Vc(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 Vc(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 bN(a,u.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(u){return EN(a,u.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(u){return P8(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/)?EN(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(),A=ne(a.getLine(T.line),T.ch,p);u.push(Ot(p-A%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 A=Pe(a.doc,y.line-1).text;A&&(y=new we(y.line,1),a.replaceRange(T.charAt(0)+a.doc.lineSeparator()+A.charAt(A.length-1),we(y.line-1,A.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 bN(a,u){var h=Pe(a.doc,u),p=si(h);return p!=h&&(u=bt(p)),_1(!0,a,p,u,1)}$(bN,"lineStart");function P8(a,u){var h=Pe(a.doc,u),p=bV(h);return p!=h&&(u=bt(p)),_1(!0,a,h,u,-1)}$(P8,"lineEnd");function EN(a,u){var h=bN(a,u.line),p=Pe(a.doc,h.line),y=Ar(p,a.doc.direction);if(!y||y[0].level==0){var T=Math.max(h.ch,p.text.search(/\S/)),A=u.line==h.line&&u.ch<=T&&u.ch;return we(h.line,A?0:T,h.sticky)}return h}$(EN,"lineStartSmart");function Qh(a,u,h){if(typeof u=="string"&&(u=Yh[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}$(Qh,"doHandleBinding");function $8(a,u,h){for(var p=0;p<a.state.keyMaps.length;p++){var y=$c(u,a.state.keyMaps[p],h,a);if(y)return y}return a.options.extraKeys&&$c(u,a.options.extraKeys,h,a)||$c(u,a.options.keyMap,h,a)}$($8,"lookupKeyForEditor");var jue=new ae;function qf(a,u,h,p){var y=a.state.keySeq;if(y){if(gN(u))return"handled";if(/\'$/.test(u)?a.state.keySeq=null:jue.set(50,function(){a.state.keySeq==y&&(a.state.keySeq=null,a.display.input.reset())}),wN(a,y+" "+u,h,p))return!0}return wN(a,u,h,p)}$(qf,"dispatchKey");function wN(a,u,h,p){var y=$8(a,u,p);return y=="multi"&&(a.state.keySeq=u),y=="handled"&&On(a,"keyHandled",a,u,h),(y=="handled"||y=="multi")&&(Bn(h),a1(a)),!!y}$(wN,"dispatchKeyInner");function xN(a,u){var h=yN(u,!0);return h?u.shiftKey&&!a.state.keySeq?qf(a,"Shift-"+h,u,function(p){return Qh(a,p,!0)})||qf(a,h,u,function(p){if(typeof p=="string"?/^go[A-Z]/.test(p):p.motion)return Qh(a,p)}):qf(a,h,u,function(p){return Qh(a,p)}):!1}$(xN,"handleKeyBinding");function V8(a,u,h){return qf(a,"'"+h+"'",u,function(p){return Qh(a,p,!0)})}$(V8,"handleCharBinding");var SN=null;function TN(a){var u=this;if(!(a.target&&a.target!=u.display.input.getField())&&(u.curOp.focus=Q(),!un(u,a))){c&&f<11&&a.keyCode==27&&(a.returnValue=!1);var h=a.keyCode;u.display.shift=h==16||a.shiftKey;var p=xN(u,a);v&&(SN=p?h:null,!p&&h==88&&!Eh&&(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)&&j8(u)}}$(TN,"onKeyDown");function j8(a){var u=a.display.lineDiv;K(u,"CodeMirror-crosshair");function h(p){(p.keyCode==18||!p.altKey)&&(B(u,"CodeMirror-crosshair"),pr(document,"keyup",h),pr(document,"mouseover",h))}$(h,"up"),Ge(document,"keyup",h),Ge(document,"mouseover",h)}$(j8,"showCrossHair");function CN(a){a.keyCode==16&&(this.doc.sel.shift=!1),un(this,a)}$(CN,"onKeyUp");function kN(a){var u=this;if(!(a.target&&a.target!=u.display.input.getField())&&!(us(u.display,a)||un(u,a)||a.ctrlKey&&!a.altKey||E&&a.metaKey)){var h=a.keyCode,p=a.charCode;if(v&&h==SN){SN=null,Bn(a);return}if(!(v&&(!a.which||a.which<10)&&xN(u,a))){var y=String.fromCharCode(p??h);y!="\b"&&(V8(u,a,y)||u.display.input.onKeyPress(a))}}}$(kN,"onKeyPress");var Uue=400,NN=$(function(a,u,h){this.time=a,this.pos=u,this.button=h},"PastClick");NN.prototype.compare=function(a,u,h){return this.time+Uue>a&&j(u,this.pos)==0&&h==this.button};var Kh,Jh;function U8(a,u){var h=+new Date;return Jh&&Jh.compare(h,a,u)?(Kh=Jh=null,"triple"):Kh&&Kh.compare(h,a,u)?(Jh=new NN(h,a,u),Kh=null,"double"):(Kh=new NN(h,a,u),Jh=null,"single")}$(U8,"clickRepeat");function _N(a){var u=this,h=u.display;if(!(un(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(!A1(u,a)){var p=ul(u,a),y=vf(a),T=p?U8(p,y):"single";window.focus(),y==1&&u.state.selectingText&&u.state.selectingText(a),!(p&&B8(u,y,p,T,a))&&(y==1?p?z8(u,p,T,a):ss(a)==h.scroller&&Bn(a):y==2?(p&&Vh(u.doc,p),setTimeout(function(){return h.input.focus()},20)):y==3&&(R?u.display.input.onContextMenu(a):l1(u)))}}}$(_N,"onMouseDown");function B8(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,vN(T,y),y,function(A){if(typeof A=="string"&&(A=Yh[A]),!A)return!1;var L=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),L=A(a,h)!=xe}finally{a.state.suppressEdits=!1}return L})}$(B8,"handleMappedButton");function q8(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}$(q8,"configureMouse");function z8(a,u,h,p){c?setTimeout(J(Dk,a),0):a.curOp.focus=Q();var y=q8(a,h,p),T=a.doc.sel,A;a.options.dragDrop&&yf&&!a.isReadOnly()&&h=="single"&&(A=T.contains(u))>-1&&(j((A=T.ranges[A]).from(),u)<0||u.xRel>0)&&(j(A.to(),u)>0||u.xRel<0)?H8(a,p,u,y):W8(a,p,u,y)}$(z8,"leftButtonDown");function H8(a,u,h,p){var y=a.display,T=!1,A=Dn(a,function(V){d&&(y.scroller.draggable=!1),a.state.draggingText=!1,a.state.delayingBlurEvent&&(a.hasFocus()?a.state.delayingBlurEvent=!1:l1(a)),pr(y.wrapper.ownerDocument,"mouseup",A),pr(y.wrapper.ownerDocument,"mousemove",L),pr(y.scroller,"dragstart",M),pr(y.scroller,"drop",A),T||(Bn(V),p.addNew||Vh(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=$(function(V){T=T||Math.abs(u.clientX-V.clientX)+Math.abs(u.clientY-V.clientY)>=10},"mouseMove"),M=$(function(){return T=!0},"dragStart");d&&(y.scroller.draggable=!0),a.state.draggingText=A,A.copy=!p.moveOnDrag,Ge(y.wrapper.ownerDocument,"mouseup",A),Ge(y.wrapper.ownerDocument,"mousemove",L),Ge(y.scroller,"dragstart",M),Ge(y.scroller,"drop",A),a.state.delayingBlurEvent=!0,setTimeout(function(){return y.input.focus()},20),y.scroller.dragDrop&&y.scroller.dragDrop()}$(H8,"leftButtonStartDrag");function AN(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)}$(AN,"rangeForUnit");function W8(a,u,h,p){c&&l1(a);var y=a.display,T=a.doc;Bn(u);var A,L,M=T.sel,V=M.ranges;if(p.addNew&&!p.extend?(L=T.sel.contains(h),L>-1?A=V[L]:A=new St(h,h)):(A=T.sel.primary(),L=T.sel.primIndex),p.unit=="rectangle")p.addNew||(A=new St(h,h)),h=ul(a,u,!0,!0),L=-1;else{var G=AN(a,h,p.unit);p.extend?A=S1(A,G.anchor,G.head,p.extend):A=G}p.addNew?L==-1?(L=V.length,Xn(T,li(a,V.concat([A]),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):T1(T,L,A,qe):(L=0,Xn(T,new Io([A],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=[],Qe=a.options.tabSize,ze=ne(Pe(T,h.line).text,h.ch,Qe),at=ne(Pe(T,De.line).text,De.ch,Qe),Lt=Math.min(ze,at),qn=Math.max(ze,at),Qt=Math.min(h.line,De.line),Gr=Math.min(a.lastLine(),Math.max(h.line,De.line));Qt<=Gr;Qt++){var Yr=Pe(T,Qt).text,Tn=Ae(Yr,Lt,Qe);Lt==qn?Me.push(new St(we(Qt,Tn),we(Qt,Tn))):Yr.length>Tn&&Me.push(new St(we(Qt,Tn),we(Qt,Ae(Yr,qn,Qe))))}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=A,Zn=AN(a,De,p.unit),Ln=Qr.anchor,Cn;j(Zn.anchor,Ln)>0?(Cn=Zn.head,Ln=Xe(Qr.from(),Zn.anchor)):(Cn=Zn.anchor,Ln=Te(Qr.to(),Zn.head));var fn=M.ranges.slice(0);fn[L]=G8(a,new St(Re(T,Ln),Cn)),Xn(T,li(a,fn,L),qe)}}$(se,"extendTo");var oe=y.wrapper.getBoundingClientRect(),pe=0;function be(De){var Me=++pe,Qe=ul(a,De,!0,p.unit=="rectangle");if(Qe)if(j(Qe,X)!=0){a.curOp.focus=Q(),se(Qe);var ze=Rh(y,T);(Qe.line>=ze.to||Qe.line<ze.from)&&setTimeout(Dn(a,function(){pe==Me&&be(De)}),150)}else{var at=De.clientY<oe.top?-20:De.clientY>oe.bottom?20:0;at&&setTimeout(Dn(a,function(){pe==Me&&(y.scroller.scrollTop+=at,be(De))}),50)}}$(be,"extend");function ke(De){a.state.selectingText=!1,pe=1/0,De&&(Bn(De),y.input.focus()),pr(y.wrapper.ownerDocument,"mousemove",Oe),pr(y.wrapper.ownerDocument,"mouseup",Le),T.history.lastSelOrigin=null}$(ke,"done");var Oe=Dn(a,function(De){De.buttons===0||!vf(De)?ke(De):be(De)}),Le=Dn(a,ke);a.state.selectingText=Le,Ge(y.wrapper.ownerDocument,"mousemove",Oe),Ge(y.wrapper.ownerDocument,"mouseup",Le)}$(W8,"leftButtonSelect");function G8(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=Ar(y);if(!T)return u;var A=Yt(T,h.ch,h.sticky),L=T[A];if(L.from!=h.ch&&L.to!=h.ch)return u;var M=A+(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=Yt(T,p.ch,p.sticky),X=G-A||(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)}$(G8,"bidiSimplify");function ON(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 A=a.display,L=A.lineDiv.getBoundingClientRect();if(T>L.bottom||!An(a,h))return zr(u);T-=L.top-A.viewOffset;for(var M=0;M<a.display.gutterSpecs.length;++M){var V=A.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)}}}$(ON,"gutterEvent");function A1(a,u){return ON(a,u,"gutterClick",!0)}$(A1,"clickInGutter");function DN(a,u){us(a.display,u)||Y8(a,u)||un(a,u,"contextmenu")||R||a.display.input.onContextMenu(u)}$(DN,"onContextMenu");function Y8(a,u){return An(a,"gutterContextMenu")?ON(a,u,"gutterContextMenu",!1):!1}$(Y8,"contextMenuInGutter");function IN(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)}$(IN,"themeChanged");var zf={toString:function(){return"CodeMirror.Init"}},Q8={},O1={};function K8(a){var u=a.optionHandlers;function h(p,y,T,A){a.defaults[p]=y,T&&(u[p]=A?function(L,M,V){V!=zf&&T(L,M,V)}:T)}$(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,E1(p)},!0),h("indentUnit",2,E1,!0),h("indentWithTabs",!1),h("smartIndent",!0),h("tabSize",4,function(p){$f(p),Df(p),Ir(p)},!0),h("lineSeparator",null,function(p,y){if(p.doc.lineSep=y,!!y){var T=[],A=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(A,G))}A++});for(var L=T.length-1;L>=0;L--)Mc(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",SV,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",!D),h("wholeLineUpdateBefore",!0),h("theme","default",function(p){IN(p),Pf(p)},!0),h("keyMap","default",function(p,y,T){var A=Gh(y),L=T!=zf&&Gh(T);L&&L.detach&&L.detach(p,A),A.attach&&A.attach(p,L||null)}),h("extraKeys",null),h("configureMouse",null),h("lineWrapping",!1,X8,!0),h("gutters",[],function(p,y){p.display.gutterSpecs=v1(y,p.options.lineNumbers),Pf(p)},!0),h("fixedGutter",!0,function(p,y){p.display.gutters.style.left=y?o1(p.display)+"px":"0",p.refresh()},!0),h("coverGutterNextToScrollbar",!1,function(p){return Ic(p)},!0),h("scrollbarStyle","native",function(p){Mk(p),Ic(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=v1(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"&&(Ac(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,J8),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)}$(K8,"defineOptions");function J8(a,u,h){var p=h&&h!=zf;if(!u!=!p){var y=a.display.dragFunctions,T=u?Ge:pr;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)}}$(J8,"dragDropChanged");function X8(a){a.options.lineWrapping?(K(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(B(a.display.wrapper,"CodeMirror-wrap"),Yy(a)),i1(a),Ir(a),Df(a),setTimeout(function(){return Ic(a)},100)}$(X8,"wrappingChanged");function Ut(a,u){var h=this;if(!(this instanceof Ut))return new Ut(a,u);this.options=u=u?ie(u):{},ie(Q8,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 Ut.inputStyles[u.inputStyle](this),T=this.display=new u8(a,p,y,u);T.wrapper.CodeMirror=this,IN(this),u.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Mk(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),Z8(this),D8(),pl(this),this.curOp.forceUpdate=!0,Wk(this,p),u.autofocus&&!C||this.hasFocus()?setTimeout(function(){h.hasFocus()&&!h.state.focused&&c1(h)},20):Ac(this);for(var A in O1)O1.hasOwnProperty(A)&&O1[A](this,u[A],zf);Vk(this),u.finishInit&&u.finishInit(this);for(var L=0;L<LN.length;++L)LN[L](this);hl(this),d&&u.lineWrapping&&getComputedStyle(T.lineDiv).textRendering=="optimizelegibility"&&(T.lineDiv.style.textRendering="auto")}$(Ut,"CodeMirror"),Ut.defaults=Q8,Ut.optionHandlers=O1;function Z8(a){var u=a.display;Ge(u.scroller,"mousedown",Dn(a,_N)),c&&f<11?Ge(u.scroller,"dblclick",Dn(a,function(M){if(!un(a,M)){var V=ul(a,M);if(!(!V||A1(a,M)||us(a.display,M))){Bn(M);var G=a.findWordAt(V);Vh(a.doc,G.anchor,G.head)}}})):Ge(u.scroller,"dblclick",function(M){return un(a,M)||Bn(M)}),Ge(u.scroller,"contextmenu",function(M){return DN(a,M)}),Ge(u.input.getField(),"contextmenu",function(M){u.scroller.contains(M.target)||DN(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)}$(y,"finishTouch");function T(M){if(M.touches.length!=1)return!1;var V=M.touches[0];return V.radiusX<=1&&V.radiusY<=1}$(T,"isMouseLikeTouchEvent");function A(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}$(A,"farAway"),Ge(u.scroller,"touchstart",function(M){if(!un(a,M)&&!T(M)&&!A1(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)}}),Ge(u.scroller,"touchmove",function(){u.activeTouch&&(u.activeTouch.moved=!0)}),Ge(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||A(V,V.prev)?X=new St(G,G):!V.prev.prev||A(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()}),Ge(u.scroller,"touchcancel",y),Ge(u.scroller,"scroll",function(){u.scroller.clientHeight&&(Rf(a,u.scroller.scrollTop),dl(a,u.scroller.scrollLeft,!0),Ke(a,"scroll",a))}),Ge(u.scroller,"mousewheel",function(M){return Bk(a,M)}),Ge(u.scroller,"DOMMouseScroll",function(M){return Bk(a,M)}),Ge(u.wrapper,"scroll",function(){return u.wrapper.scrollTop=u.wrapper.scrollLeft=0}),u.dragFunctions={enter:function(M){un(a,M)||Hs(M)},over:function(M){un(a,M)||(A8(a,M),Hs(M))},start:function(M){return _8(a,M)},drop:Dn(a,N8),leave:function(M){un(a,M)||hN(a)}};var L=u.input.getField();Ge(L,"keyup",function(M){return CN.call(a,M)}),Ge(L,"keydown",Dn(a,TN)),Ge(L,"keypress",Dn(a,kN)),Ge(L,"focus",function(M){return c1(a,M)}),Ge(L,"blur",function(M){return Ac(a,M)})}$(Z8,"registerEventHandlers");var LN=[];Ut.defineInitHook=function(a){return LN.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 A=a.options.tabSize,L=Pe(y,u),M=ne(L.text,null,A);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,A):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/A);oe;--oe)se+=A,X+=" ";if(se<G&&(X+=Ot(G-se)),X!=V)return Mc(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);T1(y,pe,new St(ke,ke));break}}}$(Hf,"indentLine");var ji=null;function Xh(a){ji=a}$(Xh,"setLastCopied");function D1(a,u,h,p,y){var T=a.doc;a.display.shift=!1,p||(p=T.sel);var A=+new Date-200,L=y=="paste"||a.state.pasteIncoming>A,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=It(M,function(Oe){return[Oe]}));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>A?"cut":"+input")};Fc(a.doc,ke),On(a,"inputRead",a,ke)}u&&!L&&FN(a,u),Oc(a),a.curOp.updateInput<2&&(a.curOp.updateInput=X),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}$(D1,"applyTextInput");function RN(a,u){var h=a.clipboardData&&a.clipboardData.getData("Text");if(h)return a.preventDefault(),!u.isReadOnly()&&!u.options.disableInput&&Hr(u,function(){return D1(u,h,0,null,"paste")}),!0}$(RN,"handlePaste");function FN(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),A=!1;if(T.electricChars){for(var L=0;L<T.electricChars.length;L++)if(u.indexOf(T.electricChars.charAt(L))>-1){A=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))&&(A=Hf(a,y.head.line,"smart"));A&&On(a,"electricInput",a,y.head.line)}}}$(FN,"triggerElectric");function MN(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}}$(MN,"copyableRanges");function PN(a,u,h,p){a.setAttribute("autocorrect",h?"":"off"),a.setAttribute("autocapitalize",p?"":"off"),a.setAttribute("spellcheck",!!u)}$(PN,"disableBrowserMagic");function $N(){var a=q("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),u=q("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"),PN(a),u}$($N,"hiddenTextarea");function e7(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,A=T[p];T[p]==y&&p!="mode"||(T[p]=y,u.hasOwnProperty(p)&&Dn(this,u[p])(this,y,A),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"](Gh(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:hr(function(p,y){var T=p.token?p:a.getMode(this.options,p);if(T.startState)throw new Error("Overlays may not be stateful.");_r(this.state.overlays,{mode:T,modeSpec:p,opaque:y&&y.opaque,priority:y&&y.priority||0},function(A){return A.priority}),this.state.modeGen++,Ir(this)}),removeOverlay:hr(function(p){for(var y=this.state.overlays,T=0;T<y.length;++T){var A=y[T].modeSpec;if(A==p||typeof p=="string"&&A.name==p){y.splice(T,1),this.state.modeGen++,Ir(this);return}}}),indentLine:hr(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:hr(function(p){for(var y=this.doc.sel.ranges,T=-1,A=0;A<y.length;A++){var L=y[A];if(L.empty())L.head.line>T&&(Hf(this,L.head.line,p,!0),T=L.head.line,A==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[A].from().ch>0&&T1(this.doc,A,new St(M,se[A].to()),ve)}}}),getTokenAt:function(p,y){return JC(this,p,y)},getLineTokens:function(p,y){return JC(this,we(p),y,!0)},getTokenTypeAt:function(p){p=Re(this.doc,p);var y=QC(this,Pe(this.doc,p.line)),T=0,A=(y.length-1)/2,L=p.ch,M;if(L==0)M=y[2];else for(;;){var V=T+A>>1;if((V?y[V*2-1]:0)>=L)A=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 A=h[y],L=this.getModeAt(p);if(typeof L[y]=="string")A[L[y]]&&T.push(A[L[y]]);else if(L[y])for(var M=0;M<L[y].length;M++){var V=A[L[y][M]];V&&T.push(V)}else L.helperType&&A[L.helperType]?T.push(A[L.helperType]):A[L.name]&&T.push(A[L.name]);for(var G=0;G<A._global.length;G++){var X=A._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,A=this.doc.sel.primary();return p==null?T=A.head:typeof p=="object"?T=Re(this.doc,p):T=p?A.from():A.to(),ai(this,T,y||"page")},charCoords:function(p,y){return Oh(this,Re(this.doc,p),y||"page")},coordsChar:function(p,y){return p=Tk(this,p,y||"page"),t1(this,p.left,p.top)},lineAtHeight:function(p,y){return p=Tk(this,{top:p,left:0},y||"page").top,ii(this.doc,p+this.display.viewOffset)},heightAtLine:function(p,y,T){var A=!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,A=!0),L=Pe(this.doc,p)}else L=p;return Ah(this,L,{top:0,left:0},y||"page",T||A).top+(A?this.doc.height-cs(L):0)},defaultTextHeight:function(){return Nc(this.display)},defaultCharWidth:function(){return _c(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(p,y,T,A,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),A=="over")V=p.top;else if(A=="above"||A=="near"){var X=Math.max(M.wrapper.clientHeight,this.doc.height),se=Math.max(M.sizer.clientWidth,M.lineSpace.clientWidth);(A=="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&&KV(this,{left:G,top:V,right:G+y.offsetWidth,bottom:V+y.offsetHeight})},triggerOnKeyDown:hr(TN),triggerOnKeyPress:hr(kN),triggerOnKeyUp:CN,triggerOnMouseDown:hr(_N),execCommand:function(p){if(Yh.hasOwnProperty(p))return Yh[p].call(null,this)},triggerElectric:hr(function(p){FN(this,p)}),findPosH:function(p,y,T,A){var L=1;y<0&&(L=-1,y=-y);for(var M=Re(this.doc,p),V=0;V<y&&(M=I1(this.doc,M,L,T,A),!M.hitSide);++V);return M},moveH:hr(function(p,y){var T=this;this.extendSelectionsBy(function(A){return T.display.shift||T.doc.extend||A.empty()?I1(T.doc,A.head,p,y,T.options.rtlMoveVisually):p<0?A.from():A.to()},Ie)}),deleteH:hr(function(p,y){var T=this.doc.sel,A=this.doc;T.somethingSelected()?A.replaceSelection("",null,"+delete"):Vc(this,function(L){var M=I1(A,L.head,p,y,!1);return p<0?{from:M,to:L.head}:{from:L.head,to:M}})}),findPosV:function(p,y,T,A){var L=1,M=A;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=VN(this,X,L,T),V.hitSide)break}return V},moveV:hr(function(p,y){var T=this,A=this.doc,L=[],M=!this.display.shift&&!A.extend&&A.sel.somethingSelected();if(A.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=VN(T,X,p,y);return y=="page"&&G==A.sel.primary()&&f1(T,Oh(T,se,"div").top-X.top),se},Ie),L.length)for(var V=0;V<A.sel.ranges.length;V++)A.sel.ranges[V].goalColumn=L[V]}),findWordAt:function(p){var y=this.doc,T=Pe(y,p.line).text,A=p.ch,L=p.ch;if(T){var M=this.getHelper(p,"wordChars");(p.sticky=="before"||L==T.length)&&A?--A:++L;for(var V=T.charAt(A),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)};A>0&&G(T.charAt(A-1));)--A;for(;L<T.length&&G(T.charAt(L));)++L}return new St(we(p.line,A),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"):B(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:hr(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:Jy(this),clientWidth:cl(this)}},scrollIntoView:hr(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?JV(this,p):Lk(this,p.from,p.to,p.margin)}),setSize:hr(function(p,y){var T=this,A=$(function(M){return typeof M=="number"||/^\d+$/.test(String(M))?M+"px":M},"interpret");p!=null&&(this.display.wrapper.style.width=A(p)),y!=null&&(this.display.wrapper.style.height=A(y)),this.options.lineWrapping&&wk(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:hr(function(){var p=this.display.cachedTextHeight;Ir(this),this.curOp.forceUpdate=!0,Df(this),Lf(this,this.doc.scrollLeft,this.doc.scrollTop),m1(this.display),(p==null||Math.abs(p-Nc(this.display))>.5||this.options.lineWrapping)&&i1(this),Ke(this,"refresh",this)}),swapDoc:hr(function(p){var y=this.doc;return y.cm=null,this.state.selectingText&&this.state.selectingText(),Wk(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,A){a.registerHelper(p,y,A),h[p]._global.push({pred:T,val:A})}}$(e7,"addEditorMethods");function I1(a,u,h,p,y){var T=u,A=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))}$(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 Qe=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*(Qe?2:1))),-h)}}else y?De=M8(a.cm,L,u,h):De=N1(L,u,h);if(De==null)if(!Le&&V())u=_1(y,a.cm,L,u.line,M);else return!1;else u=De;return!0}if($(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 Oe=Uh(a,u,T,A,!0);return ee(T,Oe)&&(Oe.hitSide=!0),Oe}$(I1,"findPosH");function VN(a,u,h,p){var y=a.doc,T=u.left,A;if(p=="page"){var L=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),M=Math.max(L-.5*Nc(a.display),3);A=(h>0?u.bottom:u.top)+h*M}else p=="line"&&(A=h>0?u.bottom+3:u.top-3);for(var V;V=t1(a,T,A),!!V.outside;){if(h<0?A<=0:A>=y.height){V.hitSide=!0;break}A+=h*5}return V}$(VN,"findPosV");var Nt=$(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,PN(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}$(T,"belongsToInput"),Ge(y,"paste",function(L){!T(L)||un(p,L)||RN(L,p)||f<=11&&setTimeout(Dn(p,function(){return u.updateFromDOM()}),20)}),Ge(y,"compositionstart",function(L){u.composing={data:L.data,done:!1}}),Ge(y,"compositionupdate",function(L){u.composing||(u.composing={data:L.data,done:!1})}),Ge(y,"compositionend",function(L){u.composing&&(L.data!=u.composing.data&&u.readFromDOMSoon(),u.composing.done=!0)}),Ge(y,"touchstart",function(){return h.forceCompositionEnd()}),Ge(y,"input",function(){u.composing||u.readFromDOMSoon()});function A(L){if(!(!T(L)||un(p,L))){if(p.somethingSelected())Xh({lineWise:!1,text:p.getSelections()}),L.type=="cut"&&p.replaceSelection("",null,"cut");else if(p.options.lineWiseCopyCut){var M=MN(p);Xh({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=$N(),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)}}$(A,"onCopyCut"),Ge(y,"copy",A),Ge(y,"cut",A)},Nt.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Nt.prototype.prepareSelection=function(){var a=Ok(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=Zh(u,a.anchorNode,a.anchorOffset),A=Zh(u,a.focusNode,a.focusOffset);if(!(T&&!T.bad&&A&&!A.bad&&j(Xe(T,A),p)==0&&j(Te(T,A),y)==0)){var L=u.display.view,M=p.line>=u.display.viewFrom&&jN(u,p)||{node:L[0].measure.map[2],offset:0},V=y.line<u.display.viewTo&&jN(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))}$(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&&t7(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var h=Zh(u,a.anchorNode,a.anchorOffset),p=Zh(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,A,L;p.line==u.viewFrom||(T=fl(a,p.line))==0?(A=bt(u.view[0].line),L=u.view[0].node):(A=bt(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=bt(u.view[M+1].line)-1,G=u.view[M+1].node.previousSibling),!L)return!1;for(var X=a.doc.splitLines(n7(a,L,G,A,V)),se=oi(a.doc,we(A,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(),A++;else break;for(var oe=0,pe=0,be=X[0],ke=se[0],Oe=Math.min(be.length,ke.length);oe<Oe&&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&&A==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 Qe=we(A,oe),ze=we(V,se.length?je(se).length-pe:0);if(X.length>1||X[0]||j(Qe,ze))return Mc(a.doc,X,Qe,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 Ir(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()||Dn(this.cm,D1)(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 jN(a,u){var h=Xy(a,u.line);if(!h||h.hidden)return null;var p=Pe(a.doc,u.line),y=vk(h,p,u.line),T=Ar(p,a.doc.direction),A="left";if(T){var L=Yt(T,u.ch);A=L%2?"right":"left"}var M=bk(y.map,u.ch,A);return M.offset=M.collapse=="right"?M.end:M.start,M}$(jN,"posToDOM");function t7(a){for(var u=a;u;u=u.parentNode)if(/CodeMirror-gutter-wrapper/.test(u.className))return!0;return!1}$(t7,"isInGutter");function jc(a,u){return u&&(a.bad=!0),a}$(jc,"badPos");function n7(a,u,h,p,y){var T="",A=!1,L=a.doc.lineSeparator(),M=!1;function V(oe){return function(pe){return pe.id==oe}}$(V,"recognizeMarker");function G(){A&&(T+=L,M&&(T+=L),A=M=!1)}$(G,"close");function X(oe){oe&&(G(),T+=oe)}$(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 Oe=a.findMarks(we(p,0),we(y+1,0),V(+be));Oe.length&&(ke=Oe[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&&(A=!0)}else oe.nodeType==3&&X(oe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for($(se,"walk");se(u),u!=h;)u=u.nextSibling,M=!1;return T}$(n7,"domTextBetween");function Zh(a,u,h){var p;if(u==a.display.lineDiv){if(p=a.display.lineDiv.childNodes[h],!p)return jc(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 r7(T,u,h)}}$(Zh,"domToPos");function r7(a,u,h){var p=a.text.firstChild,y=!1;if(!u||!Y(p,u))return jc(we(bt(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 jc(we(bt(T),T.text.length),y)}var A=u.nodeType==3?u:null,L=u;for(!A&&u.childNodes.length==1&&u.firstChild.nodeType==3&&(A=u.firstChild,h&&(h=A.nodeValue.length));L.parentNode!=p;)L=L.parentNode;var M=a.measure,V=M.maps;function G(ke,Oe,Le){for(var De=-1;De<(V?V.length:0);De++)for(var Me=De<0?M.map:V[De],Qe=0;Qe<Me.length;Qe+=3){var ze=Me[Qe+2];if(ze==ke||ze==Oe){var at=bt(De<0?a.line:a.rest[De]),Lt=Me[Qe]+Le;return(Le<0||ze!=ke)&&(Lt=Me[Qe+(Le?1:0)]),we(at,Lt)}}}$(G,"find");var X=G(A,L,h);if(X)return jc(X,y);for(var se=L.nextSibling,oe=A?A.nodeValue.length-h:0;se;se=se.nextSibling){if(X=G(se,se.firstChild,0),X)return jc(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 jc(we(X.line,X.ch+be),y);be+=pe.textContent.length}}$(r7,"locateNodeInLineView");var hn=$(function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ae,this.hasSelection=!1,this.composing=null},"TextareaInput");hn.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"),Ge(y,"input",function(){c&&f>=9&&u.hasSelection&&(u.hasSelection=null),h.poll()}),Ge(y,"paste",function(A){un(p,A)||RN(A,p)||(p.state.pasteIncoming=+new Date,h.fastPoll())});function T(A){if(!un(p,A)){if(p.somethingSelected())Xh({lineWise:!1,text:p.getSelections()});else if(p.options.lineWiseCopyCut){var L=MN(p);Xh({lineWise:!0,text:L.text}),A.type=="cut"?p.setSelections(L.ranges,null,ve):(h.prevInput="",y.value=L.text.join(`
`),re(y))}else return;A.type=="cut"&&(p.state.cutIncoming=+new Date)}}$(T,"prepareCopyCut"),Ge(y,"cut",T),Ge(y,"copy",T),Ge(a.scroller,"paste",function(A){if(!(us(a,A)||un(p,A))){if(!y.dispatchEvent){p.state.pasteIncoming=+new Date,h.focus();return}var L=new Event("paste");L.clipboardData=A.clipboardData,y.dispatchEvent(L)}}),Ge(a.lineSpace,"selectstart",function(A){us(a,A)||Bn(A)}),Ge(y,"compositionstart",function(){var A=p.getCursor("from");h.composing&&h.composing.range.clear(),h.composing={start:A,range:p.markText(A,p.getCursor("to"),{className:"CodeMirror-composing"})}}),Ge(y,"compositionend",function(){h.composing&&(h.poll(),h.composing.range.clear(),h.composing=null)})},hn.prototype.createField=function(a){this.wrapper=$N(),this.textarea=this.wrapper.firstChild},hn.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var a=this.cm,u=a.display,h=a.doc,p=Ok(a);if(a.options.moveInputWithCursor){var y=ai(a,h.sel.primary().head,"div"),T=u.wrapper.getBoundingClientRect(),A=u.lineDiv.getBoundingClientRect();p.teTop=Math.max(0,Math.min(u.wrapper.clientHeight-10,y.top+A.top-T.top)),p.teLeft=Math.max(0,Math.min(u.wrapper.clientWidth-10,y.left+A.left-T.left))}return p},hn.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")},hn.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))}},hn.prototype.getField=function(){return this.textarea},hn.prototype.supportsTouch=function(){return!1},hn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!C||Q()!=this.textarea))try{this.textarea.focus()}catch{}},hn.prototype.blur=function(){this.textarea.blur()},hn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},hn.prototype.receivedFocus=function(){this.slowPoll()},hn.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},hn.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())}$(h,"p"),u.polling.set(20,h)},hn.prototype.poll=function(){var a=this,u=this.cm,h=this.textarea,p=this.prevInput;if(this.contextMenuPending||!u.state.focused||bh(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 A=0,L=Math.min(p.length,y.length);A<L&&p.charCodeAt(A)==y.charCodeAt(A);)++A;return Hr(u,function(){D1(u,y.slice(A),p.length-A,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},hn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},hn.prototype.onKeyPress=function(){c&&f>=9&&(this.hasSelection=null),this.fastPoll()},hn.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),A=p.scroller.scrollTop;if(!T||v)return;var L=h.options.resetSelectionOnContextMenu;L&&h.doc.sel.contains(T)==-1&&Dn(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}}$(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=A),y.selectionStart!=null)){(!c||c&&f<9)&&se();var be=0,ke=$(function(){p.selForContextMenu==h.doc.sel&&y.selectionStart==0&&y.selectionEnd>0&&u.prevInput==""?Dn(h,iN)(h):be++<10?p.detectingSelectAll=setTimeout(ke,500):(p.selForContextMenu=null,p.input.reset())},"poll");p.detectingSelectAll=setTimeout(ke,200)}}if($(oe,"rehide"),c&&f>=9&&se(),R){Hs(a);var pe=$(function(){pr(window,"mouseup",pe),setTimeout(oe,20)},"mouseup");Ge(window,"mouseup",pe)}else setTimeout(oe,50)},hn.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},hn.prototype.setUneditable=function(){},hn.prototype.needsContentAttribute=!1;function o7(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,"save");var y;if(a.form&&(Ge(a.form,"submit",p),!u.leaveSubmitMethodAlone)){var T=a.form;y=T.submit;try{var A=T.submit=function(){p(),T.submit=y,T.submit(),T.submit=A}}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&&(pr(a.form,"submit",p),!u.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=y))}},a.style.display="none";var L=Ut(function(M){return a.parentNode.insertBefore(M,a.nextSibling)},u);return L}$(o7,"fromTextArea");function i7(a){a.off=pr,a.on=Ge,a.wheelEventPixels=f8,a.Doc=Wr,a.splitLines=wf,a.countColumn=ne,a.findColumn=Ae,a.isWordChar=dr,a.Pass=xe,a.signal=Ke,a.Line=Nf,a.changeEnd=Zs,a.scrollbarModel=XV,a.Pos=we,a.cmpPos=j,a.modes=Oo,a.mimeModes=so,a.resolveMode=al,a.getMode=ll,a.modeExtensions=ri,a.extendMode=Do,a.copyState=ao,a.startState=xc,a.innerMode=wc,a.commands=Yh,a.keyMap=ta,a.keyName=yN,a.isModifierKey=gN,a.lookupKey=$c,a.normalizeKeyMap=F8,a.StringStream=en,a.SharedTextMarker=zh,a.TextMarker=ml,a.LineWidget=qh,a.e_preventDefault=Bn,a.e_stopPropagation=sl,a.e_stop=Hs,a.addClass=K,a.contains=Y,a.rmClass=B,a.keyNames=gl}$(i7,"addLegacyProps"),K8(Ut),e7(Ut);var Bue="iter insert remove copy getEditor constructor".split(" ");for(var L1 in Wr.prototype)Wr.prototype.hasOwnProperty(L1)&&le(Bue,L1)<0&&(Ut.prototype[L1]=function(a){return function(){return a.apply(this.doc,arguments)}}(Wr.prototype[L1]));return ti(Wr),Ut.inputStyles={textarea:hn,contenteditable:Nt},Ut.defineMode=function(a){!Ut.defaults.mode&&a!="null"&&(Ut.defaults.mode=a),Sf.apply(this,arguments)},Ut.defineMIME=Pi,Ut.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ut.defineMIME("text/plain","null"),Ut.defineExtension=function(a,u){Ut.prototype[a]=u},Ut.defineDocExtension=function(a,u){Wr.prototype[a]=u},Ut.fromTextArea=o7,i7(Ut),Ut.version="5.65.3",Ut})}(W4)),W4.exports}$(kr,"requireCodemirror");var bce=Object.defineProperty,Ece=(e,t)=>bce(e,"name",{value:t,configurable:!0});function Y4(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"}))}Ece(Y4,"_mergeNamespaces");var Q4=kr();const nt=qr(Q4),wce=Object.freeze(Object.defineProperty({__proto__:null,C:nt,c:Y4({__proto__:null,default:nt},[Q4])},Symbol.toStringTag,{value:"Module"}));var xce=Object.defineProperty,ro=(e,t)=>xce(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"}))}ro(K4,"_mergeNamespaces");var Sce={exports:{}};(function(e,t){(function(n){n(kr())})(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 D in N)_[D]=N[D];if(E)for(var D in E)E[D]!==void 0&&(_[D]=E[D]);if(C)for(var D in C)C[D]!==void 0&&(_[D]=C[D]);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,D=_?{}:C;function I(P,B){var H;typeof B!="string"?H=ro(function(z){return B(z,x)},"bound"):C.hasOwnProperty(B)?H=C[B]:H=B,D[P]=H}if(ro(I,"addBinding"),_)for(var O in _)_.hasOwnProperty(O)&&I(O,_[O]);var R=S.options.extraKeys;if(R)for(var O in R)R.hasOwnProperty(O)&&I(O,R[O]);return D}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,D=_.defaultView||_.parentWindow,I=this.hints=_.createElement("ul");I.setAttribute("role","listbox"),I.setAttribute("aria-expanded","true"),I.id=this.id;var O=S.cm.options.theme;I.className="CodeMirror-hints "+O,this.selectedHint=x.selectedHint||0;for(var R=x.list,P=0;P<R.length;++P){var B=I.appendChild(_.createElement("li")),H=R[P],z=r+(P!=this.selectedHint?"":" "+o);H.className!=null&&(z=H.className+" "+z),B.className=z,P==this.selectedHint&&B.setAttribute("aria-selected","true"),B.id=this.id+"-"+P,B.setAttribute("role","option"),H.render?H.render(B,x,H):B.appendChild(_.createTextNode(H.displayText||f(H))),B.hintId=P}var q=S.options.container||_.body,F=E.cursorCoords(S.options.alignWithWord?x.from:null),te=F.left,Y=F.bottom,Q=!0,K=0,Z=0;if(q!==_.body){var re=["absolute","relative","fixed"].indexOf(D.getComputedStyle(q).position)!==-1,J=re?q:q.offsetParent,ie=J.getBoundingClientRect(),ne=_.body.getBoundingClientRect();K=ie.left-ne.left-J.scrollLeft,Z=ie.top-ne.top-J.scrollTop}I.style.left=te-K+"px",I.style.top=Y-Z+"px";var ae=D.innerWidth||Math.max(_.body.offsetWidth,_.documentElement.offsetWidth),le=D.innerHeight||Math.max(_.body.offsetHeight,_.documentElement.offsetHeight);q.appendChild(I),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?I.getBoundingClientRect():new DOMRect,xe=S.options.paddingForScrollbar?I.scrollHeight>I.clientHeight+1:!1,ve;setTimeout(function(){ve=E.getScrollInfo()});var qe=de.bottom-le;if(qe>0){var Ie=de.bottom-de.top,Ae=F.top-(F.bottom-de.top);if(Ae-Ie>0)I.style.top=(Y=F.top-Ie-Z)+"px",Q=!1;else if(Ie>le){I.style.height=le-5+"px",I.style.top=(Y=F.bottom-de.top-Z)+"px";var it=E.getCursor();x.from.ch!=it.ch&&(F=E.cursorCoords(it),I.style.left=(te=F.left-K)+"px",de=I.getBoundingClientRect())}}var Ot=de.right-ae;if(xe&&(Ot+=E.display.nativeBarWidth),Ot>0&&(de.right-de.left>ae&&(I.style.width=ae-5+"px",Ot-=de.right-de.left-ae),I.style.left=(te=F.left-Ot-K)+"px"),xe)for(var je=I.firstChild;je;je=je.nextSibling)je.style.paddingRight=E.display.nativeBarWidth+"px";if(E.addKeyMap(this.keyMap=d(S,{moveFocus:function(jt,Sn){C.changeActive(C.selectedHint+jt,Sn)},setFocus:function(jt){C.changeActive(jt)},menuSize:function(){return C.screenAmount()},length:R.length,close:function(){S.close()},pick:function(){C.pick()},data:x})),S.options.closeOnUnfocus){var It;E.on("blur",this.onBlur=function(){It=setTimeout(function(){S.close()},100)}),E.on("focus",this.onFocus=function(){clearTimeout(It)})}E.on("scroll",this.onScroll=function(){var jt=E.getScrollInfo(),Sn=E.getWrapperElement().getBoundingClientRect();ve||(ve=E.getScrollInfo());var os=Y+ve.top-jt.top,dr=os-(D.pageYOffset||(_.documentElement||_.body).scrollTop);if(Q||(dr+=I.offsetHeight),dr<=Sn.top||dr>=Sn.bottom)return S.close();I.style.top=os+"px",I.style.left=te+ve.left-jt.left+"px"}),n.on(I,"dblclick",function(jt){var Sn=g(I,jt.target||jt.srcElement);Sn&&Sn.hintId!=null&&(C.changeActive(Sn.hintId),C.pick())}),n.on(I,"click",function(jt){var Sn=g(I,jt.target||jt.srcElement);Sn&&Sn.hintId!=null&&(C.changeActive(Sn.hintId),S.options.completeOnSingleClick&&C.pick())}),n.on(I,"mousedown",function(){setTimeout(function(){E.focus()},20)});var _r=this.getSelectedHintRange();return(_r.from!==0||_r.to!==0)&&this.scrollToActive(),n.signal(x,"select",R[this.selectedHint],I.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(D,I,O){var R=v(D,C);function P(B){if(B==R.length)return I(null);b(R[B],D,O,function(H){H&&H.list.length>0?I(H):P(B+1)})}ro(P,"run"),P(0)},"resolved");return _.async=!0,_.supportsSelection=!0,_}else return(E=S.getHelper(S.getCursor(),"hintWords"))?function(D){return n.hint.fromList(D,{words:E})}:n.hint.anyword?function(D,I){return n.hint.anyword(D,I)}: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),_,D=n.Pos(C.line,E.start),I=C;E.start<C.ch&&/\w/.test(E.string.charAt(C.ch-E.start-1))?_=E.string.substr(0,C.ch-E.start):(_="",D=C);for(var O=[],R=0;R<x.words.length;R++){var P=x.words[R];P.slice(0,_.length)==_&&O.push(P)}if(O.length)return{list:O,from:D,to:I}}),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 J4=Sce.exports;const Tce=Object.freeze(Object.defineProperty({__proto__:null,s:K4({__proto__:null,default:qr(J4)},[J4])},Symbol.toStringTag,{value:"Module"}));var Cce=Object.defineProperty,el=(e,t)=>Cce(e,"name",{value:t,configurable:!0}),kce={exports:{}},X4;function AC(){return X4||(X4=1,function(e,t){(function(n){n(kr())})(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)),D=c(m,o(v.line,N+(E>0?1:0)),E,_,b);return D==null?null:{from:o(v.line,N),to:D&&D.pos,match:D&&D.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),D=v.line;D!=_;D+=b){var I=m.getLine(D);if(I){var O=b>0?0:I.length-1,R=b>0?I.length:-1;if(!(I.length>S))for(D==v.line&&(O=v.ch-(b<0?1:0));O!=R;O+=b){var P=I.charAt(O);if(E.test(P)&&(w===void 0||(m.getTokenTypeAt(o(D,O+1))||"")==(w||""))){var B=i[P];if(B&&B.charAt(1)==">"==b>0)C.push(P);else if(C.length)C.pop();else return{pos:o(D,O),ch:P}}}}}return D-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 D=el(function(){m.operation(function(){for(var I=0;I<S.length;I++)S[I].clear()})},"clear");if(v)setTimeout(D,800);else return D}}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)})})}()),kce.exports}el(AC,"requireMatchbrackets");var Nce=Object.defineProperty,_ce=(e,t)=>Nce(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"}))}_ce(Z4,"_mergeNamespaces");var e6=AC();const Ace=Object.freeze(Object.defineProperty({__proto__:null,m:Z4({__proto__:null,default:qr(e6)},[e6])},Symbol.toStringTag,{value:"Module"}));var Oce=Object.defineProperty,Zo=(e,t)=>Oce(e,"name",{value:t,configurable:!0});function t6(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(t6,"_mergeNamespaces");var Dce={exports:{}};(function(e,t){(function(n){n(kr())})(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 D=w(S,E[_].head);if(!D||C.indexOf(D)%2!=0)return n.Pass}for(var _=E.length-1;_>=0;_--){var I=E[_].head;S.replaceRange("",o(I.line,I.ch-1),o(I.line,I.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 D=w(S,E[_].head);if(!D||C.indexOf(D)%2!=0)return n.Pass}S.operation(function(){var I=S.lineSeparator()||`
`;S.replaceSelection(I+I,null),m(S,-1),E=S.listSelections();for(var O=0;O<E.length;O++){var R=E[O].head.line;S.indentLine(R,null,!0),S.indentLine(R+1,null,!0)}})}Zo(g,"handleEnter");function m(S,x){for(var C=[],E=S.listSelections(),_=0,D=0;D<E.length;D++){var I=E[D];I.head==S.getCursor()&&(_=D);var O=I.head.ch||x>0?{line:I.head.line,ch:I.head.ch+x}:{line:I.head.line-1};C.push({anchor:O,head:O})}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 D=i(C,"closeBefore"),I=i(C,"triples"),O=E.charAt(_+1)==x,R=S.listSelections(),P=_%2==0,B,H=0;H<R.length;H++){var z=R[H],q=z.head,F,te=S.getRange(q,o(q.line,q.ch+1));if(P&&!z.empty())F="surround";else if((O||!P)&&te==x)O&&N(S,q)?F="both":I.indexOf(x)>=0&&S.getRange(q,o(q.line,q.ch+3))==x+x+x?F="skipThree":F="skip";else if(O&&q.ch>1&&I.indexOf(x)>=0&&S.getRange(o(q.line,q.ch-2),q)==x+x){if(q.ch>2&&/\bstring/.test(S.getTokenTypeAt(o(q.line,q.ch-2))))return n.Pass;F="addFour"}else if(O){var Y=q.ch==0?" ":S.getRange(o(q.line,q.ch-1),q);if(!n.isWordChar(te)&&Y!=x&&!n.isWordChar(Y))F="both";else return n.Pass}else if(P&&(te.length===0||/\s/.test(te)||D.indexOf(te)>-1))F="both";else return n.Pass;if(!B)B=F;else if(B!=F)return n.Pass}var Q=_%2?E.charAt(_-1):x,K=_%2?x:E.charAt(_+1);S.operation(function(){if(B=="skip")m(S,1);else if(B=="skipThree")m(S,3);else if(B=="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 B=="both"?(S.replaceSelection(Q+K,null),S.triggerElectric(Q+K),m(S,-1)):B=="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 n6=Dce.exports;const Ice=Object.freeze(Object.defineProperty({__proto__:null,c:t6({__proto__:null,default:qr(n6)},[n6])},Symbol.toStringTag,{value:"Module"}));var Lce=Object.defineProperty,ff=(e,t)=>Lce(e,"name",{value:t,configurable:!0});function r6(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(r6,"_mergeNamespaces");var Rce={exports:{}};(function(e,t){(function(n){n(kr())})(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 D=i.getLine(_),I=_==l?C:0;;){var O=D.indexOf(w.pair[0],I),R=D.indexOf(w.pair[1],I);if(O<0&&(O=D.length),R<0&&(R=D.length),I=Math.min(O,R),I==D.length)break;if(i.getTokenTypeAt(n.Pos(_,I+1))==w.tokenType){if(I==O)++N;else if(!--N){x=_,E=I;break e}}++I}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 o6=Rce.exports;const i6=Object.freeze(Object.defineProperty({__proto__:null,b:r6({__proto__:null,default:qr(o6)},[o6])},Symbol.toStringTag,{value:"Module"}));var Fce=Object.defineProperty,ur=(e,t)=>Fce(e,"name",{value:t,configurable:!0});function s6(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"}))}ur(s6,"_mergeNamespaces");var Mce={exports:{}},Pce={exports:{}},a6;function l6(){return a6||(a6=1,function(e,t){(function(n){n(kr())})(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}ur(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)}}ur(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}ur(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]}ur(s,"getOption"),n.defineExtension("foldOption",function(l,c){return s(this,l,c)})})}()),Pce.exports}ur(l6,"requireFoldcode"),function(e,t){(function(n){n(kr(),l6())})(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}ur(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}ur(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]}}ur(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)}ur(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"),D=typeof x.indicatorFolded=="string"&&f(x.indicatorFolded),I=typeof x.indicatorOpen=="string"&&f(x.indicatorOpen);w.eachLine(N,S,function(O){++C;var R=null,P=O.gutterMarkers;if(P&&(P=P[x.gutter]),s(w,C)){if(D&&P&&D.test(P.className))return;R=l(x.indicatorFolded)}else{var B=r(C,0),H=_&&_(w,B);if(H&&H.to.line-H.from.line>=E){if(I&&P&&I.test(P.className))return;R=l(x.indicatorOpen)}}!R&&!P||w.setGutterMarker(O,x.gutter,R)})}ur(c,"updateFoldInfo");function f(w){return new RegExp("(^|\\s)"+w+"(?:$|\\s)\\s*")}ur(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)}ur(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)}}}ur(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)}}ur(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)}}ur(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)}}ur(b,"onFold")})}();var c6=Mce.exports;const u6=Object.freeze(Object.defineProperty({__proto__:null,f:s6({__proto__:null,default:qr(c6)},[c6])},Symbol.toStringTag,{value:"Module"}));var $ce=Object.defineProperty,wn=(e,t)=>$ce(e,"name",{value:t,configurable:!0});function f6(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"}))}wn(f6,"_mergeNamespaces");var Vce={exports:{}};(function(e,t){(function(n){n(kr())})(function(n){var r="CodeMirror-lint-markers",o="CodeMirror-lint-line-";function i(I,O,R){var P=document.createElement("div");P.className="CodeMirror-lint-tooltip cm-s-"+I.options.theme,P.appendChild(R.cloneNode(!0)),I.state.lint.options.selfContain?I.getWrapperElement().appendChild(P):document.body.appendChild(P);function B(H){if(!P.parentNode)return n.off(document,"mousemove",B);P.style.top=Math.max(0,H.clientY-P.offsetHeight-5)+"px",P.style.left=H.clientX+5+"px"}return wn(B,"position"),n.on(document,"mousemove",B),B(O),P.style.opacity!=null&&(P.style.opacity=1),P}wn(i,"showTooltip");function s(I){I.parentNode&&I.parentNode.removeChild(I)}wn(s,"rm");function l(I){I.parentNode&&(I.style.opacity==null&&s(I),I.style.opacity=0,setTimeout(function(){s(I)},600))}wn(l,"hideTooltip");function c(I,O,R,P){var B=i(I,O,R);function H(){n.off(P,"mouseout",H),B&&(l(B),B=null)}wn(H,"hide");var z=setInterval(function(){if(B)for(var q=P;;q=q.parentNode){if(q&&q.nodeType==11&&(q=q.host),q==document.body)return;if(!q){H();break}}if(!B)return clearInterval(z)},400);n.on(P,"mouseout",H)}wn(c,"showTooltipFor");function f(I,O,R){this.marked=[],O instanceof Function&&(O={getAnnotations:O}),(!O||O===!0)&&(O={}),this.options={},this.linterOptions=O.options||{};for(var P in d)this.options[P]=d[P];for(var P in O)d.hasOwnProperty(P)?O[P]!=null&&(this.options[P]=O[P]):O.options||(this.linterOptions[P]=O[P]);this.timeout=null,this.hasGutter=R,this.onMouseOver=function(B){D(I,B)},this.waitingFor=0}wn(f,"LintState");var d={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function g(I){var O=I.state.lint;O.hasGutter&&I.clearGutter(r),O.options.highlightLines&&m(I);for(var R=0;R<O.marked.length;++R)O.marked[R].clear();O.marked.length=0}wn(g,"clearMarks");function m(I){I.eachLine(function(O){var R=O.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(O.wrapClass);R&&I.removeLineClass(O,"wrap",R[0])})}wn(m,"clearErrorLines");function v(I,O,R,P,B){var H=document.createElement("div"),z=H;return H.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+R,P&&(z=H.appendChild(document.createElement("div")),z.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),B!=!1&&n.on(z,"mouseover",function(q){c(I,q,O,z)}),H}wn(v,"makeMarker");function b(I,O){return I=="error"?I:O}wn(b,"getMaxSeverity");function w(I){for(var O=[],R=0;R<I.length;++R){var P=I[R],B=P.from.line;(O[B]||(O[B]=[])).push(P)}return O}wn(w,"groupByLine");function N(I){var O=I.severity;O||(O="error");var R=document.createElement("div");return R.className="CodeMirror-lint-message CodeMirror-lint-message-"+O,typeof I.messageHTML<"u"?R.innerHTML=I.messageHTML:R.appendChild(document.createTextNode(I.message)),R}wn(N,"annotationTooltip");function S(I,O){var R=I.state.lint,P=++R.waitingFor;function B(){P=-1,I.off("change",B)}wn(B,"abort"),I.on("change",B),O(I.getValue(),function(H,z){I.off("change",B),R.waitingFor==P&&(z&&H instanceof n&&(H=z),I.operation(function(){C(I,H)}))},R.linterOptions,I)}wn(S,"lintAsync");function x(I){var O=I.state.lint;if(O){var R=O.options,P=R.getAnnotations||I.getHelper(n.Pos(0,0),"lint");if(P)if(R.async||P.async)S(I,P);else{var B=P(I.getValue(),O.linterOptions,I);if(!B)return;B.then?B.then(function(H){I.operation(function(){C(I,H)})}):I.operation(function(){C(I,B)})}}}wn(x,"startLinting");function C(I,O){var R=I.state.lint;if(R){var P=R.options;g(I);for(var B=w(O),H=0;H<B.length;++H){var z=B[H];if(z){var q=[];z=z.filter(function(Z){return q.indexOf(Z.message)>-1?!1:q.push(Z.message)});for(var F=null,te=R.hasGutter&&document.createDocumentFragment(),Y=0;Y<z.length;++Y){var Q=z[Y],K=Q.severity;K||(K="error"),F=b(F,K),P.formatAnnotation&&(Q=P.formatAnnotation(Q)),R.hasGutter&&te.appendChild(N(Q)),Q.to&&R.marked.push(I.markText(Q.from,Q.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+K,__annotation:Q}))}R.hasGutter&&I.setGutterMarker(H,r,v(I,te,F,B[H].length>1,P.tooltips)),P.highlightLines&&I.addLineClass(H,"wrap",o+F)}}P.onUpdateLinting&&P.onUpdateLinting(O,B,I)}}wn(C,"updateLinting");function E(I){var O=I.state.lint;O&&(clearTimeout(O.timeout),O.timeout=setTimeout(function(){x(I)},O.options.delay))}wn(E,"onChange");function _(I,O,R){for(var P=R.target||R.srcElement,B=document.createDocumentFragment(),H=0;H<O.length;H++){var z=O[H];B.appendChild(N(z))}c(I,R,B,P)}wn(_,"popupTooltips");function D(I,O){var R=O.target||O.srcElement;if(/\bCodeMirror-lint-mark-/.test(R.className)){for(var P=R.getBoundingClientRect(),B=(P.left+P.right)/2,H=(P.top+P.bottom)/2,z=I.findMarksAt(I.coordsChar({left:B,top:H},"client")),q=[],F=0;F<z.length;++F){var te=z[F].__annotation;te&&q.push(te)}q.length&&_(I,q,O)}}wn(D,"onMouseOver"),n.defineOption("lint",!1,function(I,O,R){if(R&&R!=n.Init&&(g(I),I.state.lint.options.lintOnChange!==!1&&I.off("change",E),n.off(I.getWrapperElement(),"mouseover",I.state.lint.onMouseOver),clearTimeout(I.state.lint.timeout),delete I.state.lint),O){for(var P=I.getOption("gutters"),B=!1,H=0;H<P.length;++H)P[H]==r&&(B=!0);var z=I.state.lint=new f(I,O,B);z.options.lintOnChange&&I.on("change",E),z.options.tooltips!=!1&&z.options.tooltips!="gutter"&&n.on(I.getWrapperElement(),"mouseover",z.onMouseOver),x(I)}}),n.defineExtension("performLint",function(){x(this)})})})();var d6=Vce.exports;const jce=Object.freeze(Object.defineProperty({__proto__:null,l:f6({__proto__:null,default:qr(d6)},[d6])},Symbol.toStringTag,{value:"Module"}));var Uce=Object.defineProperty,fr=(e,t)=>Uce(e,"name",{value:t,configurable:!0}),Bce={exports:{}},p6;function Iy(){return p6||(p6=1,function(e,t){(function(n){n(kr())})(function(n){var r=n.Pos;function o(x){var C=x.flags;return C??(x.ignoreCase?"i":"")+(x.global?"g":"")+(x.multiline?"m":"")}fr(o,"regexpFlags");function i(x,C){for(var E=o(x),_=E,D=0;D<C.length;D++)_.indexOf(C.charAt(D))==-1&&(_+=C.charAt(D));return E==_?x:new RegExp(x.source,_)}fr(i,"ensureFlags");function s(x){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(x.source)}fr(s,"maybeMultiline");function l(x,C,E){C=i(C,"g");for(var _=E.line,D=E.ch,I=x.lastLine();_<=I;_++,D=0){C.lastIndex=D;var O=x.getLine(_),R=C.exec(O);if(R)return{from:r(_,R.index),to:r(_,R.index+R[0].length),match:R}}}fr(l,"searchRegexpForward");function c(x,C,E){if(!s(C))return l(x,C,E);C=i(C,"gm");for(var _,D=1,I=E.line,O=x.lastLine();I<=O;){for(var R=0;R<D&&!(I>O);R++){var P=x.getLine(I++);_=_==null?P:_+`
`+P}D=D*2,C.lastIndex=E.ch;var B=C.exec(_);if(B){var H=_.slice(0,B.index).split(`
`),z=B[0].split(`
`),q=E.line+H.length-1,F=H[H.length-1].length;return{from:r(q,F),to:r(q+z.length-1,z.length==1?F+z[0].length:z[z.length-1].length),match:B}}}}fr(c,"searchRegexpForwardMultiline");function f(x,C,E){for(var _,D=0;D<=x.length;){C.lastIndex=D;var I=C.exec(x);if(!I)break;var O=I.index+I[0].length;if(O>x.length-E)break;(!_||O>_.index+_[0].length)&&(_=I),D=I.index+1}return _}fr(f,"lastMatchIn");function d(x,C,E){C=i(C,"g");for(var _=E.line,D=E.ch,I=x.firstLine();_>=I;_--,D=-1){var O=x.getLine(_),R=f(O,C,D<0?0:O.length-D);if(R)return{from:r(_,R.index),to:r(_,R.index+R[0].length),match:R}}}fr(d,"searchRegexpBackward");function g(x,C,E){if(!s(C))return d(x,C,E);C=i(C,"gm");for(var _,D=1,I=x.getLine(E.line).length-E.ch,O=E.line,R=x.firstLine();O>=R;){for(var P=0;P<D&&O>=R;P++){var B=x.getLine(O--);_=_==null?B:B+`
`+_}D*=2;var H=f(_,C,I);if(H){var z=_.slice(0,H.index).split(`
`),q=H[0].split(`
`),F=O+z.length,te=z[z.length-1].length;return{from:r(F,te),to:r(F+q.length-1,q.length==1?te+q[0].length:q[q.length-1].length),match:H}}}}fr(g,"searchRegexpBackwardMultiline");var m,v;String.prototype.normalize?(m=fr(function(x){return x.normalize("NFD").toLowerCase()},"doFold"),v=fr(function(x){return x.normalize("NFD")},"noFold")):(m=fr(function(x){return x.toLowerCase()},"doFold"),v=fr(function(x){return x},"noFold"));function b(x,C,E,_){if(x.length==C.length)return E;for(var D=0,I=E+Math.max(0,x.length-C.length);;){if(D==I)return D;var O=D+I>>1,R=_(x.slice(0,O)).length;if(R==E)return O;R>E?I=O:D=O+1}}fr(b,"adjustPos");function w(x,C,E,_){if(!C.length)return null;var D=_?m:v,I=D(C).split(/\r|\n\r?/);e:for(var O=E.line,R=E.ch,P=x.lastLine()+1-I.length;O<=P;O++,R=0){var B=x.getLine(O).slice(R),H=D(B);if(I.length==1){var z=H.indexOf(I[0]);if(z==-1)continue e;var E=b(B,H,z,D)+R;return{from:r(O,b(B,H,z,D)+R),to:r(O,b(B,H,z+I[0].length,D)+R)}}else{var q=H.length-I[0].length;if(H.slice(q)!=I[0])continue e;for(var F=1;F<I.length-1;F++)if(D(x.getLine(O+F))!=I[F])continue e;var te=x.getLine(O+I.length-1),Y=D(te),Q=I[I.length-1];if(Y.slice(0,Q.length)!=Q)continue e;return{from:r(O,b(B,H,q,D)+R),to:r(O+I.length-1,b(te,Y,Q.length,D))}}}}fr(w,"searchStringForward");function N(x,C,E,_){if(!C.length)return null;var D=_?m:v,I=D(C).split(/\r|\n\r?/);e:for(var O=E.line,R=E.ch,P=x.firstLine()-1+I.length;O>=P;O--,R=-1){var B=x.getLine(O);R>-1&&(B=B.slice(0,R));var H=D(B);if(I.length==1){var z=H.lastIndexOf(I[0]);if(z==-1)continue e;return{from:r(O,b(B,H,z,D)),to:r(O,b(B,H,z+I[0].length,D))}}else{var q=I[I.length-1];if(H.slice(0,q.length)!=q)continue e;for(var F=1,E=O-I.length+1;F<I.length-1;F++)if(D(x.getLine(E+F))!=I[F])continue e;var te=x.getLine(O+1-I.length),Y=D(te);if(Y.slice(Y.length-I[0].length)!=I[0])continue e;return{from:r(O+1-I.length,b(te,Y,te.length-I[0].length,D)),to:r(O,b(B,H,q.length,D))}}}}fr(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 D;typeof _=="object"?D=_.caseFold:(D=_,_=null),typeof C=="string"?(D==null&&(D=!1),this.matches=function(I,O){return(I?N:w)(x,C,O,D)}):(C=i(C,"gm"),!_||_.multiline!==!1?this.matches=function(I,O){return(I?g:c)(x,C,O)}:this.matches=function(I,O){return(I?d:l)(x,C,O)})}fr(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)})})}()),Bce.exports}fr(Iy,"requireSearchcursor");var qce=Object.defineProperty,zce=(e,t)=>qce(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"}))}zce(h6,"_mergeNamespaces");var m6=Iy();const g6=Object.freeze(Object.defineProperty({__proto__:null,s:h6({__proto__:null,default:qr(m6)},[m6])},Symbol.toStringTag,{value:"Module"}));var Hce=Object.defineProperty,df=(e,t)=>Hce(e,"name",{value:t,configurable:!0});function v6(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(v6,"_mergeNamespaces");var Wce={exports:{}};(function(e,t){(function(n){n(kr())})(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 ph=Wce.exports;const y6=Object.freeze(Object.defineProperty({__proto__:null,a:ph,d:v6({__proto__:null,default:qr(ph)},[ph])},Symbol.toStringTag,{value:"Module"}));var Gce=Object.defineProperty,Ly=(e,t)=>Gce(e,"name",{value:t,configurable:!0});function b6(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"}))}Ly(b6,"_mergeNamespaces");var Yce={exports:{}};(function(e,t){(function(n){n(kr(),ph)})(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))}Ly(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>"}Ly(o,"getJumpDialog");function i(s,l){var c=Number(l);return/^[-+]/.test(l)?s.getCursor().line+c:c-1}Ly(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 E6=Yce.exports;const w6=Object.freeze(Object.defineProperty({__proto__:null,j:b6({__proto__:null,default:qr(E6)},[E6])},Symbol.toStringTag,{value:"Module"}));var Qce=Object.defineProperty,_o=(e,t)=>Qce(e,"name",{value:t,configurable:!0});function x6(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(x6,"_mergeNamespaces");var Kce={exports:{}};(function(e,t){(function(n){n(kr(),Iy(),AC())})(function(n){var r=n.commands,o=n.Pos;function i(E,_,D){if(D<0&&_.ch==0)return E.clipPos(o(_.line-1));var I=E.getLine(_.line);if(D>0&&_.ch>=I.length)return E.clipPos(o(_.line+1,0));for(var O="start",R,P=_.ch,B=P,H=D<0?0:I.length,z=0;B!=H;B+=D,z++){var q=I.charAt(D<0?B-1:B),F=q!="_"&&n.isWordChar(q)?"w":"o";if(F=="w"&&q.toUpperCase()==q&&(F="W"),O=="start")F!="o"?(O="in",R=F):P=B+D;else if(O=="in"&&R!=F){if(R=="w"&&F=="W"&&D<0&&B--,R=="W"&&F=="w"&&D>0)if(B==P+1){R="w";continue}else B--;break}}return o(_.line,B)}_o(i,"findPosSubword");function s(E,_){E.extendSelectionsBy(function(D){return E.display.shift||E.doc.extend||D.empty()?i(E.doc,D.head,_):_<0?D.from():D.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 D=E.lineAtHeight(_.top+_.clientHeight,"local");E.getCursor().line>=D&&E.execCommand("goLineUp")}E.scrollTo(null,_.top-E.defaultTextHeight())},r.scrollLineDown=function(E){var _=E.getScrollInfo();if(!E.somethingSelected()){var D=E.lineAtHeight(_.top,"local")+1;E.getCursor().line<=D&&E.execCommand("goLineDown")}E.scrollTo(null,_.top+E.defaultTextHeight())},r.splitSelectionByLine=function(E){for(var _=E.listSelections(),D=[],I=0;I<_.length;I++)for(var O=_[I].from(),R=_[I].to(),P=O.line;P<=R.line;++P)R.line>O.line&&P==R.line&&R.ch==0||D.push({anchor:P==O.line?O:o(P,0),head:P==R.line?R:o(P)});E.setSelections(D,0)},r.singleSelectionTop=function(E){var _=E.listSelections()[0];E.setSelection(_.anchor,_.head,{scroll:!1})},r.selectLine=function(E){for(var _=E.listSelections(),D=[],I=0;I<_.length;I++){var O=_[I];D.push({anchor:o(O.from().line,0),head:o(O.to().line+1,0)})}E.setSelections(D)};function l(E,_){if(E.isReadOnly())return n.Pass;E.operation(function(){for(var D=E.listSelections().length,I=[],O=-1,R=0;R<D;R++){var P=E.listSelections()[R].head;if(!(P.line<=O)){var B=o(P.line+(_?0:1),0);E.replaceRange(`
`,B,null,"+insertLine"),E.indentLine(B.line,null,!0),I.push({head:B,anchor:B}),O=P.line+1}}E.setSelections(I)}),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 D=_.ch,I=D,O=E.getLine(_.line);D&&n.isWordChar(O.charAt(D-1));)--D;for(;I<O.length&&n.isWordChar(O.charAt(I));)++I;return{from:o(_.line,D),to:o(_.line,I),word:O.slice(D,I)}}_o(c,"wordAt"),r.selectNextOccurrence=function(E){var _=E.getCursor("from"),D=E.getCursor("to"),I=E.state.sublimeFindFullWord==E.doc.sel;if(n.cmpPos(_,D)==0){var O=c(E,_);if(!O.word)return;E.setSelection(O.from,O.to),I=!0}else{var R=E.getRange(_,D),P=I?new RegExp("\\b"+R+"\\b"):R,B=E.getSearchCursor(P,D),H=B.findNext();if(H||(B=E.getSearchCursor(P,o(E.firstLine(),0)),H=B.findNext()),!H||d(E.listSelections(),B.from(),B.to()))return;E.addSelection(B.from(),B.to())}I&&(E.state.sublimeFindFullWord=E.doc.sel)},r.skipAndSelectNextOccurrence=function(E){var _=E.getCursor("anchor"),D=E.getCursor("head");r.selectNextOccurrence(E),n.cmpPos(_,D)!=0&&E.doc.setSelections(E.doc.listSelections().filter(function(I){return I.anchor!=_||I.head!=D}))};function f(E,_){for(var D=E.listSelections(),I=[],O=0;O<D.length;O++){var R=D[O],P=E.findPosV(R.anchor,_,"line",R.anchor.goalColumn),B=E.findPosV(R.head,_,"line",R.head.goalColumn);P.goalColumn=R.anchor.goalColumn!=null?R.anchor.goalColumn:E.cursorCoords(R.anchor,"div").left,B.goalColumn=R.head.goalColumn!=null?R.head.goalColumn:E.cursorCoords(R.head,"div").left;var H={anchor:P,head:B};I.push(R),I.push(H)}E.setSelections(I)}_o(f,"addCursorToSelection"),r.addCursorToPrevLine=function(E){f(E,-1)},r.addCursorToNextLine=function(E){f(E,1)};function d(E,_,D){for(var I=0;I<E.length;I++)if(n.cmpPos(E[I].from(),_)==0&&n.cmpPos(E[I].to(),D)==0)return!0;return!1}_o(d,"isSelectedRange");var g="(){}[]";function m(E){for(var _=E.listSelections(),D=[],I=0;I<_.length;I++){var O=_[I],R=O.head,P=E.scanForBracket(R,-1);if(!P)return!1;for(;;){var B=E.scanForBracket(R,1);if(!B)return!1;if(B.ch==g.charAt(g.indexOf(P.ch)+1)){var H=o(P.pos.line,P.pos.ch+1);if(n.cmpPos(H,O.from())==0&&n.cmpPos(B.pos,O.to())==0){if(P=E.scanForBracket(P.pos,-1),!P)return!1}else{D.push({anchor:H,head:B.pos});break}}R=o(B.pos.line,B.pos.ch+1)}}return E.setSelections(D),!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 D=E.scanForBracket(_.head,1,v(E.getTokenTypeAt(_.head)));if(D&&n.cmpPos(D.pos,_.head)!=0)return D.pos;var I=E.scanForBracket(_.head,-1,v(E.getTokenTypeAt(o(_.head.line,_.head.ch+1))));return I&&o(I.pos.line,I.pos.ch+1)||_.head})},r.swapLineUp=function(E){if(E.isReadOnly())return n.Pass;for(var _=E.listSelections(),D=[],I=E.firstLine()-1,O=[],R=0;R<_.length;R++){var P=_[R],B=P.from().line-1,H=P.to().line;O.push({anchor:o(P.anchor.line-1,P.anchor.ch),head:o(P.head.line-1,P.head.ch)}),P.to().ch==0&&!P.empty()&&--H,B>I?D.push(B,H):D.length&&(D[D.length-1]=H),I=H}E.operation(function(){for(var z=0;z<D.length;z+=2){var q=D[z],F=D[z+1],te=E.getLine(q);E.replaceRange("",o(q,0),o(q+1,0),"+swapLine"),F>E.lastLine()?E.replaceRange(`
`+te,o(E.lastLine()),null,"+swapLine"):E.replaceRange(te+`
`,o(F,0),null,"+swapLine")}E.setSelections(O),E.scrollIntoView()})},r.swapLineDown=function(E){if(E.isReadOnly())return n.Pass;for(var _=E.listSelections(),D=[],I=E.lastLine()+1,O=_.length-1;O>=0;O--){var R=_[O],P=R.to().line+1,B=R.from().line;R.to().ch==0&&!R.empty()&&P--,P<I?D.push(P,B):D.length&&(D[D.length-1]=B),I=B}E.operation(function(){for(var H=D.length-2;H>=0;H-=2){var z=D[H],q=D[H+1],F=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(F+`
`,o(q,0),null,"+swapLine")}E.scrollIntoView()})},r.toggleCommentIndented=function(E){E.toggleComment({indent:!0})},r.joinLines=function(E){for(var _=E.listSelections(),D=[],I=0;I<_.length;I++){for(var O=_[I],R=O.from(),P=R.line,B=O.to().line;I<_.length-1&&_[I+1].from().line==B;)B=_[++I].to().line;D.push({start:P,end:B,anchor:!O.empty()&&R})}E.operation(function(){for(var H=0,z=[],q=0;q<D.length;q++){for(var F=D[q],te=F.anchor&&o(F.anchor.line-H,F.anchor.ch),Y,Q=F.start;Q<=F.end;Q++){var K=Q-H;Q==F.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,D=0;D<_;D++){var I=E.listSelections()[D];I.empty()?E.replaceRange(E.getLine(I.head.line)+`
`,o(I.head.line,0)):E.replaceRange(E.getRange(I.from(),I.to()),I.from())}E.scrollIntoView()})};function b(E,_,D){if(E.isReadOnly())return n.Pass;for(var I=E.listSelections(),O=[],R,P=0;P<I.length;P++){var B=I[P];if(!B.empty()){for(var H=B.from().line,z=B.to().line;P<I.length-1&&I[P+1].from().line==z;)z=I[++P].to().line;I[P].to().ch||z--,O.push(H,z)}}O.length?R=!0:O.push(E.firstLine(),E.lastLine()),E.operation(function(){for(var q=[],F=0;F<O.length;F+=2){var te=O[F],Y=O[F+1],Q=o(te,0),K=o(Y),Z=E.getRange(Q,K,!1);_?Z.sort(function(re,J){return re<J?-D:re==J?0:D}):Z.sort(function(re,J){var ie=re.toUpperCase(),ne=J.toUpperCase();return ie!=ne&&(re=ie,J=ne),re<J?-D:re==J?0:D}),E.replaceRange(Z,Q,K),R&&q.push({anchor:Q,head:o(Y+1,0)})}R&&E.setSelections(q,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 D=_.shift(),I=D.find();if(I)return _.push(D),E.setSelection(I.from,I.to)}},r.prevBookmark=function(E){var _=E.state.sublimeBookmarks;if(_)for(;_.length;){_.unshift(_.pop());var D=_[_.length-1].find();if(!D)_.pop();else return E.setSelection(D.from,D.to)}},r.toggleBookmark=function(E){for(var _=E.listSelections(),D=E.state.sublimeBookmarks||(E.state.sublimeBookmarks=[]),I=0;I<_.length;I++){for(var O=_[I].from(),R=_[I].to(),P=_[I].empty()?E.findMarksAt(O):E.findMarks(O,R),B=0;B<P.length;B++)if(P[B].sublimeBookmark){P[B].clear();for(var H=0;H<D.length;H++)D[H]==P[B]&&D.splice(H--,1);break}B==P.length&&D.push(E.markText(O,R,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},r.clearBookmarks=function(E){var _=E.state.sublimeBookmarks;if(_)for(var D=0;D<_.length;D++)_[D].clear();_.length=0},r.selectBookmarks=function(E){var _=E.state.sublimeBookmarks,D=[];if(_)for(var I=0;I<_.length;I++){var O=_[I].find();O?D.push({anchor:O.from,head:O.to}):_.splice(I--,0)}D.length&&E.setSelections(D,0)};function w(E,_){E.operation(function(){for(var D=E.listSelections(),I=[],O=[],R=0;R<D.length;R++){var P=D[R];P.empty()?(I.push(R),O.push("")):O.push(_(E.getRange(P.from(),P.to())))}E.replaceSelections(O,"around","case");for(var R=I.length-1,B;R>=0;R--){var P=D[I[R]];if(!(B&&n.cmpPos(P.head,B)>0)){var H=c(E,P.head);B=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(),D=E.getOption("indentUnit"),I=_.length-1;I>=0;I--){var O=_[I].head,R=E.getRange({line:O.line,ch:0},O),P=n.countColumn(R,null,E.getOption("tabSize")),B=E.findPosH(O,-1,"char",!1);if(R&&!/\S/.test(R)&&P%D==0){var H=new o(O.line,n.findColumn(R,P-D,D));H.ch!=O.ch&&(B=H)}E.replaceRange("",B,O,"+delete")}})},r.delLineRight=function(E){E.operation(function(){for(var _=E.listSelections(),D=_.length-1;D>=0;D--)E.replaceRange("",_[D].anchor,o(_[D].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 D=E.getCursor(),I=_;if(n.cmpPos(D,I)>0){var O=I;I=D,D=O}E.state.sublimeKilled=E.getRange(D,I),E.replaceRange("",D,I)}},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"),D=E.getCursor("to");if(n.cmpPos(_,D)==0){var I=c(E,_);if(!I.word)return;_=I.from,D=I.to}return{from:_,to:D,query:E.getRange(_,D),word:I}}_o(N,"getTarget");function S(E,_){var D=N(E);if(D){var I=D.query,O=E.getSearchCursor(I,_?D.to:D.from);(_?O.findNext():O.findPrevious())?E.setSelection(O.from(),O.to()):(O=E.getSearchCursor(I,_?o(E.firstLine(),0):E.clipPos(o(E.lastLine()))),(_?O.findNext():O.findPrevious())?E.setSelection(O.from(),O.to()):D.word&&E.setSelection(D.from,D.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 D=E.getSearchCursor(_.query),I=[],O=-1;D.findNext();)I.push({anchor:D.from(),head:D.to()}),D.from().line<=_.from.line&&D.from().ch<=_.from.ch&&O++;E.setSelections(I,O)}};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 S6=Kce.exports;const T6=Object.freeze(Object.defineProperty({__proto__:null,s:x6({__proto__:null,default:qr(S6)},[S6])},Symbol.toStringTag,{value:"Module"}));var Jce=Object.defineProperty,Ce=(e,t)=>Jce(e,"name",{value:t,configurable:!0});function C6(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(C6,"_mergeNamespaces");var Xce={exports:{}};(function(e,t){(function(n){n(kr())})(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"),Xe=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:Xe,break:Xe,continue:Xe,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=D,D(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 Xe=m[Te];return x(Xe.type,Xe.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,Xe;if(l&&ee.peek()=="@"&&ee.match(b))return me.tokenize=C,x("jsonld-keyword","meta");for(;(Xe=ee.next())!=null&&!(Xe==j&&!Te);)Te=!Te&&Xe=="\\";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 D(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(D,"tokenQuasi");var I="([{}])";function O(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 Xe=0,pt=!1,Re=me-1;Re>=0;--Re){var Jn=j.string.charAt(Re),lo=I.indexOf(Jn);if(lo>=0&&lo<3){if(!Xe){++Re;break}if(--Xe==0){Jn=="("&&(pt=!0);break}}else if(lo>=3&&lo<6)++Xe;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&&!Xe){++Re;break}}pt&&!Xe&&(ee.fatArrowAt=Re)}}Ce(O,"findFatArrow");var R={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function P(j,ee,me,Te,Xe,pt){this.indented=j,this.column=ee,this.type=me,this.prev=Xe,this.info=pt,Te!=null&&(this.align=Te)}Ce(P,"JSLexical");function B(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(B,"inScope");function H(j,ee,me,Te,Xe){var pt=j.cc;for(z.state=j,z.stream=Xe,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"&&B(j,Te)?"variable-2":ee}}}Ce(H,"parseJS");var z={state:null,column:null,marked:null,cc:null};function q(){for(var j=arguments.length-1;j>=0;j--)z.cc.push(arguments[j])}Ce(q,"pass");function F(){return q.apply(null,arguments),!0}Ce(F,"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,Xe=Te.indented;if(Te.lexical.type=="stat")Xe=Te.lexical.indented;else for(var pt=Te.lexical;pt&&pt.type==")"&&pt.align;pt=pt.prev)Xe=pt.indented;Te.lexical=new P(Xe,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?F():j==";"||me=="}"||me==")"||me=="]"?q():F(ee)}return Ce(ee,"exp"),ee}Ce(xe,"expect");function ve(j,ee){return j=="var"?F(le("vardef",ee),yf,xe(";"),de):j=="keyword a"?F(le("form"),it,ve,de):j=="keyword b"?F(le("form"),ve,de):j=="keyword d"?z.stream.match(/^\s*$/,!1)?F():F(le("stat"),je,xe(";"),de):j=="debugger"?F(xe(";")):j=="{"?F(le("}"),ne,Ar,de,ae):j==";"?F():j=="if"?(z.state.lexical.info=="else"&&z.state.cc[z.state.cc.length-1]==de&&z.state.cc.pop()(),F(le("form"),it,ve,de,bh)):j=="function"?F(Oo):j=="for"?F(le("form"),ne,Eh,ve,ae,de):j=="class"||d&&ee=="interface"?(z.marked="keyword",F(le("form",j=="class"?j:ee),ll,de)):j=="variable"?d&&ee=="declare"?(z.marked="keyword",F(ve)):d&&(ee=="module"||ee=="enum"||ee=="type")&&z.stream.match(/^\s*\w/,!1)?(z.marked="keyword",ee=="enum"?F(ii):ee=="type"?F(Sf,xe("operator"),Ke,xe(";")):F(le("form"),Or,xe("{"),le("}"),Ar,de,de)):d&&ee=="namespace"?(z.marked="keyword",F(le("form"),Ie,ve,de)):d&&ee=="abstract"?(z.marked="keyword",F(ve)):F(le("stat"),Ec):j=="switch"?F(le("form"),it,xe("{"),le("}","switch"),ne,Ar,de,de,ae):j=="case"?F(Ie,xe(":")):j=="default"?F(xe(":")):j=="catch"?F(le("form"),ie,qe,ve,de,ae):j=="export"?F(le("stat"),wc,de):j=="import"?F(le("stat"),en,de):j=="async"?F(ve):ee=="@"?F(Ie,ve):q(le("stat"),Ie,xe(";"),de)}Ce(ve,"statement");function qe(j){if(j=="(")return F(Pi,xe(")"))}Ce(qe,"maybeCatchBinding");function Ie(j,ee){return Ot(j,ee,!1)}Ce(Ie,"expression");function Ae(j,ee){return Ot(j,ee,!0)}Ce(Ae,"expressionNoComma");function it(j){return j!="("?q():F(le(")"),je,xe(")"),de)}Ce(it,"parenExpr");function Ot(j,ee,me){if(z.state.fatArrowAt==z.stream.start){var Te=me?dr:os;if(j=="(")return F(ie,le(")"),Yt(Pi,")"),de,xe("=>"),Te,ae);if(j=="variable")return q(ie,Or,xe("=>"),Te,ae)}var Xe=me?_r:It;return R.hasOwnProperty(j)?F(Xe):j=="function"?F(Oo,Xe):j=="class"||d&&ee=="interface"?(z.marked="keyword",F(le("form"),al,de)):j=="keyword c"||j=="async"?F(me?Ae:Ie):j=="("?F(le(")"),je,xe(")"),de,Xe):j=="operator"||j=="spread"?F(me?Ae:Ie):j=="["?F(le("]"),bt,de,Xe):j=="{"?rl(ei,"}",null,Xe):j=="quasi"?q(jt,Xe):j=="new"?F(nl(me)):F()}Ce(Ot,"expressionInner");function je(j){return j.match(/[;\}\)\],]/)?q():q(Ie)}Ce(je,"maybeexpression");function It(j,ee){return j==","?F(je):_r(j,ee,!1)}Ce(It,"maybeoperatorComma");function _r(j,ee,me){var Te=me==!1?It:_r,Xe=me==!1?Ie:Ae;if(j=="=>")return F(ie,me?dr:os,ae);if(j=="operator")return/\+\+|--/.test(ee)||d&&ee=="!"?F(Te):d&&ee=="<"&&z.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?F(le(">"),Yt(Ke,">"),de,Te):ee=="?"?F(Ie,xe(":"),Xe):F(Xe);if(j=="quasi")return q(jt,Te);if(j!=";"){if(j=="(")return rl(Ae,")","call",Te);if(j==".")return F(gf,Te);if(j=="[")return F(le("]"),je,xe("]"),de,Te);if(d&&ee=="as")return z.marked="keyword",F(Ke,Te);if(j=="regexp")return z.state.lastType=z.marked="operator",z.stream.backUp(z.stream.pos-z.stream.start-1),F(Xe)}}Ce(_r,"maybeoperatorNoComma");function jt(j,ee){return j!="quasi"?q():ee.slice(ee.length-2)!="${"?F(jt):F(je,Sn)}Ce(jt,"quasi");function Sn(j){if(j=="}")return z.marked="string-2",z.state.tokenize=D,F(jt)}Ce(Sn,"continueQuasi");function os(j){return O(z.stream,z.state),q(j=="{"?ve:Ie)}Ce(os,"arrowBody");function dr(j){return O(z.stream,z.state),q(j=="{"?ve:Ae)}Ce(dr,"arrowBodyNoComma");function nl(j){return function(ee){return ee=="."?F(j?Uy:mf):ee=="variable"&&d?F(Hs,j?_r:It):q(j?Ae:Ie)}}Ce(nl,"maybeTarget");function mf(j,ee){if(ee=="target")return z.marked="keyword",F(It)}Ce(mf,"target");function Uy(j,ee){if(ee=="target")return z.marked="keyword",F(_r)}Ce(Uy,"targetNoComma");function Ec(j){return j==":"?F(de,ve):q(It,xe(";"),de)}Ce(Ec,"maybelabel");function gf(j){if(j=="variable")return z.marked="property",F()}Ce(gf,"property");function ei(j,ee){if(j=="async")return z.marked="property",F(ei);if(j=="variable"||z.style=="keyword"){if(z.marked="property",ee=="get"||ee=="set")return F(yh);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),F(io)}else{if(j=="number"||j=="string")return z.marked=l?"property":z.style+" property",F(io);if(j=="jsonld-keyword")return F(io);if(d&&K(ee))return z.marked="keyword",F(ei);if(j=="[")return F(Ie,is,xe("]"),io);if(j=="spread")return F(Ae,io);if(ee=="*")return z.marked="keyword",F(ei);if(j==":")return q(io)}}Ce(ei,"objprop");function yh(j){return j!="variable"?q(io):(z.marked="property",F(Oo))}Ce(yh,"getterSetter");function io(j){if(j==":")return F(Ae);if(j=="(")return q(Oo)}Ce(io,"afterprop");function Yt(j,ee,me){function Te(Xe,pt){if(me?me.indexOf(Xe)>-1:Xe==","){var Re=z.state.lexical;return Re.info=="call"&&(Re.pos=(Re.pos||0)+1),F(function(Jn,lo){return Jn==ee||lo==ee?q():q(j)},Te)}return Xe==ee||pt==ee?F():me&&me.indexOf(";")>-1?q(j):F(xe(ee))}return Ce(Te,"proceed"),function(Xe,pt){return Xe==ee||pt==ee?F():q(j,Te)}}Ce(Yt,"commasep");function rl(j,ee,me){for(var Te=3;Te<arguments.length;Te++)z.cc.push(arguments[Te]);return F(le(ee,me),Yt(j,ee),de)}Ce(rl,"contCommasep");function Ar(j){return j=="}"?F():q(ve,Ar)}Ce(Ar,"block");function is(j,ee){if(d){if(j==":")return F(Ke);if(ee=="?")return F(is)}}Ce(is,"maybetype");function Ge(j,ee){if(d&&(j==":"||ee=="in"))return F(Ke)}Ce(Ge,"maybetypeOrIn");function ol(j){if(d&&j==":")return z.stream.match(/^\s*\w+\s+is\b/,!1)?F(Ie,pr,Ke):F(Ke)}Ce(ol,"mayberettype");function pr(j,ee){if(ee=="is")return z.marked="keyword",F()}Ce(pr,"isKW");function Ke(j,ee){if(ee=="keyof"||ee=="typeof"||ee=="infer"||ee=="readonly")return z.marked="keyword",F(ee=="typeof"?Ae:Ke);if(j=="variable"||ee=="void")return z.marked="type",F(zr);if(ee=="|"||ee=="&")return F(Ke);if(j=="string"||j=="number"||j=="atom")return F(zr);if(j=="[")return F(le("]"),Yt(Ke,"]",","),de,zr);if(j=="{")return F(le("}"),il,de,zr);if(j=="(")return F(Yt(sl,")"),un,zr);if(j=="<")return F(Yt(Ke,">"),Ke);if(j=="quasi")return q(ti,zr)}Ce(Ke,"typeexpr");function un(j){if(j=="=>")return F(Ke)}Ce(un,"maybeReturnType");function il(j){return j.match(/[\}\)\]]/)?F():j==","||j==";"?F(il):q(An,il)}Ce(il,"typeprops");function An(j,ee){if(j=="variable"||z.style=="keyword")return z.marked="property",F(An);if(ee=="?"||j=="number"||j=="string")return F(An);if(j==":")return F(Ke);if(j=="[")return F(xe("variable"),Ge,xe("]"),An);if(j=="(")return q(so,An);if(!j.match(/[;\}\)\],]/))return F()}Ce(An,"typeprop");function ti(j,ee){return j!="quasi"?q():ee.slice(ee.length-2)!="${"?F(ti):F(Ke,Bn)}Ce(ti,"quasiType");function Bn(j){if(j=="}")return z.marked="string-2",z.state.tokenize=D,F(ti)}Ce(Bn,"continueQuasiType");function sl(j,ee){return j=="variable"&&z.stream.match(/^\s*[?:]/,!1)||ee=="?"?F(sl):j==":"?F(Ke):j=="spread"?F(sl):q(Ke)}Ce(sl,"typearg");function zr(j,ee){if(ee=="<")return F(le(">"),Yt(Ke,">"),de,zr);if(ee=="|"||j=="."||ee=="&")return F(Ke);if(j=="[")return F(Ke,xe("]"),zr);if(ee=="extends"||ee=="implements")return z.marked="keyword",F(Ke);if(ee=="?")return F(Ke,xe(":"),Ke)}Ce(zr,"afterType");function Hs(j,ee){if(ee=="<")return F(le(">"),Yt(Ke,">"),de,zr)}Ce(Hs,"maybeTypeArgs");function ss(){return q(Ke,vf)}Ce(ss,"typeparam");function vf(j,ee){if(ee=="=")return F(Ke)}Ce(vf,"maybeTypeDefault");function yf(j,ee){return ee=="enum"?(z.marked="keyword",F(ii)):q(Or,is,ni,wf)}Ce(yf,"vardef");function Or(j,ee){if(d&&K(ee))return z.marked="keyword",F(Or);if(j=="variable")return Y(ee),F();if(j=="spread")return F(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),F(ni)):(j=="variable"&&(z.marked="property"),j=="spread"?F(Or):j=="}"?q():j=="["?F(Ie,xe("]"),xe(":"),bf):F(xe(":"),Or,ni))}Ce(bf,"proppattern");function Ef(){return q(Or,ni)}Ce(Ef,"eltpattern");function ni(j,ee){if(ee=="=")return F(Ae)}Ce(ni,"maybeAssign");function wf(j){if(j==",")return F(yf)}Ce(wf,"vardefCont");function bh(j,ee){if(j=="keyword b"&&ee=="else")return F(le("form","else"),ve,de)}Ce(bh,"maybeelse");function Eh(j,ee){if(ee=="await")return F(Eh);if(j=="(")return F(le(")"),xf,de)}Ce(Eh,"forspec");function xf(j){return j=="var"?F(yf,as):j=="variable"?F(as):q(as)}Ce(xf,"forspec1");function as(j,ee){return j==")"?F():j==";"?F(as):ee=="in"||ee=="of"?(z.marked="keyword",F(Ie,as)):q(Ie,as)}Ce(as,"forspec2");function Oo(j,ee){if(ee=="*")return z.marked="keyword",F(Oo);if(j=="variable")return Y(ee),F(Oo);if(j=="(")return F(ie,le(")"),Yt(Pi,")"),de,ol,ve,ae);if(d&&ee=="<")return F(le(">"),Yt(ss,">"),de,Oo)}Ce(Oo,"functiondef");function so(j,ee){if(ee=="*")return z.marked="keyword",F(so);if(j=="variable")return Y(ee),F(so);if(j=="(")return F(ie,le(")"),Yt(Pi,")"),de,ol,ae);if(d&&ee=="<")return F(le(">"),Yt(ss,">"),de,so)}Ce(so,"functiondecl");function Sf(j,ee){if(j=="keyword"||j=="variable")return z.marked="type",F(Sf);if(ee=="<")return F(le(">"),Yt(ss,">"),de)}Ce(Sf,"typename");function Pi(j,ee){return ee=="@"&&F(Ie,Pi),j=="spread"?F(Pi):d&&K(ee)?(z.marked="keyword",F(Pi)):d&&j=="this"?F(is,ni):q(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),F(ri)}Ce(ll,"className");function ri(j,ee){if(ee=="<")return F(le(">"),Yt(ss,">"),de,ri);if(ee=="extends"||ee=="implements"||d&&j==",")return ee=="implements"&&(z.marked="keyword"),F(d?Ke:Ie,ri);if(j=="{")return F(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",F(Do);if(j=="variable"||z.style=="keyword")return z.marked="property",F(ao,Do);if(j=="number"||j=="string")return F(ao,Do);if(j=="[")return F(Ie,is,xe("]"),ao,Do);if(ee=="*")return z.marked="keyword",F(Do);if(d&&j=="(")return q(so,Do);if(j==";"||j==",")return F(Do);if(j=="}")return F();if(ee=="@")return F(Ie,Do)}Ce(Do,"classBody");function ao(j,ee){if(ee=="!"||ee=="?")return F(ao);if(j==":")return F(Ke,ni);if(ee=="=")return F(Ae);var me=z.state.lexical.prev,Te=me&&me.info=="interface";return q(Te?so:Oo)}Ce(ao,"classfield");function wc(j,ee){return ee=="*"?(z.marked="keyword",F(Dr,xe(";"))):ee=="default"?(z.marked="keyword",F(Ie,xe(";"))):j=="{"?F(Yt(xc,"}"),Dr,xe(";")):q(ve)}Ce(wc,"afterExport");function xc(j,ee){if(ee=="as")return z.marked="keyword",F(xe("variable"));if(j=="variable")return q(Ae,xc)}Ce(xc,"exportField");function en(j){return j=="string"?F():j=="("?q(Ie):j=="."?q(It):q(Pe,oi,Dr)}Ce(en,"afterImport");function Pe(j,ee){return j=="{"?rl(Pe,"}"):(j=="variable"&&Y(ee),ee=="*"&&(z.marked="keyword"),F(Sc))}Ce(Pe,"importSpec");function oi(j){if(j==",")return F(Pe,oi)}Ce(oi,"maybeMoreImports");function Sc(j,ee){if(ee=="as")return z.marked="keyword",F(Pe)}Ce(Sc,"maybeAs");function Dr(j,ee){if(ee=="from")return z.marked="keyword",F(Ie)}Ce(Dr,"maybeFrom");function bt(j){return j=="]"?F():q(Yt(Ae,"]"))}Ce(bt,"arrayLiteral");function ii(){return q(le("form"),Or,xe("{"),le("}"),Yt(Ws,"}"),de,de)}Ce(ii,"enumdef");function Ws(){return q(Or,ni)}Ce(Ws,"enummember");function Tc(j,ee){return j.lastType=="operator"||j.lastType==","||v.test(ee.charAt(0))||/[,.]/.test(ee.charAt(0))}Ce(Tc,"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 P((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(),O(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==D)return n.Pass;if(j.tokenize!=C)return 0;var me=ee&&ee.charAt(0),Te=j.lexical,Xe;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!=bh&&Re!=ae)break}for(;(Te.type=="stat"||Te.type=="form")&&(me=="}"||(Xe=j.cc[j.cc.length-1])&&(Xe==It||Xe==_r)&&!/^[,\.=+\-*:?[\(]/.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+(Tc(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 k6=Xce.exports;const Zce=Object.freeze(Object.defineProperty({__proto__:null,j:C6({__proto__:null,default:qr(k6)},[k6])},Symbol.toStringTag,{value:"Module"}));var eue=Object.defineProperty,Ry=(e,t)=>eue(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"}))}Ry(N6,"_mergeNamespaces");var tue={exports:{}};(function(e,t){(function(n){n(kr())})(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}Ry(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)}Ry(c,"probablyInsideString");function f(d,g){var m=d.getMode();return m.useInnerComments===!1||!m.innerMode?m:d.getModeAt(g)}Ry(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 D=v.getLine(_),I=D.slice(0,l(D));(E==null||E.length>I.length)&&(E=I)}for(var _=d.line;_<S;++_){var D=v.getLine(_),O=E.length;!C&&!o.test(D)||(D.slice(0,O)!=E&&(O=l(D)),v.replaceRange(E+N+x,i(_,0),i(_,O)))}}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 D=s(v.getCursor("to"),g)==0,I=!v.somethingSelected();v.replaceRange(N,g),D&&v.setSelection(I?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 D=v.getLine(_),I=D.indexOf(S);if(I>-1&&!/comment/.test(v.getTokenTypeAt(i(_,I+1)))&&(I=-1),I==-1&&o.test(D)||I>-1&&o.test(D.slice(0,I)))break e;x.push(D)}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 O=m.blockCommentStart||b.blockCommentStart,R=m.blockCommentEnd||b.blockCommentEnd;if(!O||!R)return!1;var P=m.blockCommentLead||b.blockCommentLead,B=v.getLine(N),H=B.indexOf(O);if(H==-1)return!1;var z=w==N?B:v.getLine(w),q=z.indexOf(R,w==N?H+O.length:0),F=i(N,H+1),te=i(w,q+1);if(q==-1||!/comment/.test(v.getTokenTypeAt(F))||!/comment/.test(v.getTokenTypeAt(te))||v.getRange(F,te,`
`).indexOf(R)>-1)return!1;var Y=B.lastIndexOf(O,d.ch),Q=Y==-1?-1:B.slice(0,d.ch).indexOf(R,Y+O.length);if(Y!=-1&&Q!=-1&&Q+R.length!=d.ch)return!1;Q=z.indexOf(R,g.ch);var K=z.slice(g.ch).lastIndexOf(O,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,q-(C&&z.slice(q-C.length,q)==C?C.length:0)),i(w,q+R.length));var Z=H+O.length;if(C&&B.slice(Z,Z+C.length)==C&&(Z+=C.length),v.replaceRange("",i(N,H),i(N,Z)),P)for(var re=N+1;re<=w;++re){var J=v.getLine(re),ie=J.indexOf(P);if(!(ie==-1||o.test(J.slice(0,ie)))){var ne=ie+P.length;C&&J.slice(ne,ne+C.length)==C&&(ne+=C.length),v.replaceRange("",i(re,ie),i(re,ne))}}}),!0)})})})();var _6=tue.exports;const nue=Object.freeze(Object.defineProperty({__proto__:null,c:N6({__proto__:null,default:qr(_6)},[_6])},Symbol.toStringTag,{value:"Module"}));var rue=Object.defineProperty,Gt=(e,t)=>rue(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"}))}Gt(A6,"_mergeNamespaces");var oue={exports:{}};(function(e,t){(function(n){n(kr(),Iy(),ph)})(function(n){n.defineOption("search",{bottom:!1});function r(O,R){return typeof O=="string"?O=new RegExp(O.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),R?"gi":"g"):O.global||(O=new RegExp(O.source,O.ignoreCase?"gi":"g")),{token:function(P){O.lastIndex=P.pos;var B=O.exec(P.string);if(B&&B.index==P.pos)return P.pos+=B[0].length||1,"searching";B?P.pos=B.index:P.skipToEnd()}}}Gt(r,"searchOverlay");function o(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}Gt(o,"SearchState");function i(O){return O.state.search||(O.state.search=new o)}Gt(i,"getSearchState");function s(O){return typeof O=="string"&&O==O.toLowerCase()}Gt(s,"queryCaseInsensitive");function l(O,R,P){return O.getSearchCursor(R,P,{caseFold:s(R),multiline:!0})}Gt(l,"getSearchCursor");function c(O,R,P,B,H){O.openDialog(R,B,{value:P,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){N(O)},onKeyDown:H,bottom:O.options.search.bottom})}Gt(c,"persistentDialog");function f(O,R,P,B,H){O.openDialog?O.openDialog(R,H,{value:B,selectValueOnOpen:!0,bottom:O.options.search.bottom}):H(prompt(P,B))}Gt(f,"dialog");function d(O,R,P,B){O.openConfirm?O.openConfirm(R,B):confirm(P)&&B[0]()}Gt(d,"confirmDialog");function g(O){return O.replace(/\\([nrt\\])/g,function(R,P){return P=="n"?`
`:P=="r"?"\r":P=="t"?" ":P=="\\"?"\\":R})}Gt(g,"parseString");function m(O){var R=O.match(/^\/(.*)\/([a-z]*)$/);if(R)try{O=new RegExp(R[1],R[2].indexOf("i")==-1?"":"i")}catch{}else O=g(O);return(typeof O=="string"?O=="":O.test(""))&&(O=/x^/),O}Gt(m,"parseQuery");function v(O,R,P){R.queryText=P,R.query=m(P),O.removeOverlay(R.overlay,s(R.query)),R.overlay=r(R.query,s(R.query)),O.addOverlay(R.overlay),O.showMatchesOnScrollbar&&(R.annotate&&(R.annotate.clear(),R.annotate=null),R.annotate=O.showMatchesOnScrollbar(R.query,s(R.query)))}Gt(v,"startSearch");function b(O,R,P,B){var H=i(O);if(H.query)return w(O,R);var z=O.getSelection()||H.lastQuery;if(z instanceof RegExp&&z.source=="x^"&&(z=null),P&&O.openDialog){var q=null,F=Gt(function(te,Y){n.e_stop(Y),te&&(te!=H.queryText&&(v(O,H,te),H.posFrom=H.posTo=O.getCursor()),q&&(q.style.opacity=1),w(O,Y.shiftKey,function(Q,K){var Z;K.line<3&&document.querySelector&&(Z=O.display.wrapper.querySelector(".CodeMirror-dialog"))&&Z.getBoundingClientRect().bottom-4>O.cursorCoords(K,"window").top&&((q=Z).style.opacity=.4)}))},"searchNext");c(O,x(O),z,F,function(te,Y){var Q=n.keyName(te),K=O.getOption("extraKeys"),Z=K&&K[Q]||n.keyMap[O.getOption("keyMap")][Q];Z=="findNext"||Z=="findPrev"||Z=="findPersistentNext"||Z=="findPersistentPrev"?(n.e_stop(te),v(O,i(O),Y),O.execCommand(Z)):(Z=="find"||Z=="findPersistent")&&(n.e_stop(te),F(Y,te))}),B&&z&&(v(O,H,z),w(O,R))}else f(O,x(O),"Search for:",z,function(te){te&&!H.query&&O.operation(function(){v(O,H,te),H.posFrom=H.posTo=O.getCursor(),w(O,R)})})}Gt(b,"doSearch");function w(O,R,P){O.operation(function(){var B=i(O),H=l(O,B.query,R?B.posFrom:B.posTo);!H.find(R)&&(H=l(O,B.query,R?n.Pos(O.lastLine()):n.Pos(O.firstLine(),0)),!H.find(R))||(O.setSelection(H.from(),H.to()),O.scrollIntoView({from:H.from(),to:H.to()},20),B.posFrom=H.from(),B.posTo=H.to(),P&&P(H.from(),H.to()))})}Gt(w,"findNext");function N(O){O.operation(function(){var R=i(O);R.lastQuery=R.query,R.query&&(R.query=R.queryText=null,O.removeOverlay(R.overlay),R.annotate&&(R.annotate.clear(),R.annotate=null))})}Gt(N,"clearSearch");function S(O,R){var P=O?document.createElement(O):document.createDocumentFragment();for(var B in R)P[B]=R[B];for(var H=2;H<arguments.length;H++){var z=arguments[H];P.appendChild(typeof z=="string"?document.createTextNode(z):z)}return P}Gt(S,"el");function x(O){return S("",null,S("span",{className:"CodeMirror-search-label"},O.phrase("Search:"))," ",S("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",S("span",{style:"color: #888",className:"CodeMirror-search-hint"},O.phrase("(Use /re/ syntax for regexp search)")))}Gt(x,"getQueryDialog");function C(O){return S("",null," ",S("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",S("span",{style:"color: #888",className:"CodeMirror-search-hint"},O.phrase("(Use /re/ syntax for regexp search)")))}Gt(C,"getReplaceQueryDialog");function E(O){return S("",null,S("span",{className:"CodeMirror-search-label"},O.phrase("With:"))," ",S("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}Gt(E,"getReplacementQueryDialog");function _(O){return S("",null,S("span",{className:"CodeMirror-search-label"},O.phrase("Replace?"))," ",S("button",{},O.phrase("Yes"))," ",S("button",{},O.phrase("No"))," ",S("button",{},O.phrase("All"))," ",S("button",{},O.phrase("Stop")))}Gt(_,"getDoReplaceConfirm");function D(O,R,P){O.operation(function(){for(var B=l(O,R);B.findNext();)if(typeof R!="string"){var H=O.getRange(B.from(),B.to()).match(R);B.replace(P.replace(/\$(\d)/g,function(z,q){return H[q]}))}else B.replace(P)})}Gt(D,"replaceAll");function I(O,R){if(!O.getOption("readOnly")){var P=O.getSelection()||i(O).lastQuery,B=R?O.phrase("Replace all:"):O.phrase("Replace:"),H=S("",null,S("span",{className:"CodeMirror-search-label"},B),C(O));f(O,H,B,P,function(z){z&&(z=m(z),f(O,E(O),O.phrase("Replace with:"),"",function(q){if(q=g(q),R)D(O,z,q);else{N(O);var F=l(O,z,O.getCursor("from")),te=Gt(function(){var Q=F.from(),K;!(K=F.findNext())&&(F=l(O,z),!(K=F.findNext())||Q&&F.from().line==Q.line&&F.from().ch==Q.ch)||(O.setSelection(F.from(),F.to()),O.scrollIntoView({from:F.from(),to:F.to()}),d(O,_(O),O.phrase("Replace?"),[function(){Y(K)},te,function(){D(O,z,q)}]))},"advance"),Y=Gt(function(Q){F.replace(typeof z=="string"?q:q.replace(/\$(\d)/g,function(K,Z){return Q[Z]})),te()},"doReplace");te()}}))})}}Gt(I,"replace"),n.commands.find=function(O){N(O),b(O)},n.commands.findPersistent=function(O){N(O),b(O,!1,!0)},n.commands.findPersistentNext=function(O){b(O,!1,!0,!0)},n.commands.findPersistentPrev=function(O){b(O,!0,!0,!0)},n.commands.findNext=b,n.commands.findPrev=function(O){b(O,!0)},n.commands.clearSearch=N,n.commands.replace=I,n.commands.replaceAll=function(O){I(O,!0)}})})();var O6=oue.exports;const D6=Object.freeze(Object.defineProperty({__proto__:null,s:A6({__proto__:null,default:qr(O6)},[O6])},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:Uq(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 iue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),I6=["error","warning","information","hint"],sue={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};nt.registerHelper("lint","graphql",(e,t)=>{const{schema:n,validationRules:r,externalFragments:o}=t;return dz(e,n,r,void 0,o).map(i=>({message:i.message,severity:i.severity?I6[i.severity-1]:I6[0],type:i.source?sue[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 aue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var lue=Object.defineProperty,cue=(e,t)=>lue(e,"name",{value:t,configurable:!0});function OC(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])}cue(OC,"forEachState");var uue=Object.defineProperty,Bs=(e,t)=>uue(e,"name",{value:t,configurable:!0});function DC(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return OC(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?IC(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?yt(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&&IC(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?yt(n.inputType):null;n.enumValue=l instanceof Er?L6(l.getValues(),g=>g.value===r.name):null;break;case"ListValue":const c=n.inputType?Ca(n.inputType):null;n.inputType=c instanceof zt?c.ofType:null;break;case"ObjectValue":const f=n.inputType?yt(n.inputType):null;n.objectFieldDefs=f instanceof Vr?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(DC,"getTypeInfo");function IC(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&&on(t))return wo;if(t&&t.getFields)return t.getFields()[n]}Bs(IC,"getFieldDef");function L6(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n]}Bs(L6,"find");function LC(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:PC(e.fieldDef)?null:e.parentType}}Bs(LC,"getFieldReference");function RC(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}}Bs(RC,"getDirectiveReference");function FC(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:PC(e.fieldDef)?null:e.parentType}}Bs(FC,"getArgumentReference");function MC(e){return{kind:"EnumValue",value:e.enumValue||void 0,type:e.inputType?yt(e.inputType):void 0}}Bs(MC,"getEnumValueReference");function Fy(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}}Bs(Fy,"getTypeReference");function PC(e){return e.name.slice(0,2)==="__"}Bs(PC,"isMetaField");var fue=Object.defineProperty,Mi=(e,t)=>fue(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=R6(t);r.onMouseOver=M6.bind(null,e),nt.on(e.getWrapperElement(),"mouseover",r.onMouseOver)}});function R6(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}Mi(R6,"createState");function F6(e){const{options:t}=e.state.info;return(t==null?void 0:t.hoverTime)||500}Mi(F6,"getHoverTime");function M6(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,P6(e,o)},"onHover"),c=F6(e);n.hoverTimeout=setTimeout(l,c),nt.on(document,"mousemove",i),nt.on(e.getWrapperElement(),"mouseout",s)}Mi(M6,"onMouseOver");function P6(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&&$6(e,t,l)}}}Mi(P6,"onMouseHover");function $6(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($6,"showPopup");const due=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var pue=Object.defineProperty,ns=(e,t)=>pue(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=DC(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",V6(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",U6(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",B6(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",q6(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",vc(i,o,t,o.type);const s=document.createElement("div");return s.append(i),pf(s,t,o.type),s}});function V6(e,t,n){j6(e,t,n),$C(e,t,n,t.type)}ns(V6,"renderField");function j6(e,t,n){var r;const o=((r=t.fieldDef)===null||r===void 0?void 0:r.name)||"";oo(e,o,"field-name",n,LC(t))}ns(j6,"renderQualifiedField");function U6(e,t,n){var r;const o="@"+(((r=t.directiveDef)===null||r===void 0?void 0:r.name)||"");oo(e,o,"directive-name",n,RC(t))}ns(U6,"renderDirective");function B6(e,t,n){var r;const o=((r=t.argDef)===null||r===void 0?void 0:r.name)||"";oo(e,o,"arg-name",n,FC(t)),$C(e,t,n,t.inputType)}ns(B6,"renderArg");function q6(e,t,n){var r;const o=((r=t.enumValue)===null||r===void 0?void 0:r.name)||"";vc(e,t,n,t.inputType),oo(e,"."),oo(e,o,"enum-value",n,MC(t))}ns(q6,"renderEnumValue");function $C(e,t,n,r){const o=document.createElement("span");o.className="type-name-pill",r instanceof tt?(vc(o,t,n,r.ofType),oo(o,"!")):r instanceof zt?(oo(o,"["),vc(o,t,n,r.ofType),oo(o,"]")):oo(o,(r==null?void 0:r.name)||"","type-name",n,Fy(t,r)),e.append(o)}ns($C,"renderTypeAnnotation");function vc(e,t,n,r){r instanceof tt?(vc(e,t,n,r.ofType),oo(e,"!")):r instanceof zt?(oo(e,"["),vc(e,t,n,r.ofType),oo(e,"]")):oo(e,(r==null?void 0:r.name)||"","type-name",n,Fy(t,r))}ns(vc,"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)}z6(e,t,n)}ns(pf,"renderDescription");function z6(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(z6,"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 hue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var mue=Object.defineProperty,qs=(e,t)=>mue(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:H6.bind(null,e),onMouseOut:W6.bind(null,e),onKeyDown:G6.bind(null,e)};nt.on(e.getWrapperElement(),"mouseover",r.onMouseOver),nt.on(e.getWrapperElement(),"mouseout",r.onMouseOut),nt.on(document,"keydown",r.onKeyDown)}});function H6(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&&VC(e)}qs(H6,"onMouseOver");function W6(e){if(!e.state.jump.isHoldingModifier&&e.state.jump.cursor){e.state.jump.cursor=null;return}e.state.jump.isHoldingModifier&&e.state.jump.marker&&jC(e)}qs(W6,"onMouseOut");function G6(e,t){if(e.state.jump.isHoldingModifier||!Y6(t.key))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&VC(e);const n=qs(i=>{i.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&jC(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(G6,"onKeyDown");const gue=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function Y6(e){return e===(gue?"Meta":"Control")}qs(Y6,"isJumpModifier");function VC(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(VC,"enableJumpMode");function jC(e){const{marker:t}=e.state.jump;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}qs(jC,"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=DC(t.schema,n);if(r==="Field"&&o===0&&i.fieldDef||r==="AliasedField"&&o===2&&i.fieldDef)return LC(i);if(r==="Directive"&&o===1&&i.directiveDef)return RC(i);if(r==="Argument"&&o===0&&i.argDef)return FC(i);if(r==="EnumValue"&&i.enumValue)return MC(i);if(r==="NamedType"&&i.type)return Fy(i)});const vue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var yue=Object.defineProperty,bue=(e,t)=>yue(e,"name",{value:t,configurable:!0});function My(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)}bue(My,"indent");var Eue=Object.defineProperty,wue=(e,t)=>Eue(e,"name",{value:t,configurable:!0});const xue=wue(e=>{const t=cp({eatWhitespace:n=>n.eatWhile(cL),lexRules:uL,parseRules:fL,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:My,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");nt.defineMode("graphql",xue);const Sue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Tue=Object.defineProperty,tl=(e,t)=>Tue(e,"name",{value:t,configurable:!0});function yc(e,t,n){const r=Q6(n,UC(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(yc,"hintList");function Q6(e,t){if(!t)return Py(e,r=>!r.isDeprecated);const n=e.map(r=>({proximity:K6(UC(r.text),t),entry:r}));return Py(Py(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(Q6,"filterAndSortList");function Py(e,t){const n=e.filter(t);return n.length===0?e:n}tl(Py,"filterNonEmpty");function UC(e){return e.toLowerCase().replaceAll(/\W/g,"")}tl(UC,"normalizeText");function K6(e,t){let n=J6(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}tl(K6,"getProximity");function J6(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(J6,"lexicalDistance"),nt.registerHelper("hint","graphql-variables",(e,t)=>{const n=e.getCursor(),r=e.getTokenAt(n),o=X6(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 X6(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 yc(e,t,[{text:"{"}]);const{variableToType:s}=n;if(!s)return;const l=Z6(s,t.state);if(o==="Document"||o==="Variable"&&i===0){const c=Object.keys(s);return yc(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 yc(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?yt(l.type):void 0;if(c instanceof Vr)return yc(e,t,[{text:"{"}]);if(c instanceof Er){const f=c.getValues();return yc(e,t,f.map(d=>({text:`"${d.name}"`,type:c,description:d.description})))}if(c===Ht)return yc(e,t,[{text:"true",type:Ht,description:"Not false."},{text:"false",type:Ht,description:"Not true."}])}}tl(X6,"getVariablesHint");function Z6(e,t){const n={type:null,fields:null};return OC(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 zt?o.ofType:null;break}case"ObjectValue":{const o=n.type?yt(n.type):void 0;n.fields=o instanceof Vr?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(Z6,"getTypeInfo");const Cue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var kue=Object.defineProperty,xn=(e,t)=>kue(e,"name",{value:t,configurable:!0});function eV(e){rs=e,$y=e.length,Un=Nr=hh=-1,_n(),gh();const t=BC();return zs("EOF"),t}xn(eV,"jsonParse");let rs,$y,Un,Nr,hh,xt,Ao;function BC(){const e=Un,t=[];if(zs("{"),!mh("}")){do t.push(tV());while(mh(","));zs("}")}return{kind:"Object",start:e,end:hh,members:t}}xn(BC,"parseObj");function tV(){const e=Un,t=Ao==="String"?zC():null;zs("String"),zs(":");const n=qC();return{kind:"Member",start:e,end:hh,key:t,value:n}}xn(tV,"parseMember");function nV(){const e=Un,t=[];if(zs("["),!mh("]")){do t.push(qC());while(mh(","));zs("]")}return{kind:"Array",start:e,end:hh,values:t}}xn(nV,"parseArr");function qC(){switch(Ao){case"[":return nV();case"{":return BC();case"String":case"Number":case"Boolean":case"Null":const e=zC();return gh(),e}zs("Value")}xn(qC,"parseVal");function zC(){return{kind:Ao,start:Un,end:Nr,value:JSON.parse(rs.slice(Un,Nr))}}xn(zC,"curToken");function zs(e){if(Ao===e){gh();return}let t;if(Ao==="EOF")t="[end of file]";else if(Nr-Un>1)t="`"+rs.slice(Un,Nr)+"`";else{const n=rs.slice(Un).match(/^.+?\b/);t="`"+(n?n[0]:rs[Un])+"`"}throw bc(`Expected ${e} but found ${t}.`)}xn(zs,"expect");class HC extends Error{constructor(t,n){super(t),this.position=n}}xn(HC,"JSONSyntaxError");function bc(e){return new HC(e,{start:Un,end:Nr})}xn(bc,"syntaxError");function mh(e){if(Ao===e)return gh(),!0}xn(mh,"skip");function _n(){return Nr<$y&&(Nr++,xt=Nr===$y?0:rs.charCodeAt(Nr)),xt}xn(_n,"ch");function gh(){for(hh=Nr;xt===9||xt===10||xt===13||xt===32;)_n();if(xt===0){Ao="EOF";return}switch(Un=Nr,xt){case 34:return Ao="String",rV();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Ao="Number",oV();case 102:if(rs.slice(Un,Un+5)!=="false")break;Nr+=4,_n(),Ao="Boolean";return;case 110:if(rs.slice(Un,Un+4)!=="null")break;Nr+=3,_n(),Ao="Null";return;case 116:if(rs.slice(Un,Un+4)!=="true")break;Nr+=3,_n(),Ao="Boolean";return}Ao=rs[Un],_n()}xn(gh,"lex");function rV(){for(_n();xt!==34&&xt>31;)if(xt===92)switch(xt=_n(),xt){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:_n();break;case 117:_n(),vh(),vh(),vh(),vh();break;default:throw bc("Bad character escape sequence.")}else{if(Nr===$y)throw bc("Unterminated string.");_n()}if(xt===34){_n();return}throw bc("Unterminated string.")}xn(rV,"readString");function vh(){if(xt>=48&&xt<=57||xt>=65&&xt<=70||xt>=97&&xt<=102)return _n();throw bc("Expected hexadecimal digit.")}xn(vh,"readHex");function oV(){xt===45&&_n(),xt===48?_n():Vy(),xt===46&&(_n(),Vy()),(xt===69||xt===101)&&(xt=_n(),(xt===43||xt===45)&&_n(),Vy())}xn(oV,"readNumber");function Vy(){if(xt<48||xt>57)throw bc("Expected decimal digit.");do _n();while(xt>=48&&xt<=57)}xn(Vy,"readDigits"),nt.registerHelper("lint","graphql-variables",(e,t,n)=>{if(!e)return[];let r;try{r=eV(e)}catch(i){if(i instanceof HC)return[jy(n,i.position,i.message)];throw i}const{variableToType:o}=t;return o?iV(n,o,r):[]});function iV(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(jy(e,c,f));else o.push(jy(e,i.key,`Variable "$${s}" does not appear in any GraphQL query.`))}return o}xn(iV,"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 zt){const n=e.ofType;if(t.kind==="Array"){const r=t.values||[];return WC(r,o=>hf(n,o))}return hf(n,t)}if(e instanceof Vr){if(t.kind!=="Object")return[[t,`Type "${e}" must be an Object.`]];const n=Object.create(null),r=WC(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"||sV(e.parseValue(t.value)))?[[t,`Expected value of type "${e}".`]]:[]}xn(hf,"validateValue");function jy(e,t,n){return{message:n,severity:"error",type:"validation",from:e.posFromIndex(t.start),to:e.posFromIndex(t.end)}}xn(jy,"lintError");function sV(e){return e==null||e!==e}xn(sV,"isNullish");function WC(e,t){return Array.prototype.concat.apply([],e.map(t))}xn(WC,"mapCat");const Nue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var _ue=Object.defineProperty,Aue=(e,t)=>_ue(e,"name",{value:t,configurable:!0});nt.defineMode("graphql-variables",e=>{const t=cp({eatWhitespace:n=>n.eatSpace(),lexRules:Oue,parseRules:Due,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:My,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const Oue={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/},Due={Document:[Ve("{"),ct("Variable",Xt(Ve(","))),Ve("}")],Variable:[GC("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",Xt(Ve(","))),Ve("]")],ObjectValue:[Ve("{"),ct("ObjectField",Xt(Ve(","))),Ve("}")],ObjectField:[GC("attribute"),Ve(":"),"Value"]};function GC(e){return{style:e,match:t=>t.kind==="String",update(t,n){t.name=n.value.slice(1,-1)}}}Aue(GC,"namedKey");const Iue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));nt.defineMode("graphql-results",e=>{const t=cp({eatWhitespace:n=>n.eatSpace(),lexRules:Lue,parseRules:Rue,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:My,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const Lue={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/},Rue={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"]},Fue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));Lo.renderYogaGraphiQL=gce,Object.defineProperty(Lo,Symbol.toStringTag,{value:"Module"})});