!function(){var e={16948:function(e,t,a){const n=["applyTemplateAsync","checkSaveLibraryPath","clearMarkingAsync","closeDocument","createWhereClauseForColumnAndValues","executePythonScript","executePythonScriptAndGetValueAsync","executePythonScriptAsync","exportTableAsync","getActiveDataTableAsync","getActiveMarkingAsync","getDataColumnsAsync","getDataColumnsPropertiesAsync","getDataTableContentAsync","getDataTableNamesAsync","getDataTablePropertiesAsync","getDataTablePropertyAsync","getDataTableRowsCountAsync","getDataTablesNamesByIdsAsync","getDataTablesSaveSettingsAsync","getMarkedRowsAsync","getMarkingsAsync","getMetadataAsync","getPropertiesAsync","getPropertyAsync","isDocumentOpen","markRowsAsync","markRowsByIdsAsync","markingExistsAsync","openDocument","save","saveAsync","saveTemplateAsync","setAuthorizationHeader","setSpinnerState"],o=["onDataColumnsChanged","onDataTablesChanged","onDocumentChanged","onDocumentClosed","onMarkingChanged"],r=["removeOnDataColumnsChanged","removeOnDataTablesChanged","removeOnDocumentChanged","removeOnDocumentClosed","removeOnMarkingChanged"],s=["addBarChart","addBoxPlot","addColumnMatchings","addColumnRelations","addColumnsFromUrl","addCombinationChart","addCrossTable","addCustomScript","addDataTable","addDataTableColumns","addDataTableProperty","addDataTableRelations","addDataTransformations","addFilter","addFiltering","addFilterings","addGraphicalTable","addGuidColumn","addHeatMap","addKPIChart","addLineChart","addMapChart","addMarking","addMarkings","addPage","addParallelCoordinatePlot","addPieChart","addRowsFromUrl","addScatterPlot","addScatterPlot3D","addSummaryTable","addTable","addTreemap","addWaterfallChart","applyState","applyStateAsync","loadDataTableFromInformationLink","loadDataTableFromUrl","removeRowsFromDataTable","resetFilter","setDocumentProperty","setFilterVisible"];function SpotfireDocumentProxy(e,t="*",a=3e4,d=!1){if(!(this instanceof SpotfireDocumentProxy))return new SpotfireDocumentProxy(e,t,a);if(!e)throw new Error("Missing reference to iframe containing the spotfireDocument instance.");const i=e,c=t,l=a,m=[];function g(){return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function u(e,t){return new Promise(((a,n)=>{let o=null;function r(e){try{let i=null;try{i=JSON.parse(e.data)}catch(s){return void(!0===d&&console.error("Failed to parse event data as JSON",e))}i.messageId===t&&(i.error?(n(new Error(i.error)),window.removeEventListener("message",r),clearTimeout(o)):"result"in i&&(a(i.result),window.removeEventListener("message",r),clearTimeout(o)))}catch(s){console.error(s)}}window.addEventListener("message",r),o=setTimeout((()=>{window.removeEventListener("message",r),n(new Error(`No response within ${l/1e3}s.`))}),l),i.postMessage(JSON.stringify(e),c)}))}function h(e,t,a=[]){const n=g();return u({target:e,method:t,args:a,messageId:n},n)}this.editor={},n.forEach((e=>{this[e]=(...t)=>h("spotfireDocument",e,t)})),o.forEach((e=>{this[e]=(...t)=>function(e,t=[]){const a=g(),n=g(),o=t[t.length-1];if("function"!=typeof o)throw new Error(`No callback provided for method "${e}".`);const r=[...t];function s(e){try{const t=JSON.parse(e.data);t.messageId===n&&o(t.result)}catch(t){console.error(t)}}r.length-=1,window.addEventListener("message",s),m.push({method:e,internalCb:s,callback:o,args:r,cbMessageId:n});return u({target:"spotfireDocument",method:e,args:r,cbMessageId:n,messageId:a},a)}(e,t)})),r.forEach((e=>{this[e]=(...t)=>function(e,t=[]){const a={removeOnDataColumnsChanged:"onDataColumnsChanged",removeOnDataTablesChanged:"onDataTablesChanged",removeOnDocumentChanged:"onDocumentChanged",removeOnDocumentClosed:"onDocumentClosed",removeOnMarkingChanged:"onMarkingChanged"}[e];if(!a)throw new Error(`Unable to unregister event handler for method "${e}"`);const n=t[t.length-1],o=[...t];o.length=o.length>0?o.length-1:0;const r=m.findIndex((e=>e.method===a&&e.callback===n&&JSON.stringify(e.args)===JSON.stringify(o)));if(-1===r)return;const s=m[r],{internalCb:d,cbMessageId:l}=s;m.splice(r,1);const g={target:"spotfireDocument",method:e,messageId:l};i.postMessage(JSON.stringify(g),c),window.removeEventListener("message",d)}(e,t)})),s.forEach((e=>{this.editor[e]=(...t)=>h("spotfireDocumentEditor",e,t)}))}e.exports=SpotfireDocumentProxy,a.g.SpotfireDocumentProxy=SpotfireDocumentProxy}},t={};function a(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,a),r.exports}a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();a(16948)}();