1var e=Object.defineProperty,r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,n=(r,t,o)=>t in r?e(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o,i=(e,i)=>{for(var a in i||(i={}))t.call(i,a)&&n(e,a,i[a]);if(r)for(var a of r(i))o.call(i,a)&&n(e,a,i[a]);return e};import{r as a,I as s,i as l,u as c,O as u,c as d,M as f,Y as h,N as p}from"./main.1.45.0.js";import{q as m}from"./index-D_ibIeF5.js";import{u as y,d as _}from"./use-store-CbMJqTO8.js";const v=()=>{const e=y(_),r=a.useContext(s),t=l(),o=c((e=>e.checkout.id));return a.useEffect((()=>{const n=m.parse(window.location.search,{ignoreQueryPrefix:!0}),a="string"==typeof n.fh_order_id?n.fh_order_id:null,s="string"==typeof n.fh_cart_id?n.fh_cart_id:null,l="string"==typeof n.fh_intent?n.fh_intent:null,c="string"==typeof n.fh_error?n.fh_error:null;if("cancel"===l)return void(window.location.href="/menu");if("view_bag"===l)return sessionStorage.setItem(u,"1"),void(window.location.href="/menu");if(l||c){const{checkout_url:e}=d();return void(window.location.href=o?`${e}?checkout=${o}`:e)}var y,_,v;y=null,_=null,v=function*(){var l,c;if(null==e?void 0:e.joint_business_id){const d=null!=a?a:n.orderNumber;if(d)try{const n=yield t(f(i(i({externalOrderId:`${d}`,businessId:Number(e.joint_business_id)},s?{metadata:{externalCartId:s}}:{}),a&&o?{checkoutId:o}:{}))).unwrap();if((null==(c=null==(l=r.janeAds)?void 0:l.credentials)?void 0:c.store_id)&&n.items&&n.items.length>0)try{yield h(n)}catch(u){console.error("Failed to track order with Jane DM:",u)}t(p())}catch(u){console.log("An error occurred completing the external purchase process.",u)}}},new Promise(((e,r)=>{var t=e=>{try{n(v.next(e))}catch(t){r(t)}},o=e=>{try{n(v.throw(e))}catch(t){r(t)}},n=r=>r.done?e(r.value):Promise.resolve(r.value).then(t,o);n((v=v.apply(y,_)).next())}))}),[]),null};export{v as CompletedOrder,v as default};
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.