gdcore-tools 2.0.0-beta9 → 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.
Files changed (68) hide show
  1. package/README.md +64 -64
  2. package/dist/Runtime/Extensions/DialogueTree/bondage.js/dist/bondage.min.js +10 -10
  3. package/dist/Runtime/Extensions/DialogueTree/bondage.js/version.txt +5 -5
  4. package/dist/Runtime/Extensions/Firebase/A_firebasejs/NOTICE.txt +6 -6
  5. package/dist/Runtime/Extensions/Multiplayer/JsExtension.js +0 -15
  6. package/dist/Runtime/Extensions/PhysicsBehavior/box2djs/box2d.js +804 -804
  7. package/dist/Runtime/Extensions/Shopify/shopify-buy.umd.polyfilled.min.js +1 -1
  8. package/dist/Runtime/Extensions/TileMap/example/anotherIsland.json +5768 -5768
  9. package/dist/Runtime/Extensions/TileMap/example/island.json +5822 -5822
  10. package/dist/lib/libGD.cjs +21 -21
  11. package/dist/lib/libGD.wasm +0 -0
  12. package/package.json +1 -1
  13. package/dist/Runtime/Extensions/TileMap/helper/node_modules/.package-lock.json +0 -19
  14. package/dist/Runtime/Extensions/TileMap/helper/node_modules/@types/pako/index.d.ts +0 -165
  15. package/dist/Runtime/Extensions/TileMap/helper/node_modules/@types/pako/package.json +0 -35
  16. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako.es5.js +0 -2
  17. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako.es5.js.map +0 -7
  18. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako.es5.min.js +0 -2
  19. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako.js +0 -2
  20. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako.js.map +0 -7
  21. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako.min.js +0 -2
  22. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_deflate.es5.js +0 -2
  23. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_deflate.es5.js.map +0 -7
  24. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_deflate.es5.min.js +0 -2
  25. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_deflate.js +0 -2
  26. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_deflate.js.map +0 -7
  27. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_deflate.min.js +0 -2
  28. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_inflate.es5.js +0 -2
  29. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_inflate.es5.js.map +0 -7
  30. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_inflate.es5.min.js +0 -2
  31. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_inflate.js +0 -2
  32. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_inflate.js.map +0 -7
  33. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/dist/pako_inflate.min.js +0 -2
  34. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/index.js +0 -2
  35. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/index.js.map +0 -7
  36. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/deflate.js +0 -2
  37. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/deflate.js.map +0 -7
  38. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/inflate.js +0 -2
  39. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/inflate.js.map +0 -7
  40. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/utils/common.js +0 -2
  41. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/utils/common.js.map +0 -7
  42. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/utils/strings.js +0 -2
  43. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/utils/strings.js.map +0 -7
  44. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/adler32.js +0 -2
  45. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/adler32.js.map +0 -7
  46. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/constants.js +0 -2
  47. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/constants.js.map +0 -7
  48. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/crc32.js +0 -2
  49. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/crc32.js.map +0 -7
  50. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/deflate.js +0 -2
  51. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/deflate.js.map +0 -7
  52. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/gzheader.js +0 -2
  53. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/gzheader.js.map +0 -7
  54. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/inffast.js +0 -2
  55. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/inffast.js.map +0 -7
  56. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/inflate.js +0 -2
  57. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/inflate.js.map +0 -7
  58. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/inftrees.js +0 -2
  59. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/inftrees.js.map +0 -7
  60. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/messages.js +0 -2
  61. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/messages.js.map +0 -7
  62. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/trees.js +0 -2
  63. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/trees.js.map +0 -7
  64. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/zstream.js +0 -2
  65. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/lib/zlib/zstream.js.map +0 -7
  66. package/dist/Runtime/Extensions/TileMap/helper/node_modules/pako/package.json +0 -64
  67. package/types/index.d.ts +0 -23
  68. package/types/open_project.d.ts +0 -25
