UNPKG

@nodefony/monitoring-bundle

Version:
14 lines 869 kB
(self["webpackChunk_nodefony_monitoring_bundle"]=self["webpackChunk_nodefony_monitoring_bundle"]||[]).push([[3973],{3659:function(e,t,n){ /*! * get-value <https://github.com/jonschlinkert/get-value> * * Copyright (c) 2014-2018, Jon Schlinkert. * Released under the MIT License. */ const r=n(13798);function i(e,t,n){return"function"===typeof n.join?n.join(e):e[0]+t+e[1]}function o(e,t,n){return"function"===typeof n.split?n.split(e):e.split(t)}function a(e,t,n){return"function"!==typeof n.isValid||n.isValid(e,t)}function s(e){return r(e)||Array.isArray(e)||"function"===typeof e}e.exports=function(e,t,n){if(r(n)||(n={default:n}),!s(e))return"undefined"!==typeof n.default?n.default:e;"number"===typeof t&&(t=String(t));const l=Array.isArray(t),u="string"===typeof t,c=n.separator||".",d=n.joinChar||("string"===typeof c?c:".");if(!u&&!l)return e;if(u&&t in e)return a(t,e,n)?e[t]:n.default;let f=l?t:o(t,c,n),p=f.length,h=0;do{let t=f[h];"number"===typeof t&&(t=String(t));while(t&&"\\"===t.slice(-1))t=i([t.slice(0,-1),f[++h]||""],d,n);if(t in e){if(!a(t,e,n))return n.default;e=e[t]}else{let r=!1,o=h+1;while(o<p)if(t=i([t,f[o++]],d,n),r=t in e){if(!a(t,e,n))return n.default;e=e[t],h=o-1;break}if(!r)return n.default}}while(++h<p&&s(e));return h===p?e:n.default}},14447:function(e,t,n){"use strict"; /*! * set-value <https://github.com/jonschlinkert/set-value> * * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert). * Released under the MIT License. */const{deleteProperty:r}=Reflect,i=n(99969),o=n(87128),a=e=>"object"===typeof e&&null!==e||"function"===typeof e,s=e=>"__proto__"===e||"constructor"===e||"prototype"===e,l=e=>{if(!i(e))throw new TypeError("Object keys must be strings or symbols");if(s(e))throw new Error(`Cannot set unsafe key: "${e}"`)},u=e=>Array.isArray(e)?e.flat().map(String).join(","):e,c=(e,t)=>{if("string"!==typeof e||!t)return e;let n=e+";";return void 0!==t.arrays&&(n+=`arrays=${t.arrays};`),void 0!==t.separator&&(n+=`separator=${t.separator};`),void 0!==t.split&&(n+=`split=${t.split};`),void 0!==t.merge&&(n+=`merge=${t.merge};`),void 0!==t.preservePaths&&(n+=`preservePaths=${t.preservePaths};`),n},d=(e,t,n)=>{const r=u(t?c(e,t):e);l(r);const i=m.cache.get(r)||n();return m.cache.set(r,i),i},f=(e,t={})=>{const n=t.separator||".",r="/"!==n&&t.preservePaths;if("string"===typeof e&&!1!==r&&/\//.test(e))return[e];const i=[];let o="";const a=e=>{let t;""!==e.trim()&&Number.isInteger(t=Number(e))?i.push(t):i.push(e)};for(let s=0;s<e.length;s++){const t=e[s];"\\"!==t?t!==n?o+=t:(a(o),o=""):o+=e[++s]}return o&&a(o),i},p=(e,t)=>t&&"function"===typeof t.split?t.split(e):"symbol"===typeof e?[e]:Array.isArray(e)?e:d(e,t,(()=>f(e,t))),h=(e,t,n,i)=>{if(l(t),void 0===n)r(e,t);else if(i&&i.merge){const r="function"===i.merge?i.merge:Object.assign;r&&o(e[t])&&o(n)?e[t]=r(e[t],n):e[t]=n}else e[t]=n;return e},m=(e,t,n,r)=>{if(!t||!a(e))return e;const i=p(t,r);let o=e;for(let s=0;s<i.length;s++){const e=i[s],t=i[s+1];if(l(e),void 0===t){h(o,e,n,r);break}"number"!==typeof t||Array.isArray(o[e])?(a(o[e])||(o[e]={}),o=o[e]):o=o[e]=[]}return e};m.split=p,m.cache=new Map,m.clear=()=>{m.cache=new Map},e.exports=m},61421:function(){},81029:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,{decode:function(){return wu},encode:function(){return Tu},format:function(){return Cu},parse:function(){return zu}});var i={};n.r(i),n.d(i,{Any:function(){return $u},Cc:function(){return Gu},Cf:function(){return Wu},P:function(){return Hu},S:function(){return Yu},Z:function(){return Qu}});var o={};n.r(o),n.d(o,{arrayReplaceAt:function(){return Tc},assign:function(){return _c},escapeHtml:function(){return Vc},escapeRE:function(){return Bc},fromCodePoint:function(){return Sc},has:function(){return kc},isMdAsciiPunct:function(){return Yc},isPunctChar:function(){return Hc},isSpace:function(){return qc},isString:function(){return wc},isValidEntityCode:function(){return Cc},isWhiteSpace:function(){return zc},lib:function(){return Gc},normalizeReference:function(){return $c},unescapeAll:function(){return Fc},unescapeMd:function(){return Rc}});var a={};n.r(a),n.d(a,{parseLinkDestination:function(){return Qc},parseLinkLabel:function(){return Wc},parseLinkTitle:function(){return Kc}});var s=n(96540),l=n.t(s,2),u=n(40961),c=n(74848),d=n(21728);function f(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=f(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function p(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=f(e))&&(r&&(r+=" "),r+=t);return r}var h=n(11751),m=n(43038),v=n(88746),g=n(82636),y=n(80129),b=n(46286),E=n(59321),w=n(12475),x=n(79004),k=n(7613),_=n(45449),T=n(9488),C=n(35994),S=n(62242),N=n(71181),A=n(43298);function D(e,t,n){if(e){if(e.kind===A.b.VARIABLE){var r=e.name.value;if(null==n||void 0===n[r])return;var i=n[r];if(null===i&&(0,C.bd)(t))return;return i}if((0,C.bd)(t)){if(e.kind===A.b.NULL)return;return D(e,t.ofType,n)}if(e.kind===A.b.NULL)return null;if((0,C.Fs)(t)){var o=t.ofType;if(e.kind===A.b.LIST){for(var a=[],s=0,l=e.values;s<l.length;s++){var u=l[s];if(I(u,n)){if((0,C.bd)(o))return;a.push(null)}else{var c=D(u,o,n);if(void 0===c)return;a.push(c)}}return a}var d=D(e,o,n);if(void 0===d)return;return[d]}if((0,C.qK)(t)){if(e.kind!==A.b.OBJECT)return;for(var f=Object.create(null),p=(0,S.A)(e.fields,(function(e){return e.name.value})),h=0,m=(0,g.A)(t.getFields());h<m.length;h++){var v=m[h],b=p[v.name];if(b&&!I(b.value,n)){var E=D(b.value,v.type,n);if(void 0===E)return;f[v.name]=E}else if(void 0!==v.defaultValue)f[v.name]=v.defaultValue;else if((0,C.bd)(v.type))return}return f}if((0,C.zf)(t)){var w;try{w=t.parseLiteral(e,n)}catch(x){return}if(void 0===w)return;return w}(0,N.A)(0,"Unexpected input type: "+(0,y.A)(t))}}function I(e,t){return e.kind===A.b.VARIABLE&&(null==t||void 0===t[e.name.value])}function O(e,t){(0,w.A)(e)&&(0,w.A)(e.__schema)||(0,b.A)(0,'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: '.concat((0,y.A)(e),"."));for(var n=e.__schema,r=(0,E.A)(n.types,(function(e){return e.name}),(function(e){return m(e)})),i=0,o=[].concat(_.YC,T.V4);i<o.length;i++){var a=o[i];r[a.name]&&(r[a.name]=a)}var s=n.queryType?p(n.queryType):null,l=n.mutationType?p(n.mutationType):null,u=n.subscriptionType?p(n.subscriptionType):null,c=n.directives?n.directives.map(V):[];return new v.V4({description:n.description,query:s,mutation:l,subscription:u,types:(0,g.A)(r),directives:c,assumeValid:null===t||void 0===t?void 0:t.assumeValid});function d(e){if(e.kind===T.fY.LIST){var t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");return new C.KT(d(t))}if(e.kind===T.fY.NON_NULL){var n=e.ofType;if(!n)throw new Error("Decorated type deeper than introspection query.");var r=d(n);return new C.Gc((0,C.wG)(r))}return f(e)}function f(e){var t=e.name;if(!t)throw new Error("Unknown type reference: ".concat((0,y.A)(e),"."));var n=r[t];if(!n)throw new Error("Invalid or incomplete schema, unknown type: ".concat(t,". Ensure that a full introspection query is used in order to build a client schema."));return n}function p(e){return(0,C.qC)(f(e))}function h(e){return(0,C.qL)(f(e))}function m(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case T.fY.SCALAR:return S(e);case T.fY.OBJECT:return A(e);case T.fY.INTERFACE:return I(e);case T.fY.UNION:return O(e);case T.fY.ENUM:return R(e);case T.fY.INPUT_OBJECT:return F(e)}var t=(0,y.A)(e);throw new Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ".concat(t,"."))}function S(e){return new C.Ag({name:e.name,description:e.description,specifiedByUrl:e.specifiedByUrl})}function N(e){if(null===e.interfaces&&e.kind===T.fY.INTERFACE)return[];if(!e.interfaces){var t=(0,y.A)(e);throw new Error("Introspection result missing interfaces: ".concat(t,"."))}return e.interfaces.map(h)}function A(e){return new C.bh({name:e.name,description:e.description,interfaces:function(){return N(e)},fields:function(){return L(e)}})}function I(e){return new C.VA({name:e.name,description:e.description,interfaces:function(){return N(e)},fields:function(){return L(e)}})}function O(e){if(!e.possibleTypes){var t=(0,y.A)(e);throw new Error("Introspection result missing possibleTypes: ".concat(t,"."))}return new C.hI({name:e.name,description:e.description,types:function(){return e.possibleTypes.map(p)}})}function R(e){if(!e.enumValues){var t=(0,y.A)(e);throw new Error("Introspection result missing enumValues: ".concat(t,"."))}return new C.Zb({name:e.name,description:e.description,values:(0,E.A)(e.enumValues,(function(e){return e.name}),(function(e){return{description:e.description,deprecationReason:e.deprecationReason}}))})}function F(e){if(!e.inputFields){var t=(0,y.A)(e);throw new Error("Introspection result missing inputFields: ".concat(t,"."))}return new C.zP({name:e.name,description:e.description,fields:function(){return M(e.inputFields)}})}function L(e){if(!e.fields)throw new Error("Introspection result missing fields: ".concat((0,y.A)(e),"."));return(0,E.A)(e.fields,(function(e){return e.name}),P)}function P(e){var t=d(e.type);if(!(0,C.oH)(t)){var n=(0,y.A)(t);throw new Error("Introspection must provide output type for fields, but received: ".concat(n,"."))}if(!e.args){var r=(0,y.A)(e);throw new Error("Introspection result missing field args: ".concat(r,"."))}return{description:e.description,deprecationReason:e.deprecationReason,type:t,args:M(e.args)}}function M(e){return(0,E.A)(e,(function(e){return e.name}),j)}function j(e){var t=d(e.type);if(!(0,C.dX)(t)){var n=(0,y.A)(t);throw new Error("Introspection must provide input type for arguments, but received: ".concat(n,"."))}var r=null!=e.defaultValue?D((0,x.$x)(e.defaultValue),t):void 0;return{description:e.description,type:t,defaultValue:r,deprecationReason:e.deprecationReason}}function V(e){if(!e.args){var t=(0,y.A)(e);throw new Error("Introspection result missing directive args: ".concat(t,"."))}if(!e.locations){var n=(0,y.A)(e);throw new Error("Introspection result missing directive locations: ".concat(n,"."))}return new k.RR({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:M(e.args)})}}var R=n(89637);function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){var t=L({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1},e),n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByUrl":"",i=t.directiveIsRepeatable?"isRepeatable":"",o=t.schemaDescription?n:"";function a(e){return t.inputValueDeprecation?e:""}return"\n query IntrospectionQuery {\n __schema {\n ".concat(o,"\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ").concat(n,"\n ").concat(i,"\n locations\n args").concat(a("(includeDeprecated: true)")," {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ").concat(n,"\n ").concat(r,"\n fields(includeDeprecated: true) {\n name\n ").concat(n,"\n args").concat(a("(includeDeprecated: true)")," {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields").concat(a("(includeDeprecated: true)")," {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ").concat(n,"\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ").concat(n,"\n type { ...TypeRef }\n defaultValue\n ").concat(a("isDeprecated"),"\n ").concat(a("deprecationReason"),"\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n ")}var j=n(84705),V=Object.defineProperty,U=Object.defineProperties,B=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,Y=(e,t,n)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$=(e,t)=>{for(var n in t||(t={}))z.call(t,n)&&Y(e,n,t[n]);if(q)for(var n of q(t))H.call(t,n)&&Y(e,n,t[n]);return e},G=(e,t)=>U(e,B(t));function W(e){return"object"==typeof e&&null!==e&&"function"==typeof e.then}function Q(e){return new Promise(((t,n)=>{const r=e.subscribe({next(e){t(e),r.unsubscribe()},error:n,complete(){n(new Error("no value resolved"))}})}))}function K(e){return"object"==typeof e&&null!==e&&"subscribe"in e&&"function"==typeof e.subscribe}function X(e){return"object"==typeof e&&null!==e&&("AsyncGenerator"===e[Symbol.toStringTag]||Symbol.asyncIterator in e)}async function J(e){var t;const n=null==(t=("return"in e?e:e[Symbol.asyncIterator]()).return)?void 0:t.bind(e),r=await("next"in e?e:e[Symbol.asyncIterator]()).next.bind(e)();return null==n||n(),r.value}async function Z(e){const t=await e;return X(t)?J(t):K(t)?Q(t):t}n(61421);function ee(e){return JSON.stringify(e,null,2)}function te(e){return G($({},e),{message:e.message,stack:e.stack})}function ne(e){return e instanceof Error?te(e):e}function re(e){return Array.isArray(e)?ee({errors:e.map((e=>ne(e)))}):ee({errors:[ne(e)]})}function ie(e){return ee(e)}var oe=n(92327);function ae(e,t,n){const r=[];if(!e||!t)return{insertions:r,result:t};let i;try{i=(0,x.qg)(t)}catch(s){return{insertions:r,result:t}}const o=n||se,a=new oe.D(e);return(0,j.YR)(i,{leave(e){a.leave(e)},enter(e){if(a.enter(e),"Field"===e.kind&&!e.selectionSet){const n=a.getType(),i=le(de(n),o);if(i&&e.loc){const n=ce(t,e.loc.start);r.push({index:e.loc.end,string:" "+(0,h.y)(i).replaceAll("\n","\n"+n)})}}}}),{insertions:r,result:ue(t,r)}}function se(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))(0,C.zf)(t[r].type)&&n.push(r);return n}function le(e,t){const n=(0,C.MR)(e);if(!e||(0,C.zf)(e))return;const r=t(n);return Array.isArray(r)&&0!==r.length&&"getFields"in n?{kind:A.b.SELECTION_SET,selections:r.map((e=>{const r=n.getFields()[e],i=r?r.type:null;return{kind:A.b.FIELD,name:{kind:A.b.NAME,value:e},selectionSet:le(i,t)}}))}:void 0}function ue(e,t){if(0===t.length)return e;let n="",r=0;for(const{index:i,string:o}of t)n+=e.slice(r,i)+o,r=i;return n+=e.slice(r),n}function ce(e,t){let n=t,r=t;for(;n;){const t=e.charCodeAt(n-1);if(10===t||13===t||8232===t||8233===t)break;n--,9!==t&&11!==t&&12!==t&&32!==t&&160!==t&&(r=n)}return e.slice(n,r)}function de(e){if(e)return e}function fe(e,t){var n;const r=new Map,i=[];for(const o of e)if("Field"===o.kind){const e=t(o),a=r.get(e);if(null!=(n=o.directives)&&n.length){const e=$({},o);i.push(e)}else if(null!=a&&a.selectionSet&&o.selectionSet)a.selectionSet.selections=[...a.selectionSet.selections,...o.selectionSet.selections];else if(!a){const t=$({},o);r.set(e,t),i.push(t)}}else i.push(o);return i}function pe(e,t,n){var r;const i=n?(0,C.MR)(n).name:null,o=[],a=[];for(let s of t){if("FragmentSpread"===s.kind){const t=s.name.value;if(!s.directives||0===s.directives.length){if(a.includes(t))continue;a.push(t)}const n=e[s.name.value];if(n){const{typeCondition:e,directives:t,selectionSet:r}=n;s={kind:A.b.INLINE_FRAGMENT,typeCondition:e,directives:t,selectionSet:r}}}if(s.kind===A.b.INLINE_FRAGMENT&&(!s.directives||0===(null==(r=s.directives)?void 0:r.length))){const t=s.typeCondition?s.typeCondition.name.value:null;if(!t||t===i){o.push(...pe(e,s.selectionSet.selections,n));continue}}o.push(s)}return o}function he(e,t){const n=t?new oe.D(t):null,r=Object.create(null);for(const a of e.definitions)a.kind===A.b.FRAGMENT_DEFINITION&&(r[a.name.value]=a);const i={SelectionSet(e){const t=n?n.getParentType():null;let{selections:i}=e;return i=pe(r,i,t),G($({},e),{selections:i})},FragmentDefinition(){return null}},o=(0,j.YR)(e,n?(0,oe.S)(n,i):i);return(0,j.YR)(o,{SelectionSet(e){let{selections:t}=e;return t=fe(t,(e=>e.alias?e.alias.value:e.name.value)),G($({},e),{selections:t})},FragmentDefinition(){return null}})}function me(e,t,n){if(!n||n.length<1)return;const r=n.map((e=>{var t;return null==(t=e.name)?void 0:t.value}));if(t&&r.includes(t))return t;if(t&&e){const n=e.map((e=>{var t;return null==(t=e.name)?void 0:t.value})).indexOf(t);if(-1!==n&&n<r.length)return r[n]}return r[0]}function ve(e,t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==e.length}class ge{constructor(e){e?this.storage=e:null===e||"undefined"==typeof window?this.storage=null:this.storage={getItem:localStorage.getItem.bind(localStorage),setItem:localStorage.setItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),get length(){let e=0;for(const t in localStorage)0===t.indexOf(`${ye}:`)&&(e+=1);return e},clear(){for(const e in localStorage)0===e.indexOf(`${ye}:`)&&localStorage.removeItem(e)}}}get(e){if(!this.storage)return null;const t=`${ye}:${e}`,n=this.storage.getItem(t);return"null"===n||"undefined"===n?(this.storage.removeItem(t),null):n||null}set(e,t){let n=!1,r=null;if(this.storage){const o=`${ye}:${e}`;if(t)try{this.storage.setItem(o,t)}catch(i){r=i instanceof Error?i:new Error(`${i}`),n=ve(this.storage,i)}else this.storage.removeItem(o)}return{isQuotaError:n,error:r}}clear(){this.storage&&this.storage.clear()}}const ye="graphiql";class be{constructor(e,t,n=null){this.key=e,this.storage=t,this.maxSize=n,this.items=this.fetchAll()}get length(){return this.items.length}contains(e){return this.items.some((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName))}edit(e,t){if("number"==typeof t&&this.items[t]){const n=this.items[t];if(n.query===e.query&&n.variables===e.variables&&n.headers===e.headers&&n.operationName===e.operationName)return this.items.splice(t,1,e),void this.save()}const n=this.items.findIndex((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName));-1!==n&&(this.items.splice(n,1,e),this.save())}delete(e){const t=this.items.findIndex((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName));-1!==t&&(this.items.splice(t,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){const e=this.storage.get(this.key);return e?JSON.parse(e)[this.key]:[]}push(e){const t=[...this.items,e];this.maxSize&&t.length>this.maxSize&&t.shift();for(let n=0;n<5;n++){const e=this.storage.set(this.key,JSON.stringify({[this.key]:t}));if(null!=e&&e.error){if(!e.isQuotaError||!this.maxSize)return;t.shift()}else this.items=t}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}}const Ee=1e5;class we{constructor(e,t){this.storage=e,this.maxHistoryLength=t,this.updateHistory=({query:e,variables:t,headers:n,operationName:r})=>{if(!this.shouldSaveQuery(e,t,n,this.history.fetchRecent()))return;this.history.push({query:e,variables:t,headers:n,operationName:r});const i=this.history.items,o=this.favorite.items;this.queries=i.concat(o)},this.deleteHistory=({query:e,variables:t,headers:n,operationName:r,favorite:i},o=!1)=>{function a(i){const o=i.items.find((i=>i.query===e&&i.variables===t&&i.headers===n&&i.operationName===r));o&&i.delete(o)}(i||o)&&a(this.favorite),(!i||o)&&a(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new be("queries",this.storage,this.maxHistoryLength),this.favorite=new be("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,r){if(!e)return!1;try{(0,x.qg)(e)}catch(i){return!1}return!(e.length>Ee)&&(!r||!(JSON.stringify(e)===JSON.stringify(r.query)&&(JSON.stringify(t)===JSON.stringify(r.variables)&&(JSON.stringify(n)===JSON.stringify(r.headers)||n&&!r.headers)||t&&!r.variables)))}toggleFavorite({query:e,variables:t,headers:n,operationName:r,label:i,favorite:o}){const a={query:e,variables:t,headers:n,operationName:r,label:i};o?(a.favorite=!1,this.favorite.delete(a),this.history.push(a)):(a.favorite=!0,this.favorite.push(a),this.history.delete(a)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:e,variables:t,headers:n,operationName:r,label:i,favorite:o},a){const s={query:e,variables:t,headers:n,operationName:r,label:i};o?this.favorite.edit(G($({},s),{favorite:o}),a):this.history.edit(s,a),this.queries=[...this.history.items,...this.favorite.items]}}var xe=n(68633),ke=n(14447),_e=n(3659),Te=n(17965);function Ce(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Se(e,t){"function"===typeof e?e(t):null!==e&&void 0!==e&&(e.current=t)}function Ne(...e){return t=>e.forEach((e=>Se(e,t)))}function Ae(...e){return s.useCallback(Ne(...e),e)}function De(e,t){const n=s.createContext(t),r=e=>{const{children:t,...r}=e,i=s.useMemo((()=>r),Object.values(r));return(0,c.jsx)(n.Provider,{value:i,children:t})};function i(r){const i=s.useContext(n);if(i)return i;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,i]}function Ie(e,t=[]){let n=[];function r(t,r){const i=s.createContext(r),o=n.length;n=[...n,r];const a=t=>{const{scope:n,children:r,...a}=t,l=n?.[e]?.[o]||i,u=s.useMemo((()=>a),Object.values(a));return(0,c.jsx)(l.Provider,{value:u,children:r})};function l(n,a){const l=a?.[e]?.[o]||i,u=s.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}return a.displayName=t+"Provider",[a,l]}const i=()=>{const t=n.map((e=>s.createContext(e)));return function(n){const r=n?.[e]||t;return s.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return i.scopeName=e,[r,Oe(i,...t)]}function Oe(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>{const i=n(e),o=i[`__scope${r}`];return{...t,...o}}),{});return s.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var Re=Boolean(globalThis?.document)?s.useLayoutEffect:()=>{},Fe=l["useId".toString()]||(()=>{}),Le=0;function Pe(e){const[t,n]=s.useState(Fe());return Re((()=>{e||n((e=>e??String(Le++)))}),[e]),e||(t?`radix-${t}`:"")}function Me(e){const t=s.useRef(e);return s.useEffect((()=>{t.current=e})),s.useMemo((()=>(...e)=>t.current?.(...e)),[])}function je({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Ve({defaultProp:t,onChange:n}),o=void 0!==e,a=o?e:r,l=Me(n),u=s.useCallback((t=>{if(o){const n=t,r="function"===typeof t?n(e):t;r!==e&&l(r)}else i(t)}),[o,e,i,l]);return[a,u]}function Ve({defaultProp:e,onChange:t}){const n=s.useState(e),[r]=n,i=s.useRef(r),o=Me(t);return s.useEffect((()=>{i.current!==r&&(o(r),i.current=r)}),[r,i,o]),n}var Ue=s.forwardRef(((e,t)=>{const{children:n,...r}=e,i=s.Children.toArray(n),o=i.find(ze);if(o){const e=o.props.children,n=i.map((t=>t===o?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t));return(0,c.jsx)(Be,{...r,ref:t,children:s.isValidElement(e)?s.cloneElement(e,void 0,n):null})}return(0,c.jsx)(Be,{...r,ref:t,children:n})}));Ue.displayName="Slot";var Be=s.forwardRef(((e,t)=>{const{children:n,...r}=e;if(s.isValidElement(n)){const e=Ye(n);return s.cloneElement(n,{...He(r,n.props),ref:t?Ne(t,e):e})}return s.Children.count(n)>1?s.Children.only(null):null}));Be.displayName="SlotClone";var qe=({children:e})=>(0,c.jsx)(c.Fragment,{children:e});function ze(e){return s.isValidElement(e)&&e.type===qe}function He(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Ye(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ge=$e.reduce(((e,t)=>{const n=s.forwardRef(((e,n)=>{const{asChild:r,...i}=e,o=r?Ue:t;return"undefined"!==typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,c.jsx)(o,{...i,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function We(e,t){e&&u.flushSync((()=>e.dispatchEvent(t)))}function Qe(e,t=globalThis?.document){const n=Me(e);s.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var Ke,Xe="DismissableLayer",Je="dismissableLayer.update",Ze="dismissableLayer.pointerDownOutside",et="dismissableLayer.focusOutside",tt=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nt=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...u}=e,d=s.useContext(tt),[f,p]=s.useState(null),h=f?.ownerDocument??globalThis?.document,[,m]=s.useState({}),v=Ae(t,(e=>p(e))),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),E=f?g.indexOf(f):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,x=E>=b,k=ot((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));x&&!n&&(i?.(e),a?.(e),e.defaultPrevented||l?.())}),h),_=at((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));n||(o?.(e),a?.(e),e.defaultPrevented||l?.())}),h);return Qe((e=>{const t=E===d.layers.size-1;t&&(r?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),h),s.useEffect((()=>{if(f)return n&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Ke=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),st(),()=>{n&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Ke)}}),[f,h,n,d]),s.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),st())}),[f,d]),s.useEffect((()=>{const e=()=>m({});return document.addEventListener(Je,e),()=>document.removeEventListener(Je,e)}),[]),(0,c.jsx)(Ge.div,{...u,ref:v,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Ce(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ce(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ce(e.onPointerDownCapture,k.onPointerDownCapture)})}));nt.displayName=Xe;var rt="DismissableLayerBranch",it=s.forwardRef(((e,t)=>{const n=s.useContext(tt),r=s.useRef(null),i=Ae(t,r);return s.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),(0,c.jsx)(Ge.div,{...e,ref:i})}));function ot(e,t=globalThis?.document){const n=Me(e),r=s.useRef(!1),i=s.useRef((()=>{}));return s.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){lt(Ze,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function at(e,t=globalThis?.document){const n=Me(e),r=s.useRef(!1);return s.useEffect((()=>{const e=e=>{if(e.target&&!r.current){const t={originalEvent:e};lt(et,n,t,{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function st(){const e=new CustomEvent(Je);document.dispatchEvent(e)}function lt(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?We(i,o):i.dispatchEvent(o)}it.displayName=rt;var ut="focusScope.autoFocusOnMount",ct="focusScope.autoFocusOnUnmount",dt={bubbles:!1,cancelable:!0},ft="FocusScope",pt=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[l,u]=s.useState(null),d=Me(i),f=Me(o),p=s.useRef(null),h=Ae(t,(e=>u(e))),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:Et(p.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Et(p.current,{select:!0}))},n=function(e){const t=document.activeElement;if(t===document.body)for(const n of e)n.removedNodes.length>0&&Et(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,m.paused]),s.useEffect((()=>{if(l){wt.add(m);const e=document.activeElement,t=l.contains(e);if(!t){const t=new CustomEvent(ut,dt);l.addEventListener(ut,d),l.dispatchEvent(t),t.defaultPrevented||(ht(_t(vt(l)),{select:!0}),document.activeElement===e&&Et(l))}return()=>{l.removeEventListener(ut,d),setTimeout((()=>{const t=new CustomEvent(ct,dt);l.addEventListener(ct,f),l.dispatchEvent(t),t.defaultPrevented||Et(e??document.body,{select:!0}),l.removeEventListener(ct,f),wt.remove(m)}),0)}}}),[l,d,f,m]);const v=s.useCallback((e=>{if(!n&&!r)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){const t=e.currentTarget,[r,o]=mt(t),a=r&&o;a?e.shiftKey||i!==o?e.shiftKey&&i===r&&(e.preventDefault(),n&&Et(o,{select:!0})):(e.preventDefault(),n&&Et(r,{select:!0})):i===t&&e.preventDefault()}}),[n,r,m.paused]);return(0,c.jsx)(Ge.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})}));function ht(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Et(r,{select:t}),document.activeElement!==n)return}function mt(e){const t=vt(e),n=gt(t,e),r=gt(t.reverse(),e);return[n,r]}function vt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});while(n.nextNode())t.push(n.currentNode);return t}function gt(e,t){for(const n of e)if(!yt(n,{upTo:t}))return n}function yt(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;while(e){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function bt(e){return e instanceof HTMLInputElement&&"select"in e}function Et(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&bt(e)&&t&&e.select()}}pt.displayName=ft;var wt=xt();function xt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=kt(e,t),e.unshift(t)},remove(t){e=kt(e,t),e[0]?.resume()}}}function kt(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function _t(e){return e.filter((e=>"A"!==e.tagName))}var Tt="Portal",Ct=s.forwardRef(((e,t)=>{const{container:n,...r}=e,[i,o]=s.useState(!1);Re((()=>o(!0)),[]);const a=n||i&&globalThis?.document?.body;return a?u.createPortal((0,c.jsx)(Ge.div,{...r,ref:t}),a):null}));Ct.displayName=Tt;function St(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return r??e}),e)}var Nt=e=>{const{present:t,children:n}=e,r=At(t),i="function"===typeof n?n({present:r.isPresent}):s.Children.only(n),o=Ae(r.ref,It(i)),a="function"===typeof n;return a||r.isPresent?s.cloneElement(i,{ref:o}):null};function At(e){const[t,n]=s.useState(),r=s.useRef({}),i=s.useRef(e),o=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=St(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=Dt(r.current);o.current="mounted"===l?e:"none"}),[l]),Re((()=>{const t=r.current,n=i.current,a=n!==e;if(a){const r=o.current,a=Dt(t);if(e)u("MOUNT");else if("none"===a||"none"===t?.display)u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,u]),Re((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=o=>{const a=Dt(r.current),s=a.includes(o.animationName);if(o.target===t&&s&&(u("ANIMATION_END"),!i.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=Dt(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function Dt(e){return e?.animationName||"none"}function It(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Nt.displayName="Presence";var Ot=0;function Rt(){s.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ft()),document.body.insertAdjacentElement("beforeend",e[1]??Ft()),Ot++,()=>{1===Ot&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Ot--}}),[])}function Ft(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Lt=function(e,t){return Lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Lt(e,t)};function Pt(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Lt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Mt=function(){return Mt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mt.apply(this,arguments)};function jt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;function Vt(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)a.push(r.value)}catch(Mp){i={error:Mp}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return a}function Ut(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var Bt="right-scroll-bar-position",qt="width-before-scroll-bar",zt="with-scroll-bars-hidden",Ht="--removed-body-scroll-bar-size";function Yt(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}function $t(e,t){var n=(0,s.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}var Gt="undefined"!==typeof window?s.useLayoutEffect:s.useEffect,Wt=new WeakMap;function Qt(e,t){var n=$t(t||null,(function(t){return e.forEach((function(e){return Yt(e,t)}))}));return Gt((function(){var t=Wt.get(n);if(t){var r=new Set(t),i=new Set(e),o=n.current;r.forEach((function(e){i.has(e)||Yt(e,null)})),i.forEach((function(e){r.has(e)||Yt(e,o)}))}Wt.set(n,e)}),[e]),n}function Kt(e){return e}function Xt(e,t){void 0===t&&(t=Kt);var n=[],r=!1,i={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(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){r=!0;while(n.length){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return i}function Jt(e){void 0===e&&(e={});var t=Xt(null);return t.options=Mt({async:!0,ssr:!1},e),t}var Zt=Jt(),en=function(){},tn=s.forwardRef((function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:en,onWheelCapture:en,onTouchMoveCapture:en}),i=r[0],o=r[1],a=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=e.gapMode,E=jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=p,x=Qt([n,t]),k=Mt(Mt({},E),i);return s.createElement(s.Fragment,null,d&&s.createElement(w,{sideCar:Zt,removeScrollBar:c,shards:f,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:b}),a?s.cloneElement(s.Children.only(l),Mt(Mt({},k),{ref:x})):s.createElement(y,Mt({},k,{className:u,ref:x}),l))}));tn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tn.classNames={fullWidth:qt,zeroRight:Bt};var nn,rn=function(e){var t=e.sideCar,n=jt(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 s.createElement(r,Mt({},n))};function on(e,t){return e.useMedium(t),rn}rn.isSideCarExport=!0;var an=function(){return nn||n.nc};function sn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=an();return t&&e.setAttribute("nonce",t),e}function ln(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function un(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cn=function(){var e=0,t=null;return{add:function(n){0==e&&(t=sn())&&(ln(t,n),un(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dn=function(){var e=cn();return function(t,n){s.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])}},fn=function(){var e=dn(),t=function(t){var n=t.styles,r=t.dynamic;return e(n,r),null};return t},pn={left:0,top:0,right:0,gap:0},hn=function(e){return parseInt(e||"",10)||0},mn=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[hn(n),hn(r),hn(i)]},vn=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return pn;var t=mn(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])}},gn=fn(),yn="data-scroll-locked",bn=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat(zt," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(yn,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Bt," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(qt," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Bt," .").concat(Bt," {\n right: 0 ").concat(r,";\n }\n \n .").concat(qt," .").concat(qt," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(yn,"] {\n ").concat(Ht,": ").concat(s,"px;\n }\n")},En=function(){var e=parseInt(document.body.getAttribute(yn)||"0",10);return isFinite(e)?e:0},wn=function(){s.useEffect((function(){return document.body.setAttribute(yn,(En()+1).toString()),function(){var e=En()-1;e<=0?document.body.removeAttribute(yn):document.body.setAttribute(yn,e.toString())}}),[])},xn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;wn();var o=s.useMemo((function(){return vn(i)}),[i]);return s.createElement(gn,{styles:bn(o,!t,i,n?"":"!important")})},kn=!1;if("undefined"!==typeof window)try{var _n=Object.defineProperty({},"passive",{get:function(){return kn=!0,!0}});window.addEventListener("test",_n,_n),window.removeEventListener("test",_n,_n)}catch(pO){kn=!1}var Tn=!!kn&&{passive:!1},Cn=function(e){return"TEXTAREA"===e.tagName},Sn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!Cn(e)&&"visible"===n[t])},Nn=function(e){return Sn(e,"overflowY")},An=function(e){return Sn(e,"overflowX")},Dn=function(e,t){var n=t.ownerDocument,r=t;do{"undefined"!==typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host);var i=Rn(e,r);if(i){var o=Fn(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},In=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},On=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Rn=function(e,t){return"v"===e?Nn(t):An(t)},Fn=function(e,t){return"v"===e?In(t):On(t)},Ln=function(e,t){return"h"===e&&"rtl"===t?-1:1},Pn=function(e,t,n,r,i){var o=Ln(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var p=Fn(e,s),h=p[0],m=p[1],v=p[2],g=m-v-o*h;(h||g)&&Rn(e,s)&&(d+=g,f+=h),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(i&&Math.abs(d)<1||!i&&a>d)||!c&&(i&&Math.abs(f)<1||!i&&-a>f))&&(u=!0),u},Mn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jn=function(e){return[e.deltaX,e.deltaY]},Vn=function(e){return e&&"current"in e?e.current:e},Un=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Bn=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},qn=0,zn=[];function Hn(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),i=s.useState(qn++)[0],o=s.useState(fn)[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=Ut([e.lockRef.current],(e.shards||[]).map(Vn),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var i,o=Mn(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],u="deltaY"in e?e.deltaY:s[1]-o[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=Dn(d,c);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=Dn(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=i),!i)return!0;var p=r.current||i;return Pn(p,t,e,"h"===p?l:u,!0)}),[]),u=s.useCallback((function(e){var n=e;if(zn.length&&zn[zn.length-1]===o){var r="deltaY"in n?jn(n):Mn(n),i=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Un(e.delta,r)}))[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var s=(a.current.shards||[]).map(Vn).filter(Boolean).filter((function(e){return e.contains(n.target)})),u=s.length>0?l(n,s[0]):!a.current.noIsolation;u&&n.cancelable&&n.preventDefault()}}}),[]),c=s.useCallback((function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:Yn(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),d=s.useCallback((function(e){n.current=Mn(e),r.current=void 0}),[]),f=s.useCallback((function(t){c(t.type,jn(t),t.target,l(t,e.lockRef.current))}),[]),p=s.useCallback((function(t){c(t.type,Mn(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return zn.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Tn),document.addEventListener("touchmove",u,Tn),document.addEventListener("touchstart",d,Tn),function(){zn=zn.filter((function(e){return e!==o})),document.removeEventListener("wheel",u,Tn),document.removeEventListener("touchmove",u,Tn),document.removeEventListener("touchstart",d,Tn)}}),[]);var h=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(o,{styles:Bn(i)}):null,h?s.createElement(xn,{gapMode:e.gapMode}):null)}function Yn(e){var t=null;while(null!==e)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var $n=on(Zt,Hn),Gn=s.forwardRef((function(e,t){return s.createElement(tn,Mt({},e,{ref:t,sideCar:$n}))}));Gn.classNames=tn.classNames;var Wn=Gn,Qn=function(e){if("undefined"===typeof document)return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kn=new WeakMap,Xn=new WeakMap,Jn={},Zn=0,er=function(e){return e&&(e.host||er(e.parentNode))},tr=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=er(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))},nr=function(e,t,n,r){var i=tr(t,Array.isArray(e)?e:[e]);Jn[n]||(Jn[n]=new WeakMap);var o=Jn[n],a=[],s=new Set,l=new Set(i),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};i.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(r),i=null!==t&&"false"!==t,l=(Kn.get(e)||0)+1,u=(o.get(e)||0)+1;Kn.set(e,l),o.set(e,u),a.push(e),1===l&&i&&Xn.set(e,!0),1===u&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}catch(d){console.error("aria-hidden: cannot operate on ",e,d)}}))};return c(t),s.clear(),Zn++,function(){a.forEach((function(e){var t=Kn.get(e)-1,i=o.get(e)-1;Kn.set(e,t),o.set(e,i),t||(Xn.has(e)||e.removeAttribute(r),Xn.delete(e)),i||e.removeAttribute(n)})),Zn--,Zn||(Kn=new WeakMap,Kn=new WeakMap,Xn=new WeakMap,Jn={})}},rr=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Qn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),nr(r,i,n,"aria-hidden")):function(){return null}},ir="Dialog",[or,ar]=Ie(ir),[sr,lr]=or(ir),ur=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=s.useRef(null),u=s.useRef(null),[d=!1,f]=je({prop:r,defaultProp:i,onChange:o});return(0,c.jsx)(sr,{scope:t,triggerRef:l,contentRef:u,contentId:Pe(),titleId:Pe(),descriptionId:Pe(),open:d,onOpenChange:f,onOpenToggle:s.useCallback((()=>f((e=>!e))),[f]),modal:a,children:n})};ur.displayName=ir;var cr="DialogTrigger",dr=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=lr(cr,n),o=Ae(t,i.triggerRe