/*! For license information please see button.js.LICENSE.txt */ (()=>{var t={17:function(t,e){!function(){"use strict";var t,e=!1,i=[],o=!1;function n(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}function s(){window.customElements&&customElements.polyfillWrapFlushCallback&&customElements.polyfillWrapFlushCallback((function(e){t=e,o&&t()}))}function r(){window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(window.document),e=!0,a().then(n)}function a(){o=!1;var e=i.map((function(t){return t instanceof Function?t():t}));return i=[],Promise.all(e).then((function(){o=!0,t&&t()})).catch((function(t){console.error(t)}))}window.WebComponents=window.WebComponents||{},window.WebComponents.ready=window.WebComponents.ready||!1,window.WebComponents.waitFor=window.WebComponents.waitFor||function(t){t&&(i.push(t),e&&a())},window.WebComponents._batchCustomElements=s;var l="webcomponents-loader.js",d=[];(!("attachShadow"in Element.prototype)||!("getRootNode"in Element.prototype)||window.ShadyDOM&&window.ShadyDOM.force)&&d.push("sd"),window.customElements&&!window.customElements.forcePolyfill||d.push("ce");var c,h,p=function(){var t=document.createElement("template");if(!("content"in t))return!0;if(!(t.content.cloneNode()instanceof DocumentFragment))return!0;var e=document.createElement("template");e.content.appendChild(document.createElement("div")),t.content.appendChild(e);var i=t.cloneNode(!0);return 0===i.content.childNodes.length||0===i.content.firstChild.content.childNodes.length}();if(window.Promise&&Array.from&&window.URL&&window.Symbol&&!p||(d=["sd-ce-pf"]),d.length){var u,v=(h={createHTML:c=function(t){return t},createScript:c,createScriptURL:c},window.trustedTypes&&window.trustedTypes.createPolicy("webcomponents-loader",h)||h),f="bundles/webcomponents-"+d.join("-")+".js";if(window.WebComponents.root)u=window.WebComponents.root+f,window.trustedTypes&&window.trustedTypes.isScriptURL(window.WebComponents.root)&&(u=v.createScriptURL(u));else{var m=document.querySelector('script[src*="'+l+'"]');u=v.createScriptURL(m.src.replace(l,f))}var y=document.createElement("script");y.src=u,"loading"===document.readyState?(y.setAttribute("onload",v.createScript("window.WebComponents._batchCustomElements()")),document.write(v.createHTML(y.outerHTML)),document.addEventListener("DOMContentLoaded",r)):(y.addEventListener("load",(function(){s(),r()})),y.addEventListener("error",(function(){throw new Error("Could not load polyfill bundle"+u)})),document.head.appendChild(y))}else"complete"===document.readyState?(e=!0,n()):(window.addEventListener("load",r),window.addEventListener("DOMContentLoaded",(function(){window.removeEventListener("load",r),r()})))}()},275:(t,e,i)=>{"use strict";var o,n;function s(t){const[e,i]=(t||"").split("::");return[e,i]}function r(t,e){return`${t}:${e}`}i.d(e,{Kk:()=>s,LI:()=>n,Le:()=>r,pj:()=>o}),function(t){t.Default="metamap",t.Legacy="mati"}(o||(o={})),function(t){t.loaded="loaded",t.error="errorSdk",t.exitedSdk="exitedSdk",t.userStartedSdk="userStartedSdk",t.userFinishedSdk="userFinishedSdk",t.userContinuedOnAnotherDevice="continuedOnAnotherDevice"}(n||(n={}))},787:(t,e,i)=>{"use strict";i.r(e),i.d(e,{MetaMapButtonElement:()=>f});var o,n=i(897),s=i(95);!function(t){t.EN="en",t.ES="es",t.FR="fr",t.PT="pt"}(o||(o={}));const r=o.EN,a={[o.EN]:{verify:"Verify me"},[o.ES]:{verify:"Verifícame"},[o.FR]:{verify:"Vérifie moi"},[o.PT]:{verify:"Me confirma"}};function l(t,e,i){var o,n,s,r,a,l;if(t/=255,e/=255,i/=255,n=0,l=0,s=((r=Math.max(t,e,i))+(a=Math.min(t,e,i)))/2,r===a)n=l=0;else{switch(o=r-a,l=s>.5?o/(2-r-a):o/(r+a),r){case t:n=(e-i)/o+(e>16&255,e>>8&255,255&e]}(t));return[e,parseInt(i,10),parseInt(o,10)]}(t);return e<70}var v=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};let f=class extends n.oi{constructor(){super(...arguments),this.role="button",this.tabindex=0,this.ariaPressed="false",this.language=r,this.color=d,this.textColor=u(d)?"white":"black"}static get styles(){return n.iv` :host { position: relative; width: 100%; display: inline-flex; align-items: stretch; height: 43px; box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2); transition: box-shadow 200ms ease-in-out; border-radius: 4px; outline: 0; overflow: hidden; font-family: sans-serif; font-size: 15px; letter-spacing: 0.8px; white-space: nowrap; user-select: none; } :host(:not([disabled])) { cursor: pointer; } :host([disabled]) main { background: #eee; cursor: default; } :host(:active:not([disabled])) { box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.15); } figure { margin: 0; padding: 0 15px; background: white; display: flex; align-items: center; } figure svg, figure img { width: 24px; } main { transition: background-color 100ms linear; padding: 0 40px; flex: 1; display: flex; justify-content: center; align-items: center; } :host([loading]) label { visibility: hidden; } label { cursor: pointer; } metamap-spinner { position: absolute; } `}render(){const t=this.textColor?p(this.textColor):u(p(this.color))?"white":"black";return n.dy` ${"none"!==this.icon?n.dy`
MetaMap
`:null}
${this.loading?n.dy` `:null}
`}updateStyles(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("main");e&&(e.style.backgroundColor=p(this.color),e.style.color=this.textColor?p(this.textColor):u(p(this.color))?"white":"black")}firstUpdated(){this.updateStyles()}updated(t){(t.has("color")||t.has("textColor"))&&this.updateStyles()}};v([(0,s.Cb)({type:String,reflect:!0})],f.prototype,"role",void 0),v([(0,s.Cb)({type:Number,reflect:!0})],f.prototype,"tabindex",void 0),v([(0,s.Cb)({type:String,reflect:!0,attribute:"aria-pressed"})],f.prototype,"ariaPressed",void 0),v([(0,s.Cb)({type:Boolean})],f.prototype,"disabled",void 0),v([(0,s.Cb)({type:Boolean,reflect:!0})],f.prototype,"loading",void 0),v([(0,s.Cb)({type:String})],f.prototype,"language",void 0),v([(0,s.Cb)({type:String})],f.prototype,"color",void 0),v([(0,s.Cb)({type:String})],f.prototype,"textColor",void 0),v([(0,s.Cb)({type:String})],f.prototype,"icon",void 0),f=v([(0,s.Mo)("metamap-button-element")],f)},327:(t,e,i)=>{"use strict";i.r(e),i.d(e,{MatiButton:()=>c,MetaMapButton:()=>d});var o=i(897),n=i(95);function s(t){const e=document.createElement("textarea");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}var r=i(275),a=i(422),l=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};let d=class extends o.oi{static get styles(){return o.iv` :host { display: inline-block; } `}constructor(){super(),this.disabled=!1,this.loading=!1,this.language=navigator.language.split("-")[0],this.metadata=null,this.signupHost="https://signup.getmati.com",this.debug=!1,this.verification=null,this.addEventListener("click",this.openIframe)}emitEvent(t,e){const i=new CustomEvent((0,r.Le)(r.pj.Default,t),e);this.dispatchEvent(i)}openIframe(){this.disabled=!0,this.loading=!0,this.verification=new a.F({signupHost:this.signupHost,clientId:this.clientId,flowId:this.flowId,identityId:this.identityId,verificationId:this.verificationId,configurationId:this.configurationId,encryptionConfigurationId:this.encryptionConfigurationId,nopersist:this.nopersist,debug:this.debug,metadata:this.metadata?s(this.metadata):this.metadata,color:this.color,textColor:this.textColor}),this.verification.on((0,r.Le)(r.pj.Default,r.LI.loaded),(t=>{this.disabled=!1,this.loading=!1,this.emitEvent(r.LI.loaded,t)})),this.verification.on((0,r.Le)(r.pj.Default,r.LI.exitedSdk),(t=>{this.emitEvent(r.LI.exitedSdk,t)})),this.verification.on((0,r.Le)(r.pj.Default,r.LI.userFinishedSdk),(t=>{this.emitEvent(r.LI.userFinishedSdk,t)})),this.verification.on((0,r.Le)(r.pj.Default,r.LI.userStartedSdk),(t=>{this.emitEvent(r.LI.userStartedSdk,t)})),this.verification.on((0,r.Le)(r.pj.Default,r.LI.userContinuedOnAnotherDevice),(t=>{this.emitEvent(r.LI.userContinuedOnAnotherDevice,t)})),this.verification.on((0,r.Le)(r.pj.Default,r.LI.error),(t=>{this.emitEvent(r.LI.error,t)})),this.verification.start(),setTimeout((()=>{this.disabled=!1,this.loading=!1}),2e3)}render(){return o.dy` `}};l([(0,n.Cb)({type:String})],d.prototype,"clientId",void 0),l([(0,n.Cb)({type:Boolean})],d.prototype,"disabled",void 0),l([(0,n.Cb)({type:Boolean})],d.prototype,"loading",void 0),l([(0,n.Cb)({type:String})],d.prototype,"color",void 0),l([(0,n.Cb)({type:String})],d.prototype,"textColor",void 0),l([(0,n.Cb)({type:String})],d.prototype,"language",void 0),l([(0,n.Cb)({type:String})],d.prototype,"metadata",void 0),l([(0,n.Cb)({type:String})],d.prototype,"icon",void 0),l([(0,n.Cb)({type:String})],d.prototype,"flowId",void 0),l([(0,n.Cb)({type:String})],d.prototype,"identityId",void 0),l([(0,n.Cb)({type:String})],d.prototype,"verificationId",void 0),l([(0,n.Cb)({type:String})],d.prototype,"configurationId",void 0),l([(0,n.Cb)({type:String})],d.prototype,"encryptionConfigurationId",void 0),l([(0,n.Cb)({type:Boolean})],d.prototype,"nopersist",void 0),l([(0,n.Cb)({type:String})],d.prototype,"signupHost",void 0),l([(0,n.Cb)({type:Boolean})],d.prototype,"debug",void 0),d=l([(0,n.Mo)("metamap-button")],d);let c=class extends d{emitEvent(t,e){const i=new CustomEvent((0,r.Le)(r.pj.Legacy,t),e);this.dispatchEvent(i)}};c=l([(0,n.Mo)("mati-button")],c)},732:(t,e,i)=>{"use strict";i.r(e),i.d(e,{MetaMapFrame:()=>y});var o=i(897),n=i(95),s=!1;if("undefined"!=typeof window){var r={get passive(){s=!0}};window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}var a="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),l=[],d=!1,c=-1,h=void 0,p=void 0,u=void 0,v=function(t){return l.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},f=function(t){var e=t||window.event;return!!v(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},m=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};let y=class extends o.oi{constructor(){super(...arguments),this.metadata=null}static get styles(){return o.iv` iframe { z-index: 2147483647; background: rgba(0, 0, 0, 0.004); border: 0px none transparent; overflow: hidden auto; visibility: visible; margin: 0px; padding: 0px; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; -webkit-tap-highlight-color: transparent; } `}connectedCallback(){super.connectedCallback(),function(t,e){if(t){if(!l.some((function(e){return e.targetElement===t}))){var i={targetElement:t,options:e||{}};l=[].concat(function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e=o&&(document.body.style.top=-(e+t))}))}),300)}})):function(t){if(void 0===u){var e=!!t&&!0===t.reserveScrollBarGap,i=window.innerWidth-document.documentElement.clientWidth;if(e&&i>0){var o=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);u=document.body.style.paddingRight,document.body.style.paddingRight=o+i+"px"}}void 0===h&&(h=document.body.style.overflow,document.body.style.overflow="hidden")}(e),a&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(c=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var i=t.targetTouches[0].clientY-c;!v(t.target)&&(e&&0===e.scrollTop&&i>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&i<0?f(t):t.stopPropagation())}(e,t)},d||(document.addEventListener("touchmove",f,s?{passive:!1}:void 0),d=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}(this.renderRoot)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.renderRoot)?(l=l.filter((function(e){return e.targetElement!==t})),a&&(t.ontouchstart=null,t.ontouchmove=null,d&&0===l.length&&(document.removeEventListener("touchmove",f,s?{passive:!1}:void 0),d=!1)),a?function(){if(void 0!==p){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=p.position,document.body.style.top=p.top,document.body.style.left=p.left,window.scrollTo(e,t),p=void 0}}():(void 0!==u&&(document.body.style.paddingRight=u,u=void 0),void 0!==h&&(document.body.style.overflow=h,h=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")}createColorForSearchParam(t){return(t||"").replace("#","")}render(){const t=new URL(this.signupHost);return[["merchantToken",this.clientId],["metadata",this.metadata],["flowId",this.flowId],["identityId",this.identityId],["verificationId",this.verificationId],["configurationId",this.configurationId],["encryptionConfigurationId",this.encryptionConfigurationId],["color",this.createColorForSearchParam(this.color)],["textColor",this.createColorForSearchParam(this.textColor)],["nopersist",this.nopersist],["debug",this.debug]].filter((([,t])=>t&&"null"!==t)).forEach((([e,i])=>t.searchParams.append(e,i))),o.dy` `}};m([(0,n.Cb)({type:String})],y.prototype,"clientId",void 0),m([(0,n.Cb)({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),m([(0,n.Cb)({type:String})],y.prototype,"metadata",void 0),m([(0,n.Cb)({type:String})],y.prototype,"color",void 0),m([(0,n.Cb)({type:String})],y.prototype,"textColor",void 0),m([(0,n.Cb)({type:String})],y.prototype,"flowId",void 0),m([(0,n.Cb)({type:String})],y.prototype,"identityId",void 0),m([(0,n.Cb)({type:String})],y.prototype,"verificationId",void 0),m([(0,n.Cb)({type:String})],y.prototype,"configurationId",void 0),m([(0,n.Cb)({type:String})],y.prototype,"encryptionConfigurationId",void 0),m([(0,n.Cb)({type:Boolean})],y.prototype,"nopersist",void 0),m([(0,n.Cb)({type:String})],y.prototype,"signupHost",void 0),m([(0,n.Cb)({type:Boolean})],y.prototype,"debug",void 0),m([(0,n.Cb)({type:String})],y.prototype,"appearance",void 0),y=m([(0,n.Mo)("metamap-frame")],y)},186:(t,e,i)=>{"use strict";i.r(e),i.d(e,{MetaMapSpinner:()=>r});var o=i(897),n=i(95),s=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};let r=class extends o.oi{static get styles(){return o.iv` :host { display: inline-block; width: 1.5em; height: 1.5em; } svg { width: 100%; heigth: 100%; animation: rotate 2s linear infinite; transform-origin: center center; } circle { stroke-dasharray: 1, 200; stroke-dashoffset: 0; animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite; stroke-linecap: round; stroke-width: 5px; } @keyframes rotate { 100% { transform: rotate(360deg); } } @keyframes dash { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 89, 200; stroke-dashoffset: -35px; } 100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124px; } } `}render(){return o.dy` `}};s([(0,n.Cb)({type:String})],r.prototype,"color",void 0),r=s([(0,n.Mo)("metamap-spinner")],r)},422:(t,e,i)=>{"use strict";i.d(e,{F:()=>n});var o=i(275);class n{constructor(t){this.listeners={},this.options=Object.assign(Object.assign({signupHost:"https://signup.getmati.com",debug:!1},t),{metadata:t.metadata?"object"==typeof t.metadata?JSON.stringify(t.metadata):t.metadata:null}),this.handleFrameMessages=this.handleFrameMessages.bind(this),this.on=this.on.bind(this),this.off=this.off.bind(this),this.emitEvent=this.emitEvent.bind(this),this.removeFrame=this.removeFrame.bind(this),this.start=this.start.bind(this)}handleFrameMessages({origin:t,data:e}){if(t===this.options.signupHost)try{const{action:t,payload:i}=JSON.parse(e),[,n]=(0,o.Kk)(t);switch(n){case o.LI.loaded:break;case o.LI.exitedSdk:case o.LI.userFinishedSdk:this.removeFrame()}this.emitEvent(n,i)}catch(t){console.error("[METAMAP] unable to read info from metamap popup",t),this.emitEvent(o.LI.error,t)}}on(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].includes(e)||this.listeners[t].push(e)}off(t,e){this.listeners[t]&&this.listeners[t].includes(e)&&(this.listeners[t]=this.listeners[t].filter((t=>t!==e)))}emitEvent(t,e){const i=this.listeners[(0,o.Le)(o.pj.Default,t)];i&&i.forEach((t=>t({detail:Object.assign({},e)})))}removeFrame(){window.removeEventListener("message",this.handleFrameMessages);const t=document.querySelector("metamap-frame");t&&t.remove()}start(){this.removeFrame();const t=document.createElement("metamap-frame");t.setAttribute("data-qa","metamap-frame"),["signupHost","clientId","flowId","identityId","verificationId","configurationId","encryptionConfigurationId","nopersist","debug","color","textColor","metadata"].forEach((e=>{this.options[e]&&t.setAttribute(e,this.options[e])})),window.addEventListener("message",this.handleFrameMessages),window.document.body.appendChild(t)}}window.MetamapVerification=n},95:(t,e,i)=>{"use strict";i.d(e,{Mo:()=>o,Cb:()=>r});const o=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){customElements.define(t,e)}}})(t,e),n=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},s=(t,e,i)=>{e.constructor.createProperty(i,t)};function r(t){return(e,i)=>void 0!==i?s(t,e,i):n(t,e)}var a;null===(a=window.HTMLSlotElement)||void 0===a||a.prototype.assignedElements},897:(t,e,i)=>{"use strict";i.d(e,{oi:()=>at,iv:()=>l,dy:()=>F});const o=window,n=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),r=new WeakMap;class a{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(n&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&r.set(e,t))}return t}toString(){return this.cssText}}const l=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new a(i,t,s)},d=n?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,s))(e)})(t):t;var c;const h=window,p=h.trustedTypes,u=p?p.emptyScript:"",v=h.reactiveElementPolyfillSupport,f={toAttribute(t,e){switch(e){case Boolean:t=t?u:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},m=(t,e)=>e!==t&&(e==e||t==t),y={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:m},g="finalized";class b extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const n=this[t];this[e]=o,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||y}static finalize(){if(this.hasOwnProperty(g))return!1;this[g]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{n?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=o.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=y){var o;const n=this.constructor._$Ep(t,i);if(void 0!==n&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:f).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,n=o._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=o.getPropertyOptions(n),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:f;this._$El=n,this[n]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var w;b[g]=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:b}),(null!==(c=h.reactiveElementVersions)&&void 0!==c?c:h.reactiveElementVersions=[]).push("1.6.3");const $=window,_=$.trustedTypes,C=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,S="$lit$",E=`lit$${(Math.random()+"").slice(9)}$`,A="?"+E,x=`<${A}>`,k=document,P=()=>k.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,L="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,H=/>/g,R=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,U=/"/g,N=/^(?:script|style|textarea|title)$/i,D=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),F=D(1),B=(D(2),Symbol.for("lit-noChange")),W=Symbol.for("lit-nothing"),z=new WeakMap,V=k.createTreeWalker(k,129,null,!1);function q(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"":"",r=T;for(let e=0;e"===l[0]?(r=null!=n?n:T,d=-1):void 0===l[1]?d=-2:(d=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?R:'"'===l[3]?U:j):r===U||r===j?r=R:r===O||r===H?r=T:(r=R,n=void 0);const h=r===R&&t[e+1].startsWith("/>")?" ":"";s+=r===T?i+x:d>=0?(o.push(a),i.slice(0,d)+S+i.slice(d)+E+h):i+E+(-2===d?(o.push(void 0),e):h)}return[q(t,s+(t[i]||"")+(2===e?"":"")),o]};class J{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,a=this.parts,[l,d]=K(t,e);if(this.el=J.createElement(l,i),V.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=V.nextNode())&&a.length0){o.textContent=_?_.emptyScript:"";for(let i=0;iM(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==W&&I(this._$AH)?this._$AA.nextSibling.data=t:this.$(k.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=J.createElement(q(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(i);else{const t=new Z(n,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=z.get(t.strings);return void 0===e&&z.set(t.strings,e=new J(t)),e}T(t){M(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new G(this.k(P()),this.k(P()),this,this.options)):i=e[o],i._$AI(n),o++;o2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=Y(this,t,e,0),s=!I(t)||t!==this._$AH&&t!==B,s&&(this._$AH=t);else{const o=t;let r,a;for(t=n[0],r=0;r{var o,n;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=s._$litPart$;if(void 0===r){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;s._$litPart$=r=new G(e.insertBefore(P(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return B}}at.finalized=!0,at._$litElement$=!0,null===(st=globalThis.litElementHydrateSupport)||void 0===st||st.call(globalThis,{LitElement:at});const lt=globalThis.litElementPolyfillSupport;null==lt||lt({LitElement:at}),(null!==(rt=globalThis.litElementVersions)&&void 0!==rt?rt:globalThis.litElementVersions=[]).push("3.3.3")}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o].call(s.exports,s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";i(17),i(422),console.info("[METAMAP] MetaMap Button version:","1.2.1"),window.WebComponents=window.WebComponents||{},window.WebComponents.root=window.WebComponents.root||"https://unpkg.com/@webcomponents/webcomponentsjs@2.4.3/",WebComponents.ready?(Promise.resolve().then(i.bind(i,327)),Promise.resolve().then(i.bind(i,787)),Promise.resolve().then(i.bind(i,732)),Promise.resolve().then(i.bind(i,186))):addEventListener("WebComponentsReady",(()=>{Promise.resolve().then(i.bind(i,327)),Promise.resolve().then(i.bind(i,787)),Promise.resolve().then(i.bind(i,732)),Promise.resolve().then(i.bind(i,186))}))})()})();