@mapvx/web-components 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./lazy-load-CPuIj6DF.cjs");var t,a,r,i,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=e=>{throw TypeError(e)},n=(e,t,a,r)=>{for(var i,l=r>1?void 0:r?s(t,a):t,n=e.length-1;n>=0;n--)(i=e[n])&&(l=(r?i(t,a,l):i(l))||l);return r&&l&&o(t,a,l),l},p=(e,t,a)=>t.has(e)||l("Cannot "+a),d=(e,t,a)=>(p(e,t,"read from private field"),a?a.call(e):t.get(e)),h=(e,t,a)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),c=(e,t,a,r)=>(p(e,t,"write to private field"),t.set(e,a),a);exports.MapViewWithModal=class extends e.i{constructor(){super(...arguments),this.styles=[e.i$1`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./lazy-load-D9uUqyac.cjs");var t,a,i,r,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=e=>{throw TypeError(e)},n=(e,t,a,i)=>{for(var r,l=i>1?void 0:i?s(t,a):t,n=e.length-1;n>=0;n--)(r=e[n])&&(l=(i?r(t,a,l):r(l))||l);return i&&l&&o(t,a,l),l},p=(e,t,a)=>t.has(e)||l("Cannot "+a),d=(e,t,a)=>(p(e,t,"read from private field"),a?a.call(e):t.get(e)),h=(e,t,a)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),c=(e,t,a,i)=>(p(e,t,"write to private field"),t.set(e,a),a);exports.MapViewWithModal=class extends e.i{constructor(){super(...arguments),this.styles=[e.i$1`
2
2
  :host {
3
3
  display: block;
4
4
  }
5
- `],h(this,t,""),h(this,a,""),h(this,r,"es"),h(this,i,""),this.sdkController=new e.SDKController(this),this.analyticsController=e.AnalyticsController.getInstance()}get apiKey(){return d(this,t)}set apiKey(e){c(this,t,e)}get parentPlaceId(){return d(this,a)}set parentPlaceId(e){c(this,a,e)}get locale(){return d(this,r)}set locale(e){c(this,r,e)}get placeId(){return d(this,i)}set placeId(e){c(this,i,e)}async _loadComponents(){await Promise.all([e.loadCustomMap()])}async firstUpdated(){await this._loadComponents(),this.analyticsController.initialize(),e.RollbarController.initialize()}_mapReadyHandler(){this.sdkController.setMapReady(!0),this.analyticsController.trackEvent("map_ready",this.baseParams())}_updateFloorHandler(e){const t=e.detail;this.sdkController.setFloor(t);const a=this.baseParams();a.floor_id=t,this.analyticsController.trackEvent("floor_change",a)}baseParams(){return{apiKey:this.apiKey,locale:this.locale,parentPlaceId:this.parentPlaceId,placeId:this.placeId,host:window.location.host,pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer,userAgent:navigator.userAgent,screenWidth:window.innerWidth}}updated(e){this.apiKey&&this.locale&&this.parentPlaceId&&(e.has("apiKey")||e.has("locale")||e.has("parentPlaceId"))&&this.sdkController.initialize(this.apiKey,this.locale,this.parentPlaceId),this.placeId&&e.has("placeId")&&this.sdkController.setOriginAndDestination("",this.placeId)}render(){return e.x`
5
+ `],h(this,t,""),h(this,a,""),h(this,i,"es"),h(this,r,""),this.sdkController=new e.SDKController(this),this.analyticsController=e.AnalyticsController.getInstance()}get apiKey(){return d(this,t)}set apiKey(e){c(this,t,e)}get parentPlaceId(){return d(this,a)}set parentPlaceId(e){c(this,a,e)}get locale(){return d(this,i)}set locale(e){c(this,i,e)}get placeId(){return d(this,r)}set placeId(e){c(this,r,e)}async _loadComponents(){await Promise.all([e.loadCustomMap()])}async firstUpdated(){await this._loadComponents(),this.analyticsController.initialize("map-view-with-modal"),e.RollbarController.initialize("map-view-with-modal")}_mapReadyHandler(){this.sdkController.setMapReady(!0),this.analyticsController.trackEvent("map_ready",this.baseParams())}_updateFloorHandler(e){const t=e.detail;this.sdkController.setFloor(t);const a=this.baseParams();a.floor_id=t,this.analyticsController.trackEvent("floor_change",a)}baseParams(){return{apiKey:this.apiKey,locale:this.locale,parentPlaceId:this.parentPlaceId,placeId:this.placeId,host:window.location.host,pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer,userAgent:navigator.userAgent,screenWidth:window.innerWidth}}updated(e){this.apiKey&&this.locale&&this.parentPlaceId&&(e.has("apiKey")||e.has("locale")||e.has("parentPlaceId"))&&this.sdkController.initialize(this.apiKey,this.locale,this.parentPlaceId),this.placeId&&e.has("placeId")&&this.sdkController.setOriginAndDestination("",this.placeId)}render(){return e.x`
6
6
  <div class="route-container">
7
7
  <custom-map
8
8
  class="map-container"
@@ -10,4 +10,4 @@
10
10
  @floorChange=${this._updateFloorHandler}
11
11
  ></custom-map>
12
12
  </div>
13
- `}},t=new WeakMap,a=new WeakMap,r=new WeakMap,i=new WeakMap,n([e.n({type:String})],exports.MapViewWithModal.prototype,"apiKey",1),n([e.n({type:String})],exports.MapViewWithModal.prototype,"parentPlaceId",1),n([e.n({type:String})],exports.MapViewWithModal.prototype,"locale",1),n([e.n({type:String})],exports.MapViewWithModal.prototype,"placeId",1),exports.MapViewWithModal=n([e.t("map-view-with-modal")],exports.MapViewWithModal);
13
+ `}},t=new WeakMap,a=new WeakMap,i=new WeakMap,r=new WeakMap,n([e.n({type:String})],exports.MapViewWithModal.prototype,"apiKey",1),n([e.n({type:String})],exports.MapViewWithModal.prototype,"parentPlaceId",1),n([e.n({type:String})],exports.MapViewWithModal.prototype,"locale",1),n([e.n({type:String})],exports.MapViewWithModal.prototype,"placeId",1),exports.MapViewWithModal=n([e.t("map-view-with-modal")],exports.MapViewWithModal);
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./consume-21nhePJt.cjs"),e=require("./lazy-load-CPuIj6DF.cjs");var n,r,o={};function i(){return r?n:(r=1,n=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var s,a={},u={};function c(){if(s)return u;let t;s=1;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return u.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},u.getSymbolTotalCodewords=function(t){return e[t]},u.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},u.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},u.isKanjiModeEnabled=function(){return void 0!==t},u.toSJIS=function(e){return t(e)},u}var l,f,d,h,g,p={};function w(){return l||(l=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}}(p)),p}var m,y={};var E,v={};var C,A={};var B,M={};function I(){if(B)return M;B=1;const t=w(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return M.getBlocksCount=function(n,r){switch(r){case t.L:return e[4*(n-1)+0];case t.M:return e[4*(n-1)+1];case t.Q:return e[4*(n-1)+2];case t.H:return e[4*(n-1)+3];default:return}},M.getTotalCodewordsCount=function(e,r){switch(r){case t.L:return n[4*(e-1)+0];case t.M:return n[4*(e-1)+1];case t.Q:return n[4*(e-1)+2];case t.H:return n[4*(e-1)+3];default:return}},M}var P,T,b,N,R={},x={};function L(){return T||(T=1,function(t){const e=function(){if(P)return x;P=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)t[r]=n,e[n]=r,n<<=1,256&n&&(n^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),x.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},x.exp=function(e){return t[e]},x.mul=function(n,r){return 0===n||0===r?0:t[e[n]+e[r]]},x}();t.mul=function(t,n){const r=new Uint8Array(t.length+n.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<n.length;i++)r[o+i]^=e.mul(t[o],n[i]);return r},t.mod=function(t,n){let r=new Uint8Array(t);for(;r.length-n.length>=0;){const t=r[0];for(let i=0;i<n.length;i++)r[i]^=e.mul(n[i],t);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;o<n;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}}(R)),R}var k,U={},S={},D={};function F(){return k||(k=1,D.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),D}var z,H,_,q={};function j(){if(z)return q;z=1;const t="[0-9]+";let e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";e=e.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";q.KANJI=new RegExp(e,"g"),q.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),q.BYTE=new RegExp(n,"g"),q.NUMERIC=new RegExp(t,"g"),q.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+e+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return q.testKanji=function(t){return r.test(t)},q.testNumeric=function(t){return o.test(t)},q.testAlphanumeric=function(t){return i.test(t)},q}function J(){return H||(H=1,function(t){const e=F(),n=j();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}}(S)),S}function K(){return _||(_=1,function(t){const e=c(),n=I(),r=w(),o=J(),i=F(),s=e.getBCHDigit(7973);function a(t,e){return o.getCharCountIndicator(t,e)+4}function u(t,e){let n=0;return t.forEach((function(t){const r=a(t.mode,e);n+=r+t.getBitsLength()})),n}t.from=function(t,e){return i.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,r,s){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=o.BYTE);const u=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,r));if(s===o.MIXED)return u;const c=u-a(s,t);switch(s){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let i;const s=r.from(n,r.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,s);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(i.mode,i.getLength(),s)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-s>=0;)n^=7973<<e.getBCHDigit(n)-s;return t<<12|n}}(U)),U}var Y,Q={};var V,O,$,Z,X,W,G,tt,et={};var nt,rt,ot,it={exports:{}};function st(){return nt||(nt=1,function(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var s,a,u,c,l,f,d,h=e.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(u in a=(s=h.pop()).value,c=s.cost,l=t[a]||{})l.hasOwnProperty(u)&&(f=c+l[u],d=i[u],(void 0===i[u]||d>f)&&(i[u]=f,h.push(u,f),o[u]=a));if(void 0!==r&&void 0===i[r]){var g=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(g)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e}(it)),it.exports}function at(){return rt||(rt=1,function(t){const e=J(),n=function(){if(O)return V;O=1;const t=J();function e(e){this.mode=t.NUMERIC,this.data=e.toString()}return e.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},V=e}(),r=function(){if(Z)return $;Z=1;const t=J(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC,this.data=e}return n.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*e.indexOf(this.data[n]);r+=e.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(e.indexOf(this.data[n]),6)},$=n}(),o=function(){if(W)return X;W=1;const t=J();function e(e){this.mode=t.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}return e.getBitsLength=function(t){return 8*t},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},X=e}(),i=function(){if(tt)return G;tt=1;const t=J(),e=c();function n(e){this.mode=t.KANJI,this.data=e}return n.getBitsLength=function(t){return 13*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let r=e.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},G=n}(),s=j(),a=c(),u=st();function l(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function d(t){const n=f(s.NUMERIC,e.NUMERIC,t),r=f(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let o,i;a.isKanjiModeEnabled()?(o=f(s.BYTE,e.BYTE,t),i=f(s.KANJI,e.KANJI,t)):(o=f(s.BYTE_KANJI,e.BYTE,t),i=[]);return n.concat(r,o,i).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,s){switch(s){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return r.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return o.getBitsLength(t)}}function g(t,s){let u;const c=e.getBestModeForData(t);if(u=e.from(s,c),u!==e.BYTE&&u.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(u)+".\n Suggested mode is: "+e.toString(c));switch(u!==e.KANJI||a.isKanjiModeEnabled()||(u=e.BYTE),u){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new r(t);case e.KANJI:return new i(t);case e.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t}),[])},t.fromString=function(n,r){const o=function(t){const n=[];for(let r=0;r<t.length;r++){const o=t[r];switch(o.mode){case e.NUMERIC:n.push([o,{data:o.data,mode:e.ALPHANUMERIC,length:o.length},{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.ALPHANUMERIC:n.push([o,{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.KANJI:n.push([o,{data:o.data,mode:e.BYTE,length:l(o.data)}]);break;case e.BYTE:n.push([{data:o.data,mode:e.BYTE,length:l(o.data)}])}}return n}(d(n,a.isKanjiModeEnabled())),i=function(t,n){const r={},o={start:{}};let i=["start"];for(let s=0;s<t.length;s++){const a=t[s],u=[];for(let t=0;t<a.length;t++){const c=a[t],l=""+s+t;u.push(l),r[l]={node:c,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const s=i[t];r[s]&&r[s].node.mode===c.mode?(o[s][l]=h(r[s].lastCount+c.length,c.mode)-h(r[s].lastCount,c.mode),r[s].lastCount+=c.length):(r[s]&&(r[s].lastCount=c.length),o[s][l]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,n))}}i=u}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:r}}(o,r),s=u.find_path(i.map,"start","end"),c=[];for(let t=1;t<s.length-1;t++)c.push(i.table[s[t]].node);return t.fromArray(function(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(c))},t.rawSplit=function(e){return t.fromArray(d(e,a.isKanjiModeEnabled()))}}(et)),et}function ut(){if(ot)return a;ot=1;const t=c(),e=w(),n=function(){if(d)return f;function t(){this.buffer=[],this.length=0}return d=1,t.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},f=t}(),r=function(){if(g)return h;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return g=1,t.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},h=t}(),o=(m||(m=1,function(t){const e=c().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,r=e(t),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let e=1;e<n-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}(y)),y),i=function(){if(E)return v;E=1;const t=c().getSymbolSize;return v.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},v}(),s=(C||(C=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,r=40,o=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,o=0,i=0,s=null,a=null;for(let u=0;u<n;u++){o=i=0,s=a=null;for(let c=0;c<n;c++){let n=t.get(u,c);n===s?o++:(o>=5&&(r+=e+(o-5)),s=n,o=1),n=t.get(c,u),n===a?i++:(i>=5&&(r+=e+(i-5)),a=n,i=1)}o>=5&&(r+=e+(o-5)),i>=5&&(r+=e+(i-5))}return r},t.getPenaltyN2=function(t){const e=t.size;let r=0;for(let n=0;n<e-1;n++)for(let o=0;o<e-1;o++){const e=t.get(n,o)+t.get(n,o+1)+t.get(n+1,o)+t.get(n+1,o+1);4!==e&&0!==e||r++}return r*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,o=0,i=0;for(let r=0;r<e;r++){o=i=0;for(let s=0;s<e;s++)o=o<<1&2047|t.get(r,s),s>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|t.get(s,r),s>=10&&(1488===i||93===i)&&n++}return n*r},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*o},t.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,i(t,o,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<i&&(i=r,o=s)}return o}}(A)),A),u=I(),l=function(){if(N)return b;N=1;const t=L();function e(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(e){this.degree=e,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const r=t.mod(n,this.genPoly),o=this.degree-r.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(r,o),t}return r},b=e}(),p=K(),B=function(){if(Y)return Q;Y=1;const t=c(),e=t.getBCHDigit(1335);return Q.getEncodedBits=function(n,r){const o=n.bit<<3|r;let i=o<<10;for(;t.getBCHDigit(i)-e>=0;)i^=1335<<t.getBCHDigit(i)-e;return 21522^(o<<10|i)},Q}(),M=J(),P=at();function T(t,e,n){const r=t.size,o=B.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=1==(o>>i&1),i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(r-8,8,1,!0)}function R(e,r,o){const i=new n;o.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),M.getCharCountIndicator(t.mode,e)),t.write(i)}));const s=8*(t.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,r));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const a=(s-i.getLengthInBits())/8;for(let t=0;t<a;t++)i.put(t%2?17:236,8);return function(e,n,r){const o=t.getSymbolTotalCodewords(n),i=u.getTotalCodewordsCount(n,r),s=o-i,a=u.getBlocksCount(n,r),c=o%a,f=a-c,d=Math.floor(o/a),h=Math.floor(s/a),g=h+1,p=d-h,w=new l(p);let m=0;const y=new Array(a),E=new Array(a);let v=0;const C=new Uint8Array(e.buffer);for(let t=0;t<a;t++){const e=t<f?h:g;y[t]=C.slice(m,m+e),E[t]=w.encode(y[t]),m+=e,v=Math.max(v,e)}const A=new Uint8Array(o);let B,M,I=0;for(B=0;B<v;B++)for(M=0;M<a;M++)B<y[M].length&&(A[I++]=y[M][B]);for(B=0;B<p;B++)for(M=0;M<a;M++)A[I++]=E[M][B];return A}(i,e,r)}function x(e,n,a,u){let c;if(Array.isArray(e))c=P.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=P.rawSplit(e);t=p.getBestVersionForData(n,a)}c=P.fromString(e,t||40)}}const l=p.getBestVersionForData(c,a);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else n=l;const f=R(n,a,c),d=t.getSymbolSize(n),h=new r(d);return function(t,e){const n=t.size,r=i.getPositions(e);for(let o=0;o<r.length;o++){const e=r[o][0],i=r[o][1];for(let r=-1;r<=7;r++)if(!(e+r<=-1||n<=e+r))for(let o=-1;o<=7;o++)i+o<=-1||n<=i+o||(r>=0&&r<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===r||6===r)||r>=2&&r<=4&&o>=2&&o<=4?t.set(e+r,i+o,!0,!0):t.set(e+r,i+o,!1,!0))}}(h,n),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(h),function(t,e){const n=o.getPositions(e);for(let r=0;r<n.length;r++){const e=n[r][0],o=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?t.set(e+n,o+r,!0,!0):t.set(e+n,o+r,!1,!0)}}(h,n),T(h,a,0),n>=7&&function(t,e){const n=t.size,r=p.getEncodedBits(e);let o,i,s;for(let a=0;a<18;a++)o=Math.floor(a/3),i=a%3+n-8-3,s=1==(r>>a&1),t.set(o,i,s,!0),t.set(i,o,s,!0)}(h,n),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,a-n)){let r=!1;s<e.length&&(r=1==(e[s]>>>i&1)),t.set(o,a-n,r),i--,-1===i&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(h,f),isNaN(u)&&(u=s.getBestMask(h,T.bind(null,h,a))),s.applyMask(u,h),T(h,a,u),{modules:h,version:n,errorCorrectionLevel:a,maskPattern:u,segments:c}}return a.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let o,i,a=e.M;return void 0!==r&&(a=e.from(r.errorCorrectionLevel,e.M),o=p.from(r.version),i=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),x(n,o,a,i)},a}var ct,lt,ft={},dt={};function ht(){return ct||(ct=1,function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:n,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,i=n.modules.data,s=t.getScale(o,r),a=Math.floor((o+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let l=4*(t*a+n),f=r.color.light;if(t>=u&&n>=u&&t<a-u&&n<a-u){f=c[i[Math.floor((t-u)/s)*o+Math.floor((n-u)/s)]?1:0]}e[l++]=f.r,e[l++]=f.g,e[l++]=f.b,e[l]=f.a}}}(dt)),dt}function gt(){return lt||(lt=1,function(t){const e=ht();t.render=function(t,n,r){let o=r,i=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=e.getOptions(o);const s=e.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return e.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,i,s),a.putImageData(u,0,0),i},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=t.render(e,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}}(ft)),ft}var pt,wt,mt={};function yt(){if(pt)return mt;pt=1;const t=ht();function e(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}return mt.render=function(r,o,i){const s=t.getOptions(o),a=r.modules.size,u=r.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+e(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+e(s.color.dark,"stroke")+' d="'+function(t,e,r){let o="",i=0,s=!1,a=0;for(let u=0;u<t.length;u++){const c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(o+=s?n("M",c+r,.5+l+r):n("m",i,0),i=0,s=!1),c+1<e&&t[u+1]||(o+=n("h",a),a=0)):i++}return o}(u,a,s.margin)+'"/>',d='viewBox="0 0 '+c+" "+c+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof i&&i(null,h),h},mt}var Et=function(){if(wt)return o;wt=1;const t=i(),e=ut(),n=gt(),r=yt();function s(n,r,o,i,s){const a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(o=r,r=i=void 0):2!==u||r.getContext||(i=o,o=r,r=void 0),new Promise((function(t,s){try{const s=e.create(o,i);t(n(s,r,i))}catch(a){s(a)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(s=o,o=r,r=i=void 0):3===u&&(r.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=o,o=r,r=void 0));try{const t=e.create(o,i);s(null,n(t,r,i))}catch(l){s(l)}}return o.create=e.create,o.toCanvas=s.bind(null,n.render),o.toDataURL=s.bind(null,n.renderToDataURL),o.toString=s.bind(null,(function(t,e,n){return r.render(t,n)})),o}();var vt=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor,At=(t,e,n,r)=>{for(var o,i=r>1?void 0:r?Ct(e,n):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(r?o(e,n,i):o(i))||i);return r&&i&&vt(e,n,i),i};exports.QRModal=class extends e.i{constructor(){super(...arguments),this.qrLoaded=!1}updated(){const{originId:t,destinationId:e,generalConfig:n}=this.sdkData??{};if(!this.qrLoaded&&t&&e&&n){this.qrLoaded=!0;const{baseUrl:r}=n,o=`${r}/${t}?destinationId=${e}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,i={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:150};Et.toDataURL(o,i).then((t=>{const e=this.shadowRoot?.getElementById("qr");e&&e instanceof HTMLImageElement&&(e.src=t)}))}}render(){return e.x`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./consume-DohRCBQT.cjs"),e=require("./lazy-load-D9uUqyac.cjs");var n,r,o={};function i(){return r?n:(r=1,n=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var s,a={},u={};function c(){if(s)return u;let t;s=1;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return u.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},u.getSymbolTotalCodewords=function(t){return e[t]},u.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},u.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},u.isKanjiModeEnabled=function(){return void 0!==t},u.toSJIS=function(e){return t(e)},u}var l,f,d,h,g,p={};function w(){return l||(l=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}}(p)),p}var m,y={};var E,v={};var C,A={};var B,M={};function I(){if(B)return M;B=1;const t=w(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return M.getBlocksCount=function(n,r){switch(r){case t.L:return e[4*(n-1)+0];case t.M:return e[4*(n-1)+1];case t.Q:return e[4*(n-1)+2];case t.H:return e[4*(n-1)+3];default:return}},M.getTotalCodewordsCount=function(e,r){switch(r){case t.L:return n[4*(e-1)+0];case t.M:return n[4*(e-1)+1];case t.Q:return n[4*(e-1)+2];case t.H:return n[4*(e-1)+3];default:return}},M}var P,T,b,N,R={},x={};function L(){return T||(T=1,function(t){const e=function(){if(P)return x;P=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)t[r]=n,e[n]=r,n<<=1,256&n&&(n^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),x.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},x.exp=function(e){return t[e]},x.mul=function(n,r){return 0===n||0===r?0:t[e[n]+e[r]]},x}();t.mul=function(t,n){const r=new Uint8Array(t.length+n.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<n.length;i++)r[o+i]^=e.mul(t[o],n[i]);return r},t.mod=function(t,n){let r=new Uint8Array(t);for(;r.length-n.length>=0;){const t=r[0];for(let i=0;i<n.length;i++)r[i]^=e.mul(n[i],t);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;o<n;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}}(R)),R}var k,U={},S={},D={};function F(){return k||(k=1,D.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),D}var z,H,_,q={};function j(){if(z)return q;z=1;const t="[0-9]+";let e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";e=e.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";q.KANJI=new RegExp(e,"g"),q.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),q.BYTE=new RegExp(n,"g"),q.NUMERIC=new RegExp(t,"g"),q.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+e+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return q.testKanji=function(t){return r.test(t)},q.testNumeric=function(t){return o.test(t)},q.testAlphanumeric=function(t){return i.test(t)},q}function J(){return H||(H=1,function(t){const e=F(),n=j();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}}(S)),S}function K(){return _||(_=1,function(t){const e=c(),n=I(),r=w(),o=J(),i=F(),s=e.getBCHDigit(7973);function a(t,e){return o.getCharCountIndicator(t,e)+4}function u(t,e){let n=0;return t.forEach((function(t){const r=a(t.mode,e);n+=r+t.getBitsLength()})),n}t.from=function(t,e){return i.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,r,s){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=o.BYTE);const u=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,r));if(s===o.MIXED)return u;const c=u-a(s,t);switch(s){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let i;const s=r.from(n,r.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,s);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(i.mode,i.getLength(),s)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-s>=0;)n^=7973<<e.getBCHDigit(n)-s;return t<<12|n}}(U)),U}var Y,Q={};var V,O,$,Z,X,W,G,tt,et={};var nt,rt,ot,it={exports:{}};function st(){return nt||(nt=1,function(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var s,a,u,c,l,f,d,h=e.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(u in a=(s=h.pop()).value,c=s.cost,l=t[a]||{})l.hasOwnProperty(u)&&(f=c+l[u],d=i[u],(void 0===i[u]||d>f)&&(i[u]=f,h.push(u,f),o[u]=a));if(void 0!==r&&void 0===i[r]){var g=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(g)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e}(it)),it.exports}function at(){return rt||(rt=1,function(t){const e=J(),n=function(){if(O)return V;O=1;const t=J();function e(e){this.mode=t.NUMERIC,this.data=e.toString()}return e.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},V=e}(),r=function(){if(Z)return $;Z=1;const t=J(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC,this.data=e}return n.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*e.indexOf(this.data[n]);r+=e.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(e.indexOf(this.data[n]),6)},$=n}(),o=function(){if(W)return X;W=1;const t=J();function e(e){this.mode=t.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}return e.getBitsLength=function(t){return 8*t},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},X=e}(),i=function(){if(tt)return G;tt=1;const t=J(),e=c();function n(e){this.mode=t.KANJI,this.data=e}return n.getBitsLength=function(t){return 13*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let r=e.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},G=n}(),s=j(),a=c(),u=st();function l(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function d(t){const n=f(s.NUMERIC,e.NUMERIC,t),r=f(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let o,i;a.isKanjiModeEnabled()?(o=f(s.BYTE,e.BYTE,t),i=f(s.KANJI,e.KANJI,t)):(o=f(s.BYTE_KANJI,e.BYTE,t),i=[]);return n.concat(r,o,i).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,s){switch(s){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return r.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return o.getBitsLength(t)}}function g(t,s){let u;const c=e.getBestModeForData(t);if(u=e.from(s,c),u!==e.BYTE&&u.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(u)+".\n Suggested mode is: "+e.toString(c));switch(u!==e.KANJI||a.isKanjiModeEnabled()||(u=e.BYTE),u){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new r(t);case e.KANJI:return new i(t);case e.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t}),[])},t.fromString=function(n,r){const o=function(t){const n=[];for(let r=0;r<t.length;r++){const o=t[r];switch(o.mode){case e.NUMERIC:n.push([o,{data:o.data,mode:e.ALPHANUMERIC,length:o.length},{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.ALPHANUMERIC:n.push([o,{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.KANJI:n.push([o,{data:o.data,mode:e.BYTE,length:l(o.data)}]);break;case e.BYTE:n.push([{data:o.data,mode:e.BYTE,length:l(o.data)}])}}return n}(d(n,a.isKanjiModeEnabled())),i=function(t,n){const r={},o={start:{}};let i=["start"];for(let s=0;s<t.length;s++){const a=t[s],u=[];for(let t=0;t<a.length;t++){const c=a[t],l=""+s+t;u.push(l),r[l]={node:c,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const s=i[t];r[s]&&r[s].node.mode===c.mode?(o[s][l]=h(r[s].lastCount+c.length,c.mode)-h(r[s].lastCount,c.mode),r[s].lastCount+=c.length):(r[s]&&(r[s].lastCount=c.length),o[s][l]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,n))}}i=u}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:r}}(o,r),s=u.find_path(i.map,"start","end"),c=[];for(let t=1;t<s.length-1;t++)c.push(i.table[s[t]].node);return t.fromArray(function(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(c))},t.rawSplit=function(e){return t.fromArray(d(e,a.isKanjiModeEnabled()))}}(et)),et}function ut(){if(ot)return a;ot=1;const t=c(),e=w(),n=function(){if(d)return f;function t(){this.buffer=[],this.length=0}return d=1,t.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},f=t}(),r=function(){if(g)return h;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return g=1,t.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},h=t}(),o=(m||(m=1,function(t){const e=c().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,r=e(t),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let e=1;e<n-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}(y)),y),i=function(){if(E)return v;E=1;const t=c().getSymbolSize;return v.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},v}(),s=(C||(C=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,r=40,o=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,o=0,i=0,s=null,a=null;for(let u=0;u<n;u++){o=i=0,s=a=null;for(let c=0;c<n;c++){let n=t.get(u,c);n===s?o++:(o>=5&&(r+=e+(o-5)),s=n,o=1),n=t.get(c,u),n===a?i++:(i>=5&&(r+=e+(i-5)),a=n,i=1)}o>=5&&(r+=e+(o-5)),i>=5&&(r+=e+(i-5))}return r},t.getPenaltyN2=function(t){const e=t.size;let r=0;for(let n=0;n<e-1;n++)for(let o=0;o<e-1;o++){const e=t.get(n,o)+t.get(n,o+1)+t.get(n+1,o)+t.get(n+1,o+1);4!==e&&0!==e||r++}return r*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,o=0,i=0;for(let r=0;r<e;r++){o=i=0;for(let s=0;s<e;s++)o=o<<1&2047|t.get(r,s),s>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|t.get(s,r),s>=10&&(1488===i||93===i)&&n++}return n*r},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*o},t.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,i(t,o,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<i&&(i=r,o=s)}return o}}(A)),A),u=I(),l=function(){if(N)return b;N=1;const t=L();function e(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(e){this.degree=e,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const r=t.mod(n,this.genPoly),o=this.degree-r.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(r,o),t}return r},b=e}(),p=K(),B=function(){if(Y)return Q;Y=1;const t=c(),e=t.getBCHDigit(1335);return Q.getEncodedBits=function(n,r){const o=n.bit<<3|r;let i=o<<10;for(;t.getBCHDigit(i)-e>=0;)i^=1335<<t.getBCHDigit(i)-e;return 21522^(o<<10|i)},Q}(),M=J(),P=at();function T(t,e,n){const r=t.size,o=B.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=1==(o>>i&1),i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(r-8,8,1,!0)}function R(e,r,o){const i=new n;o.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),M.getCharCountIndicator(t.mode,e)),t.write(i)}));const s=8*(t.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,r));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const a=(s-i.getLengthInBits())/8;for(let t=0;t<a;t++)i.put(t%2?17:236,8);return function(e,n,r){const o=t.getSymbolTotalCodewords(n),i=u.getTotalCodewordsCount(n,r),s=o-i,a=u.getBlocksCount(n,r),c=o%a,f=a-c,d=Math.floor(o/a),h=Math.floor(s/a),g=h+1,p=d-h,w=new l(p);let m=0;const y=new Array(a),E=new Array(a);let v=0;const C=new Uint8Array(e.buffer);for(let t=0;t<a;t++){const e=t<f?h:g;y[t]=C.slice(m,m+e),E[t]=w.encode(y[t]),m+=e,v=Math.max(v,e)}const A=new Uint8Array(o);let B,M,I=0;for(B=0;B<v;B++)for(M=0;M<a;M++)B<y[M].length&&(A[I++]=y[M][B]);for(B=0;B<p;B++)for(M=0;M<a;M++)A[I++]=E[M][B];return A}(i,e,r)}function x(e,n,a,u){let c;if(Array.isArray(e))c=P.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=P.rawSplit(e);t=p.getBestVersionForData(n,a)}c=P.fromString(e,t||40)}}const l=p.getBestVersionForData(c,a);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else n=l;const f=R(n,a,c),d=t.getSymbolSize(n),h=new r(d);return function(t,e){const n=t.size,r=i.getPositions(e);for(let o=0;o<r.length;o++){const e=r[o][0],i=r[o][1];for(let r=-1;r<=7;r++)if(!(e+r<=-1||n<=e+r))for(let o=-1;o<=7;o++)i+o<=-1||n<=i+o||(r>=0&&r<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===r||6===r)||r>=2&&r<=4&&o>=2&&o<=4?t.set(e+r,i+o,!0,!0):t.set(e+r,i+o,!1,!0))}}(h,n),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(h),function(t,e){const n=o.getPositions(e);for(let r=0;r<n.length;r++){const e=n[r][0],o=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?t.set(e+n,o+r,!0,!0):t.set(e+n,o+r,!1,!0)}}(h,n),T(h,a,0),n>=7&&function(t,e){const n=t.size,r=p.getEncodedBits(e);let o,i,s;for(let a=0;a<18;a++)o=Math.floor(a/3),i=a%3+n-8-3,s=1==(r>>a&1),t.set(o,i,s,!0),t.set(i,o,s,!0)}(h,n),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,a-n)){let r=!1;s<e.length&&(r=1==(e[s]>>>i&1)),t.set(o,a-n,r),i--,-1===i&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(h,f),isNaN(u)&&(u=s.getBestMask(h,T.bind(null,h,a))),s.applyMask(u,h),T(h,a,u),{modules:h,version:n,errorCorrectionLevel:a,maskPattern:u,segments:c}}return a.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let o,i,a=e.M;return void 0!==r&&(a=e.from(r.errorCorrectionLevel,e.M),o=p.from(r.version),i=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),x(n,o,a,i)},a}var ct,lt,ft={},dt={};function ht(){return ct||(ct=1,function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:n,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,i=n.modules.data,s=t.getScale(o,r),a=Math.floor((o+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let l=4*(t*a+n),f=r.color.light;if(t>=u&&n>=u&&t<a-u&&n<a-u){f=c[i[Math.floor((t-u)/s)*o+Math.floor((n-u)/s)]?1:0]}e[l++]=f.r,e[l++]=f.g,e[l++]=f.b,e[l]=f.a}}}(dt)),dt}function gt(){return lt||(lt=1,function(t){const e=ht();t.render=function(t,n,r){let o=r,i=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=e.getOptions(o);const s=e.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return e.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,i,s),a.putImageData(u,0,0),i},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=t.render(e,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}}(ft)),ft}var pt,wt,mt={};function yt(){if(pt)return mt;pt=1;const t=ht();function e(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}return mt.render=function(r,o,i){const s=t.getOptions(o),a=r.modules.size,u=r.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+e(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+e(s.color.dark,"stroke")+' d="'+function(t,e,r){let o="",i=0,s=!1,a=0;for(let u=0;u<t.length;u++){const c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(o+=s?n("M",c+r,.5+l+r):n("m",i,0),i=0,s=!1),c+1<e&&t[u+1]||(o+=n("h",a),a=0)):i++}return o}(u,a,s.margin)+'"/>',d='viewBox="0 0 '+c+" "+c+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof i&&i(null,h),h},mt}var Et=function(){if(wt)return o;wt=1;const t=i(),e=ut(),n=gt(),r=yt();function s(n,r,o,i,s){const a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(o=r,r=i=void 0):2!==u||r.getContext||(i=o,o=r,r=void 0),new Promise((function(t,s){try{const s=e.create(o,i);t(n(s,r,i))}catch(a){s(a)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(s=o,o=r,r=i=void 0):3===u&&(r.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=o,o=r,r=void 0));try{const t=e.create(o,i);s(null,n(t,r,i))}catch(l){s(l)}}return o.create=e.create,o.toCanvas=s.bind(null,n.render),o.toDataURL=s.bind(null,n.renderToDataURL),o.toString=s.bind(null,(function(t,e,n){return r.render(t,n)})),o}();var vt=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor,At=(t,e,n,r)=>{for(var o,i=r>1?void 0:r?Ct(e,n):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(r?o(e,n,i):o(i))||i);return r&&i&&vt(e,n,i),i};exports.QRModal=class extends e.i{constructor(){super(...arguments),this.qrLoaded=!1}updated(){const{originId:t,destinationId:e,generalConfig:n}=this.sdkData??{};if(!this.qrLoaded&&t&&e&&n){this.qrLoaded=!0;const{baseUrl:r}=n,o=`${r}/${t}?destinationId=${e}&utm_source=qr-totem&utm_content=route&utm_referrer=totem`,i={errorCorrectionLevel:"M",type:"image/webp",margin:1,width:150};Et.toDataURL(o,i).then((t=>{const e=this.shadowRoot?.getElementById("qr");e&&e instanceof HTMLImageElement&&(e.src=t)}))}}render(){return e.x`
2
2
  <div class="card">
3
3
  <div class="modal-content">
4
4
  <div class="pin-container">
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./consume-21nhePJt.cjs"),t=require("./lazy-load-CPuIj6DF.cjs");var i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,n=(e,t,n,o)=>{for(var a,r=o>1?void 0:o?s(t,n):t,c=e.length-1;c>=0;c--)(a=e[c])&&(r=(o?a(t,n,r):a(r))||r);return o&&r&&i(t,n,r),r};exports.RouteOptions=class extends t.i{constructor(){super(),this.assets=null,this._loadAssets()}async _loadAssets(){this.assets=await(async()=>{const[e,t,i,s,n,o]=await Promise.all([Promise.resolve().then((()=>require("./accessibility-DWoi6we_.cjs"))),Promise.resolve().then((()=>require("./back_arrow-Cb1GjmUe.cjs"))),Promise.resolve().then((()=>require("./icon-destination-point-C8Bl9rvO.cjs"))),Promise.resolve().then((()=>require("./icon-origin-point-B0FLE42C.cjs"))),Promise.resolve().then((()=>require("./repeat_icon-DBYc7GBB.cjs"))),Promise.resolve().then((()=>require("./walking-CDbgxjU4.cjs")))]);return{accessibilityIcon:e.default,backIcon:t.default,destinationPoint:i.default,originPoint:s.default,repeatIcon:n.default,walkingIcon:o.default}})(),this.requestUpdate()}handleBack(){this.dispatchEvent(new CustomEvent("back",{detail:{},bubbles:!0,composed:!0}))}handleAccessibility(){this.dispatchEvent(new CustomEvent("accessibilityChange",{detail:!this.sdkData?.accessibleRoute,bubbles:!0,composed:!0}))}handleRepeatRoute(){this.dispatchEvent(new CustomEvent("repeatRoute",{detail:!0,bubbles:!0,composed:!0}))}handleGenerateRoute(){this.dispatchEvent(new CustomEvent("generateRoute",{detail:!0,bubbles:!0,composed:!0}))}render(){if(!this.sdkData)return t.x``;const{destination:e,accessibleRoute:i,parentPlace:s,origin:n,route:o,isRouteAnimating:a}=this.sdkData,r=i?this.assets?.accessibilityIcon:this.assets?.walkingIcon,c=e?.title??"",l=s?.innerFloors??[],p=n?.inFloor(l)?.name??"",d=e?.inFloor(l)?.name??"",u=a??!1;let h="";return o&&(h=`• ${o.legs[0].distance.toFixed(0)} mts`),t.x`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./consume-DohRCBQT.cjs"),t=require("./lazy-load-D9uUqyac.cjs");var i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,n=(e,t,n,o)=>{for(var a,r=o>1?void 0:o?s(t,n):t,c=e.length-1;c>=0;c--)(a=e[c])&&(r=(o?a(t,n,r):a(r))||r);return o&&r&&i(t,n,r),r};exports.RouteOptions=class extends t.i{constructor(){super(),this.assets=null,this._loadAssets()}async _loadAssets(){this.assets=await(async()=>{const[e,t,i,s,n,o]=await Promise.all([Promise.resolve().then((()=>require("./accessibility-DWoi6we_.cjs"))),Promise.resolve().then((()=>require("./back_arrow-Cb1GjmUe.cjs"))),Promise.resolve().then((()=>require("./icon-destination-point-C8Bl9rvO.cjs"))),Promise.resolve().then((()=>require("./icon-origin-point-B0FLE42C.cjs"))),Promise.resolve().then((()=>require("./repeat_icon-DBYc7GBB.cjs"))),Promise.resolve().then((()=>require("./walking-CDbgxjU4.cjs")))]);return{accessibilityIcon:e.default,backIcon:t.default,destinationPoint:i.default,originPoint:s.default,repeatIcon:n.default,walkingIcon:o.default}})(),this.requestUpdate()}handleBack(){this.dispatchEvent(new CustomEvent("back",{detail:{},bubbles:!0,composed:!0}))}handleAccessibility(){this.dispatchEvent(new CustomEvent("accessibilityChange",{detail:!this.sdkData?.accessibleRoute,bubbles:!0,composed:!0}))}handleRepeatRoute(){this.dispatchEvent(new CustomEvent("repeatRoute",{detail:!0,bubbles:!0,composed:!0}))}handleGenerateRoute(){this.dispatchEvent(new CustomEvent("generateRoute",{detail:!0,bubbles:!0,composed:!0}))}render(){if(!this.sdkData)return t.x``;const{destination:e,accessibleRoute:i,parentPlace:s,origin:n,route:o,isRouteAnimating:a}=this.sdkData,r=i?this.assets?.accessibilityIcon:this.assets?.walkingIcon,c=e?.title??"",l=s?.innerFloors??[],p=n?.inFloor(l)?.name??"",d=e?.inFloor(l)?.name??"",u=a??!1;let h="";return o&&(h=`• ${o.legs[0].distance.toFixed(0)} mts`),t.x`
2
2
  <div class="route-panel">
3
3
  <div class="flex flex-col h-full">
4
4
  <div class="back-panel" @click=${this.handleBack}>
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./lazy-load-CPuIj6DF.cjs");var t,i,a,o,r,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=e=>{throw TypeError(e)},d=(e,t,i,a)=>{for(var o,r=a>1?void 0:a?s(t,i):t,l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&n(t,i,r),r},h=(e,t,i)=>t.has(e)||l("Cannot "+i),c=(e,t,i)=>(h(e,t,"read from private field"),i?i.call(e):t.get(e)),p=(e,t,i)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),u=(e,t,i,a)=>(h(e,t,"write to private field"),t.set(e,i),i);exports.RouteViewTotems=class extends e.i{constructor(){super(...arguments),this.styles=[e.i$1`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./lazy-load-D9uUqyac.cjs");var t,i,n,o,s,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,l=e=>{throw TypeError(e)},d=(e,t,i,n)=>{for(var o,s=n>1?void 0:n?r(t,i):t,l=e.length-1;l>=0;l--)(o=e[l])&&(s=(n?o(t,i,s):o(s))||s);return n&&s&&a(t,i,s),s},h=(e,t,i)=>t.has(e)||l("Cannot "+i),c=(e,t,i)=>(h(e,t,"read from private field"),i?i.call(e):t.get(e)),p=(e,t,i)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),u=(e,t,i,n)=>(h(e,t,"write to private field"),t.set(e,i),i);exports.RouteViewTotems=class extends e.i{constructor(){super(...arguments),this.styles=[e.i$1`
2
2
  :host {
3
3
  display: block;
4
4
  height: 100%;
@@ -19,7 +19,7 @@
19
19
  background: #fff;
20
20
  box-shadow: 0 0 24px #00000026;
21
21
  }
22
- `],p(this,t,""),p(this,i,""),p(this,a,"es"),p(this,o,""),p(this,r,""),this.sdkController=new e.SDKController(this),this.analyticsController=e.AnalyticsController.getInstance()}get apiKey(){return c(this,t)}set apiKey(e){u(this,t,e)}get parentPlaceId(){return c(this,i)}set parentPlaceId(e){u(this,i,e)}get locale(){return c(this,a)}set locale(e){u(this,a,e)}get originId(){return c(this,o)}set originId(e){u(this,o,e)}get destinationId(){return c(this,r)}set destinationId(e){u(this,r,e)}async _loadComponents(){await Promise.all([e.loadCustomMap(),e.loadFloorSelector(),e.loadQrModal(),e.loadRouteOptions()])}async firstUpdated(){await this._loadComponents(),this.analyticsController.initialize(),e.RollbarController.initialize()}_mapReadyHandler(){this.sdkController.setMapReady(!0),this.analyticsController.trackEvent("map_ready",this.baseParams())}baseParams(){return{apiKey:this.apiKey,locale:this.locale,parentPlaceId:this.parentPlaceId,originId:this.originId,destinationId:this.destinationId,host:window.location.host,pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer,userAgent:navigator.userAgent,screenWidth:window.innerWidth}}updated(e){this.apiKey&&this.locale&&this.parentPlaceId&&(e.has("apiKey")||e.has("locale")||e.has("parentPlaceId"))&&this.sdkController.initialize(this.apiKey,this.locale,this.parentPlaceId),this.originId&&this.destinationId&&(e.has("originId")||e.has("destinationId"))&&this.sdkController.setOriginAndDestination(this.originId,this.destinationId)}render(){return e.x`
22
+ `],p(this,t,""),p(this,i,""),p(this,n,"es"),p(this,o,""),p(this,s,""),this.sdkController=new e.SDKController(this),this.analyticsController=e.AnalyticsController.getInstance(),this.rollbarController=e.RollbarController.getInstance()}get apiKey(){return c(this,t)}set apiKey(e){u(this,t,e)}get parentPlaceId(){return c(this,i)}set parentPlaceId(e){u(this,i,e)}get locale(){return c(this,n)}set locale(e){u(this,n,e)}get originId(){return c(this,o)}set originId(e){u(this,o,e)}get destinationId(){return c(this,s)}set destinationId(e){u(this,s,e)}async _loadComponents(){await Promise.all([e.loadCustomMap(),e.loadFloorSelector(),e.loadQrModal(),e.loadRouteOptions()])}async firstUpdated(){await this._loadComponents(),this.analyticsController.initialize("route-view-totems"),e.RollbarController.initialize("route-view-totems"),this.sendEvent("initial_render")}sendEvent(e,t={}){const i={...t,apiKey:this.apiKey,locale:this.locale,parentPlaceId:this.parentPlaceId,originId:this.originId,destinationId:this.destinationId,host:window.location.host,pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer,userAgent:navigator.userAgent,screenWidth:window.innerWidth};this.analyticsController.trackEvent(e,i)}_mapReadyHandler(){this.sendEvent("map_ready"),this.sdkController.setMapReady(!0)}updated(e){this.apiKey&&this.locale&&this.parentPlaceId&&(e.has("apiKey")||e.has("locale")||e.has("parentPlaceId"))&&this.sdkController.initialize(this.apiKey,this.locale,this.parentPlaceId),this.originId&&this.destinationId&&(e.has("originId")||e.has("destinationId"))&&this.sdkController.setOriginAndDestination(this.originId,this.destinationId)}render(){return e.x`
23
23
  <div class="route-container">
24
24
  <custom-map
25
25
  class="map-container"
@@ -29,4 +29,4 @@
29
29
  <floor-selector @floorChange=${this._updateFloorHandler}></floor-selector>
30
30
  <route-options></route-options>
31
31
  </div>
32
- `}_accessibilityChangeHandler(e){this.sdkController.setAccessibleRoute(e.detail);const t=this.baseParams();t.accessible=e.detail,this.analyticsController.trackEvent("accessibility_change",t)}_repeatRouteHandler(){this.sdkController.repeatRoute(),this.analyticsController.trackEvent("route_repeat",this.baseParams())}_generateRouteHandler(){this.sdkController.generateRoute(),this.analyticsController.trackEvent("route_generate",this.baseParams())}_backHandler(){this.sdkController.removeRoute(),this.analyticsController.trackEvent("route_back",this.baseParams())}_updateFloorHandler(e){const t=e.detail;this.sdkController.setFloor(t);const i=this.baseParams();i.floor_id=t,this.analyticsController.trackEvent("floor_change",i)}_startRouteAnimationHandler(){this.sdkController.startRouteAnimation(),this.analyticsController.trackEvent("route_animation_start",this.baseParams())}_routeAnimationFinishedHandler(){this.sdkController.routeAnimationFinished(),this.analyticsController.trackEvent("route_animation_finish",this.baseParams())}connectedCallback(){super.connectedCallback(),this.addEventListener("accessibilityChange",this._accessibilityChangeHandler),this.addEventListener("repeatRoute",this._repeatRouteHandler),this.addEventListener("generateRoute",this._generateRouteHandler),this.addEventListener("back",this._backHandler),this.addEventListener("startRouteAnimation",this._startRouteAnimationHandler),this.addEventListener("routeAnimationFinished",this._routeAnimationFinishedHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("accessibilityChange",this._accessibilityChangeHandler),this.removeEventListener("repeatRoute",this._repeatRouteHandler),this.removeEventListener("generateRoute",this._generateRouteHandler),this.removeEventListener("back",this._backHandler),this.removeEventListener("startRouteAnimation",this._startRouteAnimationHandler),this.removeEventListener("routeAnimationFinished",this._routeAnimationFinishedHandler)}},t=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,r=new WeakMap,d([e.n({type:String})],exports.RouteViewTotems.prototype,"apiKey",1),d([e.n({type:String})],exports.RouteViewTotems.prototype,"parentPlaceId",1),d([e.n({type:String})],exports.RouteViewTotems.prototype,"locale",1),d([e.n({type:String})],exports.RouteViewTotems.prototype,"originId",1),d([e.n({type:String})],exports.RouteViewTotems.prototype,"destinationId",1),exports.RouteViewTotems=d([e.t("route-view-totems")],exports.RouteViewTotems);
32
+ `}_accessibilityChangeHandler(e){this.sdkController.setAccessibleRoute(e.detail),this.sendEvent("accessibility_change",{accessible:e.detail})}_repeatRouteHandler(){this.sdkController.repeatRoute(),this.sendEvent("route_repeat")}_generateRouteHandler(){this.sdkController.generateRoute(),this.sendEvent("route_generate")}_backHandler(){this.sdkController.removeRoute(),this.sendEvent("route_back")}_updateFloorHandler(e){const t=e.detail;this.sdkController.setFloor(t),this.sendEvent("floor_change",{floor_id:t})}_startRouteAnimationHandler(){this.sdkController.startRouteAnimation(),this.sendEvent("route_animation_start")}_routeAnimationFinishedHandler(){this.sdkController.routeAnimationFinished(),this.sendEvent("route_animation_finish")}connectedCallback(){super.connectedCallback(),this.addEventListener("accessibilityChange",this._accessibilityChangeHandler),this.addEventListener("repeatRoute",this._repeatRouteHandler),this.addEventListener("generateRoute",this._generateRouteHandler),this.addEventListener("back",this._backHandler),this.addEventListener("startRouteAnimation",this._startRouteAnimationHandler),this.addEventListener("routeAnimationFinished",this._routeAnimationFinishedHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("accessibilityChange",this._accessibilityChangeHandler),this.removeEventListener("repeatRoute",this._repeatRouteHandler),this.removeEventListener("generateRoute",this._generateRouteHandler),this.removeEventListener("back",this._backHandler),this.removeEventListener("startRouteAnimation",this._startRouteAnimationHandler),this.removeEventListener("routeAnimationFinished",this._routeAnimationFinishedHandler)}},t=new WeakMap,i=new WeakMap,n=new WeakMap,o=new WeakMap,s=new WeakMap,d([e.n({type:String})],exports.RouteViewTotems.prototype,"apiKey",1),d([e.n({type:String})],exports.RouteViewTotems.prototype,"parentPlaceId",1),d([e.n({type:String})],exports.RouteViewTotems.prototype,"locale",1),d([e.n({type:String})],exports.RouteViewTotems.prototype,"originId",1),d([e.n({type:String})],exports.RouteViewTotems.prototype,"destinationId",1),exports.RouteViewTotems=d([e.t("route-view-totems")],exports.RouteViewTotems);
@@ -1,5 +1,5 @@
1
- import { i as i$2, x, r, t as t$1, T } from './route-view-totems-DsANsRxr.js';
2
- import { R as RouteAnimationController, M as MarkerController } from './utils-BXXPDum1.js';
1
+ import { i as i$2, x, r, t as t$1, T } from './route-view-totems-DDSNHZFr.js';
2
+ import { R as RouteAnimationController, M as MarkerController } from './utils-Dt32hDN5.js';
3
3
 
4
4
  /**
5
5
  * @license
@@ -1,5 +1,5 @@
1
- import { i, a as i$1, A as AnalyticsController, l as loadCustomMap, R as RollbarController, x, n, t } from './route-view-totems-DsANsRxr.js';
2
- import { S as SDKController } from './utils-BXXPDum1.js';
1
+ import { i, a as i$1, A as AnalyticsController, l as loadCustomMap, R as RollbarController, x, n, t } from './route-view-totems-DDSNHZFr.js';
2
+ import { S as SDKController } from './utils-Dt32hDN5.js';
3
3
 
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -65,8 +65,10 @@ let MapViewWithModal = class extends i {
65
65
  }
66
66
  async firstUpdated() {
67
67
  await this._loadComponents();
68
- this.analyticsController.initialize();
69
- RollbarController.initialize();
68
+ {
69
+ this.analyticsController.initialize("map-view-with-modal");
70
+ RollbarController.initialize("map-view-with-modal");
71
+ }
70
72
  }
71
73
  _mapReadyHandler() {
72
74
  this.sdkController.setMapReady(true);
@@ -114,10 +116,10 @@ let MapViewWithModal = class extends i {
114
116
  `;
115
117
  }
116
118
  };
117
- _apiKey = new WeakMap();
118
- _parentPlaceId = new WeakMap();
119
- _locale = new WeakMap();
120
- _placeId = new WeakMap();
119
+ _apiKey = /* @__PURE__ */ new WeakMap();
120
+ _parentPlaceId = /* @__PURE__ */ new WeakMap();
121
+ _locale = /* @__PURE__ */ new WeakMap();
122
+ _placeId = /* @__PURE__ */ new WeakMap();
121
123
  __decorateClass([
122
124
  n({ type: String })
123
125
  ], MapViewWithModal.prototype, "apiKey", 1);
@@ -1,4 +1,4 @@
1
- import { S as SDKController } from './utils-BXXPDum1.js';
1
+ import { S as SDKController } from './utils-Dt32hDN5.js';
2
2
 
3
3
  /**
4
4
  * @license
@@ -58,32 +58,47 @@ function requireRollbar_noconflict_umd_min () {
58
58
  var rollbar_noconflict_umd_minExports = requireRollbar_noconflict_umd_min();
59
59
 
60
60
  class RollbarController {
61
- static initialize() {
62
- RollbarController.instance = new RollbarController();
63
- RollbarController.instance.rollbar = rollbar_noconflict_umd_minExports.init({
64
- accessToken: this.ACCESS_TOKEN,
61
+ static initialize(component) {
62
+ RollbarController.getInstance().rollbar = rollbar_noconflict_umd_minExports.init({
63
+ accessToken: "208cf50b805f409bb0b08d5c9f68ce61",
65
64
  captureUncaught: true,
66
65
  captureUnhandledRejections: true,
67
- environment: this.ENVIRONMENT,
68
66
  payload: {
69
- environment: "route-view-totems"
67
+ environment: "production",
68
+ component,
69
+ client: {
70
+ javascript: {
71
+ code_version: undefined
72
+ }
73
+ }
70
74
  }
71
75
  });
72
76
  }
73
- static {
74
- this.ACCESS_TOKEN = "1234567890";
75
- }
76
- static {
77
- this.ENVIRONMENT = process.env.NODE_ENV || "development";
78
- }
79
77
  static getInstance() {
80
78
  if (!RollbarController.instance) {
81
- RollbarController.initialize();
79
+ RollbarController.instance = new RollbarController();
82
80
  }
83
81
  return RollbarController.instance;
84
82
  }
85
83
  error(error, custom) {
86
- this.rollbar?.error(error, custom);
84
+ {
85
+ this.rollbar?.error(error, custom);
86
+ }
87
+ }
88
+ info(message, custom) {
89
+ {
90
+ this.rollbar?.info(message, custom);
91
+ }
92
+ }
93
+ warning(message, custom) {
94
+ {
95
+ this.rollbar?.warning(message, custom);
96
+ }
97
+ }
98
+ critical(message, custom) {
99
+ {
100
+ this.rollbar?.critical(message, custom);
101
+ }
87
102
  }
88
103
  }
89
104
 
@@ -99,8 +114,9 @@ class AnalyticsController {
99
114
  }
100
115
  return AnalyticsController.instance;
101
116
  }
102
- initialize() {
117
+ initialize(environment) {
103
118
  if (this.isInitialized) return;
119
+ AnalyticsController.component = environment;
104
120
  const script = document.createElement("script");
105
121
  script.async = true;
106
122
  script.src = `https://www.googletagmanager.com/gtag/js?id=${this.MEASUREMENT_ID}`;
@@ -123,7 +139,7 @@ class AnalyticsController {
123
139
  page_title: page,
124
140
  page_location: window.location.href,
125
141
  page_path: page,
126
- component: "route-view-totems",
142
+ component: AnalyticsController.component,
127
143
  send_to: "mapvx"
128
144
  });
129
145
  }
@@ -131,7 +147,7 @@ class AnalyticsController {
131
147
  if (!this.isInitialized) return;
132
148
  window.gtag("event", eventName, {
133
149
  ...eventParams,
134
- component: "route-view-totems",
150
+ component: AnalyticsController.component,
135
151
  send_to: "mapvx"
136
152
  });
137
153
  }
@@ -141,7 +157,7 @@ class AnalyticsController {
141
157
  name: variable,
142
158
  value,
143
159
  event_category: category,
144
- component: "route-view-totems",
160
+ component: AnalyticsController.component,
145
161
  send_to: "mapvx"
146
162
  });
147
163
  }
@@ -150,16 +166,16 @@ class AnalyticsController {
150
166
  window.gtag("event", "exception", {
151
167
  description,
152
168
  fatal,
153
- component: "route-view-totems",
169
+ component: AnalyticsController.component,
154
170
  send_to: "mapvx"
155
171
  });
156
172
  }
157
173
  }
158
174
 
159
- const loadCustomMap = () => import('./components-B7xPEQ89.js').then(n => n.c);
160
- const loadFloorSelector = () => import('./components-B7xPEQ89.js').then(n => n.f);
161
- const loadQrModal = () => import('./components-B7xPEQ89.js').then(n => n.q);
162
- const loadRouteOptions = () => import('./components-B7xPEQ89.js').then(n => n.r);
175
+ const loadCustomMap = () => import('./components-DQJDOEb-.js').then(n => n.c);
176
+ const loadFloorSelector = () => import('./components-DQJDOEb-.js').then(n => n.f);
177
+ const loadQrModal = () => import('./components-DQJDOEb-.js').then(n => n.q);
178
+ const loadRouteOptions = () => import('./components-DQJDOEb-.js').then(n => n.r);
163
179
 
164
180
  var __defProp = Object.defineProperty;
165
181
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -214,6 +230,7 @@ let RouteViewTotems = class extends i {
214
230
  __privateAdd(this, _destinationId, "");
215
231
  this.sdkController = new SDKController(this);
216
232
  this.analyticsController = AnalyticsController.getInstance();
233
+ this.rollbarController = RollbarController.getInstance();
217
234
  }
218
235
  get apiKey() {
219
236
  return __privateGet(this, _apiKey);
@@ -250,15 +267,15 @@ let RouteViewTotems = class extends i {
250
267
  }
251
268
  async firstUpdated() {
252
269
  await this._loadComponents();
253
- this.analyticsController.initialize();
254
- RollbarController.initialize();
255
- }
256
- _mapReadyHandler() {
257
- this.sdkController.setMapReady(true);
258
- this.analyticsController.trackEvent("map_ready", this.baseParams());
270
+ {
271
+ this.analyticsController.initialize("route-view-totems");
272
+ RollbarController.initialize("route-view-totems");
273
+ }
274
+ this.sendEvent("initial_render");
259
275
  }
260
- baseParams() {
261
- return {
276
+ sendEvent(event, extraParams = {}) {
277
+ const params = {
278
+ ...extraParams,
262
279
  apiKey: this.apiKey,
263
280
  locale: this.locale,
264
281
  parentPlaceId: this.parentPlaceId,
@@ -272,6 +289,11 @@ let RouteViewTotems = class extends i {
272
289
  userAgent: navigator.userAgent,
273
290
  screenWidth: window.innerWidth
274
291
  };
292
+ this.analyticsController.trackEvent(event, params);
293
+ }
294
+ _mapReadyHandler() {
295
+ this.sendEvent("map_ready");
296
+ this.sdkController.setMapReady(true);
275
297
  }
276
298
  updated(changedProperties) {
277
299
  if (this.apiKey && this.locale && this.parentPlaceId && (changedProperties.has("apiKey") || changedProperties.has("locale") || changedProperties.has("parentPlaceId"))) {
@@ -296,36 +318,32 @@ let RouteViewTotems = class extends i {
296
318
  }
297
319
  _accessibilityChangeHandler(event) {
298
320
  this.sdkController.setAccessibleRoute(event.detail);
299
- const params = this.baseParams();
300
- params["accessible"] = event.detail;
301
- this.analyticsController.trackEvent("accessibility_change", params);
321
+ this.sendEvent("accessibility_change", { accessible: event.detail });
302
322
  }
303
323
  _repeatRouteHandler() {
304
324
  this.sdkController.repeatRoute();
305
- this.analyticsController.trackEvent("route_repeat", this.baseParams());
325
+ this.sendEvent("route_repeat");
306
326
  }
307
327
  _generateRouteHandler() {
308
328
  this.sdkController.generateRoute();
309
- this.analyticsController.trackEvent("route_generate", this.baseParams());
329
+ this.sendEvent("route_generate");
310
330
  }
311
331
  _backHandler() {
312
332
  this.sdkController.removeRoute();
313
- this.analyticsController.trackEvent("route_back", this.baseParams());
333
+ this.sendEvent("route_back");
314
334
  }
315
335
  _updateFloorHandler(event) {
316
336
  const floorId = event.detail;
317
337
  this.sdkController.setFloor(floorId);
318
- const params = this.baseParams();
319
- params["floor_id"] = floorId;
320
- this.analyticsController.trackEvent("floor_change", params);
338
+ this.sendEvent("floor_change", { floor_id: floorId });
321
339
  }
322
340
  _startRouteAnimationHandler() {
323
341
  this.sdkController.startRouteAnimation();
324
- this.analyticsController.trackEvent("route_animation_start", this.baseParams());
342
+ this.sendEvent("route_animation_start");
325
343
  }
326
344
  _routeAnimationFinishedHandler() {
327
345
  this.sdkController.routeAnimationFinished();
328
- this.analyticsController.trackEvent("route_animation_finish", this.baseParams());
346
+ this.sendEvent("route_animation_finish");
329
347
  }
330
348
  connectedCallback() {
331
349
  super.connectedCallback();
@@ -346,11 +364,11 @@ let RouteViewTotems = class extends i {
346
364
  this.removeEventListener("routeAnimationFinished", this._routeAnimationFinishedHandler);
347
365
  }
348
366
  };
349
- _apiKey = new WeakMap();
350
- _parentPlaceId = new WeakMap();
351
- _locale = new WeakMap();
352
- _originId = new WeakMap();
353
- _destinationId = new WeakMap();
367
+ _apiKey = /* @__PURE__ */ new WeakMap();
368
+ _parentPlaceId = /* @__PURE__ */ new WeakMap();
369
+ _locale = /* @__PURE__ */ new WeakMap();
370
+ _originId = /* @__PURE__ */ new WeakMap();
371
+ _destinationId = /* @__PURE__ */ new WeakMap();
354
372
  __decorateClass([
355
373
  n({ type: String })
356
374
  ], RouteViewTotems.prototype, "apiKey", 1);
@@ -1,4 +1,5 @@
1
- import { i, s as sdkContext } from './components-B7xPEQ89.js';
1
+ import { i, s as sdkContext } from './components-DQJDOEb-.js';
2
+ import { R as RollbarController } from './route-view-totems-DDSNHZFr.js';
2
3
 
3
4
  var dist = {exports: {}};
4
5
 
@@ -11995,7 +11996,11 @@ class SDKController {
11995
11996
  enabledFloors
11996
11997
  });
