PageSourceSearch

https://shop.unistellar.com/cdn/shopifycloud/checkout-web/assets/c1/receipt-mapper-load-recovery.CtThaHn4.js

js unistellar.com collected 2026-09-24 09:54:40 UTC 7,089 bytes, 1 lines download raw bytes

1import{aI as n,bL as d,bM as m}from"./addresses-is-address-empty.-MuOhIyI.js";import{y as o}from"./esnext-vendor.D7ldIee_.js";import{S as s}from"./app.A60-IfPs.js";import{p as c}from"./receipt-eager-mappers.C1dYRU4X.js";function I(e,t={}){if(e.__typename!=="FilledBuyerIdentityTerms")return;const r=p(e.customer);return r||(e.email?e.email:u(t))}function p(e){if("email"in e)return e.email}function U(e,t={}){if(e.__typename==="FilledBuyerIdentityTerms")return e.phone?e.phone:u(t)}function u(e){return"emptyContactFallback"in e?e.emptyContactFallback:""}function E(e){const t=e?.buyerIdentity;if(t?.__typename==="FilledBuyerIdentityTerms")return t.rememberMe}function T(e,t){if(!e||e.__typename!=="AllocatedAlternativePaymentCurrencyTotal"||!t?.lines)return;const r=t.lines.flatMap(i=>i.method.type==="giftCard"?[i.stableId]:[]),a=e.paymentLineAllocations.reduce((i,l)=>r.includes(l.stableId)?i:i+parseFloat(l.amount.amount),0);return{total:n(e.total),totalWithoutGiftCards:n({amount:a.toString(),currencyCode:e.total.currencyCode,__typename:"Money"})}}function R(e){if(!(!e||e.__typename==="PendingTerms"))return e.availableRedeemables.reduce((t,r)=>{const{balance:a,paymentMethod:i}=r;return i.__typename==="RedeemablePaymentMethod"&&t.push({paymentMethod:d(i),balance:n(a)}),t},[])}function S(e){return e?e.map(t=>({key:t.activation.key,label:o(t.activation.label),heading:o(t.activation.heading??null),description:o(t.activation.description??null),type:t.activation.type,position:t.activation.position,required:o(t.activation.required),target:{target:t.activation.target.target,placementReference:t.activation.target.placementReference},choices:t.activation.choices?.map(({label:r,value:a})=>({label:r,value:a}))??null})):[]}function h({deliveryExpectations:e}){switch(e?.__typename){case void 0:case"PendingTerms":return;case"UnavailableTerms":return{status:"unavailable",deliveryExpectationLines:null};case"FilledDeliveryExpectationTerms":return{status:"filled",deliveryExpectationLines:e.deliveryExpectations}}}function M(e){const t=e?.attributions.find(r=>r.__typename==="DraftOrderAttributions");if(t)return{draftOrder:{userId:t.userIdentifier,locationId:t.locationIdentifier,sourceName:t.sourceName}}}function P(e){if(e==null||e.__typename==="UnavailableTerms"||e.__typename==="PendingTerms")return{status:"unavailable",reason:""};if(e.__typename==="FilledDutyTerms"&&e.totalDutyAmount){const{amount:t,currencyCode:r}=n(e.totalDutyAmount),a=e.totalAdditionalFeesAmount?n(e.totalAdditionalFeesAmount).amount:0;return{status:"available_total",totalDuty:{amount:t+a,currencyCode:r}}}else return{status:"unavailable",reason:""}}function x(e){switch(e.__typename){case"FilledMembershipTerms":return{status:"filled",memberships:e.memberships.map(t=>({apply:t.apply,handle:t.handle}))};case"PendingTerms":return{status:"pending"};case"UnavailableTerms":return{status:"unavailable"}}}function A(e){if(e?.attributions&&e?.attributions.length!==0){const t=[];return e?.attributions.forEach(r=>{let a;r.recipient.__typename==="Location"?a={location:{id:r.recipient.id}}:r.recipient.__typename==="StaffMember"?a={staffMember:{id:r.recipient.id}}:r.recipient.__typename==="PointOfSaleDevice"&&(a={pointOfSaleDevice:{id:r.recipient.id}}),a&&t.push({recipient:a,targetMerchandiseLines:f(r.targetMerchandiseLines)})}),{attributions:t}}}function f(e){return e.__typename==="FilledMerchandiseLineTargetCollection"?{lines:e.linesV2.reduce((t,r)=>r.__typename!=="MerchandiseLine"&&r.__typename!=="MerchandiseBundleLineComponent"?t:[...t,{stableId:r.stableId}],[])}:e.__typename==="AnyMerchandiseLineTargetCollection"?{any:e.any}:{}}function O(e){const{__typename:t,...r}=e;return r}function L(e){if(e)switch(e.__typename){case"PendingTerms":return{status:"pending",taskId:e.taskId??void 0,pollDelay:e.pollDelay??void 0};case"FilledShopCashBalance":return{status:"filled",availableBalance:n(e.availableBalance),eligible:e.eligible,nonEligibleReason:e.nonEligibleReason,redeemableBalance:e.redeemableBalance?n(e.redeemableBalance):void 0};case"UnavailableTerms":return{status:"unavailable"};default:return}}function N(e){if(e)switch(e.__typename){case"PendingTerms":return{status:"pending",taskId:e.taskId??void 0,pollDelay:e.pollDelay??void 0};case"FilledShopDiscountOffer":return{status:"filled",discountOffer:{adType:e.discountOffer?.adType??null,campaignHandle:e.discountOffer?.campaignHandle??null,offerAmount:e.discountOffer?.offerAmount?n(e.discountOffer.offerAmount):n({amount:"0",currencyCode:"USD",__typename:"Money"}),minimumOrderValue:e.discountOffer?.minimumOrderValue?n(e.discountOffer?.minimumOrderValue):null,minimumOrderValueRemainder:e.discountOffer?.minimumOrderValueRemainder?n(e.discountOffer?.minimumOrderValueRemainder):null,minimumOrderValueSatisfied:e.discountOffer?.minimumOrderValueSatisfied??!1}};case"UnavailableTerms":return{status:"unavailable"};default:return}}function D(e){if(e)switch(e.__typename){case"PendingTerms":return{status:"pending",taskId:e.taskId??void 0,pollDelay:e.pollDelay??void 0};case"FilledShopPromotion":return{status:"filled",promotions:e.promotions.map(t=>({promotionId:t.promotionId,availableBalance:n(t.availableBalance),type:t.type}))??[]};case"UnavailableTerms":return{status:"unavailable"};default:return}}function k(e){return!e||e.__typename!=="TipWrapper"?[]:e.tipSuggestions.map(t=>({percentage:t.percentage,amount:n(t.amount)}))}function C(e){return!e||e.__typename!=="TipWrapper"||!e.terms||e.terms.__typename!=="FilledTipTerms"?[]:e.terms.tipLines.map(y).filter(t=>!!t)}function y(e){if(e.__typename==="TipLine")return{amount:n(e.amount)}}function G(e){return e?.map(({amount:t})=>({amount:{value:{amount:t.amount.toString(),currencyCode:t.currencyCode}}}))??[]}
1class V extends Error{constructor(){super(...arguments),this.name="StaleNegotiationError"}}class w extends Error{constructor(){super(...arguments),this.name="MissingNegotiationDataError"}}class B extends Error{constructor(){super(...arguments),this.name="UnactionableGraphQLExecutionError"}}class W extends s{constructor(){super(...arguments),this.name="NegotiationFailedError"}}class q extends s{constructor(){super(...arguments),this.name="UnactionableNegotiationFailedError",this.unactionable=!0}}class Q extends Error{constructor(){super(...arguments),this.name="GenericError"}}class H extends Error{constructor(){super(...arguments),this.name="UnexpectedNegotiationResult"}}class j extends Error{constructor(){super(...arguments),this.name="EmptyMerchandiseLinesNegotiationResult"}}function _(e){if(!(e?.id==null||e.orderStatusPageUrl))return{status:"processing",id:e.id,pollAt:Date.now()+m}}function Y(e){if(e?.id!=null)switch(e.__typename){case"ProcessingReceipt":case"WaitingReceipt":return e.pollDelay==null?void 0:c({id:e.id,pollDelay:e.pollDelay});case"ProcessedReceipt":return _({__typename:e.__typename,id:e.id,orderStatusPageUrl:e.orderStatusPageUrl})}}export{j as E,Q as G,w as M,W as N,V as S,H as U,M as a,h as b,C as c,P as d,O as e,R as f,L as g,D as h,N as i,S as j,T as k,G as l,x as m,I as n,q as o,U as p,Y as q,E as r,A as s,k as t,_ as u,B as v};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.