@ikas/storefront 2.0.0-alpha.8 → 2.0.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/build/__generated__/global-types.d.ts +10 -2
- package/build/__generated__/global-types.js +1 -1
- package/build/analytics/facebookPixel.js +1 -1
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.js +1 -1
- package/build/api/apollo.js +1 -1
- package/build/api/blog/__generated__/getBlog.d.ts +14 -16
- package/build/api/blog/__generated__/listBlog.d.ts +14 -16
- package/build/api/blog/__generated__/listBlogCategory.d.ts +14 -16
- package/build/api/blog/__generated__/listBlogMetaData.d.ts +14 -16
- package/build/api/brand/__generated__/listProductBrand.d.ts +3 -3
- package/build/api/cart/__generated__/getCart.d.ts +2 -4
- package/build/api/cart/__generated__/saveItemToCart.d.ts +2 -4
- package/build/api/category/__generated__/listCategory.d.ts +3 -3
- package/build/api/checkout/__generated__/getCheckoutById.d.ts +2 -4
- package/build/api/checkout/__generated__/getOrder.d.ts +5 -11
- package/build/api/checkout/__generated__/listCheckoutSettings.d.ts +1 -1
- package/build/api/checkout/index.js +1 -1
- package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +5 -11
- package/build/api/customer/__generated__/customerLogin.d.ts +12 -5
- package/build/api/customer/__generated__/customerSocialLogin.d.ts +161 -0
- package/build/api/customer/__generated__/getCustomerOrders.d.ts +5 -11
- package/build/api/customer/__generated__/getMyCustomer.d.ts +4 -5
- package/build/api/customer/__generated__/registerCustomer.d.ts +12 -5
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +12 -5
- package/build/api/customer/index.d.ts +5 -0
- package/build/api/customer/index.js +1 -1
- package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +14 -16
- package/build/api/product-option-set/index.js +1 -1
- package/build/api/raffle/__generated__/getRafflesByCustomerId.d.ts +3 -0
- package/build/api/raffle/__generated__/listRaffle.d.ts +14 -16
- package/build/api/raffle/__generated__/saveRaffleParticipant.d.ts +2 -2
- package/build/api/raffle/index.d.ts +1 -1
- package/build/api/raffle/index.js +1 -1
- package/build/api/variant-type/__generated__/listVariantType.d.ts +3 -7
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +8 -0
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/step-container/index.js +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +2 -0
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/installments/index.js +1 -1
- package/build/components/checkout/steps/step-shipping/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/index.d.ts +1 -1
- package/build/components/page/ThemeComponent.js +1 -1
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.d.ts +0 -3
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/index.d.ts +3 -1
- package/build/components/page-editor/index.js +1 -1
- package/build/components/page-editor/loader/index.d.ts +5 -1
- package/build/components/page-editor/loader/index.js +1 -1
- package/build/components/page-editor/loader/style.module.scss.js +1 -1
- package/build/components/page-editor/model.d.ts +8 -4
- package/build/components/page-editor/model.js +1 -1
- package/build/ext/@apollo/client/cache/inmemory/entityStore.js +1 -1
- package/build/ext/@apollo/client/cache/inmemory/inMemoryCache.js +1 -1
- package/build/ext/@apollo/client/cache/inmemory/policies.js +1 -1
- package/build/ext/@apollo/client/cache/inmemory/readFromStore.js +1 -1
- package/build/ext/@apollo/client/cache/inmemory/writeToStore.js +1 -1
- package/build/ext/@apollo/client/core/ApolloClient.js +1 -1
- package/build/ext/@apollo/client/core/LocalState.js +1 -1
- package/build/ext/@apollo/client/core/ObservableQuery.js +1 -1
- package/build/ext/@apollo/client/core/QueryManager.js +1 -1
- package/build/ext/@apollo/client/errors/index.js +1 -1
- package/build/ext/@apollo/client/ext/tslib/tslib.es6.js +15 -0
- package/build/ext/@apollo/client/link/context/index.js +1 -1
- package/build/ext/@apollo/client/link/core/ApolloLink.js +1 -1
- package/build/ext/@apollo/client/link/error/index.js +1 -1
- package/build/ext/@apollo/client/link/http/HttpLink.js +1 -1
- package/build/ext/@apollo/client/link/http/createHttpLink.js +1 -1
- package/build/ext/@apollo/client/link/http/selectHttpOptionsAndBody.js +1 -1
- package/build/ext/@apollo/client/link/utils/createOperation.js +1 -1
- package/build/ext/@apollo/client/utilities/common/mergeDeep.js +1 -1
- package/build/ext/@apollo/client/utilities/graphql/fragments.js +1 -1
- package/build/ext/@apollo/client/utilities/graphql/transform.js +1 -1
- package/build/ext/@apollo/client/utilities/observables/Concast.js +1 -1
- package/build/ext/ts-invariant/ext/tslib/tslib.es6.js +15 -0
- package/build/ext/ts-invariant/lib/invariant.esm.js +1 -1
- package/build/ext/tslib/tslib.es6.js +1 -1
- package/build/ikas.js +67 -2
- package/build/index.js +1 -1
- package/build/models/data/blog/index.js +1 -1
- package/build/models/data/brand/index.js +1 -1
- package/build/models/data/category/index.js +1 -1
- package/build/models/data/checkout/index.js +1 -1
- package/build/models/data/checkout-settings/index.d.ts +1 -1
- package/build/models/data/checkout-settings/index.js +1 -1
- package/build/models/data/customer/address/index.d.ts +4 -1
- package/build/models/data/customer/address/index.js +1 -1
- package/build/models/data/image/index.js +1 -1
- package/build/models/data/index.d.ts +1 -0
- package/build/models/data/language/index.d.ts +6 -0
- package/build/models/data/order/address/index.d.ts +2 -1
- package/build/models/data/order/address/index.js +1 -1
- package/build/models/data/order/line-item/variant/index.js +1 -1
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/product-filter/index.js +1 -1
- package/build/models/data/product-option-set/index.d.ts +4 -0
- package/build/models/data/product-option-set/index.js +1 -1
- package/build/models/data/raffle/index.d.ts +2 -1
- package/build/models/data/raffle/index.js +1 -1
- package/build/models/data/slider/index.d.ts +5 -0
- package/build/models/data/slider/index.js +1 -0
- package/build/models/theme/component/index.d.ts +9 -0
- package/build/models/theme/component/index.js +1 -1
- package/build/models/theme/component/prop/index.d.ts +21 -0
- package/build/models/theme/component/prop/index.js +1 -1
- package/build/models/theme/custom-data/index.d.ts +20 -1
- package/build/models/theme/custom-data/index.js +1 -1
- package/build/models/theme/settings/color/index.d.ts +14 -0
- package/build/models/theme/settings/color/index.js +1 -0
- package/build/models/theme/settings/{prop/favicon → favicon}/index.d.ts +0 -0
- package/build/models/theme/settings/{prop/favicon → favicon}/index.js +0 -0
- package/build/models/theme/settings/font-family/index.d.ts +5 -0
- package/build/models/theme/settings/font-family/index.js +1 -0
- package/build/models/theme/settings/index.d.ts +4 -2
- package/build/models/theme/settings/index.js +1 -1
- package/build/models/ui/product-detail/index.js +1 -1
- package/build/models/ui/product-list/index.d.ts +1 -1
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/pages/editor.d.ts +4 -3
- package/build/pages/editor.js +1 -1
- package/build/providers/page-data-get.d.ts +1 -1
- package/build/providers/page-data-get.js +1 -1
- package/build/providers/page-data-init.d.ts +3 -1
- package/build/providers/page-data-init.js +1 -1
- package/build/providers/page-data-next.d.ts +2 -1
- package/build/providers/page-data-next.js +1 -1
- package/build/providers/prop-value/custom.d.ts +1 -0
- package/build/providers/prop-value/custom.js +1 -1
- package/build/providers/prop-value/slider.d.ts +11 -0
- package/build/providers/prop-value/slider.js +1 -0
- package/build/scripts/generators/components/index.js +1 -1
- package/build/scripts/generators/config/content.d.ts +2 -3
- package/build/scripts/generators/config/content.js +1 -1
- package/build/scripts/generators/config/index.js +1 -1
- package/build/scripts/generators/index.d.ts +1 -0
- package/build/scripts/generators/pages/index.js +1 -1
- package/build/scripts/generators/store/index.js +1 -1
- package/build/scripts/generators/theme/index.js +1 -1
- package/build/scripts/generators/types/index.d.ts +15 -0
- package/build/scripts/generators/types/index.js +1 -0
- package/build/store/cart.d.ts +6 -7
- package/build/store/cart.js +1 -1
- package/build/store/customer.d.ts +19 -0
- package/build/store/customer.js +1 -1
- package/build/storefront/index.d.ts +5 -3
- package/build/storefront/index.js +1 -1
- package/build/utils/fs.js +1 -1
- package/build/utils/google-fonts.d.ts +2 -0
- package/build/utils/google-fonts.js +1 -0
- package/package.json +9 -9
- package/build/models/theme/settings/prop/color/index.d.ts +0 -7
- package/build/models/theme/settings/prop/color/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__assign as r}from"../../../tslib/tslib.es6.js";import{InvariantError as o,invariant as i}from"../../../ts-invariant/lib/invariant.esm.js";import n from"../../../@wry/equality/lib/equality.esm.js";import"../link/core/ApolloLink.js";import{execute as a}from"../link/core/execute.js";import{hasClientExports as s}from"../utilities/graphql/directives.js";import{getOperationName as u,getDefaultValues as c,getOperationDefinition as l}from"../utilities/graphql/getFromAST.js";import{removeConnectionDirectiveFromDocument as h}from"../utilities/graphql/transform.js";import"../utilities/common/mergeDeep.js";import"../utilities/observables/Observable.js";import{asyncMap as p}from"../utilities/observables/asyncMap.js";import{Concast as f}from"../utilities/observables/Concast.js";import{isNonEmptyArray as y}from"../utilities/common/arrays.js";import{graphQLResultHasError as d}from"../utilities/common/errorHandling.js";import{canUseWeakMap as v}from"../utilities/common/canUse.js";import{ApolloError as m,isApolloError as b}from"../errors/index.js";import{ObservableQuery as g}from"./ObservableQuery.js";import{NetworkStatus as w,isNetworkRequestInFlight as q}from"./networkStatus.js";import{LocalState as Q}from"./LocalState.js";import{shouldWriteResult as k,QueryInfo as E}from"./QueryInfo.js";import O from"../../../zen-observable/index.js";var S=Object.prototype.hasOwnProperty,P=function(){function P(e){var t=e.cache,r=e.link,o=e.queryDeduplication,i=void 0!==o&&o,n=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,u=e.clientAwareness,c=void 0===u?{}:u,l=e.localState,h=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(v?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.queryDeduplication=i,this.clientAwareness=c,this.localState=l||new Q({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!h,(this.onBroadcast=n)&&(this.mutationStore=Object.create(null))}return P.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches("production"===process.env.NODE_ENV?new o(12):new o("QueryManager stopped while query was in flight"))},P.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},P.prototype.mutate=function(o){var n=o.mutation,a=o.variables,s=o.optimisticResponse,u=o.updateQueries,c=o.refetchQueries,l=void 0===c?[]:c,h=o.awaitRefetchQueries,p=void 0!==h&&h,f=o.update,v=o.errorPolicy,b=void 0===v?"none":v,g=o.fetchPolicy,w=o.context,q=void 0===w?{}:w;return e(this,void 0,void 0,(function(){var e,o,c;return t(this,(function(t){switch(t.label){case 0:return"production"===process.env.NODE_ENV?i(n,13):i(n,"mutation option is required. You must specify your GraphQL document in the mutation option."),"production"===process.env.NODE_ENV?i(!g||"no-cache"===g,14):i(!g||"no-cache"===g,"Mutations only support a 'no-cache' fetchPolicy. If you don't want to disable the cache, remove your fetchPolicy setting to proceed with the default mutation behavior."),e=this.generateMutationId(),n=this.transform(n).document,a=this.getVariables(n,a),this.transform(n).hasClientExports?[4,this.localState.addExportedVariables(n,a,q)]:[3,2];case 1:a=t.sent(),t.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[e]={mutation:n,variables:a,loading:!0,error:null}),s&&this.markMutationOptimistic(s,{mutationId:e,document:n,variables:a,errorPolicy:b,updateQueries:u,update:f}),this.broadcastQueries(),c=this,[2,new Promise((function(t,i){var h,v;c.getObservableFromLink(n,r(r({},q),{optimisticResponse:s}),a,!1).subscribe({next:function(t){if(d(t)&&"none"===b)v=new m({graphQLErrors:t.errors});else{if(o&&(o.loading=!1,o.error=null),"no-cache"!==g)try{c.markMutationResult({mutationId:e,result:t,document:n,variables:a,errorPolicy:b,updateQueries:u,update:f})}catch(e){return void(v=new m({networkError:e}))}h=t}},error:function(t){o&&(o.loading=!1,o.error=t),s&&c.cache.removeOptimistic(e),c.broadcastQueries(),i(new m({networkError:t}))},complete:function(){if(v&&o&&(o.loading=!1,o.error=v),s&&c.cache.removeOptimistic(e),c.broadcastQueries(),v)i(v);else{"function"==typeof l&&(l=l(h));var r=[];y(l)&&l.forEach((function(e){if("string"==typeof e)c.queries.forEach((function(t){var o=t.observableQuery;o&&o.queryName===e&&r.push(o.refetch())}));else{var t={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(t.context=e.context),r.push(c.query(t))}})),Promise.all(p?r:[]).then((function(){"ignore"===b&&h&&d(h)&&delete h.errors,t(h)}),i)}}})}))]}}))}))},P.prototype.markMutationResult=function(e,t){var r=this;if(void 0===t&&(t=this.cache),k(e.result,e.errorPolicy)){var o=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],i=e.updateQueries;i&&this.queries.forEach((function(n,a){var s=n.observableQuery,c=s&&s.queryName;if(c&&S.call(i,c)){var l=i[c],h=r.queries.get(a),p=h.document,f=h.variables,y=t.diff({query:p,variables:f,returnPartialData:!0,optimistic:!1}),d=y.result;if(y.complete&&d){var v=l(d,{mutationResult:e.result,queryName:p&&u(p)||void 0,queryVariables:f});v&&o.push({result:v,dataId:"ROOT_QUERY",query:p,variables:f})}}})),t.performTransaction((function(t){o.forEach((function(e){return t.write(e)}));var r=e.update;r&&r(t,e.result)}),null)}},P.prototype.markMutationOptimistic=function(e,t){var o=this,n="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{o.markMutationResult(r(r({},t),{result:{data:n}}),e)}catch(e){"production"===process.env.NODE_ENV||i.error(e)}}),t.mutationId)},P.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},P.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},P.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},P.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),o=h(this.cache.transformForLink(r)),i=this.localState.clientQuery(r),n=o&&this.localState.serverQuery(o),a={document:r,hasClientExports:s(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:i,serverQuery:n,defaultVars:c(l(r))},u=function(e){e&&!t.has(e)&&t.set(e,a)};u(e),u(r),u(i),u(n)}return t.get(e)},P.prototype.getVariables=function(e,t){return r(r({},this.transform(e).defaultVars),t)},P.prototype.watchQuery=function(e){void 0===(e=r(r({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new E(this.cache),o=new g({queryManager:this,queryInfo:t,options:e});return this.queries.set(o.queryId,t),t.init({document:e.query,observableQuery:o,variables:e.variables}),o},P.prototype.query=function(e){var t=this;"production"===process.env.NODE_ENV?i(e.query,15):i(e.query,"query option is required. You must specify your GraphQL document in the query option."),"production"===process.env.NODE_ENV?i("Document"===e.query.kind,16):i("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'),"production"===process.env.NODE_ENV?i(!e.returnPartialData,17):i(!e.returnPartialData,"returnPartialData option only supported on watchQuery."),"production"===process.env.NODE_ENV?i(!e.pollInterval,18):i(!e.pollInterval,"pollInterval option only supported on watchQuery.");var r=this.generateQueryId();return this.fetchQuery(r,e).finally((function(){return t.stopQuery(r)}))},P.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},P.prototype.generateRequestId=function(){return this.requestIdCounter++},P.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},P.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},P.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},P.prototype.clearStore=function(){return this.cancelPendingFetches("production"===process.env.NODE_ENV?new o(19):new o("Store reset while query was in flight (not completed in link chain)")),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=w.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset()},P.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},P.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.queries.forEach((function(o,i){var n=o.observableQuery;if(n&&n.hasObservers()){var a=n.options.fetchPolicy;n.resetLastResults(),"cache-only"===a||!e&&"standby"===a||r.push(n.refetch()),t.getQuery(i).setDiff(null)}})),this.broadcastQueries(),Promise.all(r)},P.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},P.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,o=e.fetchPolicy,i=e.errorPolicy,n=e.variables,a=e.context,s=void 0===a?{}:a;r=this.transform(r).document,n=this.getVariables(r,n);var u=function(e){return t.getObservableFromLink(r,s,e,!1).map((function(n){if("no-cache"!==o&&(k(n,i)&&t.cache.write({query:r,result:n.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),d(n))throw new m({graphQLErrors:n.errors});return n}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,n,s).then(u);return new O((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(n)},P.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},P.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},P.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},P.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},P.prototype.getLocalState=function(){return this.localState},P.prototype.getObservableFromLink=function(e,t,o,i){var n,s,c=this;void 0===i&&(i=null!==(n=null==t?void 0:t.queryDeduplication)&&void 0!==n?n:this.queryDeduplication);var l=this.transform(e).serverQuery;if(l){var h=this.inFlightLinkObservables,y=this.link,d={query:l,variables:o,operationName:u(l)||void 0,context:this.prepareContext(r(r({},t),{forceFetch:!i}))};if(t=d.context,i){var v=h.get(l)||new Map;h.set(l,v);var m=JSON.stringify(o);if(!(s=v.get(m))){var b=new f([a(y,d)]);v.set(m,s=b),b.cleanup((function(){v.delete(m)&&v.size<1&&h.delete(l)}))}}else s=new f([a(y,d)])}else s=new f([O.of({data:{}})]),t=this.prepareContext(t);var g=this.transform(e).clientQuery;return g&&(s=p(s,(function(e){return c.localState.runResolvers({document:g,remoteResult:e,context:t,variables:o})}))),s},P.prototype.getResultsFromLink=function(e,t,r){var o=e.lastRequestId;return p(this.getObservableFromLink(e.document,r.context,r.variables),(function(i){var n=y(i.errors);if(o>=e.lastRequestId){if(n&&"none"===r.errorPolicy)throw e.markError(new m({graphQLErrors:i.errors}));e.markResult(i,r,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||w.ready};return n&&"ignore"!==r.errorPolicy&&(a.errors=i.errors),a}),(function(t){var r=b(t)?t:new m({networkError:t});throw o>=e.lastRequestId&&e.markError(r),r}))},P.prototype.fetchQueryObservable=function(e,t,r){var o=this;void 0===r&&(r=w.loading);var i=this.transform(t.query).document,n=this.getVariables(i,t.variables),a=this.getQuery(e),s=a.networkStatus,u=t.fetchPolicy,c=void 0===u?"cache-first":u,l=t.errorPolicy,h=void 0===l?"none":l,p=t.returnPartialData,y=void 0!==p&&p,d=t.notifyOnNetworkStatusChange,v=void 0!==d&&d,m=t.context,b=void 0===m?{}:m;("cache-first"===c||"cache-and-network"===c||"network-only"===c||"no-cache"===c)&&v&&"number"==typeof s&&s!==r&&q(r)&&("cache-first"!==c&&(c="cache-and-network"),y=!0);var g=Object.assign({},t,{query:i,variables:n,fetchPolicy:c,errorPolicy:h,returnPartialData:y,notifyOnNetworkStatusChange:v,context:b}),Q=function(e){return g.variables=e,o.fetchQueryByPolicy(a,g,r)};this.fetchCancelFns.set(e,(function(e){Promise.resolve().then((function(){return k.cancel(e)}))}));var k=new f(this.transform(g.query).hasClientExports?this.localState.addExportedVariables(g.query,g.variables,g.context).then(Q):Q(g.variables));return k.cleanup((function(){o.fetchCancelFns.delete(e);var r=t.nextFetchPolicy;r&&(t.nextFetchPolicy=void 0,t.fetchPolicy="function"==typeof r?r.call(t,t.fetchPolicy||"cache-first"):r)})),k},P.prototype.fetchQueryByPolicy=function(e,t,o){var a=this,s=t.query,u=t.variables,c=t.fetchPolicy,l=t.errorPolicy,h=t.returnPartialData,p=t.context;e.init({document:s,variables:u,lastRequestId:this.generateRequestId(),networkStatus:o});var f=function(){return e.getDiff(u)},d=function(t,o){void 0===o&&(o=e.networkStatus||w.loading);var c=t.result;"production"===process.env.NODE_ENV||!y(t.missing)||n(c,{})||h||"production"===process.env.NODE_ENV||i.warn("Missing cache result fields: "+t.missing.map((function(e){return e.path.join(".")})).join(", "),t.missing);var l=function(e){return O.of(r({data:e,loading:q(o),networkStatus:o},t.complete?null:{partial:!0}))};return a.transform(s).hasForcedResolvers?a.localState.runResolvers({document:s,remoteResult:{data:c},context:p,variables:u,onlyRunForcedResolvers:!0}).then((function(e){return l(e.data)})):l(c)},v=function(t){return a.getResultsFromLink(e,t,{variables:u,context:p,fetchPolicy:c,errorPolicy:l})};switch(c){default:case"cache-first":return(m=f()).complete?[d(m,e.markReady())]:h?[d(m),v(!0)]:[v(!0)];case"cache-and-network":var m;return(m=f()).complete||h?[d(m),v(!0)]:[v(!0)];case"cache-only":return[d(f(),e.markReady())];case"network-only":return[v(!0)];case"no-cache":return[v(!1)];case"standby":return[]}},P.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new E(this.cache)),this.queries.get(e)},P.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return r(r({},t),{clientAwareness:this.clientAwareness})},P}();export{P as QueryManager};
|
|
1
|
+
import{__awaiter as e,__generator as t,__assign as r}from'../ext/tslib/tslib.es6.js';import{InvariantError as o,invariant as i}from"../../../ts-invariant/lib/invariant.esm.js";import n from"../../../@wry/equality/lib/equality.esm.js";import"../link/core/ApolloLink.js";import{execute as a}from"../link/core/execute.js";import{hasClientExports as s}from"../utilities/graphql/directives.js";import{getOperationName as u,getDefaultValues as c,getOperationDefinition as l}from"../utilities/graphql/getFromAST.js";import{removeConnectionDirectiveFromDocument as h}from"../utilities/graphql/transform.js";import"../utilities/common/mergeDeep.js";import"../utilities/observables/Observable.js";import{asyncMap as p}from"../utilities/observables/asyncMap.js";import{Concast as f}from"../utilities/observables/Concast.js";import{isNonEmptyArray as y}from"../utilities/common/arrays.js";import{graphQLResultHasError as d}from"../utilities/common/errorHandling.js";import{canUseWeakMap as v}from"../utilities/common/canUse.js";import{ApolloError as m,isApolloError as b}from"../errors/index.js";import{ObservableQuery as g}from"./ObservableQuery.js";import{NetworkStatus as w,isNetworkRequestInFlight as q}from"./networkStatus.js";import{LocalState as Q}from"./LocalState.js";import{shouldWriteResult as k,QueryInfo as E}from"./QueryInfo.js";import O from"../../../zen-observable/index.js";var S=Object.prototype.hasOwnProperty,P=function(){function P(e){var t=e.cache,r=e.link,o=e.queryDeduplication,i=void 0!==o&&o,n=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,u=e.clientAwareness,c=void 0===u?{}:u,l=e.localState,h=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(v?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.queryDeduplication=i,this.clientAwareness=c,this.localState=l||new Q({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!h,(this.onBroadcast=n)&&(this.mutationStore=Object.create(null))}return P.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches("production"===process.env.NODE_ENV?new o(12):new o("QueryManager stopped while query was in flight"))},P.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},P.prototype.mutate=function(o){var n=o.mutation,a=o.variables,s=o.optimisticResponse,u=o.updateQueries,c=o.refetchQueries,l=void 0===c?[]:c,h=o.awaitRefetchQueries,p=void 0!==h&&h,f=o.update,v=o.errorPolicy,b=void 0===v?"none":v,g=o.fetchPolicy,w=o.context,q=void 0===w?{}:w;return e(this,void 0,void 0,(function(){var e,o,c;return t(this,(function(t){switch(t.label){case 0:return"production"===process.env.NODE_ENV?i(n,13):i(n,"mutation option is required. You must specify your GraphQL document in the mutation option."),"production"===process.env.NODE_ENV?i(!g||"no-cache"===g,14):i(!g||"no-cache"===g,"Mutations only support a 'no-cache' fetchPolicy. If you don't want to disable the cache, remove your fetchPolicy setting to proceed with the default mutation behavior."),e=this.generateMutationId(),n=this.transform(n).document,a=this.getVariables(n,a),this.transform(n).hasClientExports?[4,this.localState.addExportedVariables(n,a,q)]:[3,2];case 1:a=t.sent(),t.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[e]={mutation:n,variables:a,loading:!0,error:null}),s&&this.markMutationOptimistic(s,{mutationId:e,document:n,variables:a,errorPolicy:b,updateQueries:u,update:f}),this.broadcastQueries(),c=this,[2,new Promise((function(t,i){var h,v;c.getObservableFromLink(n,r(r({},q),{optimisticResponse:s}),a,!1).subscribe({next:function(t){if(d(t)&&"none"===b)v=new m({graphQLErrors:t.errors});else{if(o&&(o.loading=!1,o.error=null),"no-cache"!==g)try{c.markMutationResult({mutationId:e,result:t,document:n,variables:a,errorPolicy:b,updateQueries:u,update:f})}catch(e){return void(v=new m({networkError:e}))}h=t}},error:function(t){o&&(o.loading=!1,o.error=t),s&&c.cache.removeOptimistic(e),c.broadcastQueries(),i(new m({networkError:t}))},complete:function(){if(v&&o&&(o.loading=!1,o.error=v),s&&c.cache.removeOptimistic(e),c.broadcastQueries(),v)i(v);else{"function"==typeof l&&(l=l(h));var r=[];y(l)&&l.forEach((function(e){if("string"==typeof e)c.queries.forEach((function(t){var o=t.observableQuery;o&&o.queryName===e&&r.push(o.refetch())}));else{var t={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(t.context=e.context),r.push(c.query(t))}})),Promise.all(p?r:[]).then((function(){"ignore"===b&&h&&d(h)&&delete h.errors,t(h)}),i)}}})}))]}}))}))},P.prototype.markMutationResult=function(e,t){var r=this;if(void 0===t&&(t=this.cache),k(e.result,e.errorPolicy)){var o=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],i=e.updateQueries;i&&this.queries.forEach((function(n,a){var s=n.observableQuery,c=s&&s.queryName;if(c&&S.call(i,c)){var l=i[c],h=r.queries.get(a),p=h.document,f=h.variables,y=t.diff({query:p,variables:f,returnPartialData:!0,optimistic:!1}),d=y.result;if(y.complete&&d){var v=l(d,{mutationResult:e.result,queryName:p&&u(p)||void 0,queryVariables:f});v&&o.push({result:v,dataId:"ROOT_QUERY",query:p,variables:f})}}})),t.performTransaction((function(t){o.forEach((function(e){return t.write(e)}));var r=e.update;r&&r(t,e.result)}),null)}},P.prototype.markMutationOptimistic=function(e,t){var o=this,n="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{o.markMutationResult(r(r({},t),{result:{data:n}}),e)}catch(e){"production"===process.env.NODE_ENV||i.error(e)}}),t.mutationId)},P.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},P.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},P.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},P.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),o=h(this.cache.transformForLink(r)),i=this.localState.clientQuery(r),n=o&&this.localState.serverQuery(o),a={document:r,hasClientExports:s(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:i,serverQuery:n,defaultVars:c(l(r))},u=function(e){e&&!t.has(e)&&t.set(e,a)};u(e),u(r),u(i),u(n)}return t.get(e)},P.prototype.getVariables=function(e,t){return r(r({},this.transform(e).defaultVars),t)},P.prototype.watchQuery=function(e){void 0===(e=r(r({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new E(this.cache),o=new g({queryManager:this,queryInfo:t,options:e});return this.queries.set(o.queryId,t),t.init({document:e.query,observableQuery:o,variables:e.variables}),o},P.prototype.query=function(e){var t=this;"production"===process.env.NODE_ENV?i(e.query,15):i(e.query,"query option is required. You must specify your GraphQL document in the query option."),"production"===process.env.NODE_ENV?i("Document"===e.query.kind,16):i("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'),"production"===process.env.NODE_ENV?i(!e.returnPartialData,17):i(!e.returnPartialData,"returnPartialData option only supported on watchQuery."),"production"===process.env.NODE_ENV?i(!e.pollInterval,18):i(!e.pollInterval,"pollInterval option only supported on watchQuery.");var r=this.generateQueryId();return this.fetchQuery(r,e).finally((function(){return t.stopQuery(r)}))},P.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},P.prototype.generateRequestId=function(){return this.requestIdCounter++},P.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},P.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},P.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},P.prototype.clearStore=function(){return this.cancelPendingFetches("production"===process.env.NODE_ENV?new o(19):new o("Store reset while query was in flight (not completed in link chain)")),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=w.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset()},P.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},P.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.queries.forEach((function(o,i){var n=o.observableQuery;if(n&&n.hasObservers()){var a=n.options.fetchPolicy;n.resetLastResults(),"cache-only"===a||!e&&"standby"===a||r.push(n.refetch()),t.getQuery(i).setDiff(null)}})),this.broadcastQueries(),Promise.all(r)},P.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},P.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,o=e.fetchPolicy,i=e.errorPolicy,n=e.variables,a=e.context,s=void 0===a?{}:a;r=this.transform(r).document,n=this.getVariables(r,n);var u=function(e){return t.getObservableFromLink(r,s,e,!1).map((function(n){if("no-cache"!==o&&(k(n,i)&&t.cache.write({query:r,result:n.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),d(n))throw new m({graphQLErrors:n.errors});return n}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,n,s).then(u);return new O((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(n)},P.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},P.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},P.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},P.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},P.prototype.getLocalState=function(){return this.localState},P.prototype.getObservableFromLink=function(e,t,o,i){var n,s,c=this;void 0===i&&(i=null!==(n=null==t?void 0:t.queryDeduplication)&&void 0!==n?n:this.queryDeduplication);var l=this.transform(e).serverQuery;if(l){var h=this.inFlightLinkObservables,y=this.link,d={query:l,variables:o,operationName:u(l)||void 0,context:this.prepareContext(r(r({},t),{forceFetch:!i}))};if(t=d.context,i){var v=h.get(l)||new Map;h.set(l,v);var m=JSON.stringify(o);if(!(s=v.get(m))){var b=new f([a(y,d)]);v.set(m,s=b),b.cleanup((function(){v.delete(m)&&v.size<1&&h.delete(l)}))}}else s=new f([a(y,d)])}else s=new f([O.of({data:{}})]),t=this.prepareContext(t);var g=this.transform(e).clientQuery;return g&&(s=p(s,(function(e){return c.localState.runResolvers({document:g,remoteResult:e,context:t,variables:o})}))),s},P.prototype.getResultsFromLink=function(e,t,r){var o=e.lastRequestId;return p(this.getObservableFromLink(e.document,r.context,r.variables),(function(i){var n=y(i.errors);if(o>=e.lastRequestId){if(n&&"none"===r.errorPolicy)throw e.markError(new m({graphQLErrors:i.errors}));e.markResult(i,r,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||w.ready};return n&&"ignore"!==r.errorPolicy&&(a.errors=i.errors),a}),(function(t){var r=b(t)?t:new m({networkError:t});throw o>=e.lastRequestId&&e.markError(r),r}))},P.prototype.fetchQueryObservable=function(e,t,r){var o=this;void 0===r&&(r=w.loading);var i=this.transform(t.query).document,n=this.getVariables(i,t.variables),a=this.getQuery(e),s=a.networkStatus,u=t.fetchPolicy,c=void 0===u?"cache-first":u,l=t.errorPolicy,h=void 0===l?"none":l,p=t.returnPartialData,y=void 0!==p&&p,d=t.notifyOnNetworkStatusChange,v=void 0!==d&&d,m=t.context,b=void 0===m?{}:m;("cache-first"===c||"cache-and-network"===c||"network-only"===c||"no-cache"===c)&&v&&"number"==typeof s&&s!==r&&q(r)&&("cache-first"!==c&&(c="cache-and-network"),y=!0);var g=Object.assign({},t,{query:i,variables:n,fetchPolicy:c,errorPolicy:h,returnPartialData:y,notifyOnNetworkStatusChange:v,context:b}),Q=function(e){return g.variables=e,o.fetchQueryByPolicy(a,g,r)};this.fetchCancelFns.set(e,(function(e){Promise.resolve().then((function(){return k.cancel(e)}))}));var k=new f(this.transform(g.query).hasClientExports?this.localState.addExportedVariables(g.query,g.variables,g.context).then(Q):Q(g.variables));return k.cleanup((function(){o.fetchCancelFns.delete(e);var r=t.nextFetchPolicy;r&&(t.nextFetchPolicy=void 0,t.fetchPolicy="function"==typeof r?r.call(t,t.fetchPolicy||"cache-first"):r)})),k},P.prototype.fetchQueryByPolicy=function(e,t,o){var a=this,s=t.query,u=t.variables,c=t.fetchPolicy,l=t.errorPolicy,h=t.returnPartialData,p=t.context;e.init({document:s,variables:u,lastRequestId:this.generateRequestId(),networkStatus:o});var f=function(){return e.getDiff(u)},d=function(t,o){void 0===o&&(o=e.networkStatus||w.loading);var c=t.result;"production"===process.env.NODE_ENV||!y(t.missing)||n(c,{})||h||"production"===process.env.NODE_ENV||i.warn("Missing cache result fields: "+t.missing.map((function(e){return e.path.join(".")})).join(", "),t.missing);var l=function(e){return O.of(r({data:e,loading:q(o),networkStatus:o},t.complete?null:{partial:!0}))};return a.transform(s).hasForcedResolvers?a.localState.runResolvers({document:s,remoteResult:{data:c},context:p,variables:u,onlyRunForcedResolvers:!0}).then((function(e){return l(e.data)})):l(c)},v=function(t){return a.getResultsFromLink(e,t,{variables:u,context:p,fetchPolicy:c,errorPolicy:l})};switch(c){default:case"cache-first":return(m=f()).complete?[d(m,e.markReady())]:h?[d(m),v(!0)]:[v(!0)];case"cache-and-network":var m;return(m=f()).complete||h?[d(m),v(!0)]:[v(!0)];case"cache-only":return[d(f(),e.markReady())];case"network-only":return[v(!0)];case"no-cache":return[v(!1)];case"standby":return[]}},P.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new E(this.cache)),this.queries.get(e)},P.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return r(r({},t),{clientAwareness:this.clientAwareness})},P}();export{P as QueryManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as r}from
|
|
1
|
+
import{__extends as r}from'../ext/tslib/tslib.es6.js';import"../../../ts-invariant/lib/invariant.esm.js";import"../utilities/graphql/transform.js";import"../utilities/common/mergeDeep.js";import"../utilities/observables/Observable.js";import"../utilities/observables/Concast.js";import{isNonEmptyArray as o}from"../utilities/common/arrays.js";function t(r){return r.hasOwnProperty("graphQLErrors")}var e=function(t){function e(r){var s,i,n=r.graphQLErrors,a=r.networkError,m=r.errorMessage,p=r.extraInfo,l=t.call(this,m)||this;return l.graphQLErrors=n||[],l.networkError=a||null,l.message=m||(i="",o((s=l).graphQLErrors)&&s.graphQLErrors.forEach((function(r){var o=r?r.message:"Error message not found.";i+=o+"\n"})),s.networkError&&(i+=s.networkError.message+"\n"),i=i.replace(/\n$/,"")),l.extraInfo=p,l.__proto__=e.prototype,l}return r(e,t),e}(Error);export{e as ApolloError,t as isApolloError};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
var t=function(n,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])},t(n,r)};function n(n,r){function e(){this.constructor=n}t(n,r),n.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var r=function(){return r=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},r.apply(this,arguments)};function e(t,n){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)n.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(r[e[o]]=t[e[o]])}return r}function o(t,n,r,e){return new(r||(r=Promise))((function(o,a){function c(t){try{l(e.next(t))}catch(t){a(t)}}function u(t){try{l(e.throw(t))}catch(t){a(t)}}function l(t){var n;t.done?o(t.value):(n=t.value,n instanceof r?n:new r((function(t){t(n)}))).then(c,u)}l((e=e.apply(t,n||[])).next())}))}function a(t,n){var r,e,o,a,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;c;)try{if(r=1,e&&(o=2&a[0]?e.return:a[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,a[1])).done)return o;switch(e=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,e=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){c=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){c.label=a[1];break}if(6===a[0]&&c.label<o[1]){c.label=o[1],o=a;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(a);break}o[2]&&c.ops.pop(),c.trys.pop();continue}a=n.call(t,c)}catch(t){a=[6,t],e=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function c(){for(var t=0,n=0,r=arguments.length;n<r;n++)t+=arguments[n].length;var e=Array(t),o=0;for(n=0;n<r;n++)for(var a=arguments[n],c=0,u=a.length;c<u;c++,o++)e[o]=a[c];return e}export{r as __assign,o as __awaiter,n as __extends,a as __generator,e as __rest,c as __spreadArrays};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e}from
|
|
1
|
+
import{__rest as e}from'../../ext/tslib/tslib.es6.js';import{ApolloLink as t}from"../core/ApolloLink.js";import"../../../../ts-invariant/lib/invariant.esm.js";import"../../utilities/graphql/transform.js";import"../../utilities/common/mergeDeep.js";import"../../utilities/observables/Observable.js";import"../../utilities/observables/Concast.js";import r from"../../../../zen-observable/index.js";function i(i){return new t((function(t,n){var o=e(t,[]);return new r((function(e){var r;return Promise.resolve(o).then((function(e){return i(e,t.getContext())})).then(t.setContext).then((function(){r=n(t).subscribe({next:e.next.bind(e),error:e.error.bind(e),complete:e.complete.bind(e)})})).catch(e.error.bind(e)),function(){r&&r.unsubscribe()}}))}))}export{i as setContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as t}from
|
|
1
|
+
import{__extends as t}from'../../ext/tslib/tslib.es6.js';import{InvariantError as r,invariant as n}from"../../../../ts-invariant/lib/invariant.esm.js";import"../../utilities/graphql/transform.js";import"../../utilities/common/mergeDeep.js";import"../../utilities/observables/Observable.js";import"../../utilities/observables/Concast.js";import{validateOperation as e}from"../utils/validateOperation.js";import{createOperation as o}from"../utils/createOperation.js";import{transformOperation as i}from"../utils/transformOperation.js";import u from"../../../../zen-observable/index.js";function s(t,r){return r?r(t):u.of()}function c(t){return"function"==typeof t?new a(t):t}function f(t){return t.request.length<=1}var p=function(r){function n(t,n){var e=r.call(this,t)||this;return e.link=n,e}return t(n,r),n}(Error),a=function(){function t(t){t&&(this.request=t)}return t.empty=function(){return new t((function(){return u.of()}))},t.from=function(r){return 0===r.length?t.empty():r.map(c).reduce((function(t,r){return t.concat(r)}))},t.split=function(r,n,e){var o=c(n),i=c(e||new t(s));return f(o)&&f(i)?new t((function(t){return r(t)?o.request(t)||u.of():i.request(t)||u.of()})):new t((function(t,n){return r(t)?o.request(t,n)||u.of():i.request(t,n)||u.of()}))},t.execute=function(t,r){return t.request(o(r.context,i(e(r))))||u.of()},t.concat=function(r,e){var o=c(r);if(f(o))return"production"===process.env.NODE_ENV||n.warn(new p("You are calling concat on a terminating link, which will have no effect",o)),o;var i=c(e);return f(i)?new t((function(t){return o.request(t,(function(t){return i.request(t)||u.of()}))||u.of()})):new t((function(t,r){return o.request(t,(function(t){return i.request(t,r)||u.of()}))||u.of()}))},t.prototype.split=function(r,n,e){return this.concat(t.split(r,n,e||new t(s)))},t.prototype.concat=function(r){return t.concat(this,r)},t.prototype.request=function(t,n){throw"production"===process.env.NODE_ENV?new r(21):new r("request is not implemented")},t.prototype.onError=function(t,r){if(r&&r.error)return r.error(t),!1;throw t},t.prototype.setOnError=function(t){return this.onError=t,this},t}();export{a as ApolloLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as r}from
|
|
1
|
+
import{__extends as r}from'../../ext/tslib/tslib.es6.js';import{ApolloLink as e}from"../core/ApolloLink.js";import"../../../../ts-invariant/lib/invariant.esm.js";import"../../utilities/graphql/transform.js";import"../../utilities/common/mergeDeep.js";import"../../utilities/observables/Observable.js";import"../../utilities/observables/Concast.js";import o from"../../../../zen-observable/index.js";function t(r){return new e((function(e,t){return new o((function(o){var n,i,s;try{n=t(e).subscribe({next:function(n){n.errors&&(s=r({graphQLErrors:n.errors,response:n,operation:e,forward:t}))?i=s.subscribe({next:o.next.bind(o),error:o.error.bind(o),complete:o.complete.bind(o)}):o.next(n)},error:function(n){(s=r({operation:e,networkError:n,graphQLErrors:n&&n.result&&n.result.errors,forward:t}))?i=s.subscribe({next:o.next.bind(o),error:o.error.bind(o),complete:o.complete.bind(o)}):o.error(n)},complete:function(){s||o.complete.bind(o)()}})}catch(n){r({networkError:n,operation:e,forward:t}),o.error(n)}return function(){n&&n.unsubscribe(),i&&n.unsubscribe()}}))}))}!function(e){function o(r){var o=e.call(this)||this;return o.link=t(r),o}r(o,e),o.prototype.request=function(r,e){return this.link.request(r,e)}}(e);export{t as onError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as
|
|
1
|
+
import{__extends as o}from'../../ext/tslib/tslib.es6.js';import{ApolloLink as t}from"../core/ApolloLink.js";import{createHttpLink as r}from"./createHttpLink.js";var i=function(t){function i(o){void 0===o&&(o={});var i=t.call(this,r(o).request)||this;return i.options=o,i}return o(i,t),i}(t);export{i as HttpLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e,__assign as r}from
|
|
1
|
+
import{__rest as e,__assign as r}from'../../ext/tslib/tslib.es6.js';import{visit as t}from"../../../../graphql/language/visitor.mjs.js";import{ApolloLink as i}from"../core/ApolloLink.js";import"../../../../ts-invariant/lib/invariant.esm.js";import"../../utilities/graphql/transform.js";import"../../utilities/common/mergeDeep.js";import"../../utilities/observables/Observable.js";import"../../utilities/observables/Concast.js";import{serializeFetchParameter as o}from"./serializeFetchParameter.js";import{selectURI as n}from"./selectURI.js";import{parseAndCheckHttpResponse as s}from"./parseAndCheckHttpResponse.js";import{checkFetcher as a}from"./checkFetcher.js";import{selectHttpOptionsAndBody as l,fallbackHttpConfig as c}from"./selectHttpOptionsAndBody.js";import{createSignalIfSupported as m}from"./createSignalIfSupported.js";import{rewriteURIForGET as p}from"./rewriteURIForGET.js";import{fromError as u}from"../utils/fromError.js";import f from"../../../../zen-observable/index.js";var d=function(d){void 0===d&&(d={});var h=d.uri,v=void 0===h?"/graphql":h,b=d.fetch,j=d.includeExtensions,g=d.useGETForQueries,E=d.includeUnusedVariables,x=void 0!==E&&E,y=e(d,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);a(b),b||(b=fetch);var q={http:{includeExtensions:j},options:y.fetchOptions,credentials:y.credentials,headers:y.headers};return new i((function(e){var i=n(e,v),a=e.getContext(),d={};if(a.clientAwareness){var h=a.clientAwareness,j=h.name,E=h.version;j&&(d["apollographql-client-name"]=j),E&&(d["apollographql-client-version"]=E)}var y,w=r(r({},d),a.headers),k={http:a.http,options:a.fetchOptions,credentials:a.credentials,headers:w},A=l(e,c,q,k),O=A.options,F=A.body;if(F.variables&&!x){var G=new Set(Object.keys(F.variables));t(e.query,{Variable:function(e,r,t){t&&"VariableDefinition"!==t.kind&&G.delete(e.name.value)}}),G.size&&(F.variables=r({},F.variables),G.forEach((function(e){delete F.variables[e]})))}if(!O.signal){var T=m(),U=T.controller,C=T.signal;(y=U)&&(O.signal=C)}if(g&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(O.method="GET"),"GET"===O.method){var I=p(i,F),R=I.newURI,V=I.parseError;if(V)return u(V);i=R}else try{O.body=o(F,"Payload")}catch(V){return u(V)}return new f((function(r){return b(i,O).then((function(r){return e.setContext({response:r}),r})).then(s(e)).then((function(e){return r.next(e),r.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&r.next(e.result),r.error(e))})),function(){y&&y.abort()}}))}))};export{d as createHttpLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from'../../ext/tslib/tslib.es6.js';import{print as t}from"../../../../graphql/language/printer.mjs.js";var n={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},r=function(n,r){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];var a=e(e({},r.options),{headers:r.headers,credentials:r.credentials}),i=r.http||{};s.forEach((function(t){a=e(e(e({},a),t.options),{headers:e(e({},a.headers),t.headers)}),t.credentials&&(a.credentials=t.credentials),i=e(e({},i),t.http)}));var d=n.operationName,l=n.extensions,p=n.variables,c=n.query,h={operationName:d,variables:p};return i.includeExtensions&&(h.extensions=l),i.includeQuery&&(h.query=t(c)),{options:a,body:h}};export{n as fallbackHttpConfig,r as selectHttpOptionsAndBody};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from'../../ext/tslib/tslib.es6.js';function t(t,n){var o=e({},t);return Object.defineProperty(n,"setContext",{enumerable:!1,value:function(t){o=e(e({},o),"function"==typeof t?t(o):t)}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:function(){return e({},o)}}),n}export{t as createOperation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArrays as r,__assign as
|
|
1
|
+
import{__spreadArrays as r,__assign as e}from'../../ext/tslib/tslib.es6.js';var t=Object.prototype.hasOwnProperty;function o(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return n(r)}function n(r){var e=r[0]||{},t=r.length;if(t>1)for(var o=new p,n=1;n<t;++n)e=o.merge(e,r[n]);return e}function i(r){return null!==r&&"object"==typeof r}var s=function(r,e,t){return this.merge(r[t],e[t])},p=function(){function o(r){void 0===r&&(r=s),this.reconciler=r,this.isObject=i,this.pastCopies=new Set}return o.prototype.merge=function(e,o){for(var n=this,s=[],p=2;p<arguments.length;p++)s[p-2]=arguments[p];return i(o)&&i(e)?(Object.keys(o).forEach((function(i){if(t.call(e,i)){var p=e[i];if(o[i]!==p){var a=n.reconciler.apply(n,r([e,o,i],s));a!==p&&((e=n.shallowCopyForMerge(e))[i]=a)}}else(e=n.shallowCopyForMerge(e))[i]=o[i]})),e):o},o.prototype.shallowCopyForMerge=function(r){return i(r)&&!this.pastCopies.has(r)&&(r=Array.isArray(r)?r.slice(0):e({__proto__:Object.getPrototypeOf(r)},r),this.pastCopies.add(r)),r},o}();export{p as DeepMerger,o as mergeDeep,n as mergeDeepArray};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as n,__spreadArrays as e}from
|
|
1
|
+
import{__assign as n,__spreadArrays as e}from'../../ext/tslib/tslib.es6.js';import{InvariantError as i,invariant as t}from"../../../../ts-invariant/lib/invariant.esm.js";function a(a,o){var r=o,s=[];return a.definitions.forEach((function(n){if("OperationDefinition"===n.kind)throw"production"===process.env.NODE_ENV?new i(42):new i("Found a "+n.operation+" operation"+(n.name?" named '"+n.name.value+"'":"")+". No operations are allowed when using a fragment as a query. Only fragments are allowed.");"FragmentDefinition"===n.kind&&s.push(n)})),void 0===r&&("production"===process.env.NODE_ENV?t(1===s.length,43):t(1===s.length,"Found "+s.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment."),r=s[0].name.value),n(n({},a),{definitions:e([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],a.definitions)})}function o(n){void 0===n&&(n=[]);var e={};return n.forEach((function(n){e[n.name.value]=n})),e}function r(n,e){switch(n.kind){case"InlineFragment":return n;case"FragmentSpread":var i=e&&e[n.name.value];return"production"===process.env.NODE_ENV?t(i,44):t(i,"No fragment named "+n.name.value+"."),i;default:return null}}export{o as createFragmentMap,r as getFragmentFromSelection,a as getFragmentQueryDocument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e,__spreadArrays as n}from
|
|
1
|
+
import{__assign as e,__spreadArrays as n}from'../../ext/tslib/tslib.es6.js';import{invariant as t}from"../../../../ts-invariant/lib/invariant.esm.js";import{checkDocument as r,getFragmentDefinitions as i,getOperationDefinition as u,getFragmentDefinition as o,getMainDefinition as a}from"./getFromAST.js";import{filterInPlace as c}from"../common/filterInPlace.js";import{isField as f,isInlineFragment as m}from"./storeUtils.js";import{createFragmentMap as l}from"./fragments.js";import{visit as s}from"../../../../graphql/language/visitor.mjs.js";var v={kind:"Field",name:{kind:"Name",value:"__typename"}};function p(e,n){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&p(n[e.name.value],n)}))}function d(e){return p(u(e)||o(e),l(i(e)))?null:e}function g(e){return function(n){return e.some((function(e){return e.name&&e.name===n.name.value||e.test&&e.test(n)}))}}function h(e,n){var t=Object.create(null),r=[],i=Object.create(null),u=[],o=d(s(n,{Variable:{enter:function(e,n,r){"VariableDefinition"!==r.kind&&(t[e.name.value]=!0)}},Field:{enter:function(n){if(e&&n.directives&&(e.some((function(e){return e.remove}))&&n.directives&&n.directives.some(g(e))))return n.arguments&&n.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),n.selectionSet&&j(n.selectionSet).forEach((function(e){u.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(n){if(g(e)(n))return null}}}));return o&&c(r,(function(e){return!!e.name&&!t[e.name]})).length&&(o=k(r,o)),o&&c(u,(function(e){return!!e.name&&!i[e.name]})).length&&(o=D(u,o)),o}function S(t){return s(r(t),{SelectionSet:{enter:function(t,r,i){if(!i||"OperationDefinition"!==i.kind){var u=t.selections;if(u)if(!u.some((function(e){return f(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=i;if(!(f(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return e(e({},t),{selections:n(u,[v])})}}}}})}S.added=function(e){return e===v};var b={test:function(e){var n="connection"===e.name.value;return n&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||"production"===process.env.NODE_ENV||t.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),n}};function y(e){return h([b],r(e))}function k(n,t){var r=function(e){return function(n){return e.some((function(e){return n.value&&"Variable"===n.value.kind&&n.value.name&&(e.name===n.value.name.value||e.test&&e.test(n))}))}}(n);return d(s(t,{OperationDefinition:{enter:function(t){return e(e({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(e){return!n.some((function(n){return n.name===e.variable.name.value}))})):[]})}},Field:{enter:function(e){if(n.some((function(e){return e.remove}))){var t=0;if(e.arguments&&e.arguments.forEach((function(e){r(e)&&(t+=1)})),1===t)return null}}},Argument:{enter:function(e){if(r(e))return null}}}))}function D(e,n){function t(n){if(e.some((function(e){return e.name===n.name.value})))return null}return d(s(n,{FragmentSpread:{enter:t},FragmentDefinition:{enter:t}}))}function j(e){var n=[];return e.selections.forEach((function(e){(f(e)||m(e))&&e.selectionSet?j(e.selectionSet).forEach((function(e){return n.push(e)})):"FragmentSpread"===e.kind&&n.push(e)})),n}function F(n){return"query"===a(n).operation?n:s(n,{OperationDefinition:{enter:function(n){return e(e({},n),{operation:"query"})}}})}function _(e){r(e);var n=h([{test:function(e){return"client"===e.name.value},remove:!0}],e);return n&&(n=s(n,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return f(e)&&"__typename"===e.name.value})))return null}}})),n}export{S as addTypenameToDocument,F as buildQueryFromSelectionSet,k as removeArgumentsFromDocument,_ as removeClientSetsFromDocument,y as removeConnectionDirectiveFromDocument,h as removeDirectivesFromDocument,D as removeFragmentSpreadFromDocument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as e}from
|
|
1
|
+
import{__extends as e}from'../../ext/tslib/tslib.es6.js';import"./Observable.js";import{iterateObserversSafely as t}from"./iteration.js";import r from"../../../../zen-observable/index.js";function s(e){return e&&"function"==typeof e.then}var n=function(r){function n(e){var n=r.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],t(n.observers,"next",e))},error:function(e){var r=n.sub;null!==r&&(r&&Promise.resolve().then((function(){return r.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),t(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?s(e)?e.then((function(e){return n.sub=e.subscribe(n.handlers)})):n.sub=e.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),t(n.observers,"complete"))}}},n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),s(e)?e.then((function(e){return n.start(e)}),n.handlers.error):n.start(e),n}return e(n,r),n.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},n.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},n.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},n.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},n.prototype.cleanup=function(e){var t=this,r=!1,s=function(){r||(r=!0,t.observers.delete(n),e())},n={next:s,error:s,complete:s},o=this.addCount;this.addObserver(n),this.addCount=o},n}(r);"function"==typeof Symbol&&Symbol.species&&Object.defineProperty(n,Symbol.species,{value:r});export{n as Concast};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
var t=function(o,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])},t(o,r)};function o(o,r){function n(){this.constructor=o}t(o,r),o.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}export{o as __extends};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as r}from
|
|
1
|
+
import{__extends as r}from'../ext/tslib/tslib.es6.js';import o from"../../@ungap/global-this/esm/index.js";var n=o,e=n.console,t=Object.setPrototypeOf,i=void 0===t?function(r,o){return r.__proto__=o,r}:t,a=function(o){function n(r){void 0===r&&(r="Invariant Violation");var e=o.call(this,"number"==typeof r?"Invariant Violation: "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return e.framesToPop=1,e.name="Invariant Violation",i(e,n.prototype),e}return r(n,o),n}(Error);function s(r,o){if(!r)throw new a(o)}var l=["log","warn","error","silent"],p=l.indexOf("log");function c(r){return function(){if(l.indexOf(r)>=p)return e[r].apply(e,arguments)}}!function(r){r.log=c("log"),r.warn=c("warn"),r.error=c("error")}(s||(s={}));var f=n.process||{env:{}};if(!n.process)try{Object.defineProperty(o,"process",{value:f,writable:!0,enumerable:!1,configurable:!0})}catch(r){}export{a as InvariantError,s as invariant,f as process};
|
|
@@ -12,4 +12,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
12
12
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
14
14
|
***************************************************************************** */
|
|
15
|
-
var t=function(
|
|
15
|
+
var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};function r(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function o(t,e,n,r){return new(n||(n=Promise))((function(o,c){function a(t){try{i(r.next(t))}catch(t){c(t)}}function l(t){try{i(r.throw(t))}catch(t){c(t)}}function i(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}i((r=r.apply(t,e||[])).next())}))}function c(t,e){var n,r,o,c,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return c={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function l(c){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}function a(t,e,n){if(n||2===arguments.length)for(var r,o=0,c=e.length;o<c;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function l(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}export{n as __assign,o as __awaiter,e as __extends,c as __generator,l as __makeTemplateObject,r as __rest,a as __spreadArray};
|