11997
11998
  } catch (error) {
11998
- console.error("Error initializing SDK:", error);
11999
+ RollbarController.getInstance().warning("Error setting origin and destination", {
12000
+ error,
12001
+ originId,
12002
+ destinationId
12003
+ });
11999
12004
  }
12000
12005
  }
12001
12006
  async loadRoute(originId, destinationId, preferAccessibleRoute = false) {
@@ -12023,7 +12028,7 @@ class SDKController {
12023
12028
  enabledFloors
12024
12029
  });
12025
12030
  } catch (error) {
12026
- console.error("Error loading route:", error);
12031
+ RollbarController.getInstance().warning("Error loading route", { error, originId, destinationId });
12027
12032
  }
12028
12033
  }
12029
12034
  async loadConfig(parentPlaceId) {
@@ -12036,7 +12041,7 @@ class SDKController {
12036
12041
  generalConfig: config
12037
12042
  });
12038
12043
  } catch (error) {
12039
- console.error("Error loading config:", error);
12044
+ RollbarController.getInstance().warning("Error loading config", { error, parentPlaceId });
12040
12045
  }
12041
12046
  }
12042
12047
  async initializeSDK(apiKey, locale, parentPlaceId) {
@@ -12050,7 +12055,7 @@ class SDKController {
12050
12055
  try {
12051
12056
  await this.loadConfig(parentPlaceId);
12052
12057
  } catch (error) {
12053
- console.error("Error loading config:", error);
12058
+ RollbarController.getInstance().warning("Error loading config", { error, parentPlaceId });
12054
12059
  }
12055
12060
  try {
12056
12061
  const parentPlace = await sdk.getPlaceDetail(parentPlaceId);
@@ -12068,7 +12073,7 @@ class SDKController {
12068
12073
  currentFloor
12069
12074
  });
12070
12075
  } catch (error) {
12071
- console.error("Error initializing SDK:", error);
12076
+ RollbarController.getInstance().warning("Error initializing SDK", { error, parentPlaceId });
12072
12077
  }
12073
12078
  }
