UNPKG

@aurigma/ui-framework

Version:

A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.

100 lines 1.59 MB
!function(e){function t(t){for(var n,i,o=t[0],a=t[1],s=0,l=[];s<o.length;s++)i=o[s],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&l.push(r[i][0]),r[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(u&&u(t);l.length;)l.shift()()}var n={},r={52:0};function i(e){return a.p+"dynamic."+({0:"vendors~au-widget-canvas~au-widget-datasheet~au-widget-design-editor",1:"au-option-filtered-list-group~au-option-filtered-single-list",2:"au-widget-3d-viewer~au-widget-mockup-3d-viewer",3:"au-widget-image-carousel~au-widget-slider",4:"vendors~au-widget-pim-ajax~au-widget-pim-design-selector",5:"au-option-checkbox-group",6:"au-option-filtered-list-group",7:"au-option-filtered-single-list",8:"au-option-image-list",9:"au-option-image-list-compact",10:"au-option-radio-group",11:"au-option-radio-group-compact",12:"au-option-text",13:"au-widget-3d-viewer",14:"au-widget-ajax",15:"au-widget-asset-storage-ajax",16:"au-widget-button",17:"au-widget-canvas",18:"au-widget-cart",19:"au-widget-checkbox",20:"au-widget-color-picker",21:"au-widget-color-selector",22:"au-widget-data-driven-editor",23:"au-widget-datasheet",24:"au-widget-design-editor",25:"au-widget-dnd-controller",26:"au-widget-finish-button",27:"au-widget-finish-group",28:"au-widget-function-trigger",29:"au-widget-gallery",30:"au-widget-group",31:"au-widget-help",32:"au-widget-html",33:"au-widget-image-carousel",34:"au-widget-input-text",35:"au-widget-item-list",36:"au-widget-mockup-3d-viewer",37:"au-widget-option",38:"au-widget-order",39:"au-widget-pantone-color-picker",40:"au-widget-pim-ajax",41:"au-widget-pim-design-selector",42:"au-widget-pim-option",43:"au-widget-pim-options",44:"au-widget-preflight",45:"au-widget-preview-mockup-slider",46:"au-widget-slider",47:"au-widget-static-text",48:"au-widget-steps",49:"au-widget-template-editor",50:"au-widget-uploader",51:"au-widget-variant-selector",53:"vendors~au-widget-datasheet",54:"vendors~au-widget-design-editor",55:"vendors~au-widget-mockup-3d-viewer"}[e]||e)+".eitc8cq1ck.js"}if("function"==typeof i){var o=i;i=function(){try{if("function"!=typeof patchAurigmaEditorUrl)throw new Error("WebpackRequireFrom: 'patchAurigmaEditorUrl' is not a function or not available at runtime. See https://github.com/agoldis/webpack-require-from#troubleshooting");var e=patchAurigmaEditorUrl(o.apply(this,arguments));if(!e||"string"!=typeof e)throw new Error("WebpackRequireFrom: 'patchAurigmaEditorUrl' does not return string. See https://github.com/agoldis/webpack-require-from#troubleshooting");return e}catch(t){return console.error(t),o.apply(this,arguments)}}}function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((function(t,i){n=r[e]=[t,i]}));t.push(n[2]=o);var s,l=document.createElement("script");l.charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.src=i(e);var c=new Error;s=function(t){l.onerror=l.onload=null,clearTimeout(u);var n=r[e];if(0!==n){if(n){var i=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",c.name="ChunkLoadError",c.type=i,c.request=o,n[1](c)}r[e]=void 0}};var u=setTimeout((function(){s({type:"timeout",target:l})}),12e4);l.onerror=l.onload=s,document.head.appendChild(l)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="EDITOR_BASE_PATHimports/es8/",a.oe=function(e){throw console.error(e),e};var s=window.multistep_editor_jsonpFunction=window.multistep_editor_jsonpFunction||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var c=0;c<s.length;c++)t(s[c]);var u=l;a(a.s=296)}([function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function i(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function o(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),Object.create,Object.create},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(0),i=n(102),o=n(14),a=n(265),s=n(37);class l{static _appendToHead(e){document.getElementsByTagName("head")[0].appendChild(e)}static _attachEventHandlers(e,t,n){e.readyState?e.onreadystatechange=function(){"load"!==e.readyState&&"loaded"!==e.readyState&&"complete"!==e.readyState||"function"==typeof t&&(e.onreadystatechange=null,t())}:(e.onload=function(){"function"==typeof t&&t()},e.onerror=function(){"function"==typeof n&&n(arguments)})}static initWebComponentsReadyPromise(){let e=window;return e.webComponentsReadyPromise||(e.webComponentsReadyPromise=new Promise((function(t){return e.WebComponents?setTimeout((()=>{t(!0)})):document.addEventListener("WebComponentsReady",(()=>{t(!0)}))}))),e.webComponentsReadyPromise}static loadScript(e,t,n,r){var i;e.toLowerCase().endsWith("au.editor.js")&&(null===(i=window.Aurigma)||void 0===i?void 0:i.UIFramework)&&n();let o=document.createElement("script");o.id=t,o.type="text/javascript",this._attachEventHandlers(o,n,r),this._appendToHead(o),o.src=e}static async loadScriptAsync(e,t){return await new Promise(((n,r)=>{l.loadScript(e,t,n,r)}))}static loadLink(e,t,n,r,i){let o=document.createElement("link");o.type=t||"",o.rel=n,this._attachEventHandlers(o,r,i),this._appendToHead(o),o.href=e}static async loadLinkAsync(e,t,n){return await new Promise(((r,i)=>{l.loadLink(e,t,n,r,i)}))}static loadHtml(e,t=()=>{},n=()=>{},r=!0){let i=new XMLHttpRequest;i.onload=function(){this.status>=200&&this.status<=300?(r&&(e=>{const t=document.createElement("template");t.setAttribute("style","display: none;"),t.innerHTML=e,document.head.appendChild(t.content)})(this.response),t&&t(this.response)):n&&n(this.response)},i.onerror=function(){n&&n()},i.open("get",e,!0),i.send()}static async loadHtmlAsync(e,t=!0){return await new Promise(((n,r)=>{l.loadHtml(e,n,r,t)}))}static loadJson(e){return new Promise(((t,n)=>{let r=new XMLHttpRequest;r.onload=function(){200===this.status?t(JSON.parse(this.response)):404!==this.status&&500!==this.status||n(this.response)},r.open("get",e,!0),r.send()}))}static load(e,t,n,r){const i=this.addTimestampToUrl(e);if(/\.js$/gi.test(e))this.loadScript(e,"",t,n);else if(/\.css$|\.scss$|\.less$/gi.test(e))this.loadLink(r?e:i,"text/css","stylesheet",t,n);else{if(!/\.html$|\.htm$/gi.test(e))throw"bad url: "+e;this.loadHtml(r?e:i,t,n)}}static async loadAsync(e,t){return await new Promise(((n,r)=>{l.load(e,n,r,t)}))}static appendLoadAnimation(e,t){try{let n=["display:flex","align-items:center","justify-content:center","width:100%","height:100%","background-color:rgba(255, 255, 255, 0.9)","color: #666666;","position:absolute","z-index:600"];return e.style.position="relative",e.innerHTML=`\n <div style="${n.join(";")}">\n <au-preloader style="position: relative !important; z-index: 601;" message="${t}"></au-preloader>\n <div style="${n.join(";")}">\n <span style="top: 32px;position: relative;">${t}</span>\n </div>\n </div>`,e.firstElementChild}catch(n){throw"Failed to attach loader element"}}static toggleLoadAnimation(e,t){try{t?(e.removeAttribute("hidden"),e.style.display="flex"):(e.setAttribute("hidden","true"),e.style.display="none")}catch(n){console.warn("Failed to toggle loader element")}}static concatAndResolveUrl(e,t){return e.replace(/\/$/,"")+"/"+t.replace(/^\//,"")}static addTimestampToUrl(e){return e+(-1===e.indexOf("?")?"?":"&")+"t="+Date.now()}}var c,u=l,h=n(46);class d{static DeepMerge(e,t){const n=e=>e&&"object"==typeof e;return n(e)&&n(t)?(Object.keys(t).forEach((r=>{const i=e[r],o=t[r];Array.isArray(i)&&Array.isArray(o)?e[r]=o:n(i)&&n(o)?e[r]=d.DeepMerge(Object.assign({},i),o):e[r]=o})),e):t}static propertyEnsure(e,t,n){return d.isNullOrUndefined(e[t])?e[t]=n:e[t]}static valueEnsure(e,t){return d.isNullOrUndefined(e)?t:e}static valueEnsureMerge(e,t){const n=this.valueEnsure(e,t);return Object.assign(t,n)}static isNullOrUndefined(e){return d.isNull(e)||d.isUndefined(e)}static isUndefined(e){return d.typeofCheck(e,"undefined")}static isNotUndefined(e){return!d.isUndefined(e)}static isNull(e){return null===e}static isNotNullOrUndefined(e){return!d.isNullOrUndefined(e)}static isLengthEqual(e,t){return d.isNotNullOrUndefined(e)&&d.isNotNullOrUndefined(t)&&e.length===t.length}static isEmptyStrOrArray(e){return!!d.isNullOrUndefined(e)||0===e.length}static isEmptyString(e){return d.isEmptyStrOrArray(e)}static isEmptyArray(e){return d.isEmptyStrOrArray(e)}static isNotEmptyArray(e){return!d.isEmptyArray(e)}static clone(e){return Object.assign({},e)}static objectDeepValue(e,t){if(d.isObject(e)){for(var n=0,r=(t=t.replace(/\[([^\]]+)\]/gi,".$1").split(".")).length;n<r;n++)if(e=e[e instanceof Array?+t[n]:t[n]],d.isUndefined(e))return null;return e}return null}static isObjectNotEmpty(e){return d.isNotNullOrUndefined(e)&&Object.keys(e).length>0}static isObject(e){return!(!e||"object"!=typeof e||e instanceof Array)}static isString(e){return"string"==typeof e}static arrayDiffByName(e,t){return d.arrayDiff(e,t,((e,t)=>e.name===t.name),((e,t)=>JSON.stringify(e)!==JSON.stringify(t)))}static arrayDiff(e,t,n=(e,t)=>e===t,r=(e,t)=>!1){let i=[],o=[],a=[],s=[],l=[];e.forEach((e=>{let r=t.find((t=>n(e,t)));d.isNotUndefined(r)?a.push(e):o.push(e)})),t.forEach((t=>{let r=e.find((e=>n(e,t)));d.isUndefined(r)&&i.push(t)}));let c=[];return a.forEach(((e,i)=>{let o=-1;i!==(o=t.indexOf(e))&&-1!==o&&l.push({from:i,to:o,item:e});let a=t.find((t=>n(e,t)&&r(e,t)));d.isNotUndefined(a)&&(c.push(i),s.push(e))})),c.forEach((e=>{a.splice(e,1)})),{added:i,removed:o,updated:s,noChange:a,indexChanged:l}}static JSONStringifyQuotes(e){return JSON.stringify(e).replace(/['"]+/gi,"")}static objectEquals(e,t){return d.JSONStringifyQuotes(e)===d.JSONStringifyQuotes(t)}static tryParseJson(e){try{return JSON.parse(e)}catch(t){return e}}static typeofCheck(e,t){return typeof e===t}static createTemplateDocument(e){let t=document.createElement("template");return t.innerHTML=e,t.content}static createNodeFromString(e){return d.createTemplateDocument(e).firstChild.cloneNode(!0)}static trimAndLowerString(e){return e?e.replace(/\s+/g,"").toLocaleLowerCase():null}static isFunction(e){const t={}.toString.call(e);return e&&("[object Function]"===t||"[object AsyncFunction]"===t)}static isPromise(e){return e&&"[object Promise]"===Object.prototype.toString.call(e)}static isAsyncFunction(e){return!!(e&&e.constructor&&e.constructor.name)&&"AsyncFunction"===e.constructor.name}static recursiveJob(e,t,n=null,r){0===e.length?r(n):t(e.shift(),n).then((n=>{d.recursiveJob(e,t,n,r)})).catch((e=>{r(null,e)}))}static recursiveJobPromise(e,t){let n=Array.prototype.slice.call(e);return new Promise(((e,r)=>{d.recursiveJob(n,t,null,((t,n)=>{n?r(n):e(t)}))}))}static functionWrapperConstructor(e){switch(!0){case Array.isArray(e):return(...t)=>d.recursiveJobPromise(e,((n,r)=>Promise.resolve(n.apply(this.jsonParamsFetcher.scope,0===e.indexOf(n)?t:[r]))));case this.isFunction(e):return(...t)=>e.apply(this.jsonParamsFetcher.scope,t);default:return e=>Promise.resolve()}}static objectPropertyFind(e,t){let n=!1;const r=e=>{switch(!0){case Array.isArray(e):for(let t=0;t<e.length&&!n;t++)r(e[t]);break;case e instanceof Object:let i=Object.keys(e);for(let t=0;t<i.length&&!n;t++)r(i[t]),r(e[i[t]]);break;default:t(e)&&(n=!0)}};return r(e),n}static isNum(e){return/^\d+$/.test(e)}static addTimestampToURL(e,t=!0){if(d.isNotNullOrUndefined(e)){const n=new URL(e);if(""!==n.search&&!1===t)return e;const r=""===n.search?"?":"&",i=(new Date).getTime().toString(),o=4;return e+(r+"t=")+i.slice(0,i.length-o)+"."+i.slice(i.length-o)}}static findDataInResponse(e,t){try{d.isEmptyString(t)&&(t="response");let n=d.tryParseJson(e);return d.typeofCheck(n,"string")?n:new Function("response",`return ${t}`)(n)}catch(n){console.error(n.message,n.stack)}return""}static guid(){const e=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}static getPatchedUrl(e){return window.patchAurigmaEditorUrl(`EDITOR_BASE_PATH${e}`)}static __setAuWizard(e){d.__auWizard=e}static getWizardElement(){return d.__auWizard||document.querySelector("au-wizard")}static loadJson(e){return e.toLowerCase().startsWith("https://")||e.toLowerCase().startsWith("http://")||(e=this.getPatchedUrl(e)),new Promise(((t,n)=>{const r=new XMLHttpRequest;r.onload=function(){this.status>=200&&this.status<=300?t(JSON.parse(this.response)):n(this.response)},r.onerror=function(){n()},r.open("get",e,!0),r.send()}))}static cloneFromDriver(e){if("object"!=typeof e)return e;if(!e)return e;const t=e instanceof Array?[]:{};for(let n in e)e.hasOwnProperty(n)&&(t[n]=this.cloneFromDriver(e[n]));return t}static sessionGuid(){return this._timestamp.toString()}static getOrDefault(e,t){try{const n=d.jsonParamsFetcher.scope,r=Object.keys(n),i=Object.values(n),o=new Function(r.join(","),`return ${e};`).apply(n,i);return void 0===o||"undefined"===o?t:o}catch(n){return t}}static isNullableArray(e){return e.every((e=>null===e))}static isEmptyObject(e){return null==e||0===Object.keys(e).length||""===e}static isSafari(){const e=navigator.userAgent.toLowerCase();return e.search(/safari/)>0&&-1===e.search(/chrome/)}static getBrowser(){const e=window,t=e.navigator.userAgent.toLowerCase();switch(!0){case t.indexOf("edge")>-1:return"edge";case t.indexOf("opr")>-1&&!!e.opr:return"opera";case t.indexOf("chrome")>-1&&!!e.chrome:return"chrome";case t.indexOf("trident")>-1:return"ie";case t.indexOf("firefox")>-1:return"firefox";case t.indexOf("safari")>-1:return"safari";default:return"other"}}static findParent(e,t){if(!e)return null;let n=e,r=null,i=!0;for(;i;)r=n.parentNode||n.host,r?(t(r)&&(i=!1),n=r):i=!1;return r}static IsTrue(e){return!0===e||"true"===e}static readFromLocalStorage(e){return localStorage.getItem(e)}static writeToLocalStorage(e,t){d.isObject(t)||Array.isArray(t)?localStorage.setItem(e,JSON.stringify(t)):localStorage.setItem(e,t)}static async setTimeoutWrapper(e,t,n){for(let r=0;r<n;r++)await new Promise((e=>{setTimeout((()=>{e()}),t)}));return e()}static getDocumentCustomStyles(){return((e,t=document.body,n)=>{const r=window.getComputedStyle(t,n),i={};for(let o of e){let e=r.getPropertyValue(o);e&&(i[o]=e)}return i})(((e=document.styleSheets)=>{const t=[];for(let r of Array.from(e))try{for(let e of Array.from(r.cssRules))try{for(let n of Array.from(e.style))(n.startsWith("--au")||n.startsWith("--theme"))&&-1===t.indexOf(n)&&t.push(n)}catch(n){}}catch(n){}return t})(),document.documentElement)}static async loadHtml(e){return new Promise(((t,n)=>{u.loadHtml(e,(e=>t(e)),(e=>n(e)),!1)}))}static containsAll(e,t){const n=[];let r=!0;for(const i of t)-1===e.indexOf(i)&&(r=!1,n.push(i));return new i.a(r,n)}static objectUndefinedFind(e,t){const n=[],r=(e,i)=>{switch(!0){case Array.isArray(e):for(let t=0;t<e.length;t++)r(e[t],e);break;case e instanceof Object:let i=Object.keys(e);for(let t=0;t<i.length;t++)r(i[t],e),r(e[i[t]],e);break;default:t(e)&&n.push(e)}};return r(e,null),n}static undefinedCriterion(e){return void 0===e||"undefined"===e||"string"==typeof e&&e.indexOf("undefined")>-1}static strAndTruncate(e){return JSON.stringify(e).replace(/['"]+/gi,"")}static ensureArray(e){return Array.isArray(e)?e:null!=e?[e]:[]}static ensureStartsWith(e,t){return e.startsWith(t)?e:t+e}static ensureEndsWith(e,t){return e.endsWith(t)?e:e+t}static removeTrailingSlash(e){return e.endsWith("/")?e.slice(0,-1):e}static isNullOrEmptyString(e){return null==e||""===e||"string"==typeof e&&""===e.trim()}static parseJwt(e){const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(t).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join(""));return JSON.parse(n)}static deepSearch(e,t,n){if(null==e)return null;if(e.hasOwnProperty(t)&&!0===n(t,e[t]))return e;const r=Object.keys(e);for(let i=0;i<r.length;i++){const o=e[r[i]];if("object"==typeof o&&null!=o){const o=d.deepSearch(e[r[i]],t,n);if(null!==o)return o}}return null}static isMobile(){return window.innerWidth<769}static executeTimeout(e,t){t.forEach((t=>setTimeout(e,t)))}static applyMixins(e,t){t.forEach((t=>{Object.getOwnPropertyNames(t.prototype).forEach((n=>{"constructor"!==n&&(e.prototype[n]=t.prototype[n])}))}))}static openFullscreen(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}static closeFullscreen(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()}static getSafeName(e){let t="";return t="string"==typeof e?e:e.title||e.name,t=this.computeValue(t),t.replace(/[^a-z0-9]/g,(function(e){let t=e.charCodeAt(0);return 32===t?"-":t>=65&&t<=90?"_"+e.toLowerCase():"__"+("000"+t.toString(16)).slice(-4)}))}static computeValue(e){if(-1!==e.indexOf("{{")&&-1!==e.indexOf("}}")){let t=new o.a,n={value:e,vars:this.jsonParamsFetcher.head};return n[o.a.SCOPE_HEAD_KEY]=this.jsonParamsFetcher.head,t.process(n,this.jsonParamsFetcher.scope).value}return e}static async computeFunction(e){const t=new o.a,n={func:e,vars:this.jsonParamsFetcher.head},r=t.process(n,this.jsonParamsFetcher.scope),i=d.functionWrapperConstructor(r.func);try{return await i()}catch(a){return!0}}static getNameOrTitle(e){return this.computeValue(e.name||e.title)}static async downloadFilesAsZip(e){let t=new a;await Promise.all(e.map((e=>async function(e){const n=await fetch(e.url),r=await n.blob();let i=e.filename;if(-1===i.indexOf(".")){const t=e.url.split("."),n=t[t.length-1];e.url.endsWith(n)&&(i+="."+n)}t.file(i,r)}(e))));const n=await t.generateAsync({type:"blob"});return URL.createObjectURL(n)}static async downloadFile(e,t,n=!1){let r=document.createElement("a");if(r.setAttribute("style","position:absolute; top: -99999px; left: -99999px"),document.body.appendChild(r),n)d.isMobile()||(r.target="_blank"),r.href=e;else try{let t=await fetch(e),n=await t.blob();r.href=URL.createObjectURL(n)}catch(i){d.isMobile()||(r.target="_blank"),r.href=e,console.error(i)}r.download=t,r.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1})),document.body.removeChild(r)}static addCssStyles(e,t,n){const r=document.createElement("style"),i="style_"+t;r.type="text/css",r.id=i,r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e));const o=n.querySelectorAllShadow?n.querySelectorAllShadow("style#"+i):n.querySelectorAll("style#"+i);o&&o.length>0&&o.forEach((e=>e.remove())),n.shadowRoot?n.shadowRoot.append(r):n.append(r)}static maybeGet(e){const t=e();return null==t?s.Maybe.nothing():s.Maybe.just(t)}}c=d,d.instanceGuid=c.guid(),d.CC_SCRIPT_RELATIVE_PATH="Resources/Generated/IframeApi.js",d._timestamp=Date.now(),Object(r.a)([Object(h.b)("JsonVariablesWidgetFetcherService"),Object(r.b)("design:type",Object)],d,"jsonParamsFetcher",void 0)},function(e,t,n){"use strict";function r(e,t){return n=>{if(n.is?e=n.is:n.is=e,!customElements.get(e)){t&&Object.defineProperty(n,"template",{get(){const e=document.createElement("template");return e.innerHTML=t,e}});try{customElements.define(e,n)}catch(r){throw`can't define ${e} ${r}`}}}}function i(e){return(t,n)=>{!function(e,t,n){e.constructor.hasOwnProperty("properties")||Object.defineProperty(e.constructor,"properties",{value:{},configurable:!0});const r=Object.assign(Object.assign({},e.constructor.properties[t]),n);if(!r.type){const n=window.Reflect;n&&n.hasMetadata&&n.getMetadata&&n.hasMetadata("design:type",e,t)?r.type=n.getMetadata("design:type",e,t):console.error(`A type could not be found for ${t}. Set a type or configure Metadata Reflection API support.`)}e.constructor.properties[t]=r}(t,n,e)}}function o(...e){return(t,n)=>{t.constructor.hasOwnProperty("observers")||Object.defineProperty(t.constructor,"observers",{value:[]}),t.constructor.observers.push(`${n}(${e.join(",")})`)}}function a(e){return t=>(n,r)=>{Object.defineProperty(n,r,{get(){return e(this.shadowRoot,t)},enumerable:!0,configurable:!0})}}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n(298),a(((e,t)=>e.querySelector(t))),a(((e,t)=>e.querySelectorAll(t)))},function(e,t,n){"use strict";(function(e,r,i){var o=n(156);const{toString:a}=Object.prototype,{getPrototypeOf:s}=Object,l=(c=Object.create(null),e=>{const t=a.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const u=e=>(e=e.toLowerCase(),t=>l(t)===e),h=e=>t=>typeof t===e,{isArray:d}=Array,p=h("undefined"),f=u("ArrayBuffer"),g=h("string"),m=h("function"),v=h("number"),_=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==l(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},b=u("Date"),A=u("File"),w=u("Blob"),x=u("FileList"),O=u("URLSearchParams"),[S,C,E,T]=["ReadableStream","Request","Response","Headers"].map(u);function P(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),d(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function k(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e,I=e=>!p(e)&&e!==M,z=(j="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>j&&e instanceof j);var j;const L=u("HTMLFormElement"),R=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),N=u("RegExp"),D=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};P(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},B="abcdefghijklmnopqrstuvwxyz",F="0123456789",H={DIGIT:F,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+F},U=u("AsyncFunction"),V=(W="function"==typeof r,q=m(M.postMessage),W?r:q?(K=`axios@${Math.random()}`,$=[],M.addEventListener("message",(({source:e,data:t})=>{e===M&&t===K&&$.length&&$.shift()()}),!1),e=>{$.push(e),M.postMessage(K,"*")}):e=>setTimeout(e));var W,q,K,$;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(M):void 0!==i&&i.nextTick||V;t.a={isArray:d,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=l(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:g,isNumber:v,isBoolean:e=>!0===e||!1===e,isObject:_,isPlainObject:y,isReadableStream:S,isRequest:C,isResponse:E,isHeaders:T,isUndefined:p,isDate:b,isFile:A,isBlob:w,isRegExp:N,isFunction:m,isStream:e=>_(e)&&m(e.pipe),isURLSearchParams:O,isTypedArray:z,isFileList:x,forEach:P,merge:function e(){const{caseless:t}=I(this)&&this||{},n={},r=(r,i)=>{const o=t&&k(n,i)||i;y(n[o])&&y(r)?n[o]=e(n[o],r):y(r)?n[o]=e({},r):d(r)?n[o]=r.slice():n[o]=r};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&P(arguments[i],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(P(t,((t,r)=>{n&&m(t)?e[r]=Object(o.a)(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const l={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:u,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!v(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:L,hasOwnProperty:R,hasOwnProp:R,reduceDescriptors:D,freezeMethods:e=>{D(e,((t,n)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];m(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return d(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:k,global:M,isContextDefined:I,ALPHABET:H,generateString:(e=16,t=H.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=d(e)?[]:{};return P(e,((e,t)=>{const o=n(e,r+1);!p(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:U,isThenable:e=>e&&(_(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:V,asap:G}}).call(this,n(53),n(200).setImmediate,n(124))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(100);n(22); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const i=function(e){let t;return t="function"==typeof e?e:i.Class(e),e._legacyForceObservedAttributes&&(t.prototype._legacyForceObservedAttributes=e._legacyForceObservedAttributes),customElements.define(t.is,t),t};i.Class=r.a},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return g})),n(22);var r=n(8),i=(n(9),n(150)),o=n(18); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ function a(e){return"slot"===e.localName}let s=class{static getFlattenedNodes(e){const t=Object(r.a)(e);return a(e)?t.assignedNodes({flatten:!0}):Array.from(t.childNodes).map((e=>a(e)?Object(r.a)(e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){a(this._target)?this._listenSlots([this._target]):Object(r.a)(this._target).children&&(this._listenSlots(Object(r.a)(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){a(this._target)?this._unlistenSlots([this._target]):Object(r.a)(this._target).children&&(this._unlistenSlots(Object(r.a)(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,o.c.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let n=e[t];n.addedNodes&&this._listenSlots(n.addedNodes),n.removedNodes&&this._unlistenSlots(n.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),n=Object(i.a)(t,this._effectiveNodes);for(let i,o=0;o<n.length&&(i=n[o]);o++)for(let t,n=0;n<i.removed.length&&(t=i.removed[n]);n++)e.removedNodes.push(t);for(let i,o=0;o<n.length&&(i=n[o]);o++)for(let n=i.index;n<i.index+i.addedCount;n++)e.addedNodes.push(t[n]);this._effectiveNodes=t;let r=!1;return(e.addedNodes.length||e.removedNodes.length)&&(r=!0,this.callback.call(this._target,e)),r}_listenSlots(e){for(let t=0;t<e.length;t++){let n=e[t];a(n)&&n.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let n=e[t];a(n)&&n.removeEventListener("slotchange",this._boundSchedule)}}};n(41),n(34); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const l=Element.prototype,c=l.matches||l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector,u=function(e,t){return c.call(e,t)};class h{constructor(e){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(e),this.node=e}observeNodes(e){return new s(this.node,e)}unobserveNodes(e){e.disconnect()}notifyObserver(){}deepContains(e){if(Object(r.a)(this.node).contains(e))return!0;let t=e,n=e.ownerDocument;for(;t&&t!==n&&t!==this.node;)t=Object(r.a)(t).parentNode||Object(r.a)(t).host;return t===this.node}getOwnerRoot(){return Object(r.a)(this.node).getRootNode()}getDistributedNodes(){return"slot"===this.node.localName?Object(r.a)(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let e=[],t=Object(r.a)(this.node).assignedSlot;for(;t;)e.push(t),t=Object(r.a)(t).assignedSlot;return e}importNode(e,t){let n=this.node instanceof Document?this.node:this.node.ownerDocument;return Object(r.a)(n).importNode(e,t)}getEffectiveChildNodes(){return s.getFlattenedNodes(this.node)}queryDistributedElements(e){let t=this.getEffectiveChildNodes(),n=[];for(let r,i=0,o=t.length;i<o&&(r=t[i]);i++)r.nodeType===Node.ELEMENT_NODE&&u(r,e)&&n.push(r);return n}get activeElement(){let e=this.node;return void 0!==e._activeElement?e._activeElement:e.activeElement}}function d(e,t){for(let n=0;n<t.length;n++){let r=t[n];Object.defineProperty(e,r,{get:function(){return this.node[r]},configurable:!0})}}class p{constructor(e){this.event=e}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}}h.prototype.cloneNode,h.prototype.appendChild,h.prototype.insertBefore,h.prototype.removeChild,h.prototype.replaceChild,h.prototype.setAttribute,h.prototype.removeAttribute,h.prototype.querySelector,h.prototype.querySelectorAll,h.prototype.parentNode,h.prototype.firstChild,h.prototype.lastChild,h.prototype.nextSibling,h.prototype.previousSibling,h.prototype.firstElementChild,h.prototype.lastElementChild,h.prototype.nextElementSibling,h.prototype.previousElementSibling,h.prototype.childNodes,h.prototype.children,h.prototype.classList,h.prototype.textContent,h.prototype.innerHTML;let f=h;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class e extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(h.prototype).forEach((t=>{"activeElement"!=t&&(e.prototype[t]=h.prototype[t])})),d(e.prototype,["classList"]),f=e,Object.defineProperties(p.prototype,{localTarget:{get(){const e=this.event.currentTarget,t=e&&g(e).getOwnerRoot(),n=this.path;for(let r=0;r<n.length;r++){const e=n[r];if(g(e).getOwnerRoot()===t)return e}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else!function(e,t){for(let n=0;n<t.length;n++){let r=t[n];e[r]=function(){return this.node[r].apply(this.node,arguments)}}}(h.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll"]),d(h.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList"]),function(e,t){for(let n=0;n<t.length;n++){let r=t[n];Object.defineProperty(e,r,{get:function(){return this.node[r]},set:function(e){this.node[r]=e},configurable:!0})}}(h.prototype,["textContent","innerHTML","className"]);const g=function(e){if((e=e||document)instanceof f)return e;if(e instanceof p)return e;let t=e.__domApi;return t||(t=e instanceof Event?new p(e):new f(e),e.__domApi=t),t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return I.a})),n.d(t,"a",(function(){return z}));var r=n(84),i=(n(4),n(192),n(22),n(85)),o=n(70),a=n(153),s=n(9),l=n(8),c=n(101); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const u=Object(a.a)(Object(o.b)(Object(i.a)(HTMLElement)));customElements.get("dom-bind")||customElements.define("dom-bind",class extends u{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),s.m)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(e,t,n,r){this.mutableData=!0}connectedCallback(){Object(c.a)()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){Object(l.a)(Object(l.a)(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let e=0;e<this.__children.length;e++)this.root.appendChild(this.__children[e])}render(){let e;if(!this.__children){if(e=e||this.querySelector("template"),!e){let t=new MutationObserver((()=>{if(e=this.querySelector("template"),!e)throw new Error("dom-bind requires a <template> child");t.disconnect(),this.render()}));return void t.observe(this,{childList:!0})}this.root=this._stampTemplate(e),this.$=this.root.$,this.__children=[];for(let e=this.root.firstChild;e;e=e.nextSibling)this.__children[this.__children.length]=e;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}}),n(295);var h=n(51),d=n(34),p=n(41),f=n(18),g=n(10),m=n(59); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ class v extends h.a{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=d.a.debounce(this.__renderDebouncer,f.c,(()=>this.__render())),Object(p.a)(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const e=Object(l.a)(this).parentNode;e&&(e.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||Object(l.a)(e).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),Object(c.a)()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const e=this;let t=e._templateInfo?e:Object(l.a)(e).querySelector("template");if(!t){let e=new MutationObserver((()=>{if(!Object(l.a)(this).querySelector("template"))throw new Error("dom-if requires a <template> child");e.disconnect(),this.__render()}));return e.observe(this,{childList:!0}),!1}this.__template=t}return!0}__ensureInstance(){let e=Object(l.a)(this).parentNode;if(this.__hasInstance()){let t=this.__getInstanceNodes();if(t&&t.length&&Object(l.a)(this).previousSibling!==t[t.length-1])for(let n,r=0;r<t.length&&(n=t[r]);r++)Object(l.a)(e).insertBefore(n,this)}else{if(!e)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(e)}return!0}render(){Object(p.b)()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),s.o&&!this.notifyDomChange||this.if==this._lastIf||(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(e){}__teardownInstance(){}_showHideChildren(){}}const _=s.c?class extends v{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(e){const t=this.__dataHost||this;if(s.m&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");const n=t._bindTemplate(this.__template,!0);n.runEffects=(e,t,n)=>{let r=this.__syncInfo;if(this.if)r&&(this.__syncInfo=null,this._showHideChildren(),t=Object.assign(r.changedProps,t)),e(t,n);else if(this.__instance)if(r||(r=this.__syncInfo={runEffects:e,changedProps:{}}),n)for(const i in t){const e=Object(g.g)(i);r.changedProps[e]=this.__dataHost[e]}else Object.assign(r.changedProps,t)},this.__instance=t._stampTemplate(this.__template,n),Object(l.a)(e).insertBefore(this.__instance,this)}__syncHostProperties(){const e=this.__syncInfo;e&&(this.__syncInfo=null,e.runEffects(e.changedProps,!1))}__teardownInstance(){const e=this.__dataHost||this;this.__instance&&(e._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,Object(m.b)(e,this.__instance.templateInfo.childNodes)),e||this.__syncHostProperties()}}:class extends v{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(e){this.__ctor||(this.__ctor=Object(m.c)(this.__template,this,{mutableData:!0,forwardHostProp:function(e,t){this.__instance&&(this.if?this.__instance.forwardHostProp(e,t):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[Object(g.g)(e)]=!0))}})),this.__instance=new this.__ctor,Object(l.a)(e).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let e=this.__instance.children;if(e&&e.length){let t=Object(l.a)(e[0]).parentNode;if(t){t=Object(l.a)(t);for(let n,r=0;r<e.length&&(n=e[r]);r++)t.removeChild(n)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let e=this.__invalidProps;if(e){this.__invalidProps=null;for(let t in e)this.__instance._setPendingProperty(t,this.__dataHost[t]);this.__instance._flushProperties()}}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,this.__instance._showHideChildren(e)),e||this.__syncHostProperties()}};customElements.get("dom-if")||customElements.define(_.is,_);var y=n(23),b=n(150),A=n(58); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ let w=Object(y.a)((e=>{let t=Object(A.a)(e);return class extends t{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(e,t){let n=t.path;if(n==JSCompiler_renameProperty("items",this)){let n=t.base||[],r=this.__lastItems;if(e!==this.__lastMulti&&this.clearSelection(),r){let e=Object(b.a)(n,r);this.__applySplices(e)}this.__lastItems=n,this.__lastMulti=e}else if(t.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(t.value.indexSplices);else{let e=n.slice(`${JSCompiler_renameProperty("items",this)}.`.length),t=parseInt(e,10);e.indexOf(".")<0&&e==t&&this.__deselectChangedIdx(t)}}__applySplices(e){let t=this.__selectedMap;for(let r=0;r<e.length;r++){let n=e[r];t.forEach(((e,r)=>{e<n.index||(e>=n.index+n.removed.length?t.set(r,e+n.addedCount-n.removed.length):t.set(r,-1))}));for(let e=0;e<n.addedCount;e++){let r=n.index+e;t.has(this.items[r])&&t.set(this.items[r],r)}}this.__updateLinks();let n=0;t.forEach(((e,r)=>{e<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),n,1):this.selected=this.selectedItem=null,t.delete(r)):n++}))}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let e=0;this.__selectedMap.forEach((t=>{t>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${t}`,`${JSCompiler_renameProperty("selected",this)}.${e++}`)}))}else this.__selectedMap.forEach((e=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${e}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${e}`)}))}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(e){return this.__selectedMap.has(e)}isIndexSelected(e){return this.isSelected(this.items[e])}__deselectChangedIdx(e){let t=this.__selectedIndexForItemIndex(e);if(t>=0){let e=0;this.__selectedMap.forEach(((n,r)=>{t==e++&&this.deselect(r)}))}}__selectedIndexForItemIndex(e){let t=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${e}`];if(t)return parseInt(t.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(e){let t=this.__selectedMap.get(e);if(t>=0){let n;this.__selectedMap.delete(e),this.multi&&(n=this.__selectedIndexForItemIndex(t)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),n,1):this.selected=this.selectedItem=null}}deselectIndex(e){this.deselect(this.items[e])}select(e){this.selectIndex(this.items.indexOf(e))}selectIndex(e){let t=this.items[e];this.isSelected(t)?this.toggle&&this.deselectIndex(e):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(t,e),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),t):this.selected=this.selectedItem=t)}}}))(h.a);class x extends w{static get is(){return"array-selector"}static get template(){return null}}customElements.get("array-selector")||customElements.define(x.is,x);var O=n(195),S=n(72),C=n(29); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const E=new O.a;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(e,t,n){},prepareTemplateDom(e,t){},prepareTemplateStyles(e,t,n){},styleSubtree(e,t){E.processStyles(),Object(S.c)(e,t)},styleElement(e){E.processStyles()},styleDocument(e){E.processStyles(),Object(S.c)(document.body,e)},getComputedStyleValue:(e,t)=>Object(S.b)(e,t),flushCustomStyles(){},nativeCss:C.c,nativeShadow:C.d,cssBuild:C.a,disableRuntime:C.b}),window.ShadyCSS.CustomStyleInterface=E;var T=n(117); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const P="include",k=window.ShadyCSS.CustomStyleInterface;class M extends HTMLElement{constructor(){super(),this._style=null,k.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const e=this.querySelector("style");if(!e)return null;this._style=e;const t=e.getAttribute(P);return t&&(e.removeAttribute(P),e.textContent=Object(T.a)(t)+e.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}customElements.get("custom-style")||window.customElements.define("custom-style",M),n(193);var I=n(7); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const z=Object(r.a)(HTMLElement).prototype},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n(22); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ class r{constructor(e){this.value=e.toString()}toString(){return this.value}}const i=function(e,...t){const n=document.createElement("template");return n.innerHTML=t.reduce(((t,n,i)=>t+f