@creaditor/newsletter-starterkit
Version:
Creaditor Newsletter Editor - Starterkit for creating beautiful email newsletters
34 lines (32 loc) • 2.27 MB
JavaScript
/*! For license information please see creaditor.bundle.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Creaditor",[],e):"object"==typeof exports?exports.Creaditor=e():t.Creaditor=e()}("undefined"!=typeof self?self:this,(()=>(()=>{var t,e,n,r,i={10856:(t,e,n)=>{"use strict";n.d(e,{N:()=>o});n(94002);var r=n(50696),i=n(24931);const o=(0,r.k)({_template:i.d`
<style>
:host {
display: inline-block;
position: fixed;
clip: rect(0px,0px,0px,0px);
}
</style>
<div aria-live$="[[mode]]">[[_text]]</div>
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){o.instance||(o.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(t){this._text="",this.async((function(){this._text=t}),this.timeout)},_onIronAnnounce:function(t){t.detail&&t.detail.text&&this.announce(t.detail.text)}});o.instance=null,o.requestAvailability=function(){o.instance||(o.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(o.instance):document.addEventListener("load",(function(){document.body.appendChild(o.instance)}))}},33972:(t,e,n)=>{"use strict";n.d(e,{G:()=>m});n(94002);var r={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},i={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},o={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},s=/[a-z0-9*]/,a=/U\+/,l=/^arrow/,c=/^space(bar)?/,d=/^escape$/;function p(t,e){var n="";if(t){var r=t.toLowerCase();" "===r||c.test(r)?n="space":d.test(r)?n="esc":1==r.length?e&&!s.test(r)||(n=r):n=l.test(r)?r.replace("arrow",""):"multiply"==r?"*":r}return n}function h(t,e){return t.key?p(t.key,e):t.detail&&t.detail.key?p(t.detail.key,e):(n=t.keyIdentifier,o="",n&&(n in r?o=r[n]:a.test(n)?(n=parseInt(n.replace("U+","0x"),16),o=String.fromCharCode(n).toLowerCase()):o=n.toLowerCase()),o||function(t){var e="";return Number(t)&&(e=t>=65&&t<=90?String.fromCharCode(32+t):t>=112&&t<=123?"f"+(t-112+1):t>=48&&t<=57?String(t-48):t>=96&&t<=105?String(t-96):i[t]),e}(t.keyCode)||"");var n,o}function u(t,e){return h(e,t.hasModifiers)===t.key&&(!t.hasModifiers||!!e.shiftKey==!!t.shiftKey&&!!e.ctrlKey==!!t.ctrlKey&&!!e.altKey==!!t.altKey&&!!e.metaKey==!!t.metaKey)}function f(t){return t.trim().split(" ").map((function(t){return function(t){return 1===t.length?{combo:t,key:t,event:"keydown"}:t.split("+").reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return r in o?(t[o[r]]=!0,t.hasModifiers=!0):(t.key=r,t.event=i||"keydown"),t}),{combo:t.split(":").shift()})}(t)}))}const m={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(t,e){this._imperativeKeyBindings[t]=e,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(t,e){for(var n=f(e),r=0;r<n.length;++r)if(u(n[r],t))return!0;return!1},_collectKeyBindings:function(){var t=this.behaviors.map((function(t){return t.keyBindings}));return-1===t.indexOf(this.keyBindings)&&t.push(this.keyBindings),t},_prepKeyBindings:function(){for(var t in this._keyBindings={},this._collectKeyBindings().forEach((function(t){for(var e in t)this._addKeyBinding(e,t[e])}),this),this._imperativeKeyBindings)this._addKeyBinding(t,this._imperativeKeyBindings[t]);for(var e in this._keyBindings)this._keyBindings[e].sort((function(t,e){var n=t[0].hasModifiers;return n===e[0].hasModifiers?0:n?-1:1}))},_addKeyBinding:function(t,e){f(t).forEach((function(t){this._keyBindings[t.event]=this._keyBindings[t.event]||[],this._keyBindings[t.event].push([t,e])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(t){var e=this._keyBindings[t],n=this._onKeyBindingEvent.bind(this,e);this._boundKeyHandlers.push([this.keyEventTarget,t,n]),this.keyEventTarget.addEventListener(t,n)}),this)},_unlistenKeyEventListeners:function(){for(var t,e,n,r;this._boundKeyHandlers.length;)e=(t=this._boundKeyHandlers.pop())[0],n=t[1],r=t[2],e.removeEventListener(n,r)},_onKeyBindingEvent:function(t,e){if(this.stopKeyboardEventPropagation&&e.stopPropagation(),!e.defaultPrevented)for(var n=0;n<t.length;n++){var r=t[n][0],i=t[n][1];if(u(r,e)&&(this._triggerKeyHandler(r,i,e),e.defaultPrevented))return}},_triggerKeyHandler:function(t,e,n){var r=Object.create(t);r.keyboardEvent=n;var i=new CustomEvent(t.event,{detail:r,cancelable:!0});this[e].call(this,i),i.defaultPrevented&&n.preventDefault()}}},15622:(t,e,n)=>{"use strict";n.d(e,{$:()=>I,Q:()=>O});n(94002);var r=n(3572);let i;const o={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var t=(0,r.vz)(this).parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(t=t.host),t},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},get _isRTL(){return void 0===this._memoizedIsRTL&&(this._memoizedIsRTL="rtl"==window.getComputedStyle(this).direction),this._memoizedIsRTL},attached:function(){this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var t=window.getComputedStyle(this),e=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==t.top?"top":"auto"!==t.bottom?"bottom":null,horizontally:"auto"!==t.left?"left":"auto"!==t.right?"right":null},sizedBy:{height:"none"!==e.maxHeight,width:"none"!==e.maxWidth,minWidth:parseInt(e.minWidth,10)||0,minHeight:parseInt(e.minHeight,10)||0},margin:{top:parseInt(t.marginTop,10)||0,right:parseInt(t.marginRight,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0}}}},resetFit:function(){var t=this._fitInfo||{};for(var e in t.sizerInlineStyle)this.sizingTarget.style[e]=t.sizerInlineStyle[e];for(var e in t.inlineStyle)this.style[e]=t.inlineStyle[e];this._fitInfo=null},refit:function(){var t=this.sizingTarget.scrollLeft,e=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=t,this.sizingTarget.scrollTop=e},position:function(){if(!this.__shouldPosition)return;this._discoverInfo(),window.ShadyDOM&&window.ShadyDOM.flush(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var t=this.getBoundingClientRect(),e=this.__getNormalizedRect(this.positionTarget),n=this.__getNormalizedRect(this.fitInto);let r,o,s,a;this.expandSizingTargetForScrollbars&&(r=this.sizingTarget.offsetWidth,o=this.sizingTarget.offsetHeight,s=this.sizingTarget.clientWidth,a=this.sizingTarget.clientHeight);var l=this._fitInfo.margin,c={width:t.width+l.left+l.right,height:t.height+l.top+l.bottom},d=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,c,t,e,n),p=d.left+l.left,h=d.top+l.top,u=Math.min(n.right-l.right,p+t.width),f=Math.min(n.bottom-l.bottom,h+t.height);p=Math.max(n.left+l.left,Math.min(p,u-this._fitInfo.sizedBy.minWidth)),h=Math.max(n.top+l.top,Math.min(h,f-this._fitInfo.sizedBy.minHeight));const m=Math.max(u-p,this._fitInfo.sizedBy.minWidth),g=Math.max(f-h,this._fitInfo.sizedBy.minHeight);this.sizingTarget.style.maxWidth=m+"px",this.sizingTarget.style.maxHeight=g+"px";const b=p-t.left,y=h-t.top;if(this.style.left=`${b}px`,this.style.top=`${y}px`,this.expandSizingTargetForScrollbars){const t=this.sizingTarget.offsetHeight,e=t-this.sizingTarget.clientHeight-(o-a);if(e>0){const r=n.height-l.top-l.bottom,i=Math.min(r,g+e);this.sizingTarget.style.maxHeight=`${i}px`;const o=this.sizingTarget.offsetHeight,s=o-t;let a;"top"===d.verticalAlign?a=y:"middle"===d.verticalAlign?a=y-s/2:"bottom"===d.verticalAlign&&(a=y-s),a=Math.max(n.top+l.top,Math.min(a,n.bottom-l.bottom-o)),this.style.top=`${a}px`}const c=this.sizingTarget.offsetWidth,p=c-this.sizingTarget.clientWidth-(r-s);if(p>0){const t=(()=>{if(void 0!==i)return i;const t=document.createElement("div");Object.assign(t.style,{overflow:"auto",position:"fixed",left:"0px",top:"0px",maxWidth:"100px",maxHeight:"100px"});const e=document.createElement("div");return e.style.width="200px",e.style.height="200px",t.appendChild(e),document.body.appendChild(t),i=Math.abs(t.offsetWidth-100)>1?t.offsetWidth-t.clientWidth:0,document.body.removeChild(t),i})(),e=n.width-l.left-l.right,r=Math.min(e,m+p-t);this.sizingTarget.style.maxWidth=`${r}px`;const o=this.sizingTarget.offsetWidth+t,s=o-c;let a;"left"===d.horizontalAlign?a=b:"center"===d.horizontalAlign?a=b-s/2:"right"===d.horizontalAlign&&(a=b-s),a=Math.max(n.left+l.left,Math.min(a,n.right-l.right-o)),this.style.left=`${a}px`}}},constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var t=this._fitInfo;t.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),t.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var e=this.getBoundingClientRect();t.sizedBy.height||this.__sizeDimension(e,t.positionedBy.vertically,"top","bottom","Height"),t.sizedBy.width||this.__sizeDimension(e,t.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(t,e,n,r,i){this.__sizeDimension(t,e,n,r,i)},__sizeDimension:function(t,e,n,r,i){var o=this._fitInfo,s=this.__getNormalizedRect(this.fitInto),a="Width"===i?s.width:s.height,l=e===r,c=l?a-t[r]:t[n],d=o.margin[l?n:r],p="offset"+i,h=this[p]-this.sizingTarget[p];this.sizingTarget.style["max"+i]=a-d-c-h+"px"},center:function(){if(!this.__shouldPosition){this._discoverInfo();var t=this._fitInfo.positionedBy;if(!t.vertically||!t.horizontally){this.style.position="fixed",t.vertically||(this.style.top="0px"),t.horizontally||(this.style.left="0px");var e=this.getBoundingClientRect(),n=this.__getNormalizedRect(this.fitInto);if(!t.vertically){var r=n.top-e.top+(n.height-e.height)/2;this.style.top=r+"px"}if(!t.horizontally){var i=n.left-e.left+(n.width-e.width)/2;this.style.left=i+"px"}}}},__getNormalizedRect:function(t){return t===document.documentElement||t===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:t.getBoundingClientRect()},__getOffscreenArea:function(t,e,n){var r=Math.min(0,t.top)+Math.min(0,n.bottom-(t.top+e.height)),i=Math.min(0,t.left)+Math.min(0,n.right-(t.left+e.width));return Math.abs(r)*e.width+Math.abs(i)*e.height},__getPosition:function(t,e,n,r,i,o){var s,a=[{verticalAlign:"top",horizontalAlign:"left",top:i.top+this.verticalOffset,left:i.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:i.top+this.verticalOffset,left:i.right-n.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:i.bottom-n.height-this.verticalOffset,left:i.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:i.bottom-n.height-this.verticalOffset,left:i.right-n.width-this.horizontalOffset}];if(this.noOverlap){for(var l=0,c=a.length;l<c;l++){var d={};for(var p in a[l])d[p]=a[l][p];a.push(d)}a[0].top=a[1].top+=i.height,a[2].top=a[3].top-=i.height,a[4].left=a[6].left+=i.width,a[5].left=a[7].left-=i.width}e="auto"===e?null:e,(t="auto"===t?null:t)&&"center"!==t||(a.push({verticalAlign:"top",horizontalAlign:"center",top:i.top+this.verticalOffset+(this.noOverlap?i.height:0),left:i.left-r.width/2+i.width/2+this.horizontalOffset}),a.push({verticalAlign:"bottom",horizontalAlign:"center",top:i.bottom-n.height-this.verticalOffset-(this.noOverlap?i.height:0),left:i.left-r.width/2+i.width/2+this.horizontalOffset})),e&&"middle"!==e||(a.push({verticalAlign:"middle",horizontalAlign:"left",top:i.top-r.height/2+i.height/2+this.verticalOffset,left:i.left+this.horizontalOffset+(this.noOverlap?i.width:0)}),a.push({verticalAlign:"middle",horizontalAlign:"right",top:i.top-r.height/2+i.height/2+this.verticalOffset,left:i.right-n.width-this.horizontalOffset-(this.noOverlap?i.width:0)})),"middle"===e&&"center"===t&&a.push({verticalAlign:"middle",horizontalAlign:"center",top:i.top-r.height/2+i.height/2+this.verticalOffset,left:i.left-r.width/2+i.width/2+this.horizontalOffset});for(l=0;l<a.length;l++){var h=a[l],u=h.verticalAlign===e,f=h.horizontalAlign===t;if(!this.dynamicAlign&&!this.noOverlap&&u&&f){s=h;break}var m=(!e||u)&&(!t||f);if(this.dynamicAlign||m){if(h.offscreenArea=this.__getOffscreenArea(h,n,o),0===h.offscreenArea&&m){s=h;break}s=s||h;var g=h.offscreenArea-s.offscreenArea;(g<0||0===g&&(u||f))&&(s=h)}}return s}};var s=n(14326),a=new Set;const l={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(a.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(t){this.resizerShouldNotify(t)&&this._notifyDescendant(t)}),this),this._fireResize())},assignParentResizable:function(t){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=t,t&&-1===t._interestedResizables.indexOf(this)&&(t._interestedResizables.push(this),t._subscribeIronResize(this))},stopResizeNotificationsFor:function(t){var e=this._interestedResizables.indexOf(t);e>-1&&(this._interestedResizables.splice(e,1),this._unsubscribeIronResize(t))},_subscribeIronResize:function(t){t.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(t){t.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(t){return!0},_onDescendantIronResize:function(t){this._notifyingDescendant?t.stopPropagation():s.my||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(t){var e=(0,r.vz)(t).rootTarget;e!==this&&(e.assignParentResizable(this),this._notifyDescendant(e),t.stopPropagation())},_parentResizableChanged:function(t){t&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(t){this.isAttached&&(this._notifyingDescendant=!0,t.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var t=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function e(){document.removeEventListener("readystatechange",e),t()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(t){t!==this&&t._findParent()}),this):(a.forEach((function(t){t!==this&&t._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?a.delete(this):a.add(this)}};var c=Element.prototype,d=c.matches||c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector;const p=new class{getTabbableNodes(t){var e=[];return this._collectTabbableNodes(t,e)?this._sortByTabIndex(e):e}isFocusable(t){return d.call(t,"input, select, textarea, button, object")?d.call(t,":not([disabled])"):d.call(t,"a[href], area[href], iframe, [tabindex], [contentEditable]")}isTabbable(t){return this.isFocusable(t)&&d.call(t,':not([tabindex="-1"])')&&this._isVisible(t)}_normalizedTabIndex(t){if(this.isFocusable(t)){var e=t.getAttribute("tabindex")||0;return Number(e)}return-1}_collectTabbableNodes(t,e){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var n=t;if(!this._isVisible(n))return!1;var i,o=this._normalizedTabIndex(n),s=o>0;o>=0&&e.push(n),i="content"===n.localName||"slot"===n.localName?(0,r.vz)(n).getDistributedNodes():(0,r.vz)(n.root||n).children;for(var a=0;a<i.length;a++)s=this._collectTabbableNodes(i[a],e)||s;return s}_isVisible(t){var e=t.style;return"hidden"!==e.visibility&&"none"!==e.display&&("hidden"!==(e=window.getComputedStyle(t)).visibility&&"none"!==e.display)}_sortByTabIndex(t){var e=t.length;if(e<2)return t;var n=Math.ceil(e/2),r=this._sortByTabIndex(t.slice(0,n)),i=this._sortByTabIndex(t.slice(n));return this._mergeSortByTabIndex(r,i)}_mergeSortByTabIndex(t,e){for(var n=[];t.length>0&&e.length>0;)this._hasLowerTabOrder(t[0],e[0])?n.push(e.shift()):n.push(t.shift());return n.concat(t,e)}_hasLowerTabOrder(t,e){var n=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===n||0===r?r>n:n>r}};var h=n(50696),u=n(24931);(0,h.k)({_template:u.d`
<style>
:host {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--iron-overlay-backdrop-background-color, #000);
opacity: 0;
transition: opacity 0.2s;
pointer-events: none;
@apply --iron-overlay-backdrop;
}
:host(.opened) {
opacity: var(--iron-overlay-backdrop-opacity, 0.6);
pointer-events: auto;
@apply --iron-overlay-backdrop-opened;
}
</style>
<slot></slot>
`,is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&(0,r.vz)(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||(0,r.vz)(this.parentNode).removeChild(this)},_onTransitionend:function(t){t&&t.target===this&&this.complete()},_openedChanged:function(t){if(t)this.prepare();else{var e=window.getComputedStyle(this);"0s"!==e.transitionDuration&&0!=e.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});var f=n(33972),m=n(98348);const g=new class{constructor(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,m.NH(document.documentElement,"tap",(function(){})),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement}get deepActiveElement(){var t=document.activeElement;for(t&&t instanceof Element!=!1||(t=document.body);t.root&&(0,r.vz)(t.root).activeElement;)t=(0,r.vz)(t.root).activeElement;return t}_bringOverlayAtIndexToFront(t){var e=this._overlays[t];if(e){var n=this._overlays.length-1,r=this._overlays[n];if(r&&this._shouldBeBehindOverlay(e,r)&&n--,!(t>=n)){var i=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(e)<=i&&this._applyOverlayZ(e,i);t<n;)this._overlays[t]=this._overlays[t+1],t++;this._overlays[n]=e}}}addOrRemoveOverlay(t){t.opened?this.addOverlay(t):this.removeOverlay(t)}addOverlay(t){var e=this._overlays.indexOf(t);if(e>=0)return this._bringOverlayAtIndexToFront(e),void this.trackBackdrop();var n=this._overlays.length,r=this._overlays[n-1],i=Math.max(this._getZ(r),this._minimumZ),o=this._getZ(t);if(r&&this._shouldBeBehindOverlay(t,r)){this._applyOverlayZ(r,i),n--;var s=this._overlays[n-1];i=Math.max(this._getZ(s),this._minimumZ)}o<=i&&this._applyOverlayZ(t,i),this._overlays.splice(n,0,t),this.trackBackdrop()}removeOverlay(t){var e=this._overlays.indexOf(t);-1!==e&&(this._overlays.splice(e,1),this.trackBackdrop())}currentOverlay(){var t=this._overlays.length-1;return this._overlays[t]}currentOverlayZ(){return this._getZ(this.currentOverlay())}ensureMinimumZ(t){this._minimumZ=Math.max(this._minimumZ,t)}focusOverlay(){var t=this.currentOverlay();t&&t._applyFocus()}trackBackdrop(){var t=this._overlayWithBackdrop();(t||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(t)-1,this.backdropElement.opened=!!t,this.backdropElement.prepare())}getBackdrops(){for(var t=[],e=0;e<this._overlays.length;e++)this._overlays[e].withBackdrop&&t.push(this._overlays[e]);return t}backdropZ(){return this._getZ(this._overlayWithBackdrop())-1}_overlayWithBackdrop(){for(var t=this._overlays.length-1;t>=0;t--)if(this._overlays[t].withBackdrop)return this._overlays[t]}_getZ(t){var e=this._minimumZ;if(t){var n=Number(t.style.zIndex||window.getComputedStyle(t).zIndex);n==n&&(e=n)}return e}_setZ(t,e){t.style.zIndex=e}_applyOverlayZ(t,e){this._setZ(t,e+2)}_overlayInPath(t){t=t||[];for(var e=0;e<t.length;e++)if(t[e]._manager===this)return t[e]}_onCaptureClick(t){var e=this._overlays.length-1;if(-1!==e)for(var n,i=(0,r.vz)(t).path;(n=this._overlays[e])&&this._overlayInPath(i)!==n&&(n._onCaptureClick(t),n.allowClickThrough);)e--}_onCaptureFocus(t){var e=this.currentOverlay();e&&e._onCaptureFocus(t)}_onCaptureKeyDown(t){var e=this.currentOverlay();e&&(f.G.keyboardEventMatchesKeys(t,"esc")?e._onCaptureEsc(t):f.G.keyboardEventMatchesKeys(t,"tab")&&e._onCaptureTab(t))}_shouldBeBehindOverlay(t,e){return!t.alwaysOnTop&&e.alwaysOnTop}};var b,y,A={pageX:0,pageY:0},w=null,v=[],x=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"];function _(t){C.indexOf(t)>=0||(0===C.length&&function(){b=b||B.bind(void 0);for(var t=0,e=x.length;t<e;t++)document.addEventListener(x[t],b,{capture:!0,passive:!1})}(),C.push(t),y=C[C.length-1],E=[],S=[])}function k(t){var e=C.indexOf(t);-1!==e&&(C.splice(e,1),y=C[C.length-1],E=[],S=[],0===C.length&&function(){for(var t=0,e=x.length;t<e;t++)document.removeEventListener(x[t],b,{capture:!0,passive:!1})}())}const C=[];let E=null,S=null;function B(t){if(t.cancelable&&function(t){var e=(0,r.vz)(t).rootTarget;"touchmove"!==t.type&&w!==e&&(w=e,v=function(t){for(var e=[],n=t.indexOf(y),r=0;r<=n;r++)if(t[r].nodeType===Node.ELEMENT_NODE){var i=t[r],o=i.style;"scroll"!==o.overflow&&"auto"!==o.overflow&&(o=window.getComputedStyle(i)),"scroll"!==o.overflow&&"auto"!==o.overflow||e.push(i)}return e}((0,r.vz)(t).path));if(!v.length)return!0;if("touchstart"===t.type)return!1;var n=function(t){var e={deltaX:t.deltaX,deltaY:t.deltaY};if("deltaX"in t);else if("wheelDeltaX"in t&&"wheelDeltaY"in t)e.deltaX=-t.wheelDeltaX,e.deltaY=-t.wheelDeltaY;else if("wheelDelta"in t)e.deltaX=0,e.deltaY=-t.wheelDelta;else if("axis"in t)e.deltaX=1===t.axis?t.detail:0,e.deltaY=2===t.axis?t.detail:0;else if(t.targetTouches){var n=t.targetTouches[0];e.deltaX=A.pageX-n.pageX,e.deltaY=A.pageY-n.pageY}return e}(t);return!function(t,e,n){if(!e&&!n)return;for(var r=Math.abs(n)>=Math.abs(e),i=0;i<t.length;i++){var o=t[i];if(r?n<0?o.scrollTop>0:o.scrollTop<o.scrollHeight-o.clientHeight:e<0?o.scrollLeft>0:o.scrollLeft<o.scrollWidth-o.clientWidth)return o}}(v,n.deltaX,n.deltaY)}(t)&&t.preventDefault(),t.targetTouches){var e=t.targetTouches[0];A.pageX=e.pageX,A.pageY=e.pageY}}const O={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:g},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||(0,r.vz)(this).querySelector("[autofocus]")||this},get _focusableNodes(){return p.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=(0,r.vz)(this).observeNodes(this._onNodesChange)},detached:function(){for(var t in this._observer&&(0,r.vz)(this).unobserveNodes(this._observer),this._observer=null,this.__rafs)null!==this.__rafs[t]&&cancelAnimationFrame(this.__rafs[t]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(t){this.fire("iron-overlay-canceled",t,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(t){t?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var t=this._manager.deepActiveElement;(t===document.body||M(this,t))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(t){this.noCancelOnOutsideClick||this.cancel(t)},_onCaptureFocus:function(t){if(this.withBackdrop){var e=(0,r.vz)(t).path;-1===e.indexOf(this)?(t.stopPropagation(),this._applyFocus()):this._focusedChild=e[0]}},_onCaptureEsc:function(t){this.noCancelOnEscKey||this.cancel(t)},_onCaptureTab:function(t){if(this.withBackdrop){this.__ensureFirstLastFocusables();var e=t.shiftKey,n=e?this.__firstFocusableNode:this.__lastFocusableNode,r=e?this.__lastFocusableNode:this.__firstFocusableNode,i=!1;if(n===r)i=!0;else{var o=this._manager.deepActiveElement;i=o===n||o===this}i&&(t.preventDefault(),this._focusedChild=r,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){var t=this._focusableNodes;this.__firstFocusableNode=t[0],this.__lastFocusableNode=t[t.length-1]},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(t,e){var n=this.__rafs;null!==n[t]&&cancelAnimationFrame(n[t]),n[t]=requestAnimationFrame(function(){n[t]=null,e.call(this)}.bind(this))},__updateScrollObservers:function(t,e,n){t&&e&&this.__isValidScrollAction(n)?("lock"===n&&(this.__saveScrollPosition(),_(this)),this.__addScrollListeners()):(k(this),this.__removeScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],s.my)for(var t=this;t;)t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host&&this.__rootNodes.push(t),t=t.host||t.assignedSlot||t.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach((function(t){t.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})}),this)},__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach((function(t){t.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})}),this),this.isAttached||(this.__rootNodes=null)},__isValidScrollAction:function(t){return"lock"===t||"refit"===t||"cancel"===t},__onCaptureScroll:function(t){if(!(this.__isAnimating||(0,r.vz)(t).path.indexOf(this)>=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(t)}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},M=(t,e)=>{for(let r=e;r;r=(n=r).assignedSlot||n.parentNode||n.host)if(r===t)return!0;var n;return!1},I=[o,l,O]},13517:(t,e,n)=>{"use strict";n.d(e,{t:()=>c});n(38371);var r=n(87812),i=n(14326);let o={},s={};function a(t,e){o[t]=s[t.toLowerCase()]=e}function l(t){return o[t]||s[t.toLowerCase()]}class c extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let n=l(t);return n&&e?n.querySelector(e):n}return null}attributeChangedCallback(t,e,n,r){e!==n&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=(0,r.Kk)(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=(0,r.iY)(e)}return this.__assetpath}register(t){if(t=t||this.id){if(i.XN&&void 0!==l(t))throw a(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,a(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}c.prototype.modules=o,customElements.define("dom-module",c)},82523:(t,e,n)=>{"use strict";n.d(e,{x:()=>Ct});var r=n(85794);class i{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function o(t){return s(function(t){let e=new i;e.start=0,e.end=t.length;let n=e;for(let r=0,o=t.length;r<o;r++)if(t[r]===c){n.rules||(n.rules=[]);let t=n,e=t.rules[t.rules.length-1]||null;n=new i,n.start=r+1,n.parent=t,n.previous=e,t.rules.push(n)}else t[r]===d&&(n.end=r+1,n=n.parent||e);return e}(t=t.replace(p.comments,"").replace(p.port,"")),t)}function s(t,e){let n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent){let r=t.previous?t.previous.end:t.parent.start;n=e.substring(r,t.start-1),n=function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){let t=arguments[1],e=6-t.length;for(;e--;)t="0"+t;return"\\"+t}))}(n),n=n.replace(p.multipleSpaces," "),n=n.substring(n.lastIndexOf(";")+1);let i=t.parsedSelector=t.selector=n.trim();t.atRule=0===i.indexOf(f),t.atRule?0===i.indexOf(u)?t.type=l.MEDIA_RULE:i.match(p.keyframesRule)&&(t.type=l.KEYFRAMES_RULE,t.keyframesName=t.selector.split(p.multipleSpaces).pop()):0===i.indexOf(h)?t.type=l.MIXIN_RULE:t.type=l.STYLE_RULE}let r=t.rules;if(r)for(let t,n=0,i=r.length;n<i&&(t=r[n]);n++)s(t,e);return t}function a(t,e,n=""){let r="";if(t.cssText||t.rules){let n=t.rules;if(n&&!function(t){let e=t[0];return Boolean(e)&&Boolean(e.selector)&&0===e.selector.indexOf(h)}(n))for(let t,i=0,o=n.length;i<o&&(t=n[i]);i++)r=a(t,e,r);else r=e?t.cssText:function(t){return t=function(t){return t.replace(p.customProp,"").replace(p.mixinProp,"")}(t),function(t){return t.replace(p.mixinApply,"").replace(p.varApply,"")}(t)}(t.cssText),r=r.trim(),r&&(r=" "+r+"\n")}return r&&(t.selector&&(n+=t.selector+" "+c+"\n"),n+=r,t.selector&&(n+=d+"\n\n")),n}const l={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},c="{",d="}",p={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},h="--",u="@media",f="@";var m=n(62398);const g=new Set,b="shady-unscoped";function y(t){const e=t.textContent;if(!g.has(e)){g.add(e);const t=document.createElement("style");t.setAttribute("shady-unscoped",""),t.textContent=e,document.head.appendChild(t)}}function A(t){return t.hasAttribute(b)}function w(t,e){return t?("string"==typeof t&&(t=o(t)),e&&x(t,e),a(t,r.rd)):""}function v(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=o(t.textContent)),t.__cssRules||null}function x(t,e,n,r){if(!t)return;let i=!1,o=t.type;if(r&&o===l.MEDIA_RULE){let e=t.selector.match(m.mA);e&&(window.matchMedia(e[1]).matches||(i=!0))}o===l.STYLE_RULE?e(t):n&&o===l.KEYFRAMES_RULE?n(t):o===l.MIXIN_RULE&&(i=!0);let s=t.rules;if(s&&!i)for(let t,i=0,o=s.length;i<o&&(t=s[i]);i++)x(t,e,n,r)}function _(t,e){let n=0;for(let r=e,i=t.length;r<i;r++)if("("===t[r])n++;else if(")"===t[r]&&0==--n)return r;return-1}function k(t,e){let n=t.indexOf("var(");if(-1===n)return e(t,"","","");let r=_(t,n+3),i=t.substring(n+4,r),o=t.substring(0,n),s=k(t.substring(r+1),e),a=i.indexOf(",");return-1===a?e(o,i.trim(),"",s):e(o,i.substring(0,a).trim(),i.substring(a+1).trim(),s)}window.ShadyDOM&&window.ShadyDOM.wrap;const C="css-build";function E(t){if(void 0!==r.Cp)return r.Cp;if(void 0===t.__cssBuild){const e=t.getAttribute(C);if(e)t.__cssBuild=e;else{const e=function(t){const e="template"===t.localName?t.content.firstChild:t.firstChild;if(e instanceof Comment){const t=e.textContent.trim().split(":");if(t[0]===C)return t[1]}return""}(t);""!==e&&function(t){const e="template"===t.localName?t.content.firstChild:t.firstChild;e.parentNode.removeChild(e)}(t),t.__cssBuild=e}}return t.__cssBuild||""}function S(t){return""!==E(t)}var B=n(95);const O=/;\s*/m,M=/^\s*(initial)|(inherit)\s*$/,I=/\s*!important/,$="_-_";class T{constructor(){this._map={}}set(t,e){t=t.trim(),this._map[t]={properties:e,dependants:{}}}get(t){return t=t.trim(),this._map[t]||null}}let N=null;class L{constructor(){this._currentElement=null,this._measureElement=null,this._map=new T}detectMixin(t){return(0,B.OH)(t)}gatherStyles(t){const e=function(t){const e=[],n=t.querySelectorAll("style");for(let t=0;t<n.length;t++){const i=n[t];A(i)?r.WA||(y(i),i.parentNode.removeChild(i)):(e.push(i.textContent),i.parentNode.removeChild(i))}return e.join("").trim()}(t.content);if(e){const n=document.createElement("style");return n.textContent=e,t.content.insertBefore(n,t.content.firstChild),n}return null}transformTemplate(t,e){void 0===t._gatheredStyle&&(t._gatheredStyle=this.gatherStyles(t));const n=t._gatheredStyle;return n?this.transformStyle(n,e):null}transformStyle(t,e=""){let n=v(t);return this.transformRules(n,e),t.textContent=w(n),n}transformCustomStyle(t){let e=v(t);return x(e,(t=>{":root"===t.selector&&(t.selector="html"),this.transformRule(t)})),t.textContent=w(e),e}transformRules(t,e){this._currentElement=e,x(t,(t=>{this.transformRule(t)})),this._currentElement=null}transformRule(t){t.cssText=this.transformCssText(t.parsedCssText,t),":root"===t.selector&&(t.selector=":host > *")}transformCssText(t,e){return t=t.replace(m.CN,((t,n,r,i)=>this._produceCssProperties(t,n,r,i,e))),this._consumeCssProperties(t,e)}_getInitialValueForProperty(t){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(t)}_fallbacksFromPreviousRules(t){let e=t;for(;e.parent;)e=e.parent;const n={};let r=!1;return x(e,(e=>{r=r||e===t,r||e.selector===t.selector&&Object.assign(n,this._cssTextToMap(e.parsedCssText))})),n}_consumeCssProperties(t,e){let n=null;for(;n=m.$T.exec(t);){let r=n[0],i=n[1],o=n.index,s=o+r.indexOf("@apply"),a=o+r.length,l=t.slice(0,s),c=t.slice(a),d=e?this._fallbacksFromPreviousRules(e):{};Object.assign(d,this._cssTextToMap(l));let p=this._atApplyToCssProperties(i,d);t=`${l}${p}${c}`,m.$T.lastIndex=o+p.length}return t}_atApplyToCssProperties(t,e){t=t.replace(O,"");let n=[],r=this._map.get(t);if(r||(this._map.set(t,{}),r=this._map.get(t)),r){let i,o,s;this._currentElement&&(r.dependants[this._currentElement]=!0);const a=r.properties;for(i in a)s=e&&e[i],o=[i,": var(",t,$,i],s&&o.push(",",s.replace(I,"")),o.push(")"),I.test(a[i])&&o.push(" !important"),n.push(o.join(""))}return n.join("; ")}_replaceInitialOrInherit(t,e){let n=M.exec(e);return n&&(e=n[1]?this._getInitialValueForProperty(t):"apply-shim-inherit"),e}_cssTextToMap(t,e=!1){let n,r,i=t.split(";"),o={};for(let t,s,a=0;a<i.length;a++)t=i[a],t&&(s=t.split(":"),s.length>1&&(n=s[0].trim(),r=s.slice(1).join(":"),e&&(r=this._replaceInitialOrInherit(n,r)),o[n]=r));return o}_invalidateMixinEntry(t){if(N)for(let e in t.dependants)e!==this._currentElement&&N(e)}_produceCssProperties(t,e,n,r,i){if(n&&k(n,((t,e)=>{e&&this._map.get(e)&&(r=`@apply ${e};`)})),!r)return t;let o=this._consumeCssProperties(""+r,i),s=t.slice(0,t.indexOf("--")),a=this._cssTextToMap(o,!0),l=a,c=this._map.get(e),d=c&&c.properties;d?l=Object.assign(Object.create(d),a):this._map.set(e,l);let p,h,u=[],f=!1;for(p in l)h=a[p],void 0===h&&(h="initial"),d&&!(p in d)&&(f=!0),u.push(`${e}${$}${p}: ${h}`);return f&&this._invalidateMixinEntry(c),c&&(c.properties=l),n&&(s=`${t};${s}`),`${s}${u.join("; ")};`}}L.prototype.detectMixin=L.prototype.detectMixin,L.prototype.transformStyle=L.prototype.transformStyle,L.prototype.transformCustomStyle=L.prototype.transformCustomStyle,L.prototype.transformRules=L.prototype.transformRules,L.prototype.transformRule=L.prototype.transformRule,L.prototype.transformTemplate=L.prototype.transformTemplate,L.prototype._separator=$,Object.defineProperty(L.prototype,"invalidCallback",{get:()=>N,set(t){N=t}});const R=L,P={},D="_applyShimCurrentVersion",z="_applyShimNextVersion",H="_applyShimValidatingVersion",j=Promise.resolve();function U(t){let e=P[t];e&&function(t){t[D]=t[D]||0,t[H]=t[H]||0,t[z]=(t[z]||0)+1}(e)}function Z(t){return t[D]===t[z]}function F(t){return!Z(t)&&t[H]===t[z]}function V(t){t[H]=t[z],t._validating||(t._validating=!0,j.then((function(){t[D]=t[z],t._validating=!1})))}n(22859);const Y=new R;class W{constructor(){this.customStyleInterface=null,Y.invalidCallback=U}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=t=>{Y.transformCustomStyle(t)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(t,e){if(this.ensure(),S(t))return;P[e]=t;let n=Y.transformTemplate(t,e);t._styleAst=n}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let t=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let e=0;e<t.length;e++){let n=t[e],r=this.customStyleInterface.getStyleForCustomStyle(n);r&&Y.transformCustomStyle(r)}this.customStyleInterface.enqueued=!1}}styleSubtree(t,e){if(this.ensure(),e&&(0,B.wW)(t,e),t.shadowRoot){this.styleElement(t);let e=t.shadowRoot.children||t.shadowRoot.childNodes;for(let t=0;t<e.length;t++)this.styleSubtree(e[t])}else{let e=t.children||t.childNodes;for(let t=0;t<e.length;t++)this.styleSubtree(e[t])}}styleElement(t){this.ensure();let{is:e}=function(t){let e=t.localName,n="",r="";return e?e.indexOf("-")>-1?n=e:(r=e,n=t.getAttribute&&t.getAttribute("is")||""):(n=t.is,r=t.extends),{is:n,typeExtension:r}}(t),n=P[e];if((!n||!S(n))&&n&&!Z(n)){F(n)||(this.prepareTemplate(n,e),V(n));let r=t.shadowRoot;if(r){let t=r.querySelector("style");t&&(t.__cssRules=n._styleAst,t.textContent=w(n._styleAst))}}}styleDocument(t){this.ensure(),this.styleSubtree(document.body,t)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const t=new W;let e=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(e,n,r){t.flushCustomStyles(),t.prepareTemplate(e,n)},prepareTemplateStyles(t,e,n){window.ShadyCSS.prepareTemplate(t,e,n)},prepareTemplateDom(t,e){},styleSubtree(e,n){t.flushCustomStyles(),t.styleSubtree(e,n)},styleElement(e){t.flushCustomStyles(),t.styleElement(e)},styleDocument(e){t.flushCustomStyles(),t.styleDocument(e)},getComputedStyleValue:(t,e)=>(0,B.B7)(t,e),flushCustomStyles(){t.flushCustomStyles()},nativeCss:r.rd,nativeShadow:r.WA,cssBuild:r.Cp,disableRuntime:r.jF},e&&(window.ShadyCSS.CustomStyleInterface=e)}window.ShadyCSS.ApplyShim=Y;var q=n(2414),X=n(98956),G=n(25608),K=n(28091);const J=/:host\(:dir\((ltr|rtl)\)\)/g,Q=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,tt=/:dir\((?:ltr|rtl)\)/,et=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),nt=[];let rt=null,it="";function ot(){it=document.documentElement.getAttribute("dir")}function st(t){if(!t.__autoDirOptOut){t.setAttribute("dir",it)}}function at(){ot(),it=document.documentElement.getAttribute("dir");for(let t=0;t<nt.length;t++)st(nt[t])}const lt=(0,K.o)((t=>{et||rt||(ot(),rt=new MutationObserver(at),rt.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const e=(0,G.Q)(t);class n extends e{static _processStyleText(t,n){return t=e._processStyleText.call(this,t,n),!et&&tt.test(t)&&(t=this._replaceDirInCssText(t),this.__activateDir=!0),t}static _replaceDirInCssText(t){let e=t;return e=e.replace(J,':host([dir="$1"])'),e=e.replace(Q,':host([dir="$2"]) $1'),e}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){e.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(rt&&rt.takeRecords().length&&at(),nt.push(this),st(this))}disconnectedCallback(){if(e.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const t=nt.indexOf(this);t>-1&&nt.splice(t,1)}}}return n.__activateDir=!1,n}));n(87893);function ct(){document.body.removeAttribute("unresolved")}"interactive"===document.readyState||"complete"===document.readyState?ct():window.addEventListener("DOMContentLoaded",ct);var dt=n(3572),pt=n(98348),ht=n(90992),ut=n(64005),ft=n(30623),mt=n(46969);n(38371);const gt=window.ShadyDOM,bt=window.ShadyCSS;function yt(t,e){return(0,mt.r)(t).getRootNode()===e}var At=n(14326);const wt="disable-upgrade",vt=t=>{for(;t;){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e)return e.get;t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]};(0,K.o)((t=>{const e=(0,q.SH)(t);let n=vt(e);return class extends e{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return n.call(this).concat(wt)}_initializeProperties(){this.hasAttribute(wt)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,n,r){t==wt?this.__isUpgradeDisabled&&null==n&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,(0,mt.r)(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,n,r)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));var xt=n(73058);const _t="disable-upgrade";let kt=window.ShadyCSS;const Ct=(0,K.o)((t=>{const e=(0,X._)((0,q.SH)(t)),n=q.PP?e:lt(e),r=vt(n),i={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class o extends n{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(t,e,n){(this.__dataAttributes&&this.__dataAttributes[t]||t===_t)&&this.attributeChangedCallback(t,e,n,null)}setAttribute(t,e){if(At.j8&&!this._legacyForceObservedAttributes){const n=this.getAttribute(t);super.setAttribute(t,e),this.__attributeReaction(t,n,String(e))}else super.setAttribute(t,e)}removeAttribute(t){if(At.j8&&!this._legacyForceObservedAttributes){const e=this.getAttribute(t);super.removeAttribute(t),this.__attributeReaction(t,e,null)}else super.removeAttribute(t)}static get observedAttributes(){return At.j8&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],(0,xt.z2)(this.prototype)),this.__observedAttributes):r.call(this).concat(_t)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(t,e,n,r){e!==n&&(t==_t?this.__isUpgradeDisabled&&null==n&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,(0,mt.r)(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(t,e,n,r),this.attributeChanged(t,e,n)))}attributeChanged(t,e,n