@@ -1,2 +1,2 @@
1
- !function(t,e){if("function"==typeof define&&define.amd)define("shopify-buy",["module"],e);else if("undefined"!=typeof exports)e(module);else{var n={exports:{}};e(n),t.ShopifyBuy=n.exports}}(this,function(t){"use strict";function e(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function r(t,e){ei[t]||(ei[t]=e)}function i(t){return ei[t]}function o(t,e){function n(){var n=this.super;this.super=function(){return e.apply(this,arguments)};var r=t.apply(this,arguments);return this.super=n,r}return n.wrappedFunction=t,n}function a(t,e,n){var r=Object.getPrototypeOf(n);t.forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t),a=r.hasOwnProperty(t)&&Object.getOwnPropertyDescriptor(r,t);if("function"==typeof a.value&&"function"==typeof i.value){var s=o(i.value,a.value);Object.defineProperty(n,t,{value:s})}else Object.defineProperty(n,t,i)})}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=o(t.constructor,e),r=Object.getOwnPropertyNames(t).filter(function(t){return!ai(["constructor","static"],t)});ii(n,e),n.prototype=Object.create(e.prototype),a(r,t,n.prototype),n.prototype.constructor=n;var i=t.static;if(i){var s=Object.getOwnPropertyNames(i);a(s,i,n)}return n}function u(t){var n=function(){var e=void 0;e=console[t]?Function.prototype.bind.call(console[t],console):Function.prototype.bind.call(console.log,console),e.apply(void 0,arguments)};return function(){var t=[].concat(Array.prototype.slice.call(arguments));t.unshift("[JS-BUY-SDK]: "),n.apply(void 0,e(t))}}function c(t,e){var n=void 0;if(e.headers&&Object.keys(e.headers).forEach(function(t){"authorization"===t.toLowerCase()&&(n=e.headers[t])}),n){var r=n.split(" ").slice(-1)[0];try{var i=atob(r),o=void 0;return o=t.indexOf("?")>-1?t+"&_x_http_authorization="+i:t+"?_x_http_authorization="+i}catch(t){}}return t}function f(t,e,n){return new Promise(function(r,i){function o(){i(new Error("There was an error with the XDR"))}var a=new XDomainRequest;a.onload=function(){try{var t=JSON.parse(a.responseText);r({json:t,originalResponse:a,isJSON:!0})}catch(t){r({text:a.responseText,originalResponse:a,isText:!0})}},a.onerror=o,a.ontimeout=o,a.open(t,c(e,n)),a.send(n.data)})}function l(){var t="undefined"==typeof window,e="function"==typeof require;return t&&e}function h(t){if(t.status>=200&&t.status<300)return t;var e=new Error(t.statusText);throw e.status=t.status,e.response=t,e}function p(t){return t.json().then(function(e){return{json:e,originalResponse:t,isJSON:!0}}).catch(function(){var e=t.clone();return e.text().then(function(t){return{text:t,originalResponse:e,isText:!0}})})}function d(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!l()){var r=new XMLHttpRequest;if(!("withCredentials"in r))return f.apply(void 0,arguments)}return n.method=t,n.mode="cors",fetch(e,n).then(h).then(p)}function m(){return++Pi}function v(t){if(t&&t[Oi])return t[Oi];if(void 0===t)return"(undefined)";if(null===t)return"(null)";var e="undefined"==typeof t?"undefined":b(t),n=void 0;switch(e){case"number":n=Si[t],n||(n=Si[t]="nu"+t);break;case"string":n=Ai[t],n||(n=Ai[t]="st"+m());break;case"boolean":n=t?"(true)":"(false)";break;default:if(t===Object){n="(Object)";break}if(t===Array){n="(Array)";break}n=ji+"."+m(),null===t[Oi]?t[Oi]=n:(Ti.value=n,Object.defineProperty(t,Oi,Ti))}return n}function y(t,e){return t===e||Object.keys(t).every(function(n){return t[n]instanceof Date?t[n].toString()===e[n].toString():"object"===b(t[n])?y(t[n],e[n]):t[n]===e[n]})}function g(t,e){var n=void 0;switch(t){case"all":n=function(){return this.fetchAll(e)};break;case"one":n=function(){return this.fetch.apply(this,[e].concat(Array.prototype.slice.call(arguments)))};break;case"query":n=function(){return this.fetchQuery.apply(this,[e].concat(Array.prototype.slice.call(arguments)))}}return n}var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function t(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function e(t){return"string"!=typeof t&&(t=String(t)),t}function n(t){this.map={},t instanceof n?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function r(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function i(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function o(t){var e=new FileReader;return e.readAsArrayBuffer(t),i(e)}function a(t){var e=new FileReader;return e.readAsText(t),i(e)}function s(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(p.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(p.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(t){if(!p.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Error("unsupported BodyInit type")}else this._bodyText=""},p.blob?(this.blob=function(){var t=r(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(o)},this.text=function(){var t=r(this);if(t)return t;if(this._bodyBlob)return a(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var t=r(this);return t?t:Promise.resolve(this._bodyText)},p.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(t){var e=t.toUpperCase();return d.indexOf(e)>-1?e:t}function c(t,e){e=e||{};var r=e.body;if(c.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new n(t.headers)),this.method=t.method,this.mode=t.mode,r||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new n(e.headers)),this.method=u(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function f(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function l(t){var e=new n,r=t.getAllResponseHeaders().trim().split("\n");return r.forEach(function(t){var n=t.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();e.append(r,i)}),e}function h(t,e){e||(e={}),this._initBody(t),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof n?e.headers:new n(e.headers),this.url=e.url||""}if(!self.fetch){n.prototype.append=function(n,r){n=t(n),r=e(r);var i=this.map[n];i||(i=[],this.map[n]=i),i.push(r)},n.prototype.delete=function(e){delete this.map[t(e)]},n.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},n.prototype.getAll=function(e){return this.map[t(e)]||[]},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(n,r){this.map[t(n)]=[e(r)]},n.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){t.call(e,r,n,this)},this)},this)};var p={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self},d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this)},s.call(c.prototype),s.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},h.error=function(){var t=new h(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];h.redirect=function(t,e){if(m.indexOf(e)===-1)throw new RangeError("Invalid status code");return new h(null,{status:e,headers:{location:t}})},self.Headers=n,self.Request=c,self.Response=h,self.fetch=function(t,e){return new Promise(function(n,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=c.prototype.isPrototypeOf(t)&&!e?t:new c(t,e);var a=new XMLHttpRequest;a.onload=function(){var t=1223===a.status?204:a.status;if(t<100||t>599)return void r(new TypeError("Network request failed"));var e={status:t,statusText:a.statusText,headers:l(a),url:i()},o="response"in a?a.response:a.responseText;n(new h(o,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&p.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},self.fetch.polyfill=!0}}();var w={}.toString,_=function(t){return w.call(t).slice(8,-1)},O=n(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),x=O,j="__core-js_shared__",T=x[j]||(x[j]={}),P=function(t){return T[t]||(T[t]={})},S=0,A=Math.random(),E=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++S+A).toString(36))},I=n(function(t){var e=P("wks"),n=E,r=O.Symbol,i="function"==typeof r,o=t.exports=function(t){return e[t]||(e[t]=i&&r[t]||(i?r:n)("Symbol."+t))};o.store=e}),F=_,k=I("toStringTag"),C="Arguments"==F(function(){return arguments}()),R=function(t,e){try{return t[e]}catch(t){}},z=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=R(e=Object(t),k))?n:C?F(e):"Object"==(r=F(e))&&"function"==typeof e.callee?"Arguments":r},M=function(t){return"object"===("undefined"==typeof t?"undefined":b(t))?null!==t:"function"==typeof t},U=M,q=function(t){if(!U(t))throw TypeError(t+" is not an object!");return t},D=function(t){try{return!!t()}catch(t){return!0}},B=!D(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),L=M,K=O.document,N=L(K)&&L(K.createElement),V=function(t){return N?K.createElement(t):{}},H=!B&&!D(function(){return 7!=Object.defineProperty(V("div"),"a",{get:function(){return 7}}).a}),G=M,X=function(t,e){if(!G(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!G(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!G(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!G(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},J=q,Q=H,W=X,Y=Object.defineProperty,$=B?Object.defineProperty:function(t,e,n){if(J(t),e=W(e,!0),J(n),Q)try{return Y(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t},Z={f:$},tt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},et=Z,nt=tt,rt=B?function(t,e,n){return et.f(t,e,nt(1,n))}:function(t,e,n){return t[e]=n,t},it={}.hasOwnProperty,ot=function(t,e){return it.call(t,e)},at=n(function(t){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)}),st=n(function(t){var e=O,n=rt,r=ot,i=E("src"),o="toString",a=Function[o],s=(""+a).split(o);at.inspectSource=function(t){return a.call(t)},(t.exports=function(t,o,a,u){var c="function"==typeof a;c&&(r(a,"name")||n(a,"name",o)),t[o]!==a&&(c&&(r(a,i)||n(a,i,t[o]?""+t[o]:s.join(String(o)))),t===e?t[o]=a:u?t[o]?t[o]=a:n(t,o,a):(delete t[o],n(t,o,a)))})(Function.prototype,o,function(){return"function"==typeof this&&this[i]||a.call(this)})}),ut=z,ct={};ct[I("toStringTag")]="z",ct+""!="[object z]"&&st(Object.prototype,"toString",function(){return"[object "+ut(this)+"]"},!0);var ft=Math.ceil,lt=Math.floor,ht=function(t){return isNaN(t=+t)?0:(t>0?lt:ft)(t)},pt=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},dt=ht,mt=pt,vt=function(t){return function(e,n){var r,i,o=String(mt(e)),a=dt(n),s=o.length;return a<0||a>=s?t?"":void 0:(r=o.charCodeAt(a),r<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?t?o.charAt(a):r:t?o.slice(a,a+2):(r-55296<<10)+(i-56320)+65536)}},yt=!1,gt=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},bt=gt,wt=function(t,e,n){if(bt(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},_t=O,Ot=at,xt=rt,jt=st,Tt=wt,Pt="prototype",St=function t(e,n,r){var i,o,a,s,u=e&t.F,c=e&t.G,f=e&t.S,l=e&t.P,h=e&t.B,p=c?_t:f?_t[n]||(_t[n]={}):(_t[n]||{})[Pt],d=c?Ot:Ot[n]||(Ot[n]={}),m=d[Pt]||(d[Pt]={});c&&(r=n);for(i in r)o=!u&&p&&void 0!==p[i],a=(o?p:r)[i],s=h&&o?Tt(a,_t):l&&"function"==typeof a?Tt(Function.call,a):a,p&&jt(p,i,a,e&t.U),d[i]!=a&&xt(d,i,s),l&&m[i]!=a&&(m[i]=a)};_t.core=Ot,St.F=1,St.G=2,St.S=4,St.P=8,St.B=16,St.W=32,St.U=64,St.R=128;var At=St,Et={},It=_,Ft=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==It(t)?t.split(""):Object(t)},kt=Ft,Ct=pt,Rt=function(t){return kt(Ct(t))},zt=ht,Mt=Math.min,Ut=function(t){return t>0?Mt(zt(t),9007199254740991):0},qt=ht,Dt=Math.max,Bt=Math.min,Lt=function(t,e){return t=qt(t),t<0?Dt(t+e,0):Bt(t,e)},Kt=Rt,Nt=Ut,Vt=Lt,Ht=function(t){return function(e,n,r){var i,o=Kt(e),a=Nt(o.length),s=Vt(r,a);if(t&&n!=n){for(;a>s;)if(i=o[s++],i!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},Gt=P("keys"),Xt=E,Jt=function(t){return Gt[t]||(Gt[t]=Xt(t))},Qt=ot,Wt=Rt,Yt=Ht(!1),$t=Jt("IE_PROTO"),Zt=function(t,e){var n,r=Wt(t),i=0,o=[];for(n in r)n!=$t&&Qt(r,n)&&o.push(n);for(;e.length>i;)Qt(r,n=e[i++])&&(~Yt(o,n)||o.push(n));return o},te="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ee=Zt,ne=te,re=Object.keys||function(t){return ee(t,ne)},ie=Z,oe=q,ae=re,se=B?Object.defineProperties:function(t,e){oe(t);for(var n,r=ae(e),i=r.length,o=0;i>o;)ie.f(t,n=r[o++],e[n]);return t},ue=O.document&&document.documentElement,ce=q,fe=se,le=te,he=Jt("IE_PROTO"),pe=function(){},de="prototype",me=function(){var t,e=V("iframe"),n=le.length,r="<",i=">";for(e.style.display="none",ue.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(r+"script"+i+"document.F=Object"+r+"/script"+i),t.close(),me=t.F;n--;)delete me[de][le[n]];return me()},ve=Object.create||function(t,e){var n;return null!==t?(pe[de]=ce(t),n=new pe,pe[de]=null,n[he]=t):n=me(),void 0===e?n:fe(n,e)},ye=Z.f,ge=ot,be=I("toStringTag"),we=function(t,e,n){t&&!ge(t=n?t:t.prototype,be)&&ye(t,be,{configurable:!0,value:e})},_e=ve,Oe=tt,xe=we,je={};rt(je,I("iterator"),function(){return this});var Te=function(t,e,n){t.prototype=_e(je,{next:Oe(1,n)}),xe(t,e+" Iterator")},Pe=pt,Se=function(t){return Object(Pe(t))},Ae=ot,Ee=Se,Ie=Jt("IE_PROTO"),Fe=Object.prototype,ke=Object.getPrototypeOf||function(t){return t=Ee(t),Ae(t,Ie)?t[Ie]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Fe:null},Ce=yt,Re=At,ze=st,Me=rt,Ue=ot,qe=Et,De=Te,Be=we,Le=ke,Ke=I("iterator"),Ne=!([].keys&&"next"in[].keys()),Ve="@@iterator",He="keys",Ge="values",Xe=function(){return this},Je=function(t,e,n,r,i,o,a){De(n,e,r);var s,u,c,f=function(t){if(!Ne&&t in d)return d[t];switch(t){case He:return function(){return new n(this,t)};case Ge:return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h=i==Ge,p=!1,d=t.prototype,m=d[Ke]||d[Ve]||i&&d[i],v=m||f(i),y=i?h?f("entries"):v:void 0,g="Array"==e?d.entries||m:m;if(g&&(c=Le(g.call(new t)),c!==Object.prototype&&(Be(c,l,!0),Ce||Ue(c,Ke)||Me(c,Ke,Xe))),h&&m&&m.name!==Ge&&(p=!0,v=function(){return m.call(this)}),Ce&&!a||!Ne&&!p&&d[Ke]||Me(d,Ke,v),qe[e]=v,qe[l]=Xe,i)if(s={values:h?v:f(Ge),keys:o?v:f(He),entries:y},a)for(u in s)u in d||ze(d,u,s[u]);else Re(Re.P+Re.F*(Ne||p),e,s);return s},Qe=vt(!0);Je(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Qe(e,n),this._i+=t.length,{value:t,done:!1})});var We=I("unscopables"),Ye=Array.prototype;void 0==Ye[We]&&rt(Ye,We,{});var $e=function(t){Ye[We][t]=!0},Ze=function(t,e){return{value:e,done:!!t}},tn=$e,en=Ze,nn=Et,rn=Rt,on=Je(Array,"Array",function(t,e){this._t=rn(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,en(1)):"keys"==e?en(0,n):"values"==e?en(0,t[n]):en(0,[n,t[n]])},"values");nn.Arguments=nn.Array,tn("keys"),tn("values"),tn("entries");for(var an=on,sn=st,un=O,cn=rt,fn=Et,ln=I,hn=ln("iterator"),pn=ln("toStringTag"),dn=fn.Array,mn=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],vn=0;vn<5;vn++){var yn,gn=mn[vn],bn=un[gn],wn=bn&&bn.prototype;if(wn){wn[hn]||cn(wn,hn,dn),wn[pn]||cn(wn,pn,gn),fn[gn]=dn;for(yn in an)wn[yn]||sn(wn,yn,an[yn],!0)}}var _n,On,xn,jn=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Tn=q,Pn=function(t,e,n,r){try{return r?e(Tn(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&Tn(i.call(t)),e}},Sn=Et,An=I("iterator"),En=Array.prototype,In=function(t){return void 0!==t&&(Sn.Array===t||En[An]===t)},Fn=z,kn=I("iterator"),Cn=Et,Rn=at.getIteratorMethod=function(t){if(void 0!=t)return t[kn]||t["@@iterator"]||Cn[Fn(t)]},zn=n(function(t){var e=wt,n=Pn,r=In,i=q,o=Ut,a=Rn,s={},u={},c=t.exports=function(t,c,f,l,h){var p,d,m,v,y=h?function(){return t}:a(t),g=e(f,l,c?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(r(y)){for(p=o(t.length);p>b;b++)if(v=c?g(i(d=t[b])[0],d[1]):g(t[b]),v===s||v===u)return v}else for(m=y.call(t);!(d=m.next()).done;)if(v=n(m,g,d.value,c),v===s||v===u)return v};c.BREAK=s,c.RETURN=u}),Mn=q,Un=gt,qn=I("species"),Dn=function(t,e){var n,r=Mn(t).constructor;return void 0===r||void 0==(n=Mn(r)[qn])?e:Un(n)},Bn=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)},Ln=wt,Kn=Bn,Nn=ue,Vn=V,Hn=O,Gn=Hn.process,Xn=Hn.setImmediate,Jn=Hn.clearImmediate,Qn=Hn.MessageChannel,Wn=0,Yn={},$n="onreadystatechange",Zn=function(){var t=+this;if(Yn.hasOwnProperty(t)){var e=Yn[t];delete Yn[t],e()}},tr=function(t){Zn.call(t.data)};Xn&&Jn||(Xn=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Yn[++Wn]=function(){Kn("function"==typeof t?t:Function(t),e)},_n(Wn),Wn},Jn=function(t){delete Yn[t]},"process"==_(Gn)?_n=function(t){Gn.nextTick(Ln(Zn,t,1))}:Qn?(On=new Qn,xn=On.port2,On.port1.onmessage=tr,_n=Ln(xn.postMessage,xn,1)):Hn.addEventListener&&"function"==typeof postMessage&&!Hn.importScripts?(_n=function(t){Hn.postMessage(t+"","*")},Hn.addEventListener("message",tr,!1)):_n=$n in Vn("script")?function(t){Nn.appendChild(Vn("script"))[$n]=function(){Nn.removeChild(this),Zn.call(t)}}:function(t){setTimeout(Ln(Zn,t,1),0)});var er={set:Xn,clear:Jn},nr=O,rr=er.set,ir=nr.MutationObserver||nr.WebKitMutationObserver,or=nr.process,ar=nr.Promise,sr="process"==_(or),ur=function(){var t,e,n,r=function(){var r,i;for(sr&&(r=or.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(sr)n=function(){or.nextTick(r)};else if(ir){var i=!0,o=document.createTextNode("");new ir(r).observe(o,{characterData:!0}),n=function(){o.data=i=!i}}else if(ar&&ar.resolve){var a=ar.resolve();n=function(){a.then(r)}}else n=function(){rr.call(nr,r)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}},cr=st,fr=function(t,e,n){for(var r in e)cr(t,r,e[r],n);return t},lr=O,hr=Z,pr=B,dr=I("species"),mr=function(t){var e=lr[t];pr&&e&&!e[dr]&&hr.f(e,dr,{configurable:!0,get:function(){return this}})},vr=I("iterator"),yr=!1;try{var gr=[7][vr]();gr.return=function(){yr=!0},Array.from(gr,function(){throw 2})}catch(t){}var br,wr,_r,Or=function(t,e){if(!e&&!yr)return!1;var n=!1;try{var r=[7],i=r[vr]();i.next=function(){return{done:n=!0}},r[vr]=function(){return i},t(r)}catch(t){}return n},xr=yt,jr=O,Tr=wt,Pr=z,Sr=At,Ar=M,Er=gt,Ir=jn,Fr=zn,kr=Dn,Cr=er.set,Rr=ur(),zr="Promise",Mr=jr.TypeError,Ur=jr.process,qr=jr[zr],Ur=jr.process,Dr="process"==Pr(Ur),Br=function(){},Lr=!!function(){try{var t=qr.resolve(1),e=(t.constructor={})[I("species")]=function(t){t(Br,Br)};return(Dr||"function"==typeof PromiseRejectionEvent)&&t.then(Br)instanceof e}catch(t){}}(),Kr=function(t,e){return t===e||t===qr&&e===_r},Nr=function(t){var e;return!(!Ar(t)||"function"!=typeof(e=t.then))&&e},Vr=function(t){return Kr(qr,t)?new Hr(t):new wr(t)},Hr=wr=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw Mr("Bad Promise constructor");e=t,n=r}),this.resolve=Er(e),this.reject=Er(n)},Gr=function(t){try{t()}catch(t){return{error:t}}},Xr=function(t,e){if(!t._n){t._n=!0;var n=t._c;Rr(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a=i?e.ok:e.fail,s=e.resolve,u=e.reject,c=e.domain;try{a?(i||(2==t._h&&Wr(t),t._h=1),a===!0?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===e.promise?u(Mr("Promise-chain cycle")):(o=Nr(n))?o.call(n,s,u):s(n)):u(r)}catch(t){u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&Jr(t)})}},Jr=function(t){Cr.call(jr,function(){var e,n,r,i=t._v;if(Qr(t)&&(e=Gr(function(){Dr?Ur.emit("unhandledRejection",i,t):(n=jr.onunhandledrejection)?n({promise:t,reason:i}):(r=jr.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=Dr||Qr(t)?2:1),t._a=void 0,e)throw e.error})},Qr=function t(e){if(1==e._h)return!1;for(var n,r=e._a||e._c,i=0;r.length>i;)if(n=r[i++],n.fail||!t(n.promise))return!1;return!0},Wr=function(t){Cr.call(jr,function(){var e;Dr?Ur.emit("rejectionHandled",t):(e=jr.onrejectionhandled)&&e({promise:t,reason:t._v})})},Yr=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),Xr(e,!0))},$r=function t(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw Mr("Promise can't be resolved itself");(n=Nr(e))?Rr(function(){var i={_w:r,_d:!1};try{n.call(e,Tr(t,i,1),Tr(Yr,i,1))}catch(t){Yr.call(i,t)}}):(r._v=e,r._s=1,Xr(r,!1))}catch(t){Yr.call({_w:r,_d:!1},t)}}};Lr||(qr=function(t){Ir(this,qr,zr,"_h"),Er(t),br.call(this);try{t(Tr($r,this,1),Tr(Yr,this,1))}catch(t){Yr.call(this,t)}},br=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},br.prototype=fr(qr.prototype,{then:function(t,e){var n=Vr(kr(this,qr));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Dr?Ur.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Xr(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Hr=function(){var t=new br;this.promise=t,this.resolve=Tr($r,t,1),this.reject=Tr(Yr,t,1)}),Sr(Sr.G+Sr.W+Sr.F*!Lr,{Promise:qr}),we(qr,zr),mr(zr),_r=at[zr],Sr(Sr.S+Sr.F*!Lr,zr,{reject:function(t){var e=Vr(this),n=e.reject;return n(t),e.promise}}),Sr(Sr.S+Sr.F*(xr||!Lr),zr,{resolve:function(t){if(t instanceof qr&&Kr(t.constructor,this))return t;var e=Vr(this),n=e.resolve;return n(t),e.promise}}),Sr(Sr.S+Sr.F*!(Lr&&Or(function(t){qr.all(t).catch(Br)})),zr,{all:function(t){var e=this,n=Vr(e),r=n.resolve,i=n.reject,o=Gr(function(){var n=[],o=0,a=1;Fr(t,!1,function(t){var s=o++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(t){var e=this,n=Vr(e),r=n.reject,i=Gr(function(){Fr(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}});var Zr=at.Promise,ti=n(function(t,e){!function(){function t(t){this.message=t}var n="undefined"!=typeof e?e:this,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",n.btoa||(n.btoa=function(e){for(var n,i,o=String(e),a=0,s=r,u="";o.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&n>>8-a%1*8)){if(i=o.charCodeAt(a+=.75),i>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|i}return u}),n.atob||(n.atob=function(e){var n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,o,a=0,s=0,u="";o=n.charAt(s++);~o&&(i=a%4?64*i+o:o,a++%4)?u+=String.fromCharCode(255&i>>(-2*a&6)):0)o=r.indexOf(o);return u})}()}),ei=void 0;ei="undefined"==typeof global?window:global;var ni={set:r,get:i};ni.set("btoa",ti.btoa),ni.set("atob",ti.atob),ni.set("Promise",Zr);var ri=void 0;ri="function"==typeof Object.assign?Object.assign:function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");var e=Object(t),n=[].slice.call(arguments,1);return n.length>0&&n.forEach(function(t){if(void 0!==t&&null!==t){var n=void 0;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}),e};var ii=ri,oi=void 0;oi=Array.prototype.includes?function(t){var e=[].slice.call(arguments,1);return Array.prototype.includes.apply(t,e)}:function(t,e){var n=Object(t),r=parseInt(n.length,10)||0;if(0===r)return!1;var i=parseInt(arguments[2],10)||0,o=void 0;for(i>=0?o=i:(o=r+i,o<0&&(o=0));o<r;){var a=n[o];if(e===a||e!==e&&a!==a)return!0;o++}return!1};var ai=oi,si=s({constructor:function(){},static:{extend:function(t){return s(t,this)}}}),ui=si.extend({constructor:function(){},debug:u("debug"),info:u("info"),warn:u("warn"),error:u("error")}),ci=new ui,fi=si.extend({constructor:function(t){var e=this;Object.keys(this.deprecatedProperties).forEach(function(n){if(t.hasOwnProperty(n)){var r=e.deprecatedProperties[n],i=e[r];i(t[n],t)}}),this.requiredProperties.forEach(function(n){if(!t.hasOwnProperty(n))throw new Error("new Config() requires the option '"+n+"'");e[n]=t[n]}),this.optionalProperties.forEach(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})},deprecatedProperties:{apiKey:"transformApiKey",myShopifyDomain:"transformMyShopifyDomain"},transformMyShopifyDomain:function(t,e){ci.warn("Config - ","myShopifyDomain is deprecated, please use domain and provide the full shop domain."),e.domain=t+".myshopify.com"},transformApiKey:function(t,e){ci.warn("Config - ","apiKey is deprecated, please use accessToken instead."),e.accessToken=t},requiredProperties:["accessToken","appId","domain"],optionalProperties:["ajaxHeaders"],accessToken:"",apiKey:"",appId:"",domain:"",myShopifyDomain:"",ajaxHeaders:{}}),li="v0.7.1-66ba4e4",hi=si.extend({constructor:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.attrs=t,ii(this,e)},attrs:null,serializer:null,adapter:null,shopClient:null}),pi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments),this.selected=this.values[0]}},{name:{get:function(){return this.attrs.name},configurable:!0,enumerable:!0},values:{get:function(){return this.attrs.values},configurable:!0,enumerable:!0},selected:{get:function(){return this._selected},set:function(t){if(!ai(this.values,t))throw new Error("Invalid option selection for "+this.name+".");return this._selected=t,t},configurable:!0,enumerable:!0}})),di=[{name:"pico",dimension:"16x16"},{name:"icon",dimension:"32x32"},{name:"thumb",dimension:"50x50"},{name:"small",dimension:"100x100"},{name:"compact",dimension:"160x160"},{name:"medium",dimension:"240x240"},{name:"large",dimension:"480x480"},{name:"grande",dimension:"600x600"},{name:"1024x1024",dimension:"1024x1024"},{name:"2048x2048",dimension:"2048x2048"}],mi=si.extend(Object.defineProperties({constructor:function(t){var e=this;Object.keys(t).forEach(function(n){e[n]=t[n]})}},{variants:{get:function(){var t=this.src,e=t.lastIndexOf("."),n=t.slice(0,e),r=t.slice(e);return di.forEach(function(t){t.src=n+"_"+t.name+r}),di},configurable:!0,enumerable:!0}})),vi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)},checkoutUrl:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.config,n="https://"+e.domain+"/cart",r=this.id+":"+parseInt(t,10),i="access_token="+e.accessToken+"&_fd=0";return n+"/"+r+"?"+i}},{id:{get:function(){return this.attrs.variant.id},configurable:!0,enumerable:!0},productId:{get:function(){return this.attrs.product.id},configurable:!0,enumerable:!0},title:{get:function(){return this.attrs.variant.title},configurable:!0,enumerable:!0},productTitle:{get:function(){return this.attrs.product.title},configurable:!0,enumerable:!0},compareAtPrice:{get:function(){return this.attrs.variant.compare_at_price},configurable:!0,enumerable:!0},price:{get:function(){return this.attrs.variant.price},configurable:!0,enumerable:!0},formattedPrice:{get:function(){return this.attrs.variant.formatted_price},configurable:!0,enumerable:!0},grams:{get:function(){return this.attrs.variant.grams},configurable:!0,enumerable:!0},optionValues:{get:function(){return this.attrs.variant.option_values},configurable:!0,enumerable:!0},available:{get:function(){return this.attrs.variant.available},configurable:!0,enumerable:!0},image:{get:function(){var t=this.id,e=this.attrs.product.images,n=e[0],r=e.filter(function(e){return e.variant_ids.indexOf(t)!==-1})[0],i=r||n;return i?new mi(i):null},configurable:!0,enumerable:!0},imageVariants:{get:function(){return this.image?this.image.variants:[]},configurable:!0,enumerable:!0}})),yi=function(t){return t.reduce(function(t,e){return t.indexOf(e)<0&&t.push(e),t},[])},gi="https://widgets.shopifyapps.com/assets/no-image.svg",bi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)}},{id:{get:function(){return this.attrs.product_id},configurable:!0,enumerable:!0},title:{get:function(){return this.attrs.title},configurable:!0,enumerable:!0},description:{get:function(){return this.attrs.body_html},configurable:!0,enumerable:!0},images:{get:function(){return this.attrs.images.map(function(t){return new mi(t)})},configurable:!0,enumerable:!0},memoized:{get:function(){return this._memoized=this._memoized||{},this._memoized},configurable:!0,enumerable:!0},options:{get:function(){if(this.memoized.options)return this.memoized.options;var t=this.attrs.options,e=this.variants;return this.memoized.options=t.map(function(t){var n=t.name,r=e.reduce(function(e,n){var r=n.optionValues.filter(function(e){return e.name===t.name})[0];return e.push(r.value),e},[]),i=yi(r);return new pi({name:n,values:i})}),this.memoized.options},configurable:!0,enumerable:!0},variants:{get:function(){var t=this;return this.attrs.variants.map(function(e){return new vi({variant:e,product:t},{config:t.config})})},configurable:!0,enumerable:!0},selections:{get:function(){return this.options.map(function(t){return t.selected})},configurable:!0,enumerable:!0},selectedVariant:{get:function(){var t=this.selections.join(" / ");return this.variants.filter(function(e){return e.title===t})[0]||null},configurable:!0,enumerable:!0},selectedVariantImage:{get:function(){return this.selectedVariant?this.selectedVariant.image:null},configurable:!0,enumerable:!0}})),wi=si.extend({constructor:function(t){this.config=t},rootKeyForType:function(t){return t.slice(0,-1)+"_listing";
1
+ !function(t,e){if("function"==typeof define&&define.amd)define("shopify-buy",["module"],e);else if("undefined"!=typeof exports)e(module);else{var n={exports:{}};e(n),t.ShopifyBuy=n.exports}}(this,function(t){"use strict";function e(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function r(t,e){ei[t]||(ei[t]=e)}function i(t){return ei[t]}function o(t,e){function n(){var n=this.super;this.super=function(){return e.apply(this,arguments)};var r=t.apply(this,arguments);return this.super=n,r}return n.wrappedFunction=t,n}function a(t,e,n){var r=Object.getPrototypeOf(n);t.forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t),a=r.hasOwnProperty(t)&&Object.getOwnPropertyDescriptor(r,t);if("function"==typeof a.value&&"function"==typeof i.value){var s=o(i.value,a.value);Object.defineProperty(n,t,{value:s})}else Object.defineProperty(n,t,i)})}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=o(t.constructor,e),r=Object.getOwnPropertyNames(t).filter(function(t){return!ai(["constructor","static"],t)});ii(n,e),n.prototype=Object.create(e.prototype),a(r,t,n.prototype),n.prototype.constructor=n;var i=t.static;if(i){var s=Object.getOwnPropertyNames(i);a(s,i,n)}return n}function u(t){var n=function(){var e=void 0;e=console[t]?Function.prototype.bind.call(console[t],console):Function.prototype.bind.call(console.log,console),e.apply(void 0,arguments)};return function(){var t=[].concat(Array.prototype.slice.call(arguments));t.unshift("[JS-BUY-SDK]: "),n.apply(void 0,e(t))}}function c(t,e){var n=void 0;if(e.headers&&Object.keys(e.headers).forEach(function(t){"authorization"===t.toLowerCase()&&(n=e.headers[t])}),n){var r=n.split(" ").slice(-1)[0];try{var i=atob(r),o=void 0;return o=t.indexOf("?")>-1?t+"&_x_http_authorization="+i:t+"?_x_http_authorization="+i}catch(t){}}return t}function f(t,e,n){return new Promise(function(r,i){function o(){i(new Error("There was an error with the XDR"))}var a=new XDomainRequest;a.onload=function(){try{var t=JSON.parse(a.responseText);r({json:t,originalResponse:a,isJSON:!0})}catch(t){r({text:a.responseText,originalResponse:a,isText:!0})}},a.onerror=o,a.ontimeout=o,a.open(t,c(e,n)),a.send(n.data)})}function l(){var t="undefined"==typeof window,e="function"==typeof require;return t&&e}function h(t){if(t.status>=200&&t.status<300)return t;var e=new Error(t.statusText);throw e.status=t.status,e.response=t,e}function p(t){return t.json().then(function(e){return{json:e,originalResponse:t,isJSON:!0}}).catch(function(){var e=t.clone();return e.text().then(function(t){return{text:t,originalResponse:e,isText:!0}})})}function d(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!l()){var r=new XMLHttpRequest;if(!("withCredentials"in r))return f.apply(void 0,arguments)}return n.method=t,n.mode="cors",fetch(e,n).then(h).then(p)}function m(){return++Pi}function v(t){if(t&&t[Oi])return t[Oi];if(void 0===t)return"(undefined)";if(null===t)return"(null)";var e="undefined"==typeof t?"undefined":b(t),n=void 0;switch(e){case"number":n=Si[t],n||(n=Si[t]="nu"+t);break;case"string":n=Ai[t],n||(n=Ai[t]="st"+m());break;case"boolean":n=t?"(true)":"(false)";break;default:if(t===Object){n="(Object)";break}if(t===Array){n="(Array)";break}n=ji+"."+m(),null===t[Oi]?t[Oi]=n:(Ti.value=n,Object.defineProperty(t,Oi,Ti))}return n}function y(t,e){return t===e||Object.keys(t).every(function(n){return t[n]instanceof Date?t[n].toString()===e[n].toString():"object"===b(t[n])?y(t[n],e[n]):t[n]===e[n]})}function g(t,e){var n=void 0;switch(t){case"all":n=function(){return this.fetchAll(e)};break;case"one":n=function(){return this.fetch.apply(this,[e].concat(Array.prototype.slice.call(arguments)))};break;case"query":n=function(){return this.fetchQuery.apply(this,[e].concat(Array.prototype.slice.call(arguments)))}}return n}var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function t(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function e(t){return"string"!=typeof t&&(t=String(t)),t}function n(t){this.map={},t instanceof n?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function r(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function i(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function o(t){var e=new FileReader;return e.readAsArrayBuffer(t),i(e)}function a(t){var e=new FileReader;return e.readAsText(t),i(e)}function s(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(p.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(p.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(t){if(!p.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Error("unsupported BodyInit type")}else this._bodyText=""},p.blob?(this.blob=function(){var t=r(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(o)},this.text=function(){var t=r(this);if(t)return t;if(this._bodyBlob)return a(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var t=r(this);return t?t:Promise.resolve(this._bodyText)},p.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(t){var e=t.toUpperCase();return d.indexOf(e)>-1?e:t}function c(t,e){e=e||{};var r=e.body;if(c.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new n(t.headers)),this.method=t.method,this.mode=t.mode,r||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new n(e.headers)),this.method=u(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function f(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function l(t){var e=new n,r=t.getAllResponseHeaders().trim().split("\n");return r.forEach(function(t){var n=t.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();e.append(r,i)}),e}function h(t,e){e||(e={}),this._initBody(t),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof n?e.headers:new n(e.headers),this.url=e.url||""}if(!self.fetch){n.prototype.append=function(n,r){n=t(n),r=e(r);var i=this.map[n];i||(i=[],this.map[n]=i),i.push(r)},n.prototype.delete=function(e){delete this.map[t(e)]},n.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},n.prototype.getAll=function(e){return this.map[t(e)]||[]},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(n,r){this.map[t(n)]=[e(r)]},n.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){t.call(e,r,n,this)},this)},this)};var p={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self},d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this)},s.call(c.prototype),s.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},h.error=function(){var t=new h(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];h.redirect=function(t,e){if(m.indexOf(e)===-1)throw new RangeError("Invalid status code");return new h(null,{status:e,headers:{location:t}})},self.Headers=n,self.Request=c,self.Response=h,self.fetch=function(t,e){return new Promise(function(n,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=c.prototype.isPrototypeOf(t)&&!e?t:new c(t,e);var a=new XMLHttpRequest;a.onload=function(){var t=1223===a.status?204:a.status;if(t<100||t>599)return void r(new TypeError("Network request failed"));var e={status:t,statusText:a.statusText,headers:l(a),url:i()},o="response"in a?a.response:a.responseText;n(new h(o,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&p.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},self.fetch.polyfill=!0}}();var w={}.toString,_=function(t){return w.call(t).slice(8,-1)},O=n(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),x=O,j="__core-js_shared__",T=x[j]||(x[j]={}),P=function(t){return T[t]||(T[t]={})},S=0,A=Math.random(),E=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++S+A).toString(36))},I=n(function(t){var e=P("wks"),n=E,r=O.Symbol,i="function"==typeof r,o=t.exports=function(t){return e[t]||(e[t]=i&&r[t]||(i?r:n)("Symbol."+t))};o.store=e}),F=_,k=I("toStringTag"),C="Arguments"==F(function(){return arguments}()),R=function(t,e){try{return t[e]}catch(t){}},z=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=R(e=Object(t),k))?n:C?F(e):"Object"==(r=F(e))&&"function"==typeof e.callee?"Arguments":r},M=function(t){return"object"===("undefined"==typeof t?"undefined":b(t))?null!==t:"function"==typeof t},U=M,q=function(t){if(!U(t))throw TypeError(t+" is not an object!");return t},D=function(t){try{return!!t()}catch(t){return!0}},B=!D(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),L=M,K=O.document,N=L(K)&&L(K.createElement),V=function(t){return N?K.createElement(t):{}},H=!B&&!D(function(){return 7!=Object.defineProperty(V("div"),"a",{get:function(){return 7}}).a}),G=M,X=function(t,e){if(!G(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!G(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!G(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!G(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},J=q,Q=H,W=X,Y=Object.defineProperty,$=B?Object.defineProperty:function(t,e,n){if(J(t),e=W(e,!0),J(n),Q)try{return Y(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t},Z={f:$},tt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},et=Z,nt=tt,rt=B?function(t,e,n){return et.f(t,e,nt(1,n))}:function(t,e,n){return t[e]=n,t},it={}.hasOwnProperty,ot=function(t,e){return it.call(t,e)},at=n(function(t){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)}),st=n(function(t){var e=O,n=rt,r=ot,i=E("src"),o="toString",a=Function[o],s=(""+a).split(o);at.inspectSource=function(t){return a.call(t)},(t.exports=function(t,o,a,u){var c="function"==typeof a;c&&(r(a,"name")||n(a,"name",o)),t[o]!==a&&(c&&(r(a,i)||n(a,i,t[o]?""+t[o]:s.join(String(o)))),t===e?t[o]=a:u?t[o]?t[o]=a:n(t,o,a):(delete t[o],n(t,o,a)))})(Function.prototype,o,function(){return"function"==typeof this&&this[i]||a.call(this)})}),ut=z,ct={};ct[I("toStringTag")]="z",ct+""!="[object z]"&&st(Object.prototype,"toString",function(){return"[object "+ut(this)+"]"},!0);var ft=Math.ceil,lt=Math.floor,ht=function(t){return isNaN(t=+t)?0:(t>0?lt:ft)(t)},pt=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},dt=ht,mt=pt,vt=function(t){return function(e,n){var r,i,o=String(mt(e)),a=dt(n),s=o.length;return a<0||a>=s?t?"":void 0:(r=o.charCodeAt(a),r<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?t?o.charAt(a):r:t?o.slice(a,a+2):(r-55296<<10)+(i-56320)+65536)}},yt=!1,gt=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},bt=gt,wt=function(t,e,n){if(bt(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},_t=O,Ot=at,xt=rt,jt=st,Tt=wt,Pt="prototype",St=function t(e,n,r){var i,o,a,s,u=e&t.F,c=e&t.G,f=e&t.S,l=e&t.P,h=e&t.B,p=c?_t:f?_t[n]||(_t[n]={}):(_t[n]||{})[Pt],d=c?Ot:Ot[n]||(Ot[n]={}),m=d[Pt]||(d[Pt]={});c&&(r=n);for(i in r)o=!u&&p&&void 0!==p[i],a=(o?p:r)[i],s=h&&o?Tt(a,_t):l&&"function"==typeof a?Tt(Function.call,a):a,p&&jt(p,i,a,e&t.U),d[i]!=a&&xt(d,i,s),l&&m[i]!=a&&(m[i]=a)};_t.core=Ot,St.F=1,St.G=2,St.S=4,St.P=8,St.B=16,St.W=32,St.U=64,St.R=128;var At=St,Et={},It=_,Ft=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==It(t)?t.split(""):Object(t)},kt=Ft,Ct=pt,Rt=function(t){return kt(Ct(t))},zt=ht,Mt=Math.min,Ut=function(t){return t>0?Mt(zt(t),9007199254740991):0},qt=ht,Dt=Math.max,Bt=Math.min,Lt=function(t,e){return t=qt(t),t<0?Dt(t+e,0):Bt(t,e)},Kt=Rt,Nt=Ut,Vt=Lt,Ht=function(t){return function(e,n,r){var i,o=Kt(e),a=Nt(o.length),s=Vt(r,a);if(t&&n!=n){for(;a>s;)if(i=o[s++],i!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},Gt=P("keys"),Xt=E,Jt=function(t){return Gt[t]||(Gt[t]=Xt(t))},Qt=ot,Wt=Rt,Yt=Ht(!1),$t=Jt("IE_PROTO"),Zt=function(t,e){var n,r=Wt(t),i=0,o=[];for(n in r)n!=$t&&Qt(r,n)&&o.push(n);for(;e.length>i;)Qt(r,n=e[i++])&&(~Yt(o,n)||o.push(n));return o},te="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ee=Zt,ne=te,re=Object.keys||function(t){return ee(t,ne)},ie=Z,oe=q,ae=re,se=B?Object.defineProperties:function(t,e){oe(t);for(var n,r=ae(e),i=r.length,o=0;i>o;)ie.f(t,n=r[o++],e[n]);return t},ue=O.document&&document.documentElement,ce=q,fe=se,le=te,he=Jt("IE_PROTO"),pe=function(){},de="prototype",me=function(){var t,e=V("iframe"),n=le.length,r="<",i=">";for(e.style.display="none",ue.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(r+"script"+i+"document.F=Object"+r+"/script"+i),t.close(),me=t.F;n--;)delete me[de][le[n]];return me()},ve=Object.create||function(t,e){var n;return null!==t?(pe[de]=ce(t),n=new pe,pe[de]=null,n[he]=t):n=me(),void 0===e?n:fe(n,e)},ye=Z.f,ge=ot,be=I("toStringTag"),we=function(t,e,n){t&&!ge(t=n?t:t.prototype,be)&&ye(t,be,{configurable:!0,value:e})},_e=ve,Oe=tt,xe=we,je={};rt(je,I("iterator"),function(){return this});var Te=function(t,e,n){t.prototype=_e(je,{next:Oe(1,n)}),xe(t,e+" Iterator")},Pe=pt,Se=function(t){return Object(Pe(t))},Ae=ot,Ee=Se,Ie=Jt("IE_PROTO"),Fe=Object.prototype,ke=Object.getPrototypeOf||function(t){return t=Ee(t),Ae(t,Ie)?t[Ie]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Fe:null},Ce=yt,Re=At,ze=st,Me=rt,Ue=ot,qe=Et,De=Te,Be=we,Le=ke,Ke=I("iterator"),Ne=!([].keys&&"next"in[].keys()),Ve="@@iterator",He="keys",Ge="values",Xe=function(){return this},Je=function(t,e,n,r,i,o,a){De(n,e,r);var s,u,c,f=function(t){if(!Ne&&t in d)return d[t];switch(t){case He:return function(){return new n(this,t)};case Ge:return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h=i==Ge,p=!1,d=t.prototype,m=d[Ke]||d[Ve]||i&&d[i],v=m||f(i),y=i?h?f("entries"):v:void 0,g="Array"==e?d.entries||m:m;if(g&&(c=Le(g.call(new t)),c!==Object.prototype&&(Be(c,l,!0),Ce||Ue(c,Ke)||Me(c,Ke,Xe))),h&&m&&m.name!==Ge&&(p=!0,v=function(){return m.call(this)}),Ce&&!a||!Ne&&!p&&d[Ke]||Me(d,Ke,v),qe[e]=v,qe[l]=Xe,i)if(s={values:h?v:f(Ge),keys:o?v:f(He),entries:y},a)for(u in s)u in d||ze(d,u,s[u]);else Re(Re.P+Re.F*(Ne||p),e,s);return s},Qe=vt(!0);Je(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Qe(e,n),this._i+=t.length,{value:t,done:!1})});var We=I("unscopables"),Ye=Array.prototype;void 0==Ye[We]&&rt(Ye,We,{});var $e=function(t){Ye[We][t]=!0},Ze=function(t,e){return{value:e,done:!!t}},tn=$e,en=Ze,nn=Et,rn=Rt,on=Je(Array,"Array",function(t,e){this._t=rn(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,en(1)):"keys"==e?en(0,n):"values"==e?en(0,t[n]):en(0,[n,t[n]])},"values");nn.Arguments=nn.Array,tn("keys"),tn("values"),tn("entries");for(var an=on,sn=st,un=O,cn=rt,fn=Et,ln=I,hn=ln("iterator"),pn=ln("toStringTag"),dn=fn.Array,mn=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],vn=0;vn<5;vn++){var yn,gn=mn[vn],bn=un[gn],wn=bn&&bn.prototype;if(wn){wn[hn]||cn(wn,hn,dn),wn[pn]||cn(wn,pn,gn),fn[gn]=dn;for(yn in an)wn[yn]||sn(wn,yn,an[yn],!0)}}var _n,On,xn,jn=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Tn=q,Pn=function(t,e,n,r){try{return r?e(Tn(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&Tn(i.call(t)),e}},Sn=Et,An=I("iterator"),En=Array.prototype,In=function(t){return void 0!==t&&(Sn.Array===t||En[An]===t)},Fn=z,kn=I("iterator"),Cn=Et,Rn=at.getIteratorMethod=function(t){if(void 0!=t)return t[kn]||t["@@iterator"]||Cn[Fn(t)]},zn=n(function(t){var e=wt,n=Pn,r=In,i=q,o=Ut,a=Rn,s={},u={},c=t.exports=function(t,c,f,l,h){var p,d,m,v,y=h?function(){return t}:a(t),g=e(f,l,c?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(r(y)){for(p=o(t.length);p>b;b++)if(v=c?g(i(d=t[b])[0],d[1]):g(t[b]),v===s||v===u)return v}else for(m=y.call(t);!(d=m.next()).done;)if(v=n(m,g,d.value,c),v===s||v===u)return v};c.BREAK=s,c.RETURN=u}),Mn=q,Un=gt,qn=I("species"),Dn=function(t,e){var n,r=Mn(t).constructor;return void 0===r||void 0==(n=Mn(r)[qn])?e:Un(n)},Bn=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)},Ln=wt,Kn=Bn,Nn=ue,Vn=V,Hn=O,Gn=Hn.process,Xn=Hn.setImmediate,Jn=Hn.clearImmediate,Qn=Hn.MessageChannel,Wn=0,Yn={},$n="onreadystatechange",Zn=function(){var t=+this;if(Yn.hasOwnProperty(t)){var e=Yn[t];delete Yn[t],e()}},tr=function(t){Zn.call(t.data)};Xn&&Jn||(Xn=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Yn[++Wn]=function(){Kn("function"==typeof t?t:Function(t),e)},_n(Wn),Wn},Jn=function(t){delete Yn[t]},"process"==_(Gn)?_n=function(t){Gn.nextTick(Ln(Zn,t,1))}:Qn?(On=new Qn,xn=On.port2,On.port1.onmessage=tr,_n=Ln(xn.postMessage,xn,1)):Hn.addEventListener&&"function"==typeof postMessage&&!Hn.importScripts?(_n=function(t){Hn.postMessage(t+"","*")},Hn.addEventListener("message",tr,!1)):_n=$n in Vn("script")?function(t){Nn.appendChild(Vn("script"))[$n]=function(){Nn.removeChild(this),Zn.call(t)}}:function(t){setTimeout(Ln(Zn,t,1),0)});var er={set:Xn,clear:Jn},nr=O,rr=er.set,ir=nr.MutationObserver||nr.WebKitMutationObserver,or=nr.process,ar=nr.Promise,sr="process"==_(or),ur=function(){var t,e,n,r=function(){var r,i;for(sr&&(r=or.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(sr)n=function(){or.nextTick(r)};else if(ir){var i=!0,o=document.createTextNode("");new ir(r).observe(o,{characterData:!0}),n=function(){o.data=i=!i}}else if(ar&&ar.resolve){var a=ar.resolve();n=function(){a.then(r)}}else n=function(){rr.call(nr,r)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}},cr=st,fr=function(t,e,n){for(var r in e)cr(t,r,e[r],n);return t},lr=O,hr=Z,pr=B,dr=I("species"),mr=function(t){var e=lr[t];pr&&e&&!e[dr]&&hr.f(e,dr,{configurable:!0,get:function(){return this}})},vr=I("iterator"),yr=!1;try{var gr=[7][vr]();gr.return=function(){yr=!0},Array.from(gr,function(){throw 2})}catch(t){}var br,wr,_r,Or=function(t,e){if(!e&&!yr)return!1;var n=!1;try{var r=[7],i=r[vr]();i.next=function(){return{done:n=!0}},r[vr]=function(){return i},t(r)}catch(t){}return n},xr=yt,jr=O,Tr=wt,Pr=z,Sr=At,Ar=M,Er=gt,Ir=jn,Fr=zn,kr=Dn,Cr=er.set,Rr=ur(),zr="Promise",Mr=jr.TypeError,Ur=jr.process,qr=jr[zr],Ur=jr.process,Dr="process"==Pr(Ur),Br=function(){},Lr=!!function(){try{var t=qr.resolve(1),e=(t.constructor={})[I("species")]=function(t){t(Br,Br)};return(Dr||"function"==typeof PromiseRejectionEvent)&&t.then(Br)instanceof e}catch(t){}}(),Kr=function(t,e){return t===e||t===qr&&e===_r},Nr=function(t){var e;return!(!Ar(t)||"function"!=typeof(e=t.then))&&e},Vr=function(t){return Kr(qr,t)?new Hr(t):new wr(t)},Hr=wr=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw Mr("Bad Promise constructor");e=t,n=r}),this.resolve=Er(e),this.reject=Er(n)},Gr=function(t){try{t()}catch(t){return{error:t}}},Xr=function(t,e){if(!t._n){t._n=!0;var n=t._c;Rr(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a=i?e.ok:e.fail,s=e.resolve,u=e.reject,c=e.domain;try{a?(i||(2==t._h&&Wr(t),t._h=1),a===!0?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===e.promise?u(Mr("Promise-chain cycle")):(o=Nr(n))?o.call(n,s,u):s(n)):u(r)}catch(t){u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&Jr(t)})}},Jr=function(t){Cr.call(jr,function(){var e,n,r,i=t._v;if(Qr(t)&&(e=Gr(function(){Dr?Ur.emit("unhandledRejection",i,t):(n=jr.onunhandledrejection)?n({promise:t,reason:i}):(r=jr.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=Dr||Qr(t)?2:1),t._a=void 0,e)throw e.error})},Qr=function t(e){if(1==e._h)return!1;for(var n,r=e._a||e._c,i=0;r.length>i;)if(n=r[i++],n.fail||!t(n.promise))return!1;return!0},Wr=function(t){Cr.call(jr,function(){var e;Dr?Ur.emit("rejectionHandled",t):(e=jr.onrejectionhandled)&&e({promise:t,reason:t._v})})},Yr=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),Xr(e,!0))},$r=function t(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw Mr("Promise can't be resolved itself");(n=Nr(e))?Rr(function(){var i={_w:r,_d:!1};try{n.call(e,Tr(t,i,1),Tr(Yr,i,1))}catch(t){Yr.call(i,t)}}):(r._v=e,r._s=1,Xr(r,!1))}catch(t){Yr.call({_w:r,_d:!1},t)}}};Lr||(qr=function(t){Ir(this,qr,zr,"_h"),Er(t),br.call(this);try{t(Tr($r,this,1),Tr(Yr,this,1))}catch(t){Yr.call(this,t)}},br=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},br.prototype=fr(qr.prototype,{then:function(t,e){var n=Vr(kr(this,qr));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Dr?Ur.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Xr(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Hr=function(){var t=new br;this.promise=t,this.resolve=Tr($r,t,1),this.reject=Tr(Yr,t,1)}),Sr(Sr.G+Sr.W+Sr.F*!Lr,{Promise:qr}),we(qr,zr),mr(zr),_r=at[zr],Sr(Sr.S+Sr.F*!Lr,zr,{reject:function(t){var e=Vr(this),n=e.reject;return n(t),e.promise}}),Sr(Sr.S+Sr.F*(xr||!Lr),zr,{resolve:function(t){if(t instanceof qr&&Kr(t.constructor,this))return t;var e=Vr(this),n=e.resolve;return n(t),e.promise}}),Sr(Sr.S+Sr.F*!(Lr&&Or(function(t){qr.all(t).catch(Br)})),zr,{all:function(t){var e=this,n=Vr(e),r=n.resolve,i=n.reject,o=Gr(function(){var n=[],o=0,a=1;Fr(t,!1,function(t){var s=o++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(t){var e=this,n=Vr(e),r=n.reject,i=Gr(function(){Fr(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}});var Zr=at.Promise,ti=n(function(t,e){!function(){function t(t){this.message=t}var n="undefined"!=typeof e?e:this,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",n.btoa||(n.btoa=function(e){for(var n,i,o=String(e),a=0,s=r,u="";o.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&n>>8-a%1*8)){if(i=o.charCodeAt(a+=.75),i>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|i}return u}),n.atob||(n.atob=function(e){var n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,o,a=0,s=0,u="";o=n.charAt(s++);~o&&(i=a%4?64*i+o:o,a++%4)?u+=String.fromCharCode(255&i>>(-2*a&6)):0)o=r.indexOf(o);return u})}()}),ei=void 0;ei="undefined"==typeof global?window:global;var ni={set:r,get:i};ni.set("btoa",ti.btoa),ni.set("atob",ti.atob),ni.set("Promise",Zr);var ri=void 0;ri="function"==typeof Object.assign?Object.assign:function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");var e=Object(t),n=[].slice.call(arguments,1);return n.length>0&&n.forEach(function(t){if(void 0!==t&&null!==t){var n=void 0;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}),e};var ii=ri,oi=void 0;oi=Array.prototype.includes?function(t){var e=[].slice.call(arguments,1);return Array.prototype.includes.apply(t,e)}:function(t,e){var n=Object(t),r=parseInt(n.length,10)||0;if(0===r)return!1;var i=parseInt(arguments[2],10)||0,o=void 0;for(i>=0?o=i:(o=r+i,o<0&&(o=0));o<r;){var a=n[o];if(e===a||e!==e&&a!==a)return!0;o++}return!1};var ai=oi,si=s({constructor:function(){},static:{extend:function(t){return s(t,this)}}}),ui=si.extend({constructor:function(){},debug:u("debug"),info:u("info"),warn:u("warn"),error:u("error")}),ci=new ui,fi=si.extend({constructor:function(t){var e=this;Object.keys(this.deprecatedProperties).forEach(function(n){if(t.hasOwnProperty(n)){var r=e.deprecatedProperties[n],i=e[r];i(t[n],t)}}),this.requiredProperties.forEach(function(n){if(!t.hasOwnProperty(n))throw new Error("new Config() requires the option '"+n+"'");e[n]=t[n]}),this.optionalProperties.forEach(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})},deprecatedProperties:{apiKey:"transformApiKey",myShopifyDomain:"transformMyShopifyDomain"},transformMyShopifyDomain:function(t,e){ci.warn("Config - ","myShopifyDomain is deprecated, please use domain and provide the full shop domain."),e.domain=t+".myshopify.com"},transformApiKey:function(t,e){ci.warn("Config - ","apiKey is deprecated, please use accessToken instead."),e.accessToken=t},requiredProperties:["accessToken","appId","domain"],optionalProperties:["ajaxHeaders"],accessToken:"",apiKey:"",appId:"",domain:"",myShopifyDomain:"",ajaxHeaders:{}}),li="v0.7.1-66ba4e4",hi=si.extend({constructor:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.attrs=t,ii(this,e)},attrs:null,serializer:null,adapter:null,shopClient:null}),pi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments),this.selected=this.values[0]}},{name:{get:function(){return this.attrs.name},configurable:!0,enumerable:!0},values:{get:function(){return this.attrs.values},configurable:!0,enumerable:!0},selected:{get:function(){return this._selected},set:function(t){if(!ai(this.values,t))throw new Error("Invalid option selection for "+this.name+".");return this._selected=t,t},configurable:!0,enumerable:!0}})),di=[{name:"pico",dimension:"16x16"},{name:"icon",dimension:"32x32"},{name:"thumb",dimension:"50x50"},{name:"small",dimension:"100x100"},{name:"compact",dimension:"160x160"},{name:"medium",dimension:"240x240"},{name:"large",dimension:"480x480"},{name:"grande",dimension:"600x600"},{name:"1024x1024",dimension:"1024x1024"},{name:"2048x2048",dimension:"2048x2048"}],mi=si.extend(Object.defineProperties({constructor:function(t){var e=this;Object.keys(t).forEach(function(n){e[n]=t[n]})}},{variants:{get:function(){var t=this.src,e=t.lastIndexOf("."),n=t.slice(0,e),r=t.slice(e);return di.forEach(function(t){t.src=n+"_"+t.name+r}),di},configurable:!0,enumerable:!0}})),vi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)},checkoutUrl:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.config,n="https://"+e.domain+"/cart",r=this.id+":"+parseInt(t,10),i="access_token="+e.accessToken+"&_fd=0";return n+"/"+r+"?"+i}},{id:{get:function(){return this.attrs.variant.id},configurable:!0,enumerable:!0},productId:{get:function(){return this.attrs.product.id},configurable:!0,enumerable:!0},title:{get:function(){return this.attrs.variant.title},configurable:!0,enumerable:!0},productTitle:{get:function(){return this.attrs.product.title},configurable:!0,enumerable:!0},compareAtPrice:{get:function(){return this.attrs.variant.compare_at_price},configurable:!0,enumerable:!0},price:{get:function(){return this.attrs.variant.price},configurable:!0,enumerable:!0},formattedPrice:{get:function(){return this.attrs.variant.formatted_price},configurable:!0,enumerable:!0},grams:{get:function(){return this.attrs.variant.grams},configurable:!0,enumerable:!0},optionValues:{get:function(){return this.attrs.variant.option_values},configurable:!0,enumerable:!0},available:{get:function(){return this.attrs.variant.available},configurable:!0,enumerable:!0},image:{get:function(){var t=this.id,e=this.attrs.product.images,n=e[0],r=e.filter(function(e){return e.variant_ids.indexOf(t)!==-1})[0],i=r||n;return i?new mi(i):null},configurable:!0,enumerable:!0},imageVariants:{get:function(){return this.image?this.image.variants:[]},configurable:!0,enumerable:!0}})),yi=function(t){return t.reduce(function(t,e){return t.indexOf(e)<0&&t.push(e),t},[])},gi="https://widgets.shopifyapps.com/assets/no-image.svg",bi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)}},{id:{get:function(){return this.attrs.product_id},configurable:!0,enumerable:!0},title:{get:function(){return this.attrs.title},configurable:!0,enumerable:!0},description:{get:function(){return this.attrs.body_html},configurable:!0,enumerable:!0},images:{get:function(){return this.attrs.images.map(function(t){return new mi(t)})},configurable:!0,enumerable:!0},memoized:{get:function(){return this._memoized=this._memoized||{},this._memoized},configurable:!0,enumerable:!0},options:{get:function(){if(this.memoized.options)return this.memoized.options;var t=this.attrs.options,e=this.variants;return this.memoized.options=t.map(function(t){var n=t.name,r=e.reduce(function(e,n){var r=n.optionValues.filter(function(e){return e.name===t.name})[0];return e.push(r.value),e},[]),i=yi(r);return new pi({name:n,values:i})}),this.memoized.options},configurable:!0,enumerable:!0},variants:{get:function(){var t=this;return this.attrs.variants.map(function(e){return new vi({variant:e,product:t},{config:t.config})})},configurable:!0,enumerable:!0},selections:{get:function(){return this.options.map(function(t){return t.selected})},configurable:!0,enumerable:!0},selectedVariant:{get:function(){var t=this.selections.join(" / ");return this.variants.filter(function(e){return e.title===t})[0]||null},configurable:!0,enumerable:!0},selectedVariantImage:{get:function(){return this.selectedVariant?this.selectedVariant.image:null},configurable:!0,enumerable:!0}})),wi=si.extend({constructor:function(t){this.config=t},rootKeyForType:function(t){return t.slice(0,-1)+"_listing";
2
2
  },models:{collections:hi,products:bi},modelForType:function(t){return this.models[t]},deserializeSingle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e[this.rootKeyForType(t)],i=this.modelFromAttrs(t,r,n);return i},deserializeMultiple:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n[this.rootKeyForType(t)+"s"];return i.map(function(n){var i=e.modelFromAttrs(t,n,r);return i})},modelFromAttrs:function(t,e,n){var r=this.modelForType(t);return n.config=this.config,new r(e,n)}}),_i=si.extend(Object.defineProperties({ajax:d,constructor:function(t){this.config=t},pathForType:function(t){return"/"+t.slice(0,-1)+"_listings"},buildUrl:function(t,e,n){switch(t){case"multiple":return this.buildMultipleUrl(e,n);case"single":return this.buildSingleUrl(e,n);default:return""}},buildMultipleUrl:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=""+this.baseUrl+this.pathForType(t),r=Object.keys(e);if(r.length>0){var i=r.map(function(t){var n=void 0;return n=Array.isArray(e[t])?e[t].join(","):e[t],t+"="+encodeURIComponent(n)}).join("&");return n+"?"+i}return n},buildSingleUrl:function(t,e){return""+this.baseUrl+this.pathForType(t)+"/"+e},fetchMultiple:function(){var t=this.buildUrl.apply(this,["multiple"].concat(Array.prototype.slice.call(arguments)));return this.ajax("GET",t,{headers:this.headers}).then(function(t){return t.json})},fetchSingle:function(){var t=this.buildUrl.apply(this,["single"].concat(Array.prototype.slice.call(arguments)));return this.ajax("GET",t,{headers:this.headers}).then(function(t){return t.json})}},{base64AccessToken:{get:function(){return btoa(this.config.accessToken)},configurable:!0,enumerable:!0},baseUrl:{get:function(){var t=this.config,e=t.domain,n=t.appId;return"https://"+e+"/api/apps/"+n},configurable:!0,enumerable:!0},headers:{get:function(){return ii({},{Authorization:"Basic "+this.base64AccessToken,"Content-Type":"application/json","X-SDK-Variant":"javascript","X-SDK-Version":li},this.config.ajaxHeaders)},configurable:!0,enumerable:!0}})),Oi="shopify-buy-uuid",xi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)}},{id:{get:function(){return this.attrs[Oi]},configurable:!0,enumerable:!0},variant_id:{get:function(){return this.attrs.variant_id},configurable:!0,enumerable:!0},product_id:{get:function(){return this.attrs.product_id},configurable:!0,enumerable:!0},image:{get:function(){return this.attrs.image?new mi(this.attrs.image):null},configurable:!0,enumerable:!0},imageVariants:{get:function(){return this.image?this.image.variants:[]},configurable:!0,enumerable:!0},title:{get:function(){return this.attrs.title},configurable:!0,enumerable:!0},quantity:{get:function(){return this.attrs.quantity},set:function(t){var e=parseInt(t,10);if(e<0)throw new Error("Quantities must be positive");if(e!==parseFloat(t))throw new Error("Quantities must be whole numbers");return this.attrs.quantity=e,this.attrs.quantity},configurable:!0,enumerable:!0},properties:{get:function(){return this.attrs.properties||{}},set:function(t){return this.attrs.properties=t||{},t},configurable:!0,enumerable:!0},variant_title:{get:function(){return this.attrs.variant_title},configurable:!0,enumerable:!0},price:{get:function(){return this.attrs.price},configurable:!0,enumerable:!0},compare_at_price:{get:function(){return this.attrs.compare_at_price},configurable:!0,enumerable:!0},line_price:{get:function(){return(this.quantity*parseFloat(this.price)).toFixed(2)},configurable:!0,enumerable:!0},grams:{get:function(){return this.attrs.grams},configurable:!0,enumerable:!0}})),ji="shopify-buy."+Date.now(),Ti={writable:!0,configurable:!0,enumerable:!0,value:null},Pi=0,Si={},Ai={},Ei=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)},addVariants:function(){return ci.warn("CartModel - ","addVariants is deprecated, please use createLineItemsFromVariants instead"),this.createLineItemsFromVariants.apply(this,arguments)},createLineItemsFromVariants:function(){var t=[].concat(Array.prototype.slice.call(arguments)).map(function(t){var e={image:t.variant.image,image_variants:t.variant.imageVariants,variant_id:t.variant.id,product_id:t.variant.productId,title:t.variant.productTitle,quantity:parseInt(t.quantity,10),properties:t.properties||{},variant_title:t.variant.title,price:t.variant.price,compare_at_price:t.variant.compareAtPrice,grams:t.variant.grams};return v(e),e}),n=this.attrs.line_items;n.push.apply(n,e(t));var r=n.reduce(function(t,e){var n=t.filter(function(t){return t.variant_id===e.variant_id&&y(t.properties,e.properties)})[0];return n?n.quantity=n.quantity+e.quantity:t.push(e),t},[]);return this.attrs.line_items=r.reduce(function(t,e){return e.quantity>=1&&t.push(e),t},[]),this.updateModel()},updateLineItem:function(t,e){if(e<1)return this.removeLineItem(t);var n=this.lineItems.filter(function(e){return e.id===t})[0];return n?(n.quantity=e,this.updateModel()):new Promise(function(e,n){n(new Error("line item with id: "+t+" not found in cart#"+this.id))})},removeLineItem:function(t){var e=this.lineItems.length,n=this.lineItems.filter(function(e){return e.id!==t}),r=n.length;return r<e?(this.attrs.line_items=n.map(function(t){return t.attrs}),this.updateModel()):new Promise(function(e,n){n(new Error("line item with id: "+t+" not found in cart#"+this.id))})},clearLineItems:function(){return this.attrs.line_items=[],this.updateModel()},updateModel:function(){var t=this;return this.shopClient.update("carts",this).then(function(e){return ii(t.attrs,e.attrs),t})}},{id:{get:function(){return this.attrs[Oi]},configurable:!0,enumerable:!0},lineItems:{get:function(){return(this.attrs.line_items||[]).map(function(t){return new xi(t)})},configurable:!0,enumerable:!0},lineItemCount:{get:function(){return this.lineItems.reduce(function(t,e){return t+e.quantity},0)},configurable:!0,enumerable:!0},subtotal:{get:function(){var t=this.lineItems.reduce(function(t,e){return t+parseFloat(e.line_price)},0);return t.toFixed(2)},configurable:!0,enumerable:!0},checkoutUrl:{get:function(){var t=this.config,e="https://"+t.domain+"/cart",n=ni.get("ga"),r=this.lineItems.map(function(t){return t.variant_id+":"+t.quantity}),i="access_token="+t.accessToken+"&_fd=0";if("function"==typeof n){var o=void 0;n(function(t){o=t.get("linkerParam")}),o&&(i+="&"+o)}return e+"/"+r+"?"+i},configurable:!0,enumerable:!0}})),Ii=si.extend({constructor:function(t){this.config=t},rootKeyForType:function(t){return t.slice(0,-1)},modelForType:function(){return Ei},deserializeSingle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e[this.rootKeyForType(t)],i=this.modelFromAttrs(t,r,n);return i},modelFromAttrs:function(t,e,n){var r=this.modelForType(t);return n.config=this.config,new r(e,n)},serialize:function(t,e){var n=this.rootKeyForType(t),r={},i=ii({},e.attrs);return r[n]=i,delete i.attributes,Object.keys(i).forEach(function(t){var e=i[t];(null===e||"string"==typeof e&&0===e.length)&&delete i[t]}),r}}),Fi=hi.extend(Object.defineProperties({constructor:function(t){if(Object.keys(t).indexOf("referenceId")<0)throw new Error("Missing key referenceId of reference. References to null are not allowed");this.super.apply(this,arguments)}},{id:{get:function(){return this.attrs[Oi]},configurable:!0,enumerable:!0},referenceId:{get:function(){return this.attrs.referenceId},set:function(t){return this.attrs.referenceId=t,t},configurable:!0,enumerable:!0}})),ki=si.extend({constructor:function(t){this.config=t},modelForType:function(){return Fi},deserializeSingle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.modelForType(t);return new r(e,n)},serialize:function(t,e){var n=ii({},e.attrs);return n}}),Ci=si.extend({constructor:function(){this.localStorageAvailable=this.storageAvailable("localStorage"),this.cache={}},setItem:function(t,e){return this.localStorageAvailable?localStorage.setItem(t,JSON.stringify(e)):this.cache[t]=e,e},getItem:function(t){if(!this.localStorageAvailable)return this.cache[t]||null;var e=localStorage.getItem(t);try{return JSON.parse(e)}catch(t){return null}},storageAvailable:function(t){try{var e=ni.get(t),n="__storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(t){return!1}}}),Ri=si.extend({constructor:function(){this.store=new Ci},idKeyForType:function(){return Oi},fetchSingle:function(t,e){var n=this;return new Promise(function(r,i){var o=n.store.getItem(n.storageKey(t,e));return null===o?void i(new Error(t+"#"+e+" not found")):void r(o)})},create:function(t,e){var n=this;return new Promise(function(r){var i=n.identify(e);n.store.setItem(n.storageKey(t,i),e),r(e)})},update:function(t,e,n){var r=this;return new Promise(function(i){r.store.setItem(r.storageKey(t,e),n),i(n)})},storageKey:function(t,e){return t+"."+e},identify:function(t){var e=Object.keys(t);return v(1===e.length&&"object"===b(t[e[0]])?t[e[0]]:t)}}),zi=si.extend(Object.defineProperties({constructor:function(t){this.config=t,this.serializers={products:wi,collections:wi,carts:Ii,references:ki},this.adapters={products:_i,collections:_i,carts:Ri,references:Ri}},config:null,fetchAll:function(t){var e=this,n=new this.adapters[t](this.config);return n.fetchMultiple(t).then(function(r){return e.deserialize(t,r,n,null,{multiple:!0})})},fetch:function(t,e){var n=this,r=new this.adapters[t](this.config);return r.fetchSingle(t,e).then(function(e){return n.deserialize(t,e,r,null,{single:!0})})},fetchQuery:function(t,e){var n=this,r=new this.adapters[t](this.config);return r.fetchMultiple(t,e).then(function(e){return n.deserialize(t,e,r,null,{multiple:!0})})},create:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new this.adapters[t](this.config),i=new this.serializers[t](this.config),o=i.modelForType(t),a=new o(n,{shopClient:this}),s=i.serialize(t,a);return r.create(t,s).then(function(n){return e.deserialize(t,n,r,i,{single:!0})})},update:function(t,e){var n=this,r=e.adapter,i=e.serializer,o=i.serialize(t,e),a=e.attrs[r.idKeyForType(t)];return r.update(t,a,o).then(function(e){return n.deserialize(t,e,r,i,{single:!0})})},deserialize:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=r||new this.serializers[t](this.config),a={shopClient:this,adapter:n,serializer:o,type:t},s=void 0;return s=i.multiple?o.deserializeMultiple(t,e,a):o.deserializeSingle(t,e,a)},createCart:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={line_items:[]},n={};return ii(n,e),ii(n,t),this.create("carts",n)},updateCart:function(t){return this.update("carts",t)},fetchCart:g("one","carts"),fetchAllProducts:g("all","products"),fetchAllCollections:g("all","collections"),fetchProduct:g("one","products"),fetchCollection:g("one","collections"),fetchQueryProducts:g("query","products"),fetchQueryCollections:g("query","collections"),fetchRecentCart:function(){var t=this;return this.fetch("references",this.config.domain+".recent-cart").then(function(e){var n=e.referenceId;return t.fetchCart(n)}).catch(function(){return t.createCart().then(function(e){var n={referenceId:e.id};return n[Oi]=t.config.domain+".recent-cart",t.create("references",n),e})})}},{serializers:{get:function(){return ii({},this.shadowedSerializers)},set:function(t){this.shadowedSerializers=ii({},t)},configurable:!0,enumerable:!0},adapters:{get:function(){return ii({},this.shadowedAdapters)},set:function(t){this.shadowedAdapters=ii({},t)},configurable:!0,enumerable:!0}}));if(l()){var Mi=require,Ui=Mi("node-fetch");ni.set("fetch",Ui),ni.set("Response",Ui.Response)}l()&&ni.set("btoa",function(t){return new Buffer(t).toString("base64")});var qi={ShopClient:zi,Config:fi,version:li,NO_IMAGE_URI:gi,buildClient:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new this.Config(t);return new this.ShopClient(e)}};t.exports=qi});