Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@looker/embed-sdk

Package Overview
Dependencies
Maintainers
11
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@looker/embed-sdk - npm Package Compare versions

Comparing version 1.8.5 to 1.8.6

2

dist/main.js
/*! For license information please see main.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.LookerEmbedSDK=t():e.LookerEmbedSDK=t()}(self,(()=>(()=>{var e={105:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClient=t.ChattyClientStates=void 0;var s,a=n(686),u=n(346),c=n(529);n(310),function(e){e[e.Connecting=0]="Connecting",e[e.Syn=1]="Syn",e[e.Connected=2]="Connected"}(s=t.ChattyClientStates||(t.ChattyClientStates={}));var l=function(){function e(e){this._clientWindow=window,this._connection=null,this._hostWindow=this._clientWindow.parent,this._state=s.Connecting,this._sequence=0,this._receivers={},this._handlers=e.handlers,this._targetOrigin=e.targetOrigin,this._defaultTimeout=e.defaultTimeout,this._channel=new MessageChannel}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._state===s.Connected},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return this._connection||(this._connection=new Promise((function(n,r){t._channel.port1.onmessage=function(r){switch(e._debug("received",r.data.action,r.data.data),r.data.action){case c.ChattyHostMessages.SynAck:t._state=s.Connected,t.sendMsg(u.ChattyClientMessages.Ack),n({send:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.sendMsg(u.ChattyClientMessages.Message,{eventName:e,payload:n})},sendAndReceive:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(t,void 0,void 0,(function(){var t,r=this;return i(this,(function(o){return t=++this._sequence,this.sendMsg(u.ChattyClientMessages.MessageWithResponse,{eventName:e,payload:n},t),[2,new Promise((function(e,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[t],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[t]={reject:n,resolve:e,timeoutId:o}}))]}))}))}});break;case c.ChattyHostMessages.Message:t._handlers[r.data.data.eventName]&&t._handlers[r.data.data.eventName].forEach((function(e){return e.apply(t,r.data.data.payload)}));break;case c.ChattyHostMessages.MessageWithResponse:var a=r.data.data,l=a.eventName,h=a.payload,d=a.sequence,f=[];t._handlers[l]&&(f=t._handlers[l].map((function(e){return e.apply(t,h)}))),Promise.all(f).then((function(e){t.sendMsg(u.ChattyClientMessages.Response,{eventName:l,payload:e},d)})).catch((function(e){t.sendMsg(u.ChattyClientMessages.ResponseError,{eventName:l,payload:e.toString()},d)}));break;case c.ChattyHostMessages.Response:(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case c.ChattyHostMessages.ResponseError:var p;(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}},t.initiateHandshake()}))),[2,this._connection]}))}))},e.prototype.initiateHandshake=function(){e._debug("connecting to",this._targetOrigin),this._hostWindow.postMessage({action:u.ChattyClientMessages.Syn},this._targetOrigin,[this._channel.port2]),this._state=s.Syn},e.prototype.sendMsg=function(t,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);e._debug("sending",t,s),this._channel.port1.postMessage({action:t,data:s})},e._debug=a("looker:chatty:client"),e}();t.ChattyClient=l},955:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClientBuilder=void 0;var r=n(105),o=function(){function e(){this._targetOrigin="*",this._handlers={},this._defaultTimeout=3e4}return Object.defineProperty(e.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!1,configurable:!0}),e.prototype.off=function(e,t){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((function(e){return e!==t})))},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t),this},e.prototype.withDefaultTimeout=function(e){return this._defaultTimeout=e,this},e.prototype.withTargetOrigin=function(e){return this._targetOrigin=e,this},e.prototype.build=function(){return new r.ChattyClient(this)},e}();t.ChattyClientBuilder=o},346:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClientMessages=void 0,(n=t.ChattyClientMessages||(t.ChattyClientMessages={}))[n.Syn=0]="Syn",n[n.Ack=1]="Ack",n[n.Message=2]="Message",n[n.MessageWithResponse=3]="MessageWithResponse",n[n.Response=4]="Response",n[n.ResponseError=5]="ResponseError"},474:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHost=t.ChattyHostStates=void 0;var s,a=n(686),u=n(346),c=n(529);n(310),function(e){e[e.Connecting=0]="Connecting",e[e.SynAck=1]="SynAck",e[e.Connected=2]="Connected"}(s=t.ChattyHostStates||(t.ChattyHostStates={}));var l=function(){function e(e){var t=this;this._hostWindow=window,this._connection=null,this._state=s.Connecting,this._sequence=0,this._receivers={},this.iframe=document.createElement("iframe"),e.sandboxAttrs.forEach((function(e){return t.iframe.sandbox.add(e)})),"allow"in this.iframe&&(this.iframe.allow=e.allowAttrs.join("; ")),this.iframe.frameBorder=e.getFrameBorder(),e.url?this.iframe.src=e.url:e.source?this.iframe.srcdoc=e.source:console.warn("url or source required to initialize Chatty host correctly"),this._appendTo=e.el,this._handlers=e.handlers,this._port=null,this._targetOrigin=e.targetOrigin,this._defaultTimeout=e.defaultTimeout}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._state===s.Connected},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return o(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(r){return this._connection?[2,this._connection]:(t=function(){return o(n,void 0,void 0,(function(){var t=this;return i(this,(function(n){return[2,new Promise((function(n,r){var a=function(r){switch(e._debug("port received",r.data.action,r.data.data),r.data.action){case u.ChattyClientMessages.Ack:t._state=s.Connected,n({send:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.sendMsg(c.ChattyHostMessages.Message,{eventName:e,payload:n})},sendAndReceive:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(t,void 0,void 0,(function(){var t,r=this;return i(this,(function(o){return t=++this._sequence,this.sendMsg(c.ChattyHostMessages.MessageWithResponse,{eventName:e,payload:n},t),[2,new Promise((function(e,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[t],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[t]={reject:n,resolve:e,timeoutId:o}}))]}))}))}});break;case u.ChattyClientMessages.Message:t._handlers[r.data.data.eventName]&&t._handlers[r.data.data.eventName].forEach((function(e){return e.apply(t,r.data.data.payload)}));break;case u.ChattyClientMessages.MessageWithResponse:var a=r.data.data,l=a.eventName,h=a.payload,d=a.sequence,f=[];t._handlers[l]&&(f=t._handlers[l].map((function(e){return e.apply(t,h)}))),Promise.all(f).then((function(e){t.sendMsg(c.ChattyHostMessages.Response,{eventName:l,payload:e},d)})).catch((function(e){t.sendMsg(c.ChattyHostMessages.ResponseError,{eventName:l,payload:e.toString()},d)}));break;case u.ChattyClientMessages.Response:(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case u.ChattyClientMessages.ResponseError:var p;(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}};t._hostWindow.addEventListener("message",(function(n){if(t.isValidMsg(n)){if(e._debug("window received",n.data.action,n.data.data),n.data.action===u.ChattyClientMessages.Syn){if(t._port){if(!(t._targetOrigin&&"*"===t._targetOrigin||t._targetOrigin===n.origin))return void e._debug("rejected new connection from",n.origin);e._debug("reconnecting to",n.origin),t._port.close()}t._port=n.ports[0],t._port.onmessage=a,t.sendMsg(c.ChattyHostMessages.SynAck),t._state=s.SynAck}}else e._debug("window received invalid",n)}))}))]}))}))},this._appendTo.appendChild(this.iframe),[2,this._connection=t()])}))}))},e.prototype.sendMsg=function(t,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);e._debug("sending",t,s),this._port.postMessage({action:t,data:s})},e.prototype.isValidMsg=function(e){return e.source===this.iframe.contentWindow&&(!this._targetOrigin||"*"===this._targetOrigin||this._targetOrigin===e.origin)},e._debug=a("looker:chatty:host"),e}();t.ChattyHost=l},777:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHostBuilder=void 0;var r=n(474),o=function(){function e(e,t){this._url=e,this._source=t,this._appendTo=null,this._handlers={},this._sandboxAttrs=[],this._allowAttrs=[],this._frameBorder="0",this._targetOrigin=null,this._defaultTimeout=3e4}return Object.defineProperty(e.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!1,configurable:!0}),e.prototype.appendTo=function(e){return this._appendTo=e,this},e.prototype.off=function(e,t){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((function(e){return e!==t})))},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t),this},e.prototype.withDefaultTimeout=function(e){return this._defaultTimeout=e,this},e.prototype.getFrameBorder=function(){return this._frameBorder},e.prototype.frameBorder=function(e){return this._frameBorder=e,this},e.prototype.sandbox=function(e){return this.withSandboxAttribute(e),this},e.prototype.withSandboxAttribute=function(e){return this._sandboxAttrs.push(e),this},e.prototype.withAllowAttribute=function(e){return this._allowAttrs.push(e),this},e.prototype.withTargetOrigin=function(e){return this._targetOrigin=e,this},e.prototype.build=function(){return new r.ChattyHost(this)},e}();t.ChattyHostBuilder=o},529:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHostMessages=void 0,(n=t.ChattyHostMessages||(t.ChattyHostMessages={}))[n.SynAck=0]="SynAck",n[n.Message=1]="Message",n[n.MessageWithResponse=2]="MessageWithResponse",n[n.Response=3]="Response",n[n.ResponseError=4]="ResponseError"},541:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Chatty=t.ChattyHost=t.ChattyClient=t.ChattyHostBuilder=t.ChattyClientBuilder=void 0;var i=n(955),s=n(777),a=n(955);Object.defineProperty(t,"ChattyClientBuilder",{enumerable:!0,get:function(){return a.ChattyClientBuilder}});var u=n(777);Object.defineProperty(t,"ChattyHostBuilder",{enumerable:!0,get:function(){return u.ChattyHostBuilder}});var c=n(105);Object.defineProperty(t,"ChattyClient",{enumerable:!0,get:function(){return c.ChattyClient}});var l=n(474);Object.defineProperty(t,"ChattyHost",{enumerable:!0,get:function(){return l.ChattyHost}}),o(n(248),t);var h=function(){function e(){}return e.createHost=function(e){return new s.ChattyHostBuilder(e)},e.createHostFromSource=function(e){return new s.ChattyHostBuilder(void 0,e)},e.createClient=function(){return new i.ChattyClientBuilder},e}();t.Chatty=h},248:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},686:(e,t,n)=>{function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(514)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())},514:(e,t,n)=>{var r;function o(e){function n(){if(n.enabled){var e=n,o=+new Date,i=o-(r||o);e.diff=i,e.prev=r,e.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var o=t.formatters[r];if("function"==typeof o){var i=s[u];n=o.call(e,i),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=n.log||t.log||console.log.bind(console);c.apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(553),t.names=[],t.skips=[],t.formatters={}},553:e=>{var t=1e3,n=60*t,r=60*n,o=24*r;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,s){s=s||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return s.long?i(a=e,o,"day")||i(a,r,"hour")||i(a,n,"minute")||i(a,t,"second")||a+" ms":function(e){return e>=o?Math.round(e/o)+"d":e>=r?Math.round(e/r)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},711:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedDashboard=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("dashboard:run")},t.prototype.stop=function(){this.send("dashboard:stop")},t.prototype.edit=function(){this.send("dashboard:edit")},t.prototype.updateFilters=function(e){this.send("dashboard:filters:update",{filters:e})},t.prototype.setOptions=function(e){this.send("dashboard:options:set",e)},t.prototype.openScheduleDialog=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.sendAndReceive("dashboard:schedule_modal:open")]}))}))},t.prototype.loadDashboard=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.sendAndReceive("dashboard:load",{id:e,pushHistory:t})]}))}))},t}(n(211).LookerEmbedBase);t.LookerEmbedDashboard=a},354:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedClient=void 0;var s=n(541),a=/^https?:\/\//,u=function(){function e(e){this._builder=e,this._hostBuilder=null,this._host=null,this._connection=null,this._client=null,this._cookielessInitialized=!1}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return!!this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetOrigin",{get:function(){if(this._builder.sandboxedHost)return"*";var e=this._builder.apiHost;return a.test(e)?e:"https://".concat(e)},enumerable:!1,configurable:!0}),e.prototype.createIframe=function(e){return r(this,void 0,void 0,(function(){var t,n,i,a,u,c,l,h,d,f,p,y,_=this;return o(this,(function(b){for(t in this._hostBuilder=s.Chatty.createHost(e),this._builder.dialogScroll&&(this._builder.handlers["env:client:dialog"]=[function(e){var t=e.open,n=e.placement;t&&"cover"===n&&window.setTimeout((function(){_._host&&_._host.iframe.scrollIntoView(!0)}),200)}]),this._builder.dynamicIFrameHeight&&(this._builder.handlers["page:properties:changed"]=[function(e){var t=e.height;t&&t>100&&_._host&&(_._host.iframe.style.height="".concat(t,"px"))}]),this._builder.isCookielessEmbed&&(this._builder.handlers["session:tokens:request"]=[function(){return r(_,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return this._client&&this._cookielessApiToken&&this._builder.generateTokens?this._cookielessInitialized?[4,this.generateTokens()]:[3,2]:[3,4];case 1:return e=o.sent(),t=e.api_token,n=e.api_token_ttl,r=e.navigation_token,i=e.navigation_token_ttl,s=e.session_reference_token_ttl,this._cookielessApiToken=t,this._cookielessApiTokenTtl=n,this._cookielessNavigationToken=r,this._cookielessNavigationTokenTtl=i,this._cookielessSessionReferenceTokenTtl=s,[3,3];case 2:this._cookielessInitialized=!0,o.label=3;case 3:this._client.send("session:tokens",{api_token:this._cookielessApiToken,api_token_ttl:this._cookielessApiTokenTtl,navigation_token:this._cookielessNavigationToken,navigation_token_ttl:this._cookielessNavigationTokenTtl,session_reference_token_ttl:this._cookielessSessionReferenceTokenTtl}),o.label=4;case 4:return[2]}}))}))}]),this._builder.handlers)for(n=function(e){i._hostBuilder.on(t,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(_._client,t)}))},i=this,a=0,u=this._builder.handlers[t];a<u.length;a++)c=u[a],n(c);for(l=0,h=this._builder.sandboxAttrs;l<h.length;l++)p=h[l],this._hostBuilder.withSandboxAttribute(p);for(d=0,f=this._builder.allowAttrs;d<f.length;d++)p=f[d],this._hostBuilder.withAllowAttribute(p);return this._host=this._hostBuilder.frameBorder(this._builder.frameBorder).withTargetOrigin(this.targetOrigin).appendTo(this._builder.el).build(),this._builder.classNames.length&&(y=this._host.iframe.classList).add.apply(y,this._builder.classNames),this._builder.scrollMonitor&&this.addIframeMonitor(this._host.iframe),[2,this._host.connect().then((function(e){return _._client=new _._builder.clientConstructor(e),_._client}))]}))}))},e.prototype.sendScrollData=function(e){this._client.send("env:host:scroll",{offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,scrollX:window.scrollX,scrollY:window.scrollY})},e.prototype.addIframeMonitor=function(e){var t=this;document.addEventListener("scroll",(function(n){t.sendScrollData(e)})),window.addEventListener("resize",(function(n){t.sendScrollData(e)}))},e.prototype.createUrl=function(){return r(this,void 0,void 0,(function(){var e,t,n,i,s,a,u=this;return o(this,(function(c){if(e=this._builder.embedUrl,!(null==(t=this._builder.auth)?void 0:t.url))return[2,"".concat(this._builder.apiHost).concat(e)];if(n="".concat(t.url,"?src=").concat(encodeURIComponent(e)),t.params)for(i=0,s=t.params;i<s.length;i++)a=s[i],n+="&".concat(encodeURIComponent(a.name),"=").concat(encodeURIComponent(a.value));return[2,new Promise((function(e,i){return r(u,void 0,void 0,(function(){var r,s,a,u;return o(this,(function(o){if((r=new XMLHttpRequest).open("GET",n),t.withCredentials&&(r.withCredentials=t.withCredentials),r.setRequestHeader("Cache-Control","no-cache"),t.headers)for(s=0,a=t.headers;s<a.length;s++)u=a[s],r.setRequestHeader(u.name,u.value);return r.onload=function(){200===r.status?e(JSON.parse(r.responseText).url):i(r.statusText)},r.onerror=function(){return i(r.statusText)},r.send(),[2]}))}))}))]}))}))},e.prototype.acquireCookielessEmbedSession=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e.sessionAcquired?[2,this.acquireCookielessEmbedSessionInternal()]:e.acquireSessionPromise?[4,e.acquireSessionPromise]:[3,2];case 1:return t.sent(),[2,this.acquireCookielessEmbedSessionInternal()];case 2:return e.acquireSessionPromise=this.acquireCookielessEmbedSessionInternal(),[2,e.acquireSessionPromise.then((function(t){return e.sessionAcquired=!0,t})).catch((function(t){throw e.acquireSessionPromise=void 0,t}))]}}))}))},e.prototype.acquireCookielessEmbedSessionInternal=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s,a,u,c,l,h,d,f,p;return o(this,(function(o){switch(o.label){case 0:if(e=this._builder,t=e.acquireSession,n=e.generateTokens,!t)throw new Error("invalid state: acquireSession not defined");if(!n)throw new Error("invalid state: generateTokens not defined");return[4,this.acquireSession()];case 1:if(r=o.sent(),i=r.authentication_token,s=r.api_token,a=r.api_token_ttl,u=r.navigation_token,c=r.navigation_token_ttl,l=r.session_reference_token_ttl,!i||!u||!s)throw new Error("failed to prepare cookieless embed session");return this._cookielessApiToken=s,this._cookielessApiTokenTtl=a,this._cookielessNavigationToken=u,this._cookielessNavigationTokenTtl=c,this._cookielessSessionReferenceTokenTtl=l,h="https://".concat(this._builder.apiHost),d=""===new URL(this._builder.embedUrl,h).search?"?":"&",f="".concat(this._builder.embedUrl).concat(d,"embed_navigation_token=").concat(u),p="/login/embed/"+encodeURIComponent(f)+"?embed_authentication_token=".concat(i),[2,"".concat(h).concat(p)]}}))}))},e.prototype.acquireSession=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return"function"!=typeof(e=this._builder.acquireSession)?[3,2]:[4,e()];case 1:case 4:return[2,o.sent()];case 2:return o.trys.push([2,5,,6]),t=this.getResource(e),n=t.url,r=t.init,[4,fetch(n,r)];case 3:if(!(i=o.sent()).ok)throw console.error("acquire embed session failed",{resp:i}),new Error("acquire embed session failed");return[4,i.json()];case 5:throw s=o.sent(),console.error(s),new Error("acquire embed session failed");case 6:return[2]}}))}))},e.prototype.generateTokens=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s,a;return o(this,(function(o){switch(o.label){case 0:return"function"!=typeof(e=this._builder.generateTokens)?[3,2]:[4,e()];case 1:case 4:return[2,o.sent()];case 2:return o.trys.push([2,5,,6]),t=this.getResource(e),n=t.url,r=t.init,i=r||{body:JSON.stringify({api_token:this._cookielessApiToken,navigation_token:this._cookielessNavigationToken}),headers:{"content-type":"application/json"},method:"PUT"},[4,fetch(n,i)];case 3:if(!(s=o.sent()).ok){if(400===s.status)return[2,{session_reference_token_ttl:0}];throw console.error("generate tokens failed",{resp:s}),new Error("generate tokens failed")}return[4,s.json()];case 5:throw a=o.sent(),console.error(a),new Error("generate tokens failed");case 6:return[2]}}))}))},e.prototype.getResource=function(e){var t,n;if("object"==typeof e){var r=e.url;n=i(e,["url"]),t=r}else t=e;return{init:n,url:t}},e.prototype.connect=function(){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){if(this._connection)return[2,this._connection];if(this._builder.url){if(this._builder.isCookielessEmbed)throw new Error("withUrl not supported by cookieless embed");this._connection=this.createIframe(this._builder.url)}else this._builder.isCookielessEmbed?this._connection=this.acquireCookielessEmbedSession().then((function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){return[2,this.createIframe(t)]}))}))})).catch((function(t){throw e._connection=null,t})):this._connection=this.createUrl().then((function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){return[2,this.createIframe(t)]}))}))}));return[2,this._connection]}))}))},e.sessionAcquired=!1,e}();t.EmbedClient=u},211:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedBase=void 0;var o=function(){function e(e){this._host=e}return e.prototype.send=function(e,t){this._host.send(e,t)},e.prototype.sendAndReceive=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this._host.sendAndReceive(e,t)]}))}))},e}();t.LookerEmbedBase=o},886:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedBuilder=void 0;var r=n(354);function o(e){return e.replace(/,/g,"^,")}var i=function(){function e(e,t,n,r){if(this._hostSettings=e,this._type=t,this._endpoint=n,this._clientConstructor=r,this._handlers={},this._appendTo=null,this._sandboxAttrs=[],this._allowAttrs=[],this._classNames=[],this._frameBorder="0",this._suffix="",this.sandboxedHost)this._params={embed_domain:this._hostSettings.apiHost,sandboxed_host:"true",sdk:"2"};else{var o=window.location.origin;this._params={embed_domain:o,sdk:"2"}}}return e.prototype.withFrameBorder=function(e){return this._frameBorder=e,this},e.prototype.withId=function(e){return this._id=e,this},e.prototype.withParams=function(e){for(var t in e)this._params[t]=e[t];return this},e.prototype.withFilters=function(e,t){if(void 0===t&&(t=!1),"dashboard"===this.type)for(var n in e)this._params[n]=t?o(e[n]):e[n];else for(var n in e)this._params["f[".concat(n,"]")]=t?o(e[n]):e[n];return this},e.prototype.withSandboxAttr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._sandboxAttrs=this._sandboxAttrs.concat(e),this},e.prototype.withAllowAttr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._allowAttrs=this._allowAttrs.concat(e),this},e.prototype.withClassName=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._classNames=this._classNames.concat(e),this},e.prototype.withNext=function(e){return void 0===e&&(e="-next"),this._suffix=e,this._endpoint+=this._suffix,this},e.prototype.withTheme=function(e){return this._params.theme=e,this},e.prototype.withScrollMonitor=function(e){return void 0===e&&(e=!0),this._scrollMonitor=e,this},e.prototype.withDynamicIFrameHeight=function(e){return void 0===e&&(e=!0),this._dynamicIFrameHeight=e,this},e.prototype.withDialogScroll=function(e){return void 0===e&&(e=!0),this._dialogScroll=e,this},e.prototype.withApiHost=function(e){if(this._hostSettings.apiHost){if(this._hostSettings.apiHost!==e)throw new Error("not allowed to change api host")}else this._hostSettings.apiHost=e,this.sandboxedHost&&(this._params.embed_domain=e,this._params.sandboxed_host="true");return this},e.prototype.withAuthUrl=function(e){var t;if(null===(t=this._hostSettings.auth)||void 0===t?void 0:t.url){if(this._hostSettings.auth.url!==e)throw new Error("not allowed to change auth url")}else this._hostSettings.auth={url:e};return this},e.prototype.withAuth=function(e){if(this._hostSettings.auth){if(this._hostSettings.auth!==e)throw new Error("not allowed to change auth")}else this._hostSettings.auth=e;return this},e.prototype.withUrl=function(e){if(this.isCookielessEmbed)throw new Error("withUrl not supported by cookieless embed");return this._url=e,this},Object.defineProperty(e.prototype,"sandboxedHost",{get:function(){if(void 0===this._sandboxedHost){var e=window.location.origin;this._sandboxedHost="null"===e||!e}return this._sandboxedHost},set:function(e){this._sandboxedHost=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameBorder",{get:function(){return this._frameBorder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiHost",{get:function(){return this._hostSettings.apiHost},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCookielessEmbed",{get:function(){return!!this._hostSettings.acquireSession},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"acquireSession",{get:function(){return this._hostSettings.acquireSession},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generateTokens",{get:function(){return this._hostSettings.generateTokens},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authUrl",{get:function(){var e;return null===(e=this._hostSettings.auth)||void 0===e?void 0:e.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"auth",{get:function(){return this._hostSettings.auth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"embedUrl",{get:function(){var e=function(e){var t=[];for(var n in e)t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(e[n])));return t.join("&")}(this._params);return"".concat(this.endpoint,"/").concat(this.id,"?").concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suffix",{get:function(){return this._suffix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollMonitor",{get:function(){return this._scrollMonitor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicIFrameHeight",{get:function(){return this._dynamicIFrameHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dialogScroll",{get:function(){return this._dialogScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientConstructor",{get:function(){return this._clientConstructor},enumerable:!1,configurable:!0}),e.prototype.appendTo=function(e){return this._appendTo="string"==typeof e?document.querySelector(e):e,this},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]?this._handlers[e]:[],this._handlers[e].push(t),this},e.prototype.build=function(){return new r.EmbedClient(this)},e}();t.EmbedBuilder=i},662:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedExplore=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("look:run")},t.prototype.updateFilters=function(e){this.send("look:filters:update",{filters:e})},t}(n(211).LookerEmbedBase);t.LookerEmbedExplore=i},438:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedExtension=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(211).LookerEmbedBase);t.LookerEmbedExtension=i},433:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedSDK=void 0;var i=n(886),s=n(711),a=n(662),u=n(438),c=n(684);o(n(924),t);var l=function(){function e(){}return e.init=function(e,t){this.apiHost=e,this.auth="string"==typeof t?{url:t}:t,this.acquireSession=void 0,this.generateTokens=void 0},e.initCookieless=function(e,t,n){this.apiHost=e,this.acquireSession=t,this.generateTokens=n,this.auth=void 0},e.createDashboardWithUrl=function(e){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withUrl(e)},e.createDashboardWithId=function(e){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withId(e)},e.createExploreWithUrl=function(e){return new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withUrl(e)},e.createExploreWithId=function(e){return e=e.replace("::","/"),new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withId(e)},e.createLookWithUrl=function(e){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withUrl(e)},e.createLookWithId=function(e){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withId(e)},e.createExtensionWithUrl=function(e){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withUrl(e)},e.createExtensionWithId=function(e){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withId(e)},e}();t.LookerEmbedSDK=l},684:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedLook=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("look:run")},t.prototype.updateFilters=function(e){this.send("look:filters:update",{filters:e})},t}(n(211).LookerEmbedBase);t.LookerEmbedLook=i},924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},310:(e,t,n)=>{"use strict";e.exports=n(702).polyfill()},702:function(e,t,n){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,i=void 0,s=function(e,t){f[r]=e,f[r+1]=t,2===(r+=2)&&(i?i(p):v())};var a="undefined"!=typeof window?window:void 0,u=a||{},c=u.MutationObserver||u.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(p,1)}}var f=new Array(1e3);function p(){for(var e=0;e<r;e+=2)(0,f[e])(f[e+1]),f[e]=void 0,f[e+1]=void 0;r=0}var y,_,b,g,v=void 0;function m(e,t){var n=this,r=new this.constructor(C);void 0===r[k]&&B(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return A(o,r,i,n._result)}))}else T(n,r,e,t);return r}function w(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(C);return x(t,e),t}v=l?function(){return process.nextTick(p)}:c?(_=0,b=new c(p),g=document.createTextNode(""),b.observe(g,{characterData:!0}),function(){g.data=_=++_%2}):h?((y=new MessageChannel).port1.onmessage=p,function(){return y.port2.postMessage(0)}):void 0===a?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(p)}:d()}catch(e){return d()}}():d();var k=Math.random().toString(36).substring(2);function C(){}var O=void 0;function E(t,n,r){n.constructor===t.constructor&&r===m&&n.constructor.resolve===w?function(e,t){1===t._state?S(e,t._result):2===t._state?P(e,t._result):T(t,void 0,(function(t){return x(e,t)}),(function(t){return P(e,t)}))}(t,n):void 0===r?S(t,n):e(r)?function(e,t,n){s((function(e){var r=!1,o=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?x(e,n):S(e,n))}),(function(t){r||(r=!0,P(e,t))}),e._label);!r&&o&&(r=!0,P(e,o))}),e)}(t,n,r):S(t,n)}function x(e,t){if(e===t)P(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=t),null===r||"object"!==o&&"function"!==o)S(e,t);else{var n=void 0;try{n=t.then}catch(t){return void P(e,t)}E(e,t,n)}var r,o}function j(e){e._onerror&&e._onerror(e._result),M(e)}function S(e,t){e._state===O&&(e._result=t,e._state=1,0!==e._subscribers.length&&s(M,e))}function P(e,t){e._state===O&&(e._state=2,e._result=t,s(j,e))}function T(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&s(M,e)}function M(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,s=0;s<t.length;s+=3)r=t[s],o=t[s+n],r?A(n,r,o,i):o(i);e._subscribers.length=0}}function A(t,n,r,o){var i=e(r),s=void 0,a=void 0,u=!0;if(i){try{s=r(o)}catch(e){u=!1,a=e}if(n===s)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else s=o;n._state!==O||(i&&u?x(n,s):!1===u?P(n,a):1===t?S(n,s):2===t&&P(n,s))}var H=0;function B(e){e[k]=H++,e._state=void 0,e._result=void 0,e._subscribers=[]}var q=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(C),this.promise[k]||B(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=void 0,i=void 0,s=!1;try{o=e.then}catch(e){s=!0,i=e}if(o===m&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===R){var a=new n(C);s?P(a,i):E(a,e,o),this._willSettleAt(a,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===O&&(this._remaining--,2===e?P(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;T(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}();var R=function(){function t(e){this[k]=H++,this._result=this._state=void 0,this._subscribers=[],C!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){x(e,t)}),(function(t){P(e,t)}))}catch(t){P(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return R.prototype.then=m,R.all=function(e){return new q(this,e).promise},R.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var o=e.length,i=0;i<o;i++)n.resolve(e[i]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=w,R.reject=function(e){var t=new this(C);return P(t,e),t},R._setScheduler=function(e){i=e},R._setAsap=function(e){s=e},R._asap=s,R.polyfill=function(){var e=void 0;if(void 0!==n.g)e=n.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=R},R.Promise=R,R}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(433)})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.LookerEmbedSDK=t():e.LookerEmbedSDK=t()}(self,(()=>(()=>{var e={105:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClient=t.ChattyClientStates=void 0;var s,a=n(686),u=n(346),c=n(529);n(310),function(e){e[e.Connecting=0]="Connecting",e[e.Syn=1]="Syn",e[e.Connected=2]="Connected"}(s=t.ChattyClientStates||(t.ChattyClientStates={}));var l=function(){function e(e){this._clientWindow=window,this._connection=null,this._hostWindow=this._clientWindow.parent,this._state=s.Connecting,this._sequence=0,this._receivers={},this._handlers=e.handlers,this._targetOrigin=e.targetOrigin,this._defaultTimeout=e.defaultTimeout,this._channel=new MessageChannel}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._state===s.Connected},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return this._connection||(this._connection=new Promise((function(n,r){t._channel.port1.onmessage=function(r){switch(e._debug("received",r.data.action,r.data.data),r.data.action){case c.ChattyHostMessages.SynAck:t._state=s.Connected,t.sendMsg(u.ChattyClientMessages.Ack),n({send:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.sendMsg(u.ChattyClientMessages.Message,{eventName:e,payload:n})},sendAndReceive:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(t,void 0,void 0,(function(){var t,r=this;return i(this,(function(o){return t=++this._sequence,this.sendMsg(u.ChattyClientMessages.MessageWithResponse,{eventName:e,payload:n},t),[2,new Promise((function(e,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[t],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[t]={reject:n,resolve:e,timeoutId:o}}))]}))}))}});break;case c.ChattyHostMessages.Message:t._handlers[r.data.data.eventName]&&t._handlers[r.data.data.eventName].forEach((function(e){return e.apply(t,r.data.data.payload)}));break;case c.ChattyHostMessages.MessageWithResponse:var a=r.data.data,l=a.eventName,h=a.payload,d=a.sequence,f=[];t._handlers[l]&&(f=t._handlers[l].map((function(e){return e.apply(t,h)}))),Promise.all(f).then((function(e){t.sendMsg(u.ChattyClientMessages.Response,{eventName:l,payload:e},d)})).catch((function(e){t.sendMsg(u.ChattyClientMessages.ResponseError,{eventName:l,payload:e.toString()},d)}));break;case c.ChattyHostMessages.Response:(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case c.ChattyHostMessages.ResponseError:var p;(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}},t.initiateHandshake()}))),[2,this._connection]}))}))},e.prototype.initiateHandshake=function(){e._debug("connecting to",this._targetOrigin),this._hostWindow.postMessage({action:u.ChattyClientMessages.Syn},this._targetOrigin,[this._channel.port2]),this._state=s.Syn},e.prototype.sendMsg=function(t,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);e._debug("sending",t,s),this._channel.port1.postMessage({action:t,data:s})},e._debug=a("looker:chatty:client"),e}();t.ChattyClient=l},955:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClientBuilder=void 0;var r=n(105),o=function(){function e(){this._targetOrigin="*",this._handlers={},this._defaultTimeout=3e4}return Object.defineProperty(e.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!1,configurable:!0}),e.prototype.off=function(e,t){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((function(e){return e!==t})))},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t),this},e.prototype.withDefaultTimeout=function(e){return this._defaultTimeout=e,this},e.prototype.withTargetOrigin=function(e){return this._targetOrigin=e,this},e.prototype.build=function(){return new r.ChattyClient(this)},e}();t.ChattyClientBuilder=o},346:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClientMessages=void 0,(n=t.ChattyClientMessages||(t.ChattyClientMessages={}))[n.Syn=0]="Syn",n[n.Ack=1]="Ack",n[n.Message=2]="Message",n[n.MessageWithResponse=3]="MessageWithResponse",n[n.Response=4]="Response",n[n.ResponseError=5]="ResponseError"},474:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHost=t.ChattyHostStates=void 0;var s,a=n(686),u=n(346),c=n(529);n(310),function(e){e[e.Connecting=0]="Connecting",e[e.SynAck=1]="SynAck",e[e.Connected=2]="Connected"}(s=t.ChattyHostStates||(t.ChattyHostStates={}));var l=function(){function e(e){var t=this;this._hostWindow=window,this._connection=null,this._state=s.Connecting,this._sequence=0,this._receivers={},this.iframe=document.createElement("iframe"),e.sandboxAttrs.forEach((function(e){return t.iframe.sandbox.add(e)})),"allow"in this.iframe&&(this.iframe.allow=e.allowAttrs.join("; ")),this.iframe.frameBorder=e.getFrameBorder(),e.url?this.iframe.src=e.url:e.source?this.iframe.srcdoc=e.source:console.warn("url or source required to initialize Chatty host correctly"),this._appendTo=e.el,this._handlers=e.handlers,this._port=null,this._targetOrigin=e.targetOrigin,this._defaultTimeout=e.defaultTimeout}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._state===s.Connected},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return o(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(r){return this._connection?[2,this._connection]:(t=function(){return o(n,void 0,void 0,(function(){var t=this;return i(this,(function(n){return[2,new Promise((function(n,r){var a=function(r){switch(e._debug("port received",r.data.action,r.data.data),r.data.action){case u.ChattyClientMessages.Ack:t._state=s.Connected,n({send:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.sendMsg(c.ChattyHostMessages.Message,{eventName:e,payload:n})},sendAndReceive:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(t,void 0,void 0,(function(){var t,r=this;return i(this,(function(o){return t=++this._sequence,this.sendMsg(c.ChattyHostMessages.MessageWithResponse,{eventName:e,payload:n},t),[2,new Promise((function(e,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[t],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[t]={reject:n,resolve:e,timeoutId:o}}))]}))}))}});break;case u.ChattyClientMessages.Message:t._handlers[r.data.data.eventName]&&t._handlers[r.data.data.eventName].forEach((function(e){return e.apply(t,r.data.data.payload)}));break;case u.ChattyClientMessages.MessageWithResponse:var a=r.data.data,l=a.eventName,h=a.payload,d=a.sequence,f=[];t._handlers[l]&&(f=t._handlers[l].map((function(e){return e.apply(t,h)}))),Promise.all(f).then((function(e){t.sendMsg(c.ChattyHostMessages.Response,{eventName:l,payload:e},d)})).catch((function(e){t.sendMsg(c.ChattyHostMessages.ResponseError,{eventName:l,payload:e.toString()},d)}));break;case u.ChattyClientMessages.Response:(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case u.ChattyClientMessages.ResponseError:var p;(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}};t._hostWindow.addEventListener("message",(function(n){if(t.isValidMsg(n)){if(e._debug("window received",n.data.action,n.data.data),n.data.action===u.ChattyClientMessages.Syn){if(t._port){if(!(t._targetOrigin&&"*"===t._targetOrigin||t._targetOrigin===n.origin))return void e._debug("rejected new connection from",n.origin);e._debug("reconnecting to",n.origin),t._port.close()}t._port=n.ports[0],t._port.onmessage=a,t.sendMsg(c.ChattyHostMessages.SynAck),t._state=s.SynAck}}else e._debug("window received invalid",n)}))}))]}))}))},this._appendTo.appendChild(this.iframe),[2,this._connection=t()])}))}))},e.prototype.sendMsg=function(t,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);e._debug("sending",t,s),this._port.postMessage({action:t,data:s})},e.prototype.isValidMsg=function(e){return e.source===this.iframe.contentWindow&&(!this._targetOrigin||"*"===this._targetOrigin||this._targetOrigin===e.origin)},e._debug=a("looker:chatty:host"),e}();t.ChattyHost=l},777:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHostBuilder=void 0;var r=n(474),o=function(){function e(e,t){this._url=e,this._source=t,this._appendTo=null,this._handlers={},this._sandboxAttrs=[],this._allowAttrs=[],this._frameBorder="0",this._targetOrigin=null,this._defaultTimeout=3e4}return Object.defineProperty(e.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!1,configurable:!0}),e.prototype.appendTo=function(e){return this._appendTo=e,this},e.prototype.off=function(e,t){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((function(e){return e!==t})))},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t),this},e.prototype.withDefaultTimeout=function(e){return this._defaultTimeout=e,this},e.prototype.getFrameBorder=function(){return this._frameBorder},e.prototype.frameBorder=function(e){return this._frameBorder=e,this},e.prototype.sandbox=function(e){return this.withSandboxAttribute(e),this},e.prototype.withSandboxAttribute=function(e){return this._sandboxAttrs.push(e),this},e.prototype.withAllowAttribute=function(e){return this._allowAttrs.push(e),this},e.prototype.withTargetOrigin=function(e){return this._targetOrigin=e,this},e.prototype.build=function(){return new r.ChattyHost(this)},e}();t.ChattyHostBuilder=o},529:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHostMessages=void 0,(n=t.ChattyHostMessages||(t.ChattyHostMessages={}))[n.SynAck=0]="SynAck",n[n.Message=1]="Message",n[n.MessageWithResponse=2]="MessageWithResponse",n[n.Response=3]="Response",n[n.ResponseError=4]="ResponseError"},541:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Chatty=t.ChattyHost=t.ChattyClient=t.ChattyHostBuilder=t.ChattyClientBuilder=void 0;var i=n(955),s=n(777),a=n(955);Object.defineProperty(t,"ChattyClientBuilder",{enumerable:!0,get:function(){return a.ChattyClientBuilder}});var u=n(777);Object.defineProperty(t,"ChattyHostBuilder",{enumerable:!0,get:function(){return u.ChattyHostBuilder}});var c=n(105);Object.defineProperty(t,"ChattyClient",{enumerable:!0,get:function(){return c.ChattyClient}});var l=n(474);Object.defineProperty(t,"ChattyHost",{enumerable:!0,get:function(){return l.ChattyHost}}),o(n(248),t);var h=function(){function e(){}return e.createHost=function(e){return new s.ChattyHostBuilder(e)},e.createHostFromSource=function(e){return new s.ChattyHostBuilder(void 0,e)},e.createClient=function(){return new i.ChattyClientBuilder},e}();t.Chatty=h},248:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},686:(e,t,n)=>{function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(514)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())},514:(e,t,n)=>{var r;function o(e){function n(){if(n.enabled){var e=n,o=+new Date,i=o-(r||o);e.diff=i,e.prev=r,e.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var o=t.formatters[r];if("function"==typeof o){var i=s[u];n=o.call(e,i),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=n.log||t.log||console.log.bind(console);c.apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(553),t.names=[],t.skips=[],t.formatters={}},553:e=>{var t=1e3,n=60*t,r=60*n,o=24*r;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,s){s=s||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return s.long?i(a=e,o,"day")||i(a,r,"hour")||i(a,n,"minute")||i(a,t,"second")||a+" ms":function(e){return e>=o?Math.round(e/o)+"d":e>=r?Math.round(e/r)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},711:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedDashboard=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("dashboard:run")},t.prototype.stop=function(){this.send("dashboard:stop")},t.prototype.edit=function(){this.send("dashboard:edit")},t.prototype.updateFilters=function(e){this.send("dashboard:filters:update",{filters:e})},t.prototype.setOptions=function(e){this.send("dashboard:options:set",e)},t.prototype.openScheduleDialog=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.sendAndReceive("dashboard:schedule_modal:open")]}))}))},t.prototype.loadDashboard=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.sendAndReceive("dashboard:load",{id:e,pushHistory:t})]}))}))},t}(n(211).LookerEmbedBase);t.LookerEmbedDashboard=a},354:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedClient=void 0;var s=n(541),a=/^https?:\/\//,u=function(){function e(e){this._builder=e,this._hostBuilder=null,this._host=null,this._connection=null,this._client=null,this._cookielessInitialized=!1}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return!!this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetOrigin",{get:function(){if(this._builder.sandboxedHost)return"*";var e=this._builder.apiHost;return a.test(e)?e:"https://".concat(e)},enumerable:!1,configurable:!0}),e.prototype.createIframe=function(e){return r(this,void 0,void 0,(function(){var t,n,i,a,u,c,l,h,d,f,p,y,_=this;return o(this,(function(b){for(t in this._hostBuilder=s.Chatty.createHost(e),this._builder.dialogScroll&&(this._builder.handlers["env:client:dialog"]=[function(e){var t=e.open,n=e.placement;t&&"cover"===n&&window.setTimeout((function(){_._host&&_._host.iframe.scrollIntoView(!0)}),200)}]),this._builder.dynamicIFrameHeight&&(this._builder.handlers["page:properties:changed"]=[function(e){var t=e.height;t&&t>100&&_._host&&(_._host.iframe.style.height="".concat(t,"px"))}]),this._builder.isCookielessEmbed&&(this._builder.handlers["session:tokens:request"]=[function(){return r(_,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return this._client&&this._cookielessApiToken&&this._builder.generateTokens?this._cookielessInitialized?[4,this.generateTokens()]:[3,2]:[3,4];case 1:return e=o.sent(),t=e.api_token,n=e.api_token_ttl,r=e.navigation_token,i=e.navigation_token_ttl,s=e.session_reference_token_ttl,this._cookielessApiToken=t,this._cookielessApiTokenTtl=n,this._cookielessNavigationToken=r,this._cookielessNavigationTokenTtl=i,this._cookielessSessionReferenceTokenTtl=s,[3,3];case 2:this._cookielessInitialized=!0,o.label=3;case 3:this._client.send("session:tokens",{api_token:this._cookielessApiToken,api_token_ttl:this._cookielessApiTokenTtl,navigation_token:this._cookielessNavigationToken,navigation_token_ttl:this._cookielessNavigationTokenTtl,session_reference_token_ttl:this._cookielessSessionReferenceTokenTtl}),o.label=4;case 4:return[2]}}))}))}]),this._builder.handlers)for(n=function(e){i._hostBuilder.on(t,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(_._client,t)}))},i=this,a=0,u=this._builder.handlers[t];a<u.length;a++)c=u[a],n(c);for(l=0,h=this._builder.sandboxAttrs;l<h.length;l++)p=h[l],this._hostBuilder.withSandboxAttribute(p);for(d=0,f=this._builder.allowAttrs;d<f.length;d++)p=f[d],this._hostBuilder.withAllowAttribute(p);return this._host=this._hostBuilder.frameBorder(this._builder.frameBorder).withTargetOrigin(this.targetOrigin).appendTo(this._builder.el).build(),this._builder.classNames.length&&(y=this._host.iframe.classList).add.apply(y,this._builder.classNames),this._builder.scrollMonitor&&this.addIframeMonitor(this._host.iframe),[2,this._host.connect().then((function(e){return _._client=new _._builder.clientConstructor(e),_._client}))]}))}))},e.prototype.sendScrollData=function(e){this._client.send("env:host:scroll",{offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,scrollX:window.scrollX,scrollY:window.scrollY})},e.prototype.addIframeMonitor=function(e){var t=this;document.addEventListener("scroll",(function(n){t.sendScrollData(e)})),window.addEventListener("resize",(function(n){t.sendScrollData(e)}))},e.prototype.createUrl=function(){return r(this,void 0,void 0,(function(){var e,t,n,i,s,a,u=this;return o(this,(function(c){if(e=this._builder.embedUrl,!(null==(t=this._builder.auth)?void 0:t.url))return[2,"".concat(this._builder.apiHost).concat(e)];if(n="".concat(t.url,"?src=").concat(encodeURIComponent(e)),t.params)for(i=0,s=t.params;i<s.length;i++)a=s[i],n+="&".concat(encodeURIComponent(a.name),"=").concat(encodeURIComponent(a.value));return[2,new Promise((function(e,i){return r(u,void 0,void 0,(function(){var r,s,a,u;return o(this,(function(o){if((r=new XMLHttpRequest).open("GET",n),t.withCredentials&&(r.withCredentials=t.withCredentials),r.setRequestHeader("Cache-Control","no-cache"),t.headers)for(s=0,a=t.headers;s<a.length;s++)u=a[s],r.setRequestHeader(u.name,u.value);return r.onload=function(){200===r.status?e(JSON.parse(r.responseText).url):i(r.statusText)},r.onerror=function(){return i(r.statusText)},r.send(),[2]}))}))}))]}))}))},e.prototype.acquireCookielessEmbedSession=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e.sessionAcquired?[2,this.acquireCookielessEmbedSessionInternal()]:e.acquireSessionPromise?[4,e.acquireSessionPromise]:[3,2];case 1:return t.sent(),[2,this.acquireCookielessEmbedSessionInternal()];case 2:return e.acquireSessionPromise=this.acquireCookielessEmbedSessionInternal(),[2,e.acquireSessionPromise.then((function(t){return e.sessionAcquired=!0,t})).catch((function(t){throw e.acquireSessionPromise=void 0,t}))]}}))}))},e.prototype.acquireCookielessEmbedSessionInternal=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s,a,u,c,l,h,d,f,p;return o(this,(function(o){switch(o.label){case 0:if(e=this._builder,t=e.acquireSession,n=e.generateTokens,!t)throw new Error("invalid state: acquireSession not defined");if(!n)throw new Error("invalid state: generateTokens not defined");return[4,this.acquireSession()];case 1:if(r=o.sent(),i=r.authentication_token,s=r.api_token,a=r.api_token_ttl,u=r.navigation_token,c=r.navigation_token_ttl,l=r.session_reference_token_ttl,!i||!u||!s)throw new Error("failed to prepare cookieless embed session");return this._cookielessApiToken=s,this._cookielessApiTokenTtl=a,this._cookielessNavigationToken=u,this._cookielessNavigationTokenTtl=c,this._cookielessSessionReferenceTokenTtl=l,h="https://".concat(this._builder.apiHost),d=""===new URL(this._builder.embedUrl,h).search?"?":"&",f="".concat(this._builder.embedUrl).concat(d,"embed_navigation_token=").concat(u),p="/login/embed/"+encodeURIComponent(f)+"?embed_authentication_token=".concat(i),[2,"".concat(h).concat(p)]}}))}))},e.prototype.acquireSession=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return"function"!=typeof(e=this._builder.acquireSession)?[3,2]:[4,e()];case 1:case 4:return[2,o.sent()];case 2:return o.trys.push([2,5,,6]),t=this.getResource(e),n=t.url,r=t.init,[4,fetch(n,r)];case 3:if(!(i=o.sent()).ok)throw console.error("acquire embed session failed",{resp:i}),new Error("acquire embed session failed");return[4,i.json()];case 5:throw s=o.sent(),console.error(s),new Error("acquire embed session failed");case 6:return[2]}}))}))},e.prototype.generateTokens=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s,a;return o(this,(function(o){switch(o.label){case 0:return"function"!=typeof(e=this._builder.generateTokens)?[3,2]:[4,e()];case 1:case 4:return[2,o.sent()];case 2:return o.trys.push([2,5,,6]),t=this.getResource(e),n=t.url,r=t.init,i=r||{body:JSON.stringify({api_token:this._cookielessApiToken,navigation_token:this._cookielessNavigationToken}),headers:{"content-type":"application/json"},method:"PUT"},[4,fetch(n,i)];case 3:if(!(s=o.sent()).ok){if(400===s.status)return[2,{session_reference_token_ttl:0}];throw console.error("generate tokens failed",{resp:s}),new Error("generate tokens failed")}return[4,s.json()];case 5:throw a=o.sent(),console.error(a),new Error("generate tokens failed");case 6:return[2]}}))}))},e.prototype.getResource=function(e){var t,n;if("object"==typeof e){var r=e.url;n=i(e,["url"]),t=r}else t=e;return{init:n,url:t}},e.prototype.connect=function(){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){if(this._connection)return[2,this._connection];if(this._builder.url){if(this._builder.isCookielessEmbed)throw new Error("withUrl not supported by cookieless embed");this._connection=this.createIframe(this._builder.url)}else this._builder.isCookielessEmbed?this._connection=this.acquireCookielessEmbedSession().then((function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){return[2,this.createIframe(t)]}))}))})).catch((function(t){throw e._connection=null,t})):this._connection=this.createUrl().then((function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){return[2,this.createIframe(t)]}))}))}));return[2,this._connection]}))}))},e.sessionAcquired=!1,e}();t.EmbedClient=u},211:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedBase=void 0;var o=function(){function e(e){this._host=e}return e.prototype.send=function(e,t){this._host.send(e,t)},e.prototype.sendAndReceive=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this._host.sendAndReceive(e,t)]}))}))},e}();t.LookerEmbedBase=o},886:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedBuilder=void 0;var r=n(354);function o(e){return e.replace(/,/g,"^,")}var i=function(){function e(e,t,n,r){if(this._hostSettings=e,this._type=t,this._endpoint=n,this._clientConstructor=r,this._handlers={},this._appendTo=null,this._sandboxAttrs=[],this._allowAttrs=[],this._classNames=[],this._frameBorder="0",this._suffix="",this.sandboxedHost)this._params={embed_domain:this._hostSettings.apiHost,sandboxed_host:"true",sdk:"2"};else{var o=window.location.origin;this._params={embed_domain:o,sdk:"2"}}}return e.prototype.withFrameBorder=function(e){return this._frameBorder=e,this},e.prototype.withId=function(e){return this._id=e,this},e.prototype.withParams=function(e){for(var t in e)this._params[t]=e[t];return this},e.prototype.withFilters=function(e,t){if(void 0===t&&(t=!1),"dashboard"===this.type)for(var n in e)this._params[n]=t?o(e[n]):e[n];else for(var n in e)this._params["f[".concat(n,"]")]=t?o(e[n]):e[n];return this},e.prototype.withSandboxAttr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._sandboxAttrs=this._sandboxAttrs.concat(e),this},e.prototype.withAllowAttr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._allowAttrs=this._allowAttrs.concat(e),this},e.prototype.withClassName=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._classNames=this._classNames.concat(e),this},e.prototype.withNext=function(e){return void 0===e&&(e="-next"),this._suffix=e,this._endpoint+=this._suffix,this},e.prototype.withTheme=function(e){return this._params.theme=e,this},e.prototype.withScrollMonitor=function(e){return void 0===e&&(e=!0),this._scrollMonitor=e,this},e.prototype.withDynamicIFrameHeight=function(e){return void 0===e&&(e=!0),this._dynamicIFrameHeight=e,this},e.prototype.withDialogScroll=function(e){return void 0===e&&(e=!0),this._dialogScroll=e,this},e.prototype.withApiHost=function(e){if(this._hostSettings.apiHost){if(this._hostSettings.apiHost!==e)throw new Error("not allowed to change api host")}else this._hostSettings.apiHost=e,this.sandboxedHost&&(this._params.embed_domain=e,this._params.sandboxed_host="true");return this},e.prototype.withAuthUrl=function(e){var t;if(null===(t=this._hostSettings.auth)||void 0===t?void 0:t.url){if(this._hostSettings.auth.url!==e)throw new Error("not allowed to change auth url")}else this._hostSettings.auth={url:e};return this},e.prototype.withAuth=function(e){if(this._hostSettings.auth){if(this._hostSettings.auth!==e)throw new Error("not allowed to change auth")}else this._hostSettings.auth=e;return this},e.prototype.withUrl=function(e){if(this.isCookielessEmbed)throw new Error("withUrl not supported by cookieless embed");return this._url=e,this},Object.defineProperty(e.prototype,"sandboxedHost",{get:function(){if(void 0===this._sandboxedHost){var e=window.location.origin;this._sandboxedHost="null"===e||!e}return this._sandboxedHost},set:function(e){this._sandboxedHost=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameBorder",{get:function(){return this._frameBorder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiHost",{get:function(){return this._hostSettings.apiHost},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCookielessEmbed",{get:function(){return!!this._hostSettings.acquireSession},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"acquireSession",{get:function(){return this._hostSettings.acquireSession},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generateTokens",{get:function(){return this._hostSettings.generateTokens},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authUrl",{get:function(){var e;return null===(e=this._hostSettings.auth)||void 0===e?void 0:e.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"auth",{get:function(){return this._hostSettings.auth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"embedUrl",{get:function(){var e=function(e){var t=[];for(var n in e)for(var r=e[n],o=0,i=Array.isArray(r)?r:[r];o<i.length;o++){var s=i[o];t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(s)))}return t.join("&")}(this._params);return"".concat(this.endpoint,"/").concat(this.id,"?").concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suffix",{get:function(){return this._suffix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollMonitor",{get:function(){return this._scrollMonitor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicIFrameHeight",{get:function(){return this._dynamicIFrameHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dialogScroll",{get:function(){return this._dialogScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientConstructor",{get:function(){return this._clientConstructor},enumerable:!1,configurable:!0}),e.prototype.appendTo=function(e){return this._appendTo="string"==typeof e?document.querySelector(e):e,this},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]?this._handlers[e]:[],this._handlers[e].push(t),this},e.prototype.build=function(){return new r.EmbedClient(this)},e}();t.EmbedBuilder=i},662:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedExplore=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("look:run")},t.prototype.updateFilters=function(e){this.send("look:filters:update",{filters:e})},t}(n(211).LookerEmbedBase);t.LookerEmbedExplore=i},438:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedExtension=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(211).LookerEmbedBase);t.LookerEmbedExtension=i},433:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedSDK=void 0;var i=n(886),s=n(711),a=n(662),u=n(438),c=n(684);o(n(924),t);var l=function(){function e(){}return e.init=function(e,t){this.apiHost=e,this.auth="string"==typeof t?{url:t}:t,this.acquireSession=void 0,this.generateTokens=void 0},e.initCookieless=function(e,t,n){this.apiHost=e,this.acquireSession=t,this.generateTokens=n,this.auth=void 0},e.createDashboardWithUrl=function(e){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withUrl(e)},e.createDashboardWithId=function(e){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withId(e)},e.createExploreWithUrl=function(e){return new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withUrl(e)},e.createExploreWithId=function(e){return e=e.replace("::","/"),new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withId(e)},e.createLookWithUrl=function(e){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withUrl(e)},e.createLookWithId=function(e){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withId(e)},e.createExtensionWithUrl=function(e){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withUrl(e)},e.createExtensionWithId=function(e){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withId(e)},e}();t.LookerEmbedSDK=l},684:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedLook=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("look:run")},t.prototype.updateFilters=function(e){this.send("look:filters:update",{filters:e})},t}(n(211).LookerEmbedBase);t.LookerEmbedLook=i},924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},310:(e,t,n)=>{"use strict";e.exports=n(702).polyfill()},702:function(e,t,n){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,i=void 0,s=function(e,t){f[r]=e,f[r+1]=t,2===(r+=2)&&(i?i(p):v())};var a="undefined"!=typeof window?window:void 0,u=a||{},c=u.MutationObserver||u.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(p,1)}}var f=new Array(1e3);function p(){for(var e=0;e<r;e+=2)(0,f[e])(f[e+1]),f[e]=void 0,f[e+1]=void 0;r=0}var y,_,b,g,v=void 0;function m(e,t){var n=this,r=new this.constructor(C);void 0===r[k]&&B(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return A(o,r,i,n._result)}))}else T(n,r,e,t);return r}function w(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(C);return x(t,e),t}v=l?function(){return process.nextTick(p)}:c?(_=0,b=new c(p),g=document.createTextNode(""),b.observe(g,{characterData:!0}),function(){g.data=_=++_%2}):h?((y=new MessageChannel).port1.onmessage=p,function(){return y.port2.postMessage(0)}):void 0===a?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(p)}:d()}catch(e){return d()}}():d();var k=Math.random().toString(36).substring(2);function C(){}var O=void 0;function E(t,n,r){n.constructor===t.constructor&&r===m&&n.constructor.resolve===w?function(e,t){1===t._state?S(e,t._result):2===t._state?P(e,t._result):T(t,void 0,(function(t){return x(e,t)}),(function(t){return P(e,t)}))}(t,n):void 0===r?S(t,n):e(r)?function(e,t,n){s((function(e){var r=!1,o=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?x(e,n):S(e,n))}),(function(t){r||(r=!0,P(e,t))}),e._label);!r&&o&&(r=!0,P(e,o))}),e)}(t,n,r):S(t,n)}function x(e,t){if(e===t)P(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=t),null===r||"object"!==o&&"function"!==o)S(e,t);else{var n=void 0;try{n=t.then}catch(t){return void P(e,t)}E(e,t,n)}var r,o}function j(e){e._onerror&&e._onerror(e._result),M(e)}function S(e,t){e._state===O&&(e._result=t,e._state=1,0!==e._subscribers.length&&s(M,e))}function P(e,t){e._state===O&&(e._state=2,e._result=t,s(j,e))}function T(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&s(M,e)}function M(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,s=0;s<t.length;s+=3)r=t[s],o=t[s+n],r?A(n,r,o,i):o(i);e._subscribers.length=0}}function A(t,n,r,o){var i=e(r),s=void 0,a=void 0,u=!0;if(i){try{s=r(o)}catch(e){u=!1,a=e}if(n===s)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else s=o;n._state!==O||(i&&u?x(n,s):!1===u?P(n,a):1===t?S(n,s):2===t&&P(n,s))}var H=0;function B(e){e[k]=H++,e._state=void 0,e._result=void 0,e._subscribers=[]}var q=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(C),this.promise[k]||B(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=void 0,i=void 0,s=!1;try{o=e.then}catch(e){s=!0,i=e}if(o===m&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===R){var a=new n(C);s?P(a,i):E(a,e,o),this._willSettleAt(a,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===O&&(this._remaining--,2===e?P(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;T(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}();var R=function(){function t(e){this[k]=H++,this._result=this._state=void 0,this._subscribers=[],C!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){x(e,t)}),(function(t){P(e,t)}))}catch(t){P(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return R.prototype.then=m,R.all=function(e){return new q(this,e).promise},R.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var o=e.length,i=0;i<o;i++)n.resolve(e[i]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=w,R.reject=function(e){var t=new this(C);return P(t,e),t},R._setScheduler=function(e){i=e},R._setAsap=function(e){s=e},R._asap=s,R.polyfill=function(){var e=void 0;if(void 0!==n.g)e=n.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=R},R.Promise=R,R}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(433)})()));

@@ -14,3 +14,3 @@ import type { ChattyHostConnection, CallbackStore } from '@looker/chatty';

export interface UrlParams {
[key: string]: string;
[key: string]: string | string[];
}

@@ -17,0 +17,0 @@ /**

@@ -33,3 +33,8 @@ "use strict";

for (var key in params) {
result.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(params[key])));
var value = params[key];
var valueArray = Array.isArray(value) ? value : [value];
for (var _i = 0, valueArray_1 = valueArray; _i < valueArray_1.length; _i++) {
var singleValue = valueArray_1[_i];
result.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(singleValue)));
}
}

@@ -36,0 +41,0 @@ return result.join('&');

{
"name": "@looker/embed-sdk",
"version": "1.8.5",
"version": "1.8.6",
"description": "A toolkit for embedding Looker",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -47,9 +47,15 @@ /*

export interface UrlParams {
[key: string]: string
[key: string]: string | string[]
}
function stringify(params: { [key: string]: string }) {
function stringify(params: UrlParams) {
const result = []
for (const key in params) {
result.push(`${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
const value = params[key]
const valueArray = Array.isArray(value) ? value : [value]
for (const singleValue of valueArray) {
result.push(
`${encodeURIComponent(key)}=${encodeURIComponent(singleValue)}`
)
}
}

@@ -56,0 +62,0 @@ return result.join('&')

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc