meshkraft-viewer
Version:
Web viewer SDK for Meshkraft Platform
8 lines • 54 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).meshkraftAR={})}(this,(function(t){function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function n(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),s=new x(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=A(s,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,s),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function f(){}function d(){}function g(){}var p={};c(p,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var b=g.prototype=f.prototype=Object.create(p);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){function n(i,o,s,a){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,a)}))}a(c.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=g,c(b,"constructor",g),c(g,"constructor",d),d.displayName=c(g,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(y.prototype),c(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new y(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,x.prototype={constructor:x,reset:function(t){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(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function i(t){return i="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},i(t)}function o(t,e,r,n,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var s=t.apply(e,r);function a(t){o(s,n,i,a,c,"next",t)}function c(t){o(s,n,i,a,c,"throw",t)}a(void 0)}))}}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c="https://api.artlabs.ai",u={ERROR:"ar-error",BANNER_PRESS:"add-to-cart"},l="https://events.artlabs.ai",h="zzkZ58VcHc&xH%#";null!=navigator.xr&&null!=self.XRSession&&navigator.xr.isSessionSupported;var f,d,g="#meshkraft-quick-ar",p=(f=navigator.userAgent||navigator.vendor||self.opera,d=!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(f)||/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(f.substr(0,4)))&&(d=!0),d);/\bCrOS\b/.test(navigator.userAgent);var m=/android/i.test(navigator.userAgent),v=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;/Safari\//.test(navigator.userAgent);var b=/firefox/i.test(navigator.userAgent),w=/OculusBrowser/.test(navigator.userAgent);v&&/CriOS\//.test(navigator.userAgent);var y,A=Boolean(window.webkit&&window.webkit.messageHandlers),S=m&&!b&&!w,k=function(){if(v){if(A)return Boolean(/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent));var t=document.createElement("a");return Boolean(t.relList&&t.relList.supports&&t.relList.supports("ar"))}return!1}(),x=".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}",_='<div class="meshkraft-modal">\n<h1>Scan QR Code</h1>\n<p>Point your mobile phone camera to the QR code below to experience in <br/>Augmented Reality</p>\n<canvas id="meshkraft-qr-canvas"></canvas>\n</div>',O=function(t){var e=document.createElement("style");e.textContent=t,document.head.append(e)};function P(t,e){switch(t){case"apple-pay":return"#applePayButtonType=buy&checkoutTitle=".concat(encodeURIComponent(e.name),"&checkoutSubtitle=").concat(encodeURIComponent(e.description||"1 Item"),"&price=").concat(e.price);case"custom":return"#custom=".concat("https://meshkraft-banners.pages.dev","/").concat(e.path);default:return"#callToAction=".concat(encodeURIComponent(e.callToAction||"Add to Cart"),"&checkoutTitle=").concat(encodeURIComponent(e.name||"-"),"&checkoutSubtitle=").concat(encodeURIComponent(e.description||"-"),"&price=").concat(e.price||"-")}}var E=function(t,e){var r=t;(y=document.createElement("a")).addEventListener("message",(function(t){"_apple_ar_quicklook_button_tapped"==t.data&&"function"==typeof e&&e()})),y.setAttribute("rel","ar"),y.setAttribute("href",r);var n=document.createElement("img");y.appendChild(n),y.click(),y.removeChild(n)},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="#model-viewer-no-ar-fallback",i=t,o=self.location.toString(),s=new URL(o),a=new URL(i,o);s.hash=n;var c="intent://arvr.google.com/scene-viewer/1.2?file=".concat(a.toString(),"&title=").concat(e,"&enable_vertical_placement=").concat("Vertical"===r.orientation,"&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=").concat(encodeURIComponent(s.toString()),";end;"),u=document.createElement("a");u.setAttribute("href",c),u.click()},L="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function M(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var W=function(t){var e={exports:{}};return t(e,e.exports),e.exports}((function(t,e){t.exports=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(!a&&M)return M(s);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[s]={exports:{}};e[s][0].call(u.exports,(function(t){return i(e[s][1][t]||t)}),u,u.exports,t,e,r,n)}return r[s].exports}for(var o=M,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.create=r.visible=void 0;var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=document.createElement("div");return r.innerHTML=t.trim(),!0===e?r.children:r.firstChild},i=function(t,e){var r=t.children;return 1===r.length&&r[0].tagName===e},o=function(t){return null!=(t=t||document.querySelector(".basicLightbox"))&&!0===t.ownerDocument.body.contains(t)};r.visible=o,r.create=function(t,e){var r=function(t,e){var r=n('\n\t\t<div class="basicLightbox '.concat(e.className,'">\n\t\t\t<div class="basicLightbox__placeholder" role="dialog"></div>\n\t\t</div>\n\t')),o=r.querySelector(".basicLightbox__placeholder");t.forEach((function(t){return o.appendChild(t)}));var s=i(o,"IMG"),a=i(o,"VIDEO"),c=i(o,"IFRAME");return!0===s&&r.classList.add("basicLightbox--img"),!0===a&&r.classList.add("basicLightbox--video"),!0===c&&r.classList.add("basicLightbox--iframe"),r}(t=function(t){var e="string"==typeof t,r=t instanceof HTMLElement==1;if(!1===e&&!1===r)throw new Error("Content must be a DOM element/node or string");return!0===e?Array.from(n(t,!0)):"TEMPLATE"===t.tagName?[t.content.cloneNode(!0)]:Array.from(t.children)}(t),e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==(t=Object.assign({},t)).closable&&(t.closable=!0),null==t.className&&(t.className=""),null==t.onShow&&(t.onShow=function(){}),null==t.onClose&&(t.onClose=function(){}),"boolean"!=typeof t.closable)throw new Error("Property `closable` must be a boolean");if("string"!=typeof t.className)throw new Error("Property `className` must be a string");if("function"!=typeof t.onShow)throw new Error("Property `onShow` must be a function");if("function"!=typeof t.onClose)throw new Error("Property `onClose` must be a function");return t}(e)),s=function(t){return!1!==e.onClose(a)&&function(t,e){return t.classList.remove("basicLightbox--visible"),setTimeout((function(){return!1===o(t)||t.parentElement.removeChild(t),e()}),410),!0}(r,(function(){if("function"==typeof t)return t(a)}))};!0===e.closable&&r.addEventListener("click",(function(t){t.target===r&&s()}));var a={element:function(){return r},visible:function(){return o(r)},show:function(t){return!1!==e.onShow(a)&&function(t,e){return document.body.appendChild(t),setTimeout((function(){requestAnimationFrame((function(){return t.classList.add("basicLightbox--visible"),e()}))}),10),!0}(r,(function(){if("function"==typeof t)return t(a)}))},close:s};return a}},{}]},{},[1])(1)}));let T=null;class R{}R.render=function(t,e){T(t,e)},self.QrCreator=R,function(t){function e(e,r,n,i){var o={},s=t(n,r);s.u(e),s.J(),i=i||0;var a=s.h(),c=s.h()+2*i;return o.text=e,o.level=r,o.version=n,o.O=c,o.a=function(t,e){return e-=i,!(0>(t-=i)||t>=a||0>e||e>=a)&&s.a(t,e)},o}function r(t,e,r,n,i,o,s,a,c,u){function l(e,r,n,i,s,a,c){e?(t.lineTo(r+a,n+c),t.arcTo(r,n,i,s,o)):t.lineTo(r,n)}s?t.moveTo(e+o,r):t.moveTo(e,r),l(a,n,r,n,i,-o,0),l(c,n,i,e,i,0,-o),l(u,e,i,e,r,o,0),l(s,e,r,n,r,0,o)}function n(t,e,r,n,i,o,s,a,c,u){function l(e,r,n,i){t.moveTo(e+n,r),t.lineTo(e,r),t.lineTo(e,r+i),t.arcTo(e,r,e+n,r,o)}s&&l(e,r,o,o),a&&l(n,r,-o,o),c&&l(n,i,-o,-o),u&&l(e,i,o,-o)}function i(t,i){t:{var o=i.text,s=i.v,a=i.N,c=i.K,u=i.P;for(a=Math.max(1,a||1),c=Math.min(40,c||40);a<=c;a+=1)try{var l=e(o,s,a,u);break t}catch(t){}l=void 0}if(!l)return null;for(o=t.getContext("2d"),i.background&&(o.fillStyle=i.background,o.fillRect(i.left,i.top,i.size,i.size)),s=l.O,c=i.size/s,o.beginPath(),u=0;u<s;u+=1)for(a=0;a<s;a+=1){var h=o,f=i.left+a*c,d=i.top+u*c,g=u,p=a,m=l.a,v=f+c,b=d+c,w=g-1,y=g+1,A=p-1,S=p+1,k=Math.floor(Math.min(.5,Math.max(0,i.R))*c),x=m(g,p),_=m(w,A),O=m(w,p);w=m(w,S);var P=m(g,S);S=m(y,S),p=m(y,p),y=m(y,A),g=m(g,A),f=Math.round(f),d=Math.round(d),v=Math.round(v),b=Math.round(b),x?r(h,f,d,v,b,k,!O&&!g,!O&&!P,!p&&!P,!p&&!g):n(h,f,d,v,b,k,O&&g&&_,O&&P&&w,p&&P&&S,p&&g&&y)}return function(t,e){var r=e.fill;if("string"==typeof r)t.fillStyle=r;else{var n=r.type,i=r.colorStops;if(r=r.position.map((t=>Math.round(t*e.size))),"linear-gradient"===n)var o=t.createLinearGradient.apply(t,r);else{if("radial-gradient"!==n)throw Error("Unsupported fill");o=t.createRadialGradient.apply(t,r)}i.forEach((([t,e])=>{o.addColorStop(t,e)})),t.fillStyle=o}}(o,i),o.fill(),t}var o={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};T=function(t,e){var r={};Object.assign(r,o,t),r.N=r.minVersion,r.K=r.maxVersion,r.v=r.ecLevel,r.left=r.left,r.top=r.top,r.size=r.size,r.fill=r.fill,r.background=r.background,r.text=r.text,r.R=r.radius,r.P=r.quiet,e instanceof HTMLCanvasElement?(e.width===r.size&&e.height===r.size||(e.width=r.size,e.height=r.size),e.getContext("2d").clearRect(0,0,e.width,e.height),i(e,r)):((t=document.createElement("canvas")).width=r.size,t.height=r.size,r=i(t,r),e.appendChild(r))}}(function(){function t(i,s){function a(t,e){for(var r=-1;7>=r;r+=1)if(!(-1>=t+r||h<=t+r))for(var n=-1;7>=n;n+=1)-1>=e+n||h<=e+n||(l[t+r][e+n]=0<=r&&6>=r&&(0==n||6==n)||0<=n&&6>=n&&(0==r||6==r)||2<=r&&4>=r&&2<=n&&4>=n)}function c(t,r){for(var s=h=4*i+17,c=Array(s),g=0;g<s;g+=1){c[g]=Array(s);for(var p=0;p<s;p+=1)c[g][p]=null}for(l=c,a(0,0),a(h-7,0),a(0,h-7),s=n.G(i),c=0;c<s.length;c+=1)for(g=0;g<s.length;g+=1){p=s[c];var m=s[g];if(null==l[p][m])for(var v=-2;2>=v;v+=1)for(var b=-2;2>=b;b+=1)l[p+v][m+b]=-2==v||2==v||-2==b||2==b||0==v&&0==b}for(s=8;s<h-8;s+=1)null==l[s][6]&&(l[s][6]=0==s%2);for(s=8;s<h-8;s+=1)null==l[6][s]&&(l[6][s]=0==s%2);for(s=n.w(u<<3|r),c=0;15>c;c+=1)g=!t&&1==(s>>c&1),l[6>c?c:8>c?c+1:h-15+c][8]=g,l[8][8>c?h-c-1:9>c?15-c:14-c]=g;if(l[h-8][8]=!t,7<=i){for(s=n.A(i),c=0;18>c;c+=1)g=!t&&1==(s>>c&1),l[Math.floor(c/3)][c%3+h-8-3]=g;for(c=0;18>c;c+=1)g=!t&&1==(s>>c&1),l[c%3+h-8-3][Math.floor(c/3)]=g}if(null==f){for(t=o.I(i,u),s=function(){var t=[],e=0,r={B:function(){return t},c:function(e){return 1==(t[Math.floor(e/8)]>>>7-e%8&1)},put:function(t,e){for(var n=0;n<e;n+=1)r.m(1==(t>>>e-n-1&1))},f:function(){return e},m:function(r){var n=Math.floor(e/8);t.length<=n&&t.push(0),r&&(t[n]|=128>>>e%8),e+=1}};return r}(),c=0;c<d.length;c+=1)g=d[c],s.put(4,4),s.put(g.b(),n.f(4,i)),g.write(s);for(c=g=0;c<t.length;c+=1)g+=t[c].j;if(s.f()>8*g)throw Error("code length overflow. ("+s.f()+">"+8*g+")");for(s.f()+4<=8*g&&s.put(0,4);0!=s.f()%8;)s.m(!1);for(;!(s.f()>=8*g)&&(s.put(236,8),!(s.f()>=8*g));)s.put(17,8);var w=0;for(g=c=0,p=Array(t.length),m=Array(t.length),v=0;v<t.length;v+=1){var y=t[v].j,A=t[v].o-y;for(c=Math.max(c,y),g=Math.max(g,A),p[v]=Array(y),b=0;b<p[v].length;b+=1)p[v][b]=255&s.B()[b+w];for(w+=y,b=n.C(A),y=e(p[v],b.b()-1).l(b),m[v]=Array(b.b()-1),b=0;b<m[v].length;b+=1)A=b+y.b()-m[v].length,m[v][b]=0<=A?y.c(A):0}for(b=s=0;b<t.length;b+=1)s+=t[b].o;for(s=Array(s),b=w=0;b<c;b+=1)for(v=0;v<t.length;v+=1)b<p[v].length&&(s[w]=p[v][b],w+=1);for(b=0;b<g;b+=1)for(v=0;v<t.length;v+=1)b<m[v].length&&(s[w]=m[v][b],w+=1);f=s}for(t=f,s=-1,c=h-1,g=7,p=0,r=n.F(r),m=h-1;0<m;m-=2)for(6==m&&--m;;){for(v=0;2>v;v+=1)null==l[c][m-v]&&(b=!1,p<t.length&&(b=1==(t[p]>>>g&1)),r(c,m-v)&&(b=!b),l[c][m-v]=b,-1==--g&&(p+=1,g=7));if(0>(c+=s)||h<=c){c-=s,s=-s;break}}}var u=r[s],l=null,h=0,f=null,d=[],g={u:function(e){e=function(e){var r=t.s(e);return{S:function(){return 4},b:function(){return r.length},write:function(t){for(var e=0;e<r.length;e+=1)t.put(r[e],8)}}}(e),d.push(e),f=null},a:function(t,e){if(0>t||h<=t||0>e||h<=e)throw Error(t+","+e);return l[t][e]},h:function(){return h},J:function(){for(var t=0,e=0,r=0;8>r;r+=1){c(!0,r);var i=n.D(g);(0==r||t>i)&&(t=i,e=r)}c(!1,e)}};return g}function e(t,r){if(void 0===t.length)throw Error(t.length+"/"+r);var n=function(){for(var e=0;e<t.length&&0==t[e];)e+=1;for(var n=Array(t.length-e+r),i=0;i<t.length-e;i+=1)n[i]=t[i+e];return n}(),o={c:function(t){return n[t]},b:function(){return n.length},multiply:function(t){for(var r=Array(o.b()+t.b()-1),n=0;n<o.b();n+=1)for(var s=0;s<t.b();s+=1)r[n+s]^=i.i(i.g(o.c(n))+i.g(t.c(s)));return e(r,0)},l:function(t){if(0>o.b()-t.b())return o;for(var r=i.g(o.c(0))-i.g(t.c(0)),n=Array(o.b()),s=0;s<o.b();s+=1)n[s]=o.c(s);for(s=0;s<t.b();s+=1)n[s]^=i.i(i.g(t.c(s))+r);return e(n,0).l(t)}};return o}t.s=function(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);128>n?e.push(n):2048>n?e.push(192|n>>6,128|63&n):55296>n||57344<=n?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e};var r={L:1,M:0,Q:3,H:2},n=function(){function t(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e}var r=[[],[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]],n={w:function(e){for(var r=e<<10;0<=t(r)-t(1335);)r^=1335<<t(r)-t(1335);return 21522^(e<<10|r)},A:function(e){for(var r=e<<12;0<=t(r)-t(7973);)r^=7973<<t(r)-t(7973);return e<<12|r},G:function(t){return r[t-1]},F:function(t){switch(t){case 0:return function(t,e){return 0==(t+e)%2};case 1:return function(t){return 0==t%2};case 2:return function(t,e){return 0==e%3};case 3:return function(t,e){return 0==(t+e)%3};case 4:return function(t,e){return 0==(Math.floor(t/2)+Math.floor(e/3))%2};case 5:return function(t,e){return 0==t*e%2+t*e%3};case 6:return function(t,e){return 0==(t*e%2+t*e%3)%2};case 7:return function(t,e){return 0==(t*e%3+(t+e)%2)%2};default:throw Error("bad maskPattern:"+t)}},C:function(t){for(var r=e([1],0),n=0;n<t;n+=1)r=r.multiply(e([1,i.i(n)],0));return r},f:function(t,e){if(4!=t||1>e||40<e)throw Error("mode: "+t+"; type: "+e);return 10>e?8:16},D:function(t){for(var e=t.h(),r=0,n=0;n<e;n+=1)for(var i=0;i<e;i+=1){for(var o=0,s=t.a(n,i),a=-1;1>=a;a+=1)if(!(0>n+a||e<=n+a))for(var c=-1;1>=c;c+=1)0>i+c||e<=i+c||(0!=a||0!=c)&&s==t.a(n+a,i+c)&&(o+=1);5<o&&(r+=3+o-5)}for(n=0;n<e-1;n+=1)for(i=0;i<e-1;i+=1)o=0,t.a(n,i)&&(o+=1),t.a(n+1,i)&&(o+=1),t.a(n,i+1)&&(o+=1),t.a(n+1,i+1)&&(o+=1),(0==o||4==o)&&(r+=3);for(n=0;n<e;n+=1)for(i=0;i<e-6;i+=1)t.a(n,i)&&!t.a(n,i+1)&&t.a(n,i+2)&&t.a(n,i+3)&&t.a(n,i+4)&&!t.a(n,i+5)&&t.a(n,i+6)&&(r+=40);for(i=0;i<e;i+=1)for(n=0;n<e-6;n+=1)t.a(n,i)&&!t.a(n+1,i)&&t.a(n+2,i)&&t.a(n+3,i)&&t.a(n+4,i)&&!t.a(n+5,i)&&t.a(n+6,i)&&(r+=40);for(i=o=0;i<e;i+=1)for(n=0;n<e;n+=1)t.a(n,i)&&(o+=1);return r+Math.abs(100*o/e/e-50)/5*10}};return n}(),i=function(){for(var t=Array(256),e=Array(256),r=0;8>r;r+=1)t[r]=1<<r;for(r=8;256>r;r+=1)t[r]=t[r-4]^t[r-5]^t[r-6]^t[r-8];for(r=0;255>r;r+=1)e[t[r]]=r;return{g:function(t){if(1>t)throw Error("glog("+t+")");return e[t]},i:function(e){for(;0>e;)e+=255;for(;256<=e;)e-=255;return t[e]}}}(),o=function(){function t(t,n){switch(n){case r.L:return e[4*(t-1)];case r.M:return e[4*(t-1)+1];case r.Q:return e[4*(t-1)+2];case r.H:return e[4*(t-1)+3]}}var e=[[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]],n={I:function(e,r){var n=t(e,r);if(void 0===n)throw Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+r);e=n.length/3,r=[];for(var i=0;i<e;i+=1)for(var o=n[3*i],s=n[3*i+1],a=n[3*i+2],c=0;c<o;c+=1){var u=a,l={};l.o=s,l.j=u,r.push(l)}return r}};return n}();return t}());var F=QrCreator;
/*!
* 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)
*/!function(t){var e=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("|")+").*$"),r=function(t){t=t||{};var n={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 i in t)t.hasOwnProperty(i)&&void 0!==n[i]&&(n[i]=t[i]);return this.options=n,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(t){var e,r,n=0;if(0===t.length)return n;for(e=0,r=t.length;e<r;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return n},hashMD5:function(t){function e(t,e){return t<<e|t>>>32-e}function r(t,e){var r,n,i,o,s;return i=2147483648&t,o=2147483648&e,s=(1073741823&t)+(1073741823&e),(r=1073741824&t)&(n=1073741824&e)?2147483648^s^i^o:r|n?1073741824&s?3221225472^s^i^o:1073741824^s^i^o:s^i^o}function n(t,n,i,o,s,a,c){return t=r(t,r(r(function(t,e,r){return t&e|~t&r}(n,i,o),s),c)),r(e(t,a),n)}function i(t,n,i,o,s,a,c){return t=r(t,r(r(function(t,e,r){return t&r|e&~r}(n,i,o),s),c)),r(e(t,a),n)}function o(t,n,i,o,s,a,c){return t=r(t,r(r(function(t,e,r){return t^e^r}(n,i,o),s),c)),r(e(t,a),n)}function s(t,n,i,o,s,a,c){return t=r(t,r(r(function(t,e,r){return e^(t|~r)}(n,i,o),s),c)),r(e(t,a),n)}function a(t){var e,r="",n="";for(e=0;e<=3;e++)r+=(n="0"+(t>>>8*e&255).toString(16)).substr(n.length-2,2);return r}var c,u,l,h,f,d,g,p,m,v;for(t=function(t){t=t.replace(/\r\n/g,"\n");for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e+=String.fromCharCode(n):n>127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e}(t),c=function(t){for(var e,r=t.length,n=r+8,i=16*((n-n%64)/64+1),o=new Array(i-1),s=0,a=0;a<r;)s=a%4*8,o[e=(a-a%4)/4]=o[e]|t.charCodeAt(a)<<s,a++;return s=a%4*8,o[e=(a-a%4)/4]=o[e]|128<<s,o[i-2]=r<<3,o[i-1]=r>>>29,o}(t),g=1732584193,p=4023233417,m=2562383102,v=271733878,u=0;u<c.length;u+=16)l=g,h=p,f=m,d=v,g=n(g,p,m,v,c[u+0],7,3614090360),v=n(v,g,p,m,c[u+1],12,3905402710),m=n(m,v,g,p,c[u+2],17,606105819),p=n(p,m,v,g,c[u+3],22,3250441966),g=n(g,p,m,v,c[u+4],7,4118548399),v=n(v,g,p,m,c[u+5],12,1200080426),m=n(m,v,g,p,c[u+6],17,2821735955),p=n(p,m,v,g,c[u+7],22,4249261313),g=n(g,p,m,v,c[u+8],7,1770035416),v=n(v,g,p,m,c[u+9],12,2336552879),m=n(m,v,g,p,c[u+10],17,4294925233),p=n(p,m,v,g,c[u+11],22,2304563134),g=n(g,p,m,v,c[u+12],7,1804603682),v=n(v,g,p,m,c[u+13],12,4254626195),m=n(m,v,g,p,c[u+14],17,2792965006),g=i(g,p=n(p,m,v,g,c[u+15],22,1236535329),m,v,c[u+1],5,4129170786),v=i(v,g,p,m,c[u+6],9,3225465664),m=i(m,v,g,p,c[u+11],14,643717713),p=i(p,m,v,g,c[u+0],20,3921069994),g=i(g,p,m,v,c[u+5],5,3593408605),v=i(v,g,p,m,c[u+10],9,38016083),m=i(m,v,g,p,c[u+15],14,3634488961),p=i(p,m,v,g,c[u+4],20,3889429448),g=i(g,p,m,v,c[u+9],5,568446438),v=i(v,g,p,m,c[u+14],9,3275163606),m=i(m,v,g,p,c[u+3],14,4107603335),p=i(p,m,v,g,c[u+8],20,1163531501),g=i(g,p,m,v,c[u+13],5,2850285829),v=i(v,g,p,m,c[u+2],9,4243563512),m=i(m,v,g,p,c[u+7],14,1735328473),g=o(g,p=i(p,m,v,g,c[u+12],20,2368359562),m,v,c[u+5],4,4294588738),v=o(v,g,p,m,c[u+8],11,2272392833),m=o(m,v,g,p,c[u+11],16,1839030562),p=o(p,m,v,g,c[u+14],23,4259657740),g=o(g,p,m,v,c[u+1],4,2763975236),v=o(v,g,p,m,c[u+4],11,1272893353),m=o(m,v,g,p,c[u+7],16,4139469664),p=o(p,m,v,g,c[u+10],23,3200236656),g=o(g,p,m,v,c[u+13],4,681279174),v=o(v,g,p,m,c[u+0],11,3936430074),m=o(m,v,g,p,c[u+3],16,3572445317),p=o(p,m,v,g,c[u+6],23,76029189),g=o(g,p,m,v,c[u+9],4,3654602809),v=o(v,g,p,m,c[u+12],11,3873151461),m=o(m,v,g,p,c[u+15],16,530742520),g=s(g,p=o(p,m,v,g,c[u+2],23,3299628645),m,v,c[u+0],6,4096336452),v=s(v,g,p,m,c[u+7],10,1126891415),m=s(m,v,g,p,c[u+14],15,2878612391),p=s(p,m,v,g,c[u+5],21,4237533241),g=s(g,p,m,v,c[u+12],6,1700485571),v=s(v,g,p,m,c[u+3],10,2399980690),m=s(m,v,g,p,c[u+10],15,4293915773),p=s(p,m,v,g,c[u+1],21,2240044497),g=s(g,p,m,v,c[u+8],6,1873313359),v=s(v,g,p,m,c[u+15],10,4264355552),m=s(m,v,g,p,c[u+6],15,2734768916),p=s(p,m,v,g,c[u+13],21,1309151649),g=s(g,p,m,v,c[u+4],6,4149444226),v=s(v,g,p,m,c[u+11],10,3174756917),m=s(m,v,g,p,c[u+2],15,718787259),p=s(p,m,v,g,c[u+9],21,3951481745),g=r(g,l),p=r(p,h),m=r(m,f),v=r(v,d);return(a(g)+a(p)+a(m)+a(v)).toLowerCase()}},this.Agent={},this.getBrowser=function(t){switch(!0){case this._Browsers.Edge.test(t):return this.Agent.isEdge=!0,"Edge";case this._Browsers.PhantomJS.test(t):return this.Agent.isPhantomJS=!0,"PhantomJS";case this._Browsers.Konqueror.test(t):return this.Agent.isKonqueror=!0,"Konqueror";case this._Browsers.Amaya.test(t):return this.Agent.isAmaya=!0,"Amaya";case this._Browsers.Epiphany.test(t):return this.Agent.isEpiphany=!0,"Epiphany";case this._Browsers.SeaMonkey.test(t):return this.Agent.isSeaMonkey=!0,"SeaMonkey";case this._Browsers.Flock.test(t):return this.Agent.isFlock=!0,"Flock";case this._Browsers.OmniWeb.test(t):return this.Agent.isOmniWeb=!0,"OmniWeb";case this._Browsers.Opera.test(t):return this.Agent.isOpera=!0,"Opera";case this._Browsers.Chromium.test(t):return this.Agent.isChrome=!0,"Chromium";case this._Browsers.Chrome.test(t):return this.Agent.isChrome=!0,"Chrome";case this._Browsers.Safari.test(t):return this.Agent.isSafari=!0,"Safari";case this._Browsers.WinJs.test(t):return this.Agent.isWinJs=!0,"WinJs";case this._Browsers.IE.test(t):return this.Agent.isIE=!0,"IE";case this._Browsers.PS3.test(t):return"ps3";case this._Browsers.PSP.test(t):return"psp";case this._Browsers.Firefox.test(t):return this.Agent.isFirefox=!0,"Firefox";case this._Browsers.UC.test(t):return this.Agent.isUC=!0,"UCBrowser";default:return 0!==t.indexOf("Mozilla")&&/^([\d\w\-\.]+)\/[\d\w\.\-]+/i.test(t)?(this.Agent.isAuthoritative=!1,RegExp.$1):"unknown"}},this.getBrowserVersion=function(t){switch(this.Agent.browser){case"Edge":if(this._Versions.Edge.test(t))return RegExp.$1;break;case"PhantomJS":if(this._Versions.PhantomJS.test(t))return RegExp.$1;break;case"Chrome":if(this._Versions.Chrome.test(t))return RegExp.$1;break;case"Chromium":if(this._Versions.Chromium.test(t))return RegExp.$1;break;case"Safari":if(this._Versions.Safari.test(t))return RegExp.$1;break;case"Opera":if(this._Versions.Opera.test(t))return RegExp.$1?RegExp.$1:RegExp.$2;break;case"Firefox":if(this._Versions.Firefox.test(t))return RegExp.$1;break;case"WinJs":if(this._Versions.WinJs.test(t))return RegExp.$1;break;case"IE":if(this._Versions.IE.test(t))return RegExp.$2?RegExp.$2:RegExp.$1;break;case"ps3":if(this._Versions.Ps3.test(t))return RegExp.$1;break;case"psp":if(this._Versions.Psp.test(t))return RegExp.$1;break;case"Amaya":if(this._Versions.Amaya.test(t))return RegExp.$1;break;case"Epiphany":if(this._Versions.Epiphany.test(t))return RegExp.$1;break;case"SeaMonkey":if(this._Versions.SeaMonkey.test(t))return RegExp.$1;break;case"Flock":if(this._Versions.Flock.test(t))return RegExp.$1;break;case"OmniWeb":if(this._Versions.OmniWeb.test(t))return RegExp.$1;break;case"UCBrowser":if(this._Versions.UC.test(t))return RegExp.$1;break;default:if("unknown"!==this.Agent.browser&&new RegExp(this.Agent.browser+"[\\/ ]([\\d\\w\\.\\-]+)","i").test(t))return RegExp.$1}},this.getOS=function(t){switch(!0){case this._OS.WindowsVista.test(t):return this.Agent.isWindows=!0,"Windows Vista";case this._OS.Windows7.test(t):return this.Agent.isWindows=!0,"Windows 7";case this._OS.Windows8.test(t):return this.Agent.isWindows=!0,"Windows 8";case this._OS.Windows81.test(t):return this.Agent.isWindows=!0,"Windows 8.1";case this._OS.Windows10.test(t):return this.Agent.isWindows=!0,"Windows 10.0";case this._OS.Windows2003.test(t):return this.Agent.isWindows=!0,"Windows 2003";case this._OS.WindowsXP.test(t):return this.Agent.isWindows=!0,"Windows XP";case this._OS.Windows2000.test(t):return this.Agent.isWindows=!0,"Windows 2000";case this._OS.WindowsPhone8.test(t):return"Windows Phone 8";case this._OS.Linux64.test(t):return this.Agent.isLinux=!0,this.Agent.isLinux64=!0,"Linux 64";case this._OS.Linux.test(t):return this.Agent.isLinux=!0,"Linux";case this._OS.ChromeOS.test(t):return this.Agent.isChromeOS=!0,"Chrome OS";case this._OS.Wii.test(t):return"Wii";case this._OS.PS3.test(t):case this._OS.PSP.test(t):return"Playstation";case this._OS.OSXCheetah.test(t):return this.Agent.isMac=!0,"OS X Cheetah";case this._OS.OSXPuma.test(t):return this.Agent.isMac=!0,"OS X Puma";case this._OS.OSXJaguar.test(t):return this.Agent.isMac=!0,"OS X Jaguar";case this._OS.OSXPanther.test(t):return this.Agent.isMac=!0,"OS X Panther";case this._OS.OSXTiger.test(t):return this.Agent.isMac=!0,"OS X Tiger";case this._OS.OSXLeopard.test(t):return this.Agent.isMac=!0,"OS X Leopard";case this._OS.OSXSnowLeopard.test(t):return this.Agent.isMac=!0,"OS X Snow Leopard";case this._OS.OSXLion.test(t):return this.Agent.isMac=!0,"OS X Lion";case this._OS.OSXMountainLion.test(t):return this.Agent.isMac=!0,"OS X Mountain Lion";case this._OS.OSXMavericks.test(t):return this.Agent.isMac=!0,"OS X Mavericks";case this._OS.OSXYosemite.test(t):return this.Agent.isMac=!0,"OS X Yosemite";case this._OS.OSXElCapitan.test(t):return this.Agent.isMac=!0,"OS X El Capitan";case this._OS.OSXSierra.test(t):return this.Agent.isMac=!0,"macOS Sierra";case this._OS.Mac.test(t):return this.Agent.isMac=!0,"OS X";case this._OS.iPad.test(t):return this.Agent.isiPad=!0,t.match(this._OS.iPad)[0].replace("_",".");case this._OS.iPhone.test(t):return this.Agent.isiPhone=!0,t.match(this._OS.iPhone)[0].replace("_",".");case this._OS.Bada.test(t):return this.Agent.isBada=!0,"Bada";case this._OS.Curl.test(t):return this.Agent.isCurl=!0,"Curl";default:return"unknown"}},this.getPlatform=function(t){switch(!0){case this._Platform.Windows.test(t):return"Microsoft Windows";case this._Platform.WindowsPhone.test(t):return this.Agent.isWindowsPhone=!0,"Microsoft Windows Phone";case this._Platform.Mac.test(t):return"Apple Mac";case this._Platform.Curl.test(t):return"Curl";case this._Platform.Android.test(t):return this.Agent.isAndroid=!0,"Android";case this._Platform.Blackberry.test(t):return this.Agent.isBlackberry=!0,"Blackberry";case this._Platform.Linux.test(t):return"Linux";case this._Platform.Wii.test(t):return"Wii";case this._Platform.Playstation.test(t):return"Playstation";case this._Platform.iPad.test(t):return this.Agent.isiPad=!0,"iPad";case this._Platform.iPod.test(t):return this.Agent.isiPod=!0,"iPod";case this._Platform.iPhone.test(t):return this.Agent.isiPhone=!0,"iPhone";case this._Platform.Samsung.test(t):return this.Agent.isiSamsung=!0,"Samsung";default:return"unknown"}},this.testCompatibilityMode=function(){var t=this;if(this.Agent.isIE&&/Trident\/(\d)\.0/i.test(t.Agent.source)){var e=parseInt(RegExp.$1,10),r=parseInt(t.Agent.version,10);7===r&&7===e&&(t.Agent.isIECompatibilityMode=!0,t.Agent.version=11),7===r&&6===e&&(t.Agent.isIECompatibilityMode=!0,t.Agent.version=10),7===r&&5===e&&(t.Agent.isIECompatibilityMode=!0,t.Agent.version=9),7===r&&4===e&&(t.Agent.isIECompatibilityMode=!0,t.Agent.version=8)}},this.testSilk=function(){if(!0===new RegExp("silk","gi").test(this.Agent.source))this.Agent.isSilk=!0;return/Silk-Accelerated=true/gi.test(this.Agent.source)&&(this.Agent.SilkAccelerated=!0),!!this.Agent.isSilk&&"Silk"},this.testKindleFire=function(){var t=this;switch(!0){case/KFOT/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire";case/KFTT/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD";case/KFJWI/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 8.9";case/KFJWA/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 8.9 4G";case/KFSOWI/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 7";case/KFTHWI/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 7";case/KFTHWA/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 7 4G";case/KFAPWI/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 8.9";case/KFAPWA/gi.test(t.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 8.9 4G";default:return!1}},this.testCaptiveNetwork=function(){var t=this;return!0===/CaptiveNetwork/gi.test(t.Agent.source)&&(t.Agent.isCaptive=!0,t.Agent.isMac=!0,t.Agent.platform="Apple Mac","CaptiveNetwork")},this.testMobile=function(){var t=this;switch(!0){case t.Agent.isWindows:case t.Agent.isLinux:case t.Agent.isMac:case t.Agent.isChromeOS:t.Agent.isDesktop=!0;break;case t.Agent.isAndroid:case t.Agent.isSamsung:t.Agent.isMobile=!0,t.Agent.isDesktop=!1}switch(!0){case t.Agent.isiPad:case t.Agent.isiPod:case t.Agent.isiPhone:case t.Agent.isBada:case t.Agent.isBlackberry:case t.Agent.isAndroid:case t.Agent.isWindowsPhone:t.Agent.isMobile=!0,t.Agent.isDesktop=!1}/mobile/i.test(t.Agent.source)&&(t.Agent.isMobile=!0,t.Agent.isDesktop=!1)},this.testTablet=function(){var t=this;switch(!0){case t.Agent.isiPad:case t.Agent.isAndroidTablet:case t.Agent.isKindleFire:t.Agent.isTablet=!0}/tablet/i.test(t.Agent.source)&&(t.Agent.isTablet=!0)},this.testNginxGeoIP=function(t){var e=this;Object.keys(t).forEach((function(r){/^GEOIP/i.test(r)&&(e.Agent.geoIp[r]=t[r])}))},this.testBot=function(){var t=this,r=e.exec(t.Agent.source.toLowerCase());r?t.Agent.isBot=r[1]:t.Agent.isAuthoritative||(t.Agent.isBot=/bot/i.test(t.Agent.source))},this.testSmartTV=function(){var t=new RegExp("smart-tv|smarttv|googletv|appletv|hbbtv|pov_tv|netcast.tv","gi").exec(this.Agent.source.toLowerCase());t&&(this.Agent.isSmartTV=t[1])},this.testAndroidTablet=function(){var t=this;t.Agent.isAndroid&&!/mobile/i.test(t.Agent.source)&&(t.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 t=this;for(var e in t.DefaultAgent)t.DefaultAgent.hasOwnProperty(e)&&(t.Agent[e]=t.DefaultAgent[e]);return t},this.parse=function(t){t=t||navigator.userAgent;var e=new r;return e.Agent.source=t.replace(/^\s*/,"").replace(/\s*$/,""),e.Agent.os=e.getOS(e.Agent.source),e.Agent.platform=e.getPlatform(e.Agent.source),e.Agent.browser=e.getBrowser(e.Agent.source),e.Agent.version=e.getBrowserVersion(e.Agent.source),e.testBot(),e.testSmartTV(),e.testMobile(),e.testAndroidTablet(),e.testTablet(),e.testCompatibilityMode(),e.testSilk(),e.testKindleFire(),e.testCaptiveNetwork(),e.testTouchSupport(),e.getLaguage(),e.getColorDepth(),e.getPixelDepth(),e.getScreenResolution(),e.getCPU(),e.Agent},this.get=function(t){var e=this.parse(),r=[];for(var n in this.options)this.options.hasOwnProperty(n)&&!0===this.options[n]&&r.push(e[n]);t&&r.push(t),!this.options.resolution&&e.isMobile&&r.push(e.resolution);var i=e.hashMD5(r.join(":"));return[i.slice(0,8),i.slice(8,12),"4"+i.slice(12,15),"b"+i.slice(15,18),i.slice(20)].join("-")},this.Agent=this.DefaultAgent,this};t.DeviceUUID=r,new r(navigator.userAgent)}(L);var D,B,j,I,K,X,V,U={debugMode:!1,showBanner:!1,bannerType:"default",title:null,subtitle:null,price:null},N=!1,q=Y,z=[];function $(){return J.apply(this,arguments)}function J(){return J=s(n().mark((function t(){var e,r,i,o,s=arguments;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=s.length>0&&void 0!==s[0]?s[0]:j)&&B){t.next=3;break}return t.abrupt("return",console.warn("Meshkraft AR :: fetchProduct Error. SKU or Key not found"));case 3:return(r=new Headers).append("Content-Type","application/json"),t.next=7,fetch("".concat(c,"/product/").concat(e,"?token=").concat(B).concat(U.debugMode?"&drafts=true":""),{headers:r});case 7:if((i=t.sent).ok){t.next=12;break}if(404!==i.status){t.next=11;break}return t.abrupt("return",Promise.reject());case 11:return t.abrupt("return",Promise.reject("API Error :: "+i.statusText));case 12:return t.next=14,i.json();case 14:return o=t.sent,t.abrupt("return",o);case 16:case"end":return t.stop()}}),t)}))),J.apply(this,arguments)}function H(){var t=document.createElement("a");return t.href=document.location,!!t.hash.includes(g)&&function(t){var e,r,n=t.split("&"),i={};for(e=0;e<n.length;e++)(r=n[e].split("=")).length<2&&r.push(""),i[decodeURIComponent(r[0])]=decodeURIComponent(r[1]);return i}(t.hash)[g]}function G(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,e=new URL(document.location);e.hash="".concat(g,"=").concat(t),O(x);var r=W.create(