amazon-quicksight-embedding-sdk
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -0,1 +1,4 @@ | ||
**2.3.1** | ||
* Minor bug fixes | ||
**2.3.0** | ||
@@ -2,0 +5,0 @@ * Support setting, adding, removing visual actions on runtime |
import { BuildExperienceUrlOptions, TargetedMessageEvent, InternalExperience, PostMessageEvent, UrlInfo } from '../types'; | ||
declare const SDK_VERSION = "2.3.0"; | ||
declare const SDK_VERSION = "2.3.1"; | ||
declare const FRAME_TIMEOUT = 60000; | ||
@@ -4,0 +4,0 @@ declare const isMessageEvent: (messageEvent: TargetedMessageEvent) => messageEvent is TargetedMessageEvent; |
@@ -65,3 +65,3 @@ "use strict"; | ||
var punycode_1 = require("punycode"); | ||
var SDK_VERSION = '2.3.0'; | ||
var SDK_VERSION = '2.3.1'; | ||
exports.SDK_VERSION = SDK_VERSION; | ||
@@ -68,0 +68,0 @@ var FRAME_TIMEOUT = 60000; |
/*! For license information please see quicksight-embedding-js-sdk.min.js.LICENSE.txt */ | ||
(()=>{var e={174:(e,t,r)=>{var n=r(388);r(672).QuickSightEmbedding=n,e.exports=n},672:(e,t,r)=>{"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==r.g)return r.g}return e}()},388:(e,t,r)=>{"use strict";r.r(t),r.d(t,{QSE:()=>n,SDK_VERSION:()=>L,createEmbeddingContext:()=>ke});var n={};function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}r.r(n);var u=r(687),s=r.n(u);const l={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let f;const p=new Uint8Array(16);function d(){if(!f&&(f="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!f))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(p)}const v=[];for(let e=0;e<256;++e)v.push((e+256).toString(16).slice(1));const h=function(e,t,r){if(l.randomUUID&&!t&&!e)return l.randomUUID();const n=(e=e||{}).random||(e.rng||d)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+"-"+v[e[t+4]]+v[e[t+5]]+"-"+v[e[t+6]]+v[e[t+7]]+"-"+v[e[t+8]]+v[e[t+9]]+"-"+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]).toLowerCase()}(n)},E=function(){var e=new Map,t=function(t,r){t&&"function"==typeof r&&(e.has(t)||e.set(t,[]),e.get(t).push(r))},r=function(t,r){e.has(t)&&e.get(t).forEach((function(e){e(r)}))},n=function(t,r){if(e.has(t)){var n=e.get(t).filter((function(e){return e!==r}));e.set(t,n)}};return{addEventListener:t,invokeEventListener:r,removeEventListener:n,experienceEventListenerBuilder:function(e,o){var i=function(r){return t(e,r)};return o&&i(o),{addExperienceEventListener:i,invokeExperienceEventListener:function(t){return r(e,t)},removeExperienceEventListener:function(t){return n(e,t)}}}}};function m(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const g=2147483647,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=Math.floor,N=String.fromCharCode;function S(e){throw new RangeError(b[e])}const _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},T=function(e,t,r){let n=0;for(e=r?w(e/700):e>>1,e+=w(e/t);e>455;n+=36)e=w(e/35);return w(n+36*e/(e+38))},I=function(e){const t=[],r=(e=function(e){const t=[];let r=0;const n=e.length;for(;r<n;){const o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&o)<<10)+(1023&n)+65536):(t.push(o),r--)}else t.push(o)}return t}(e)).length;let n=128,o=0,i=72;for(const r of e)r<128&&t.push(N(r));const a=t.length;let c=a;for(a&&t.push("-");c<r;){let r=g;for(const t of e)t>=n&&t<r&&(r=t);const u=c+1;r-n>w((g-o)/u)&&S("overflow"),o+=(r-n)*u,n=r;for(const r of e)if(r<n&&++o>g&&S("overflow"),r===n){let e=o;for(let r=36;;r+=36){const n=r<=i?1:r>=i+26?26:r-i;if(e<n)break;const o=e-n,a=36-n;t.push(N(_(n+o%a,0))),e=w(o/a)}t.push(N(_(e,0))),i=T(o,u,c===a),o=0,++c}++o,++n}return t.join("")};var A=["parameters"];function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var L="2.3.0",C=6e4,D=function(e){var t=/^(https:\/\/[^/]+)\/(embedding|embed)\/([^/]+)\/[^?]+\?(.*)/i.exec(e)||[];if((null==t?void 0:t.length)<4)throw'Invalid embedding url: "'.concat(e,'"');return{guid:t[3],host:t[1],urlSearchParams:new URLSearchParams(t[4])}};function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var U=function(e){return e.CALLBACK_OPERATION_INVOKED="CALLBACK_OPERATION_INVOKED",e.CONTENT_LOADED="CONTENT_LOADED",e.EXPERIENCE_INITIALIZED="EXPERIENCE_INITIALIZED",e.ERROR_OCCURRED="ERROR_OCCURRED",e.SIZE_CHANGED="SIZE_CHANGED",e.PARAMETERS_CHANGED="PARAMETERS_CHANGED",e.SELECTED_SHEET_CHANGED="SELECTED_SHEET_CHANGED",e.MODAL_OPENED="MODAL_OPENED",e.Q_SEARCH_CLOSED="Q_SEARCH_CLOSED",e.Q_SEARCH_OPENED="Q_SEARCH_OPENED",e.Q_SEARCH_SIZE_CHANGED="Q_SEARCH_SIZE_CHANGED",e.Q_SEARCH_ENTERED_FULLSCREEN="Q_SEARCH_ENTERED_FULLSCREEN",e.Q_SEARCH_EXITED_FULLSCREEN="Q_SEARCH_EXITED_FULLSCREEN",e}({}),k=function(e){return e.SET_PARAMETERS="SET_PARAMETERS",e.SET_SELECTED_SHEET_ID="SET_SELECTED_SHEET_ID",e.SET_Q_SEARCH_QUESTION="SET_Q_SEARCH_QUESTION",e.SET_CONTENT_OPTIONS="SET_CONTENT_OPTIONS",e.SET_VISUAL_ACTIONS="SET_VISUAL_ACTIONS",e.ADD_VISUAL_ACTIONS="ADD_VISUAL_ACTIONS",e.REMOVE_VISUAL_ACTIONS="REMOVE_VISUAL_ACTIONS",e}({}),M=function(e){return e.GET_PARAMETERS="GET_PARAMETERS",e.GET_SHEETS="GET_SHEETS",e.GET_SHEET_VISUALS="GET_SHEET_VISUALS",e.GET_VISUAL_ACTIONS="GET_VISUAL_ACTIONS",e.GET_SELECTED_SHEET_ID="GET_SELECTED_SHEET_ID",e}({}),V=function(e){return e.ACKNOWLEDGE="ACKNOWLEDGE",e.INITIATE_PRINT="INITIATE_PRINT",e.NAVIGATE_TO_DASHBOARD="NAVIGATE_TO_DASHBOARD",e.CLOSE_Q_SEARCH="CLOSE_Q_SEARCH",e.UNDO="UNDO",e.REDO="REDO",e.RESET="RESET",e.TOGGLE_BOOKMARKS_PANE="TOGGLE_BOOKMARKS_PANE",e}({}),G=P(P(P(P({},U),k),M),V),H=function(e){return e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e}({}),F=function(e){return e.FRAME_STARTED="FRAME_STARTED",e.FRAME_MOUNTED="FRAME_MOUNTED",e.FRAME_LOADED="FRAME_LOADED",e}({}),Q=function(e){return e.FRAME_NOT_CREATED="FRAME_NOT_CREATED",e.NO_BODY="NO_BODY",e.NO_CONTAINER="NO_CONTAINER",e.INVALID_CONTAINER="INVALID_CONTAINER",e.NO_URL="NO_URL",e.INVALID_URL="INVALID_URL",e.NO_FRAME_OPTIONS="NO_FRAME_OPTIONS",e.INVALID_FRAME_OPTIONS="INVALID_FRAME_OPTIONS",e}({}),B=function(e){return e.UNRECOGNIZED_CONTENT_OPTIONS="UNRECOGNIZED_CONTENT_OPTIONS",e.UNRECOGNIZED_FRAME_OPTIONS="UNRECOGNIZED_FRAME_OPTIONS",e.UNRECOGNIZED_EVENT_TARGET="UNRECOGNIZED_EVENT_TARGET",e}({}),z=P(P(P({},F),Q),B),Z=function(e){return e.CONSOLE="CONSOLE",e.CONTEXT="CONTEXT",e.CONTROL="CONTROL",e.VISUAL="VISUAL",e.DASHBOARD="DASHBOARD",e.QSEARCH="QSEARCH",e}({}),W="quicksight-embedding-iframe",q=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach((function(e){var t=y(e,2),r=t[0],n=t[1];return o.setAttribute(r,n)})),Object.entries(r).forEach((function(e){var t=y(e,2),r=t[0],n=t[1];return o.style.setProperty(r,n)})),n.forEach((function(e){return o.appendChild(e)})),o};function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Y=function(e){var t,r=e.frameOptions,n=e.contentOptions,a=e.transformedContentOptions,u=e.controlOptions,l=e.internalExperience,f=e.experienceIdentifier,p=e.interceptMessage,d=r.url,v=r.container,E=r.width,m=void 0===E?"100%":E,O=r.height,g=void 0===O?"100%":O,b=r.withIframePlaceholder,w=r.className,N=r.onChange,S=null,_=function(e){"function"==typeof N&&N(e,{frame:S})};if(!v){var T="Container is required for the experience";throw _({eventName:z.NO_CONTAINER,eventLevel:H.ERROR,message:T,data:{experience:l}}),new Error(T)}if("string"==typeof v)try{t=document.querySelector(v)}catch(e){var R=e.message;throw _({eventName:z.INVALID_CONTAINER,eventLevel:H.ERROR,message:R,data:{experience:l}}),e}else"object"===i(v)&&v.nodeName&&(t=v);if(!t){var D="Invalid container '".concat(v,"' for the experience");throw _({eventName:z.INVALID_CONTAINER,eventLevel:H.ERROR,message:D,data:{experience:l}}),new Error(D)}var j,P=u.eventManager,U=u.sendToControlFrame,k=u.timeout,M=void 0===k?C:k,V=(n||{}).onMessage,F=(0,P.experienceEventListenerBuilder)(f,(function(e){e.eventName;var t={frame:S};p&&p(e,t),null==V||V(e,t)})),Q=F.addExperienceEventListener,B=F.removeExperienceEventListener;if(!d)throw _({eventName:z.NO_URL,eventLevel:H.ERROR,message:"Url is required for the experience",data:{experience:l}}),new Error("Url is required for the experience");j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.parameters,a=o(t,A),c=r.contextId,u=r.discriminator,s=[],l=function(e){if(!e||"object"!==i(e))return"";var t=Object.entries(e).reduce((function(e,t){var r=y(t,2),n=r[0],o=r[1];return null!=o&&(e[n]="".concat(o)),e}),{punyCodeEmbedOrigin:I("".concat(window.location.origin,"/"))});return new URLSearchParams(t).toString()}(x(x({},a),{},{contextId:c,discriminator:u,clientTime:Date.now(),sdkVersion:L}));l&&s.push(l);var f=function(e){return e&&"object"===i(e)?Object.entries(e).map((function(e){var t=y(e,2),r=t[0],n=t[1],o=[].concat(n),i=encodeURIComponent(r);return o.map((function(e){return encodeURIComponent(e)})).map((function(e){return"p.".concat(i,"=").concat(e)})).join("&")})).join("&"):""}(n);f&&s.push(f);var p=s.join("#"),d="string"==typeof e?e:e.toString();return[d,p].join(d.includes("?")?"&":"?")}(d,a,l);var Z,K=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h(),n=X(X({},t),{},{eventId:r,timestamp:Date.now(),version:L}),S.contentWindow.postMessage(n,j),t.eventName!==G.ACKNOWLEDGE){e.next=5;break}return e.abrupt("return",Promise.resolve({success:!0}));case 5:return e.abrupt("return",new Promise((function(e,t){var n=function t(n){n.data.eventId===r&&(window.removeEventListener("message",t),e(n.data.message))};window.addEventListener("message",n),setTimeout((function(){window.removeEventListener("message",n),t()}),5e3)})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=c(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=U||K,e.abrupt("return",r(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Z=setTimeout((function(){throw _({eventName:z.FRAME_NOT_CREATED,eventLevel:H.ERROR,message:"Creating the frame timed out",data:{experience:l}}),new Error("Creating the frame timed out")}),M);var $=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z&&clearTimeout(Z),_({eventName:z.FRAME_LOADED,eventLevel:H.INFO,message:"The frame loaded",data:{experience:l}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();_({eventName:z.FRAME_STARTED,eventLevel:H.INFO,message:"Creating the frame",data:{experience:l}});try{S=function(e){var t,r,n=e.id,o=e.src,i=e.width,a=void 0===i?"0px":i,c=e.height,u=void 0===c?"0px":c,s=e.container,l=e.onLoad,f=e.loading,p=e.withIframePlaceholder,d=e.payload,v=e.className,h=n||"".concat(s.id,"-iframe");if(p){if((t=document.createElement("div")).id="".concat(h,"-placeholder"),t.style.width=a,t.style.backgroundColor="rgba(0,0,0,.01)",t.style.display="flex",t.style.justifyContent="center",t.style.alignItems="center",t.className="".concat(W,"-placeholder"),u.endsWith("px")&&(t.style.height=u),"boolean"!=typeof p)t.appendChild(p);else{var E=(r=[1,2,3].map((function(e){var t=q("animate",{attributeName:"opacity",dur:"1s",values:"0;1;0",repeatCount:"indefinite",begin:"".concat(e/10)});return q("circle",{fill:"#ccc",stroke:"none",cx:"".concat(20*e-14),cy:"50",r:"6"},void 0,[t])})),q("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0"},{width:"100px",height:"100px"},r));t.appendChild(E)}s.appendChild(t)}var m=[W];v&&m.push(v);var O,y=document.createElement("iframe");return y.className=m.join(" ").trim(),y.id=h,y.name=h,y.width=a,y.height=u,f&&(y.loading=f),y.style.border="0px",y.style.padding="0px",t&&(y.style.opacity="0",y.style.position="absolute"),"0px"===a&&"0px"===u&&(y.style.position="absolute"),s.appendChild(y),d?O=function(e){var t=e.src,r=e.container,n=e.target,o=e.payload;if(t&&r){var i=document.createElement("form");return i.style.visibility="hidden",i.method="POST",i.action=t,i.target=n,i.name="".concat(n,"-form"),Object.keys(o).forEach((function(e){var t=document.createElement("input");t.type="hidden",t.name=e,t.value=o[e],i.appendChild(t)})),r.appendChild(i),i.submit(),{remove:function(){i.remove()}}}}({src:o,target:y.name,container:s,payload:d}):y.src=o,y.addEventListener("load",(function(e){var r;t&&(t.remove(),y.style.position="",y.style.opacity="1",y.style.transition="opacity .5s ease-in-out"),"function"==typeof l&&l(e),null===(r=O)||void 0===r||r.remove()})),y}({id:f,src:j,width:m,height:g,container:t,onLoad:$,withIframePlaceholder:b,className:w})}catch(e){throw _({eventName:z.FRAME_NOT_CREATED,eventLevel:H.ERROR,message:"Failed to create the frame",data:{experience:l}}),e}return _({eventName:z.FRAME_MOUNTED,eventLevel:H.INFO,message:"The frame mounted",data:{frame:S,experience:l}}),{internalAddEventListener:function(e,t){var r=function(r,n){r.eventName===e&&t(r,n)};return Q(r),{remove:function(){B(r)}}},internalSend:Y,frame:S}};var $=["fitToIframeWidth","locale","parameters","onMessage"];function J(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const te=function(e,t,r,n){var i=e.url,a=e.resizeHeightOnSizeChangedEvent,u=e.onChange,l=(r||{}).contextId;if(!i){var f="Url is required for the experience";throw null==u||u({eventName:z.NO_URL,eventLevel:H.ERROR,message:f},{frame:null}),new Error(f)}var p=ne(i);if(!p)throw null==u||u({eventName:z.INVALID_URL,eventLevel:H.ERROR,message:"Invalid visual experience url",data:{url:i}},{frame:null}),new Error("Invalid visual experience url");var d=Re(p,n,l,oe),v=d.experienceIdentifier,h=d.internalExperience,E=Y({frameOptions:e,contentOptions:t,transformedContentOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fitToIframeWidth,r=e.locale,n=e.parameters,i=(e.onMessage,o(e,$)),a=Object.keys(i);Object.keys(i).length>0&&(null==u||u({eventName:z.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:H.WARN,message:"Visual content options contain unrecognized properties",data:{unrecognizedContentOptions:a}},{frame:null}),console.warn("Visual content options contain unrecognized properties"));var c={fitToIframeWidth:null==t||t,locale:r};return Array.isArray(n)&&(c.parameters=n.reduce((function(e,t){return e[t.Name]=t.Values,e}),{})),c}(t),controlOptions:r,internalExperience:h,experienceIdentifier:v,interceptMessage:function(e,t){"SIZE_CHANGED"===e.eventName&&a&&(t.frame.height="".concat(e.message.height,"px"))}}),m=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ee(ee({},t),{},{eventTarget:h}),e.next=3,E.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_PARAMETERS,message:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.RESET}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_VISUAL_ACTIONS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.ADD_VISUAL_ACTIONS,message:{Actions:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.REMOVE_VISUAL_ACTIONS,message:{Actions:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_VISUAL_ACTIONS,message:{Actions:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{setParameters:O,reset:y,getActions:g,addActions:b,removeActions:w,setActions:N,send:m,addEventListener:E.internalAddEventListener}};var re=function(e){return!!e&&e.experienceType===Z.VISUAL},ne=function(e){var t=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)\/sheets\/([\w-]+)\/visuals\/([\w-]+)(\?|$)/i.exec(e)||[];if(!(t.length<5))return{experienceType:Z.VISUAL,dashboardId:t[1],sheetId:t[2],visualId:t[3]}},oe=function(e){if(re(e))return[e.contextId,e.experienceType,e.dashboardId,e.sheetId,e.visualId,e.discriminator].filter(Boolean).join("-")},ie=["locale","onMessage"];function ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ue=function(e,t,r,n){var i=e.url,a=e.onChange,u=(r||{}).contextId;if(!i){var l="Url is required for the experience";throw null==a||a({eventName:z.NO_URL,eventLevel:H.ERROR,message:l},{frame:null}),new Error(l)}var f=le(i);if(!f)throw null==a||a({eventName:z.INVALID_URL,eventLevel:H.ERROR,message:"Invalid console experience url",data:{url:i}},{frame:null}),new Error("Invalid console experience url");var p=Re(f,n,u,fe),d=p.experienceIdentifier,v=p.internalExperience,h=Y({frameOptions:e,contentOptions:t,transformedContentOptions:function(e){var t=e.locale,r=(e.onMessage,o(e,ie)),n=Object.keys(r);return Object.keys(r).length>0&&(null==a||a({eventName:z.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:H.WARN,message:"Console content options contain unrecognized properties",data:{unrecognizedContentOptions:n}},{frame:null}),console.warn("Console content options contain unrecognized properties")),{locale:t}}(t),controlOptions:r,internalExperience:v,experienceIdentifier:d}),E=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ce(ce({},t),{},{eventTarget:v}),e.next=3,h.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{send:E,addEventListener:h.internalAddEventListener}};var se=function(e){return!!e&&e.experienceType===Z.CONSOLE},le=function(e){if(!((/^https:\/\/[^/]+\/embedding\/[^/]+\/(start(\/(favorites|dashboards|analyses))?|dashboards\/[\w-]+|analyses\/[\w-]+)(\?|$)/i.exec(e)||[]).length<5))return{experienceType:Z.CONSOLE}},fe=function(e){if(se(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")},pe=function(e){return!!e&&e.experienceType===Z.CONTEXT},de=["parameters","locale","attributionOptions","sheetOptions","toolbarOptions","onMessage"];function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ee=function(e,t,r,n){var i=e.url,a=e.onChange,u=(r||{}).contextId;if(!i){var l="Url is required for the experience";throw null==a||a({eventName:z.NO_URL,eventLevel:H.ERROR,message:l},{frame:null}),new Error(l)}var f=Oe(i);if(!f)throw null==a||a({eventName:z.INVALID_URL,eventLevel:H.ERROR,message:"Invalid dashboard experience url",data:{url:i}},{frame:null}),new Error("Invalid dashboard experience url");var p=Re(f,n,u,ye),d=p.experienceIdentifier,v=p.internalExperience,h=e.resizeHeightOnSizeChangedEvent,E=Y({frameOptions:e,contentOptions:t,transformedContentOptions:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.parameters,n=t.locale,i=t.attributionOptions,c=t.sheetOptions,u=t.toolbarOptions,s=(t.onMessage,o(t,de)),l=Object.keys(s);if(l.length>0){var f="Dashboard content options contain unrecognized properties";null==a||a({eventName:z.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:H.WARN,message:f,data:{unrecognizedContentOptions:l}},{frame:null}),console.warn(f)}var p={locale:n};return Array.isArray(r)&&(p.parameters=r.reduce((function(e,t){return e[t.Name]=t.Values,e}),{})),!0!==(null==i?void 0:i.overlayContent)&&(p.footerPaddingEnabled=!0),!0!==(null==u?void 0:u.export)&&!0!==(null==u||null===(e=u.export)||void 0===e?void 0:e.print)||(p.printEnabled=!0),!0!==(null==u?void 0:u.undoRedo)&&(p.undoRedoDisabled=!0),!0!==(null==u?void 0:u.reset)&&(p.resetDisabled=!0),!0===(null==u?void 0:u.bookmarks)&&(p.showBookmarksIcon=!0),null!=c&&c.initialSheetId&&(p.sheetId=c.initialSheetId),"boolean"==typeof(null==c?void 0:c.singleSheet)&&(p.sheetTabsDisabled=c.singleSheet),!0===(null==c?void 0:c.emitSizeChangedEventOnSheetChange)&&(p.resizeOnSheetChange=!0),p}(t),controlOptions:r,internalExperience:v,experienceIdentifier:d,interceptMessage:function(e,t){"SIZE_CHANGED"===e.eventName&&h&&(t.frame.height="".concat(e.message.height,"px"))}}),m=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=he(he({},t),{},{eventTarget:v}),e.next=3,E.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_PARAMETERS,message:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.INITIATE_PRINT}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.UNDO}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.REDO}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.TOGGLE_BOOKMARKS_PANE}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.RESET}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_PARAMETERS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_SHEETS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_SHEET_VISUALS,message:{SheetId:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=c(s().mark((function e(t,r){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_VISUAL_ACTIONS,message:{SheetId:t,VisualId:r}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),A=function(){var e=c(s().mark((function e(t,r,n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.ADD_VISUAL_ACTIONS,message:{SheetId:t,VisualId:r,Actions:n}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),R=function(){var e=c(s().mark((function e(t,r,n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.REMOVE_VISUAL_ACTIONS,message:{SheetId:t,VisualId:r,Actions:n}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),x=function(){var e=c(s().mark((function e(t,r,n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_VISUAL_ACTIONS,message:{SheetId:t,VisualId:r,Actions:n}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),L=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_SELECTED_SHEET_ID}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=c(s().mark((function e(t,r){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.NAVIGATE_TO_DASHBOARD,message:{DashboardId:t,Parameters:null==r?void 0:r.parameters}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),D=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_SELECTED_SHEET_ID,message:{SheetId:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{getParameters:S,getSheets:_,getSheetVisuals:T,getVisualActions:I,addVisualActions:A,removeVisualActions:R,setVisualActions:x,getSelectedSheetId:L,initiatePrint:y,navigateToDashboard:C,setSelectedSheetId:D,setParameters:O,undo:g,redo:b,reset:N,toggleBookmarksPane:w,send:m,addEventListener:E.internalAddEventListener}};var me=function(e){return!!e&&e.experienceType===Z.DASHBOARD},Oe=function(e){var t=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)(\?|$)/i.exec(e)||[];if(!(t.length<3))return{experienceType:Z.DASHBOARD,dashboardId:t[1]}},ye=function(e){if(me(e))return[e.contextId,e.experienceType,e.dashboardId,e.discriminator].filter(Boolean).join("-")},ge=["hideIcon","hideTopicName","theme","allowTopicSelection","onMessage"];function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ne=function(e,t,r,n){var i,a=e.url,u=e.onChange,l=(r||{}).contextId;if(!a){var f="Url is required for the experience";throw null==u||u({eventName:z.NO_URL,eventLevel:H.ERROR,message:f},{frame:null}),new Error(f)}var p=_e(a);if(!p)throw null==u||u({eventName:z.INVALID_URL,eventLevel:H.ERROR,message:"Invalid q search experience url",data:{url:a}},{frame:null}),new Error("Invalid q search experience url");var d=Re(p,n,l,Te),v=d.experienceIdentifier,h=d.internalExperience,E=Y({frameOptions:e,contentOptions:t,transformedContentOptions:function(e){var t=e.hideIcon,r=e.hideTopicName,n=e.theme,i=e.allowTopicSelection,a=(e.onMessage,o(e,ge)),c=Object.keys(a);Object.keys(a).length>0&&(null==u||u({eventName:z.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:H.WARN,message:"Q search content options contain unrecognized properties",data:{unrecognizedContentOptions:c}},{frame:null}),console.warn("Q search content options contain unrecognized properties"));var s={allowTopicSelection:i};return void 0!==t&&(s.qBarIconDisabled=t),void 0!==r&&(s.qBarTopicNameDisabled=r),void 0!==n&&(s.themeId=n),s}(t),controlOptions:r,internalExperience:h,experienceIdentifier:v,interceptMessage:function(e,t){switch(e.eventName){case G.Q_SEARCH_OPENED:case G.Q_SEARCH_CLOSED:t.frame.style.height="".concat(e.message.height,"px");break;case G.CONTENT_LOADED:window.addEventListener("click",(function(e){!E.frame.contains(e.target)&&y()}));break;case G.Q_SEARCH_ENTERED_FULLSCREEN:i={position:t.frame.style.position,top:t.frame.style.top,left:t.frame.style.left,zIndex:t.frame.style.zIndex,width:t.frame.style.width,height:t.frame.style.height},t.frame.style.position="fixed",t.frame.style.top="0px",t.frame.style.left="0px",t.frame.style.zIndex="2147483647",t.frame.style.width="100vw",t.frame.style.height="100vh";break;case G.Q_SEARCH_EXITED_FULLSCREEN:t.frame.style.position=i.position,t.frame.style.top=i.top,t.frame.style.left=i.left,t.frame.style.zIndex=i.zIndex,t.frame.style.width=i.width,t.frame.style.height=i.height}}}),m=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=we(we({},t),{},{eventTarget:h}),e.next=3,E.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_Q_SEARCH_QUESTION,message:{question:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){return m({eventName:G.CLOSE_Q_SEARCH})};return{setQuestion:O,close:y,send:m,addEventListener:E.internalAddEventListener}};var Se=function(e){return!!e&&e.experienceType===Z.QSEARCH},_e=function(e){if(!((/^https:\/\/[^/]+\/embedding\/[^/]+\/q\/search(\/|\?|$)/i.exec(e)||[]).length<2))return{experienceType:Z.QSEARCH}},Te=function(e){if(Se(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")};function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Re=function(e,t,r,n){var o,i,a=-1;do{a++,i=n(o=Ae(Ae({},e),{},{contextId:r,discriminator:a}))}while(t.has(i));if(i)return t.add(i),{experienceIdentifier:i,internalExperience:o}};function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ce=function(e,t,r,n){var o=t.eventManager,i=t.urlInfo,a=t.contextId,c={experienceType:Z.CONTROL},u=Le(Le({},c),{},{contextId:a,discriminator:0}),s=je(c,i).href,l=o.experienceEventListenerBuilder,f=o.invokeEventListener,p=Pe(u);l(p,n);var d=Y({frameOptions:{url:s,container:e,width:"0px",height:"0px",onChange:r},contentOptions:{onMessage:n},transformedContentOptions:{},controlOptions:{eventManager:o,contextId:a,timeout:C,urlInfo:i},internalExperience:u,experienceIdentifier:p}),v=d.internalSend,h=d.frame;return window.addEventListener("message",(function(e){var t,n=e.data;if((t=n)&&t.eventTarget&&t.eventName)try{var o=function(e){if(!e)throw new Error("No experience provided");if(re(e))return oe(e);if(me(e))return ye(e);if(se(e))return fe(e);if(pe(e))return function(e){if(pe(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")}(e);if(Se(e))return Te(e);if(De(e))return Pe(e);throw new Error("Cannot create experience identifier for the experience")}(n.eventTarget);f(o,n),function(e){var t,r,n={eventName:G.ACKNOWLEDGE,eventTarget:u,message:{eventName:e.eventName,eventTarget:e.eventTarget}};(null===(t=(r=window).requestIdleCallback)||void 0===t?void 0:t.call(r,(function(){return v(n)})))||v(n)}(n)}catch(e){null==r||r({eventName:z.UNRECOGNIZED_EVENT_TARGET,eventLevel:H.WARN,message:"Message with unrecognized event target received",data:{eventTarget:n.eventTarget}},{frame:h}),console.warn("Message with unrecognized event target received")}})),{internalSend:v}};var De=function(e){return!!e&&e.experienceType===Z.CONTROL},je=function(e,t){var r=t.host,n=t.guid,o="".concat(r,"/embed/").concat(n,"/embedControl");return new URL(o)},Pe=function(e){if(De(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")},Ue=["url","container","width","height","resizeHeightOnSizeChangedEvent","withIframePlaceholder","className","onChange"];const ke=function(){var e=c(s().mark((function e(t){var r,n,a,u,l,f,p,d,v,m,O,y,g,b,w;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(t||{}).onChange,a=void 0===n?null:n,u=h(),l=new Set,f=E(),p=null===(r=document.getElementsByTagName("body"))||void 0===r?void 0:r[0]){e.next=8;break}throw null==a||a({eventName:z.NO_BODY,eventLevel:H.ERROR,message:"could not locate <body> element in the page"},{frame:null}),new Error("could not locate <body> element in the page");case 8:return v=function(e){if(!d){var t,r=e.url;if(!r)return;try{t=D(r)}catch(e){return}var n=Ce(p,{eventManager:f,urlInfo:t,contextId:u},a).internalSend;d={eventManager:f,sendToControlFrame:n,contextId:u,timeout:C}}return d},m=function(e,t){if(!e){var r="".concat(t," is called without frameOptions");throw null==a||a({eventName:z.NO_FRAME_OPTIONS,eventLevel:H.ERROR,message:r,data:{methodName:t}},{frame:null}),new Error(r)}if("object"!==i(e)||Array.isArray(e)){var n="".concat(t," is called with non-object frameOptions");throw null==a||a({eventName:z.INVALID_FRAME_OPTIONS,eventLevel:H.ERROR,message:n,data:{methodName:t,frameOptionsType:Array.isArray(e)?"array":i(e)}},{frame:null}),new Error(n)}e.url,e.container,e.width,e.height,e.resizeHeightOnSizeChangedEvent,e.withIframePlaceholder,e.className;var c=e.onChange,u=o(e,Ue),s=Object.keys(u);if(s.length>0){var l="".concat(t," is called with unrecognized properties");null==c||c({eventName:z.UNRECOGNIZED_FRAME_OPTIONS,eventLevel:H.WARN,message:l,data:{unrecognizedFrameOptions:s}},{frame:null}),console.warn(l)}},O=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(t,"embedVisual"),n=v(t),e.abrupt("return",te(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(t,"embedDashboard"),n=v(t),e.abrupt("return",Ee(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(t,"embedConsole"),n=v(t),e.abrupt("return",ue(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(t,"embedQSearchBar"),n=v(t),e.abrupt("return",Ne(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),w={embedVisual:O,embedDashboard:y,embedConsole:g,embedQSearchBar:b},e.abrupt("return",w);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},61:(e,t,r)=>{var n=r(698).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new A(n||[]);return a(i,"_invoke",{value:S(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var v={};function h(){}function E(){}function m(){}var O={};f(O,u,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(R([])));g&&g!==r&&i.call(g,u)&&(O=g);var b=m.prototype=h.prototype=Object.create(O);function w(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,c,u)}),(function(e){r("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return r("throw",e,c,u)}))}u(s.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=_(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function R(e){if(e||""===e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=m,a(b,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:E,configurable:!0}),E.displayName=f(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,f(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(N.prototype),f(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new N(p(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),f(b,l,"Generator"),f(b,u,(function(){return this})),f(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=R,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:R(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{var n=r(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(174)})(); | ||
(()=>{var e={174:(e,t,r)=>{var n=r(388);r(672).QuickSightEmbedding=n,e.exports=n},672:(e,t,r)=>{"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==r.g)return r.g}return e}()},388:(e,t,r)=>{"use strict";r.r(t),r.d(t,{QSE:()=>n,SDK_VERSION:()=>L,createEmbeddingContext:()=>ke});var n={};function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}r.r(n);var u=r(687),s=r.n(u);const l={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let f;const p=new Uint8Array(16);function d(){if(!f&&(f="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!f))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(p)}const v=[];for(let e=0;e<256;++e)v.push((e+256).toString(16).slice(1));const h=function(e,t,r){if(l.randomUUID&&!t&&!e)return l.randomUUID();const n=(e=e||{}).random||(e.rng||d)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+"-"+v[e[t+4]]+v[e[t+5]]+"-"+v[e[t+6]]+v[e[t+7]]+"-"+v[e[t+8]]+v[e[t+9]]+"-"+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]).toLowerCase()}(n)},E=function(){var e=new Map,t=function(t,r){t&&"function"==typeof r&&(e.has(t)||e.set(t,[]),e.get(t).push(r))},r=function(t,r){e.has(t)&&e.get(t).forEach((function(e){e(r)}))},n=function(t,r){if(e.has(t)){var n=e.get(t).filter((function(e){return e!==r}));e.set(t,n)}};return{addEventListener:t,invokeEventListener:r,removeEventListener:n,experienceEventListenerBuilder:function(e,o){var i=function(r){return t(e,r)};return o&&i(o),{addExperienceEventListener:i,invokeExperienceEventListener:function(t){return r(e,t)},removeExperienceEventListener:function(t){return n(e,t)}}}}};function m(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const g=2147483647,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=Math.floor,N=String.fromCharCode;function S(e){throw new RangeError(b[e])}const _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},T=function(e,t,r){let n=0;for(e=r?w(e/700):e>>1,e+=w(e/t);e>455;n+=36)e=w(e/35);return w(n+36*e/(e+38))},I=function(e){const t=[],r=(e=function(e){const t=[];let r=0;const n=e.length;for(;r<n;){const o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&o)<<10)+(1023&n)+65536):(t.push(o),r--)}else t.push(o)}return t}(e)).length;let n=128,o=0,i=72;for(const r of e)r<128&&t.push(N(r));const a=t.length;let c=a;for(a&&t.push("-");c<r;){let r=g;for(const t of e)t>=n&&t<r&&(r=t);const u=c+1;r-n>w((g-o)/u)&&S("overflow"),o+=(r-n)*u,n=r;for(const r of e)if(r<n&&++o>g&&S("overflow"),r===n){let e=o;for(let r=36;;r+=36){const n=r<=i?1:r>=i+26?26:r-i;if(e<n)break;const o=e-n,a=36-n;t.push(N(_(n+o%a,0))),e=w(o/a)}t.push(N(_(e,0))),i=T(o,u,c===a),o=0,++c}++o,++n}return t.join("")};var A=["parameters"];function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var L="2.3.1",C=6e4,D=function(e){var t=/^(https:\/\/[^/]+)\/(embedding|embed)\/([^/]+)\/[^?]+\?(.*)/i.exec(e)||[];if((null==t?void 0:t.length)<4)throw'Invalid embedding url: "'.concat(e,'"');return{guid:t[3],host:t[1],urlSearchParams:new URLSearchParams(t[4])}};function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var U=function(e){return e.CALLBACK_OPERATION_INVOKED="CALLBACK_OPERATION_INVOKED",e.CONTENT_LOADED="CONTENT_LOADED",e.EXPERIENCE_INITIALIZED="EXPERIENCE_INITIALIZED",e.ERROR_OCCURRED="ERROR_OCCURRED",e.SIZE_CHANGED="SIZE_CHANGED",e.PARAMETERS_CHANGED="PARAMETERS_CHANGED",e.SELECTED_SHEET_CHANGED="SELECTED_SHEET_CHANGED",e.MODAL_OPENED="MODAL_OPENED",e.Q_SEARCH_CLOSED="Q_SEARCH_CLOSED",e.Q_SEARCH_OPENED="Q_SEARCH_OPENED",e.Q_SEARCH_SIZE_CHANGED="Q_SEARCH_SIZE_CHANGED",e.Q_SEARCH_ENTERED_FULLSCREEN="Q_SEARCH_ENTERED_FULLSCREEN",e.Q_SEARCH_EXITED_FULLSCREEN="Q_SEARCH_EXITED_FULLSCREEN",e}({}),k=function(e){return e.SET_PARAMETERS="SET_PARAMETERS",e.SET_SELECTED_SHEET_ID="SET_SELECTED_SHEET_ID",e.SET_Q_SEARCH_QUESTION="SET_Q_SEARCH_QUESTION",e.SET_CONTENT_OPTIONS="SET_CONTENT_OPTIONS",e.SET_VISUAL_ACTIONS="SET_VISUAL_ACTIONS",e.ADD_VISUAL_ACTIONS="ADD_VISUAL_ACTIONS",e.REMOVE_VISUAL_ACTIONS="REMOVE_VISUAL_ACTIONS",e}({}),M=function(e){return e.GET_PARAMETERS="GET_PARAMETERS",e.GET_SHEETS="GET_SHEETS",e.GET_SHEET_VISUALS="GET_SHEET_VISUALS",e.GET_VISUAL_ACTIONS="GET_VISUAL_ACTIONS",e.GET_SELECTED_SHEET_ID="GET_SELECTED_SHEET_ID",e}({}),V=function(e){return e.ACKNOWLEDGE="ACKNOWLEDGE",e.INITIATE_PRINT="INITIATE_PRINT",e.NAVIGATE_TO_DASHBOARD="NAVIGATE_TO_DASHBOARD",e.CLOSE_Q_SEARCH="CLOSE_Q_SEARCH",e.UNDO="UNDO",e.REDO="REDO",e.RESET="RESET",e.TOGGLE_BOOKMARKS_PANE="TOGGLE_BOOKMARKS_PANE",e}({}),G=P(P(P(P({},U),k),M),V),H=function(e){return e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e}({}),F=function(e){return e.FRAME_STARTED="FRAME_STARTED",e.FRAME_MOUNTED="FRAME_MOUNTED",e.FRAME_LOADED="FRAME_LOADED",e}({}),Q=function(e){return e.FRAME_NOT_CREATED="FRAME_NOT_CREATED",e.NO_BODY="NO_BODY",e.NO_CONTAINER="NO_CONTAINER",e.INVALID_CONTAINER="INVALID_CONTAINER",e.NO_URL="NO_URL",e.INVALID_URL="INVALID_URL",e.NO_FRAME_OPTIONS="NO_FRAME_OPTIONS",e.INVALID_FRAME_OPTIONS="INVALID_FRAME_OPTIONS",e}({}),B=function(e){return e.UNRECOGNIZED_CONTENT_OPTIONS="UNRECOGNIZED_CONTENT_OPTIONS",e.UNRECOGNIZED_FRAME_OPTIONS="UNRECOGNIZED_FRAME_OPTIONS",e.UNRECOGNIZED_EVENT_TARGET="UNRECOGNIZED_EVENT_TARGET",e}({}),z=P(P(P({},F),Q),B),Z=function(e){return e.CONSOLE="CONSOLE",e.CONTEXT="CONTEXT",e.CONTROL="CONTROL",e.VISUAL="VISUAL",e.DASHBOARD="DASHBOARD",e.QSEARCH="QSEARCH",e}({}),W="quicksight-embedding-iframe",q=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach((function(e){var t=y(e,2),r=t[0],n=t[1];return o.setAttribute(r,n)})),Object.entries(r).forEach((function(e){var t=y(e,2),r=t[0],n=t[1];return o.style.setProperty(r,n)})),n.forEach((function(e){return o.appendChild(e)})),o};function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Y=function(e){var t,r=e.frameOptions,n=e.contentOptions,a=e.transformedContentOptions,u=e.controlOptions,l=e.internalExperience,f=e.experienceIdentifier,p=e.interceptMessage,d=r.url,v=r.container,E=r.width,m=void 0===E?"100%":E,O=r.height,g=void 0===O?"100%":O,b=r.withIframePlaceholder,w=r.className,N=r.onChange,S=null,_=function(e){"function"==typeof N&&N(e,{frame:S})};if(!v){var T="Container is required for the experience";throw _({eventName:z.NO_CONTAINER,eventLevel:H.ERROR,message:T,data:{experience:l}}),new Error(T)}if("string"==typeof v)try{t=document.querySelector(v)}catch(e){var R=e.message;throw _({eventName:z.INVALID_CONTAINER,eventLevel:H.ERROR,message:R,data:{experience:l}}),e}else"object"===i(v)&&v.nodeName&&(t=v);if(!t){var D="Invalid container '".concat(v,"' for the experience");throw _({eventName:z.INVALID_CONTAINER,eventLevel:H.ERROR,message:D,data:{experience:l}}),new Error(D)}var j,P=u.eventManager,U=u.sendToControlFrame,k=u.timeout,M=void 0===k?C:k,V=(n||{}).onMessage,F=(0,P.experienceEventListenerBuilder)(f,(function(e){e.eventName;var t={frame:S};p&&p(e,t),null==V||V(e,t)})),Q=F.addExperienceEventListener,B=F.removeExperienceEventListener;if(!d)throw _({eventName:z.NO_URL,eventLevel:H.ERROR,message:"Url is required for the experience",data:{experience:l}}),new Error("Url is required for the experience");j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.parameters,a=o(t,A),c=r.contextId,u=r.discriminator,s=[],l=function(e){if(!e||"object"!==i(e))return"";var t=Object.entries(e).reduce((function(e,t){var r=y(t,2),n=r[0],o=r[1];return null!=o&&(e[n]="".concat(o)),e}),{punyCodeEmbedOrigin:I("".concat(window.location.origin,"/"))});return new URLSearchParams(t).toString()}(x(x({},a),{},{contextId:c,discriminator:u,clientTime:Date.now(),sdkVersion:L}));l&&s.push(l);var f=function(e){return e&&"object"===i(e)?Object.entries(e).map((function(e){var t=y(e,2),r=t[0],n=t[1],o=[].concat(n),i=encodeURIComponent(r);return o.map((function(e){return encodeURIComponent(e)})).map((function(e){return"p.".concat(i,"=").concat(e)})).join("&")})).join("&"):""}(n);f&&s.push(f);var p=s.join("#"),d="string"==typeof e?e:e.toString();return[d,p].join(d.includes("?")?"&":"?")}(d,a,l);var Z,K=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h(),n=X(X({},t),{},{eventId:r,timestamp:Date.now(),version:L}),S.contentWindow.postMessage(n,j),t.eventName!==G.ACKNOWLEDGE){e.next=5;break}return e.abrupt("return",Promise.resolve({success:!0}));case 5:return e.abrupt("return",new Promise((function(e,t){var n=function t(n){n.data.eventId===r&&(window.removeEventListener("message",t),e(n.data.message))};window.addEventListener("message",n),setTimeout((function(){window.removeEventListener("message",n),t()}),5e3)})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=c(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=U||K,e.abrupt("return",r(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Z=setTimeout((function(){throw _({eventName:z.FRAME_NOT_CREATED,eventLevel:H.ERROR,message:"Creating the frame timed out",data:{experience:l}}),new Error("Creating the frame timed out")}),M);var $=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z&&clearTimeout(Z),_({eventName:z.FRAME_LOADED,eventLevel:H.INFO,message:"The frame loaded",data:{experience:l}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();_({eventName:z.FRAME_STARTED,eventLevel:H.INFO,message:"Creating the frame",data:{experience:l}});try{S=function(e){var t,r,n=e.id,o=e.src,i=e.width,a=void 0===i?"0px":i,c=e.height,u=void 0===c?"0px":c,s=e.container,l=e.onLoad,f=e.loading,p=e.withIframePlaceholder,d=e.payload,v=e.className,h=n||"".concat(s.id,"-iframe");if(p){if((t=document.createElement("div")).id="".concat(h,"-placeholder"),t.style.width=a,t.style.backgroundColor="rgba(0,0,0,.01)",t.style.display="flex",t.style.justifyContent="center",t.style.alignItems="center",t.className="".concat(W,"-placeholder"),u.endsWith("px")&&(t.style.height=u),"boolean"!=typeof p)t.appendChild(p);else{var E=(r=[1,2,3].map((function(e){var t=q("animate",{attributeName:"opacity",dur:"1s",values:"0;1;0",repeatCount:"indefinite",begin:"".concat(e/10)});return q("circle",{fill:"#ccc",stroke:"none",cx:"".concat(20*e-14),cy:"50",r:"6"},void 0,[t])})),q("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0"},{width:"100px",height:"100px"},r));t.appendChild(E)}s.appendChild(t)}var m=[W];v&&m.push(v);var O,y=document.createElement("iframe");return y.className=m.join(" ").trim(),y.id=h,y.name=h,y.width=a,y.height=u,f&&(y.loading=f),y.style.border="0px",y.style.padding="0px",t&&(y.style.opacity="0",y.style.position="absolute"),"0px"===a&&"0px"===u&&(y.style.position="absolute"),s.appendChild(y),d?O=function(e){var t=e.src,r=e.container,n=e.target,o=e.payload;if(t&&r){var i=document.createElement("form");return i.style.visibility="hidden",i.method="POST",i.action=t,i.target=n,i.name="".concat(n,"-form"),Object.keys(o).forEach((function(e){var t=document.createElement("input");t.type="hidden",t.name=e,t.value=o[e],i.appendChild(t)})),r.appendChild(i),i.submit(),{remove:function(){i.remove()}}}}({src:o,target:y.name,container:s,payload:d}):y.src=o,y.addEventListener("load",(function(e){var r;t&&(t.remove(),y.style.position="",y.style.opacity="1",y.style.transition="opacity .5s ease-in-out"),"function"==typeof l&&l(e),null===(r=O)||void 0===r||r.remove()})),y}({id:f,src:j,width:m,height:g,container:t,onLoad:$,withIframePlaceholder:b,className:w})}catch(e){throw _({eventName:z.FRAME_NOT_CREATED,eventLevel:H.ERROR,message:"Failed to create the frame",data:{experience:l}}),e}return _({eventName:z.FRAME_MOUNTED,eventLevel:H.INFO,message:"The frame mounted",data:{frame:S,experience:l}}),{internalAddEventListener:function(e,t){var r=function(r,n){r.eventName===e&&t(r,n)};return Q(r),{remove:function(){B(r)}}},internalSend:Y,frame:S}};var $=["fitToIframeWidth","locale","parameters","onMessage"];function J(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const te=function(e,t,r,n){var i=e.url,a=e.resizeHeightOnSizeChangedEvent,u=e.onChange,l=(r||{}).contextId;if(!i){var f="Url is required for the experience";throw null==u||u({eventName:z.NO_URL,eventLevel:H.ERROR,message:f},{frame:null}),new Error(f)}var p=ne(i);if(!p)throw null==u||u({eventName:z.INVALID_URL,eventLevel:H.ERROR,message:"Invalid visual experience url",data:{url:i}},{frame:null}),new Error("Invalid visual experience url");var d=Re(p,n,l,oe),v=d.experienceIdentifier,h=d.internalExperience,E=Y({frameOptions:e,contentOptions:t,transformedContentOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fitToIframeWidth,r=e.locale,n=e.parameters,i=(e.onMessage,o(e,$)),a=Object.keys(i);Object.keys(i).length>0&&(null==u||u({eventName:z.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:H.WARN,message:"Visual content options contain unrecognized properties",data:{unrecognizedContentOptions:a}},{frame:null}),console.warn("Visual content options contain unrecognized properties"));var c={fitToIframeWidth:null==t||t,locale:r};return Array.isArray(n)&&(c.parameters=n.reduce((function(e,t){return e[t.Name]=t.Values,e}),{})),c}(t),controlOptions:r,internalExperience:h,experienceIdentifier:v,interceptMessage:function(e,t){"SIZE_CHANGED"===e.eventName&&a&&(t.frame.height="".concat(e.message.height,"px"))}}),m=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ee(ee({},t),{},{eventTarget:h}),e.next=3,E.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_PARAMETERS,message:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.RESET}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_VISUAL_ACTIONS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.ADD_VISUAL_ACTIONS,message:{Actions:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.REMOVE_VISUAL_ACTIONS,message:{Actions:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_VISUAL_ACTIONS,message:{Actions:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{setParameters:O,reset:y,getActions:g,addActions:b,removeActions:w,setActions:N,send:m,addEventListener:E.internalAddEventListener}};var re=function(e){return!!e&&e.experienceType===Z.VISUAL},ne=function(e){var t=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)\/sheets\/([\w-]+)\/visuals\/([\w-]+)(\?|$)/i.exec(e)||[];if(!(t.length<5))return{experienceType:Z.VISUAL,dashboardId:t[1],sheetId:t[2],visualId:t[3]}},oe=function(e){if(re(e))return[e.contextId,e.experienceType,e.dashboardId,e.sheetId,e.visualId,e.discriminator].filter(Boolean).join("-")},ie=["locale","onMessage"];function ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ue=function(e,t,r,n){var i=e.url,a=e.onChange,u=(r||{}).contextId;if(!i){var l="Url is required for the experience";throw null==a||a({eventName:z.NO_URL,eventLevel:H.ERROR,message:l},{frame:null}),new Error(l)}var f=le(i);if(!f)throw null==a||a({eventName:z.INVALID_URL,eventLevel:H.ERROR,message:"Invalid console experience url",data:{url:i}},{frame:null}),new Error("Invalid console experience url");var p=Re(f,n,u,fe),d=p.experienceIdentifier,v=p.internalExperience,h=Y({frameOptions:e,contentOptions:t,transformedContentOptions:function(e){var t=e.locale,r=(e.onMessage,o(e,ie)),n=Object.keys(r);return Object.keys(r).length>0&&(null==a||a({eventName:z.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:H.WARN,message:"Console content options contain unrecognized properties",data:{unrecognizedContentOptions:n}},{frame:null}),console.warn("Console content options contain unrecognized properties")),{locale:t}}(t),controlOptions:r,internalExperience:v,experienceIdentifier:d}),E=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ce(ce({},t),{},{eventTarget:v}),e.next=3,h.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{send:E,addEventListener:h.internalAddEventListener}};var se=function(e){return!!e&&e.experienceType===Z.CONSOLE},le=function(e){if(!((/^https:\/\/[^/]+\/embedding\/[^/]+\/(start(\/(favorites|dashboards|analyses))?|dashboards\/[\w-]+|analyses\/[\w-]+)(\?|$)/i.exec(e)||[]).length<5))return{experienceType:Z.CONSOLE}},fe=function(e){if(se(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")},pe=function(e){return!!e&&e.experienceType===Z.CONTEXT},de=["parameters","locale","attributionOptions","sheetOptions","toolbarOptions","onMessage"];function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ee=function(e,t,r,n){var i=e.url,a=e.onChange,u=(r||{}).contextId;if(!i){var l="Url is required for the experience";throw null==a||a({eventName:z.NO_URL,eventLevel:H.ERROR,message:l},{frame:null}),new Error(l)}var f=Oe(i);if(!f)throw null==a||a({eventName:z.INVALID_URL,eventLevel:H.ERROR,message:"Invalid dashboard experience url",data:{url:i}},{frame:null}),new Error("Invalid dashboard experience url");var p=Re(f,n,u,ye),d=p.experienceIdentifier,v=p.internalExperience,h=e.resizeHeightOnSizeChangedEvent,E=Y({frameOptions:e,contentOptions:t,transformedContentOptions:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.parameters,n=t.locale,i=t.attributionOptions,c=t.sheetOptions,u=t.toolbarOptions,s=(t.onMessage,o(t,de)),l=Object.keys(s);if(l.length>0){var f="Dashboard content options contain unrecognized properties";null==a||a({eventName:z.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:H.WARN,message:f,data:{unrecognizedContentOptions:l}},{frame:null}),console.warn(f)}var p={locale:n};return Array.isArray(r)&&(p.parameters=r.reduce((function(e,t){return e[t.Name]=t.Values,e}),{})),!0!==(null==i?void 0:i.overlayContent)&&(p.footerPaddingEnabled=!0),!0!==(null==u?void 0:u.export)&&!0!==(null==u||null===(e=u.export)||void 0===e?void 0:e.print)||(p.printEnabled=!0),!0!==(null==u?void 0:u.undoRedo)&&(p.undoRedoDisabled=!0),!0!==(null==u?void 0:u.reset)&&(p.resetDisabled=!0),!0===(null==u?void 0:u.bookmarks)&&(p.showBookmarksIcon=!0),null!=c&&c.initialSheetId&&(p.sheetId=c.initialSheetId),"boolean"==typeof(null==c?void 0:c.singleSheet)&&(p.sheetTabsDisabled=c.singleSheet),!0===(null==c?void 0:c.emitSizeChangedEventOnSheetChange)&&(p.resizeOnSheetChange=!0),p}(t),controlOptions:r,internalExperience:v,experienceIdentifier:d,interceptMessage:function(e,t){"SIZE_CHANGED"===e.eventName&&h&&(t.frame.height="".concat(e.message.height,"px"))}}),m=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=he(he({},t),{},{eventTarget:v}),e.next=3,E.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_PARAMETERS,message:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.INITIATE_PRINT}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.UNDO}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.REDO}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.TOGGLE_BOOKMARKS_PANE}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.RESET}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_PARAMETERS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_SHEETS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_SHEET_VISUALS,message:{SheetId:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=c(s().mark((function e(t,r){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_VISUAL_ACTIONS,message:{SheetId:t,VisualId:r}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),A=function(){var e=c(s().mark((function e(t,r,n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.ADD_VISUAL_ACTIONS,message:{SheetId:t,VisualId:r,Actions:n}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),R=function(){var e=c(s().mark((function e(t,r,n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.REMOVE_VISUAL_ACTIONS,message:{SheetId:t,VisualId:r,Actions:n}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),x=function(){var e=c(s().mark((function e(t,r,n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_VISUAL_ACTIONS,message:{SheetId:t,VisualId:r,Actions:n}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),L=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.GET_SELECTED_SHEET_ID}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=c(s().mark((function e(t,r){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.NAVIGATE_TO_DASHBOARD,message:{DashboardId:t,Parameters:null==r?void 0:r.parameters}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),D=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_SELECTED_SHEET_ID,message:{SheetId:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{getParameters:S,getSheets:_,getSheetVisuals:T,getVisualActions:I,addVisualActions:A,removeVisualActions:R,setVisualActions:x,getSelectedSheetId:L,initiatePrint:y,navigateToDashboard:C,setSelectedSheetId:D,setParameters:O,undo:g,redo:b,reset:N,toggleBookmarksPane:w,send:m,addEventListener:E.internalAddEventListener}};var me=function(e){return!!e&&e.experienceType===Z.DASHBOARD},Oe=function(e){var t=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)(\?|$)/i.exec(e)||[];if(!(t.length<3))return{experienceType:Z.DASHBOARD,dashboardId:t[1]}},ye=function(e){if(me(e))return[e.contextId,e.experienceType,e.dashboardId,e.discriminator].filter(Boolean).join("-")},ge=["hideIcon","hideTopicName","theme","allowTopicSelection","onMessage"];function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ne=function(e,t,r,n){var i,a=e.url,u=e.onChange,l=(r||{}).contextId;if(!a){var f="Url is required for the experience";throw null==u||u({eventName:z.NO_URL,eventLevel:H.ERROR,message:f},{frame:null}),new Error(f)}var p=_e(a);if(!p)throw null==u||u({eventName:z.INVALID_URL,eventLevel:H.ERROR,message:"Invalid q search experience url",data:{url:a}},{frame:null}),new Error("Invalid q search experience url");var d=Re(p,n,l,Te),v=d.experienceIdentifier,h=d.internalExperience,E=Y({frameOptions:e,contentOptions:t,transformedContentOptions:function(e){var t=e.hideIcon,r=e.hideTopicName,n=e.theme,i=e.allowTopicSelection,a=(e.onMessage,o(e,ge)),c=Object.keys(a);Object.keys(a).length>0&&(null==u||u({eventName:z.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:H.WARN,message:"Q search content options contain unrecognized properties",data:{unrecognizedContentOptions:c}},{frame:null}),console.warn("Q search content options contain unrecognized properties"));var s={allowTopicSelection:i};return void 0!==t&&(s.qBarIconDisabled=t),void 0!==r&&(s.qBarTopicNameDisabled=r),void 0!==n&&(s.themeId=n),s}(t),controlOptions:r,internalExperience:h,experienceIdentifier:v,interceptMessage:function(e,t){switch(e.eventName){case G.Q_SEARCH_OPENED:case G.Q_SEARCH_CLOSED:t.frame.style.height="".concat(e.message.height,"px");break;case G.CONTENT_LOADED:window.addEventListener("click",(function(e){!E.frame.contains(e.target)&&y()}));break;case G.Q_SEARCH_ENTERED_FULLSCREEN:i={position:t.frame.style.position,top:t.frame.style.top,left:t.frame.style.left,zIndex:t.frame.style.zIndex,width:t.frame.style.width,height:t.frame.style.height},t.frame.style.position="fixed",t.frame.style.top="0px",t.frame.style.left="0px",t.frame.style.zIndex="2147483647",t.frame.style.width="100vw",t.frame.style.height="100vh";break;case G.Q_SEARCH_EXITED_FULLSCREEN:t.frame.style.position=i.position,t.frame.style.top=i.top,t.frame.style.left=i.left,t.frame.style.zIndex=i.zIndex,t.frame.style.width=i.width,t.frame.style.height=i.height}}}),m=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=we(we({},t),{},{eventTarget:h}),e.next=3,E.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m({eventName:G.SET_Q_SEARCH_QUESTION,message:{question:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){return m({eventName:G.CLOSE_Q_SEARCH})};return{setQuestion:O,close:y,send:m,addEventListener:E.internalAddEventListener}};var Se=function(e){return!!e&&e.experienceType===Z.QSEARCH},_e=function(e){if(!((/^https:\/\/[^/]+\/embedding\/[^/]+\/q\/search(\/|\?|$)/i.exec(e)||[]).length<2))return{experienceType:Z.QSEARCH}},Te=function(e){if(Se(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")};function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Re=function(e,t,r,n){var o,i,a=-1;do{a++,i=n(o=Ae(Ae({},e),{},{contextId:r,discriminator:a}))}while(t.has(i));if(i)return t.add(i),{experienceIdentifier:i,internalExperience:o}};function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ce=function(e,t,r,n){var o=t.eventManager,i=t.urlInfo,a=t.contextId,c={experienceType:Z.CONTROL},u=Le(Le({},c),{},{contextId:a,discriminator:0}),s=je(c,i).href,l=o.experienceEventListenerBuilder,f=o.invokeEventListener,p=Pe(u);l(p,n);var d=Y({frameOptions:{url:s,container:e,width:"0px",height:"0px",onChange:r},contentOptions:{onMessage:n},transformedContentOptions:{},controlOptions:{eventManager:o,contextId:a,timeout:C,urlInfo:i},internalExperience:u,experienceIdentifier:p}),v=d.internalSend,h=d.frame;return window.addEventListener("message",(function(e){var t,n=e.data;if((t=n)&&t.eventTarget&&t.eventName)try{var o=function(e){if(!e)throw new Error("No experience provided");if(re(e))return oe(e);if(me(e))return ye(e);if(se(e))return fe(e);if(pe(e))return function(e){if(pe(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")}(e);if(Se(e))return Te(e);if(De(e))return Pe(e);throw new Error("Cannot create experience identifier for the experience")}(n.eventTarget);f(o,n),function(e){var t,r,n={eventName:G.ACKNOWLEDGE,eventTarget:u,message:{eventName:e.eventName,eventTarget:e.eventTarget}};(null===(t=(r=window).requestIdleCallback)||void 0===t?void 0:t.call(r,(function(){return v(n)})))||v(n)}(n)}catch(e){null==r||r({eventName:z.UNRECOGNIZED_EVENT_TARGET,eventLevel:H.WARN,message:"Message with unrecognized event target received",data:{eventTarget:n.eventTarget}},{frame:h}),console.warn("Message with unrecognized event target received")}})),{internalSend:v}};var De=function(e){return!!e&&e.experienceType===Z.CONTROL},je=function(e,t){var r=t.host,n=t.guid,o="".concat(r,"/embed/").concat(n,"/embedControl");return new URL(o)},Pe=function(e){if(De(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")},Ue=["url","container","width","height","resizeHeightOnSizeChangedEvent","withIframePlaceholder","className","onChange"];const ke=function(){var e=c(s().mark((function e(t){var r,n,a,u,l,f,p,d,v,m,O,y,g,b,w;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(t||{}).onChange,a=void 0===n?null:n,u=h(),l=new Set,f=E(),p=null===(r=document.getElementsByTagName("body"))||void 0===r?void 0:r[0]){e.next=8;break}throw null==a||a({eventName:z.NO_BODY,eventLevel:H.ERROR,message:"could not locate <body> element in the page"},{frame:null}),new Error("could not locate <body> element in the page");case 8:return v=function(e){if(!d){var t,r=e.url;if(!r)return;try{t=D(r)}catch(e){return}var n=Ce(p,{eventManager:f,urlInfo:t,contextId:u},a).internalSend;d={eventManager:f,sendToControlFrame:n,contextId:u,timeout:C}}return d},m=function(e,t){if(!e){var r="".concat(t," is called without frameOptions");throw null==a||a({eventName:z.NO_FRAME_OPTIONS,eventLevel:H.ERROR,message:r,data:{methodName:t}},{frame:null}),new Error(r)}if("object"!==i(e)||Array.isArray(e)){var n="".concat(t," is called with non-object frameOptions");throw null==a||a({eventName:z.INVALID_FRAME_OPTIONS,eventLevel:H.ERROR,message:n,data:{methodName:t,frameOptionsType:Array.isArray(e)?"array":i(e)}},{frame:null}),new Error(n)}e.url,e.container,e.width,e.height,e.resizeHeightOnSizeChangedEvent,e.withIframePlaceholder,e.className;var c=e.onChange,u=o(e,Ue),s=Object.keys(u);if(s.length>0){var l="".concat(t," is called with unrecognized properties");null==c||c({eventName:z.UNRECOGNIZED_FRAME_OPTIONS,eventLevel:H.WARN,message:l,data:{unrecognizedFrameOptions:s}},{frame:null}),console.warn(l)}},O=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(t,"embedVisual"),n=v(t),e.abrupt("return",te(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(t,"embedDashboard"),n=v(t),e.abrupt("return",Ee(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(t,"embedConsole"),n=v(t),e.abrupt("return",ue(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(t,"embedQSearchBar"),n=v(t),e.abrupt("return",Ne(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),w={embedVisual:O,embedDashboard:y,embedConsole:g,embedQSearchBar:b},e.abrupt("return",w);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},61:(e,t,r)=>{var n=r(698).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new A(n||[]);return a(i,"_invoke",{value:S(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var v={};function h(){}function E(){}function m(){}var O={};f(O,u,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(R([])));g&&g!==r&&i.call(g,u)&&(O=g);var b=m.prototype=h.prototype=Object.create(O);function w(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,c,u)}),(function(e){r("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return r("throw",e,c,u)}))}u(s.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=_(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function R(e){if(e||""===e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=m,a(b,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:E,configurable:!0}),E.displayName=f(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,f(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(N.prototype),f(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new N(p(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),f(b,l,"Generator"),f(b,u,(function(){return this})),f(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=R,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:R(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{var n=r(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(174)})(); | ||
//# sourceMappingURL=quicksight-embedding-js-sdk.min.js.map |
/*! | ||
* amazon-quicksight-embedding-sdk v2.3.0 | ||
* amazon-quicksight-embedding-sdk v2.3.1 | ||
* git@github.com:awslabs/amazon-quicksight-embedding-sdk.git | ||
@@ -4,0 +4,0 @@ * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
@@ -146,8 +146,10 @@ import { ChangeEventLevel, ExperienceType, MessageEventName, InfoChangeEventName, WarnChangeEventName, ErrorChangeEventName } from './enums'; | ||
} | ||
export type ActionOperation = CallbackOperation; | ||
export type ActionOperation = { | ||
CallbackOperation: CallbackOperation; | ||
}; | ||
export interface VisualAction { | ||
CustomActionId: string; | ||
Name: string; | ||
Status: string; | ||
Trigger: string; | ||
Status: 'ENABLED' | 'DISABLED'; | ||
Trigger: 'DATA_POINT_CLICK' | 'DATA_POINT_MENU'; | ||
ActionOperations: ActionOperation[]; | ||
@@ -247,3 +249,3 @@ } | ||
export type BuildExperienceUrlOptions = { | ||
[key: string]: Primitives | Primitives[]; | ||
[key: string]: Primitives | Primitives[] | Record<string, Primitives>; | ||
}; | ||
@@ -250,0 +252,0 @@ export interface InfoChangeEvent { |
{ | ||
"name": "amazon-quicksight-embedding-sdk", | ||
"description": "JS SDK for embedding Amazon QuickSight", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"main": "dist/index.js", | ||
@@ -49,2 +49,3 @@ "types": "dist/index.d.ts", | ||
"expose-loader": "^3.1.0", | ||
"fork-ts-checker-webpack-plugin": "^8.0.0", | ||
"jest": "^27.5.1", | ||
@@ -51,0 +52,0 @@ "jsdom": "^19.0.0", |
@@ -15,10 +15,2 @@ # Amazon QuickSight Embedding SDK | ||
| ||
> How can we improve your experience embedding QuickSight assets? | ||
> | ||
> Fill out [this short survey about your experience with QuickSight Embedded Analytics](https://amazonmr.au1.qualtrics.com/jfe/form/SV_5uSL2PkBwcaPloq). It takes less than 5 minutes. | ||
> | ||
> Your responses will inform product decisions, helping us improve the things you care about. | ||
| ||
@@ -31,3 +23,3 @@ ## Installation | ||
... | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.0/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.1/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script type="text/javascript"> | ||
@@ -471,3 +463,3 @@ const onLoad = async () => { | ||
<title>Dashboard Embedding Example</title> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.0/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.1/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script type="text/javascript"> | ||
@@ -807,3 +799,3 @@ const embedDashboard = async() => { | ||
Status: 'ENABLED', | ||
Trigger: 'DATA_POINT_CLICK', | ||
Trigger: 'DATA_POINT_CLICK', // or 'DATA_POINT_MENU' | ||
ActionOperations: [{ | ||
@@ -830,3 +822,3 @@ CallbackOperation: { | ||
Status: 'ENABLED', | ||
Trigger: 'DATA_POINT_CLICK', | ||
Trigger: 'DATA_POINT_CLICK', // or 'DATA_POINT_MENU' | ||
ActionOperations: [{ | ||
@@ -851,3 +843,3 @@ CallbackOperation: { | ||
Status: 'ENABLED', | ||
Trigger: 'DATA_POINT_CLICK', | ||
Trigger: 'DATA_POINT_CLICK', // or 'DATA_POINT_MENU' | ||
ActionOperations: [{ | ||
@@ -962,3 +954,3 @@ CallbackOperation: { | ||
<title>Visual Embedding Example</title> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.0/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.1/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script type="text/javascript"> | ||
@@ -1162,3 +1154,3 @@ const embedVisual = async() => { | ||
Status: 'ENABLED', | ||
Trigger: 'DATA_POINT_CLICK', | ||
Trigger: 'DATA_POINT_CLICK', // or 'DATA_POINT_MENU' | ||
ActionOperations: [{ | ||
@@ -1185,3 +1177,3 @@ CallbackOperation: { | ||
Status: 'ENABLED', | ||
Trigger: 'DATA_POINT_CLICK', | ||
Trigger: 'DATA_POINT_CLICK', // or 'DATA_POINT_MENU' | ||
ActionOperations: [{ | ||
@@ -1206,3 +1198,3 @@ CallbackOperation: { | ||
Status: 'ENABLED', | ||
Trigger: 'DATA_POINT_CLICK', | ||
Trigger: 'DATA_POINT_CLICK', // or 'DATA_POINT_MENU' | ||
ActionOperations: [{ | ||
@@ -1264,3 +1256,3 @@ CallbackOperation: { | ||
<title>Console Embedding Example</title> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.0/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.1/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script type="text/javascript"> | ||
@@ -1383,3 +1375,3 @@ const embedConsole = async() => { | ||
<title>Q Search Bar Embedding Example</title> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.0/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.3.1/dist/quicksight-embedding-js-sdk.min.js"></script> | ||
<script type="text/javascript"> | ||
@@ -1386,0 +1378,0 @@ const embedQSearchBar = async() => { |
Sorry, the diff of this file is not supported yet
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
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
2992
439467
30
1506