@cyberskill/shared 1.186.0 → 1.187.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.cts +10 -90
- package/dist/_tsup-dts-rollup.d.ts +10 -90
- package/dist/node/cli/cli.util.cjs +1 -1
- package/dist/node/cli/cli.util.js +1 -1
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.js +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +1 -1
- package/dist/react/apollo-client/apollo-client.component.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.component.js +1 -1
- package/dist/react/apollo-client/index.cjs +1 -1
- package/dist/react/apollo-client/index.d.cts +4 -25
- package/dist/react/apollo-client/index.d.ts +4 -25
- package/dist/react/apollo-client/index.js +1 -1
- package/dist/react/apollo-error/apollo-error.component.cjs +1 -1
- package/dist/react/apollo-error/apollo-error.component.d.cts +1 -1
- package/dist/react/apollo-error/apollo-error.component.d.ts +1 -1
- package/dist/react/apollo-error/apollo-error.component.js +1 -1
- package/dist/react/apollo-error/apollo-error.type.d.cts +1 -0
- package/dist/react/apollo-error/apollo-error.type.d.ts +1 -0
- package/dist/react/apollo-error/index.cjs +1 -1
- package/dist/react/apollo-error/index.d.cts +2 -1
- package/dist/react/apollo-error/index.d.ts +2 -1
- package/dist/react/apollo-error/index.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.cts +6 -26
- package/dist/react/index.d.ts +6 -26
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(e){if(Array.isArray(e))return e}function t(r){if(Array.isArray(r))return e(r)}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(e,r,t,n,o,a,i){try{var u=e[a](i);var l=u.value}catch(e){t(e);return}if(u.done){r(l)}else{Promise.resolve(l).then(n,o)}}function a(e){return function(){var r=this,t=arguments;return new Promise(function(n,a){var i=e.apply(r,t);function u(e){o(i,n,a,u,l,"next",e)}function l(e){o(i,n,a,u,l,"throw",e)}u(undefined)})}}function i(e,r,t){r=E(r);return h(e,I()?Reflect.construct(r,t||[],E(e).constructor):r.apply(e,t))}function u(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function l(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function s(e,r,t){if(r)l(e.prototype,r);if(t)l(e,t);return e}function c(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function E(e){E=Object.setPrototypeOf?Object.getPrototypeOf:function e(e){return e.__proto__||Object.getPrototypeOf(e)};return E(e)}function f(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:true,configurable:true}});if(r)y(e,r)}function m(e,r){if(r!=null&&typeof Symbol!=="undefined"&&r[Symbol.hasInstance]){return!!r[Symbol.hasInstance](e)}else{return e instanceof r}}function d(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p(e,r){var t=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t==null)return;var n=[];var o=true;var a=false;var i,u;try{for(t=t.call(e);!(o=(i=t.next()).done);o=true){n.push(i.value);if(r&&n.length===r)break}}catch(e){a=true;u=e}finally{try{if(!o&&t["return"]!=null)t["return"]()}finally{if(a)throw u}}return n}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){c(e,r,t[r])})}return e}function A(e,r){if(e==null)return{};var t=O(e,r);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){n=a[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function O(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function h(e,r){if(r&&(T(r)==="object"||typeof r==="function")){return r}return n(e)}function y(e,r){y=Object.setPrototypeOf||function e(e,r){e.__proto__=r;return e};return y(e,r)}function g(e,t){return r(e)||p(e,t)||N(e,t)||v()}function b(e){return t(e)||d(e)||N(e)||S()}function T(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function N(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function D(e,r){var t,n,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=u(0),i["throw"]=u(1),i["return"]=u(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return l([e,r])}}function l(u){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(a=0)),a)try{if(t=1,n&&(o=u[0]&2?n["return"]:u[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;if(n=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:a.label++;return{value:u[1],done:false};case 5:a.label++;n=u[1];u=[0];continue;case 7:u=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){a=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(u[0]===6&&a.label<o[1]){a.label=o[1];o=u;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(u);break}if(o[2])a.ops.pop();a.trys.pop();continue}u=r.call(e,a)}catch(e){u=[6,e];n=0}finally{t=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}}var C=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var M=function(e,r,t){return r in e?C(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t};var G=function(e,r){return C(e,"name",{value:r,configurable:!0})};var P=function(e,r){for(var t in r)C(e,t,{get:r[t],enumerable:!0})},U=function(e,r,t,n){var o=true,a=false,i=undefined;if(r&&(typeof r==="undefined"?"undefined":T(r))=="object"||typeof r=="function")try{var u=function(){var o=s.value;!L.call(e,o)&&o!==t&&C(e,o,{get:function(){return r[o]},enumerable:!(n=R(r,o))||n.enumerable})};for(var l=w(r)[Symbol.iterator](),s;!(o=(s=l.next()).done);o=true)u()}catch(e){a=true;i=e}finally{try{if(!o&&l.return!=null){l.return()}}finally{if(a){throw i}}}return e},x=function(e,r,t){return U(e,r,"default"),t&&U(t,r,"default")};var k=function(e,r,t){return M(e,(typeof r==="undefined"?"undefined":T(r))!="symbol"?r+"":r,t)};var F={};P(F,{ApolloError:function(){return es},ApolloErrorContext:function(){return eu},ApolloErrorProvider:function(){return eA},ApolloProvider:function(){return eR},GRAPHQL_URI_DEFAULT:function(){return eN},Loading:function(){return ej},LoadingContext:function(){return ez},LoadingProvider:function(){return eJ},NEXT_INTL_DEFAULT_LANGUAGE:function(){return eK},NextIntlContext:function(){return e$},NextIntlProvider:function(){return rs},Toaster:function(){return eT},catchError:function(){return eg},initI18next:function(){return eU},log:function(){return ey},setGlobalApolloErrorCallback:function(){return eS},showGlobalApolloError:function(){return e_},storage:function(){return ra},toast:function(){return eb},useApolloError:function(){return eE},useLoading:function(){return eH},useNextIntl:function(){return e3},useStorage:function(){return ri},useTranslateI18next:function(){return eM},useTranslateNextIntl:function(){return e8},withNextIntl:function(){return e5}});var j={};P(j,{ApolloProvider:function(){return eR},GRAPHQL_URI_DEFAULT:function(){return eN}});import{ApolloClient as Q,ApolloError as z,InMemoryCache as q}from"@apollo/client/core/core.cjs";import{ApolloLink as H,from as V,split as B}from"@apollo/client/link/core/core.cjs";import{onError as Y}from"@apollo/client/link/error/error.cjs";import{HttpLink as W}from"@apollo/client/link/http/http.cjs";import{removeTypenameFromVariables as J}from"@apollo/client/link/remove-typename/remove-typename.cjs";import{GraphQLWsLink as X}from"@apollo/client/link/subscriptions/subscriptions.cjs";import{ApolloProvider as K}from"@apollo/client/react/react.cjs";import{getMainDefinition as Z}from"@apollo/client/utilities/utilities.cjs";import{createClient as $}from"graphql-ws";import ee,{useMemo as er}from"react";import{FaInfo as et}from"react-icons/fa6";import en,{use as eo}from"react";import{FaRepeat as ea}from"react-icons/fa6";import{createContext as ei}from"react";var eu=ei(void 0);var el={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54",main:"_main_8fveh_72",network:"_network_8fveh_75",extra:"_extra_8fveh_78"};function es(){var e=eo(eu),r=e===null||e===void 0?void 0:e.error;if(!r)return null;var t=G(function(e,r){return(r===null||r===void 0?void 0:r.length)?en.createElement("div",null,en.createElement("strong",null,e,":"),en.createElement("ul",null,r.map(function(e){return en.createElement("li",{key:e.message},e.message)}))):null},"renderErrorList");return en.createElement("div",{className:el["modal-backdrop"]},en.createElement("div",{className:el["modal-content"]},en.createElement("button",{type:"button",className:el["btn-close"],onClick:e.hideError},"✕"),en.createElement("div",{className:el["error-title"]},en.createElement("button",{type:"button",className:el["btn-retry"],onClick:G(function(){return window.location.reload()},"onClick")},en.createElement(ea,null))," ",r.message),en.createElement("div",{className:el["error-details"]},r.networkError&&en.createElement("pre",{className:"network"},en.createElement("strong",null,"Network Error:")," ",r.networkError.message),t("GraphQL Errors",b(r.graphQLErrors)),t("Protocol Errors",b(r.protocolErrors)),t("Client Errors",b(r.clientErrors)),r.extraInfo&&en.createElement("pre",{className:"extra"},en.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}G(es,"ApolloError");import{use as ec}from"react";function eE(){var e=ec(eu);if(!e)throw new Error("useApolloError must be used within ApolloErrorProvider");return e}G(eE,"useApolloError");import ef,{useEffect as em,useMemo as ed,useState as ep}from"react";var ev=null;function eS(e){ev=e}G(eS,"setGlobalApolloErrorCallback");function e_(e){ev===null||ev===void 0?void 0:ev(e)}G(e_,"showGlobalApolloError");function eA(e){var r=e.children;var t=g(ep(null),2),n=t[0],o=t[1];em(function(){eS(o)},[]);var a=ed(function(){return{error:n,showError:o,hideError:G(function(){return o(null)},"hideError")}},[n]);return ef.createElement(eu,{value:a},r)}G(eA,"ApolloErrorProvider");import{consola as eO}from"consola/browser";var eh={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var ey={silent:eO.silent,level:eO.level,fatal:eO.fatal,error:eO.error,warn:eO.warn,log:eO.log,info:eO.info,success:eO.success,ready:eO.ready,start:eO.start,box:eO.box,debug:eO.debug,trace:eO.trace,verbose:eO.verbose};function eg(e,r){var t=r!==null&&r!==void 0?r:{},n=t.shouldLog,o=n===void 0?!0:n,a=t.returnValue,i=t.callback,u=m(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&ey.error(u.message),i&&typeof i=="function"&&i(u),a||{success:!1,message:u.message,code:eh.INTERNAL_SERVER_ERROR.CODE}}G(eg,"catchError");import{toast as eb,Toaster as eT}from"react-hot-toast";var eN="/graphql";var eI,eD=(eI=/*#__PURE__*/function(e){"use strict";f(r,e);function r(){u(this,r);var e;e=i(this,r,arguments);k(e,"count",0);return e}s(r,[{key:"request",value:function e(e,r){var t=this;var n=Date.now();return this.count+=1,r(e).map(function(r){var o=Date.now()-n,a=e.operationName||"Unnamed";return ey.info("[Apollo] #".concat(t.count,": ").concat(a," (").concat(o,"ms)")),r})}}]);return r}(H),G(eI,"DevLoggerLink"),eI);function eC(e){var r=e.uri,t=e.wsUrl,n=e.customLinks,o=new eD,a=Y(function(e){var r=e.graphQLErrors,t=e.networkError,n=e.protocolErrors,o=e.operation;var a=(o===null||o===void 0?void 0:o.operationName)||"Unknown";if(r&&r.forEach(function(e){var r=e.message,t=e.locations,n=e.path;ey.error("[GraphQL error] ".concat(a,": ").concat(r,", Location: ").concat(JSON.stringify(t,null,4),", Path: ").concat(n))}),n&&n.forEach(function(e){var r=e.message,t=e.extensions;ey.error("[Protocol error]: ".concat(r,", Extensions: ").concat(JSON.stringify(t,null,4)))}),t&&ey.error("[Network error]: ".concat(t)),r||n||t){var i,u;var l=(r===null||r===void 0?void 0:(i=r[0])===null||i===void 0?void 0:i.message)||(n===null||n===void 0?void 0:(u=n[0])===null||u===void 0?void 0:u.message)||(t===null||t===void 0?void 0:t.message)||"Unexpected error",s=new z({graphQLErrors:r||[],protocolErrors:n||[],clientErrors:[],networkError:t||null,errorMessage:l,extraInfo:{operation:o}});eb.error(function(e){return ee.createElement(ee.Fragment,null,l,"\xa0",ee.createElement(et,{cursor:"pointer",onClick:G(function(){setTimeout(function(){e_(s)},0),eb.dismiss(e.id)},"onClick")}))})}}),i=J();r||ey.warn('[Apollo] No GraphQL URI provided — using "'.concat(eN,'" as default'));var u=new W({uri:r!==null&&r!==void 0?r:eN,credentials:"include"}),l=t?new X($({url:t})):H.empty(),s=m(l,H)?B(function(e){var r=e.query;var t=Z(r);return t.kind==="OperationDefinition"&&t.operation==="subscription"},l,u):u;return s===u&&t&&ey.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[o,a,i].concat(b(n!==null&&n!==void 0?n:[]),[s])}G(eC,"createApolloLinks");function eR(e){var r=e.isNextJS,t=e.options,n=e.children,o=e.client,a=e.provider,i=e.cache;var u=t||{},l=u.uri,s=u.wsUrl,c=u.customLinks,E=A(u,["uri","wsUrl","customLinks"]),f=o!==null&&o!==void 0?o:Q;if(typeof f!="function")throw new TypeError("Invalid ApolloClient provided. Ensure CustomClient is a class.");var d=a||K,p=er(function(){return V(eC({uri:l!==null&&l!==void 0?l:eN,wsUrl:s!==null&&s!==void 0?s:"",customLinks:c!==null&&c!==void 0?c:[]}))},[l,s,c]),v=er(function(){return m(i,q)?i:new q},[i]),S=er(function(){return new f(_({link:p,cache:v},E))},[f,p,v,E]),O=r?ee.createElement(d,{makeClient:G(function(){return S},"makeClient")},n):ee.createElement(d,{client:S},n);return ee.createElement(ee.Fragment,null,ee.createElement(eA,null,O,ee.createElement(es,null)),ee.createElement(eT,{position:"top-right"}))}G(eR,"ApolloProvider");x(j,ew);import*as ew from"@apollo/client/react/hooks/hooks.cjs";x(F,j);import{useTranslation as eL}from"react-i18next";var eM=eL;import eG from"i18next";import{initReactI18next as eP}from"react-i18next";function eU(e){return eG.use(eP).init(e)}G(eU,"initI18next");import ex from"clsx";import ek from"react";var eF={overlay:"_overlay_1srm8_1",fullscreen:"_fullscreen_1srm8_1",block:"_block_1srm8_2","overlay-fade-in":"_overlay-fade-in_1srm8_1",container:"_container_1srm8_28",ring:"_ring_1srm8_35",rotate1:"_rotate1_1srm8_1",rotate2:"_rotate2_1srm8_1",rotate3:"_rotate3_1srm8_1",rotate4:"_rotate4_1srm8_1",message:"_message_1srm8_64","text-fade":"_text-fade_1srm8_1"};function ej(e){var r=e.full,t=r===void 0?!1:r,n=e.block,o=n===void 0?!1:n,a=e.className,i=a===void 0?"":a,u=e.message,l=u===void 0?"Loading":u,s=A(e,["full","block","className","message"]);function c(){return ek.createElement("div",_({className:eF.container},s),ek.createElement("div",{className:eF.ring}),ek.createElement("div",{className:eF.ring}),ek.createElement("div",{className:eF.ring}),ek.createElement("div",{className:eF.ring}),l&&ek.createElement("div",{className:eF.message},l))}return G(c,"_renderLoading"),t?ek.createElement("div",{className:ex(eF.fullscreen,i)},c()):o?ek.createElement("div",{className:ex(eF.block,i)},c()):c()}G(ej,"Loading");import{createContext as eQ}from"react";var ez=eQ(void 0);import{use as eq}from"react";function eH(){var e=eq(ez);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}G(eH,"useLoading");import eV,{useCallback as eB,useMemo as eY,useState as eW}from"react";function eJ(e){var r=e.children;var t=g(eW(!1),2),n=t[0],o=t[1],a=g(eW(!1),2),i=a[0],u=a[1],l=eB(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;o(!0),u(e)},[]),s=eB(function(){o(!1),u(!1)},[]),c=eY(function(){return{isLoading:n,isGlobalLoading:i,showLoading:l,hideLoading:s}},[n,i,l,s]);return eV.createElement(ez,{value:c},n?eV.createElement(ej,{full:i}):r)}G(eJ,"LoadingProvider");import{enUS as eX}from"date-fns/locale";var eK={label:"English",value:"en",flag:"\uD83C\uDDFA\uD83C\uDDF8",adapterLocale:eX,icon:"flagpack:gb-nir",numberFormat:{code:"en-US",currency:"USD"},timezone:"America/New_York"};import{createContext as eZ}from"react";var e$=eZ(void 0);import{NextIntlClientProvider as e0}from"next-intl";import e1 from"react";import{useTranslations as e2}from"next-intl";import{use as e4}from"react";function e3(){var e=e4(e$);if(!e)throw new Error("useNextIntl must be used within a NextIntlProvider");return e}G(e3,"useNextIntl");var e8=e2;function e5(e){var r=G(function(r){var t;var n;var o=e3(),a=o.currentLanguage,i=r.messages,u=r.languages,l="en",s=i[(a===null||a===void 0?void 0:a.value)||l],c=(n=(t=u.find(function(e){return e.value===(a===null||a===void 0?void 0:a.value)}))===null||t===void 0?void 0:t.timezone)!==null&&n!==void 0?n:eK.timezone;return i?e1.createElement(e0,{locale:(a===null||a===void 0?void 0:a.value)||l,messages:s||null,timeZone:c},e1.createElement(e,r)):(ey.warn("Missing messages for language: ".concat((a===null||a===void 0?void 0:a.value)||l)),null)},"PageWithI18n");return r.displayName="withNextIntl(".concat(e.displayName||e.name||"Component",")"),r}G(e5,"withNextIntl");import e6,{useMemo as e7}from"react";import{useCallback as e9,useEffect as re,useState as rr}from"react";var rt={Date:{is:G(function(e){return m(e,Date)},"is"),serialize:G(function(e){return{__type:"Date",value:e.toISOString()}},"serialize"),deserialize:G(function(e){return new Date(e)},"deserialize")},Map:{is:G(function(e){return m(e,Map)},"is"),serialize:G(function(e){return{__type:"Map",value:Array.from(e.entries())}},"serialize"),deserialize:G(function(e){return new Map(e)},"deserialize")},Set:{is:G(function(e){return m(e,Set)},"is"),serialize:G(function(e){return{__type:"Set",value:Array.from(e)}},"serialize"),deserialize:G(function(e){return new Set(e)},"deserialize")},RegExp:{is:G(function(e){return m(e,RegExp)},"is"),serialize:G(function(e){return{__type:"RegExp",value:{source:e.source,flags:e.flags}}},"serialize"),deserialize:G(function(e){var r=e.source,t=e.flags;return new RegExp(r,t)},"deserialize")},BigInt:{is:G(function(e){return(typeof e==="undefined"?"undefined":T(e))=="bigint"},"is"),serialize:G(function(e){return{__type:"BigInt",value:e.toString()}},"serialize"),deserialize:G(function(e){return BigInt(e)},"deserialize")}},rn={serialize:function e(e){return JSON.stringify(e,function(e,r){var t=true,n=false,o=undefined;try{for(var a=Object.keys(rt)[Symbol.iterator](),i;!(t=(i=a.next()).done);t=true){var u=i.value;var l=rt[u];if(l.is(r))return l.serialize(r)}}catch(e){n=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw o}}}return r})},deserialize:function e(e){return JSON.parse(e,function(e,r){if(r&&(typeof r==="undefined"?"undefined":T(r))=="object"&&"__type"in r&&typeof r.__type=="string"){var t=r.__type,n=rt[t];if(n)return n.deserialize(r.value)}return r})}};import ro from"localforage";var ra={get:function e(e){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,ro.getItem(e)];case 1:return[2,t.sent()];case 2:r=t.sent();return[2,eg(r,{returnValue:null})];case 3:return[2]}})})()},set:function e(e,r){return a(function(){var t;return D(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,ro.setItem(e,r)];case 1:n.sent();return[3,3];case 2:t=n.sent();eg(t);return[3,3];case 3:return[2]}})})()},remove:function e(e){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,ro.removeItem(e)];case 1:t.sent();return[3,3];case 2:r=t.sent();eg(r);return[3,3];case 3:return[2]}})})()},keys:function e(){return a(function(){var e,r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,ro.keys()];case 1:return[2,(e=t.sent())!==null&&e!==void 0?e:[]];case 2:r=t.sent();return[2,eg(r,{returnValue:[]})];case 3:return[2]}})})()}};function ri(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rn;var n=g(rr(r),2),o=n[0],i=n[1],u=g(rr(!1),2),l=u[0],s=u[1];re(function(){var n=!0;return G(function(){return a(function(){var o,a,u,l;return D(this,function(c){switch(c.label){case 0:c.trys.push([0,6,7,8]);return[4,ra.get(e)];case 1:o=c.sent();if(!n)return[3,5];if(!(o!==null))return[3,2];a=t.deserialize(o);i(a);return[3,5];case 2:if(!(r!==void 0))return[3,4];u=t.serialize(r);return[4,ra.set(e,u)];case 3:c.sent(),i(r);return[3,5];case 4:i(void 0);c.label=5;case 5:return[3,8];case 6:l=c.sent();eg(l),n&&i(r);return[3,8];case 7:n&&s(!0);return[7];case 8:return[2]}})})()},"loadValue")(),function(){n=!1,s(!1)}},[e,r,t]),re(function(){if(!l)return;G(function(){return a(function(){var r,n;return D(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);if(!(o!==void 0))return[3,2];r=t.serialize(o);return[4,ra.set(e,r)];case 1:a.sent();a.label=2;case 2:return[3,4];case 3:n=a.sent();eg(n);return[3,4];case 4:return[2]}})})()},"saveValue")()},[o,e,t,l]);var c=e9(function(e){i(function(r){return typeof e=="function"?e(r):e})},[]),E=e9(function(){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,ra.remove(e)];case 1:t.sent(),i(void 0);return[3,3];case 2:r=t.sent();eg(r);return[3,3];case 3:return[2]}})})()},[e]);return{value:o,set:c,remove:E}}G(ri,"useStorage");function ru(e){var r=e.children;return e6.createElement(e6.Fragment,null,r)}G(ru,"LanguageWrapperBase");var rl=e5(ru);function rs(e){var r=e.children,t=e.languages,n=e.messages;var o=ri("lang",t[0]),a=o.value,i=o.set,u=e7(function(){return{languages:t,currentLanguage:a!==null&&a!==void 0?a:eK,setCurrentLanguage:i}},[t,i,a]);return e6.createElement(e$,{value:u},e6.createElement(rl,{languages:t,messages:n},r))}G(rs,"NextIntlProvider");export{es as ApolloError,eu as ApolloErrorContext,eA as ApolloErrorProvider,eR as ApolloProvider,eN as GRAPHQL_URI_DEFAULT,ej as Loading,ez as LoadingContext,eJ as LoadingProvider,eK as NEXT_INTL_DEFAULT_LANGUAGE,e$ as NextIntlContext,rs as NextIntlProvider,eT as Toaster,eg as catchError,eU as initI18next,ey as log,eS as setGlobalApolloErrorCallback,e_ as showGlobalApolloError,ra as storage,eb as toast,eE as useApolloError,eH as useLoading,e3 as useNextIntl,ri as useStorage,eM as useTranslateI18next,e8 as useTranslateNextIntl,e5 as withNextIntl};
|
|
1
|
+
function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(e){if(Array.isArray(e))return e}function t(r){if(Array.isArray(r))return e(r)}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(e,r,t,n,o,a,i){try{var l=e[a](i);var s=l.value}catch(e){t(e);return}if(l.done){r(s)}else{Promise.resolve(s).then(n,o)}}function a(e){return function(){var r=this,t=arguments;return new Promise(function(n,a){var i=e.apply(r,t);function l(e){o(i,n,a,l,s,"next",e)}function s(e){o(i,n,a,l,s,"throw",e)}l(undefined)})}}function i(e,r,t){r=E(r);return h(e,C()?Reflect.construct(r,t||[],E(e).constructor):r.apply(e,t))}function l(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function s(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function u(e,r,t){if(r)s(e.prototype,r);if(t)s(e,t);return e}function c(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function E(e){E=Object.setPrototypeOf?Object.getPrototypeOf:function e(e){return e.__proto__||Object.getPrototypeOf(e)};return E(e)}function f(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:true,configurable:true}});if(r)y(e,r)}function m(e,r){if(r!=null&&typeof Symbol!=="undefined"&&r[Symbol.hasInstance]){return!!r[Symbol.hasInstance](e)}else{return e instanceof r}}function d(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p(e,r){var t=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t==null)return;var n=[];var o=true;var a=false;var i,l;try{for(t=t.call(e);!(o=(i=t.next()).done);o=true){n.push(i.value);if(r&&n.length===r)break}}catch(e){a=true;l=e}finally{try{if(!o&&t["return"]!=null)t["return"]()}finally{if(a)throw l}}return n}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){c(e,r,t[r])})}return e}function O(e,r){if(e==null)return{};var t=A(e,r);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){n=a[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function A(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function h(e,r){if(r&&(T(r)==="object"||typeof r==="function")){return r}return n(e)}function y(e,r){y=Object.setPrototypeOf||function e(e,r){e.__proto__=r;return e};return y(e,r)}function g(e,t){return r(e)||p(e,t)||N(e,t)||v()}function b(e){return t(e)||d(e)||N(e)||S()}function T(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function N(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}function I(e,r){var t,n,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=l(0),i["throw"]=l(1),i["return"]=l(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(r){return s([e,r])}}function s(l){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(a=0)),a)try{if(t=1,n&&(o=l[0]&2?n["return"]:l[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;if(n=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;n=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(l[0]===6&&a.label<o[1]){a.label=o[1];o=l;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(l);break}if(o[2])a.ops.pop();a.trys.pop();continue}l=r.call(e,a)}catch(e){l=[6,e];n=0}finally{t=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}}var D=Object.defineProperty;var R=function(e,r,t){return r in e?D(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t};var M=function(e,r){return D(e,"name",{value:r,configurable:!0})};var w=function(e,r,t){return R(e,(typeof r==="undefined"?"undefined":T(r))!="symbol"?r+"":r,t)};import{ApolloClient as L,ApolloError as G,InMemoryCache as P}from"@apollo/client/core/core.cjs";import{ApolloLink as U,from as k,split as x}from"@apollo/client/link/core/core.cjs";import{onError as F}from"@apollo/client/link/error/error.cjs";import{HttpLink as Q}from"@apollo/client/link/http/http.cjs";import{removeTypenameFromVariables as j}from"@apollo/client/link/remove-typename/remove-typename.cjs";import{GraphQLWsLink as z}from"@apollo/client/link/subscriptions/subscriptions.cjs";import{ApolloProvider as q}from"@apollo/client/react/react.cjs";import{getMainDefinition as H}from"@apollo/client/utilities/utilities.cjs";import{createClient as B}from"graphql-ws";import V,{useMemo as Y}from"react";import{FaInfo as W}from"react-icons/fa6";import J,{use as K}from"react";import{FaRepeat as X}from"react-icons/fa6";import{createContext as Z}from"react";var $=Z(void 0);var ee={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54",main:"_main_8fveh_72",network:"_network_8fveh_75",extra:"_extra_8fveh_78"};function er(){var e=K($),r=e===null||e===void 0?void 0:e.error;if(!r)return null;var t=M(function(e,r){return(r===null||r===void 0?void 0:r.length)?J.createElement("div",null,J.createElement("strong",null,e,":"),J.createElement("ul",null,r.map(function(e){return J.createElement("li",{key:e.message},e.message)}))):null},"renderErrorList");return J.createElement("div",{className:ee["modal-backdrop"]},J.createElement("div",{className:ee["modal-content"]},J.createElement("button",{type:"button",className:ee["btn-close"],onClick:e.hideError},"✕"),J.createElement("div",{className:ee["error-title"]},J.createElement("button",{type:"button",className:ee["btn-retry"],onClick:M(function(){return window.location.reload()},"onClick")},J.createElement(X,null))," ",r.message),J.createElement("div",{className:ee["error-details"]},r.networkError&&J.createElement("pre",{className:"network"},J.createElement("strong",null,"Network Error:")," ",r.networkError.message),t("GraphQL Errors",b(r.graphQLErrors)),t("Protocol Errors",b(r.protocolErrors)),t("Client Errors",b(r.clientErrors)),r.extraInfo&&J.createElement("pre",{className:"extra"},J.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}M(er,"ApolloErrorComponent");import{use as et}from"react";function en(){var e=et($);if(!e)throw new Error("useApolloError must be used within ApolloErrorProvider");return e}M(en,"useApolloError");import eo,{useEffect as ea,useMemo as ei,useState as el}from"react";var es=null;function eu(e){es=e}M(eu,"setGlobalApolloErrorCallback");function ec(e){es===null||es===void 0?void 0:es(e)}M(ec,"showGlobalApolloError");function eE(e){var r=e.children;var t=g(el(null),2),n=t[0],o=t[1];ea(function(){eu(o)},[]);var a=ei(function(){return{error:n,showError:o,hideError:M(function(){return o(null)},"hideError")}},[n]);return eo.createElement($,{value:a},r)}M(eE,"ApolloErrorProvider");import{consola as ef}from"consola/browser";var em={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var ed={silent:ef.silent,level:ef.level,fatal:ef.fatal,error:ef.error,warn:ef.warn,log:ef.log,info:ef.info,success:ef.success,ready:ef.ready,start:ef.start,box:ef.box,debug:ef.debug,trace:ef.trace,verbose:ef.verbose};function ep(e,r){var t=r!==null&&r!==void 0?r:{},n=t.shouldLog,o=n===void 0?!0:n,a=t.returnValue,i=t.callback,l=m(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&ed.error(l.message),i&&typeof i=="function"&&i(l),a||{success:!1,message:l.message,code:em.INTERNAL_SERVER_ERROR.CODE}}M(ep,"catchError");import{toast as ev,Toaster as eS}from"react-hot-toast";var e_="/graphql";var eO,eA=(eO=/*#__PURE__*/function(e){"use strict";f(r,e);function r(){l(this,r);var e;e=i(this,r,arguments);w(e,"count",0);return e}u(r,[{key:"request",value:function e(e,r){var t=this;var n=Date.now();return this.count+=1,r(e).map(function(r){var o=Date.now()-n,a=e.operationName||"Unnamed";return ed.info("[Apollo] #".concat(t.count,": ").concat(a," (").concat(o,"ms)")),r})}}]);return r}(U),M(eO,"DevLoggerLink"),eO);function eh(e){var r=e.uri,t=e.wsUrl,n=e.customLinks,o=new eA,a=F(function(e){var r=e.graphQLErrors,t=e.networkError,n=e.protocolErrors,o=e.operation;var a=(o===null||o===void 0?void 0:o.operationName)||"Unknown";if(r&&r.forEach(function(e){var r=e.message,t=e.locations,n=e.path;ed.error("[GraphQL error] ".concat(a,": ").concat(r,", Location: ").concat(JSON.stringify(t,null,4),", Path: ").concat(n))}),n&&n.forEach(function(e){var r=e.message,t=e.extensions;ed.error("[Protocol error]: ".concat(r,", Extensions: ").concat(JSON.stringify(t,null,4)))}),t&&ed.error("[Network error]: ".concat(t)),r||n||t){var i,l;var s=(r===null||r===void 0?void 0:(i=r[0])===null||i===void 0?void 0:i.message)||(n===null||n===void 0?void 0:(l=n[0])===null||l===void 0?void 0:l.message)||(t===null||t===void 0?void 0:t.message)||"Unexpected error",u=new G({graphQLErrors:r||[],protocolErrors:n||[],clientErrors:[],networkError:t||null,errorMessage:s,extraInfo:{operation:o}});ev.error(function(e){return V.createElement(V.Fragment,null,s,"\xa0",V.createElement(W,{cursor:"pointer",onClick:M(function(){setTimeout(function(){ec(u)},0),ev.dismiss(e.id)},"onClick")}))})}}),i=j();r||ed.warn('[Apollo] No GraphQL URI provided — using "'.concat(e_,'" as default'));var l=new Q({uri:r!==null&&r!==void 0?r:e_,credentials:"include"}),s=t?new z(B({url:t})):U.empty(),u=m(s,U)?x(function(e){var r=e.query;var t=H(r);return t.kind==="OperationDefinition"&&t.operation==="subscription"},s,l):l;return u===l&&t&&ed.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[o,a,i].concat(b(n!==null&&n!==void 0?n:[]),[u])}M(eh,"createApolloLinks");function ey(e){var r=e.isNextJS,t=e.options,n=e.children,o=e.client,a=e.provider,i=e.cache;var l=t||{},s=l.uri,u=l.wsUrl,c=l.customLinks,E=O(l,["uri","wsUrl","customLinks"]),f=o!==null&&o!==void 0?o:L;if(typeof f!="function")throw new TypeError("Invalid ApolloClient provided. Ensure CustomClient is a class.");var d=a||q,p=Y(function(){return k(eh({uri:s!==null&&s!==void 0?s:e_,wsUrl:u!==null&&u!==void 0?u:"",customLinks:c!==null&&c!==void 0?c:[]}))},[s,u,c]),v=Y(function(){return m(i,P)?i:new P},[i]),S=Y(function(){return new f(_({link:p,cache:v},E))},[f,p,v,E]),A=r?V.createElement(d,{makeClient:M(function(){return S},"makeClient")},n):V.createElement(d,{client:S},n);return V.createElement(V.Fragment,null,V.createElement(eE,null,A,V.createElement(er,null)),V.createElement(eS,{position:"top-right"}))}M(ey,"ApolloProvider");import{useLazyQuery as eg,useMutation as eb,useQuery as eT,useSubscription as eN}from"@apollo/client/react/hooks/hooks.cjs";import{useTranslation as eC}from"react-i18next";var eI=eC;import eD from"i18next";import{initReactI18next as eR}from"react-i18next";function eM(e){return eD.use(eR).init(e)}M(eM,"initI18next");import ew from"clsx";import eL from"react";var eG={overlay:"_overlay_1srm8_1",fullscreen:"_fullscreen_1srm8_1",block:"_block_1srm8_2","overlay-fade-in":"_overlay-fade-in_1srm8_1",container:"_container_1srm8_28",ring:"_ring_1srm8_35",rotate1:"_rotate1_1srm8_1",rotate2:"_rotate2_1srm8_1",rotate3:"_rotate3_1srm8_1",rotate4:"_rotate4_1srm8_1",message:"_message_1srm8_64","text-fade":"_text-fade_1srm8_1"};function eP(e){var r=e.full,t=r===void 0?!1:r,n=e.block,o=n===void 0?!1:n,a=e.className,i=a===void 0?"":a,l=e.message,s=l===void 0?"Loading":l,u=O(e,["full","block","className","message"]);function c(){return eL.createElement("div",_({className:eG.container},u),eL.createElement("div",{className:eG.ring}),eL.createElement("div",{className:eG.ring}),eL.createElement("div",{className:eG.ring}),eL.createElement("div",{className:eG.ring}),s&&eL.createElement("div",{className:eG.message},s))}return M(c,"_renderLoading"),t?eL.createElement("div",{className:ew(eG.fullscreen,i)},c()):o?eL.createElement("div",{className:ew(eG.block,i)},c()):c()}M(eP,"Loading");import{createContext as eU}from"react";var ek=eU(void 0);import{use as ex}from"react";function eF(){var e=ex(ek);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}M(eF,"useLoading");import eQ,{useCallback as ej,useMemo as ez,useState as eq}from"react";function eH(e){var r=e.children;var t=g(eq(!1),2),n=t[0],o=t[1],a=g(eq(!1),2),i=a[0],l=a[1],s=ej(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;o(!0),l(e)},[]),u=ej(function(){o(!1),l(!1)},[]),c=ez(function(){return{isLoading:n,isGlobalLoading:i,showLoading:s,hideLoading:u}},[n,i,s,u]);return eQ.createElement(ek,{value:c},n?eQ.createElement(eP,{full:i}):r)}M(eH,"LoadingProvider");import{enUS as eB}from"date-fns/locale";var eV={label:"English",value:"en",flag:"\uD83C\uDDFA\uD83C\uDDF8",adapterLocale:eB,icon:"flagpack:gb-nir",numberFormat:{code:"en-US",currency:"USD"},timezone:"America/New_York"};import{createContext as eY}from"react";var eW=eY(void 0);import{NextIntlClientProvider as eJ}from"next-intl";import eK from"react";import{useTranslations as eX}from"next-intl";import{use as eZ}from"react";function e$(){var e=eZ(eW);if(!e)throw new Error("useNextIntl must be used within a NextIntlProvider");return e}M(e$,"useNextIntl");var e0=eX;function e1(e){var r=M(function(r){var t;var n;var o=e$(),a=o.currentLanguage,i=r.messages,l=r.languages,s="en",u=i[(a===null||a===void 0?void 0:a.value)||s],c=(n=(t=l.find(function(e){return e.value===(a===null||a===void 0?void 0:a.value)}))===null||t===void 0?void 0:t.timezone)!==null&&n!==void 0?n:eV.timezone;return i?eK.createElement(eJ,{locale:(a===null||a===void 0?void 0:a.value)||s,messages:u||null,timeZone:c},eK.createElement(e,r)):(ed.warn("Missing messages for language: ".concat((a===null||a===void 0?void 0:a.value)||s)),null)},"PageWithI18n");return r.displayName="withNextIntl(".concat(e.displayName||e.name||"Component",")"),r}M(e1,"withNextIntl");import e2,{useMemo as e4}from"react";import{useCallback as e3,useEffect as e8,useState as e5}from"react";var e6={Date:{is:M(function(e){return m(e,Date)},"is"),serialize:M(function(e){return{__type:"Date",value:e.toISOString()}},"serialize"),deserialize:M(function(e){return new Date(e)},"deserialize")},Map:{is:M(function(e){return m(e,Map)},"is"),serialize:M(function(e){return{__type:"Map",value:Array.from(e.entries())}},"serialize"),deserialize:M(function(e){return new Map(e)},"deserialize")},Set:{is:M(function(e){return m(e,Set)},"is"),serialize:M(function(e){return{__type:"Set",value:Array.from(e)}},"serialize"),deserialize:M(function(e){return new Set(e)},"deserialize")},RegExp:{is:M(function(e){return m(e,RegExp)},"is"),serialize:M(function(e){return{__type:"RegExp",value:{source:e.source,flags:e.flags}}},"serialize"),deserialize:M(function(e){var r=e.source,t=e.flags;return new RegExp(r,t)},"deserialize")},BigInt:{is:M(function(e){return(typeof e==="undefined"?"undefined":T(e))=="bigint"},"is"),serialize:M(function(e){return{__type:"BigInt",value:e.toString()}},"serialize"),deserialize:M(function(e){return BigInt(e)},"deserialize")}},e7={serialize:function e(e){return JSON.stringify(e,function(e,r){var t=true,n=false,o=undefined;try{for(var a=Object.keys(e6)[Symbol.iterator](),i;!(t=(i=a.next()).done);t=true){var l=i.value;var s=e6[l];if(s.is(r))return s.serialize(r)}}catch(e){n=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw o}}}return r})},deserialize:function e(e){return JSON.parse(e,function(e,r){if(r&&(typeof r==="undefined"?"undefined":T(r))=="object"&&"__type"in r&&typeof r.__type=="string"){var t=r.__type,n=e6[t];if(n)return n.deserialize(r.value)}return r})}};import e9 from"localforage";var re={get:function e(e){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e9.getItem(e)];case 1:return[2,t.sent()];case 2:r=t.sent();return[2,ep(r,{returnValue:null})];case 3:return[2]}})})()},set:function e(e,r){return a(function(){var t;return I(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,e9.setItem(e,r)];case 1:n.sent();return[3,3];case 2:t=n.sent();ep(t);return[3,3];case 3:return[2]}})})()},remove:function e(e){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e9.removeItem(e)];case 1:t.sent();return[3,3];case 2:r=t.sent();ep(r);return[3,3];case 3:return[2]}})})()},keys:function e(){return a(function(){var e,r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e9.keys()];case 1:return[2,(e=t.sent())!==null&&e!==void 0?e:[]];case 2:r=t.sent();return[2,ep(r,{returnValue:[]})];case 3:return[2]}})})()}};function rr(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e7;var n=g(e5(r),2),o=n[0],i=n[1],l=g(e5(!1),2),s=l[0],u=l[1];e8(function(){var n=!0;return M(function(){return a(function(){var o,a,l,s;return I(this,function(c){switch(c.label){case 0:c.trys.push([0,6,7,8]);return[4,re.get(e)];case 1:o=c.sent();if(!n)return[3,5];if(!(o!==null))return[3,2];a=t.deserialize(o);i(a);return[3,5];case 2:if(!(r!==void 0))return[3,4];l=t.serialize(r);return[4,re.set(e,l)];case 3:c.sent(),i(r);return[3,5];case 4:i(void 0);c.label=5;case 5:return[3,8];case 6:s=c.sent();ep(s),n&&i(r);return[3,8];case 7:n&&u(!0);return[7];case 8:return[2]}})})()},"loadValue")(),function(){n=!1,u(!1)}},[e,r,t]),e8(function(){if(!s)return;M(function(){return a(function(){var r,n;return I(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);if(!(o!==void 0))return[3,2];r=t.serialize(o);return[4,re.set(e,r)];case 1:a.sent();a.label=2;case 2:return[3,4];case 3:n=a.sent();ep(n);return[3,4];case 4:return[2]}})})()},"saveValue")()},[o,e,t,s]);var c=e3(function(e){i(function(r){return typeof e=="function"?e(r):e})},[]),E=e3(function(){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,re.remove(e)];case 1:t.sent(),i(void 0);return[3,3];case 2:r=t.sent();ep(r);return[3,3];case 3:return[2]}})})()},[e]);return{value:o,set:c,remove:E}}M(rr,"useStorage");function rt(e){var r=e.children;return e2.createElement(e2.Fragment,null,r)}M(rt,"LanguageWrapperBase");var rn=e1(rt);function ro(e){var r=e.children,t=e.languages,n=e.messages;var o=rr("lang",t[0]),a=o.value,i=o.set,l=e4(function(){return{languages:t,currentLanguage:a!==null&&a!==void 0?a:eV,setCurrentLanguage:i}},[t,i,a]);return e2.createElement(eW,{value:l},e2.createElement(rn,{languages:t,messages:n},r))}M(ro,"NextIntlProvider");export{er as ApolloErrorComponent,$ as ApolloErrorContext,eE as ApolloErrorProvider,ey as ApolloProvider,e_ as GRAPHQL_URI_DEFAULT,eP as Loading,ek as LoadingContext,eH as LoadingProvider,eV as NEXT_INTL_DEFAULT_LANGUAGE,eW as NextIntlContext,ro as NextIntlProvider,eS as Toaster,ep as catchError,eM as initI18next,ed as log,eu as setGlobalApolloErrorCallback,ec as showGlobalApolloError,re as storage,ev as toast,en as useApolloError,eg as useLazyQuery,eF as useLoading,eb as useMutation,e$ as useNextIntl,eT as useQuery,rr as useStorage,eN as useSubscription,eI as useTranslateI18next,e0 as useTranslateNextIntl,e1 as withNextIntl};
|