12074
12079
  createOriginDestinationMarkers(origin, destination) {
@@ -12143,11 +12148,9 @@ class SDKController {
12143
12148
  });
12144
12149
  }
12145
12150
  hostConnected() {
12146
- console.log("hostConnected");
12147
12151
  this.connected = true;
12148
12152
  }
12149
12153
  hostDisconnected() {
12150
- console.log("hostDisconnected");
12151
12154
  this.connected = false;
12152
12155
  }
12153
12156
  setMapReady(ready) {
@@ -12227,7 +12230,6 @@ class MarkerController {
12227
12230
  let coordinate;
12228
12231
  switch (style) {
12229
12232
  case MarkerStyle.youAreHere: {
12230
- console.info("youAreHere", data);
12231
12233
  const markerIcon = document.createElement("img");
12232
12234
  const place = data;
12233
12235
  floorId = place.inFloor(floors)?.key;
@@ -12237,7 +12239,6 @@ class MarkerController {
12237
12239
  break;
12238
12240
  }
12239
12241
  case MarkerStyle.placePopup: {
12240
- console.info("placePopup", data);
12241
12242
  const content = structuredClone(data);
12242
12243
  floorId = content.floorId;
12243
12244
  if (data instanceof distExports.LzPlace) {
@@ -12285,7 +12286,6 @@ class MarkerController {
12285
12286
  }
12286
12287
  }
12287
12288
  if (markerElement && coordinate) {
12288
- console.info("addMarker", markerElement, coordinate);
12289
12289
  try {
12290
12290
  this.map?.addMarker({
12291
12291
  coordinate,
@@ -12296,7 +12296,7 @@ class MarkerController {
12296
12296
  });
12297
12297
  this.markersIds.push({ id, floorId, coordinate });
12298
12298
  } catch (error) {
12299
- console.error("addMarker error", error);
12299
+ RollbarController.getInstance().warning("addMarker error", { error, markerElement, coordinate });
12300
12300
  }
12301
12301
  }
12302
12302
  });
package/dist/es/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { b as RouteViewTotems } from './assets/route-view-totems-DsANsRxr.js';
2
- export { M as MapViewWithModal } from './assets/map-view-with-modal-CVtICvdT.js';
1
+ export { b as RouteViewTotems } from './assets/route-view-totems-DDSNHZFr.js';
2
+ export { M as MapViewWithModal } from './assets/map-view-with-modal-DEkjhwKS.js';
@@ -1,2 +1,2 @@
1
- export { b as RouteViewTotems } from './assets/route-view-totems-DsANsRxr.js';
2
- import './assets/utils-BXXPDum1.js';
1
+ export { b as RouteViewTotems } from './assets/route-view-totems-DDSNHZFr.js';
2
+ import './assets/utils-Dt32hDN5.js';