@looker/embed-sdk
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -1,8 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LookerEmbedSDK=e():t.LookerEmbedSDK=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){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=s.trys,(o=o.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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0}),e.LookerEmbedBase=void 0;var i=function(){function t(t){this._host=t}return t.prototype.send=function(t,e){this._host.send(t,e)},t.prototype.sendAndReceive=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this._host.sendAndReceive(t,e)]}))}))},t}();e.LookerEmbedBase=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=function(){function t(){this._targetOrigin="*",this._handlers={},this._defaultTimeout=3e4}return Object.defineProperty(t.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handlers",{get:function(){return this._handlers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!0,configurable:!0}),t.prototype.off=function(t,e){this._handlers[t]&&(this._handlers[t]=this._handlers[t].filter((function(t){return t!==e})))},t.prototype.on=function(t,e){return this._handlers[t]=this._handlers[t]||[],this._handlers[t].push(e),this},t.prototype.withDefaultTimeout=function(t){return this._defaultTimeout=t,this},t.prototype.withTargetOrigin=function(t){return this._targetOrigin=t,this},t.prototype.build=function(){return new r.ChattyClient(this)},t}();e.ChattyClientBuilder=o},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){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=s.trys,(o=o.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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0});var s=n(3),a=n(4);n(5);var u,c=n(7);!function(t){t[t.Connecting=0]="Connecting",t[t.Syn=1]="Syn",t[t.Connected=2]="Connected"}(u=e.ChattyClientStates||(e.ChattyClientStates={}));var l=function(){function t(t){this._clientWindow=window,this._connection=null,this._hostWindow=this._clientWindow.parent,this._state=u.Connecting,this._sequence=0,this._receivers={},this._handlers=t.handlers,this._targetOrigin=t.targetOrigin,this._defaultTimeout=t.defaultTimeout,this._channel=new MessageChannel}return Object.defineProperty(t.prototype,"connection",{get:function(){return this._connection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return this._state===u.Connected},enumerable:!0,configurable:!0}),t.prototype.connect=function(){return o(this,void 0,void 0,(function(){var e=this;return i(this,(function(n){return this._connection||(this._connection=new Promise((function(n,r){e._channel.port1.onmessage=function(r){switch(t._debug("received",r.data.action,r.data.data),r.data.action){case a.ChattyHostMessages.SynAck:e._state=u.Connected,e.sendMsg(s.ChattyClientMessages.Ack),n({send:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.sendMsg(s.ChattyClientMessages.Message,{eventName:t,payload:n})},sendAndReceive:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(e,void 0,void 0,(function(){var e,r=this;return i(this,(function(o){return e=++this._sequence,this.sendMsg(s.ChattyClientMessages.MessageWithResponse,{eventName:t,payload:n},e),[2,new Promise((function(t,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[e],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[e]={resolve:t,reject:n,timeoutId:o}}))]}))}))}});break;case a.ChattyHostMessages.Message:e._handlers[r.data.data.eventName]&&e._handlers[r.data.data.eventName].forEach((function(t){return t.apply(e,r.data.data.payload)}));break;case a.ChattyHostMessages.MessageWithResponse:var c=r.data.data,l=c.eventName,h=c.payload,f=c.sequence,d=[];e._handlers[l]&&(d=e._handlers[l].map((function(t){return t.apply(e,h)}))),Promise.all(d).then((function(t){e.sendMsg(s.ChattyClientMessages.Response,{eventName:l,payload:t},f)})).catch((function(t){e.sendMsg(s.ChattyClientMessages.ResponseError,{eventName:l,payload:t.toString()},f)}));break;case a.ChattyHostMessages.Response:var p=e._receivers[r.data.data.sequence];p&&(delete e._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case a.ChattyHostMessages.ResponseError:var y=e._receivers[r.data.data.sequence];y&&(delete e._receivers[r.data.data.sequence],y.timeoutId&&clearTimeout(y.timeoutId),y.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}},e.initiateHandshake()}))),[2,this._connection]}))}))},t.prototype.initiateHandshake=function(){t._debug("connecting to",this._targetOrigin),this._hostWindow.postMessage({action:s.ChattyClientMessages.Syn},this._targetOrigin,[this._channel.port2]),this._state=u.Syn},t.prototype.sendMsg=function(e,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);t._debug("sending",e,s),this._channel.port1.postMessage({action:e,data:s})},t._debug=c("looker:chatty:client"),t}();e.ChattyClient=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Syn=0]="Syn",t[t.Ack=1]="Ack",t[t.Message=2]="Message",t[t.MessageWithResponse=3]="MessageWithResponse",t[t.Response=4]="Response",t[t.ResponseError=5]="ResponseError"}(e.ChattyClientMessages||(e.ChattyClientMessages={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.SynAck=0]="SynAck",t[t.Message=1]="Message",t[t.MessageWithResponse=2]="MessageWithResponse",t[t.Response=3]="Response",t[t.ResponseError=4]="ResponseError"}(e.ChattyHostMessages||(e.ChattyHostMessages={}))},function(t,e,n){"use strict";t.exports=n(14).polyfill()},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=a(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){(function(r){function o(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(16)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))})),t.splice(i,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=o,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"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+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(o())}).call(this,n(6))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),o=function(){function t(t,e){this._url=t,this._source=e,this._appendTo=null,this._handlers={},this._sandboxAttrs=[],this._allowAttrs=[],this._frameBorder="0",this._targetOrigin=null,this._defaultTimeout=3e4}return Object.defineProperty(t.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handlers",{get:function(){return this._handlers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!0,configurable:!0}),t.prototype.appendTo=function(t){return this._appendTo=t,this},t.prototype.off=function(t,e){this._handlers[t]&&(this._handlers[t]=this._handlers[t].filter((function(t){return t!==e})))},t.prototype.on=function(t,e){return this._handlers[t]=this._handlers[t]||[],this._handlers[t].push(e),this},t.prototype.withDefaultTimeout=function(t){return this._defaultTimeout=t,this},t.prototype.getFrameBorder=function(){return this._frameBorder},t.prototype.frameBorder=function(t){return this._frameBorder=t,this},t.prototype.sandbox=function(t){return this.withSandboxAttribute(t),this},t.prototype.withSandboxAttribute=function(t){return this._sandboxAttrs.push(t),this},t.prototype.withAllowAttribute=function(t){return this._allowAttrs.push(t),this},t.prototype.withTargetOrigin=function(t){return this._targetOrigin=t,this},t.prototype.build=function(){return new r.ChattyHost(this)},t}();e.ChattyHostBuilder=o},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){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=s.trys,(o=o.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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0});var s=n(3),a=n(4);n(5);var u,c=n(7);!function(t){t[t.Connecting=0]="Connecting",t[t.SynAck=1]="SynAck",t[t.Connected=2]="Connected"}(u=e.ChattyHostStates||(e.ChattyHostStates={}));var l=function(){function t(t){var e=this;this._hostWindow=window,this._connection=null,this._state=u.Connecting,this._sequence=0,this._receivers={},this.iframe=document.createElement("iframe"),t.sandboxAttrs.forEach((function(t){return e.iframe.sandbox.add(t)})),"allow"in this.iframe&&(this.iframe.allow=t.allowAttrs.join("; ")),this.iframe.frameBorder=t.getFrameBorder(),t.url?this.iframe.src=t.url:t.source?this.iframe.srcdoc=t.source:console.warn("url or source required to initialize Chatty host correctly"),this._appendTo=t.el,this._handlers=t.handlers,this._port=null,this._targetOrigin=t.targetOrigin,this._defaultTimeout=t.defaultTimeout}return Object.defineProperty(t.prototype,"connection",{get:function(){return this._connection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return this._state===u.Connected},enumerable:!0,configurable:!0}),t.prototype.connect=function(){return o(this,void 0,void 0,(function(){var e,n=this;return i(this,(function(r){return this._connection?[2,this._connection]:(e=function(){return o(n,void 0,void 0,(function(){var e=this;return i(this,(function(n){return[2,new Promise((function(n,r){var c=function(r){switch(t._debug("port received",r.data.action,r.data.data),r.data.action){case s.ChattyClientMessages.Ack:e._state=u.Connected,n({send:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.sendMsg(a.ChattyHostMessages.Message,{eventName:t,payload:n})},sendAndReceive:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(e,void 0,void 0,(function(){var e,r=this;return i(this,(function(o){return e=++this._sequence,this.sendMsg(a.ChattyHostMessages.MessageWithResponse,{eventName:t,payload:n},e),[2,new Promise((function(t,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[e],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[e]={resolve:t,reject:n,timeoutId:o}}))]}))}))}});break;case s.ChattyClientMessages.Message:e._handlers[r.data.data.eventName]&&e._handlers[r.data.data.eventName].forEach((function(t){return t.apply(e,r.data.data.payload)}));break;case s.ChattyClientMessages.MessageWithResponse:var c=r.data.data,l=c.eventName,h=c.payload,f=c.sequence,d=[];e._handlers[l]&&(d=e._handlers[l].map((function(t){return t.apply(e,h)}))),Promise.all(d).then((function(t){e.sendMsg(a.ChattyHostMessages.Response,{eventName:l,payload:t},f)})).catch((function(t){e.sendMsg(a.ChattyHostMessages.ResponseError,{eventName:l,payload:t.toString()},f)}));break;case s.ChattyClientMessages.Response:(p=e._receivers[r.data.data.sequence])&&(delete e._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case s.ChattyClientMessages.ResponseError:var p;(p=e._receivers[r.data.data.sequence])&&(delete e._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))}};e._hostWindow.addEventListener("message",(function(n){if(e.isValidMsg(n))switch(t._debug("window received",n.data.action,n.data.data),n.data.action){case s.ChattyClientMessages.Syn:if(e._port){if(!(e._targetOrigin&&"*"===e._targetOrigin||e._targetOrigin===n.origin))return void t._debug("rejected new connection from",n.origin);t._debug("reconnecting to",n.origin),e._port.close()}e._port=n.ports[0],e._port.onmessage=c,e.sendMsg(a.ChattyHostMessages.SynAck),e._state=u.SynAck}else t._debug("window received invalid",n)}))}))]}))}))},this._appendTo.appendChild(this.iframe),[2,this._connection=e()])}))}))},t.prototype.sendMsg=function(e,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);t._debug("sending",e,s),this._port.postMessage({action:e,data:s})},t.prototype.isValidMsg=function(t){return t.source===this.iframe.contentWindow&&(!this._targetOrigin||"*"===this._targetOrigin||this._targetOrigin===t.origin)},t._debug=c("looker:chatty:host"),t}();e.ChattyHost=l},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.LookerEmbedSDK=void 0;var i=n(11),s=n(18),a=n(19),u=n(20),c=n(21);o(n(22),e);var l=function(){function t(){}return t.init=function(t,e){this.apiHost=t,this.auth="string"==typeof e?{url:e}:e},t.createDashboardWithUrl=function(t){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withUrl(t)},t.createDashboardWithId=function(t){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withId(t)},t.createExploreWithUrl=function(t){return new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withUrl(t)},t.createExploreWithId=function(t){return t=t.replace("::","/"),new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withId(t)},t.createLookWithUrl=function(t){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withUrl(t)},t.createLookWithId=function(t){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withId(t)},t.createExtensionWithUrl=function(t){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withUrl(t)},t.createExtensionWithId=function(t){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withId(t)},t}();e.LookerEmbedSDK=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedBuilder=void 0;var r=n(12);function o(t){return t.replace(/,/g,"^,")}var i=function(){function t(t,e,n,r){if(this._hostSettings=t,this._type=e,this._endpoint=n,this._clientConstructor=r,this._handlers={},this._appendTo=null,this._sandboxAttrs=[],this._classNames=[],this._frameBorder="0",this._suffix="",this.sandboxedHost)this._params={embed_domain:this._hostSettings.apiHost,sdk:"2",sandboxed_host:"true"};else{var o=window.location.origin;this._params={embed_domain:o,sdk:"2"}}}return t.prototype.withFrameBorder=function(t){return this._frameBorder=t,this},t.prototype.withId=function(t){return this._id=t,this},t.prototype.withParams=function(t){for(var e in t)this._params[e]=t[e];return this},t.prototype.withFilters=function(t,e){if(void 0===e&&(e=!1),"dashboard"===this.type)for(var n in t)this._params[n]=e?o(t[n]):t[n];else for(var n in t)this._params["f["+n+"]"]=e?o(t[n]):t[n];return this},t.prototype.withSandboxAttr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._sandboxAttrs=this._sandboxAttrs.concat(t),this},t.prototype.withClassName=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._classNames=this._classNames.concat(t),this},t.prototype.withNext=function(t){return void 0===t&&(t="-next"),this._suffix=t,this._endpoint+=this._suffix,this},t.prototype.withTheme=function(t){return this._params.theme=t,this},t.prototype.withApiHost=function(t){if(this._hostSettings.apiHost){if(this._hostSettings.apiHost!==t)throw new Error("not allowed to change api host")}else this._hostSettings.apiHost=t,this.sandboxedHost&&(this._params.embed_domain=t,this._params.sandboxed_host="true");return this},t.prototype.withAuthUrl=function(t){var e;if(null===(e=this._hostSettings.auth)||void 0===e?void 0:e.url){if(this._hostSettings.auth.url!==t)throw new Error("not allowed to change auth url")}else this._hostSettings.auth={url:t};return this},t.prototype.withAuth=function(t){if(this._hostSettings.auth){if(this._hostSettings.auth!==t)throw new Error("not allowed to change auth")}else this._hostSettings.auth=t;return this},t.prototype.withUrl=function(t){return this._url=t,this},Object.defineProperty(t.prototype,"sandboxedHost",{get:function(){if(void 0===this._sandboxedHost){var t=window.location.origin;this._sandboxedHost="null"===t||!t}return this._sandboxedHost},set:function(t){this._sandboxedHost=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"frameBorder",{get:function(){return this._frameBorder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"apiHost",{get:function(){return this._hostSettings.apiHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authUrl",{get:function(){var t;return null===(t=this._hostSettings.auth)||void 0===t?void 0:t.url},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"auth",{get:function(){return this._hostSettings.auth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"embedUrl",{get:function(){var t=function(t){var e=[];for(var n in t)e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.join("&")}(this._params);return this.endpoint+"/"+this.id+"?"+t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNames",{get:function(){return this._classNames},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suffix",{get:function(){return this._suffix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientConstructor",{get:function(){return this._clientConstructor},enumerable:!1,configurable:!0}),t.prototype.appendTo=function(t){return this._appendTo="string"==typeof t?document.querySelector(t):t,this},t.prototype.on=function(t,e){return this._handlers[t]=this._handlers[t]?this._handlers[t]:[],this._handlers[t].push(e),this},t.prototype.build=function(){return new r.EmbedClient(this)},t}();e.EmbedBuilder=i},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){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=s.trys,(o=o.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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0}),e.EmbedClient=void 0;var i=n(13),s=/^https?:\/\//,a=function(){function t(t){this._builder=t,this._hostBuilder=null,this._host=null,this._connection=null,this._client=null}return Object.defineProperty(t.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return!!this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetOrigin",{get:function(){if(this._builder.sandboxedHost)return"*";var t=this._builder.apiHost;return s.test(t)?t:"https://"+t},enumerable:!1,configurable:!0}),t.prototype.createIframe=function(t){return r(this,void 0,void 0,(function(){var e,n,r,s,a,u,c,l,h,f,d=this;return o(this,(function(o){for(e in this._hostBuilder=i.Chatty.createHost(t),this._builder.handlers)for(n=function(t){r._hostBuilder.on(e,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(d._client,e)}))},r=this,s=0,a=this._builder.handlers[e];s<a.length;s++)u=a[s],n(u);for(c=0,l=this._builder.sandboxAttrs;c<l.length;c++)h=l[c],this._hostBuilder.withSandboxAttribute(h);return this._host=this._hostBuilder.frameBorder(this._builder.frameBorder).withTargetOrigin(this.targetOrigin).appendTo(this._builder.el).build(),this._builder.classNames.length&&(f=this._host.iframe.classList).add.apply(f,this._builder.classNames),[2,this._host.connect().then((function(t){return d._client=new d._builder.clientConstructor(t),d._client}))]}))}))},t.prototype.createUrl=function(){return r(this,void 0,void 0,(function(){var t,e,n,i,s,a,u=this;return o(this,(function(c){if(t=this._builder.embedUrl,!(null==(e=this._builder.auth)?void 0:e.url))return[2,""+this._builder.apiHost+t];if(n=e.url+"?src="+encodeURIComponent(t),e.params)for(i=0,s=e.params;i<s.length;i++)a=s[i],n+="&"+encodeURIComponent(a.name)+"="+encodeURIComponent(a.value);return[2,new Promise((function(t,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),e.withCredentials&&(r.withCredentials=e.withCredentials),r.setRequestHeader("Cache-Control","no-cache"),e.headers)for(s=0,a=e.headers;s<a.length;s++)u=a[s],r.setRequestHeader(u.name,u.value);return r.onload=function(){200===r.status?t(JSON.parse(r.responseText).url):i(r.statusText)},r.onerror=function(){return i(r.statusText)},r.send(),[2]}))}))}))]}))}))},t.prototype.connect=function(){return r(this,void 0,void 0,(function(){var t=this;return o(this,(function(e){return this._connection||(this._builder.url?this._connection=this.createIframe(this._builder.url):this._connection=this.createUrl().then((function(e){return r(t,void 0,void 0,(function(){return o(this,(function(t){return[2,this.createIframe(e)]}))}))}))),[2,this._connection]}))}))},t}();e.EmbedClient=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(8),i=n(1);e.ChattyClientBuilder=i.ChattyClientBuilder;var s=n(8);e.ChattyHostBuilder=s.ChattyHostBuilder;var a=n(2);e.ChattyClient=a.ChattyClient;var u=n(9);e.ChattyHost=u.ChattyHost;var c=function(){function t(){}return t.createHost=function(t){return new o.ChattyHostBuilder(t)},t.createHostFromSource=function(t){return new o.ChattyHostBuilder(void 0,t)},t.createClient=function(){return new r.ChattyClientBuilder},t}();e.Chatty=c},function(t,e,n){(function(e,n){ | ||
/*! | ||
* @overview es6-promise - a tiny implementation of Promises/A+. | ||
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) | ||
* @license Licensed under MIT license | ||
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE | ||
* @version v4.2.8+1e68dce6 | ||
*/var r;r=function(){"use strict";function t(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=0,i=void 0,s=void 0,a=function(t,e){p[o]=t,p[o+1]=e,2===(o+=2)&&(s?s(y):m())},u="undefined"!=typeof window?window:void 0,c=u||{},l=c.MutationObserver||c.WebKitMutationObserver,h="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(y,1)}}var p=new Array(1e3);function y(){for(var t=0;t<o;t+=2)(0,p[t])(p[t+1]),p[t]=void 0,p[t+1]=void 0;o=0}var b,_,g,v,m=void 0;function w(t,e){var n=this,r=new this.constructor(x);void 0===r[O]&&B(r);var o=n._state;if(o){var i=arguments[o-1];a((function(){return T(o,r,i,n._result)}))}else A(n,r,t,e);return r}function C(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(x);return k(e,t),e}h?m=function(){return e.nextTick(y)}:l?(_=0,g=new l(y),v=document.createTextNode(""),g.observe(v,{characterData:!0}),m=function(){v.data=_=++_%2}):f?((b=new MessageChannel).port1.onmessage=y,m=function(){return b.port2.postMessage(0)}):m=void 0===u?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(y)}:d()}catch(t){return d()}}():d();var O=Math.random().toString(36).substring(2);function x(){}function E(e,n,r){n.constructor===e.constructor&&r===w&&n.constructor.resolve===C?function(t,e){1===e._state?j(t,e._result):2===e._state?P(t,e._result):A(e,void 0,(function(e){return k(t,e)}),(function(e){return P(t,e)}))}(e,n):void 0===r?j(e,n):t(r)?function(t,e,n){a((function(t){var r=!1,o=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,(function(n){r||(r=!0,e!==n?k(t,n):j(t,n))}),(function(e){r||(r=!0,P(t,e))}),t._label);!r&&o&&(r=!0,P(t,o))}),t)}(e,n,r):j(e,n)}function k(t,e){if(t===e)P(t,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=e),null===r||"object"!==o&&"function"!==o)j(t,e);else{var n=void 0;try{n=e.then}catch(e){return void P(t,e)}E(t,e,n)}var r,o}function M(t){t._onerror&&t._onerror(t._result),S(t)}function j(t,e){void 0===t._state&&(t._result=e,t._state=1,0!==t._subscribers.length&&a(S,t))}function P(t,e){void 0===t._state&&(t._state=2,t._result=e,a(M,t))}function A(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+1]=n,o[i+2]=r,0===i&&t._state&&a(S,t)}function S(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?T(n,r,o,i):o(i);t._subscribers.length=0}}function T(e,n,r,o){var i=t(r),s=void 0,a=void 0,u=!0;if(i){try{s=r(o)}catch(t){u=!1,a=t}if(n===s)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else s=o;void 0!==n._state||(i&&u?k(n,s):!1===u?P(n,a):1===e?j(n,s):2===e&&P(n,s))}var H=0;function B(t){t[O]=H++,t._state=void 0,t._result=void 0,t._subscribers=[]}var L=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(x),this.promise[O]||B(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&j(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;void 0===this._state&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===C){var o=void 0,i=void 0,s=!1;try{o=t.then}catch(t){s=!0,i=t}if(o===w&&void 0!==t._state)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===R){var a=new n(x);s?P(a,i):E(a,t,o),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===t?P(r,n):this._result[e]=n),0===this._remaining&&j(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;A(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}(),R=function(){function e(t){this[O]=H++,this._result=this._state=void 0,this._subscribers=[],x!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){k(t,e)}),(function(e){P(t,e)}))}catch(e){P(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return t(e)?this.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):this.then(e,e)},e}();return R.prototype.then=w,R.all=function(t){return new L(this,t).promise},R.race=function(t){var e=this;return r(t)?new e((function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))},R.resolve=C,R.reject=function(t){var e=new this(x);return P(e,t),e},R._setScheduler=function(t){s=t},R._setAsap=function(t){a=t},R._asap=a,R.polyfill=function(){var t=void 0;if(void 0!==n)t=n;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=R},R.Promise=R,R},t.exports=r()}).call(this,n(6),n(15))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r;function o(t){function n(){if(n.enabled){var t=n,o=+new Date,i=o-(r||o);t.diff=i,t.prev=r,t.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.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=e.formatters[r];if("function"==typeof o){var i=s[u];n=o.call(t,i),s.splice(u,1),u--}return n})),e.formatArgs.call(t,s);var c=n.log||e.log||console.log.bind(console);c.apply(t,s)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),"function"==typeof e.init&&e.init(n),n}(e=t.exports=o.debug=o.default=o).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];for(var n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(t=n[o].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(17),e.names=[],e.skips=[],e.formatters={}},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var a,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(a=t,i,"day")||s(a,o,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(t){if(t>=i)return Math.round(t/i)+"d";if(t>=o)return Math.round(t/o)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){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=s.trys,(o=o.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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0}),e.LookerEmbedDashboard=void 0;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.run=function(){this.send("dashboard:run")},e.prototype.stop=function(){this.send("dashboard:stop")},e.prototype.updateFilters=function(t){this.send("dashboard:filters:update",{filters:t})},e.prototype.setOptions=function(t){this.send("dashboard:options:set",t)},e.prototype.openScheduleDialog=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendAndReceive("dashboard:schedule_modal:open")]}))}))},e.prototype.loadDashboard=function(t,e){return void 0===e&&(e=!1),i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.sendAndReceive("dashboard:load",{id:t,pushHistory:e})]}))}))},e}(n(0).LookerEmbedBase);e.LookerEmbedDashboard=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.LookerEmbedExplore=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.run=function(){this.send("look:run")},e.prototype.updateFilters=function(t){this.send("look:filters:update",{filters:t})},e}(n(0).LookerEmbedBase);e.LookerEmbedExplore=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.LookerEmbedExtension=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(n(0).LookerEmbedBase);e.LookerEmbedExtension=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.LookerEmbedLook=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.run=function(){this.send("look:run")},e.prototype.updateFilters=function(t){this.send("look:filters:update",{filters:t})},e}(n(0).LookerEmbedBase);e.LookerEmbedLook=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}])})); | ||
/*! For license information please see main.js.LICENSE.txt */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LookerEmbedSDK=e():t.LookerEmbedSDK=e()}(self,(function(){return(()=>{var t={105:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0});var s=n(346),a=n(529);n(310);var u,c=n(227);!function(t){t[t.Connecting=0]="Connecting",t[t.Syn=1]="Syn",t[t.Connected=2]="Connected"}(u=e.ChattyClientStates||(e.ChattyClientStates={}));var l=function(){function t(t){this._clientWindow=window,this._connection=null,this._hostWindow=this._clientWindow.parent,this._state=u.Connecting,this._sequence=0,this._receivers={},this._handlers=t.handlers,this._targetOrigin=t.targetOrigin,this._defaultTimeout=t.defaultTimeout,this._channel=new MessageChannel}return Object.defineProperty(t.prototype,"connection",{get:function(){return this._connection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return this._state===u.Connected},enumerable:!0,configurable:!0}),t.prototype.connect=function(){return o(this,void 0,void 0,(function(){var e=this;return i(this,(function(n){return this._connection||(this._connection=new Promise((function(n,r){e._channel.port1.onmessage=function(r){switch(t._debug("received",r.data.action,r.data.data),r.data.action){case a.ChattyHostMessages.SynAck:e._state=u.Connected,e.sendMsg(s.ChattyClientMessages.Ack),n({send:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.sendMsg(s.ChattyClientMessages.Message,{eventName:t,payload:n})},sendAndReceive:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(e,void 0,void 0,(function(){var e,r=this;return i(this,(function(o){return e=++this._sequence,this.sendMsg(s.ChattyClientMessages.MessageWithResponse,{eventName:t,payload:n},e),[2,new Promise((function(t,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[e],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[e]={resolve:t,reject:n,timeoutId:o}}))]}))}))}});break;case a.ChattyHostMessages.Message:e._handlers[r.data.data.eventName]&&e._handlers[r.data.data.eventName].forEach((function(t){return t.apply(e,r.data.data.payload)}));break;case a.ChattyHostMessages.MessageWithResponse:var c=r.data.data,l=c.eventName,h=c.payload,d=c.sequence,f=[];e._handlers[l]&&(f=e._handlers[l].map((function(t){return t.apply(e,h)}))),Promise.all(f).then((function(t){e.sendMsg(s.ChattyClientMessages.Response,{eventName:l,payload:t},d)})).catch((function(t){e.sendMsg(s.ChattyClientMessages.ResponseError,{eventName:l,payload:t.toString()},d)}));break;case a.ChattyHostMessages.Response:var p=e._receivers[r.data.data.sequence];p&&(delete e._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case a.ChattyHostMessages.ResponseError:var y=e._receivers[r.data.data.sequence];y&&(delete e._receivers[r.data.data.sequence],y.timeoutId&&clearTimeout(y.timeoutId),y.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}},e.initiateHandshake()}))),[2,this._connection]}))}))},t.prototype.initiateHandshake=function(){t._debug("connecting to",this._targetOrigin),this._hostWindow.postMessage({action:s.ChattyClientMessages.Syn},this._targetOrigin,[this._channel.port2]),this._state=u.Syn},t.prototype.sendMsg=function(e,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);t._debug("sending",e,s),this._channel.port1.postMessage({action:e,data:s})},t._debug=c("looker:chatty:client"),t}();e.ChattyClient=l},955:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(105),o=function(){function t(){this._targetOrigin="*",this._handlers={},this._defaultTimeout=3e4}return Object.defineProperty(t.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handlers",{get:function(){return this._handlers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!0,configurable:!0}),t.prototype.off=function(t,e){this._handlers[t]&&(this._handlers[t]=this._handlers[t].filter((function(t){return t!==e})))},t.prototype.on=function(t,e){return this._handlers[t]=this._handlers[t]||[],this._handlers[t].push(e),this},t.prototype.withDefaultTimeout=function(t){return this._defaultTimeout=t,this},t.prototype.withTargetOrigin=function(t){return this._targetOrigin=t,this},t.prototype.build=function(){return new r.ChattyClient(this)},t}();e.ChattyClientBuilder=o},346:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ChattyClientMessages||(e.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(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0});var s=n(346),a=n(529);n(310);var u,c=n(227);!function(t){t[t.Connecting=0]="Connecting",t[t.SynAck=1]="SynAck",t[t.Connected=2]="Connected"}(u=e.ChattyHostStates||(e.ChattyHostStates={}));var l=function(){function t(t){var e=this;this._hostWindow=window,this._connection=null,this._state=u.Connecting,this._sequence=0,this._receivers={},this.iframe=document.createElement("iframe"),t.sandboxAttrs.forEach((function(t){return e.iframe.sandbox.add(t)})),"allow"in this.iframe&&(this.iframe.allow=t.allowAttrs.join("; ")),this.iframe.frameBorder=t.getFrameBorder(),t.url?this.iframe.src=t.url:t.source?this.iframe.srcdoc=t.source:console.warn("url or source required to initialize Chatty host correctly"),this._appendTo=t.el,this._handlers=t.handlers,this._port=null,this._targetOrigin=t.targetOrigin,this._defaultTimeout=t.defaultTimeout}return Object.defineProperty(t.prototype,"connection",{get:function(){return this._connection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return this._state===u.Connected},enumerable:!0,configurable:!0}),t.prototype.connect=function(){return o(this,void 0,void 0,(function(){var e,n=this;return i(this,(function(r){return this._connection?[2,this._connection]:(e=function(){return o(n,void 0,void 0,(function(){var e=this;return i(this,(function(n){return[2,new Promise((function(n,r){var c=function(r){switch(t._debug("port received",r.data.action,r.data.data),r.data.action){case s.ChattyClientMessages.Ack:e._state=u.Connected,n({send:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.sendMsg(a.ChattyHostMessages.Message,{eventName:t,payload:n})},sendAndReceive:function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(e,void 0,void 0,(function(){var e,r=this;return i(this,(function(o){return e=++this._sequence,this.sendMsg(a.ChattyHostMessages.MessageWithResponse,{eventName:t,payload:n},e),[2,new Promise((function(t,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[e],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[e]={resolve:t,reject:n,timeoutId:o}}))]}))}))}});break;case s.ChattyClientMessages.Message:e._handlers[r.data.data.eventName]&&e._handlers[r.data.data.eventName].forEach((function(t){return t.apply(e,r.data.data.payload)}));break;case s.ChattyClientMessages.MessageWithResponse:var c=r.data.data,l=c.eventName,h=c.payload,d=c.sequence,f=[];e._handlers[l]&&(f=e._handlers[l].map((function(t){return t.apply(e,h)}))),Promise.all(f).then((function(t){e.sendMsg(a.ChattyHostMessages.Response,{eventName:l,payload:t},d)})).catch((function(t){e.sendMsg(a.ChattyHostMessages.ResponseError,{eventName:l,payload:t.toString()},d)}));break;case s.ChattyClientMessages.Response:(p=e._receivers[r.data.data.sequence])&&(delete e._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case s.ChattyClientMessages.ResponseError:var p;(p=e._receivers[r.data.data.sequence])&&(delete e._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))}};e._hostWindow.addEventListener("message",(function(n){if(e.isValidMsg(n))switch(t._debug("window received",n.data.action,n.data.data),n.data.action){case s.ChattyClientMessages.Syn:if(e._port){if(!(e._targetOrigin&&"*"===e._targetOrigin||e._targetOrigin===n.origin))return void t._debug("rejected new connection from",n.origin);t._debug("reconnecting to",n.origin),e._port.close()}e._port=n.ports[0],e._port.onmessage=c,e.sendMsg(a.ChattyHostMessages.SynAck),e._state=u.SynAck}else t._debug("window received invalid",n)}))}))]}))}))},this._appendTo.appendChild(this.iframe),[2,this._connection=e()])}))}))},t.prototype.sendMsg=function(e,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);t._debug("sending",e,s),this._port.postMessage({action:e,data:s})},t.prototype.isValidMsg=function(t){return t.source===this.iframe.contentWindow&&(!this._targetOrigin||"*"===this._targetOrigin||this._targetOrigin===t.origin)},t._debug=c("looker:chatty:host"),t}();e.ChattyHost=l},777:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(474),o=function(){function t(t,e){this._url=t,this._source=e,this._appendTo=null,this._handlers={},this._sandboxAttrs=[],this._allowAttrs=[],this._frameBorder="0",this._targetOrigin=null,this._defaultTimeout=3e4}return Object.defineProperty(t.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handlers",{get:function(){return this._handlers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!0,configurable:!0}),t.prototype.appendTo=function(t){return this._appendTo=t,this},t.prototype.off=function(t,e){this._handlers[t]&&(this._handlers[t]=this._handlers[t].filter((function(t){return t!==e})))},t.prototype.on=function(t,e){return this._handlers[t]=this._handlers[t]||[],this._handlers[t].push(e),this},t.prototype.withDefaultTimeout=function(t){return this._defaultTimeout=t,this},t.prototype.getFrameBorder=function(){return this._frameBorder},t.prototype.frameBorder=function(t){return this._frameBorder=t,this},t.prototype.sandbox=function(t){return this.withSandboxAttribute(t),this},t.prototype.withSandboxAttribute=function(t){return this._sandboxAttrs.push(t),this},t.prototype.withAllowAttribute=function(t){return this._allowAttrs.push(t),this},t.prototype.withTargetOrigin=function(t){return this._targetOrigin=t,this},t.prototype.build=function(){return new r.ChattyHost(this)},t}();e.ChattyHostBuilder=o},529:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ChattyHostMessages||(e.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:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(955),o=n(777),i=n(955);e.ChattyClientBuilder=i.ChattyClientBuilder;var s=n(777);e.ChattyHostBuilder=s.ChattyHostBuilder;var a=n(105);e.ChattyClient=a.ChattyClient;var u=n(474);e.ChattyHost=u.ChattyHost;var c=function(){function t(){}return t.createHost=function(t){return new o.ChattyHostBuilder(t)},t.createHostFromSource=function(t){return new o.ChattyHostBuilder(void 0,t)},t.createClient=function(){return new r.ChattyClientBuilder},t}();e.Chatty=c},711:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0}),e.LookerEmbedDashboard=void 0;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.run=function(){this.send("dashboard:run")},e.prototype.stop=function(){this.send("dashboard:stop")},e.prototype.updateFilters=function(t){this.send("dashboard:filters:update",{filters:t})},e.prototype.setOptions=function(t){this.send("dashboard:options:set",t)},e.prototype.openScheduleDialog=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.sendAndReceive("dashboard:schedule_modal:open")]}))}))},e.prototype.loadDashboard=function(t,e){return void 0===e&&(e=!1),i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.sendAndReceive("dashboard:load",{id:t,pushHistory:e})]}))}))},e}(n(211).LookerEmbedBase);e.LookerEmbedDashboard=a},354:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0}),e.EmbedClient=void 0;var i=n(541),s=/^https?:\/\//,a=function(){function t(t){this._builder=t,this._hostBuilder=null,this._host=null,this._connection=null,this._client=null}return Object.defineProperty(t.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return!!this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetOrigin",{get:function(){if(this._builder.sandboxedHost)return"*";var t=this._builder.apiHost;return s.test(t)?t:"https://"+t},enumerable:!1,configurable:!0}),t.prototype.createIframe=function(t){return r(this,void 0,void 0,(function(){var e,n,r,s,a,u,c,l,h,d,f=this;return o(this,(function(o){for(e in this._hostBuilder=i.Chatty.createHost(t),this._builder.handlers)for(n=function(t){r._hostBuilder.on(e,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(f._client,e)}))},r=this,s=0,a=this._builder.handlers[e];s<a.length;s++)u=a[s],n(u);for(c=0,l=this._builder.sandboxAttrs;c<l.length;c++)h=l[c],this._hostBuilder.withSandboxAttribute(h);return this._host=this._hostBuilder.frameBorder(this._builder.frameBorder).withTargetOrigin(this.targetOrigin).appendTo(this._builder.el).build(),this._builder.classNames.length&&(d=this._host.iframe.classList).add.apply(d,this._builder.classNames),[2,this._host.connect().then((function(t){return f._client=new f._builder.clientConstructor(t),f._client}))]}))}))},t.prototype.createUrl=function(){return r(this,void 0,void 0,(function(){var t,e,n,i,s,a,u=this;return o(this,(function(c){if(t=this._builder.embedUrl,!(null==(e=this._builder.auth)?void 0:e.url))return[2,""+this._builder.apiHost+t];if(n=e.url+"?src="+encodeURIComponent(t),e.params)for(i=0,s=e.params;i<s.length;i++)a=s[i],n+="&"+encodeURIComponent(a.name)+"="+encodeURIComponent(a.value);return[2,new Promise((function(t,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),e.withCredentials&&(r.withCredentials=e.withCredentials),r.setRequestHeader("Cache-Control","no-cache"),e.headers)for(s=0,a=e.headers;s<a.length;s++)u=a[s],r.setRequestHeader(u.name,u.value);return r.onload=function(){200===r.status?t(JSON.parse(r.responseText).url):i(r.statusText)},r.onerror=function(){return i(r.statusText)},r.send(),[2]}))}))}))]}))}))},t.prototype.connect=function(){return r(this,void 0,void 0,(function(){var t=this;return o(this,(function(e){return this._connection||(this._builder.url?this._connection=this.createIframe(this._builder.url):this._connection=this.createUrl().then((function(e){return r(t,void 0,void 0,(function(){return o(this,(function(t){return[2,this.createIframe(e)]}))}))}))),[2,this._connection]}))}))},t}();e.EmbedClient=a},211:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){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=e.call(t,s)}catch(t){i=[6,t],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(e,"__esModule",{value:!0}),e.LookerEmbedBase=void 0;var o=function(){function t(t){this._host=t}return t.prototype.send=function(t,e){this._host.send(t,e)},t.prototype.sendAndReceive=function(t,e){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this._host.sendAndReceive(t,e)]}))}))},t}();e.LookerEmbedBase=o},886:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedBuilder=void 0;var r=n(354);function o(t){return t.replace(/,/g,"^,")}var i=function(){function t(t,e,n,r){if(this._hostSettings=t,this._type=e,this._endpoint=n,this._clientConstructor=r,this._handlers={},this._appendTo=null,this._sandboxAttrs=[],this._classNames=[],this._frameBorder="0",this._suffix="",this.sandboxedHost)this._params={embed_domain:this._hostSettings.apiHost,sdk:"2",sandboxed_host:"true"};else{var o=window.location.origin;this._params={embed_domain:o,sdk:"2"}}}return t.prototype.withFrameBorder=function(t){return this._frameBorder=t,this},t.prototype.withId=function(t){return this._id=t,this},t.prototype.withParams=function(t){for(var e in t)this._params[e]=t[e];return this},t.prototype.withFilters=function(t,e){if(void 0===e&&(e=!1),"dashboard"===this.type)for(var n in t)this._params[n]=e?o(t[n]):t[n];else for(var n in t)this._params["f["+n+"]"]=e?o(t[n]):t[n];return this},t.prototype.withSandboxAttr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._sandboxAttrs=this._sandboxAttrs.concat(t),this},t.prototype.withClassName=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._classNames=this._classNames.concat(t),this},t.prototype.withNext=function(t){return void 0===t&&(t="-next"),this._suffix=t,this._endpoint+=this._suffix,this},t.prototype.withTheme=function(t){return this._params.theme=t,this},t.prototype.withApiHost=function(t){if(this._hostSettings.apiHost){if(this._hostSettings.apiHost!==t)throw new Error("not allowed to change api host")}else this._hostSettings.apiHost=t,this.sandboxedHost&&(this._params.embed_domain=t,this._params.sandboxed_host="true");return this},t.prototype.withAuthUrl=function(t){var e;if(null===(e=this._hostSettings.auth)||void 0===e?void 0:e.url){if(this._hostSettings.auth.url!==t)throw new Error("not allowed to change auth url")}else this._hostSettings.auth={url:t};return this},t.prototype.withAuth=function(t){if(this._hostSettings.auth){if(this._hostSettings.auth!==t)throw new Error("not allowed to change auth")}else this._hostSettings.auth=t;return this},t.prototype.withUrl=function(t){return this._url=t,this},Object.defineProperty(t.prototype,"sandboxedHost",{get:function(){if(void 0===this._sandboxedHost){var t=window.location.origin;this._sandboxedHost="null"===t||!t}return this._sandboxedHost},set:function(t){this._sandboxedHost=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"frameBorder",{get:function(){return this._frameBorder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"apiHost",{get:function(){return this._hostSettings.apiHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authUrl",{get:function(){var t;return null===(t=this._hostSettings.auth)||void 0===t?void 0:t.url},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"auth",{get:function(){return this._hostSettings.auth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"embedUrl",{get:function(){var t=function(t){var e=[];for(var n in t)e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.join("&")}(this._params);return this.endpoint+"/"+this.id+"?"+t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNames",{get:function(){return this._classNames},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suffix",{get:function(){return this._suffix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientConstructor",{get:function(){return this._clientConstructor},enumerable:!1,configurable:!0}),t.prototype.appendTo=function(t){return this._appendTo="string"==typeof t?document.querySelector(t):t,this},t.prototype.on=function(t,e){return this._handlers[t]=this._handlers[t]?this._handlers[t]:[],this._handlers[t].push(e),this},t.prototype.build=function(){return new r.EmbedClient(this)},t}();e.EmbedBuilder=i},662:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.LookerEmbedExplore=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.run=function(){this.send("look:run")},e.prototype.updateFilters=function(t){this.send("look:filters:update",{filters:t})},e}(n(211).LookerEmbedBase);e.LookerEmbedExplore=i},438:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.LookerEmbedExtension=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(n(211).LookerEmbedBase);e.LookerEmbedExtension=i},433:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.LookerEmbedSDK=void 0;var i=n(886),s=n(711),a=n(662),u=n(438),c=n(684);o(n(924),e);var l=function(){function t(){}return t.init=function(t,e){this.apiHost=t,this.auth="string"==typeof e?{url:e}:e},t.createDashboardWithUrl=function(t){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withUrl(t)},t.createDashboardWithId=function(t){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withId(t)},t.createExploreWithUrl=function(t){return new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withUrl(t)},t.createExploreWithId=function(t){return t=t.replace("::","/"),new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withId(t)},t.createLookWithUrl=function(t){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withUrl(t)},t.createLookWithId=function(t){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withId(t)},t.createExtensionWithUrl=function(t){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withUrl(t)},t.createExtensionWithId=function(t){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withId(t)},t}();e.LookerEmbedSDK=l},684:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.LookerEmbedLook=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.run=function(){this.send("look:run")},e.prototype.updateFilters=function(t){this.send("look:filters:update",{filters:t})},e}(n(211).LookerEmbedBase);e.LookerEmbedLook=i},924:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},227:(t,e,n)=>{function r(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t}(e=t.exports=n(658)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))})),t.splice(i,0,r)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=r,e.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+)/))},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(r())},658:(t,e,n)=>{var r;function o(t){function n(){if(n.enabled){var t=n,o=+new Date,i=o-(r||o);t.diff=i,t.prev=r,t.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.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=e.formatters[r];if("function"==typeof o){var i=s[u];n=o.call(t,i),s.splice(u,1),u--}return n})),e.formatArgs.call(t,s);var c=n.log||e.log||console.log.bind(console);c.apply(t,s)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),"function"==typeof e.init&&e.init(n),n}(e=t.exports=o.debug=o.default=o).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];for(var n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(t=n[o].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(824),e.names=[],e.skips=[],e.formatters={}},310:(t,e,n)=>{"use strict";t.exports=n(702).polyfill()},702:function(t,e,n){t.exports=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,o=void 0,i=void 0,s=function(t,e){f[r]=t,f[r+1]=e,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 t=setTimeout;return function(){return t(p,1)}}var f=new Array(1e3);function p(){for(var t=0;t<r;t+=2)(0,f[t])(f[t+1]),f[t]=void 0,f[t+1]=void 0;r=0}var y,b,_,g,v=void 0;function m(t,e){var n=this,r=new this.constructor(x);void 0===r[C]&&B(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return T(o,r,i,n._result)}))}else A(n,r,t,e);return r}function w(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(x);return E(e,t),e}v=l?function(){return process.nextTick(p)}:c?(b=0,_=new c(p),g=document.createTextNode(""),_.observe(g,{characterData:!0}),function(){g.data=b=++b%2}):h?((y=new MessageChannel).port1.onmessage=p,function(){return y.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(o=t.runOnLoop||t.runOnContext)?function(){o(p)}:d()}catch(t){return d()}}():d();var C=Math.random().toString(36).substring(2);function x(){}var O=void 0;function k(e,n,r){n.constructor===e.constructor&&r===m&&n.constructor.resolve===w?function(t,e){1===e._state?j(t,e._result):2===e._state?P(t,e._result):A(e,void 0,(function(e){return E(t,e)}),(function(e){return P(t,e)}))}(e,n):void 0===r?j(e,n):t(r)?function(t,e,n){s((function(t){var r=!1,o=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,(function(n){r||(r=!0,e!==n?E(t,n):j(t,n))}),(function(e){r||(r=!0,P(t,e))}),t._label);!r&&o&&(r=!0,P(t,o))}),t)}(e,n,r):j(e,n)}function E(t,e){if(t===e)P(t,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=e),null===r||"object"!==o&&"function"!==o)j(t,e);else{var n=void 0;try{n=e.then}catch(e){return void P(t,e)}k(t,e,n)}var r,o}function M(t){t._onerror&&t._onerror(t._result),S(t)}function j(t,e){t._state===O&&(t._result=e,t._state=1,0!==t._subscribers.length&&s(S,t))}function P(t,e){t._state===O&&(t._state=2,t._result=e,s(M,t))}function A(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+1]=n,o[i+2]=r,0===i&&t._state&&s(S,t)}function S(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?T(n,r,o,i):o(i);t._subscribers.length=0}}function T(e,n,r,o){var i=t(r),s=void 0,a=void 0,u=!0;if(i){try{s=r(o)}catch(t){u=!1,a=t}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?E(n,s):!1===u?P(n,a):1===e?j(n,s):2===e&&P(n,s))}var H=0;function B(t){t[C]=H++,t._state=void 0,t._result=void 0,t._subscribers=[]}var R=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(x),this.promise[C]||B(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&j(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===O&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=void 0,i=void 0,s=!1;try{o=t.then}catch(t){s=!0,i=t}if(o===m&&t._state!==O)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===L){var a=new n(x);s?P(a,i):k(a,t,o),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===O&&(this._remaining--,2===t?P(r,n):this._result[e]=n),0===this._remaining&&j(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;A(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}();var L=function(){function e(t){this[C]=H++,this._result=this._state=void 0,this._subscribers=[],x!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){E(t,e)}),(function(e){P(t,e)}))}catch(e){P(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();return L.prototype.then=m,L.all=function(t){return new R(this,t).promise},L.race=function(t){var n=this;return e(t)?new n((function(e,r){for(var o=t.length,i=0;i<o;i++)n.resolve(t[i]).then(e,r)})):new n((function(t,e){return e(new TypeError("You must pass an array to race."))}))},L.resolve=w,L.reject=function(t){var e=new this(x);return P(e,t),e},L._setScheduler=function(t){i=t},L._setAsap=function(t){s=t},L._asap=s,L.polyfill=function(){var t=void 0;if(void 0!==n.g)t=n.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=L},L.Promise=L,L}()},824:t=>{var e=1e3,n=60*e,r=60*n,o=24*r;function i(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,s){s=s||{};var a,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).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(t);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*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===u&&!1===isNaN(t))return s.long?i(a=t,o,"day")||i(a,r,"hour")||i(a,n,"minute")||i(a,e,"second")||a+" ms":function(t){return t>=o?Math.round(t/o)+"d":t>=r?Math.round(t/r)+"h":t>=n?Math.round(t/n)+"m":t>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[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(t){if("object"==typeof window)return window}}(),n(433)})()})); |
@@ -15,3 +15,3 @@ import { LookerDashboardOptions, LookerEmbedFilterParams } from './types'; | ||
* | ||
* Requires Looker 7.14 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.14 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
*/ | ||
@@ -34,3 +34,3 @@ stop(): void; | ||
* | ||
* Requires Looker 7.18 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.18 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
*/ | ||
@@ -40,3 +40,3 @@ openScheduleDialog(): Promise<void>; | ||
* Convenience method for loading a new dashboard. | ||
* Requires Looker 7.12 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.12 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
* Throws an error if the dashboard load did not happen, which can happen if the | ||
@@ -43,0 +43,0 @@ * current dashboard is in edit mode. |
@@ -95,3 +95,3 @@ "use strict"; | ||
* | ||
* Requires Looker 7.14 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.14 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
*/ | ||
@@ -120,3 +120,3 @@ LookerEmbedDashboard.prototype.stop = function () { | ||
* | ||
* Requires Looker 7.18 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.18 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
*/ | ||
@@ -132,3 +132,3 @@ LookerEmbedDashboard.prototype.openScheduleDialog = function () { | ||
* Convenience method for loading a new dashboard. | ||
* Requires Looker 7.12 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.12 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
* Throws an error if the dashboard load did not happen, which can happen if the | ||
@@ -135,0 +135,0 @@ * current dashboard is in edit mode. |
@@ -113,5 +113,17 @@ import { LookerEmbedBase } from './embed_base'; | ||
title: string; | ||
listen: string; | ||
listen: Record<string, string | null>; | ||
} | ||
/** | ||
* Dashboard tile status | ||
* | ||
* Available on Dashboards Next | ||
* | ||
* Requires Looker 21.14 | ||
*/ | ||
export interface TileStatus { | ||
tileId: string; | ||
status: 'error' | 'complete'; | ||
errors?: Array<QueryError>; | ||
} | ||
/** | ||
* Dashboard event | ||
@@ -122,4 +134,21 @@ */ | ||
status?: 'complete' | 'error' | 'stopped'; | ||
tileStatuses: Array<TileStatus>; | ||
} | ||
/** | ||
* Query error detail | ||
* | ||
* Requires Looker 21.14 | ||
*/ | ||
export interface QueryError { | ||
message: string | null; | ||
message_details: string | null; | ||
params: string | null; | ||
error_pos: string | null; | ||
level: string; | ||
fatal?: boolean; | ||
sql_error_loc: { | ||
[key: string]: any; | ||
}; | ||
} | ||
/** | ||
* Dashboard tile event | ||
@@ -132,2 +161,3 @@ */ | ||
truncated?: boolean; | ||
errors?: Array<QueryError>; | ||
} | ||
@@ -200,2 +230,20 @@ /** | ||
/** | ||
* Look save event details | ||
* Looker version 21.6 | ||
*/ | ||
export interface LookSaveEventDetail extends LookEventDetail { | ||
/** | ||
* Folder Look is associated with | ||
* Looker version 21.8 | ||
*/ | ||
spaceId: number; | ||
} | ||
/** | ||
* Look save event | ||
* Looker version 21.6 | ||
*/ | ||
export interface LookSaveEvent extends LookerEmbedEvent { | ||
look: LookSaveEventDetail; | ||
} | ||
/** | ||
* Explore page event details | ||
@@ -241,3 +289,3 @@ */ | ||
/** | ||
* Current Looker embed events as of version 6.20 | ||
* Current Looker embed events as of version 6.20 (except where stated) | ||
*/ | ||
@@ -248,2 +296,12 @@ export interface LookerEmbedEventMap { | ||
'dashboard:filters:changed': (this: LookerEmbedDashboard, event: DashboardEvent) => void; | ||
/** | ||
* Dashboard saved event | ||
* Looker 21.6 | ||
*/ | ||
'dashboard:save:complete': (this: LookerEmbedDashboard, event: DashboardEvent) => void; | ||
/** | ||
* Dashboard deleted event | ||
* Looker 21.6 | ||
*/ | ||
'dashboard:delete:complete': (this: LookerEmbedDashboard, event: DashboardEvent) => void; | ||
'dashboard:tile:start': (this: LookerEmbedDashboard, event: DashboardTileEvent) => void; | ||
@@ -262,2 +320,12 @@ 'dashboard:tile:complete': (this: LookerEmbedDashboard, event: DashboardTileEvent) => void; | ||
'look:run:complete': (this: LookerEmbedLook, event: LookEvent) => void; | ||
/** | ||
* Look saved event | ||
* Looker 21.6 | ||
*/ | ||
'look:save:complete': (this: LookerEmbedLook, event: LookSaveEvent) => void; | ||
/** | ||
* Look deleted event | ||
* Looker 21.6 | ||
*/ | ||
'look:delete:complete': (this: LookerEmbedLook, event: LookSaveEvent) => void; | ||
'look:ready': (this: LookerEmbedLook, event: LookEvent) => void; | ||
@@ -264,0 +332,0 @@ 'look:state:changed': (this: LookerEmbedLook, event: LookEvent) => void; |
{ | ||
"name": "@looker/embed-sdk", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "A toolkit for embedding Looker", | ||
@@ -26,3 +26,3 @@ "main": "lib/index.js", | ||
"lint-fix": "tslint --fix --project tsconfig-lint.json --format stylish", | ||
"start": "npm run build_utils && webpack-dev-server --config webpack-devserver.config.js --hot --inline --color --progress", | ||
"start": "npm run build_utils && webpack serve --config webpack-devserver.config.js --hot --inline --color --progress", | ||
"prepare": "npm run build", | ||
@@ -53,3 +53,3 @@ "prepublishOnly": "npm run test-once", | ||
"jasmine-core": "^2.8.0", | ||
"karma": "^5.1.0", | ||
"karma": "^6.3.4", | ||
"karma-chrome-launcher": "^2.2.0", | ||
@@ -67,5 +67,5 @@ "karma-jasmine": "^1.1.1", | ||
"typescript": "^3.9.7", | ||
"webpack": "^4.29.5", | ||
"webpack-cli": "^3.3.12", | ||
"webpack-dev-server": "^3.11.0", | ||
"webpack": "^5.45.1", | ||
"webpack-cli": "^4.7.2", | ||
"webpack-dev-server": "^3.11.2", | ||
"xhr-mock": "^2.5.1" | ||
@@ -72,0 +72,0 @@ }, |
@@ -45,3 +45,3 @@ /* | ||
* | ||
* Requires Looker 7.14 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.14 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
*/ | ||
@@ -76,3 +76,3 @@ | ||
* | ||
* Requires Looker 7.18 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.18 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
*/ | ||
@@ -86,3 +86,3 @@ | ||
* Convenience method for loading a new dashboard. | ||
* Requires Looker 7.12 and Dashboards (Beta) (see [[EmbedBuilder.withNext]]). | ||
* Requires Looker 7.12 and Dashboards Next (see [[EmbedBuilder.withNext]]). | ||
* Throws an error if the dashboard load did not happen, which can happen if the | ||
@@ -89,0 +89,0 @@ * current dashboard is in edit mode. |
103
src/types.ts
@@ -34,4 +34,4 @@ /* | ||
url: string | ||
headers?: Array<{name: string, value: string}> | ||
params?: Array<{name: string, value: string}> | ||
headers?: Array<{ name: string; value: string }> | ||
params?: Array<{ name: string; value: string }> | ||
withCredentials?: boolean | ||
@@ -155,6 +155,20 @@ } | ||
title: string | ||
listen: string | ||
listen: Record<string, string | null> | ||
} | ||
/** | ||
* Dashboard tile status | ||
* | ||
* Available on Dashboards Next | ||
* | ||
* Requires Looker 21.14 | ||
*/ | ||
export interface TileStatus { | ||
tileId: string | ||
status: 'error' | 'complete' | ||
errors?: Array<QueryError> | ||
} | ||
/** | ||
* Dashboard event | ||
@@ -165,7 +179,28 @@ */ | ||
dashboard: DashboardEventDetail | ||
/// Available on Dashboards Beta | ||
/// Available on Dashboards Next | ||
status?: 'complete' | 'error' | 'stopped' | ||
/// Available on Dashboards Next | ||
/// Requires Looker 21.14 | ||
tileStatuses: Array<TileStatus> | ||
} | ||
/** | ||
* Query error detail | ||
* | ||
* Requires Looker 21.14 | ||
*/ | ||
export interface QueryError { | ||
message: string | null | ||
message_details: string | null | ||
params: string | null | ||
error_pos: string | null | ||
level: string | ||
fatal?: boolean | ||
sql_error_loc: { | ||
[key: string]: any | ||
} | ||
} | ||
/** | ||
* Dashboard tile event | ||
@@ -177,6 +212,9 @@ */ | ||
tile: DashboardTileEventDetail | ||
/// Available on Dashboards Beta | ||
/// Available on Dashboards Next | ||
status?: 'complete' | 'error' | ||
/// Available on Dashboards Beta | ||
/// Available on Dashboards Next | ||
truncated?: boolean | ||
/// Available on Dashboards Next | ||
/// Requires Looker 21.14 | ||
errors?: Array<QueryError> | ||
} | ||
@@ -264,2 +302,23 @@ | ||
/** | ||
* Look save event details | ||
* Looker version 21.6 | ||
*/ | ||
export interface LookSaveEventDetail extends LookEventDetail { | ||
/** | ||
* Folder Look is associated with | ||
* Looker version 21.8 | ||
*/ | ||
spaceId: number | ||
} | ||
/** | ||
* Look save event | ||
* Looker version 21.6 | ||
*/ | ||
export interface LookSaveEvent extends LookerEmbedEvent { | ||
look: LookSaveEventDetail | ||
} | ||
/** | ||
* Explore page event details | ||
@@ -316,3 +375,3 @@ */ | ||
/** | ||
* Current Looker embed events as of version 6.20 | ||
* Current Looker embed events as of version 6.20 (except where stated) | ||
*/ | ||
@@ -324,7 +383,23 @@ | ||
'dashboard:filters:changed': (this: LookerEmbedDashboard, event: DashboardEvent) => void | ||
/** | ||
* Dashboard saved event | ||
* Looker 21.6 | ||
*/ | ||
'dashboard:save:complete': (this: LookerEmbedDashboard, event: DashboardEvent) => void | ||
/** | ||
* Dashboard deleted event | ||
* Looker 21.6 | ||
*/ | ||
'dashboard:delete:complete': (this: LookerEmbedDashboard, event: DashboardEvent) => void | ||
'dashboard:tile:start': (this: LookerEmbedDashboard, event: DashboardTileEvent) => void | ||
'dashboard:tile:complete': (this: LookerEmbedDashboard, event: DashboardTileEvent) => void | ||
'dashboard:tile:download': (this: LookerEmbedDashboard, event: DashboardTileDownloadEvent) => void | ||
'dashboard:tile:explore': (this: LookerEmbedDashboard, event: DashboardTileExploreEvent) => CancellableEventResponse | undefined | ||
'dashboard:tile:view': (this: LookerEmbedDashboard, event: DashboardTileViewEvent) => CancellableEventResponse | undefined | ||
'dashboard:tile:explore': ( | ||
this: LookerEmbedDashboard, | ||
event: DashboardTileExploreEvent | ||
) => CancellableEventResponse | undefined | ||
'dashboard:tile:view': ( | ||
this: LookerEmbedDashboard, | ||
event: DashboardTileViewEvent | ||
) => CancellableEventResponse | undefined | ||
@@ -341,2 +416,12 @@ 'drillmenu:click': (this: LookerEmbedBase, event: DrillMenuEvent) => CancellableEventResponse | undefined | ||
'look:run:complete': (this: LookerEmbedLook, event: LookEvent) => void | ||
/** | ||
* Look saved event | ||
* Looker 21.6 | ||
*/ | ||
'look:save:complete': (this: LookerEmbedLook, event: LookSaveEvent) => void | ||
/** | ||
* Look deleted event | ||
* Looker 21.6 | ||
*/ | ||
'look:delete:complete': (this: LookerEmbedLook, event: LookSaveEvent) => void | ||
'look:ready': (this: LookerEmbedLook, event: LookEvent) => void | ||
@@ -343,0 +428,0 @@ 'look:state:changed': (this: LookerEmbedLook, event: LookEvent) => void |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172107
32
3208
1
80
25
0
0
0
1