index.js

var Ze=Object.create;var ge=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var tt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,nt=Object.prototype.hasOwnProperty;var it=(D,F)=>()=>(F||D((F={exports:{}}).exports,F),F.exports),ot=(D,F)=>{for(var I in F)ge(D,I,{get:F[I],enumerable:!0})},de=(D,F,I,N)=>{if(F&&typeof F=="object"||typeof F=="function")for(let V of tt(F))!nt.call(D,V)&&V!==I&&ge(D,V,{get:()=>F[V],enumerable:!(N=et(F,V))||N.enumerable});return D},ne=(D,F,I)=>(de(D,F,"default"),I&&de(I,F,"default")),Ce=(D,F,I)=>(I=D!=null?Ze(rt(D)):{},de(F||!D||!D.__esModule?ge(I,"default",{value:D,enumerable:!0}):I,D));var pe=it((ie,Le)=>{(function(D,F){typeof ie=="object"&&typeof Le<"u"?F(ie):typeof define=="function"&&define.amd?define(["exports"],F):F((D=typeof globalThis<"u"?globalThis:D||self).meshkraftAR={})})(ie,function(D){function F(v,w){var x=Object.keys(v);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(v);w&&(_=_.filter(function(E){return Object.getOwnPropertyDescriptor(v,E).enumerable})),x.push.apply(x,_)}return x}function I(v){for(var w=1;w<arguments.length;w++){var x=arguments[w]!=null?arguments[w]:{};w%2?F(Object(x),!0).forEach(function(_){We(v,_,x[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(x)):F(Object(x)).forEach(function(_){Object.defineProperty(v,_,Object.getOwnPropertyDescriptor(x,_))})}return v}function N(){N=function(){return v};var v={},w=Object.prototype,x=w.hasOwnProperty,_=typeof Symbol=="function"?Symbol:{},E=_.iterator||"@@iterator",M=_.asyncIterator||"@@asyncIterator",e=_.toStringTag||"@@toStringTag";function n(f,a,k){return Object.defineProperty(f,a,{value:k,enumerable:!0,configurable:!0,writable:!0}),f[a]}try{n({},"")}catch{n=function(a,k,O){return a[k]=O}}function i(f,a,k,O){var S=a&&a.prototype instanceof l?a:l,L=Object.create(S.prototype),W=new s(O||[]);return L._invoke=function(T,X,R){var j="suspendedStart";return function(K,re){if(j==="executing")throw new Error("Generator is already running");if(j==="completed"){if(K==="throw")throw re;return C()}for(R.method=K,R.arg=re;;){var Ee=R.delegate;if(Ee){var fe=o(Ee,R);if(fe){if(fe===r)continue;return fe}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(j==="suspendedStart")throw j="completed",R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);j="executing";var Y=t(T,X,R);if(Y.type==="normal"){if(j=R.done?"completed":"suspendedYield",Y.arg===r)continue;return{value:Y.arg,done:R.done}}Y.type==="throw"&&(j="completed",R.method="throw",R.arg=Y.arg)}}}(f,k,W),L}function t(f,a,k){try{return{type:"normal",arg:f.call(a,k)}}catch(O){return{type:"throw",arg:O}}}v.wrap=i;var r={};function l(){}function c(){}function u(){}var h={};n(h,E,function(){return this});var p=Object.getPrototypeOf,A=p&&p(p(y([])));A&&A!==w&&x.call(A,E)&&(h=A);var P=u.prototype=l.prototype=Object.create(h);function g(f){["next","throw","return"].forEach(function(a){n(f,a,function(k){return this._invoke(a,k)})})}function b(f,a){function k(S,L,W,T){var X=t(f[S],f,L);if(X.type!=="throw"){var R=X.arg,j=R.value;return j&&typeof j=="object"&&x.call(j,"__await")?a.resolve(j.__await).then(function(K){k("next",K,W,T)},function(K){k("throw",K,W,T)}):a.resolve(j).then(function(K){R.value=K,W(R)},function(K){return k("throw",K,W,T)})}T(X.arg)}var O;this._invoke=function(S,L){function W(){return new a(function(T,X){k(S,L,T,X)})}return O=O?O.then(W,W):W()}}function o(f,a){var k=f.iterator[a.method];if(k===void 0){if(a.delegate=null,a.method==="throw"){if(f.iterator.return&&(a.method="return",a.arg=void 0,o(f,a),a.method==="throw"))return r;a.method="throw",a.arg=new TypeError("The iterator does not provide a 'throw' method")}return r}var O=t(k,f.iterator,a.arg);if(O.type==="throw")return a.method="throw",a.arg=O.arg,a.delegate=null,r;var S=O.arg;return S?S.done?(a[f.resultName]=S.value,a.next=f.nextLoc,a.method!=="return"&&(a.method="next",a.arg=void 0),a.delegate=null,r):S:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,r)}function m(f){var a={tryLoc:f[0]};1 in f&&(a.catchLoc=f[1]),2 in f&&(a.finallyLoc=f[2],a.afterLoc=f[3]),this.tryEntries.push(a)}function d(f){var a=f.completion||{};a.type="normal",delete a.arg,f.completion=a}function s(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(m,this),this.reset(!0)}function y(f){if(f){var a=f[E];if(a)return a.call(f);if(typeof f.next=="function")return f;if(!isNaN(f.length)){var k=-1,O=function S(){for(;++k<f.length;)if(x.call(f,k))return S.value=f[k],S.done=!1,S;return S.value=void 0,S.done=!0,S};return O.next=O}}return{next:C}}function C(){return{value:void 0,done:!0}}return c.prototype=u,n(P,"constructor",u),n(u,"constructor",c),c.displayName=n(u,e,"GeneratorFunction"),v.isGeneratorFunction=function(f){var a=typeof f=="function"&&f.constructor;return!!a&&(a===c||(a.displayName||a.name)==="GeneratorFunction")},v.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,u):(f.__proto__=u,n(f,e,"GeneratorFunction")),f.prototype=Object.create(P),f},v.awrap=function(f){return{__await:f}},g(b.prototype),n(b.prototype,M,function(){return this}),v.AsyncIterator=b,v.async=function(f,a,k,O,S){S===void 0&&(S=Promise);var L=new b(i(f,a,k,O),S);return v.isGeneratorFunction(a)?L:L.next().then(function(W){return W.done?W.value:L.next()})},g(P),n(P,e,"Generator"),n(P,E,function(){return this}),n(P,"toString",function(){return"[object Generator]"}),v.keys=function(f){var a=[];for(var k in f)a.push(k);return a.reverse(),function O(){for(;a.length;){var S=a.pop();if(S in f)return O.value=S,O.done=!1,O}return O.done=!0,O}},v.values=y,s.prototype={constructor:s,reset:function(f){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(d),!f)for(var a in this)a.charAt(0)==="t"&&x.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=void 0)},stop:function(){this.done=!0;var f=this.tryEntries[0].completion;if(f.type==="throw")throw f.arg;return this.rval},dispatchException:function(f){if(this.done)throw f;var a=this;function k(X,R){return L.type="throw",L.arg=f,a.next=X,R&&(a.method="next",a.arg=void 0),!!R}for(var O=this.tryEntries.length-1;O>=0;--O){var S=this.tryEntries[O],L=S.completion;if(S.tryLoc==="root")return k("end");if(S.tryLoc<=this.prev){var W=x.call(S,"catchLoc"),T=x.call(S,"finallyLoc");if(W&&T){if(this.prev<S.catchLoc)return k(S.catchLoc,!0);if(this.prev<S.finallyLoc)return k(S.finallyLoc)}else if(W){if(this.prev<S.catchLoc)return k(S.catchLoc,!0)}else{if(!T)throw new Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return k(S.finallyLoc)}}}},abrupt:function(f,a){for(var k=this.tryEntries.length-1;k>=0;--k){var O=this.tryEntries[k];if(O.tryLoc<=this.prev&&x.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var S=O;break}}S&&(f==="break"||f==="continue")&&S.tryLoc<=a&&a<=S.finallyLoc&&(S=null);var L=S?S.completion:{};return L.type=f,L.arg=a,S?(this.method="next",this.next=S.finallyLoc,r):this.complete(L)},complete:function(f,a){if(f.type==="throw")throw f.arg;return f.type==="break"||f.type==="continue"?this.next=f.arg:f.type==="return"?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):f.type==="normal"&&a&&(this.next=a),r},finish:function(f){for(var a=this.tryEntries.length-1;a>=0;--a){var k=this.tryEntries[a];if(k.finallyLoc===f)return this.complete(k.completion,k.afterLoc),d(k),r}},catch:function(f){for(var a=this.tryEntries.length-1;a>=0;--a){var k=this.tryEntries[a];if(k.tryLoc===f){var O=k.completion;if(O.type==="throw"){var S=O.arg;d(k)}return S}}throw new Error("illegal catch attempt")},delegateYield:function(f,a,k){return this.delegate={iterator:y(f),resultName:a,nextLoc:k},this.method==="next"&&(this.arg=void 0),r}},v}function V(v){return V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},V(v)}function me(v,w,x,_,E,M,e){try{var n=v[M](e),i=n.value}catch(t){return void x(t)}n.done?w(i):Promise.resolve(i).then(_,E)}function ve(v){return function(){var w=this,x=arguments;return new Promise(function(_,E){var M=v.apply(w,x);function e(i){me(M,_,E,e,n,"next",i)}function n(i){me(M,_,E,e,n,"throw",i)}e(void 0)})}}function We(v,w,x){return w in v?Object.defineProperty(v,w,{value:x,enumerable:!0,configurable:!0,writable:!0}):v[w]=x,v}var Te="https://api.artlabs.ai",we={ERROR:"ar-error",BANNER_PRESS:"add-to-cart"},Re="https://events.artlabs.ai",Fe="zzkZ58VcHc&xH%#";navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported;var oe,se,ae="#meshkraft-quick-ar",be=(oe=navigator.userAgent||navigator.vendor||self.opera,se=!1,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(oe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(oe.substr(0,4)))&&(se=!0),se);/\bCrOS\b/.test(navigator.userAgent);var De=/android/i.test(navigator.userAgent),ye=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;/Safari\//.test(navigator.userAgent);var Be=/firefox/i.test(navigator.userAgent),je=/OculusBrowser/.test(navigator.userAgent);ye&&/CriOS\//.test(navigator.userAgent);var $,Ie=!!(window.webkit&&window.webkit.messageHandlers),Ke=De&&!Be&&!je,Xe=function(){if(ye){if(Ie)return!!/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent);var v=document.createElement("a");return!!(v.relList&&v.relList.supports&&v.relList.supports("ar"))}return!1}(),Ve=".basicLightbox{font-family:'Arial';position:fixed;display:flex;justify-content:center;align-items:center;top:0;left:0;width:100%;height:100vh;background:rgba(0,0,0,.8);opacity:.01;transition:opacity .4s ease;z-index:1000;will-change:opacity}.basicLightbox--visible{opacity:1}.basicLightbox__placeholder{max-width:40%;transform:scale(.9);transition:transform .4s ease;z-index:1;will-change:transform}.basicLightbox__placeholder>iframe:first-child:last-child,.basicLightbox__placeholder>img:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{display:block;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;max-width:95%;max-height:95%}.basicLightbox__placeholder>iframe:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{pointer-events:auto}.basicLightbox__placeholder>img:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{width:auto;height:auto}.basicLightbox--iframe .basicLightbox__placeholder,.basicLightbox--img .basicLightbox__placeholder,.basicLightbox--video .basicLightbox__placeholder{width:100%;height:100%;pointer-events:none}.basicLightbox--visible .basicLightbox__placeholder{transform:scale(1)}.meshkraft-modal{background-color: white;padding: 1.8em;display: flex;flex-direction: column;justify-content: center;align-items: center;}.meshkraft-modal h1,.meshkraft-modal p{color: #000;margin-bottom:20px;padding-left:10px;padding-right:10px;text-align:center}",Ue=`<div class="meshkraft-modal"> <h1>Scan QR Code</h1> <p>Point your mobile phone camera to the QR code below to experience in <br/>Augmented Reality</p> <canvas id="meshkraft-qr-canvas"></canvas> </div>`,Ne=function(v){var w=document.createElement("style");w.textContent=v,document.head.append(w)};function qe(v,w){switch(v){case"apple-pay":return"#applePayButtonType=buy&checkoutTitle=".concat(encodeURIComponent(w.name),"&checkoutSubtitle=").concat(encodeURIComponent(w.description||"1 Item"),"&price=").concat(w.price);case"custom":return"#custom=".concat("https://meshkraft-banners.pages.dev","/").concat(w.path);default:return"#callToAction=".concat(encodeURIComponent(w.callToAction||"Add to Cart"),"&checkoutTitle=").concat(encodeURIComponent(w.name||"-"),"&checkoutSubtitle=").concat(encodeURIComponent(w.description||"-"),"&price=").concat(w.price||"-")}}var ze=function(v,w){var x=v;($=document.createElement("a")).addEventListener("message",function(E){E.data=="_apple_ar_quicklook_button_tapped"&&typeof w=="function"&&w()}),$.setAttribute("rel","ar"),$.setAttribute("href",x);var _=document.createElement("img");$.appendChild(_),$.click(),$.removeChild(_)},$e=function(v){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_="#model-viewer-no-ar-fallback",E=v,M=self.location.toString(),e=new URL(M),n=new URL(E,M);e.hash=_;var i="intent://arvr.google.com/scene-viewer/1.1?file=".concat(n.toString(),"&title=").concat(w,"&enable_vertical_placement=").concat(x.orientation==="Vertical","&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=").concat(encodeURIComponent(e.toString()),";end;"),t=document.createElement("a");t.setAttribute("href",i),t.click()},Je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ce(v){throw new Error('Could not dynamically require "'+v+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var He=function(v){var w={exports:{}};return v(w,w.exports),w.exports}(function(v,w){v.exports=function x(_,E,M){function e(t,r){if(!E[t]){if(!_[t]){if(!r&&ce)return ce(t);if(n)return n(t,!0);var l=new Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}var c=E[t]={exports:{}};_[t][0].call(c.exports,function(u){return e(_[t][1][u]||u)},c,c.exports,x,_,E,M)}return E[t].exports}for(var n=ce,i=0;i<M.length;i++)e(M[i]);return e}({1:[function(x,_,E){Object.defineProperty(E,"__esModule",{value:!0}),E.create=E.visible=void 0;var M=function(i){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=document.createElement("div");return r.innerHTML=i.trim(),t===!0?r.children:r.firstChild},e=function(i,t){var r=i.children;return r.length===1&&r[0].tagName===t},n=function(i){return(i=i||document.querySelector(".basicLightbox"))!=null&&i.ownerDocument.body.contains(i)===!0};E.visible=n,E.create=function(i,t){var r=function(u,h){var p=M(` <div class="basicLightbox `.concat(h.className,`"> <div class="basicLightbox__placeholder" role="dialog"></div> </div> `)),A=p.querySelector(".basicLightbox__placeholder");u.forEach(function(o){return A.appendChild(o)});var P=e(A,"IMG"),g=e(A,"VIDEO"),b=e(A,"IFRAME");return P===!0&&p.classList.add("basicLightbox--img"),g===!0&&p.classList.add("basicLightbox--video"),b===!0&&p.classList.add("basicLightbox--iframe"),p}(i=function(u){var h=typeof u=="string",p=u instanceof HTMLElement==1;if(h===!1&&p===!1)throw new Error("Content must be a DOM element/node or string");return h===!0?Array.from(M(u,!0)):u.tagName==="TEMPLATE"?[u.content.cloneNode(!0)]:Array.from(u.children)}(i),t=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if((u=Object.assign({},u)).closable==null&&(u.closable=!0),u.className==null&&(u.className=""),u.onShow==null&&(u.onShow=function(){}),u.onClose==null&&(u.onClose=function(){}),typeof u.closable!="boolean")throw new Error("Property `closable` must be a boolean");if(typeof u.className!="string")throw new Error("Property `className` must be a string");if(typeof u.onShow!="function")throw new Error("Property `onShow` must be a function");if(typeof u.onClose!="function")throw new Error("Property `onClose` must be a function");return u}(t)),l=function(u){return t.onClose(c)!==!1&&function(h,p){return h.classList.remove("basicLightbox--visible"),setTimeout(function(){return n(h)===!1||h.parentElement.removeChild(h),p()},410),!0}(r,function(){if(typeof u=="function")return u(c)})};t.closable===!0&&r.addEventListener("click",function(u){u.target===r&&l()});var c={element:function(){return r},visible:function(){return n(r)},show:function(u){return t.onShow(c)!==!1&&function(h,p){return document.body.appendChild(h),setTimeout(function(){requestAnimationFrame(function(){return h.classList.add("basicLightbox--visible"),p()})},10),!0}(r,function(){if(typeof u=="function")return u(c)})},close:l};return c}},{}]},{},[1])(1)});let Ae=null;class Se{}Se.render=function(v,w){Ae(v,w)},self.QrCreator=Se,function(v){function w(e,n,i,t){var r={},l=v(i,n);l.u(e),l.J(),t=t||0;var c=l.h(),u=l.h()+2*t;return r.text=e,r.level=n,r.version=i,r.O=u,r.a=function(h,p){return p-=t,!(0>(h-=t)||h>=c||0>p||p>=c)&&l.a(h,p)},r}function x(e,n,i,t,r,l,c,u,h,p){function A(P,g,b,o,m,d,s){P?(e.lineTo(g+d,b+s),e.arcTo(g,b,o,m,l)):e.lineTo(g,b)}c?e.moveTo(n+l,i):e.moveTo(n,i),A(u,t,i,t,r,-l,0),A(h,t,r,n,r,0,-l),A(p,n,r,n,i,l,0),A(c,n,i,t,i,0,l)}function _(e,n,i,t,r,l,c,u,h,p){function A(P,g,b,o){e.moveTo(P+b,g),e.lineTo(P,g),e.lineTo(P,g+o),e.arcTo(P,g,P+b,g,l)}c&&A(n,i,l,l),u&&A(t,i,-l,l),h&&A(t,r,-l,-l),p&&A(n,r,l,-l)}function E(e,n){e:{var i=n.text,t=n.v,r=n.N,l=n.K,c=n.P;for(r=Math.max(1,r||1),l=Math.min(40,l||40);r<=l;r+=1)try{var u=w(i,t,r,c);break e}catch{}u=void 0}if(!u)return null;for(i=e.getContext("2d"),n.background&&(i.fillStyle=n.background,i.fillRect(n.left,n.top,n.size,n.size)),t=u.O,l=n.size/t,i.beginPath(),c=0;c<t;c+=1)for(r=0;r<t;r+=1){var h=i,p=n.left+r*l,A=n.top+c*l,P=c,g=r,b=u.a,o=p+l,m=A+l,d=P-1,s=P+1,y=g-1,C=g+1,f=Math.floor(Math.min(.5,Math.max(0,n.R))*l),a=b(P,g),k=b(d,y),O=b(d,g);d=b(d,C);var S=b(P,C);C=b(s,C),g=b(s,g),s=b(s,y),P=b(P,y),p=Math.round(p),A=Math.round(A),o=Math.round(o),m=Math.round(m),a?x(h,p,A,o,m,f,!O&&!P,!O&&!S,!g&&!S,!g&&!P):_(h,p,A,o,m,f,O&&P&&k,O&&S&&d,g&&S&&C,g&&P&&s)}return function(L,W){var T=W.fill;if(typeof T=="string")L.fillStyle=T;else{var X=T.type,R=T.colorStops;if(T=T.position.map(K=>Math.round(K*W.size)),X==="linear-gradient")var j=L.createLinearGradient.apply(L,T);else{if(X!=="radial-gradient")throw Error("Unsupported fill");j=L.createRadialGradient.apply(L,T)}R.forEach(([K,re])=>{j.addColorStop(K,re)}),L.fillStyle=j}}(i,n),i.fill(),e}var M={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};Ae=function(e,n){var i={};Object.assign(i,M,e),i.N=i.minVersion,i.K=i.maxVersion,i.v=i.ecLevel,i.left=i.left,i.top=i.top,i.size=i.size,i.fill=i.fill,i.background=i.background,i.text=i.text,i.R=i.radius,i.P=i.quiet,n instanceof HTMLCanvasElement?(n.width===i.size&&n.height===i.size||(n.width=i.size,n.height=i.size),n.getContext("2d").clearRect(0,0,n.width,n.height),E(n,i)):((e=document.createElement("canvas")).width=i.size,e.height=i.size,i=E(e,i),n.appendChild(i))}}(function(){function v(e,n){function i(A,P){for(var g=-1;7>=g;g+=1)if(!(-1>=A+g||c<=A+g))for(var b=-1;7>=b;b+=1)-1>=P+b||c<=P+b||(l[A+g][P+b]=0<=g&&6>=g&&(b==0||b==6)||0<=b&&6>=b&&(g==0||g==6)||2<=g&&4>=g&&2<=b&&4>=b)}function t(A,P){for(var g=c=4*e+17,b=Array(g),o=0;o<g;o+=1){b[o]=Array(g);for(var m=0;m<g;m+=1)b[o][m]=null}for(l=b,i(0,0),i(c-7,0),i(0,c-7),g=_.G(e),b=0;b<g.length;b+=1)for(o=0;o<g.length;o+=1){m=g[b];var d=g[o];if(l[m][d]==null)for(var s=-2;2>=s;s+=1)for(var y=-2;2>=y;y+=1)l[m+s][d+y]=s==-2||s==2||y==-2||y==2||s==0&&y==0}for(g=8;g<c-8;g+=1)l[g][6]==null&&(l[g][6]=g%2==0);for(g=8;g<c-8;g+=1)l[6][g]==null&&(l[6][g]=g%2==0);for(g=_.w(r<<3|P),b=0;15>b;b+=1)o=!A&&(g>>b&1)==1,l[6>b?b:8>b?b+1:c-15+b][8]=o,l[8][8>b?c-b-1:9>b?15-b:14-b]=o;if(l[c-8][8]=!A,7<=e){for(g=_.A(e),b=0;18>b;b+=1)o=!A&&(g>>b&1)==1,l[Math.floor(b/3)][b%3+c-8-3]=o;for(b=0;18>b;b+=1)o=!A&&(g>>b&1)==1,l[b%3+c-8-3][Math.floor(b/3)]=o}if(u==null){for(A=M.I(e,r),g=function(){var k=[],O=0,S={B:function(){return k},c:function(L){return(k[Math.floor(L/8)]>>>7-L%8&1)==1},put:function(L,W){for(var T=0;T<W;T+=1)S.m((L>>>W-T-1&1)==1)},f:function(){return O},m:function(L){var W=Math.floor(O/8);k.length<=W&&k.push(0),L&&(k[W]|=128>>>O%8),O+=1}};return S}(),b=0;b<h.length;b+=1)o=h[b],g.put(4,4),g.put(o.b(),_.f(4,e)),o.write(g);for(b=o=0;b<A.length;b+=1)o+=A[b].j;if(g.f()>8*o)throw Error("code length overflow. ("+g.f()+">"+8*o+")");for(g.f()+4<=8*o&&g.put(0,4);g.f()%8!=0;)g.m(!1);for(;!(g.f()>=8*o)&&(g.put(236,8),!(g.f()>=8*o));)g.put(17,8);var C=0;for(o=b=0,m=Array(A.length),d=Array(A.length),s=0;s<A.length;s+=1){var f=A[s].j,a=A[s].o-f;for(b=Math.max(b,f),o=Math.max(o,a),m[s]=Array(f),y=0;y<m[s].length;y+=1)m[s][y]=255&g.B()[y+C];for(C+=f,y=_.C(a),f=w(m[s],y.b()-1).l(y),d[s]=Array(y.b()-1),y=0;y<d[s].length;y+=1)a=y+f.b()-d[s].length,d[s][y]=0<=a?f.c(a):0}for(y=g=0;y<A.length;y+=1)g+=A[y].o;for(g=Array(g),y=C=0;y<b;y+=1)for(s=0;s<A.length;s+=1)y<m[s].length&&(g[C]=m[s][y],C+=1);for(y=0;y<o;y+=1)for(s=0;s<A.length;s+=1)y<d[s].length&&(g[C]=d[s][y],C+=1);u=g}for(A=u,g=-1,b=c-1,o=7,m=0,P=_.F(P),d=c-1;0<d;d-=2)for(d==6&&--d;;){for(s=0;2>s;s+=1)l[b][d-s]==null&&(y=!1,m<A.length&&(y=(A[m]>>>o&1)==1),P(b,d-s)&&(y=!y),l[b][d-s]=y,--o==-1&&(m+=1,o=7));if(0>(b+=g)||c<=b){b-=g,g=-g;break}}}var r=x[n],l=null,c=0,u=null,h=[],p={u:function(A){A=function(P){var g=v.s(P);return{S:function(){return 4},b:function(){return g.length},write:function(b){for(var o=0;o<g.length;o+=1)b.put(g[o],8)}}}(A),h.push(A),u=null},a:function(A,P){if(0>A||c<=A||0>P||c<=P)throw Error(A+","+P);return l[A][P]},h:function(){return c},J:function(){for(var A=0,P=0,g=0;8>g;g+=1){t(!0,g);var b=_.D(p);(g==0||A>b)&&(A=b,P=g)}t(!1,P)}};return p}function w(e,n){if(e.length===void 0)throw Error(e.length+"/"+n);var i=function(){for(var r=0;r<e.length&&e[r]==0;)r+=1;for(var l=Array(e.length-r+n),c=0;c<e.length-r;c+=1)l[c]=e[c+r];return l}(),t={c:function(r){return i[r]},b:function(){return i.length},multiply:function(r){for(var l=Array(t.b()+r.b()-1),c=0;c<t.b();c+=1)for(var u=0;u<r.b();u+=1)l[c+u]^=E.i(E.g(t.c(c))+E.g(r.c(u)));return w(l,0)},l:function(r){if(0>t.b()-r.b())return t;for(var l=E.g(t.c(0))-E.g(r.c(0)),c=Array(t.b()),u=0;u<t.b();u+=1)c[u]=t.c(u);for(u=0;u<r.b();u+=1)c[u]^=E.i(E.g(r.c(u))+l);return w(c,0).l(r)}};return t}v.s=function(e){for(var n=[],i=0;i<e.length;i++){var t=e.charCodeAt(i);128>t?n.push(t):2048>t?n.push(192|t>>6,128|63&t):55296>t||57344<=t?n.push(224|t>>12,128|t>>6&63,128|63&t):(i++,t=65536+((1023&t)<<10|1023&e.charCodeAt(i)),n.push(240|t>>18,128|t>>12&63,128|t>>6&63,128|63&t))}return n};var x={L:1,M:0,Q:3,H:2},_=function(){function e(t){for(var r=0;t!=0;)r+=1,t>>>=1;return r}var n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],i={w:function(t){for(var r=t<<10;0<=e(r)-e(1335);)r^=1335<<e(r)-e(1335);return 21522^(t<<10|r)},A:function(t){for(var r=t<<12;0<=e(r)-e(7973);)r^=7973<<e(r)-e(7973);return t<<12|r},G:function(t){return n[t-1]},F:function(t){switch(t){case 0:return function(r,l){return(r+l)%2==0};case 1:return function(r){return r%2==0};case 2:return function(r,l){return l%3==0};case 3:return function(r,l){return(r+l)%3==0};case 4:return function(r,l){return(Math.floor(r/2)+Math.floor(l/3))%2==0};case 5:return function(r,l){return r*l%2+r*l%3==0};case 6:return function(r,l){return(r*l%2+r*l%3)%2==0};case 7:return function(r,l){return(r*l%3+(r+l)%2)%2==0};default:throw Error("bad maskPattern:"+t)}},C:function(t){for(var r=w([1],0),l=0;l<t;l+=1)r=r.multiply(w([1,E.i(l)],0));return r},f:function(t,r){if(t!=4||1>r||40<r)throw Error("mode: "+t+"; type: "+r);return 10>r?8:16},D:function(t){for(var r=t.h(),l=0,c=0;c<r;c+=1)for(var u=0;u<r;u+=1){for(var h=0,p=t.a(c,u),A=-1;1>=A;A+=1)if(!(0>c+A||r<=c+A))for(var P=-1;1>=P;P+=1)0>u+P||r<=u+P||(A!=0||P!=0)&&p==t.a(c+A,u+P)&&(h+=1);5<h&&(l+=3+h-5)}for(c=0;c<r-1;c+=1)for(u=0;u<r-1;u+=1)h=0,t.a(c,u)&&(h+=1),t.a(c+1,u)&&(h+=1),t.a(c,u+1)&&(h+=1),t.a(c+1,u+1)&&(h+=1),(h==0||h==4)&&(l+=3);for(c=0;c<r;c+=1)for(u=0;u<r-6;u+=1)t.a(c,u)&&!t.a(c,u+1)&&t.a(c,u+2)&&t.a(c,u+3)&&t.a(c,u+4)&&!t.a(c,u+5)&&t.a(c,u+6)&&(l+=40);for(u=0;u<r;u+=1)for(c=0;c<r-6;c+=1)t.a(c,u)&&!t.a(c+1,u)&&t.a(c+2,u)&&t.a(c+3,u)&&t.a(c+4,u)&&!t.a(c+5,u)&&t.a(c+6,u)&&(l+=40);for(u=h=0;u<r;u+=1)for(c=0;c<r;c+=1)t.a(c,u)&&(h+=1);return l+Math.abs(100*h/r/r-50)/5*10}};return i}(),E=function(){for(var e=Array(256),n=Array(256),i=0;8>i;i+=1)e[i]=1<<i;for(i=8;256>i;i+=1)e[i]=e[i-4]^e[i-5]^e[i-6]^e[i-8];for(i=0;255>i;i+=1)n[e[i]]=i;return{g:function(t){if(1>t)throw Error("glog("+t+")");return n[t]},i:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),M=function(){function e(t,r){switch(r){case x.L:return n[4*(t-1)];case x.M:return n[4*(t-1)+1];case x.Q:return n[4*(t-1)+2];case x.H:return n[4*(t-1)+3]}}var n=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i={I:function(t,r){var l=e(t,r);if(l===void 0)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+r);t=l.length/3,r=[];for(var c=0;c<t;c+=1)for(var u=l[3*c],h=l[3*c+1],p=l[3*c+2],A=0;A<u;A+=1){var P=p,g={};g.o=h,g.j=P,r.push(g)}return r}};return i}();return v}());var Ge=QrCreator;(function(v){var w=new RegExp("^.*("+["\\+https:\\/\\/developers.google.com\\/\\+\\/web\\/snippet\\/","googlebot","baiduspider","gurujibot","yandexbot","slurp","msnbot","bingbot","facebookexternalhit","linkedinbot","twitterbot","slackbot","telegrambot","applebot","pingdom","tumblr ","Embedly","spbot"].join("|")+").*$"),x=function(_){_=_||{};var E={version:!1,language:!1,platform:!0,os:!0,pixelDepth:!0,colorDepth:!0,resolution:!1,isAuthoritative:!0,silkAccelerated:!0,isKindleFire:!0,isDesktop:!0,isMobile:!0,isTablet:!0,isWindows:!0,isLinux:!0,isLinux64:!0,isChromeOS:!0,isMac:!0,isiPad:!0,isiPhone:!0,isiPod:!0,isAndroid:!0,isSamsung:!0,isSmartTV:!0,isRaspberry:!0,isBlackberry:!0,isTouchScreen:!0,isOpera:!1,isIE:!1,isEdge:!1,isIECompatibilityMode:!1,isSafari:!1,isFirefox:!1,isWebkit:!1,isChrome:!1,isKonqueror:!1,isOmniWeb:!1,isSeaMonkey:!1,isFlock:!1,isAmaya:!1,isPhantomJS:!1,isEpiphany:!1,source:!1,cpuCores:!1};for(var M in _)_.hasOwnProperty(M)&&E[M]!==void 0&&(E[M]=_[M]);return this.options=E,this.version="1.0.0",this._Versions={Edge:/Edge\/([\d\w\.\-]+)/i,Firefox:/firefox\/([\d\w\.\-]+)/i,IE:/msie\s([\d\.]+[\d])|trident\/\d+\.\d+;.*[rv:]+(\d+\.\d)/i,Chrome:/chrome\/([\d\w\.\-]+)/i,Chromium:/(?:chromium|crios)\/([\d\w\.\-]+)/i,Safari:/version\/([\d\w\.\-]+)/i,Opera:/version\/([\d\w\.\-]+)|OPR\/([\d\w\.\-]+)/i,Ps3:/([\d\w\.\-]+)\)\s*$/i,Psp:/([\d\w\.\-]+)\)?\s*$/i,Amaya:/amaya\/([\d\w\.\-]+)/i,SeaMonkey:/seamonkey\/([\d\w\.\-]+)/i,OmniWeb:/omniweb\/v([\d\w\.\-]+)/i,Flock:/flock\/([\d\w\.\-]+)/i,Epiphany:/epiphany\/([\d\w\.\-]+)/i,WinJs:/msapphost\/([\d\w\.\-]+)/i,PhantomJS:/phantomjs\/([\d\w\.\-]+)/i,UC:/UCBrowser\/([\d\w\.]+)/i},this._Browsers={Edge:/edge/i,Amaya:/amaya/i,Konqueror:/konqueror/i,Epiphany:/epiphany/i,SeaMonkey:/seamonkey/i,Flock:/flock/i,OmniWeb:/omniweb/i,Chromium:/chromium|crios/i,Chrome:/chrome/i,Safari:/safari/i,IE:/msie|trident/i,Opera:/opera|OPR/i,PS3:/playstation 3/i,PSP:/playstation portable/i,Firefox:/firefox/i,WinJs:/msapphost/i,PhantomJS:/phantomjs/i,UC:/UCBrowser/i},this._OS={Windows10:/windows nt 10\.0/i,Windows81:/windows nt 6\.3/i,Windows8:/windows nt 6\.2/i,Windows7:/windows nt 6\.1/i,UnknownWindows:/windows nt 6\.\d+/i,WindowsVista:/windows nt 6\.0/i,Windows2003:/windows nt 5\.2/i,WindowsXP:/windows nt 5\.1/i,Windows2000:/windows nt 5\.0/i,WindowsPhone8:/windows phone 8\./,OSXCheetah:/os x 10[._]0/i,OSXPuma:/os x 10[._]1(\D|$)/i,OSXJaguar:/os x 10[._]2/i,OSXPanther:/os x 10[._]3/i,OSXTiger:/os x 10[._]4/i,OSXLeopard:/os x 10[._]5/i,OSXSnowLeopard:/os x 10[._]6/i,OSXLion:/os x 10[._]7/i,OSXMountainLion:/os x 10[._]8/i,OSXMavericks:/os x 10[._]9/i,OSXYosemite:/os x 10[._]10/i,OSXElCapitan:/os x 10[._]11/i,OSXSierra:/os x 10[._]12/i,Mac:/os x/i,Linux:/linux/i,Linux64:/linux x86_64/i,ChromeOS:/cros/i,Wii:/wii/i,PS3:/playstation 3/i,PSP:/playstation portable/i,iPad:/\(iPad.*os (\d+)[._](\d+)/i,iPhone:/\(iPhone.*os (\d+)[._](\d+)/i,Bada:/Bada\/(\d+)\.(\d+)/i,Curl:/curl\/(\d+)\.(\d+)\.(\d+)/i},this._Platform={Windows:/windows nt/i,WindowsPhone:/windows phone/i,Mac:/macintosh/i,Linux:/linux/i,Wii:/wii/i,Playstation:/playstation/i,iPad:/ipad/i,iPod:/ipod/i,iPhone:/iphone/i,Android:/android/i,Blackberry:/blackberry/i,Samsung:/samsung/i,Curl:/curl/i},this.DefaultAgent={isAuthoritative:!0,isMobile:!1,isTablet:!1,isiPad:!1,isiPod:!1,isiPhone:!1,isAndroid:!1,isBlackberry:!1,isOpera:!1,isIE:!1,isEdge:!1,isIECompatibilityMode:!1,isSafari:!1,isFirefox:!1,isWebkit:!1,isChrome:!1,isKonqueror:!1,isOmniWeb:!1,isSeaMonkey:!1,isFlock:!1,isAmaya:!1,isPhantomJS:!1,isEpiphany:!1,isDesktop:!1,isWindows:!1,isLinux:!1,isLinux64:!1,isMac:!1,isChromeOS:!1,isBada:!1,isSamsung:!1,isRaspberry:!1,isBot:!1,isCurl:!1,isAndroidTablet:!1,isWinJs:!1,isKindleFire:!1,isSilk:!1,isCaptive:!1,isSmartTV:!1,isUC:!1,isTouchScreen:!1,silkAccelerated:!1,colorDepth:-1,pixelDepth:-1,resolution:[],cpuCores:-1,language:"unknown",browser:"unknown",version:"unknown",os:"unknown",platform:"unknown",geoIp:{},source:"",hashInt:function(e){var n,i,t=0;if(e.length===0)return t;for(n=0,i=e.length;n<i;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t},hashMD5:function(e){function n(y,C){return y<<C|y>>>32-C}function i(y,C){var f,a,k,O,S;return k=2147483648&y,O=2147483648&C,S=(1073741823&y)+(1073741823&C),(f=1073741824&y)&(a=1073741824&C)?2147483648^S^k^O:f|a?1073741824&S?3221225472^S^k^O:1073741824^S^k^O:S^k^O}function t(y,C,f,a,k,O,S){return y=i(y,i(i(function(L,W,T){return L&W|~L&T}(C,f,a),k),S)),i(n(y,O),C)}function r(y,C,f,a,k,O,S){return y=i(y,i(i(function(L,W,T){return L&T|W&~T}(C,f,a),k),S)),i(n(y,O),C)}function l(y,C,f,a,k,O,S){return y=i(y,i(i(function(L,W,T){return L^W^T}(C,f,a),k),S)),i(n(y,O),C)}function c(y,C,f,a,k,O,S){return y=i(y,i(i(function(L,W,T){return W^(L|~T)}(C,f,a),k),S)),i(n(y,O),C)}function u(y){var C,f="",a="";for(C=0;C<=3;C++)f+=(a="0"+(y>>>8*C&255).toString(16)).substr(a.length-2,2);return f}var h,p,A,P,g,b,o,m,d,s;for(e=function(y){y=y.replace(/\r\n/g,` `);for(var C="",f=0;f<y.length;f++){var a=y.charCodeAt(f);a<128?C+=String.fromCharCode(a):a>127&&a<2048?(C+=String.fromCharCode(a>>6|192),C+=String.fromCharCode(63&a|128)):(C+=String.fromCharCode(a>>12|224),C+=String.fromCharCode(a>>6&63|128),C+=String.fromCharCode(63&a|128))}return C}(e),h=function(y){for(var C,f=y.length,a=f+8,k=16*((a-a%64)/64+1),O=new Array(k-1),S=0,L=0;L<f;)S=L%4*8,O[C=(L-L%4)/4]=O[C]|y.charCodeAt(L)<<S,L++;return S=L%4*8,O[C=(L-L%4)/4]=O[C]|128<<S,O[k-2]=f<<3,O[k-1]=f>>>29,O}(e),o=1732584193,m=4023233417,d=2562383102,s=271733878,p=0;p<h.length;p+=16)A=o,P=m,g=d,b=s,o=t(o,m,d,s,h[p+0],7,3614090360),s=t(s,o,m,d,h[p+1],12,3905402710),d=t(d,s,o,m,h[p+2],17,606105819),m=t(m,d,s,o,h[p+3],22,3250441966),o=t(o,m,d,s,h[p+4],7,4118548399),s=t(s,o,m,d,h[p+5],12,1200080426),d=t(d,s,o,m,h[p+6],17,2821735955),m=t(m,d,s,o,h[p+7],22,4249261313),o=t(o,m,d,s,h[p+8],7,1770035416),s=t(s,o,m,d,h[p+9],12,2336552879),d=t(d,s,o,m,h[p+10],17,4294925233),m=t(m,d,s,o,h[p+11],22,2304563134),o=t(o,m,d,s,h[p+12],7,1804603682),s=t(s,o,m,d,h[p+13],12,4254626195),d=t(d,s,o,m,h[p+14],17,2792965006),o=r(o,m=t(m,d,s,o,h[p+15],22,1236535329),d,s,h[p+1],5,4129170786),s=r(s,o,m,d,h[p+6],9,3225465664),d=r(d,s,o,m,h[p+11],14,643717713),m=r(m,d,s,o,h[p+0],20,3921069994),o=r(o,m,d,s,h[p+5],5,3593408605),s=r(s,o,m,d,h[p+10],9,38016083),d=r(d,s,o,m,h[p+15],14,3634488961),m=r(m,d,s,o,h[p+4],20,3889429448),o=r(o,m,d,s,h[p+9],5,568446438),s=r(s,o,m,d,h[p+14],9,3275163606),d=r(d,s,o,m,h[p+3],14,4107603335),m=r(m,d,s,o,h[p+8],20,1163531501),o=r(o,m,d,s,h[p+13],5,2850285829),s=r(s,o,m,d,h[p+2],9,4243563512),d=r(d,s,o,m,h[p+7],14,1735328473),o=l(o,m=r(m,d,s,o,h[p+12],20,2368359562),d,s,h[p+5],4,4294588738),s=l(s,o,m,d,h[p+8],11,2272392833),d=l(d,s,o,m,h[p+11],16,1839030562),m=l(m,d,s,o,h[p+14],23,4259657740),o=l(o,m,d,s,h[p+1],4,2763975236),s=l(s,o,m,d,h[p+4],11,1272893353),d=l(d,s,o,m,h[p+7],16,4139469664),m=l(m,d,s,o,h[p+10],23,3200236656),o=l(o,m,d,s,h[p+13],4,681279174),s=l(s,o,m,d,h[p+0],11,3936430074),d=l(d,s,o,m,h[p+3],16,3572445317),m=l(m,d,s,o,h[p+6],23,76029189),o=l(o,m,d,s,h[p+9],4,3654602809),s=l(s,o,m,d,h[p+12],11,3873151461),d=l(d,s,o,m,h[p+15],16,530742520),o=c(o,m=l(m,d,s,o,h[p+2],23,3299628645),d,s,h[p+0],6,4096336452),s=c(s,o,m,d,h[p+7],10,1126891415),d=c(d,s,o,m,h[p+14],15,2878612391),m=c(m,d,s,o,h[p+5],21,4237533241),o=c(o,m,d,s,h[p+12],6,1700485571),s=c(s,o,m,d,h[p+3],10,2399980690),d=c(d,s,o,m,h[p+10],15,4293915773),m=c(m,d,s,o,h[p+1],21,2240044497),o=c(o,m,d,s,h[p+8],6,1873313359),s=c(s,o,m,d,h[p+15],10,4264355552),d=c(d,s,o,m,h[p+6],15,2734768916),m=c(m,d,s,o,h[p+13],21,1309151649),o=c(o,m,d,s,h[p+4],6,4149444226),s=c(s,o,m,d,h[p+11],10,3174756917),d=c(d,s,o,m,h[p+2],15,718787259),m=c(m,d,s,o,h[p+9],21,3951481745),o=i(o,A),m=i(m,P),d=i(d,g),s=i(s,b);return(u(o)+u(m)+u(d)+u(s)).toLowerCase()}},this.Agent={},this.getBrowser=function(e){switch(!0){case this._Browsers.Edge.test(e):return this.Agent.isEdge=!0,"Edge";case this._Browsers.PhantomJS.test(e):return this.Agent.isPhantomJS=!0,"PhantomJS";case this._Browsers.Konqueror.test(e):return this.Agent.isKonqueror=!0,"Konqueror";case this._Browsers.Amaya.test(e):return this.Agent.isAmaya=!0,"Amaya";case this._Browsers.Epiphany.test(e):return this.Agent.isEpiphany=!0,"Epiphany";case this._Browsers.SeaMonkey.test(e):return this.Agent.isSeaMonkey=!0,"SeaMonkey";case this._Browsers.Flock.test(e):return this.Agent.isFlock=!0,"Flock";case this._Browsers.OmniWeb.test(e):return this.Agent.isOmniWeb=!0,"OmniWeb";case this._Browsers.Opera.test(e):return this.Agent.isOpera=!0,"Opera";case this._Browsers.Chromium.test(e):return this.Agent.isChrome=!0,"Chromium";case this._Browsers.Chrome.test(e):return this.Agent.isChrome=!0,"Chrome";case this._Browsers.Safari.test(e):return this.Agent.isSafari=!0,"Safari";case this._Browsers.WinJs.test(e):return this.Agent.isWinJs=!0,"WinJs";case this._Browsers.IE.test(e):return this.Agent.isIE=!0,"IE";case this._Browsers.PS3.test(e):return"ps3";case this._Browsers.PSP.test(e):return"psp";case this._Browsers.Firefox.test(e):return this.Agent.isFirefox=!0,"Firefox";case this._Browsers.UC.test(e):return this.Agent.isUC=!0,"UCBrowser";default:return e.indexOf("Mozilla")!==0&&/^([\d\w\-\.]+)\/[\d\w\.\-]+/i.test(e)?(this.Agent.isAuthoritative=!1,RegExp.$1):"unknown"}},this.getBrowserVersion=function(e){switch(this.Agent.browser){case"Edge":if(this._Versions.Edge.test(e))return RegExp.$1;break;case"PhantomJS":if(this._Versions.PhantomJS.test(e))return RegExp.$1;break;case"Chrome":if(this._Versions.Chrome.test(e))return RegExp.$1;break;case"Chromium":if(this._Versions.Chromium.test(e))return RegExp.$1;break;case"Safari":if(this._Versions.Safari.test(e))return RegExp.$1;break;case"Opera":if(this._Versions.Opera.test(e))return RegExp.$1?RegExp.$1:RegExp.$2;break;case"Firefox":if(this._Versions.Firefox.test(e))return RegExp.$1;break;case"WinJs":if(this._Versions.WinJs.test(e))return RegExp.$1;break;case"IE":if(this._Versions.IE.test(e))return RegExp.$2?RegExp.$2:RegExp.$1;break;case"ps3":if(this._Versions.Ps3.test(e))return RegExp.$1;break;case"psp":if(this._Versions.Psp.test(e))return RegExp.$1;break;case"Amaya":if(this._Versions.Amaya.test(e))return RegExp.$1;break;case"Epiphany":if(this._Versions.Epiphany.test(e))return RegExp.$1;break;case"SeaMonkey":if(this._Versions.SeaMonkey.test(e))return RegExp.$1;break;case"Flock":if(this._Versions.Flock.test(e))return RegExp.$1;break;case"OmniWeb":if(this._Versions.OmniWeb.test(e))return RegExp.$1;break;case"UCBrowser":if(this._Versions.UC.test(e))return RegExp.$1;break;default:if(this.Agent.browser!=="unknown"&&new RegExp(this.Agent.browser+"[\\/ ]([\\d\\w\\.\\-]+)","i").test(e))return RegExp.$1}},this.getOS=function(e){switch(!0){case this._OS.WindowsVista.test(e):return this.Agent.isWindows=!0,"Windows Vista";case this._OS.Windows7.test(e):return this.Agent.isWindows=!0,"Windows 7";case this._OS.Windows8.test(e):return this.Agent.isWindows=!0,"Windows 8";case this._OS.Windows81.test(e):return this.Agent.isWindows=!0,"Windows 8.1";case this._OS.Windows10.test(e):return this.Agent.isWindows=!0,"Windows 10.0";case this._OS.Windows2003.test(e):return this.Agent.isWindows=!0,"Windows 2003";case this._OS.WindowsXP.test(e):return this.Agent.isWindows=!0,"Windows XP";case this._OS.Windows2000.test(e):return this.Agent.isWindows=!0,"Windows 2000";case this._OS.WindowsPhone8.test(e):return"Windows Phone 8";case this._OS.Linux64.test(e):return this.Agent.isLinux=!0,this.Agent.isLinux64=!0,"Linux 64";case this._OS.Linux.test(e):return this.Agent.isLinux=!0,"Linux";case this._OS.ChromeOS.test(e):return this.Agent.isChromeOS=!0,"Chrome OS";case this._OS.Wii.test(e):return"Wii";case this._OS.PS3.test(e):case this._OS.PSP.test(e):return"Playstation";case this._OS.OSXCheetah.test(e):return this.Agent.isMac=!0,"OS X Cheetah";case this._OS.OSXPuma.test(e):return this.Agent.isMac=!0,"OS X Puma";case this._OS.OSXJaguar.test(e):return this.Agent.isMac=!0,"OS X Jaguar";case this._OS.OSXPanther.test(e):return this.Agent.isMac=!0,"OS X Panther";case this._OS.OSXTiger.test(e):return this.Agent.isMac=!0,"OS X Tiger";case this._OS.OSXLeopard.test(e):return this.Agent.isMac=!0,"OS X Leopard";case this._OS.OSXSnowLeopard.test(e):return this.Agent.isMac=!0,"OS X Snow Leopard";case this._OS.OSXLion.test(e):return this.Agent.isMac=!0,"OS X Lion";case this._OS.OSXMountainLion.test(e):return this.Agent.isMac=!0,"OS X Mountain Lion";case this._OS.OSXMavericks.test(e):return this.Agent.isMac=!0,"OS X Mavericks";case this._OS.OSXYosemite.test(e):return this.Agent.isMac=!0,"OS X Yosemite";case this._OS.OSXElCapitan.test(e):return this.Agent.isMac=!0,"OS X El Capitan";case this._OS.OSXSierra.test(e):return this.Agent.isMac=!0,"macOS Sierra";case this._OS.Mac.test(e):return this.Agent.isMac=!0,"OS X";case this._OS.iPad.test(e):return this.Agent.isiPad=!0,e.match(this._OS.iPad)[0].replace("_",".");case this._OS.iPhone.test(e):return this.Agent.isiPhone=!0,e.match(this._OS.iPhone)[0].replace("_",".");case this._OS.Bada.test(e):return this.Agent.isBada=!0,"Bada";case this._OS.Curl.test(e):return this.Agent.isCurl=!0,"Curl";default:return"unknown"}},this.getPlatform=function(e){switch(!0){case this._Platform.Windows.test(e):return"Microsoft Windows";case this._Platform.WindowsPhone.test(e):return this.Agent.isWindowsPhone=!0,"Microsoft Windows Phone";case this._Platform.Mac.test(e):return"Apple Mac";case this._Platform.Curl.test(e):return"Curl";case this._Platform.Android.test(e):return this.Agent.isAndroid=!0,"Android";case this._Platform.Blackberry.test(e):return this.Agent.isBlackberry=!0,"Blackberry";case this._Platform.Linux.test(e):return"Linux";case this._Platform.Wii.test(e):return"Wii";case this._Platform.Playstation.test(e):return"Playstation";case this._Platform.iPad.test(e):return this.Agent.isiPad=!0,"iPad";case this._Platform.iPod.test(e):return this.Agent.isiPod=!0,"iPod";case this._Platform.iPhone.test(e):return this.Agent.isiPhone=!0,"iPhone";case this._Platform.Samsung.test(e):return this.Agent.isiSamsung=!0,"Samsung";default:return"unknown"}},this.testCompatibilityMode=function(){var e=this;if(this.Agent.isIE&&/Trident\/(\d)\.0/i.test(e.Agent.source)){var n=parseInt(RegExp.$1,10),i=parseInt(e.Agent.version,10);i===7&&n===7&&(e.Agent.isIECompatibilityMode=!0,e.Agent.version=11),i===7&&n===6&&(e.Agent.isIECompatibilityMode=!0,e.Agent.version=10),i===7&&n===5&&(e.Agent.isIECompatibilityMode=!0,e.Agent.version=9),i===7&&n===4&&(e.Agent.isIECompatibilityMode=!0,e.Agent.version=8)}},this.testSilk=function(){return new RegExp("silk","gi").test(this.Agent.source)===!0&&(this.Agent.isSilk=!0),/Silk-Accelerated=true/gi.test(this.Agent.source)&&(this.Agent.SilkAccelerated=!0),!!this.Agent.isSilk&&"Silk"},this.testKindleFire=function(){var e=this;switch(!0){case/KFOT/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire";case/KFTT/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD";case/KFJWI/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 8.9";case/KFJWA/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 8.9 4G";case/KFSOWI/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 7";case/KFTHWI/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 7";case/KFTHWA/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 7 4G";case/KFAPWI/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 8.9";case/KFAPWA/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 8.9 4G";default:return!1}},this.testCaptiveNetwork=function(){var e=this;return/CaptiveNetwork/gi.test(e.Agent.source)===!0&&(e.Agent.isCaptive=!0,e.Agent.isMac=!0,e.Agent.platform="Apple Mac","CaptiveNetwork")},this.testMobile=function(){var e=this;switch(!0){case e.Agent.isWindows:case e.Agent.isLinux:case e.Agent.isMac:case e.Agent.isChromeOS:e.Agent.isDesktop=!0;break;case e.Agent.isAndroid:case e.Agent.isSamsung:e.Agent.isMobile=!0,e.Agent.isDesktop=!1}switch(!0){case e.Agent.isiPad:case e.Agent.isiPod:case e.Agent.isiPhone:case e.Agent.isBada:case e.Agent.isBlackberry:case e.Agent.isAndroid:case e.Agent.isWindowsPhone:e.Agent.isMobile=!0,e.Agent.isDesktop=!1}/mobile/i.test(e.Agent.source)&&(e.Agent.isMobile=!0,e.Agent.isDesktop=!1)},this.testTablet=function(){var e=this;switch(!0){case e.Agent.isiPad:case e.Agent.isAndroidTablet:case e.Agent.isKindleFire:e.Agent.isTablet=!0}/tablet/i.test(e.Agent.source)&&(e.Agent.isTablet=!0)},this.testNginxGeoIP=function(e){var n=this;Object.keys(e).forEach(function(i){/^GEOIP/i.test(i)&&(n.Agent.geoIp[i]=e[i])})},this.testBot=function(){var e=this,n=w.exec(e.Agent.source.toLowerCase());n?e.Agent.isBot=n[1]:e.Agent.isAuthoritative||(e.Agent.isBot=/bot/i.test(e.Agent.source))},this.testSmartTV=function(){var e=new RegExp("smart-tv|smarttv|googletv|appletv|hbbtv|pov_tv|netcast.tv","gi").exec(this.Agent.source.toLowerCase());e&&(this.Agent.isSmartTV=e[1])},this.testAndroidTablet=function(){var e=this;e.Agent.isAndroid&&!/mobile/i.test(e.Agent.source)&&(e.Agent.isAndroidTablet=!0)},this.testTouchSupport=function(){this.Agent.isTouchScreen="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},this.getLaguage=function(){this.Agent.language=(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||"").toLowerCase()},this.getColorDepth=function(){this.Agent.colorDepth=screen.colorDepth||-1},this.getScreenResolution=function(){this.Agent.resolution=[screen.availWidth,screen.availHeight]},this.getPixelDepth=function(){this.Agent.pixelDepth=screen.pixelDepth||-1},this.getCPU=function(){this.Agent.cpuCores=navigator.hardwareConcurrency||-1},this.reset=function(){var e=this;for(var n in e.DefaultAgent)e.DefaultAgent.hasOwnProperty(n)&&(e.Agent[n]=e.DefaultAgent[n]);return e},this.parse=function(e){e=e||navigator.userAgent;var n=new x;return n.Agent.source=e.replace(/^\s*/,"").replace(/\s*$/,""),n.Agent.os=n.getOS(n.Agent.source),n.Agent.platform=n.getPlatform(n.Agent.source),n.Agent.browser=n.getBrowser(n.Agent.source),n.Agent.version=n.getBrowserVersion(n.Agent.source),n.testBot(),n.testSmartTV(),n.testMobile(),n.testAndroidTablet(),n.testTablet(),n.testCompatibilityMode(),n.testSilk(),n.testKindleFire(),n.testCaptiveNetwork(),n.testTouchSupport(),n.getLaguage(),n.getColorDepth(),n.getPixelDepth(),n.getScreenResolution(),n.getCPU(),n.Agent},this.get=function(e){var n=this.parse(),i=[];for(var t in this.options)this.options.hasOwnProperty(t)&&this.options[t]===!0&&i.push(n[t]);e&&i.push(e),!this.options.resolution&&n.isMobile&&i.push(n.resolution);var r=n.hashMD5(i.join(":"));return[r.slice(0,8),r.slice(8,12),"4"+r.slice(12,15),"b"+r.slice(15,18),r.slice(20)].join("-")},this.Agent=this.DefaultAgent,this};v.DeviceUUID=x,new x(navigator.userAgent)})(Je);var q,U,H,J,B,ke,ee,z={debugMode:!1,showBanner:!1,bannerType:"default",title:null,subtitle:null,price:null},G=!1,ue=te,xe=[];function le(){return he.apply(this,arguments)}function he(){return he=ve(N().mark(function v(){var w,x,_,E,M=arguments;return N().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((w=M.length>0&&M[0]!==void 0?M[0]:H)&&U){e.next=3;break}return e.abrupt("return",console.warn("Meshkraft AR :: fetchProduct Error. SKU or Key not found"));case 3:return(x=new Headers).append("Content-Type","application/json"),e.next=7,fetch("".concat(Te,"/product/").concat(w,"?token=").concat(U).concat(z.debugMode?"&drafts=true":""),{headers:x});case 7:if((_=e.sent).ok){e.next=12;break}if(_.status!==404){e.next=11;break}return e.abrupt("return",Promise.reject());case 11:return e.abrupt("return",Promise.reject("API Error :: "+_.statusText));case 12:return e.next=14,_.json();case 14:return E=e.sent,e.abrupt("return",E);case 16:case"end":return e.stop()}},v)})),he.apply(this,arguments)}function _e(){var v=document.createElement("a");return v.href=document.location,!!v.hash.includes(ae)&&function(w){var x,_,E=w.split("&"),M={};for(x=0;x<E.length;x++)(_=E[x].split("=")).length<2&&_.push(""),M[decodeURIComponent(_[0])]=decodeURIComponent(_[1]);return M}(v.hash)[ae]}function Oe(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:H,w=new URL(document.location);w.hash="".concat(ae,"=").concat(v),Ne(Ve);var x=He.create(Ue);x.show(),Ge.render({text:w.href,radius:.5,ecLevel:"H",fill:"#000",background:null,size:250},document.querySelector("#meshkraft-qr-canvas"));var _={name:"SHOW_DESKTOP_QR",sku:v,token:U};Q(_)}function Qe(v){q&&q.dispatchEvent(v),xe.forEach(function(w){w.event===v.type&&typeof w.callback=="function"&&w.callback(v)})}function te(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J,w=z,x=w.showBanner,_=w.bannerType,E=w.title,M=E===void 0?J.name:E,e=w.subtitle,n=w.price;if(!v)return console.warn("MeshkraftAR :: Product is not ready");var i=v||{},t=i.assets,r=t===void 0?{}:t,l={name:"START_AR",sku:v.SKU,token:U},c={name:"BANNER_CLICK",sku:v.SKU,token:U};if(G==="quick-look"){var u,h,p;if(r==null||(u=r.usdz)===null||u===void 0||!u.url)return console.debug("MeshkraftAR :: USDZ couldnt found");var A=r==null||(h=r.usdz)===null||h===void 0?void 0:h.url;x===!0&&(A=(r==null||(p=r.usdz)===null||p===void 0?void 0:p.url)+qe(_,{name:M,description:e,price:n,path:U}));var P=function(){Qe(new CustomEvent(we.BANNER_PRESS,{detail:{sku:v.SKU}})),Q(c)};return ze(A,P),Q(l)}if(G==="scene-viewer"){var g=v.assets.glb;return g?($e(g.url,M,v.category&&v.category.config),Q(l)):console.debug("No GLB for SceneViewer")}}function Ye(){B=new window.DeviceUUID().parse(),ke=[B.language,B.platform,B.os,B.cpuCores,B.isAuthoritative,B.silkAccelerated,B.isKindleFire,B.isDesktop,B.isMobile,B.isTablet,B.isWindows,B.isLinux,B.isLinux64,B.isMac,B.isiPad,B.isiPhone,B.isiPod,B.isSmartTV,B.pixelDepth,B.isTouchScreen],ee=B.hashMD5(ke.join(":"))}function Q(v){return Pe.apply(this,arguments)}function Pe(){return(Pe=ve(N().mark(function v(w){var x,_,E,M,e;return N().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(x=w.name,_=w.sku,E=w.token,ee||Ye(),n.prev=2,!ee||!B){n.next=7;break}return M={key:x,count:1,segmentation:{sku:_,token:E,platform:"web"},dow:new Date().getDay(),hour:new Date().getHours()},e={device_id:ee,event:M,source:"ar-sdk",token:E},n.abrupt("return",fetch(Re,{method:"POST",headers:{"Content-Type":"application/json","X-Custom-PSK":Fe},body:JSON.stringify(e)}).catch(function(i){return console.log("Couldnt send event",i)}));case 7:n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),console.log("Couldnt send event",n.t0);case 12:case"end":return n.stop()}},v,null,[[2,9]])}))).apply(this,arguments)}(function(){if(function(){var w=document.querySelector("[data-meshkraft-key]");if(!w)return console.warn("MeshkraftAR :: data-meshkraft-key attribute is missing. Please check your integration to discard this warning.");var x=w.dataset.meshkraftKey;U=x}(),be){if(Ke&&(G="scene-viewer"),Xe&&(G="quick-look"),!G)return console.warn("MeshkraftAR :: Device is not AR compatible");(function(){if(!(q=document.querySelector("[data-meshkraft-sku]")))return null;var w=q.dataset,x=w.meshkraftSku,_=w.meshkraftConfig;try{z=JSON.parse(_),H=x}catch{}})();var v=_e();(v||H)&&le(v||H).then(function(w){J=w,q&&q.addEventListener("click",ue),v&&te(J)}).catch(function(){return console.warn("MeshkraftAR :: Fetch failed")})}else ue=Oe})(),D.addEventListener=function(v,w){Object.values(we).includes(v)&&xe.push({event:v,callback:w})},D.init=function(v){var w=v.token,x=v.config;if(!w)return console.warn("MeshkraftVTO :: Token required.");U=w,Q({name:"INIT",token:w}),x&&x!=null&&V(x)==="object"&&!Array.isArray(x)&&(z=I(I({},z),x));var _=_e();_&&le(_).then(function(E){J=E,q&&q.addEventListener("click",ue),_&&te(J)}).catch(function(){return console.warn("MeshkraftAR :: Fetch failed")})},D.setApiKey=function(v){if(!v)return new Error("API Key is required");U=v},D.setConfig=function(v){if(!v||V(v)!=="object")return console.warn("Config is required and must be an object");z=I(I({},z),v)},D.startAR=function(v){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};return v?be?void le(v).then(function(x){if(!x)return w(new Error("Product not found"));te(x)}).catch(function(){w(new Error("Product not found"))}):Oe(v):new Error("SKU is required")}})});var Z={};ot(Z,{default:()=>Me.default});ne(Z,Ce(pe()));var Me=Ce(pe());var export_default=Me.default;export{export_default as default}; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /* @license * Copyright 2019 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an 'AS IS' BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /*! * device-uuid.js v1.0.4 (https://github.com/biggora/device-uuid/) * Copyright 2016-2017 Alexey Gordeyev * Licensed under MIT (https://github.com/biggora/device-uuid/blob/master/LICENSE) */

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.