(()=>{var e={1734:(e,t,r)=>{e.exports=r(47778).Symbol},3565:(e,t,r)=>{var n=r(85009),o=r(4524),i=r(38647);e.exports=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i},4524:(e,t,r)=>{var n=r(11993);e.exports=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},5542:(e,t,r)=>{var n=r(3565);e.exports=r(95620)(n)},6999:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},9493:(e,t,r)=>{var n=r(21583),o=r(30885);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},9514:(e,t,r)=>{var n=r(92511),o=r(28793);e.exports=n?function(e){return n.get(e)}:o},9599:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},9742:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},11993:(e,t,r)=>{var n=r(43820),o=r(37951);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},13605:e=>{"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r))));return[t].concat(["/*# ".concat("sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n)," */")]).join(`
`)}return[t].join(`
`)}},14299:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(13605),o=r.n(n),i=r(72485),a=r.n(i)()(o());a.push([e.id,":host{margin-left:unset;padding:0 !important;outline:none !important;outline-color:none !important;background-color:rgba(0,0,0,0) !important;border:none !important;box-shadow:none !important;min-width:unset !important;min-height:unset !important;overflow:unset !important;pointer-events:none;position:absolute !important;isolation:unset !important;margin:0 !important;opacity:1;z-index:unset !important;order:0 !important;height:0 !important;width:0 !important;float:left !important;animation:none !important;flex:0 0 0;grid-row:auto/span 1 !important;grid-column:auto/span 1 !important}:host>input{pointer-events:all}button{margin-left:unset;padding:0 !important;outline:none !important;outline-color:none !important;background-color:rgba(0,0,0,0) !important;border:none !important;box-shadow:none !important;min-width:unset !important;min-height:unset !important;overflow:unset !important;pointer-events:all;margin:auto;top:0;right:.3571428571em;opacity:.9;max-width:0;animation:icon-fade-in .25s ease-in-out .05s both !important;transition:opacity .2s ease-in-out;margin-top:0 !important;cursor:pointer !important;position:absolute !important;background-size:cover !important;border-radius:unset !important}button:hover,button:focus,button:active{transform:none !important}button::before{content:none !important}button::after{content:var(--control-count) !important;position:absolute !important;top:0 !important;right:0 !important;bottom:0 !important;left:0 !important;margin:auto !important;width:var(--control-lineheight) !important;color:#fff !important;text-align:center !important;font-family:system-ui,sans-serif !important;line-height:var(--control-lineheight) !important;font-size:var(--control-fontsize) !important;display:block !important;font-weight:bold !important;text-shadow:0 .5px 3px #320dc5 !important;opacity:0;animation:counter-fade-in .15s ease-in-out .15s both !important}button:hover{opacity:1}@keyframes icon-fade-in{from{opacity:0;max-width:0}to{opacity:.9;max-width:2.5em}}@keyframes counter-fade-in{from{opacity:0}to{opacity:1}}","",{version:3,sources:["webpack://./src/app/content/injections/custom-elements/ProtonPassControl.raw.scss","webpack://./src/app/content/injections/styles/reset.scss"],names:[],mappings:"AAMA,MCLC,iBAAA,CACA,oBAAA,CACA,uBAAA,CACA,6BAAA,CACA,yCAAA,CACA,sBAAA,CACA,0BAAA,CACA,0BAAA,CACA,2BAAA,CACA,yBAAA,CDDA,mBAAA,CACA,4BAAA,CACA,0BAAA,CAGA,mBAAA,CACA,SAAA,CACA,wBAAA,CACA,kBAAA,CACA,mBAAA,CACA,kBAAA,CAEA,qBAAA,CACA,yBAAA,CAGA,UAAA,CAGA,+BAAA,CACA,kCAAA,CAEA,YACC,kBAAA,CAIF,OCnCC,iBAAA,CACA,oBAAA,CACA,uBAAA,CACA,6BAAA,CACA,yCAAA,CACA,sBAAA,CACA,0BAAA,CACA,0BAAA,CACA,2BAAA,CACA,yBAAA,CD6BA,kBAAA,CACA,WAAA,CACA,KAAA,CACA,mBAAA,CACA,UAAA,CACA,WAAA,CACA,4DAAA,CACA,kCAAA,CACA,uBAAA,CACA,yBAAA,CACA,4BAAA,CACA,gCAAA,CACA,8BAAA,CAEA,wCAGC,yBAAA,CAGD,eACC,uBAAA,CAGD,cACC,uCAAA,CACA,4BAAA,CACA,gBAAA,CAAA,kBAAA,CAAA,mBAAA,CAAA,iBAAA,CACA,sBAAA,CACA,0CAAA,CACA,qBAAA,CACA,4BAAA,CACA,2CAAA,CACA,gDAAA,CACA,4CAAA,CACA,wBAAA,CACA,2BAAA,CACA,yCAAA,CACA,SAAA,CACA,+DAAA,CAGD,aACC,SAAA,CAIF,wBACC,KACC,SAAA,CACA,WAAA,CAGD,GACC,UAAA,CACA,eAAA,CAAA,CAIF,2BACC,KACC,SAAA,CAGD,GACC,SAAA,CAAA",sourcesContent:[`$base-font-size: 14 !default;

@use 'sass:meta';
@import '@proton/styles/scss/lib/em';
@import '../styles/reset';

:host {
	@include reset;

	pointer-events: none;
	position: absolute !important;
	isolation: unset !important;

	/* force reset element */
	margin: 0 !important;
	opacity: 1;
	z-index: unset !important;
	order: 0 !important;
	block-size: 0 !important;
	inline-size: 0 !important;
	/* stylelint-disable-next-line */
	float: left !important;
	animation: none !important;

	/* if parent display: flex */
	flex: 0 0 0;

	/* if parent display: grid */
	grid-row: auto / span 1 !important;
	grid-column: auto / span 1 !important;

	> input {
		pointer-events: all;
	}
}

button {
	@include reset;

	pointer-events: all;
	margin: auto;
	inset-block-start: 0;
	inset-inline-end: em(5);
	opacity: 0.9;
	max-inline-size: 0;
	animation: icon-fade-in 0.25s ease-in-out 0.05s both !important;
	transition: opacity 0.2s ease-in-out;
	margin-block-start: 0 !important;
	cursor: pointer !important;
	position: absolute !important;
	background-size: cover !important;
	border-radius: unset !important;

	&:hover,
	&:focus,
	&:active {
		transform: none !important;
	}

	&::before {
		content: none !important;
	}

	&::after {
		content: var(--control-count) !important;
		position: absolute !important;
		inset: 0 !important;
		margin: auto !important;
		inline-size: var(--control-lineheight) !important;
		color: white !important;
		text-align: center !important;
		font-family: system-ui, sans-serif !important;
		line-height: var(--control-lineheight) !important;
		font-size: var(--control-fontsize) !important;
		display: block !important;
		font-weight: bold !important;
		text-shadow: 0 0.5px 3px #320dc5 !important;
		opacity: 0;
		animation: counter-fade-in 0.15s ease-in-out 0.15s both !important;
	}

	&:hover {
		opacity: 1;
	}
}

@keyframes icon-fade-in {
	from {
		opacity: 0;
		max-inline-size: 0;
	}

	to {
		opacity: 0.9;
		max-inline-size: em(35);
	}
}

@keyframes counter-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}
`,`@mixin reset {
	margin-inline-start: unset;
	padding: 0 !important;
	outline: none !important;
	outline-color: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	min-inline-size: unset !important;
	min-block-size: unset !important;
	overflow: unset !important;
}
`],sourceRoot:""}]);let s=a},16487:(e,t,r)=>{var n=r(70898),o=Object.create;e.exports=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}()},21583:(e,t,r)=>{var n=r(1734),o=r(50324),i=r(71761),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},21925:(e,t,r)=>{var n=r(21583),o=r(70898);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},22119:(e,t,r)=>{var n=r(6999),o=r(51460);e.exports=function e(t,r,i,a,s){var l=-1,u=t.length;for(i||(i=o),s||(s=[]);++l<u;){var c=t[l];r>0&&i(c)?r>1?e(c,r-1,i,a,s):n(s,c):a||(s[s.length]=c)}return s}},26562:(e,t,r)=>{var n=r(70898),o=r(35059),i=r(88761),a=Math.max,s=Math.min;e.exports=function(e,t,r){var l,u,c,d,m,p,f=0,g=!1,h=!1,A=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=l,n=u;return l=u=void 0,f=t,d=e.apply(n,r)}function b(e){var r=e-p,n=e-f;return void 0===p||r>=t||r<0||h&&n>=c}function w(){var e,r,n,i=o();if(b(i))return v(i);m=setTimeout(w,(e=i-p,r=i-f,n=t-e,h?s(n,c-r):n))}function v(e){return(m=void 0,A&&l)?y(e):(l=u=void 0,d)}function _(){var e,r=o(),n=b(r);if(l=arguments,u=this,p=r,n){if(void 0===m)return f=e=p,m=setTimeout(w,t),g?y(e):d;if(h)return clearTimeout(m),m=setTimeout(w,t),y(p)}return void 0===m&&(m=setTimeout(w,t)),d}return t=i(t)||0,n(r)&&(g=!!r.leading,c=(h="maxWait"in r)?a(i(r.maxWait)||0,t):c,A="trailing"in r?!!r.trailing:A),_.cancel=function(){void 0!==m&&clearTimeout(m),f=0,l=p=u=m=void 0},_.flush=function(){return void 0===m?d:v(o())},_}},27526:(e,t,r)=>{var n=r(55227),o=r(44118),i=r(83984);e.exports=function(e){if(e instanceof n)return e.clone();var t=new o(e.__wrapped__,e.__chain__);return t.__actions__=i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},28793:e=>{e.exports=function(){}},30368:(e,t,r)=>{e.exports=r(11993)(r(47778),"WeakMap")},30885:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},35059:(e,t,r)=>{var n=r(47778);e.exports=function(){return n.Date.now()}},35472:(e,t,r)=>{var n=r(55227),o=r(9514),i=r(72339),a=r(52905);e.exports=function(e){var t=i(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var s=o(r);return!!s&&e===s[0]}},37951:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},38318:(e,t,r)=>{e.exports=r(47778)["__core-js_shared__"]},38647:e=>{e.exports=function(e){return e}},40415:(e,t,r)=>{e.exports="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},41622:(e,t,r)=>{var n=r(44118),o=r(85559),i=r(9514),a=r(72339),s=r(67174),l=r(35472);e.exports=function(e){return o(function(t){var r=t.length,o=r,u=n.prototype.thru;for(e&&t.reverse();o--;){var c=t[o];if("function"!=typeof c)throw TypeError("Expected a function");if(u&&!d&&"wrapper"==a(c))var d=new n([],!0)}for(o=d?o:r;++o<r;){var m=a(c=t[o]),p="wrapper"==m?i(c):void 0;d=p&&l(p[0])&&424==p[1]&&!p[4].length&&1==p[9]?d[a(p[0])].apply(d,p[3]):1==c.length&&l(c)?d[m]():d.thru(c)}return function(){var e=arguments,n=e[0];if(d&&1==e.length&&s(n))return d.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}})}},43820:(e,t,r)=>{var n=r(21925),o=r(60151),i=r(70898),a=r(85686),s=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:s).test(a(e))}},44118:(e,t,r)=>{function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}n.prototype=r(16487)(r(84886).prototype),n.prototype.constructor=n,e.exports=n},47778:(e,t,r)=>{var n=r(40415),o="object"==typeof self&&self&&self.Object===Object&&self;e.exports=n||o||Function("return this")()},48659:(e,t,r)=>{var n=r(73913),o=r(30885),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable;e.exports=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")}},50324:(e,t,r)=>{var n=r(1734),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},51460:(e,t,r)=>{var n=r(1734),o=r(48659),i=r(67174),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},52905:(e,t,r)=>{var n=r(55227),o=r(44118),i=r(84886),a=r(67174),s=r(30885),l=r(27526),u=Object.prototype.hasOwnProperty;function c(e){if(s(e)&&!a(e)&&!(e instanceof n)){if(e instanceof o)return e;if(u.call(e,"__wrapped__"))return l(e)}return new o(e)}c.prototype=i.prototype,c.prototype.constructor=c,e.exports=c},53616:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(13605),o=r.n(n),i=r(72485),a=r.n(i)()(o());a.push([e.id,":host{margin-left:unset;padding:0 !important;outline:none !important;outline-color:none !important;background-color:rgba(0,0,0,0) !important;border:none !important;box-shadow:none !important;min-width:unset !important;min-height:unset !important;overflow:unset !important;--frame-background-color-dark: #1f1f31;--frame-background-color-light: #fbf9fe;position:fixed !important;width:100% !important;border:0 !important;z-index:2147483647 !important;top:unset !important;right:unset !important;bottom:unset !important;left:unset !important;top:0 !important;left:0 !important;height:0 !important;padding:0 !important;margin:0 !important;--frame-background-color: var(--frame-background-color-dark)}:host([data-protonpass-theme=light]){--frame-background-color: var(--frame-background-color-light)}@media(prefers-color-scheme: light){:host([data-protonpass-theme=os]){--frame-background-color: var(--frame-background-color-light)}}:host::backdrop{position:fixed !important;top:0 !important;right:0 !important;bottom:0 !important;left:0 !important;background:rgba(0,0,0,0) !important;background-image:none !important;backdrop-filter:none !important;pointer-events:none !important;animation:none !important;transform:none !important;transition:none !important}iframe{position:absolute;width:var(--frame-width) !important;height:var(--frame-height) !important;top:var(--frame-top) !important;left:var(--frame-left) !important;right:var(--frame-right) !important;background-color:var(--frame-background-color) !important;box-shadow:0 2px 10px rgba(0,0,0,.3) !important;border-radius:12px !important;border:none !important;padding:0 !important;display:none;margin:0 !important;pointer-events:all !important}iframe.visible{display:block;transition:height .15s ease-in-out;animation:var(--frame-animation) .25s ease-in-out .05s both !important}iframe.fixed{position:fixed !important}@keyframes fadein{from{opacity:0;max-height:0}to{opacity:1;max-height:var(--frame-height)}}@keyframes slidein{from{transform:translateX(380px)}to{transform:translateX(0)}}","",{version:3,sources:["webpack://./src/app/content/injections/custom-elements/ProtonPassRoot.raw.scss","webpack://./src/app/content/injections/styles/reset.scss"],names:[],mappings:"AAEA,MCDC,iBAAA,CACA,oBAAA,CACA,uBAAA,CACA,6BAAA,CACA,yCAAA,CACA,sBAAA,CACA,0BAAA,CACA,0BAAA,CACA,2BAAA,CACA,yBAAA,CDLA,sCAAA,CACA,uCAAA,CAEA,yBAAA,CACA,qBAAA,CACA,mBAAA,CACA,6BAAA,CACA,oBAAA,CAAA,sBAAA,CAAA,uBAAA,CAAA,qBAAA,CACA,gBAAA,CACA,iBAAA,CACA,mBAAA,CACA,oBAAA,CACA,mBAAA,CAEA,4DAAA,CAGD,qCACC,6DAAA,CAIA,oCADD,kCAEE,6DAAA,CAAA,CAIF,gBACC,yBAAA,CACA,gBAAA,CAAA,kBAAA,CAAA,mBAAA,CAAA,iBAAA,CACA,mCAAA,CACA,gCAAA,CACA,+BAAA,CACA,8BAAA,CACA,yBAAA,CACA,yBAAA,CACA,0BAAA,CAGD,OACC,iBAAA,CACA,mCAAA,CACA,qCAAA,CACA,+BAAA,CACA,iCAAA,CAAA,mCAAA,CACA,yDAAA,CACA,+CAAA,CACA,6BAAA,CACA,sBAAA,CACA,oBAAA,CACA,YAAA,CACA,mBAAA,CACA,6BAAA,CAEA,eACC,aAAA,CACA,kCAAA,CACA,sEAAA,CAGD,aACC,yBAAA,CAIF,kBACC,KACC,SAAA,CACA,YAAA,CAGD,GACC,SAAA,CACA,8BAAA,CAAA,CAIF,mBACC,KACC,2BAAA,CAGD,GACC,uBAAA,CAAA",sourcesContent:[`@import '../styles/reset';

:host {
	@include reset;

	--frame-background-color-dark: #1f1f31;
	--frame-background-color-light: #fbf9fe;

	position: fixed !important;
	inline-size: 100% !important;
	border: 0 !important;
	z-index: 2147483647 !important;
	inset: unset !important;
	inset-block-start: 0 !important;
	inset-inline-start: 0 !important;
	block-size: 0 !important;
	padding: 0 !important;
	margin: 0 !important;

	--frame-background-color: var(--frame-background-color-dark);
}

:host([data-protonpass-theme='light']) {
	--frame-background-color: var(--frame-background-color-light);
}

:host([data-protonpass-theme='os']) {
	@media (prefers-color-scheme: light) {
		--frame-background-color: var(--frame-background-color-light);
	}
}

:host::backdrop {
	position: fixed !important;
	inset: 0 !important;
	background: transparent !important;
	background-image: none !important;
	backdrop-filter: none !important;
	pointer-events: none !important;
	animation: none !important;
	transform: none !important;
	transition: none !important;
}

iframe {
	position: absolute;
	inline-size: var(--frame-width) !important;
	block-size: var(--frame-height) !important;
	inset-block-start: var(--frame-top) !important;
	inset-inline: var(--frame-left) var(--frame-right) !important;
	background-color: var(--frame-background-color) !important;
	box-shadow: 0 2px 10px rgb(0 0 0 / 0.3) !important;
	border-radius: 12px !important;
	border: none !important;
	padding: 0 !important;
	display: none;
	margin: 0 !important;
	pointer-events: all !important;

	&.visible {
		display: block;
		transition: block-size 0.15s ease-in-out;
		animation: var(--frame-animation) 0.25s ease-in-out 0.05s both !important;
	}

	&.fixed {
		position: fixed !important;
	}
}

@keyframes fadein {
	from {
		opacity: 0;
		max-block-size: 0;
	}

	to {
		opacity: 1;
		max-block-size: var(--frame-height);
	}
}

@keyframes slidein {
	from {
		transform: translateX(380px);
	}

	to {
		transform: translateX(0);
	}
}
`,`@mixin reset {
	margin-inline-start: unset;
	padding: 0 !important;
	outline: none !important;
	outline-color: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	min-inline-size: unset !important;
	min-block-size: unset !important;
	overflow: unset !important;
}
`],sourceRoot:""}]);let s=a},54621:(e,t,r)=>{var n=r(22119);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},55227:(e,t,r)=>{function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}n.prototype=r(16487)(r(84886).prototype),n.prototype.constructor=n,e.exports=n},55377:(e,t,r)=>{var n=r(26562),o=r(70898);e.exports=function(e,t,r){var i=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return o(r)&&(i="leading"in r?!!r.leading:i,a="trailing"in r?!!r.trailing:a),n(e,t,{leading:i,maxWait:t,trailing:a})}},60151:(e,t,r)=>{var n,o=r(38318),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},67174:e=>{e.exports=Array.isArray},70898:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},71761:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},72339:(e,t,r)=>{var n=r(97914),o=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],i=o.call(n,t)?r.length:0;i--;){var a=r[i],s=a.func;if(null==s||s==e)return a.name}return t}},72485:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&a[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]&&(c[1]="@media ".concat(c[2]," {").concat(c[1],"}")),c[2]=r),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},73913:(e,t,r)=>{var n=r(21583),o=r(30885);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},79162:(e,t,r)=>{var n=r(9742),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a<s;)l[a]=i[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=i[a];return u[t]=r(l),n(e,this,u)}}},80320:function(e,t){var r;"undefined"!=typeof globalThis||"undefined"!=typeof self&&self,void 0===(r=(function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw Error("This script should only be loaded in a browser extension.");globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id?e.exports=globalThis.browser:e.exports=(e=>{let t={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(t).length)throw Error("api-metadata.json has not been included in browser-polyfill");class r extends WeakMap{constructor(e,t){super(t),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}let n=(t,r)=>(...n)=>{e.runtime.lastError?t.reject(Error(e.runtime.lastError.message)):r.singleCallbackArg||n.length<=1&&!1!==r.singleCallbackArg?t.resolve(n[0]):t.resolve(n)},o=e=>1==e?"argument":"arguments",i=(e,t,r)=>new Proxy(t,{apply:(t,n,o)=>r.call(n,e,...o)}),a=Function.call.bind(Object.prototype.hasOwnProperty),s=(e,t={},r={})=>{let l=Object.create(null);return new Proxy(Object.create(e),{has:(t,r)=>r in e||r in l,get(u,c,d){if(c in l)return l[c];if(!(c in e))return;let m=e[c];if("function"==typeof m)if("function"==typeof t[c])m=i(e,e[c],t[c]);else if(a(r,c)){let t,a=(t=r[c],function(e,...r){if(r.length<t.minArgs)throw Error(`Expected at least ${t.minArgs} ${o(t.minArgs)} for ${c}(), got ${r.length}`);if(r.length>t.maxArgs)throw Error(`Expected at most ${t.maxArgs} ${o(t.maxArgs)} for ${c}(), got ${r.length}`);return new Promise((o,i)=>{if(t.fallbackToNoCallback)try{e[c](...r,n({resolve:o,reject:i},t))}catch(n){console.warn(`${c} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,n),e[c](...r),t.fallbackToNoCallback=!1,t.noCallback=!0,o()}else t.noCallback?(e[c](...r),o()):e[c](...r,n({resolve:o,reject:i},t))})});m=i(e,e[c],a)}else m=m.bind(e);else if("object"==typeof m&&null!==m&&(a(t,c)||a(r,c)))m=s(m,t[c],r[c]);else{if(!a(r,"*"))return Object.defineProperty(l,c,{configurable:!0,enumerable:!0,get:()=>e[c],set(t){e[c]=t}}),m;m=s(m,t[c],r["*"])}return l[c]=m,m},set:(t,r,n,o)=>(r in l?l[r]=n:e[r]=n,!0),defineProperty:(e,t,r)=>Reflect.defineProperty(l,t,r),deleteProperty:(e,t)=>Reflect.deleteProperty(l,t)})},l=e=>({addListener(t,r,...n){t.addListener(e.get(r),...n)},hasListener:(t,r)=>t.hasListener(e.get(r)),removeListener(t,r){t.removeListener(e.get(r))}}),u=new r(e=>"function"!=typeof e?e:function(t){e(s(t,{},{getContent:{minArgs:0,maxArgs:0}}))}),c=new r(e=>"function"!=typeof e?e:function(t,r,n){let o,i,a,s=!1,l=new Promise(e=>{i=function(t){s=!0,e(t)}});try{a=e(t,r,i)}catch(e){a=Promise.reject(e)}let u=!0!==a&&(o=a)&&"object"==typeof o&&"function"==typeof o.then;return(!0===a||!!u||!!s)&&((u?a:l).then(e=>{n(e)},e=>{n({__mozWebExtensionPolyfillReject__:!0,message:e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred"})}).catch(e=>{console.error("Failed to send onMessage rejected reply",e)}),!0)}),d=({reject:t,resolve:r},n)=>{e.runtime.lastError?"The message port closed before a response was received."===e.runtime.lastError.message?r():t(Error(e.runtime.lastError.message)):n&&n.__mozWebExtensionPolyfillReject__?t(Error(n.message)):r(n)},m=(e,t,r,...n)=>{if(n.length<t.minArgs)throw Error(`Expected at least ${t.minArgs} ${o(t.minArgs)} for ${e}(), got ${n.length}`);if(n.length>t.maxArgs)throw Error(`Expected at most ${t.maxArgs} ${o(t.maxArgs)} for ${e}(), got ${n.length}`);return new Promise((e,t)=>{let o=d.bind(null,{resolve:e,reject:t});n.push(o),r.sendMessage(...n)})},p={devtools:{network:{onRequestFinished:l(u)}},runtime:{onMessage:l(c),onMessageExternal:l(c),sendMessage:m.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:m.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},f={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return t.privacy={network:{"*":f},services:{"*":f},websites:{"*":f}},s(e,p,t)})(chrome)}).apply(t,[e]))||(e.exports=r)},80601:(e,t,r)=>{e.exports=r(41622)()},83984:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},84886:e=>{e.exports=function(){}},85009:e=>{e.exports=function(e){return function(){return e}}},85559:(e,t,r)=>{var n=r(54621),o=r(79162),i=r(5542);e.exports=function(e){return i(o(e,void 0,n),e+"")}},85686:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},88761:(e,t,r)=>{var n=r(95399),o=r(70898),i=r(9493),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):s.test(e)?a:+e}},92511:(e,t,r)=>{var n=r(30368);e.exports=n&&new n},95399:(e,t,r)=>{var n=r(9599),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},95620:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},97886:function(e,t,r){var n,o;!function(i,a){"use strict";void 0===(o="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=o)}(0,function(){"use strict";var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],o={},i=null;function a(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(){for(var r=this.getLevel(),o=0;o<n.length;o++){var i=n[o];this[i]=o<r?e:this.methodFactory(i,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function c(n,o,i){var l;return"debug"===(l=n)&&(l="log"),typeof console!==t&&("trace"===l&&r?s:void 0!==console[l]?a(console,l):void 0!==console.log?a(console,"log"):e)||u.apply(this,arguments)}function d(e,r){var a,s,u,d=this,m="loglevel";function p(){var e;if(typeof window!==t&&m){try{e=window.localStorage[m]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(m),o=r.indexOf(n+"=");-1!==o&&(e=/^([^;]+)/.exec(r.slice(o+n.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function f(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?m+=":"+e:"symbol"==typeof e&&(m=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=r||c,d.getLevel=function(){return null!=u?u:null!=s?s:a},d.setLevel=function(e,r){return u=f(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&m){try{window.localStorage[m]=r;return}catch(e){}try{window.document.cookie=encodeURIComponent(m)+"="+r+";"}catch(e){}}}(u),l.call(d)},d.setDefaultLevel=function(e){s=f(e),p()||d.setLevel(e,!1)},d.resetLevel=function(){if(u=null,typeof window!==t&&m){try{window.localStorage.removeItem(m)}catch(e){}try{window.document.cookie=encodeURIComponent(m)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}l.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(i!==d&&(a=f(i.getLevel())),l.call(d),i===d)for(var e in o)o[e].rebuild()},a=f(i?i.getLevel():"WARN");var g=p();null!=g&&(u=f(g)),l.call(d)}(i=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new d(e,i.methodFactory)),t};var m=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=m),i},i.getLoggers=function(){return o},i.default=i,i})},97914:e=>{e.exports={}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";let e,t,n,o,i,a,s,l,u=((N={}).STRICT="get",N.LOOSE="read",N),c=e=>{let t={};return{set:e=>t.ctx=e,get:()=>{if(void 0===t.ctx)throw Error(`Context#${e} has not been initialized`);return t.ctx},read:()=>t.ctx,clear:()=>{delete t.ctx,t.ctx=void 0}}},d=c("contentscript"),m=(t=u.LOOSE,e=>(...r)=>e(d[t]()??null,...r)),p=((I={}).ACCOUNT_EXTENSION="auth-ext",I.ACCOUNT_FORK="fork",I.ACCOUNT_ONBOARDING="pass-onboarding",I.ACCOUNT_PROBE="pass-installed",I.ALIAS_CREATE="ALIAS_CREATE",I.ALIAS_OPTIONS="ALIAS_OPTIONS",I.AUTH_CHECK="AUTH_CHECK",I.AUTH_CONFIRM_PASSWORD="AUTH_CONFIRM_PASSWORD",I.AUTH_INIT="AUTH_INIT",I.AUTH_PULL_FORK="AUTH_PULL_FORK",I.AUTH_UNLOCK="AUTH_UNLOCK",I.AUTOFILL_CHECK_FORM="AUTOFILL_CHECK_FORM",I.AUTOFILL_IDENTITY="AUTOFILL_IDENTITY",I.AUTOFILL_IDENTITY_QUERY="AUTOFILL_IDENTITY_QUERY",I.AUTOFILL_LOGIN="AUTOFILL_LOGIN",I.AUTOFILL_LOGIN_QUERY="AUTOFILL_LOGIN_QUERY",I.AUTOFILL_OTP_CHECK="AUTOFILL_OTP_CHECK",I.AUTOFILL_SYNC="AUTOFILL_SYNC",I.AUTOSAVE_REQUEST="AUTOSAVE_REQUEST",I.AUTOSUGGEST_PASSWORD="AUTOSUGGEST_PASSWORD",I.B2B_EVENT="B2B_EVENT",I.CLIENT_INIT="CLIENT_INIT",I.CLIPBOARD_OFFSCREEN_READ="CLIPBOARD_OFFSCREEN_READ",I.CLIPBOARD_OFFSCREEN_WRITE="CLIPBOARD_OFFSCREEN_WRITE",I.CLIPBOARD_AUTOCLEAR="CLIPBOARD_AUTOCLEAR",I.DEBUG="DEBUG",I.FEATURE_FLAGS_UPDATE="FEATURE_FLAGS_UPDATE",I.FETCH_ABORT="FETCH_ABORT",I.FETCH_DOMAINIMAGE="FETCH_DOMAINIMAGE",I.FORM_ENTRY_COMMIT="FORM_ENTRY_COMMIT",I.FORM_ENTRY_REQUEST="FORM_ENTRY_REQUEST",I.FORM_ENTRY_STAGE="FORM_ENTRY_STAGE",I.FORM_ENTRY_STASH="FORM_ENTRY_STASH",I.FORM_STATUS="FORM_STATUS",I.FS_WRITE="FS_WRITE",I.FS_ERROR="FS_ERROR",I.LOAD_CONTENT_SCRIPT="LOAD_CONTENT_SCRIPT",I.LOCALE_UPDATED="LOCALE_UPDATED",I.LOG_EVENT="LOG_EVENT",I.LOG_REQUEST="LOG_REQUEST",I.MONITOR_2FAS="MONITOR_2FAS",I.MONITOR_WEAK_PASSWORDS="MONITOR_WEAK_PASSWORDS",I.NOTIFICATION="NOTIFICATION",I.OTP_CODE_GENERATE="OTP_CODE_GENERATE",I.PASS_CORE_RPC="PASS_CORE_RPC",I.PASSKEY_CREATE="PASSKEY_CREATE",I.PASSKEY_GET="PASSKEY_GET",I.PASSKEY_INTERCEPT="PASSKEY_INTERCEPT",I.PASSKEY_QUERY="PASSKEY_QUERY",I.PAUSE_WEBSITE="PAUSE_WEBSITE",I.PERMISSIONS_UPDATE="PERMISSIONS_UPDATE",I.PING="PING",I.POPUP_INIT="POPUP_INIT",I.PORT_FORWARDING_MESSAGE="PORT_FORWARDING",I.PORT_UNAUTHORIZED="PORT_UNAUTHORIZED",I.REGISTER_ELEMENTS="REGISTER_ELEMENTS",I.RESOLVE_EXTENSION_KEY="RESOLVE_EXTENSION_KEY",I.RESOLVE_USER="RESOLVE_USER",I.SENTRY_CS_EVENT="SENTRY_CS_EVENT",I.SETTINGS_UPDATE="SETTINGS_UPDATE",I.SPOTLIGHT_ACK="SPOTLIGHT_ACK",I.SPOTLIGHT_CHECK="SPOTLIGHT_CHECK",I.SPOTLIGHT_REQUEST="SPOTLIGHT_REQUEST",I.STORE_DISPATCH="STORE_DISPATCH",I.TABS_QUERY="TABS_QUERY",I.TELEMETRY_EVENT="TELEMETRY_EVENT",I.UNLOAD_CONTENT_SCRIPT="UNLOAD_CONTENT_SCRIPT",I.UPDATE_AVAILABLE="UPDATE_AVAILABLE",I.VAULTS_QUERY="VAULTS_QUERY",I.WEBSITE_RULES_REQUEST="WEBSITE_RULES_REQUEST",I.WORKER_RELOAD="WORKER_RELOAD",I.WORKER_STATE_CHANGE="WORKER_STATE_CHANGE",I);var f,g,h,A,y,b,w,v,_,E,C,T,R,S,O,x,N,I,P,F,M,L,k=r(80320),D=r.n(k),U=r(97886),B=r.n(U);function G(){}B().methodFactory=()=>G,B().setLevel("INFO",!1);let H=B(),W=globalThis,$={allowProxy:!0,globals:{chrome:W.chrome,browser:W.browser}},q=(n=D(),setTimeout(()=>$.allowProxy&&Object.entries($.globals).filter(([,e])=>e).forEach(([e,t])=>{W[e]=new Proxy(t,{get(e,t,r){if("app"!==t)return H.error("[Extension::Error] extension API is protected")},set:()=>(H.error("[Extension::Error] extension API is read-only"),!1)})}),0),n);$.globals.chrome;class j extends Error{name="CriticalMessageResponseError";message="Worker failed to respond"}let Y=async e=>{try{let t=await q.runtime.sendMessage(q.runtime.id,e);if(void 0===t)throw new j;return t}catch(e){return{type:"error",error:e instanceof Error?e.message:"Unknown error",critical:e instanceof j}}};Y.on=async(e,t)=>t(await Y(e)),Y.onSuccess=async(e,t)=>Y.on(e,e=>{"success"===e.type&&t(e)});let z=e=>t=>({...t,sender:e,version:"1.33.1"});z("background"),z("popup"),z("page");let V=z("contentscript");z("offscreen");let K=e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,Z=(e,t)=>K(e)&&"type"in e&&"string"==typeof e.type&&(!t.type||t.type===e.type)&&(!t.sender||t.sender===e.sender);class Q extends Error{}class X extends Error{}function J(e){return e}function ee(e,t,r){let n,o,i=!0;if(eE(function(e){let a=t(e);(r(a,o)||i)&&(n=e,o=a,i=!1)},e),i)throw Error("Tried to call best() on empty iterable");return n}function et(e,t=J){return ee(e,t,(e,t)=>e>t)}function er(e,t=J){let r,n=[],o=!0;return eE(function(e){let i=t(e);i>r||o?(n=[e],r=i,o=!1):i===r&&n.push(e)},e),n}function en(e,t=J){return ee(e,t,(e,t)=>e<t)}function eo(e){let t,r=!0;return eE(function(e){r?(t=e,r=!1):t+=e},e),t}function*ei(e,t=e=>!0){for(let r of(yield e,e.childNodes))if(t(r))for(let e of ei(r,t))yield e}let ea=new Set(["ADDRESS","BLOCKQUOTE","BODY","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","HR","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL","DD","DT","FRAMESET","LI","TBODY","TD","TFOOT","TH","THEAD","TR","HTML"]);function es(e){return ea.has(e.tagName)}function*el(e,t=e=>!0){for(let r of ei(e,e=>!(es(e)||"SCRIPT"===e.tagName&&"STYLE"===e.tagName)&&t(e)))r.nodeType===r.TEXT_NODE&&(yield r.textContent)}function eu(e,t=e=>!0){return eo(e_(e=>ec(e).length,el(e,t)))}function ec(e){return e.replace(/\s{2,}/g," ")}function ed(e){return e.nodeType===e.TEXT_NODE&&0===e.textContent.trim().length}function em(e,t,r){if(e.has(t))return e.get(t);let n=r();return e.set(t,n),n}function ep(e,t,r){return e.has(t)?e.get(t):r()}function ef(e,t){let r=[],n=new Set(e),o=new Set;for(;n.size>0;)!function e(i){if(o.has(i))throw new Q("The graph has a cycle.");if(n.has(i)){for(let r of(o.add(i),t(i)))e(r);o.delete(i),n.delete(i),r.push(i)}}(eh(n));return r}class eg extends Set{pop(){for(let e of this.values())return this.delete(e),e;throw Error("Tried to pop from an empty NiceSet.")}extend(e){for(let t of e)this.add(t);return this}minus(e){let t=new eg(this);for(let r of e)t.delete(r);return t}toString(){return"{"+Array.from(this).join(", ")+"}"}}function eh(e){for(let t of e)return t}function eA(e){return e.ownerDocument.documentElement}function ey(e){return eC(e)?e:e.element}function*eb(e){let t;for(yield e;null!==(t=e.parentNode)&&t.nodeType===t.ELEMENT_NODE;)yield t,e=t}function ew(e){return 1/(1+Math.exp(-e))}function*ev(e){for(let r of e){var t;"string"!=typeof r&&!(r instanceof Element)&&(t=r)&&"function"==typeof t[Symbol.iterator]?yield*ev(r):yield r}}function*e_(e,t){for(let r of t)yield e(r)}function eE(e,t){for(let r of t)e(r)}function eC(e){return void 0!==e.nodeName}function*eT(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function eR(e){let t=e.ownerDocument;null===t&&(t=e);let r=t.defaultView;if(null===r)throw new X;return r}var eS=Object.freeze({__proto__:null,NiceSet:eg,ancestors:eb,attributesMatch:function(e,t,r=[]){let n=0===r.length?Array.from(e.attributes).map(e=>e.name):r;for(let r=0;r<n.length;r++){let o=e.getAttribute(n[r]);if(o&&(Array.isArray(o)&&o.some(t)||t(o)))return!0}return!1},best:ee,collapseWhitespace:ec,domSort:function(e){return Array.from(e).sort(function(e,t){let r=e.element,n=r.compareDocumentPosition(t.element);return n&r.DOCUMENT_POSITION_FOLLOWING?-1:n&r.DOCUMENT_POSITION_PRECEDING?1:0})},first:eh,flatten:ev,forEach:eE,getDefault:ep,identity:J,inlineTextLength:eu,inlineTexts:el,isBlock:es,isDomElement:eC,isVisible:function(e){let t=ey(e),r=eR(t),n=t.getBoundingClientRect(),o=r.getComputedStyle(t);if(0===n.width&&0===n.height&&"hidden"!==o.overflow||"hidden"===o.visibility||n.x+n.width<0||n.y+n.height<0)return!1;for(let e of eb(t)){let i=e===t,a=i?o:r.getComputedStyle(e);if("0"===a.opacity)return!1;if("contents"===a.display)continue;let s=i?n:e.getBoundingClientRect();if((0===s.width||0===s.height)&&"hidden"===o.overflow)return!1}return!0},isWhitespace:ed,length:function(e){let t=0;for(let r of e)t++;return t},linearScale:function(e,t,r){if(t<r){if(e<=t)return 0;else if(e>=r)return 1}else if(e>=t)return 0;else if(e<=r)return 1;return 1/(r-t)*(e-t)},linkDensity:function(e,t){return void 0===t&&(t=eu(e.element)),(t-eu(e.element,e=>"A"!==e.tagName))/t},map:e_,max:et,maxes:er,min:en,numberOfMatches:function(e,t){return(t.match(e)||[]).length},page:function(e){return function(t){let r=e(t);return void 0!==r.score&&(r.element=eA(t.element)),r}},reversed:eT,rgbaFromString:function(e){let t=e.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(t)return[t[1]/255,t[2]/255,t[3]/255,void 0===t[4]?void 0:parseFloat(t[4])];throw Error("Color "+e+" did not match pattern rgb[a](r, g, b[, a]).")},rootElement:eA,saturation:function(e,t,r){let n=Math.max(e,t,r),o=Math.min(e,t,r),i=1-Math.abs((n+o)/2*2-1);return 0===i?0:(n-o)/i},setDefault:em,sigmoid:ew,sum:eo,toDomElement:ey,toposort:ef,walk:ei,windowForElement:eR});function eO(e,t,{differentDepthCost:r=2,differentTagCost:n=2,sameTagCost:o=1,strideCost:i=1,additionalCost:a=(e,t)=>0}={}){if(e===t)return 0;let s=eC(e)?e:e.element,l=eC(t)?t:t.element,u=[s],c=[l],d=s,m=l;for(;!d.contains(l);)u.push(d=d.parentNode);let p=s.compareDocumentPosition(l);if(p&(s.DOCUMENT_POSITION_CONTAINS|s.DOCUMENT_POSITION_CONTAINED_BY))return Number.MAX_VALUE;do c.push(m=m.parentNode);while(m!==d)let f=u,g=c,h=0;for(p&s.DOCUMENT_POSITION_FOLLOWING?(f=u,g=c):p&s.DOCUMENT_POSITION_PRECEDING&&(f=c,g=u);f.length||g.length;){let e=f.pop(),t=g.pop();void 0===e||void 0===t?h+=r:h+=e.tagName===t.tagName?o:n,0!==i&&(h+=function(e,t){let r=0,n=e,o=n&&n!==t;for(;o;)(o=(n=n.nextSibling)&&n!==t)&&!ed(n)&&(r+=1);if(n!==t)for(n=t;n;)(n=n.previousSibling)&&!ed(n)&&(r+=1);return r}(e,t)*i)}return h+a(e,t)}class ex{constructor(e,t){this._matrix=new Map;const r=e.map(e=>[e]);for(let e of r){const r=new Map;for(let n of this._matrix.keys())r.set(n,t(e[0],n[0]));this._matrix.set(e,r)}this._numClusters=r.length}closest(){let e=this;if(this._numClusters<2)throw Error("There must be at least 2 clusters in order to return the closest() ones.");return en(function(){let t=[];for(let[r,n]of e._matrix.entries())for(let[e,o]of n.entries())t.push({a:r,b:e,distance:o});return t}(),e=>e.distance)}_cachedDistance(e,t){let r=this._matrix.get(e).get(t);return void 0===r&&(r=this._matrix.get(t).get(e)),r}merge(e,t){let r=new Map;for(let n of this._matrix.keys())n!==e&&n!==t&&r.set(n,Math.min(this._cachedDistance(e,n),this._cachedDistance(t,n)));for(let r of(this._matrix.delete(e),this._matrix.delete(t),this._matrix.values()))r.delete(e),r.delete(t);this._matrix.set([e,t],r),this._numClusters-=1}numClusters(){return this._numClusters}clusters(){return Array.from(this._matrix.keys()).map(e=>Array.from(ev(e)))}}function eN(e,t,r=eO){let n,o=new ex(e,r);for(;o.numClusters()>1&&(n=o.closest()).distance<t;)o.merge(n.a,n.b);return o.clusters()}var eI=Object.freeze({__proto__:null,clusters:eN,distance:eO,euclidean:function(e,t){function r(e){return e.left+e.width/2}function n(e){return e.top+e.height/2}let o=ey(e),i=ey(t),a=o.getBoundingClientRect(),s=i.getBoundingClientRect();return Math.sqrt((r(a)-r(s))**2+(n(a)-n(s))**2)}});class eP{constructor(){this._predicate=()=>!0}static fromFirstCall(e){if("type"===e.method)return new eL(...e.args);if("and"===e.method)return new eB(e.args);if("nearest"===e.method)return new eH(e.args);throw Error("The left-hand side of a rule() must start with dom(), type(), and(), or nearest().")}when(e){let t=this.clone();return t._predicate=e,t}fnodesSatisfyingWhen(e){return Array.from(e).filter(this._predicate)}checkFact(e){}guaranteedType(){}aggregatedType(){}}class eF extends eP{constructor(e){if(super(),void 0===e)throw Error("A querySelector()-style selector is required as the argument to "+this._callName()+"().");this.selector=e}_callName(){return"dom"}clone(){return new this.constructor(this.selector)}fnodes(e){return this._domNodesToFilteredFnodes(e,e.doc.querySelectorAll(this.selector))}_domNodesToFilteredFnodes(e,t){let r=[];for(let n=0;n<t.length;n++)r.push(e.fnodeForElement(t[n]));return this.fnodesSatisfyingWhen(r)}checkFact(e){if(void 0===e.type)throw Error(`The right-hand side of a ${this._callName()}() rule failed to specify a type. This means there is no way for its output to be used by later rules. All it specified was ${e}.`)}asLhs(){return this}possibleTypeCombinations(){return[]}typesMentioned(){return new eg}}class eM extends eF{constructor(e){super(""),this.query=e}_callName(){return"domQuery"}clone(){return new eM(this.query)}fnodes(e){return this._domNodesToFilteredFnodes(e,this.query(e.doc))}}class eL extends eP{constructor(e){if(super(),void 0===e)throw Error("A type name is required when calling type().");this._type=e}clone(){return new this.constructor(this._type)}fnodes(e){let t=ep(e.typeCache,this._type,()=>[]);return this.fnodesSatisfyingWhen(t)}type(e){return new this.constructor(e)}max(){return new eD(this._type)}bestCluster(e){return new eU(this._type,e)}guaranteedType(){return this._type}possibleTypeCombinations(){return[this.typesMentioned()]}typesMentioned(){return new eg([this._type])}}class ek extends eL{aggregatedType(){return this._type}}class eD extends ek{fnodes(e){let t=this,r=()=>super.fnodes(e);return em(e.maxCache,this._type,function(){return er(r(),r=>e.weightedScore(r.scoresSoFarFor(t._type)))})}}class eU extends ek{constructor(e,t){super(e),this._options=t||{splittingDistance:3}}fnodes(e){let t=Array.from(super.fnodes(e));return 0===t.length?[]:et(eN(t,this._options.splittingDistance,(e,t)=>eO(e,t,this._options)).map(e=>[e,eo(e.map(e=>e.scoreFor(this._type)))]),e=>e[1])[0]}}class eB extends eP{constructor(e){super(),this._args=e.map(eG)}*fnodes(e){let t=this._args[0].fnodes(e);e:for(let e of t){for(let t of this._args.slice(1))if(!e.hasType(t.guaranteedType()))continue e;yield e}}possibleTypeCombinations(){return[this.typesMentioned()]}typesMentioned(){return new eg(this._args.map(e=>e.guaranteedType()))}}function eG(e){let t=e.asLhs();if(t.constructor!==eL)throw Error("and() and nearest() support only simple type() calls as arguments for now.");return t}class eH extends eP{constructor([e,t,r]){super(),this._a=eG(e),this._b=eG(t),this._distance=r}*fnodes(e){let t=this._a.fnodes(e),r=Array.from(this._b.fnodes(e));if(r.length>0)for(let e of t){let t=en(r,t=>this._distance(e,t));yield{fnode:e,rhsTransformer:function(e){return void 0===e.note&&(e.note=t),e}}}}checkFact(e){}possibleTypeCombinations(){return[new eg([this._a.guaranteedType()])]}typesMentioned(){return new eg([this._a.guaranteedType(),this._b.guaranteedType()])}guaranteedType(){return this._a.guaranteedType()}}let eW={type:1,note:2,score:4,element:8};function e$(e){return new ej(e)}class eq{constructor(e=[],t=1/0,r){this._calls=e.slice(),this._max=t,this._types=new eg(r)}atMost(e){return new this.constructor(this._calls,e,this._types)}_checkAtMost(e){if(void 0!==e.score&&e.score>this._max)throw Error(`Score of ${e.score} exceeds the declared atMost(${this._max}).`)}props(e){function t(r){let n=e(r);for(let e in n)eW.hasOwnProperty(e)&&eW[e]&t.possibleSubfacts||delete n[e];return n}return t.possibleSubfacts=15,t.kind="props",new this.constructor(this._calls.concat(t),this._max,this._types)}type(e){function t(){return{type:e}}return t.possibleSubfacts=1,t.type=e,t.kind="type",new this.constructor(this._calls.concat(t),this._max,this._types)}typeIn(...e){return new this.constructor(this._calls,this._max,e)}_checkTypeIn(e,t){if(this._types.size>0){if(void 0===e.type){if(!this._types.has(t))throw Error(`A right-hand side claimed, via typeIn(...) to emit one of the types ${this._types} but actually inherited ${t} from the left-hand side.`)}else if(!this._types.has(e.type))throw Error(`A right-hand side claimed, via typeIn(...) to emit one of the types ${this._types} but actually emitted ${e.type}.`)}}note(e){function t(t){return{note:e(t)}}return t.possibleSubfacts=2,t.kind="note",new this.constructor(this._calls.concat(t),this._max,this._types)}score(e){let t;return(t="number"==typeof e?function(t){return{score:e}}:function(t){let r=e(t);return"boolean"==typeof r&&(r=Number(r)),{score:r}}).possibleSubfacts=4,t.kind="score",new this.constructor(this._calls.concat(t),this._max,this._types)}fact(e,t){let r=new Set,n={},o=0;for(let t of eT(this._calls))if(!r.has(t.kind)&&(r.add(t.kind),~o&t.possibleSubfacts)){let r=t(e);for(let e in r)n.hasOwnProperty(e)||(n[e]=r[e]),o|=eW[e]}return this._checkAtMost(n),this._checkTypeIn(n,t),n}possibleEmissions(){let e=!1;for(let t of eT(this._calls))if("props"===t.kind){e=!0;break}else if("type"===t.kind)return{couldChangeType:!0,possibleTypes:new Set([t.type])};return{couldChangeType:e,possibleTypes:this._types}}}class ej{constructor(e,t=e=>e,r=e=>e){this.key=e,this.callback=t,this.allCallback=r}through(e){return new this.constructor(this.key,e,this.allCallback)}allThrough(e){return new this.constructor(this.key,this.callback,e)}asRhs(){return this}}function eY(e){return new ez({method:"type",args:[e]})}class ez{constructor(...e){this._calls=e}max(){return this._and("max")}bestCluster(e){return this._and("bestCluster",e)}props(e){return this._and("props",e)}type(...e){return this._and("type",...e)}note(e){return this._and("note",e)}score(e){return this._and("score",e)}atMost(e){return this._and("atMost",e)}typeIn(...e){return this._and("typeIn",...e)}and(...e){return this._and("and",e)}_and(e,...t){return new this.constructor(...this._calls.concat({method:e,args:t}))}asLhs(){return this._asSide(eP.fromFirstCall(this._calls[0]),this._calls.slice(1))}asRhs(){return this._asSide(new eq,this._calls)}_asSide(e,t){for(let r of t)e=e[r.method](...r.args);return e}when(e){return this._and("when",e)}}class eV{constructor(e,t){if(void 0===e)throw Error("Someone tried to make a fnode without specifying the element they're talking about.");this.element=e,this._ruleset=t,this._types=new Map,this._conservedScores=new Map}hasType(e){return this._computeType(e),this._types.has(e)}scoreFor(e){return this._computeType(e),ew(this._ruleset.weightedScore(this.scoresSoFarFor(e))+ep(this._ruleset.biases,e,()=>0))}noteFor(e){return this._computeType(e),this._noteSoFarFor(e)}hasNoteFor(e){return this._computeType(e),this._hasNoteSoFarFor(e)}typesSoFar(){return this._types.keys()}_noteSoFarFor(e){return this._typeRecordForGetting(e).note}_hasNoteSoFarFor(e){return void 0!==this._noteSoFarFor(e)}scoresSoFarFor(e){return this._typeRecordForGetting(e).score}addScoreFor(e,t,r){this._typeRecordForSetting(e).score.set(r,t)}setNoteFor(e,t){if(this._hasNoteSoFarFor(e)){if(void 0!==t)throw Error(`Someone (likely the right-hand side of a rule) tried to add a note of type ${e} to an element, but one of that type already exists. Overwriting notes is not allowed, since it would make the order of rules matter.`)}else this._typeRecordForSetting(e).note=t}_typeRecordForSetting(e){return em(this._types,e,()=>({score:new Map}))}_typeRecordForGetting(e){return ep(this._types,e,()=>({score:new Map}))}_computeType(e){this._types.has(e)||this._ruleset.get(eY(e))}}function eK(e,t,r){return"string"==typeof t&&(t=e$(t)),new(t instanceof ej?eJ:eX)(e,t,r)}let eZ=0;class eQ{constructor(e,t,r){this.lhs=e.asLhs(),this.rhs=t.asRhs(),this.name=(r?r.name:void 0)||"_"+eZ++}prerequisites(e){function t(e,t,r,n){for(let o of t){let t=r(o);if(t.length>0)e.extend(t);else throw Error(`No rule ${n} the "${o}" type, but another rule needs it as input.`)}}let r=new eg;return t(r,this._typesFinalized(),t=>e.inwardRulesThatCouldEmit(t),"emits"),t(r,this.lhs.typesMentioned(),t=>e.inwardRulesThatCouldAdd(t),"adds"),r}_typesFinalized(){let e=this.lhs.aggregatedType();return void 0===e?new eg:new eg([e])}}class eX extends eQ{results(e){if(e.doneRules.has(this))throw Error("A bug in Fathom caused results() to be called on an inward rule twice. That could cause redundant score contributions, etc.");let t=this,r=this.lhs.fnodes(e),n=new Set;for(let o of(eE(function(r){let o=t.lhs.guaranteedType(),{fnode:i=r,rhsTransformer:a=J}=r,s=a(t.rhs.fact(i,o));t.lhs.checkFact(s);let l=e.fnodeForElement(s.element||i.element),u=s.type||t.lhs.guaranteedType();if(void 0!==s.score)if(void 0!==u)l.addScoreFor(u,s.score,t.name);else throw Error(`The right-hand side of a rule specified a score (${s.score}) with neither an explicit type nor one we could infer from the left-hand side.`);if(void 0!==s.type||void 0!==s.note)if(void 0===u)throw Error(`The right-hand side of a rule specified a note (${s.note}) with neither an explicit type nor one we could infer from the left-hand side. Notes are per-type, per-node, so that's a problem.`);else l.setNoteFor(u,s.note);n.add(l)},r),e.doneRules.add(this),n))for(let t of o.typesSoFar())em(e.typeCache,t,()=>new Set).add(o);return n.values()}typesItCouldEmit(){let e=this.rhs.possibleEmissions();if(!e.couldChangeType&&void 0!==this.lhs.guaranteedType())return new Set([this.lhs.guaranteedType()]);if(e.possibleTypes.size>0)return e.possibleTypes;throw Error("Could not determine the emitted type of a rule because its right-hand side calls props() without calling typeIn().")}typesItCouldAdd(){let e=new Set(this.typesItCouldEmit());return e.delete(this.lhs.guaranteedType()),e}_typesFinalized(){let e=this;return(function(){let t=new eg,r=e.rhs.possibleEmissions();if(r.couldChangeType){for(let n of e.lhs.possibleTypeCombinations())for(let e of r.possibleTypes)if(!n.has(e)){t.extend(n);break}}return t})().extend(super._typesFinalized())}}class eJ extends eQ{results(e){return this.rhs.allCallback(e_(this.rhs.callback,e_(function(e){return e instanceof eV?e:e.fnode},this.lhs.fnodes(e))))}key(){return this.rhs.key}_typesFinalized(){return this.lhs.typesMentioned().extend(super._typesFinalized())}}class e0{constructor(e,t=[],r=[]){for(let n of(this._inRules=[],this._outRules=new Map,this._rulesThatCouldEmit=new Map,this._rulesThatCouldAdd=new Map,this._coeffs=new Map(t),this.biases=new Map(r),e))if(n instanceof eX){for(let e of(this._inRules.push(n),n.typesItCouldEmit()))em(this._rulesThatCouldEmit,e,()=>[]).push(n);for(let e of n.typesItCouldAdd())em(this._rulesThatCouldAdd,e,()=>[]).push(n)}else if(n instanceof eJ)this._outRules.set(n.key(),n);else throw Error(`This element of ruleset()'s first param wasn't a rule: ${n}`)}against(e){return new e1(e,this._inRules,this._outRules,this._rulesThatCouldEmit,this._rulesThatCouldAdd,this._coeffs,this.biases)}rules(){return Array.from([...this._inRules,...this._outRules.values()])}}class e1{constructor(e,t,r,n,o,i,a){this.doc=e,this._inRules=t,this._outRules=r,this._rulesThatCouldEmit=n,this._rulesThatCouldAdd=o,this._coeffs=i,this.biases=a,this._clearCaches(),this.elementCache=new WeakMap,this.doneRules=new Set}setCoeffsAndBiases(e,t=[]){this._coeffs=new Map(e),this.biases=new Map(t),this._clearCaches()}_clearCaches(){this.maxCache=new Map,this.typeCache=new Map}get(e){if("string"==typeof e)if(this._outRules.has(e))return Array.from(this._execute(this._outRules.get(e)));else throw Error(`There is no out() rule with key "${e}".`);if(eC(e))return this.fnodeForElement(e);if(void 0!==e.asLhs){let t=eK(e,e$(Symbol("outKey")));return Array.from(this._execute(t))}throw Error("ruleset.get() expects a string, an expression like on the left-hand side of a rule, or a DOM node.")}weightedScore(e){let t=0;for(let[r,n]of e)t+=n*ep(this._coeffs,r,()=>1);return t}_prerequisitesTo(e,t=new Map){for(let r of e.prerequisites(this))if(!this.doneRules.has(r)){let n=t.has(r);em(t,r,()=>[]).push(e),n||this._prerequisitesTo(r,t)}return t}_execute(e){let t,r,n=this._prerequisitesTo(e);try{t=[e].concat(ef(n.keys(),e=>n.get(e)))}catch(e){if(e instanceof Q)throw new Q("There is a cyclic dependency in the ruleset.");throw e}for(let e of eT(t))r=e.results(this);return Array.from(r)}inwardRulesThatCouldEmit(e){return ep(this._rulesThatCouldEmit,e,()=>[])}inwardRulesThatCouldAdd(e){return ep(this._rulesThatCouldAdd,e,()=>[])}fnodeForElement(e){return em(this.elementCache,e,()=>new eV(e,this))}}(f=P||(P={})).LOGIN="login",f.NOOP="noop",f.PASSWORD_CHANGE="password-change",f.RECOVERY="recovery",f.REGISTER="register",(g=F||(F={})).EMAIL="email",g.IDENTITY="identity",g.OTP="otp",g.PASSWORD_CURRENT="password",g.PASSWORD_NEW="new-password",g.USERNAME="username",g.USERNAME_HIDDEN="username-hidden";let e5=Object.values(P),e2=Object.values(F),e6=(...e)=>t=>e.every(e=>e(t)),e3=(...e)=>t=>e.some(e=>e(t)),e4=e=>t=>!e(t),e8=e=>t=>t.some(e),e9="data-protonpass-form",e7="input, select, textarea",te='input[type="password"], input[type="text"][id="password"]',tt='[role="dialog"], [role="tabpanel"], [role="group"], [role="form"], [id*="modal"], [class*="modal"], header, section, nav, footer, aside',tr=[...[1,2,3,4,5].flatMap(e=>[`h${e}, [aria-level="${e}"]`]),'[role="heading"]','[class*="title"]','[class*="header"]','[name="title"]','div[style*="font-size: 2"]','div[style*="font-size: 3"]'].join(","),tn='input[type="submit"],button[id*="password" i],button[type="submit"],button[type="button"],button[name="submit"],a[role="submit"],div[role="button"],div[role="submit"]',to=`form, [${e9}]`,ti='input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="checkbox"])',ta=`button:not([type]), a[role="button"], ${tn}`,ts=(e,t)=>{let r=e.parentElement;return r?t(r)?r:ts(r,t):null},tl=(e,t,r=1)=>{let n=null==e?void 0:e.parentElement;if(!n)return null;let o=t(n);return o||r<=0?o:tl(n,t,r-1)},tu=(e,t)=>r=>{let n=e.parentElement;return t<=0||null===n?e:r(n,e)?tu(n,t-1)(r):e},tc=e=>t=>{let r=e.parentElement;return null===r||0===t?e:tc(r)(t-1)},td=(...e)=>Array.from(new Set(e.flat())),tm=e=>{let{height:t,width:r,top:n,bottom:o}=e.getBoundingClientRect();return{height:t,width:r,top:n,bottom:o,area:t*r}},tp=(e,t)=>{let r=e.previousElementSibling;return null===r?null:t(r)?r:tp(r,t)},tf=e=>({x:e.left+e.width/2,y:e.top+e.height/2}),tg=(e,t)=>{let r=tf(e),n=tf(t);return{dx:Math.abs(r.x-n.x)-(e.width+t.width)/2,dy:Math.abs(r.y-n.y)-(e.height+t.height)/2}},th=e=>e.reduce((e,t)=>{for(let r=0;r<=e.length-1;r++)if(e[r]!==t){if(e[r].contains(t))return e;if(t.contains(e[r]))return e[r]=t,e}return e.push(t),e},[]),tA=(e,t)=>e===t||e.contains(t)?e:e.parentElement?tA(e.parentElement,t):e,ty=(e,t=[],r)=>{if(t.some(t=>t.contains(e)))return null;let n=e.parentElement;if(0===r||!n)return null;let o=getComputedStyle(n).getPropertyValue("position");return"fixed"===o||"absolute"===o?(t.push(n),n):ty(n,t,r-1)},tb=e=>e.setAttribute(e9,""),tw=e=>!0===e.__PP_HIDDEN__,tv=e=>e.__PP_HIDDEN__=!0,t_=e=>null!==e.getAttribute("data-protonpass-ignore"),tE=e=>!0===e.__PP_SKIP__,tC=e=>e.__PP_SKIP__=!0,tT=e=>{tC(e),e.querySelectorAll(e7).forEach(tC)},tR=e=>!0===e.__PP_SEEN__,tS=e=>e.__PP_SEEN__=!0,tO=e=>void 0!==e.__PP_TYPE__,tx=e=>e?ts(e,tO):null,tN=e=>t=>{var r;return(null==(r=t.split(":"))?void 0:r[0])===e},tI=(e,t,r)=>{let n=e.__PP_TYPE__,o=`${t}:${r.toFixed(2)}`;if(!n){e.__PP_TYPE__=o;return}let i=n.split(","),a=i.findIndex(tN(t));-1!==a?i[a]=o:i.push(o),e.__PP_TYPE__=i.join(",")},tP=e=>t=>{let r=t.element.__PP_TYPE__;if(!r)return -1;let n=r.split(",").find(tN(e));if(!n)return -1;let[,o]=n.split(":"),i=parseFloat(o);return Number.isFinite(i)?i:-1},tF=e=>t=>-1!==tP(e)(t),tM=e3(...Object.values(P).map(e=>tF(e))),tL=e3(...Object.values(F).map(e=>tF(e))),tk=e=>!(tO(e)||tE(e)||t_(e)),tD=(e,t)=>{var r;let n=e=>{delete e.__PP_SEEN__,delete e.__PP_TYPE__,t.preserveIgnored||delete e.__PP_SKIP__};n(e),e.querySelectorAll(e7).forEach(n),null==(r=t.fields)||r.forEach(n)},tU=e=>e instanceof ShadowRoot,tB=e=>!!(e.tagName.includes("-")&&e.shadowRoot),tG=function*(e){let t;yield e;let r=e;for(;(t=tH(r))&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE;)yield t,r=t},tH=e=>{let t=e.parentNode;return t?tU(t)?t.host:t:null},tW=(e,t)=>{let r=t;if(e.contains(t))return!0;if(!tU(t.getRootNode()))return!1;let n="shadowRoot"in e?e.shadowRoot:null;if(null==n?void 0:n.contains(t))return!0;for(;r;){let t=r.getRootNode();if(t===document||!tU(t))break;let o=t.host;if(o===e||e.contains(o)||(null==n?void 0:n.contains(o)))return!0;r=o}return!1},t$=(e,t)=>{var r,n,o;return e instanceof HTMLElement?null!=(o=null!=(r=e.querySelector(t))?r:null==(n=e.shadowRoot)?void 0:n.querySelector(t))?o:null:e.querySelector(t)},tq=["0","1","true","false"],tj=[[1,"d*"],[6,"d{6}"],[1,"[0-9]*"],[6,"[0-9]{6}"],[5,"([0-9a-fA-F]{5}-?[0-9a-fA-F]{5})"]],tY=["text","email","number","tel","password","hidden","search"],tz=/p(?:rogres(?:s(?:ion|o)|o)|aso)|fortschritt|progress|s(?:chritt|t(?:age|ep))|etap[ae]|phase/i,tV=/schwierigkeit|(?:difficult|troubl|oubli|hilf)e|i(?:nciden(?:cia|t)|ssue)|vergessen|esquecido|olvidado|needhelp|questao|problem|forgot|ayuda/i,tK=/p(?:hrasesecrete|ass(?:(?:phras|cod)e|wor[dt]))|(?:c(?:havesecret|lavesecret|ontrasen)|deseguranc)a|(?:(?:zugangs|secret)cod|clesecret)e|codesecret|motdepasse|geheimnis|secret|heslo|senha|key/i,tZ=/identi(?:fiant|ty)|u(?:tilisateur|s(?:ername|uario))|(?:identifi|benutz)er|(?:screen|nick)name|nutzername|(?:anmeld|handl)e|pseudo/i,tQ=/co(?:urriel|rrei?o)|email/i,tX=/digitarnovamente|v(?:olveraescribi|erifi(?:ca|e))r|saisiranouveau|(?:erneuteingeb|wiederhol|bestatig)en|verif(?:izieren|y)|re(?:pe(?:t[ei]r|at)|type)|confirm|again/i,tJ=/\b.*(?:snd|bis|2)$/i,t0=/newsletter|b(?:ul|o)letin|mailing/i,t1=(e,t)=>{let r,n;return r=t=>e.test(t),n=null!=t?t:{maxLength:5e3,minLength:2},e=>(!n.maxLength||!(e.length>n.maxLength))&&(!n.minLength||!(e.length<n.minLength))&&r(e)},t5=(e,t)=>r=>!t1(e,t)(r),t2=(e,t)=>e6(...e.map(e=>t1(e,t))),t6=(e,t)=>e3(...e.map(e=>t1(e,t))),t3=t1(/(?:(?:n(?:ouvelleses|uevase|ewses)s|iniciarses|connex)io|anmeldedate|sign[io])n|in(?:iciarsessao|troduce)|a(?:uthenticate|nmeld(?:ung|en))|authentifier|s(?:econnect|identifi)er|novasessao|(?:introduci|conecta|entr[ae])r|prihlasit|connect|acceder|login/i),t4=t1(/kontoerstellen|cr(?:ea(?:teaccount|rcuenta)|iarconta)|(?:nouveaucompt|creeruncompt|s?inscrir|unirs)e|re(?:gist(?:r(?:ieren|arse|ar)|er)|joindre)|nuevacuenta|getstarted|neueskonto|newaccount|novaconta|(?:com(?:mence|eca)|(?:empez|junt)a)r|signup|join/i),t8=t1(tZ),t9=t6([/identifyemail|(?:custom|us)erid|loginname|a(?:cc(?:ountid|t)|ppleid)|loginid/i,tZ]),t7=t1(/^[\w\-\.]{7,30}$/),re=t1(/(?:nom(?:defamill|br)|tit[lr])e|(?:primeiro|sobre)nome|(?:company|middle|nach|vor)name|firstname|apellido|lastname|prenom/i),rt=t6([/usermail/i,tQ]),rr=t1(/^[\w\-\.]+@([\w-]+\.)+[\w-]{2,5}$/,{maxLength:230,minLength:5}),rn=e3(t1(tQ),rr),ro=t1(/^[\d()+-]{6,25}$/,{maxLength:25,minLength:6}),ri=t1(/angemeldetbleiben|lembrardemim|micherinnern|sesouvenirde|re(?:cordarme|member|ster)|manterme|mantener|stay|keep/i),ra=t1(/(?:datenschutzrichtlini|politicadeprivacidad|confidentialit|a(?:cknowledg|gre))e|nutzungsbedingungen|(?:consentimi?ent|ac(?:ue|o)rd)o|(?:einwillig|zustimm)ung|consentement|condi(?:cione|tion)s|term(?:osdeuso|inos|sof)|(?:privacida|understan)d|guideline|consent|p(?:riva|oli)cy|accord/i),rs=t1(tV),rl=t6([/(?:wiederherstell|zurucksetz)en|re(?:(?:initialis|stablec)er|(?:defini|staur[ae])r|c(?:uper[ae]|ove)r|set)|problem|(?:troubl|restor|aid)e|a[jy]uda|h(?:ilfe|elp)/i,tV]),ru=t1(tz),rc=t6([/(?:f(?:ertigstell|ortfahr)|abschlie)en|getstarted|siguiente|(?:preceden|suivan|accep)t|(?:finaliza|termin[ae]|anterio|weite)r|co(?:mplet(?:ar|e)|ntinu(?:ar|e))|pro(?:c(?:hain|eed)|ximo)|finish|zuruck|back|next/i,tz]),rd=t1(/facebook|twitch|google|apple/i),rm=t1(/recherche|buscar|s(?:earch|uche)|query/i),rp=e6(t2([tK,/(?:a(?:ktualisiere|nder)|zurucksetze)n|(?:re(?:initialise|stablece|defini)|mettreajou)r|a(?:ctualiz|tualiz|lter)ar|c(?:ambiar|hange)|update|reset/i]),t5(tX)),rf=e6(rp,t5(tJ)),rg=e6(t2([tK,/erstellen|n(?:o(?:uveau|vo)|uevo|e[uw])|cr(?:e(?:a(?:te|r)|er)|iar)|set/i]),t5(tX)),rh=e6(rg,t5(tJ)),rA=t2([tK,tX]),ry=e6(t2([tK,tX]),t5(/\b.*(?:fst|1)$/i)),rb=e6(t2([tK,/(?:be(?:stehend|for)|vorherig|aktuell)e|exist(?:ente|ing)|pre(?:cedent|vious)|a(?:n(?:t(?:erior|igo)|cien)|ctu[ae]l|tual)|existant|dernier|current|(?:ultim|viej)o|(?:letz|al)te|last|old/i]),t5(tX)),rw=e6(rb,t5(tJ)),rv=t1(/socialsecurity|nationalid|userid/i),r_=t1(/s(?:creenreade)?ronly|(?:move)?offscreen|(?:displaynon|a11yhid)e|\b((?:is)?hidden)\b/i),rE=t1(/(?:authentifizierung|doisfatore|doispasso)s|(?:auth(?:entication)?cod|securitycod|doubleetap)e|(?:authentication|generator)app|(?:(?:authentifica|doublefac)teu|(?:(?:authentifika|doblefac|zweifak|twofac)t|aut(?:henticat|enticad))o)r|verifica(?:c(?:ion|ao)|tion)|multifa(?:ct(?:eu|o)|k?to)r|zweischritte|generadora|doblepaso|2(?:s(?:chritte|tep)|(?:etap[ae]|paso)s|fa)|twostep/i),rC=t1(/phoneverification|(?:approvals|login)code|challenge|t(?:wo(?:fa(?:ctor)?|step)|facode)|2fa|\b([mt]fa)\b/i),rT=t1(/totp(?:pin)?|o(?:netime|t[cp])|1time/i),rR=t6([/(?:phone(?:verification)?|email|tel)pin|email|sms/i,/n(?:(?:ue|o)vocodigo|ouveaucode|e(?:usenden|(?:uer|w)code))|re(?:enviar|send)|envoyer|senden|enviar|send/i]),rS=t1(t0);t6([t0,/subscription|mailinglist|newsletter|emailform/i]);let rO=e6(t1(/addresscontact|contactperson|addressname|yourname|fullname|\b(name)\b/i),e=>!e.includes("[name]")),rx=t1(/givenname|firstn(?:ame)?|\b(fname)\b/i),rN=t1(/additionalname|middlen(?:ame)?|\b(mname)\b/i),rI=t1(/familyn(?:ame)?|lastn(?:ame)?|surname|\b([ls]name)\b/i),rP=e6(t1(/(?:national|contact)number|tel(?:nation|loc)al|(?:tele)?phone|mobile|\b(tel)\b/i),t5(/co(?:untry|de)|prefix/i)),rF=t1(/organization(?:name)?|companyname|\b(organization)\b/i),rM=t1(/address(?:level2|town|city)|personalcity|\b((?:local|c)ity|town)\b/i),rL=t1(/(?:address(?:postal|zip)|post)code|address(?:postal|zip)|postalcode|zipcode|\b(zip)\b/i),rk=t1(/address(?:(?:provinc|stat)e|level1)|stateprovince|\b(province|county|region|state)\b/i),rD=e6(t1(/addresscountry(?:name)?|countryname|\b(country)\b/i),t5(/countrycode/i)),rU=e6(t1(/(?:preferred|street)address|address(?:line(?:one|[1s])|1)|mailingaddr|bill(?:ing)?addr|\b(mailaddr|addr(?:ess)?|street|line1)\b/i),t5(/\b.*(?:line(?:t(?:hree|wo)|[23]))$/i)),rB=(e,t="")=>e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(RegExp(`[^a-zA-Z0-9${t}]`,"g"),""),rG=e=>rB(e,"\\s\\[\\]"),rH={},rW=e=>{var t;return rH[e]=null!=(t=rH[e])?t:new WeakMap},r$=(e,t)=>{var r;let n=rW("visibility:op"),o=rW("visibility");return t.opacity&&null!=(r=n.get(e))?r:o.get(e)},rq=e=>(t,r)=>t.forEach(t=>e.set(t,r)),rj=(e,t)=>e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left,rY=e=>e.width<=1||e.height<=1,rz=(e,t)=>{let r=!t.skipCache,n=eS.toDomElement(e),o=[],i=!1,a=rW(t.opacity?"visibility:op":"visibility"),s=r$(n,t);if(r&&void 0!==s)return s;let l=eS.windowForElement(n),u=l.document,c=l.innerWidth||u.documentElement.clientWidth,d=l.innerHeight||u.documentElement.clientHeight,m=Math.max(c,u.documentElement.scrollWidth,u.body.scrollWidth),p=Math.max(d,u.documentElement.scrollHeight,u.body.scrollHeight),{scrollX:f,scrollY:g}=l,h=({x:e,y:t,width:r,height:n})=>e+f+r>=0&&e+f<=m-16&&t+g+n>=0&&t+g<=p-16,A=(()=>{var e;let a=null;for(let s of tG(n)){let n=null,c=()=>n=null!=n?n:s.getBoundingClientRect();if(s===u.body)return null==a||!a.absolute||h(a.rect);let d=r$(s,t);if(r&&void 0!==d)return d;let{opacity:m,display:p,position:f,overflow:g,visibility:A}=l.getComputedStyle(s);if(o.push(s),0===Math.floor(10*parseFloat(m))&&t.opacity)return i=!0,!1;if("hidden"===A||"hidden"===g&&((null==a?void 0:a.rect)&&!rj(a.rect,c())||rY(c())))return!1;if((null==a?void 0:a.absolute)&&"static"===f){o.pop();continue}if("absolute"===f&&!h(c()))return!1;if("fixed"===f)return h(null!=(e=null==a?void 0:a.rect)?e:c());if("contents"===p){a=null;continue}(a=null!=a?a:{rect:c()}).rect=c(),a.absolute="absolute"===f}return!0})();return r&&(t.opacity&&(A||!i?rq(rW("visibility"))(o,A):rq(rW("visibility"))(o.slice(0,-1),A)),rq(a)(o,A)),A},rV=(e,t)=>{let r=rW(`${t.minWidth}:${t.minHeight}`);if(r.has(e))return r.get(e);let n=(()=>{if(0===e.getClientRects().length)return!1;let r=Array.from(e.classList).map(rG);if(e8(r_)(r))return!1;let{visibility:n,display:o,maxHeight:i}=getComputedStyle(e);return"hidden"!==n&&"none"!==o&&"0px"!==i&&0!==e.offsetHeight&&0!==e.offsetWidth&&!(e.offsetHeight<t.minHeight)&&!(e.offsetWidth<t.minWidth)&&!0})();return rq(r)([e],n),n},rK=e=>rV(e,{minHeight:0,minWidth:0}),rZ=(e,t={})=>{let r=(()=>{if(!rz(e,Object.assign({opacity:!0},t)))return!1;if(tB(e)||tU(e.getRootNode()))return!0;let r=Array.from(e.querySelectorAll(ti)).filter(e=>!e.disabled);return r.length>0&&r.some(e=>rz(e,Object.assign({opacity:!1},t)))})();return r||tv(e),r},rQ=e=>{if(e instanceof HTMLInputElement){let{type:t,disabled:r,readOnly:n}=e;if("hidden"===t||r||n||"true"===e.getAttribute("aria-hidden"))return!1}return rV(e,{minHeight:15,minWidth:30})},rX=new Set,rJ=new Set,r0=()=>Array.from(rX),r1=()=>Array.from(rJ),r5=[eK(new eM(r0),eY("override-form"),{}),eK(new eM(r1),eY("override-field"),{}),eK(eY("override-form").when(e=>tM(e)&&rZ(e.element)),eY("form-candidate"),{}),eK(eY("override-field").when(e=>tL(e)&&rQ(e.element)),eY("field-candidate"),{})],r2=["id","class","role","jsaction","ng-controller","data-bind","ng-model","v-model","v-bind","data-testid","href"],r6=[r2,"name","action"].flat(),r3=[r2,"name","inputmode"].flat(),r4=e=>t=>e.filter(e=>"data-fathom"!==e).map(e=>t.getAttribute(e)).filter(Boolean).map(rG),r8=r4(r2),r9=r4(["title","aria-label","aria-labelledby","aria-describedby","placeholder","autocomplete","legend"]),r7=r4(r3),ne=r4(r6),nt=e=>{let t=r9(e).join("");return rB(`${e.innerText}${t}`,"\\[\\]")},nr=e=>rG(r8(e).join("")),nn=e=>[nt(e),nr(e)],no=e=>{let t,r=e instanceof HTMLInputElement&&"hidden"===e.type,n=e instanceof HTMLInputElement&&["text","email","tel","password"].includes(e.type);return{fieldAttrs:r7(e),fieldText:r?"":nt(e),labelText:n&&!r&&(t=(e=>{var t;let r=null!=(t=e.getAttribute("id"))?t:e.getAttribute("name"),n=document.querySelector(`label[for="${r}"]`);if(n)return n;let o=e.closest("label");return o?o:tl(e,e=>e.querySelector("label"),1)||tp(e,e=>e instanceof HTMLElement&&e.innerText.trim().length>0)||null})(e))?nt(t):""}},ni=e=>{let{fieldAttrs:t,fieldText:r,labelText:n}=no(e);return[r,n,...t]},na=(e,t=0)=>Number.isFinite(e)?e:t,ns=e=>t=>(e(t),t),nl=ns(e=>tS(e.element)),nu=ns(e=>{let{visible:t,type:r}=e.noteFor("field");(t||"hidden"===r)&&tS(e.element)}),nc=(e,t)=>new ez({method:"score",args:[r=>{let n=r.noteFor(e);return Array.isArray(t)?t.map(e=>n[e]).reduce((e,t)=>e*t):n[t]}]}),nd=e=>{let t=e.element,r=e._ruleset,n=r.get(eY("form")).find(({element:e})=>e.contains(t));if(n)return n;let o=tx(t);return o?r.get(o):null},nm=e=>t=>t.scoreFor(e)>.5,np=(e,t)=>{var r;return e?e.hasNoteFor(`${t}-prediction`)?null!=(r=e.noteFor(`${t}-prediction`))?r:0:e.scoreFor(t):0},nf=(e,t,r=nm)=>[eK(eY(e).when(tF(t)),eY(`${t}-prediction`).note(tP(t)),{}),eK(eY(t).when(r(t)),eY(`${t}-prediction`),{}),eK(eY(`${t}-prediction`),e$(t).through(ns(e=>{tS(e.element),e.hasNoteFor(`${t}-prediction`)||tI(e.element,t,np(e,t))})),{})],ng=(e,t)=>e.flatMap(e=>t.map(t=>[e,t])),nh=e=>t=>e(t.element),nA=e=>{let t=np(e,P.LOGIN)>.5,r=np(e,P.REGISTER)>.5,n=np(e,P.PASSWORD_CHANGE)>.5,o=np(e,P.RECOVERY)>.5,i=[t,r,n,o].every(e=>!e);return{login:t,register:r,pwChange:n,recovery:o,noop:i}},ny=e=>e.reduce((e,t)=>(rQ(t)?e[0].push(t):e[1].push(t),e),[[],[]]),nb=e=>t=>e.includes(t.element.type),nw=e=>t=>t.element.matches(e),nv=e=>t=>t.element.inputMode===e,n_=e=>(e=>{let{visible:t,readonly:r,disabled:n}=e.noteFor("field");return t&&!r&&!n})(e),nE=e=>"list"===e.element.getAttribute("aria-autocomplete")||"combobox"===e.element.role,nC=e6(e4(nE),e3(nb(["email","text"]),nv("email")),n_),nT=e6(nw(te),n_),nR=e6(e4(nE),nw('[type="tel"], [type="number"], [type="text"], input:not([type])'),n_),nS=e6(e4(nE),e3(e6(e4(nv("email")),nb(["text","tel"])),nw('input[type="login"],input[type="username"],input[type="search"][name="loginName"],input[type="password"][name="userID"],input[type="password"][name="USERNAME"],input[name="account"],input[name="quickconnect-id"]')),n_),nO=e6(e4(nE),nb(["email","text","hidden"]),e4(n_)),nx=e=>!e.matches('input[type="email"]')&&e8(t8)(ni(e)),nN=e=>e.matches('input[type="email"]')||e8(rn)(ni(e)),nI=e=>e8(rd)(ni(e)),nP=e=>"submit"===e.getAttribute("type")||!(e.innerText.trim().length<=1)&&e.offsetHeight*e.offsetWidth>3500,nF=e=>{let t=tR(e),r=tw(e);return(!t||r)&&rQ(e)&&rz(e,{opacity:!1})},nM=(e=document)=>Array.from(e.querySelectorAll(ti)).filter(tk),nL=(e=document)=>Array.from(e.querySelectorAll(to)).filter(e=>!tE(e)&&!t_(e)),{linearScale:nk}=eS,nD=e=>{var t,r,n;let o,i,a,s,l,u,c,d,m=e.element,p=tu(m,3)(e=>e.querySelectorAll(to).length<=1),f=Array.from(m.querySelectorAll(e7)),g=f.filter(rQ),h=m.ownerDocument,A=f.filter(e=>e.matches('input:not([type="submit"])')),y=g.filter(e=>e.matches('input:not([type="submit"])')),b=m.querySelectorAll("fieldset"),w=g.filter(e=>e.matches("textarea")),v=g.filter((e,t,r)=>{var n;return e.matches("select")&&(null==(n=null==r?void 0:r[t+1])?void 0:n.type)!=="tel"}),_=v.reduce((e,t)=>e+t.querySelectorAll("option").length,0),E=g.filter(e=>e.matches('[type="submit"]')),C=A.filter(e=>e.matches('[type="hidden"]')),T=y.filter(e=>e.matches('[type="text"]')),R=A.filter(nx),S=A.filter(nN),O=A.filter(e=>e.matches('[type="tel"]')),x=A.filter(e=>e.matches(te)),[N,I]=ny(td(R,S,O)),[P,F]=ny(x),M=y.filter(e=>e.matches('[type="radio"]')),L=y.filter(e=>e.matches('[type="checkbox"]')),k=y.filter(e=>e.matches('[type="number"]')),D=y.filter(e=>e.matches('[type="date"]')),U=y.filter(e=>e.matches('[type="file"]')),B=O.concat(k).concat(T),G=y.filter(e=>e.matches("[required]")),H=y.filter(e=>e.matches("[pattern]")),W=y.filter(e=>e.matches("[minLength], [maxLength]")),$=y.find(e=>e.matches("input[autofocus]:first-of-type")),q=p.querySelectorAll('[class*="captcha"], [id*="captcha"], [name*="captcha"]'),j=Array.from(p.querySelectorAll("[class*=social], [aria-label*=with]")),Y=Array.from(m.querySelectorAll(ta)),z=Y.filter(e=>e.matches('[type="submit"]')),V=Y.filter(nP),K=z.length>0?z:V,Z=Array.from(m.querySelectorAll('a, span[role="button"]')).filter(rK),Q=j.concat(V).filter(nI),X=Array.from(m.querySelectorAll("div, section, aside, main, nav")),J=!!($&&N.includes($)),ee=!!($&&P.includes($)),et=(o=h.title,a=null!=(t=null==(i=h.querySelector('meta[name="description"]'))?void 0:i.getAttribute("content"))?t:"",rB(`${o} ${a}`,"\\[\\]")),er=(s=m.getBoundingClientRect(),rB((null!=(n=null==(r=0===(l=Array.from(tu(m,3)((e,t)=>!(e===document.body||t.matches(tt))).querySelectorAll(tr)).filter(e=>{if(m.contains(e))return!0;let{dx:t,dy:r}=tg(s,e.getBoundingClientRect());return t<75&&r<150})).length?tp(m,e=>e instanceof HTMLElement&&e.innerText.trim().length>0):null)?void 0:r.innerText)?n:"")+l.map(e=>e.innerText).join(""),"\\[\\]")),en=(u=r9(m).join(""),c=Array.from(m.querySelectorAll("fieldset")),rB(`${u}${c.reduce((e,t)=>e.concat(r9(t).join("")),"")}`,"\\[\\]")),eo=ne(m),ei=x.flatMap(ni),ea=N.flatMap(ni),es=V.flatMap(ni),el=K.flatMap(ni),eu=L.flatMap(ni),ec=Z.flatMap(nn),ed=B.flatMap(ni),em=X.map(nr),ep=[en,en,er],ef=t3(et),eg=t3(en),eh=e8(t3)(eo),eA=t3(er),ey=e8(t3)(em),eb=e8(ri)(eu),ew=e8(t3)(el),ev=e8(rs)(ec),e_=t4(et),eE=t4(en),eC=e8(t4)(eo),eT=t4(er),eR=e8(t4)(em),eS=e8(ra)(eu.concat(ec)),eO=e8(t4)(el),ex=e8(rh)(ei),eN=e8(ry)(ei),eI=rp(et),eP=rp(en),eF=e8(rf)(eo),eM=rp(er),eL=e8(rf)(em),ek=rl(et),eD=rl(en),eU=e8(rl)(eo),eB=rl(er),eG=e8(rl)(em),eH=e8(rl)(el),eW=e8(rl)(ea),e$=e8(rC)(ed),eq=e8(rT)(ed),ej=rE(en.concat(er)),eY=e8(rC)(eo),ez=e8(rR)(eo),eV=e8(rR)(ec.concat(es)),eK=e8(rS)(ep),eZ=e8(rm)(ep),eQ=e8(rc)(el),eX=ru(er);return{fieldsCount:nk(g.length,1,5),inputCount:nk(y.length,1,5),fieldsetCount:nk(b.length,1,5),textCount:nk(T.length,0,3),textareaCount:nk(w.length,0,2),selectCount:nk(v.length,0,2),optionsCount:nk(_,0,5),checkboxCount:nk(L.length,0,2),radioCount:nk(M.length,0,5),identifierCount:nk(N.length,0,2),hiddenIdentifierCount:nk(I.length,0,2),hiddenCount:nk(C.length,0,5),passwordCount:nk(P.length,0,2),hiddenPasswordCount:nk(F.length,0,2),usernameCount:nk(R.length,0,2),emailCount:nk(S.length,0,2),submitCount:nk(E.length,0,2),hasTels:Number(O.length>0),hasOAuth:Number(Q.length>0),hasCaptchas:Number(q.length>0),hasFiles:Number(U.length>0),hasDate:Number(D.length>0),hasNumber:Number(k.length>0),oneVisibleField:Number(1===y.length),twoVisibleFields:Number(2===y.length),threeOrMoreVisibleFields:Number(y.length>=3),noPasswords:Number(0===P.length),onePassword:Number(1===P.length),twoPasswords:Number(2===P.length),threeOrMorePasswords:Number(P.length>=3),noIdentifiers:Number(0===N.length),oneIdentifier:Number(1===N.length),twoIdentifiers:Number(2===N.length),threeOrMoreIdentifiers:Number(N.length>=3),autofocusedIsIdentifier:Number(J),autofocusedIsPassword:Number(ee),visibleInputsCount:na(y.length),inputRatio:na(A.length/f.length),hiddenRatio:na(C.length/f.length),visibleRatio:na(y.length/f.length),identifierRatio:na(N.length/g.length),emailRatio:na(S.length/g.length),usernameRatio:na(R.length/g.length),passwordRatio:na(P.length/g.length),checkboxRatio:na(L.length/g.length),requiredRatio:na(G.length/g.length),patternRatio:na(H.length/g.length),minMaxLengthRatio:na(W.length/g.length),pageLogin:Number(ef),formTextLogin:Number(eg),formAttrsLogin:Number(eh),headingsLogin:Number(eA),layoutLogin:Number(ey),rememberMeCheckbox:Number(eb),troubleLink:Number(ev),submitLogin:Number(ew),pageRegister:Number(e_),formTextRegister:Number(eE),formAttrsRegister:Number(eC),headingsRegister:Number(eT),layoutRegister:Number(eR),pwNewRegister:Number(ex),pwConfirmRegister:Number(eN),submitRegister:Number(eO),TOSRef:Number(eS),pagePwReset:Number(eI),formTextPwReset:Number(eP),formAttrsPwReset:Number(eF),headingsPwReset:Number(eM),layoutPwReset:Number(eL),pageRecovery:Number(ek),formTextRecovery:Number(eD),formAttrsRecovery:Number(eU),headingsRecovery:Number(eB),layoutRecovery:Number(eG),identifierRecovery:Number(eW),submitRecovery:Number(eH),formMFA:Number(ej||eY),formTextMFA:Number(ej),formAttrsMFA:Number(eY),formOTPOutlier:Number(ez),linkOTPOutlier:Number(eV),inputsMFA:Number(e$),inputsOTP:Number(eq),newsletterForm:Number(eK),searchForm:Number(eZ),multiStepForm:Number(eQ||eX),multiAuthForm:Number(eO&&ew),formInputIterator:(d=Array.from(m.querySelectorAll(ti)).filter(rQ),{prev(e){var t;let r=d.indexOf(e);return -1===r?null:null!=(t=null==d?void 0:d[r-1])?t:null},next(e){var t;let r=d.indexOf(e);return -1===r?null:null!=(t=null==d?void 0:d[r+1])?t:null}})}},nU=["fieldsCount","inputCount","fieldsetCount","textCount","textareaCount","selectCount","optionsCount","radioCount","identifierCount","hiddenIdentifierCount","usernameCount","emailCount","hiddenCount","hiddenPasswordCount","submitCount","hasTels","hasOAuth","hasCaptchas","hasFiles","hasDate","hasNumber","oneVisibleField","twoVisibleFields","threeOrMoreVisibleFields","noPasswords","onePassword","twoPasswords","threeOrMorePasswords","noIdentifiers","oneIdentifier","twoIdentifiers","threeOrMoreIdentifiers","autofocusedIsIdentifier","autofocusedIsPassword","visibleRatio","inputRatio","hiddenRatio","identifierRatio","emailRatio","usernameRatio","passwordRatio","requiredRatio","checkboxRatio","pageLogin","formTextLogin","formAttrsLogin","headingsLogin","layoutLogin","rememberMeCheckbox","troubleLink","submitLogin","pageRegister","formTextRegister","formAttrsRegister","headingsRegister","layoutRegister","pwNewRegister","pwConfirmRegister","submitRegister","TOSRef","pagePwReset","formTextPwReset","formAttrsPwReset","headingsPwReset","layoutPwReset","pageRecovery","formTextRecovery","formAttrsRecovery","headingsRecovery","layoutRecovery","identifierRecovery","submitRecovery","formTextMFA","formAttrsMFA","inputsMFA","inputsOTP","newsletterForm","searchForm","multiStepForm","multiAuthForm",...ng(["visibleRatio","identifierRatio","passwordRatio","requiredRatio"],["fieldsCount","identifierCount","passwordCount","hiddenIdentifierCount","hiddenPasswordCount","multiStepForm"])],nB=[["login-fieldsCount",6.9117207527160645],["login-inputCount",3.822486400604248],["login-fieldsetCount",-18.91722297668457],["login-textCount",-10.360284805297852],["login-textareaCount",-5.995274066925049],["login-selectCount",-6.1306281089782715],["login-optionsCount",-6.087420463562012],["login-radioCount",-5.951887607574463],["login-identifierCount",-2.899953842163086],["login-hiddenIdentifierCount",8.090394973754883],["login-usernameCount",2.0640110969543457],["login-emailCount",-9.865800857543945],["login-hiddenCount",5.637701988220215],["login-hiddenPasswordCount",9.23979377746582],["login-submitCount",-2.284073829650879],["login-hasTels",-6.52845573425293],["login-hasOAuth",6.302763938903809],["login-hasCaptchas",2.9789769649505615],["login-hasFiles",-6.02401876449585],["login-hasDate",-19.489826202392578],["login-hasNumber",-5.951311111450195],["login-oneVisibleField",5.676862716674805],["login-twoVisibleFields",7.535869598388672],["login-threeOrMoreVisibleFields",-1.3183695077896118],["login-noPasswords",-13.081375122070313],["login-onePassword",10.25524616241455],["login-twoPasswords",-11.755972862243652],["login-threeOrMorePasswords",-6.044548988342285],["login-noIdentifiers",-8.970521926879883],["login-oneIdentifier",-2.0764057636260986],["login-twoIdentifiers",-2.4918956756591797],["login-threeOrMoreIdentifiers",-8.593513488769531],["login-autofocusedIsIdentifier",8.622314453125],["login-autofocusedIsPassword",14.90038013458252],["login-visibleRatio",7.558108329772949],["login-inputRatio",-4.814621925354004],["login-hiddenRatio",-5.744090557098389],["login-identifierRatio",10.3085298538208],["login-emailRatio",1.5703213214874268],["login-usernameRatio",-7.5780768394470215],["login-passwordRatio",-1.3385310173034668],["login-requiredRatio",1.6504578590393066],["login-checkboxRatio",26.39185333251953],["login-pageLogin",13.974407196044922],["login-formTextLogin",8.543004989624023],["login-formAttrsLogin",2.1100170612335205],["login-headingsLogin",13.746389389038086],["login-layoutLogin",.20221181213855743],["login-rememberMeCheckbox",8.348167419433594],["login-troubleLink",12.179048538208008],["login-submitLogin",13.702370643615723],["login-pageRegister",-13.799778938293457],["login-formTextRegister",-.044963739812374115],["login-formAttrsRegister",-19.146482467651367],["login-headingsRegister",-10.542322158813477],["login-layoutRegister",-2.3833038806915283],["login-pwNewRegister",-17.38996696472168],["login-pwConfirmRegister",-11.91733455657959],["login-submitRegister",-12.17735481262207],["login-TOSRef",-5.637410640716553],["login-pagePwReset",-10.309855461120605],["login-formTextPwReset",-6.101982116699219],["login-formAttrsPwReset",-11.729959487915039],["login-headingsPwReset",-12.499267578125],["login-layoutPwReset",-2.965204954147339],["login-pageRecovery",.14035266637802124],["login-formTextRecovery",.03439144045114517],["login-formAttrsRecovery",-22.603046417236328],["login-headingsRecovery",-10.492897033691406],["login-layoutRecovery",5.598866939544678],["login-identifierRecovery",4.300655364990234],["login-submitRecovery",-12.31758975982666],["login-formTextMFA",-14.27755069732666],["login-formAttrsMFA",-19.56307029724121],["login-inputsMFA",-19.59412384033203],["login-inputsOTP",-16.51680564880371],["login-newsletterForm",-9.028794288635254],["login-searchForm",-6.545746803283691],["login-multiStepForm",-1.8370318412780762],["login-multiAuthForm",15.096943855285645],["login-visibleRatio,fieldsCount",-6.863025188446045],["login-visibleRatio,identifierCount",-11.385756492614746],["login-visibleRatio,passwordCount",13.88270378112793],["login-visibleRatio,hiddenIdentifierCount",-4.858383655548096],["login-visibleRatio,hiddenPasswordCount",-12.938082695007324],["login-visibleRatio,multiStepForm",5.489163875579834],["login-identifierRatio,fieldsCount",-20.94881820678711],["login-identifierRatio,identifierCount",9.301095962524414],["login-identifierRatio,passwordCount",-8.721858978271484],["login-identifierRatio,hiddenIdentifierCount",-2.131696939468384],["login-identifierRatio,hiddenPasswordCount",16.711109161376953],["login-identifierRatio,multiStepForm",11.259562492370605],["login-passwordRatio,fieldsCount",11.20872974395752],["login-passwordRatio,identifierCount",-8.333873748779297],["login-passwordRatio,passwordCount",-3.4213614463806152],["login-passwordRatio,hiddenIdentifierCount",21.96377182006836],["login-passwordRatio,hiddenPasswordCount",34.9525146484375],["login-passwordRatio,multiStepForm",-12.636921882629395],["login-requiredRatio,fieldsCount",13.960801124572754],["login-requiredRatio,identifierCount",-5.709250450134277],["login-requiredRatio,passwordCount",8.685138702392578],["login-requiredRatio,hiddenIdentifierCount",-20.684762954711914],["login-requiredRatio,hiddenPasswordCount",17.758085250854492],["login-requiredRatio,multiStepForm",14.86757755279541]],nG={name:P.LOGIN,coeffs:nU.map(e=>{var t,r;return[`login-${e}`,null!=(r=null==(t=nB.find(([t])=>t===`login-${e}`))?void 0:t[1])?r:0]}),bias:-6.360585689544678,cutoff:.49,getRules:()=>[eK(eY("form"),eY(P.LOGIN),{}),...nU.map(e=>eK(eY(P.LOGIN),nc("form",e),{name:`login-${e}`})),...nf("form-candidate",P.LOGIN)]},nH=[["pw-change-fieldsCount",-3.3321454524993896],["pw-change-inputCount",-3.0804550647735596],["pw-change-fieldsetCount",-5.934694766998291],["pw-change-textCount",-6.049551486968994],["pw-change-textareaCount",-6.0787129402160645],["pw-change-selectCount",-5.987492084503174],["pw-change-optionsCount",-6.083714485168457],["pw-change-radioCount",-6.052059173583984],["pw-change-identifierCount",-5.403328895568848],["pw-change-hiddenIdentifierCount",-4.4229230880737305],["pw-change-usernameCount",-6.04349422454834],["pw-change-emailCount",-4.912832736968994],["pw-change-hiddenCount",-3.4236717224121094],["pw-change-hiddenPasswordCount",-5.930105209350586],["pw-change-submitCount",-3.8625235557556152],["pw-change-hasTels",-6.051826000213623],["pw-change-hasOAuth",-6.006768226623535],["pw-change-hasCaptchas",-6.024316310882568],["pw-change-hasFiles",-6.003083229064941],["pw-change-hasDate",-6.042792320251465],["pw-change-hasNumber",-8.931044578552246],["pw-change-oneVisibleField",-5.420173645019531],["pw-change-twoVisibleFields",-3.1558315753936768],["pw-change-threeOrMoreVisibleFields",-1.8346830606460571],["pw-change-noPasswords",-6.032570838928223],["pw-change-onePassword",-5.337682247161865],["pw-change-twoPasswords",7.295647144317627],["pw-change-threeOrMorePasswords",21.68557357788086],["pw-change-noIdentifiers",-2.4498164653778076],["pw-change-oneIdentifier",-6.094106197357178],["pw-change-twoIdentifiers",-5.916845321655273],["pw-change-threeOrMoreIdentifiers",1.6939911842346191],["pw-change-autofocusedIsIdentifier",-6.033471584320068],["pw-change-autofocusedIsPassword",15.131577491760254],["pw-change-visibleRatio",-4.09120512008667],["pw-change-inputRatio",-4.173065185546875],["pw-change-hiddenRatio",-3.4960551261901855],["pw-change-identifierRatio",-5.710056781768799],["pw-change-emailRatio",-5.21774435043335],["pw-change-usernameRatio",-6.235389232635498],["pw-change-passwordRatio",4.32260274887085],["pw-change-requiredRatio",-2.6061058044433594],["pw-change-checkboxRatio",-5.914191722869873],["pw-change-pageLogin",-6.2052154541015625],["pw-change-formTextLogin",-6.029303073883057],["pw-change-formAttrsLogin",-6.053979873657227],["pw-change-headingsLogin",-5.993305683135986],["pw-change-layoutLogin",-6.096299648284912],["pw-change-rememberMeCheckbox",-6.082805156707764],["pw-change-troubleLink",-3.7113256454467773],["pw-change-submitLogin",-6.145804405212402],["pw-change-pageRegister",-5.985432147979736],["pw-change-formTextRegister",-.03591149300336838],["pw-change-formAttrsRegister",-6.035892963409424],["pw-change-headingsRegister",-6.411230087280273],["pw-change-layoutRegister",-6.010503768920898],["pw-change-pwNewRegister",13.145064353942871],["pw-change-pwConfirmRegister",7.383437633514404],["pw-change-submitRegister",-7.358190059661865],["pw-change-TOSRef",-6.726124286651611],["pw-change-pagePwReset",15.504810333251953],["pw-change-formTextPwReset",22.969263076782227],["pw-change-formAttrsPwReset",14.371417045593262],["pw-change-headingsPwReset",18.480045318603516],["pw-change-layoutPwReset",16.99905014038086],["pw-change-pageRecovery",-6.04259729385376],["pw-change-formTextRecovery",-.04274427890777588],["pw-change-formAttrsRecovery",-6.037948131561279],["pw-change-headingsRecovery",-3.522164821624756],["pw-change-layoutRecovery",-4.054919242858887],["pw-change-identifierRecovery",-5.953251361846924],["pw-change-submitRecovery",4.2396721839904785],["pw-change-formTextMFA",-5.927785396575928],["pw-change-formAttrsMFA",-5.923059463500977],["pw-change-inputsMFA",-5.985617160797119],["pw-change-inputsOTP",-5.914240837097168],["pw-change-newsletterForm",-5.989622116088867],["pw-change-searchForm",-5.92101526260376],["pw-change-multiStepForm",-5.9458184242248535],["pw-change-multiAuthForm",-6.091955184936523],["pw-change-visibleRatio,fieldsCount",-3.3477888107299805],["pw-change-visibleRatio,identifierCount",-5.617403984069824],["pw-change-visibleRatio,passwordCount",3.3302927017211914],["pw-change-visibleRatio,hiddenIdentifierCount",-2.4642622470855713],["pw-change-visibleRatio,hiddenPasswordCount",-6.048635959625244],["pw-change-visibleRatio,multiStepForm",-5.95064115524292],["pw-change-identifierRatio,fieldsCount",-4.540703296661377],["pw-change-identifierRatio,identifierCount",-5.502275466918945],["pw-change-identifierRatio,passwordCount",-4.315083026885986],["pw-change-identifierRatio,hiddenIdentifierCount",-6.072136878967285],["pw-change-identifierRatio,hiddenPasswordCount",-5.912572383880615],["pw-change-identifierRatio,multiStepForm",-5.936649322509766],["pw-change-passwordRatio,fieldsCount",5.619084358215332],["pw-change-passwordRatio,identifierCount",-4.406495571136475],["pw-change-passwordRatio,passwordCount",9.266096115112305],["pw-change-passwordRatio,hiddenIdentifierCount",-.12468687444925308],["pw-change-passwordRatio,hiddenPasswordCount",-6.000542163848877],["pw-change-passwordRatio,multiStepForm",-5.978328227996826],["pw-change-requiredRatio,fieldsCount",-3.897763729095459],["pw-change-requiredRatio,identifierCount",-6.03505802154541],["pw-change-requiredRatio,passwordCount",3.800820827484131],["pw-change-requiredRatio,hiddenIdentifierCount",.2164151817560196],["pw-change-requiredRatio,hiddenPasswordCount",-5.912103176116943],["pw-change-requiredRatio,multiStepForm",-5.9860992431640625]],nW={name:P.PASSWORD_CHANGE,coeffs:nU.map(e=>{var t,r;return[`pw-change-${e}`,null!=(r=null==(t=nH.find(([t])=>t===`pw-change-${e}`))?void 0:t[1])?r:0]}),bias:-4.346797466278076,cutoff:1,getRules:()=>[eK(eY("form"),eY(P.PASSWORD_CHANGE),{}),...nU.map(e=>eK(eY(P.PASSWORD_CHANGE),nc("form",e),{name:`pw-change-${e}`})),...nf("form-candidate",P.PASSWORD_CHANGE)]},n$=[["recovery-fieldsCount",5.219259262084961],["recovery-inputCount",3.4802393913269043],["recovery-fieldsetCount",5.091477394104004],["recovery-textCount",-1.9329952001571655],["recovery-textareaCount",-11.980330467224121],["recovery-selectCount",-7.090891361236572],["recovery-optionsCount",-7.454675197601318],["recovery-radioCount",-5.982324600219727],["recovery-identifierCount",.24470239877700806],["recovery-hiddenIdentifierCount",-13.423789024353027],["recovery-usernameCount",7.580615997314453],["recovery-emailCount",-.7749595642089844],["recovery-hiddenCount",7.397370338439941],["recovery-hiddenPasswordCount",-10.402884483337402],["recovery-submitCount",17.34208869934082],["recovery-hasTels",-1.2667042016983032],["recovery-hasOAuth",-14.191985130310059],["recovery-hasCaptchas",4.94380521774292],["recovery-hasFiles",-22.454086303710938],["recovery-hasDate",-6.028102874755859],["recovery-hasNumber",-5.915408134460449],["recovery-oneVisibleField",-4.2500810623168945],["recovery-twoVisibleFields",-4.5695953369140625],["recovery-threeOrMoreVisibleFields",1.8211472034454346],["recovery-noPasswords",-1.9446848630905151],["recovery-onePassword",-12.154842376708984],["recovery-twoPasswords",-6.388713359832764],["recovery-threeOrMorePasswords",-5.9903340339660645],["recovery-noIdentifiers",-12.915245056152344],["recovery-oneIdentifier",1.9877134561538696],["recovery-twoIdentifiers",-3.45326828956604],["recovery-threeOrMoreIdentifiers",-8.09775161743164],["recovery-autofocusedIsIdentifier",1.188584804534912],["recovery-autofocusedIsPassword",-6.050867080688477],["recovery-visibleRatio",1.8096098899841309],["recovery-inputRatio",-6.735170364379883],["recovery-hiddenRatio",-1.901351809501648],["recovery-identifierRatio",2.0203499794006348],["recovery-emailRatio",.9475768804550171],["recovery-usernameRatio",7.2057600021362305],["recovery-passwordRatio",-9.867918968200684],["recovery-requiredRatio",-1.6640514135360718],["recovery-checkboxRatio",-5.932979583740234],["recovery-pageLogin",-2.4858222007751465],["recovery-formTextLogin",-5.925143718719482],["recovery-formAttrsLogin",-.08413530886173248],["recovery-headingsLogin",6.476242542266846],["recovery-layoutLogin",-12.630494117736816],["recovery-rememberMeCheckbox",-5.997462272644043],["recovery-troubleLink",8.869538307189941],["recovery-submitLogin",-5.894786834716797],["recovery-pageRegister",-10.688661575317383],["recovery-formTextRegister",-.07053083181381226],["recovery-formAttrsRegister",-8.1167573928833],["recovery-headingsRegister",-8.343093872070313],["recovery-layoutRegister",-10.727327346801758],["recovery-pwNewRegister",-5.970903396606445],["recovery-pwConfirmRegister",-6.094449996948242],["recovery-submitRegister",-6.537256717681885],["recovery-TOSRef",-16.483572006225586],["recovery-pagePwReset",9.253317832946777],["recovery-formTextPwReset",-6.472717761993408],["recovery-formAttrsPwReset",3.489095687866211],["recovery-headingsPwReset",7.393299579620361],["recovery-layoutPwReset",7.859417915344238],["recovery-pageRecovery",15.275426864624023],["recovery-formTextRecovery",.08355202525854111],["recovery-formAttrsRecovery",15.822127342224121],["recovery-headingsRecovery",10.05958366394043],["recovery-layoutRecovery",.8675701022148132],["recovery-identifierRecovery",17.785898208618164],["recovery-submitRecovery",17.075572967529297],["recovery-formTextMFA",-1.6202266216278076],["recovery-formAttrsMFA",12.503120422363281],["recovery-inputsMFA",-15.698631286621094],["recovery-inputsOTP",-9.031906127929688],["recovery-newsletterForm",-11.783472061157227],["recovery-searchForm",-11.046648979187012],["recovery-multiStepForm",3.962646722793579],["recovery-multiAuthForm",-6.030735969543457],["recovery-visibleRatio,fieldsCount",-3.6750259399414063],["recovery-visibleRatio,identifierCount",-.46854108572006226],["recovery-visibleRatio,passwordCount",-8.827977180480957],["recovery-visibleRatio,hiddenIdentifierCount",-7.780083656311035],["recovery-visibleRatio,hiddenPasswordCount",-14.793699264526367],["recovery-visibleRatio,multiStepForm",1.725805401802063],["recovery-identifierRatio,fieldsCount",2.5540273189544678],["recovery-identifierRatio,identifierCount",3.680723190307617],["recovery-identifierRatio,passwordCount",-11.473299980163574],["recovery-identifierRatio,hiddenIdentifierCount",-18.763864517211914],["recovery-identifierRatio,hiddenPasswordCount",-15.784345626831055],["recovery-identifierRatio,multiStepForm",-.08650737255811691],["recovery-passwordRatio,fieldsCount",-11.390311241149902],["recovery-passwordRatio,identifierCount",-11.758790016174316],["recovery-passwordRatio,passwordCount",-9.361132621765137],["recovery-passwordRatio,hiddenIdentifierCount",-6.076198101043701],["recovery-passwordRatio,hiddenPasswordCount",-5.9201741218566895],["recovery-passwordRatio,multiStepForm",-6.187673091888428],["recovery-requiredRatio,fieldsCount",-20.665956497192383],["recovery-requiredRatio,identifierCount",2.035646438598633],["recovery-requiredRatio,passwordCount",-6.348474979400635],["recovery-requiredRatio,hiddenIdentifierCount",23.868844985961914],["recovery-requiredRatio,hiddenPasswordCount",-10.315682411193848],["recovery-requiredRatio,multiStepForm",-9.611449241638184]],nq={name:P.RECOVERY,coeffs:nU.map(e=>{var t,r;return[`recovery-${e}`,null!=(r=null==(t=n$.find(([t])=>t===`recovery-${e}`))?void 0:t[1])?r:0]}),bias:-5.56587028503418,cutoff:.49,getRules:()=>[eK(eY("form"),eY(P.RECOVERY),{}),...nU.map(e=>eK(eY(P.RECOVERY),nc("form",e),{name:`recovery-${e}`})),...nf("form-candidate",P.RECOVERY)]},nj=[["register-fieldsCount",11.917691230773926],["register-inputCount",11.373042106628418],["register-fieldsetCount",7.854256629943848],["register-textCount",5.037329196929932],["register-textareaCount",4.7815656661987305],["register-selectCount",-5.59323787689209],["register-optionsCount",4.742903232574463],["register-radioCount",-.44946426153182983],["register-identifierCount",-3.116572141647339],["register-hiddenIdentifierCount",19.41229248046875],["register-usernameCount",-6.986035346984863],["register-emailCount",-7.78529691696167],["register-hiddenCount",-18.398569107055664],["register-hiddenPasswordCount",-15.720060348510742],["register-submitCount",7.6783881187438965],["register-hasTels",-7.298455715179443],["register-hasOAuth",4.153497219085693],["register-hasCaptchas",7.080265998840332],["register-hasFiles",-6.376850605010986],["register-hasDate",10.142865180969238],["register-hasNumber",19.163631439208984],["register-oneVisibleField",-1.262165904045105],["register-twoVisibleFields",8.802234649658203],["register-threeOrMoreVisibleFields",5.305413246154785],["register-noPasswords",-12.95462703704834],["register-onePassword",-4.9351487159729],["register-twoPasswords",26.029905319213867],["register-threeOrMorePasswords",-12.368908882141113],["register-noIdentifiers",-11.34496784210205],["register-oneIdentifier",-3.4595398902893066],["register-twoIdentifiers",3.8030407428741455],["register-threeOrMoreIdentifiers",-11.924832344055176],["register-autofocusedIsIdentifier",-1.864850640296936],["register-autofocusedIsPassword",30.214879989624023],["register-visibleRatio",5.202010631561279],["register-inputRatio",-7.839704513549805],["register-hiddenRatio",20.710941314697266],["register-identifierRatio",14.027844429016113],["register-emailRatio",-5.600202560424805],["register-usernameRatio",-1.7127400636672974],["register-passwordRatio",-12.093314170837402],["register-requiredRatio",-5.89549446105957],["register-checkboxRatio",-28.658470153808594],["register-pageLogin",-7.616566181182861],["register-formTextLogin",-5.961889743804932],["register-formAttrsLogin",-.7363413572311401],["register-headingsLogin",-7.311540126800537],["register-layoutLogin",8.75506591796875],["register-rememberMeCheckbox",-11.602274894714355],["register-troubleLink",-13.688916206359863],["register-submitLogin",-5.153923034667969],["register-pageRegister",14.36414909362793],["register-formTextRegister",.0492059662938118],["register-formAttrsRegister",3.9691600799560547],["register-headingsRegister",13.079018592834473],["register-layoutRegister",-1.0081580877304077],["register-pwNewRegister",10.531805992126465],["register-pwConfirmRegister",10.429780006408691],["register-submitRegister",27.7530574798584],["register-TOSRef",5.424505233764648],["register-pagePwReset",-6.759202480316162],["register-formTextPwReset",-10.20751953125],["register-formAttrsPwReset",-6.02766227722168],["register-headingsPwReset",-20.03550148010254],["register-layoutPwReset",-64.6925277709961],["register-pageRecovery",-5.776443004608154],["register-formTextRecovery",-.056022703647613525],["register-formAttrsRecovery",-40.626976013183594],["register-headingsRecovery",-1.4371925592422485],["register-layoutRecovery",-2.5626723766326904],["register-identifierRecovery",5.569582939147949],["register-submitRecovery",-42.5285530090332],["register-formTextMFA",-10.36745548248291],["register-formAttrsMFA",-10.58807373046875],["register-inputsMFA",-9.893669128417969],["register-inputsOTP",-7.69745397567749],["register-newsletterForm",-16.872678756713867],["register-searchForm",-6.112391471862793],["register-multiStepForm",-4.156559944152832],["register-multiAuthForm",-13.153765678405762],["register-visibleRatio,fieldsCount",-12.166980743408203],["register-visibleRatio,identifierCount",-.3816330134868622],["register-visibleRatio,passwordCount",.8365750908851624],["register-visibleRatio,hiddenIdentifierCount",16.387969970703125],["register-visibleRatio,hiddenPasswordCount",-3.6937456130981445],["register-visibleRatio,multiStepForm",15.94931411743164],["register-identifierRatio,fieldsCount",2.0408496856689453],["register-identifierRatio,identifierCount",19.188720703125],["register-identifierRatio,passwordCount",-31.58989143371582],["register-identifierRatio,hiddenIdentifierCount",-22.044620513916016],["register-identifierRatio,hiddenPasswordCount",38.33562469482422],["register-identifierRatio,multiStepForm",5.4950056076049805],["register-passwordRatio,fieldsCount",8.79137134552002],["register-passwordRatio,identifierCount",-35.184547424316406],["register-passwordRatio,passwordCount",-12.764176368713379],["register-passwordRatio,hiddenIdentifierCount",12.858628273010254],["register-passwordRatio,hiddenPasswordCount",7.0506062507629395],["register-passwordRatio,multiStepForm",12.14311695098877],["register-requiredRatio,fieldsCount",-27.65677833557129],["register-requiredRatio,identifierCount",22.865949630737305],["register-requiredRatio,passwordCount",-2.035212755203247],["register-requiredRatio,hiddenIdentifierCount",13.596835136413574],["register-requiredRatio,hiddenPasswordCount",-7.711032867431641],["register-requiredRatio,multiStepForm",-1.6663168668746948]],nY={name:P.REGISTER,coeffs:nU.map(e=>{var t,r;return[`register-${e}`,null!=(r=null==(t=nj.find(([t])=>t===`register-${e}`))?void 0:t[1])?r:0]}),bias:-7.748831272125244,cutoff:.54,getRules:()=>[eK(eY("form"),eY(P.REGISTER),{}),...nU.map(e=>eK(eY(P.REGISTER),nc("form",e),{name:`register-${e}`})),...nf("form-candidate",P.REGISTER)]},nz=["autocompleteUsername","autocompleteNickname","autocompleteEmail","typeEmail","exactAttrEmail","attrEmail","textEmail","labelEmail","placeholderEmail","searchField"],nV=[["email-autocompleteUsername",1.422879934310913],["email-autocompleteNickname",.06123584508895874],["email-autocompleteEmail",6.039527416229248],["email-typeEmail",15.077214241027832],["email-exactAttrEmail",13.114316940307617],["email-attrEmail",2.7811479568481445],["email-textEmail",15.807499885559082],["email-labelEmail",17.429636001586914],["email-placeholderEmail",3.715912103652954],["email-searchField",-15.843851089477539]],nK={name:F.EMAIL,coeffs:nz.map(e=>{var t,r;return[`email-${e}`,null!=(r=null==(t=nV.find(([t])=>t===`email-${e}`))?void 0:t[1])?r:0]}),bias:-9.902606010437012,cutoff:.5,getRules:()=>[eK(eY("email-field"),eY(F.EMAIL),{}),...nz.map(e=>eK(eY(F.EMAIL),nc("email-field",e),{name:`email-${e}`})),...nf("field-candidate",F.EMAIL)]};(h=M||(M={}))[h.FULLNAME=1]="FULLNAME",h[h.FIRSTNAME=2]="FIRSTNAME",h[h.MIDDLENAME=3]="MIDDLENAME",h[h.LASTNAME=4]="LASTNAME",h[h.TELEPHONE=5]="TELEPHONE",h[h.ADDRESS=6]="ADDRESS",h[h.STATE=7]="STATE",h[h.CITY=8]="CITY",h[h.ZIPCODE=9]="ZIPCODE",h[h.ORGANIZATION=10]="ORGANIZATION",h[h.COUNTRY=11]="COUNTRY",h[h.EMAIL=12]="EMAIL";let nZ=[[M.FIRSTNAME,rx],[M.MIDDLENAME,rN],[M.LASTNAME,rI],[M.FULLNAME,rO],[M.TELEPHONE,rP],[M.ORGANIZATION,rF],[M.CITY,rM],[M.ZIPCODE,rL],[M.STATE,rk],[M.COUNTRY,rD],[M.ADDRESS,rU]],nQ=["autocomplete","name","id","data-bhw"],nX=["tel","phone","text","number"],nJ=e=>{var t;let r=rG(nQ.map(t=>{var r;return null!=(r=null==e?void 0:e.getAttribute(t))?r:""}).join(" "));if(r)return null==(t=nZ.find(([,e])=>e(r)))?void 0:t[0]},n0=[eK(eY("field").when(e=>{let t=e.element,{visible:r,isFormLogin:n,type:o,searchField:i}=e.noteFor("field");if(o&&!nX.includes(o)||!r||n)return!1;let a=nJ(t);return!!a&&("list"===t.getAttribute("aria-autocomplete")||"combobox"===t.role?[M.ADDRESS,M.ZIPCODE].includes(a):"number"===o?[M.TELEPHONE,M.ZIPCODE].includes(a):!i||[M.ADDRESS,M.ZIPCODE,a===M.CITY].includes(a))}),eY("identity-field"),{}),eK(eY("identity-field"),eY(F.IDENTITY),{}),...nf("field-candidate",F.IDENTITY,()=>()=>!0)],n1=["formMFA","formOutlier","fieldOutlier","linkOutlier","emailOutlierCount","inputCountOutlier","nameMatch","idMatch","numericMode","patternOTP","maxLengthExpected","maxLengthInvalid","maxLength1","maxLength5","minLength6","maxLength6","autocompleteOTC","prevAligned","prevArea","nextAligned","nextArea","attrMFA","attrOTP","textMFA","textOTP","labelMFA","labelOTP","wrapperOTP",...ng(["autocompleteOTC","siblingOfInterest","formMFA"],["inputCountOutlier","maxLengthInvalid","attrOTP"])],n5=[["otp-formMFA",7.771900177001953],["otp-formOutlier",-.04360857233405113],["otp-fieldOutlier",-14.93850040435791],["otp-linkOutlier",-15.19876766204834],["otp-emailOutlierCount",-20.635622024536133],["otp-inputCountOutlier",-4.404586315155029],["otp-nameMatch",11.083649635314941],["otp-idMatch",8.304197311401367],["otp-numericMode",6.63908052444458],["otp-patternOTP",11.01827621459961],["otp-maxLengthExpected",1.5373173952102661],["otp-maxLengthInvalid",-6.062628269195557],["otp-maxLength1",4.458582401275635],["otp-maxLength5",-7.512012481689453],["otp-minLength6",15.0722017288208],["otp-maxLength6",-7.584023952484131],["otp-autocompleteOTC",5.740074634552002],["otp-prevAligned",4.224268913269043],["otp-prevArea",2.773845672607422],["otp-nextAligned",3.857393741607666],["otp-nextArea",2.5566060543060303],["otp-attrMFA",32.71980285644531],["otp-attrOTP",20.423227310180664],["otp-textMFA",6.684645652770996],["otp-textOTP",1.1047155857086182],["otp-labelMFA",18.526269912719727],["otp-labelOTP",8.603682518005371],["otp-wrapperOTP",-10.004483222961426],["otp-autocompleteOTC,inputCountOutlier",-4.689912796020508],["otp-autocompleteOTC,maxLengthInvalid",-18.661497116088867],["otp-autocompleteOTC,attrOTP",5.988102436065674],["otp-siblingOfInterest,inputCountOutlier",-7.615082263946533],["otp-siblingOfInterest,maxLengthInvalid",-6.08467435836792],["otp-siblingOfInterest,attrOTP",5.977667331695557],["otp-formMFA,inputCountOutlier",9.612953186035156],["otp-formMFA,maxLengthInvalid",-12.804899215698242],["otp-formMFA,attrOTP",6.108048439025879]],n2={name:F.OTP,coeffs:n1.map(e=>{var t,r;return[`otp-${e}`,null!=(r=null==(t=n5.find(([t])=>t===`otp-${e}`))?void 0:t[1])?r:0]}),bias:-11.110547065734863,cutoff:.5,getRules:()=>[eK(eY("otp-field"),eY(F.OTP),{}),...n1.map(e=>eK(eY(F.OTP),nc("otp-field",e),{name:`otp-${e}`})),...nf("field-candidate",F.OTP)]},n6=e=>"current-password"===e||"password"===e,n3=["loginScore","registerScore","pwChangeScore","exotic","autocompleteNew","autocompleteCurrent","autocompleteOff","isOnlyPassword","prevPwField","nextPwField","attrCreate","attrCurrent","attrConfirm","attrReset","textCreate","textCurrent","textConfirm","textReset","labelCreate","labelCurrent","labelConfirm","labelReset","prevPwNew","prevPwCurrent","prevPwConfirm","nextPwNew","nextPwCurrent","nextPwConfirm","passwordOutlier",...ng(["prevPwCurrent"],["nextPwNew"])],n4=[["pw-loginScore",11.489188194274902],["pw-registerScore",-12.317614555358887],["pw-pwChangeScore",-3.3522896766662598],["pw-exotic",-11.274672508239746],["pw-autocompleteNew",-3.2165679931640625],["pw-autocompleteCurrent",1.107975721359253],["pw-autocompleteOff",-1.5637125968933105],["pw-isOnlyPassword",1.6692641973495483],["pw-prevPwField",-3.853325843811035],["pw-nextPwField",-2.6056430339813232],["pw-attrCreate",-2.091197967529297],["pw-attrCurrent",2.623647451400757],["pw-attrConfirm",-6.392003536224365],["pw-attrReset",7354617118835449e-19],["pw-textCreate",-2.4505302906036377],["pw-textCurrent",1.7695688009262085],["pw-textConfirm",-6.402401924133301],["pw-textReset",-.1697392612695694],["pw-labelCreate",-7.204258441925049],["pw-labelCurrent",14.438202857971191],["pw-labelConfirm",-6.259541988372803],["pw-labelReset",.015617117285728455],["pw-prevPwNew",-6.184617519378662],["pw-prevPwCurrent",-6.242441177368164],["pw-prevPwConfirm",-.17926810681819916],["pw-nextPwNew",9.929208755493164],["pw-nextPwCurrent",-7.612186431884766],["pw-nextPwConfirm",-6.865516662597656],["pw-passwordOutlier",-17.66224479675293],["pw-prevPwCurrent,nextPwNew",-5.839819431304932]],n8={name:F.PASSWORD_CURRENT,coeffs:n3.map(e=>{var t,r;return[`pw-${e}`,null!=(r=null==(t=n4.find(([t])=>t===`pw-${e}`))?void 0:t[1])?r:0]}),bias:.2366154044866562,cutoff:.5,getRules:()=>[eK(eY("password-field"),eY(F.PASSWORD_CURRENT),{}),...n3.map(e=>eK(eY(F.PASSWORD_CURRENT),nc("password-field",e),{name:`pw-${e}`})),...nf("field-candidate",F.PASSWORD_CURRENT)]},n9=[["pw[new]-loginScore",-10.936930656433105],["pw[new]-registerScore",11.831424713134766],["pw[new]-pwChangeScore",5.067559242248535],["pw[new]-exotic",11.193541526794434],["pw[new]-autocompleteNew",2.4367527961730957],["pw[new]-autocompleteCurrent",-1.0056599378585815],["pw[new]-autocompleteOff",1.5895371437072754],["pw[new]-isOnlyPassword",-1.4990589618682861],["pw[new]-prevPwField",3.6485674381256104],["pw[new]-nextPwField",1.4125449657440186],["pw[new]-attrCreate",2.043544292449951],["pw[new]-attrCurrent",-1.0884264707565308],["pw[new]-attrConfirm",6.419448375701904],["pw[new]-attrReset",.08130821585655212],["pw[new]-textCreate",2.1415109634399414],["pw[new]-textCurrent",-1.3681634664535522],["pw[new]-textConfirm",6.278629779815674],["pw[new]-textReset",.07996046543121338],["pw[new]-labelCreate",7.23655891418457],["pw[new]-labelCurrent",-13.138494491577148],["pw[new]-labelConfirm",6.407430171966553],["pw[new]-labelReset",-.02614663541316986],["pw[new]-prevPwNew",6.290370941162109],["pw[new]-prevPwCurrent",6.439488887786865],["pw[new]-prevPwConfirm",.02449376881122589],["pw[new]-nextPwNew",-10.66829776763916],["pw[new]-nextPwCurrent",7.651172161102295],["pw[new]-nextPwConfirm",7.5237345695495605],["pw[new]-passwordOutlier",-23.131240844726563],["pw[new]-prevPwCurrent,nextPwNew",5.949848651885986]],n7={name:F.PASSWORD_NEW,coeffs:n3.map(e=>{var t,r;return[`pw[new]-${e}`,null!=(r=null==(t=n9.find(([t])=>t===`pw[new]-${e}`))?void 0:t[1])?r:0]}),bias:-.42535680532455444,cutoff:.5,getRules:()=>[eK(eY("password-field"),eY(F.PASSWORD_NEW),{}),...n3.map(e=>eK(eY(F.PASSWORD_NEW),nc("password-field",e),{name:`pw[new]-${e}`})),...nf("field-candidate",F.PASSWORD_NEW)]},oe=["autocompleteUsername","autocompleteNickname","autocompleteEmail","autocompleteOff","attrUsername","textUsername","labelUsername","outlierUsername","loginUsername","searchField"],ot=[["username-autocompleteUsername",8.727046012878418],["username-autocompleteNickname",-.2054200917482376],["username-autocompleteEmail",-6.400381565093994],["username-autocompleteOff",-.4214320778846741],["username-attrUsername",17.859210968017578],["username-textUsername",15.59371280670166],["username-labelUsername",17.55240821838379],["username-outlierUsername",.07585844397544861],["username-loginUsername",18.52303123474121],["username-searchField",-13.451205253601074]],or={name:F.USERNAME,coeffs:oe.map(e=>{var t,r;return[`username-${e}`,null!=(r=null==(t=ot.find(([t])=>t===`username-${e}`))?void 0:t[1])?r:0]}),bias:-9.966038703918457,cutoff:.5,getRules:()=>[eK(eY("username-field"),eY(F.USERNAME),{}),...oe.map(e=>eK(eY(F.USERNAME),nc("username-field",e),{name:`username-${e}`})),...nf("field-candidate",F.USERNAME)]},on=["exotic","attrUsername","attrEmail","usernameAttr","autocompleteUsername","visibleReadonly","hiddenEmailValue","hiddenTelValue","hiddenUsernameValue"],oo=[["username[hidden]-exotic",-10.682938575744629],["username[hidden]-attrUsername",21.034669876098633],["username[hidden]-attrEmail",13.188990592956543],["username[hidden]-usernameAttr",15.255407333374023],["username[hidden]-autocompleteUsername",4.695377826690674],["username[hidden]-visibleReadonly",11.520600318908691],["username[hidden]-hiddenEmailValue",24.007482528686523],["username[hidden]-hiddenTelValue",6.628058433532715],["username[hidden]-hiddenUsernameValue",7.225632190704346]],oi={name:F.USERNAME_HIDDEN,coeffs:on.map(e=>{var t,r;return[`username[hidden]-${e}`,null!=(r=null==(t=oo.find(([t])=>t===`username[hidden]-${e}`))?void 0:t[1])?r:0]}),bias:-30.55059242248535,cutoff:.5,getRules:()=>[eK(eY("username-hidden-field"),eY(F.USERNAME_HIDDEN),{}),...on.map(e=>eK(eY(F.USERNAME_HIDDEN),nc("username-hidden-field",e),{name:`username[hidden]-${e}`})),...nf("field-candidate",F.USERNAME_HIDDEN)]},{clusters:oa}=eI,os={cache:new WeakMap},ol=e=>{var t;let r=null!=(t=os.cache.get(e))?t:{isField:e.matches(e7)&&e.matches(':not([type="submit"])'),rect:e.getBoundingClientRect()};return os.cache.set(e,r),r},ou=e=>tk(e)&&null!==e.querySelector("input"),oc=[eK(eY("form").when(e=>nA(e).noop),eY(P.NOOP),{}),...nf("form-candidate",P.NOOP,()=>()=>!0)],od=()=>{Object.keys(rH).forEach(e=>delete rH[e]),rX.clear(),rX.clear()},om=()=>{let e=[],t=e=>e?.cancel?.();return{addListener:(t,r,n,o)=>{if(void 0!==t){let i={kind:"listener",element:t,type:r,fn:n};return e.push(i),t.addEventListener(r,n,o),()=>{t.removeEventListener(r,n);let o=e.indexOf(i);e.splice(o,1)}}return G},addObserver:(r,n,o)=>{let i=new MutationObserver(n),a=i.disconnect;return i.disconnect=()=>{t(n),a.bind(i)()},e.push({kind:"observer",observer:i}),i.observe(r,o),i},addResizeObserver:(r,n)=>{let o=new ResizeObserver(n),i=o.disconnect;o.disconnect=()=>{t(n),i.bind(o)()},e.push({kind:"resizeObserver",observer:o}),o.observe(r)},removeAll:()=>{e.forEach(e=>{switch(e.kind){case"observer":case"resizeObserver":return e.observer.disconnect();case"listener":return t(e.fn),e.element.removeEventListener(e.type,e.fn)}}),e.length=0}}},op=(e=8)=>Array.from(crypto.getRandomValues(new Uint8Array(e))).map(e=>e.toString(16)).join("").slice(0,e);var of=r(26562),og=r.n(of);let oh="data-protonpass-role",oA="data-protonpass-theme",oy=[oh,oA,"aria-hidden","popover"],ob=HTMLElement===HTMLElement.prototype.constructor?HTMLElement:HTMLElement.prototype.constructor;class ow extends ob{mutationObs=null;attrsMutationCount=new Map;connectedCallback(){this.mutationObs=new MutationObserver(e=>{for(let{type:t,attributeName:r}of e)if("attributes"===t&&r&&!oy.includes(r)){let e=this.attrsMutationCount.get(r)??0;this.attrsMutationCount.set(r,e+1),this.removeAttribute(r),e>25&&(oy.push(r),this.attrsMutationCount.delete(r))}}),this.mutationObs.observe(this,{attributes:!0,childList:!1})}disconnectedCallback(){this.mutationObs?.disconnect()}}class ov extends ow{static getTagName=e=>`protonpass-control-${e}`;connectedCallback(){super.connectedCallback(),this.setAttribute(oh,"icon")}}let o_="data-protonpass-base-css",oE="PassRootRemoved";class oC extends ow{static getTagName=e=>`protonpass-root-${e}`;disconnectedCallback(){super.disconnectedCallback(),requestIdleCallback(()=>{let e=new CustomEvent(oE,{bubbles:!0});this.dispatchEvent(e)})}connectedCallback(){super.connectedCallback(),this.setAttribute(oh,"root")}}let oT=((A={}).AUTOFILL_IDENTITY="AUTOFILL_IDENTITY",A.AUTOFILL_LOGIN="AUTOFILL_LOGIN",A.AUTOSUGGEST_ALIAS="AUTOSUGGEST_ALIAS",A.AUTOSUGGEST_PASSWORD="AUTOSUGGEST_PASSWORD",A),oR=((y={}).AUTOFILL_EMAIL="AUTOFILL_EMAIL",y.AUTOFILL_FILTER="AUTOFILL_FILTER",y.AUTOFILL_GENERATED_PW="AUTOFILL_GENERATED_PASSWORD",y.AUTOFILL_IDENTITY="AUTOFILL_IDENTITY",y.AUTOFILL_LOGIN="AUTOFILL_LOGIN",y.AUTOFILL_OTP="AUTOFILL_OTP",y.DROPDOWN_ACTION="DROPDOWN_ACTION",y.DROPDOWN_FOCUS="DROPDOWN_FOCUS",y.DROPDOWN_FOCUS_CHECK="DROPDOWN_FOCUS_CHECK",y.IFRAME_CLOSE="IFRAME_CLOSE",y.IFRAME_CONNECTED="IFRAME_CONNECTED",y.IFRAME_DIMENSIONS="IFRAME_DIMENSIONS",y.IFRAME_HIDDEN="IFRAME_HIDDEN",y.IFRAME_INIT="IFRAME_INIT",y.IFRAME_INJECT_PORT="IFRAME_INJECT_PORT",y.IFRAME_OPEN="IFRAME_OPEN",y.IFRAME_THEME="IFRAME_THEME",y.NOTIFICATION_ACTION="NOTIFICATION_ACTION",y.PASSKEY_RELAY="PASSKEY_RELAY",y),oS=((b={}).AUTOSAVE="AUTOSAVE",b.OTP="OTP",b.PASSKEY_CREATE="PASSKEY::CREATE",b.PASSKEY_GET="PASSKEY::GET",b),oO=((w={}).AutofillDisplay="autofill.display",w.AutofillTriggered="autofill.triggered",w.AutosaveDismissed="autosave.dismissed",w.AutosaveDisplay="autosave.display",w.AutosaveDone="autosave.done",w.AutosuggestAliasCreated="autosuggest.alias_created",w.ErrorResumingSession="error.resuming_session",w.ExtensionCopiedFromLogin="extension.copied_from_login",w.ExtensionUsed="extension.used",w.ImportCompletion="import.complete",w.ItemCreation="item.creation",w.ItemDeletion="item.deletion",w.ItemRead="item.read",w.ItemUpdate="item.update",w.PasskeyAuthSuccess="passkey.auth_done",w.PasskeyCreated="passkey.create_done",w.PasskeyCreateDisplay="passkey.create_prompt_display",w.PasskeysSuggestionsDisplay="passkey.display_suggestions",w.PassFileUploaded="pass_file_attachment.file_uploaded",w.PassMonitorAddCustomEmailFromSuggestion="pass_monitor.add_custom_email_from_suggestion",w.PassMonitorDisplayDarkWebMonitoring="pass_monitor.display_dark_web_monitoring",w.PassMonitorDisplayExcludedItems="pass_monitor.display_excluded_items",w.PassMonitorDisplayHome="pass_monitor.display_home",w.PassMonitorDisplayMissing2FA="pass_monitor.display_missing_2fa",w.PassMonitorDisplayMonitoringEmailAliases="pass_monitor.display_monitoring_email_aliases",w.PassMonitorDisplayMonitoringProtonAddresses="pass_monitor.display_monitoring_proton_addresses",w.PassMonitorDisplayReusedPasswords="pass_monitor.display_reused_passwords",w.PassMonitorDisplayWeakPasswords="pass_monitor.display_weak_passwords",w.PassMonitorItemDetailFromMissing2FA="pass_monitor.item_detail_from_missing_2fa",w.PassMonitorItemDetailFromReusedPassword="pass_monitor.item_detail_from_reused_password",w.PassMonitorItemDetailFromWeakPassword="pass_monitor.item_detail_from_weak_password",w.PassNotificationChangeStatus="pass_notifications.change_notification_status",w.PassNotificationCTAClick="pass_notifications.notification_cta_click",w.PassNotificationDisplay="pass_notifications.display_notification",w.SearchClick="search.click",w.SearchTriggered="search.triggered",w.TwoFAAutofill="2fa.autofill",w.TwoFACreation="2fa.creation",w.TwoFADisplay="2fa.display",w.TwoFAUpdate="2fa.update",w);oO.ExtensionCopiedFromLogin,oO.AutosaveDismissed,oO.ExtensionUsed;let ox=(e,t,r,n,o)=>Y(V({type:p.TELEMETRY_EVENT,payload:{event:((e,t,r,n="any")=>({MeasurementGroup:`pass.${n}.user_actions`,Event:e,Values:t,Dimensions:r}))(e,t,r,n),extra:o}})).catch(G);var oN=Symbol.for("immer-nothing"),oI=Symbol.for("immer-draftable"),oP=Symbol.for("immer-state");function oF(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var oM=Object.getPrototypeOf;function oL(e){return!!e&&!!e[oP]}function ok(e){return!!e&&(oB(e)||Array.isArray(e)||!!e[oI]||!!e.constructor?.[oI]||oq(e)||oj(e))}var oD=Object.prototype.constructor.toString(),oU=new WeakMap;function oB(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if("function"!=typeof r)return!1;let n=oU.get(r);return void 0===n&&(n=Function.toString.call(r),oU.set(r,n)),n===oD}function oG(e,t,r=!0){0===oH(e)?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function oH(e){let t=e[oP];return t?t.type_:Array.isArray(e)?1:oq(e)?2:3*!!oj(e)}function oW(e,t){return 2===oH(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function o$(e,t,r){let n=oH(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function oq(e){return e instanceof Map}function oj(e){return e instanceof Set}function oY(e){return e.copy_||e.base_}function oz(e,t){if(oq(e))return new Map(e);if(oj(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=oB(e);if(!0!==t&&("class_only"!==t||r)){let t=oM(e);return null!==t&&r?{...e}:Object.assign(Object.create(t),e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[oP];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let o=r[n],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(oM(e),t)}}function oV(e,t=!1){return oZ(e)||oL(e)||!ok(e)||(oH(e)>1&&Object.defineProperties(e,{set:oK,add:oK,clear:oK,delete:oK}),Object.freeze(e),t&&Object.values(e).forEach(e=>oV(e,!0))),e}var oK={value:function(){oF(2)}};function oZ(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var oQ={};function oX(e){let t=oQ[e];return t||oF(0,e),t}function oJ(e,t){t&&(oX("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function o0(e){o1(e),e.drafts_.forEach(o2),e.drafts_=null}function o1(e){e===L&&(L=e.parent_)}function o5(e){return L={drafts_:[],parent_:L,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function o2(e){let t=e[oP];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function o6(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return void 0!==e&&e!==r?(r[oP].modified_&&(o0(t),oF(4)),ok(e)&&(e=o3(t,e),t.parent_||o8(t,e)),t.patches_&&oX("Patches").generateReplacementPatches_(r[oP].base_,e,t.patches_,t.inversePatches_)):e=o3(t,r,[]),o0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==oN?e:void 0}function o3(e,t,r){if(oZ(t))return t;let n=e.immer_.shouldUseStrictIteration(),o=t[oP];if(!o)return oG(t,(n,i)=>o4(e,o,t,n,i,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return o8(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let t=o.copy_,i=t,a=!1;3===o.type_&&(i=new Set(t),t.clear(),a=!0),oG(i,(n,i)=>o4(e,o,t,n,i,r,a),n),o8(e,t,!1),r&&e.patches_&&oX("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function o4(e,t,r,n,o,i,a){if(null==o||"object"!=typeof o&&!a)return;let s=oZ(o);if(!s||a){if(oL(o)){let a=o3(e,o,i&&t&&3!==t.type_&&!oW(t.assigned_,n)?i.concat(n):void 0);if(o$(r,n,a),!oL(a))return;e.canAutoFreeze_=!1}else a&&r.add(o);if(ok(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&s)return;o3(e,o),(!t||!t.scope_.parent_)&&"symbol"!=typeof n&&(oq(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&o8(e,o)}}}function o8(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&oV(t,r)}var o9={get(e,t){if(t===oP)return e;let r=oY(e);if(!oW(r,t)){let n;return(n=it(r,t))?"value"in n?n.value:n.get?.call(e.draft_):void 0}let n=r[t];return e.finalized_||!ok(n)?n:n===ie(e.base_,t)?(io(e),e.copy_[t]=ii(n,e)):n},has:(e,t)=>t in oY(e),ownKeys:e=>Reflect.ownKeys(oY(e)),set(e,t,r){let n=it(oY(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=ie(oY(e),t),o=n?.[oP];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||oW(e.base_,t)))return!0;io(e),ir(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_[t]=!0,!0)},deleteProperty:(e,t)=>(void 0!==ie(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,io(e),ir(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=oY(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){oF(11)},getPrototypeOf:e=>oM(e.base_),setPrototypeOf(){oF(12)}},o7={};function ie(e,t){let r=e[oP];return(r?oY(r):e)[t]}function it(e,t){if(!(t in e))return;let r=oM(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=oM(r)}}function ir(e){!e.modified_&&(e.modified_=!0,e.parent_&&ir(e.parent_))}function io(e){e.copy_||(e.copy_=oz(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function ii(e,t){let r=oq(e)?oX("MapSet").proxyMap_(e,t):oj(e)?oX("MapSet").proxySet_(e,t):function(e,t){let r=Array.isArray(e),n={type_:+!!r,scope_:t?t.scope_:L,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=o9;r&&(o=[n],i=o7);let{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}(e,t);return(t?t.scope_:L).drafts_.push(r),r}oG(o9,(e,t)=>{o7[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),o7.deleteProperty=function(e,t){return o7.set.call(this,e,t,void 0)},o7.set=function(e,t,r){return o9.set.call(this,e[0],t,r,e[0])};var ia=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,r)=>{let n;if("function"==typeof e&&"function"!=typeof t){let r=t;t=e;let n=this;return function(e=r,...o){return n.produce(e,e=>t.call(this,e,...o))}}if("function"!=typeof t&&oF(6),void 0!==r&&"function"!=typeof r&&oF(7),ok(e)){let o=o5(this),i=ii(e,void 0),a=!0;try{n=t(i),a=!1}finally{a?o0(o):o1(o)}return oJ(o,r),o6(n,o)}if(e&&"object"==typeof e)oF(1,e);else{if(void 0===(n=t(e))&&(n=e),n===oN&&(n=void 0),this.autoFreeze_&&oV(n,!0),r){let t=[],o=[];oX("Patches").generateReplacementPatches_(e,n,t,o),r(t,o)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return"function"==typeof e?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;ok(e)||oF(8),oL(e)&&(oL(t=e)||oF(10,t),e=function e(t){let r;if(!ok(t)||oZ(t))return t;let n=t[oP],o=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=oz(t,n.scope_.immer_.useStrictShallowCopy_),o=n.scope_.immer_.shouldUseStrictIteration()}else r=oz(t,!0);return oG(r,(t,n)=>{o$(r,t,e(n))},o),n&&(n.finalized_=!1),r}(t));let r=o5(this),n=ii(e,void 0);return n[oP].isManual_=!0,o1(r),n}finishDraft(e,t){let r=e&&e[oP];r&&r.isManual_||oF(9);let{scope_:n}=r;return oJ(n,t),o6(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=oX("Patches").applyPatches_;return oL(e)?n(e,t):this.produce(e,e=>n(e,t))}};ia.produce;var is=ia.setUseStrictIteration.bind(ia);function il(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(ih(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>(function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)})(t)&&"type"in t&&"string"==typeof t.type&&t.type===e,r}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,(class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}}),is(!1);var iu=((v=iu||{}).reducer="reducer",v.reducerWithPrepare="reducerWithPrepare",v.asyncThunk="asyncThunk",v),{assign:ic}=Object,id="listenerMiddleware",im=ic(e=>{let{type:t,predicate:r,effect:n}=(e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=il(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(o);else throw Error(ih(21));if("function"!=typeof i)throw TypeError(ih(32));return{predicate:o,type:t,effect:i}})(e);return{id:((e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(ih(22))}}},{withTypes:()=>im}),ip=ic(il(`${id}/add`),{withTypes:()=>ip}),ig=ic(il(`${id}/remove`),{withTypes:()=>ig});function ih(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original");let iA=(e,t,r={excludeEmpty:!1})=>{if(e===t)return e;let n=Object.keys(t);return(r.excludeEmpty?n.filter(e=>{let r;return!(null==(r=t[e])||""===r||"number"==typeof r&&Number.isNaN(r))}):n).reduce((n,o)=>({...n,[o]:K(e[o])&&K(t[o])?iA(e[o],t[o],r):t[o]}),e)},iy=e=>t=>iA(t,{meta:e}),ib=iy({cache:!0});iy({throttle:!0,cache:!0});let iw=iy({settings:!0});var iv=r(80601);let i_=r.n(iv)(),iE=il("password::save",e=>ib({payload:e}));il("password::delete",e=>ib({payload:e})),il("password::history::clear",()=>ib({payload:{}})),il("password::history::gc"),il("password::options::edit",e=>i_(ib,iw)({payload:e}));let iC=e=>e?.[0],iT=(e,t)=>{let r=new Map;return(...n)=>{let o=t?.key?.(...n)??"",i=r.get(o)??e(...n).finally(()=>r.delete(o));return r.set(o,i),i}},iR=(e,t)=>{let r=new Map;return async(...n)=>{var o;let i,a,s,l=t?.key?.(...n)??"",u=r.get(l)??Promise.resolve(),c=(i=G,a=G,(s=new Promise((e,t)=>{i=t=>{e(t),o?.onResolve?.(t)},a=e=>{t(e),o?.onReject?.(e)}})).resolve=i,s.reject=a,s);return r.set(l,u.then(async()=>{try{let t=await e(...n);c.resolve(t)}catch(e){c.reject(e)}})),c}},iS=async(e,t)=>{let r=[];for(let n of e){let e=await t(n);r.push(e)}return r},iO=["domain","port","protocol"];RegExp("^(file:|javascript:|data:|chrome-extension:|chrome:|brave:|edge:|moz-extension:|about:)","i");let ix=(...e)=>t=>e.reduce((e,t)=>e[t],t),iN=(...e)=>t=>e.some(e=>e(t)),iI=(...e)=>t=>e.includes(t),iP=e=>t=>e===t,iF=e=>!!e;function iM(e){return e[e.length-1]}let iL=e=>e?.trim().replace(/\s+/g," "),ik=({fullName:e})=>e.split(" ").filter(iF),iD=i_(e=>{if(e.fullName)return e.fullName;let t=[e.firstName,e.middleName,e.lastName].filter(Boolean).join(" ").trim();return t.length?t:void 0},iL),iU=i_(e=>e.firstName?e.firstName.trim():ik(e)[0],iL),iB=i_(e=>{if(e.middleName)return e.middleName.trim();let t=ik(e);return t.length>2?t.slice(1,t.length-1).join(" "):void 0},iL),iG=i_(e=>{if(e.lastName)return e.lastName.trim();let t=ik(e);return t.length>1?iM(t):void 0},iL),iH={[M.FULLNAME]:iD,[M.FIRSTNAME]:iU,[M.MIDDLENAME]:iB,[M.LASTNAME]:iG,[M.TELEPHONE]:ix("phoneNumber"),[M.ORGANIZATION]:ix("organization"),[M.ADDRESS]:ix("streetAddress"),[M.CITY]:ix("city"),[M.STATE]:ix("stateOrProvince"),[M.ZIPCODE]:ix("zipOrPostalCode"),[M.COUNTRY]:ix("countryOrRegion"),[M.EMAIL]:ix("email")},iW=async(e,t,r)=>{let n=new Set,o=e.filter(e=>e.sectionIndex===t.sectionIndex),i=o.findIndex(e=>e===t),a=-1!==i?[...o.slice(i),...o.slice(0,i)]:o;await iS(a,async e=>{let{identityType:t}=e,o=iI(null,F.IDENTITY)(e.autofilled);if(!t||n.has(t)||!o)return;let i=(0,iH[t])(r);i&&await e.autofill(i,{type:F.IDENTITY}),n.add(t)})},i$=((_={})[_.STAGING=0]="STAGING",_[_.COMMITTED=1]="COMMITTED",_),iq=e=>Y(V({type:p.FORM_ENTRY_STASH,payload:{reason:e}})),ij=(e,t)=>{let r=e.userIdentifier.trim(),n=e.password.trim();switch(t.type){case"login":case"register":return!!(t.partial&&r||n);case"password-change":case"noop":return!!n;default:return!1}},iY=e=>"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE&&"tagName"in e,iz=e=>iY(e)&&"INPUT"===e.tagName,iV=["text","email","number","tel","password"],iK=e=>iY(e)&&"FORM"===e.tagName,iZ=new Set(["PICTURE","VIDEO","AUDIO","BUTTON","A","SCRIPT","NOSCRIPT","LINK","OBJECT","IFRAME","svg","g"]),iQ=new Set(["button","link","menuitem","checkbox","radio","switch"]),iX=(o=iN(tR,tE),(...e)=>!o(...e)),iJ=((...e)=>t=>e.every(e=>e(t)))(e=>iz(e)&&iV.includes(e.type),iX),i0=e=>nM(e).some(iN(iX,tw)),i1=iN(e=>nL(e).some(iN(iX,tw)),i0),i5=e=>!(!iY(e)||0===e.childElementCount||e.role&&iQ.has(e.role))&&!iZ.has(e.tagName),i2=e=>t=>iz(t)||iK(t)||iY(t)&&e(t),i6=i2(i5),i3=i2(i0),i4=i2(e=>null!==e.querySelector("form, input")),i8=(e,[t,...r])=>{let n=t$(e,t);return n?r.reduce((e,t)=>null===e?null:t$(e,t),n):null},i9=(e=document)=>{let t=e=>{let r=e.activeElement;return r?r.shadowRoot?t(r.shadowRoot):r:null};return t(e)},i7=e=>!!e&&e===i9(),{DOCUMENT_POSITION_FOLLOWING:ae,DOCUMENT_POSITION_PRECEDING:at,DOCUMENT_POSITION_CONTAINS:ar,DOCUMENT_POSITION_CONTAINED_BY:an}=Node,ao=e=>new Promise(t=>setTimeout(t,e)),ai=function(e,t=[],r=[]){return new e0(e,t,r)}((e=[nG,nY,nW,nq,or,oi,nK,n8,n7,n2].reduce((e,t)=>({rules:[...e.rules,...t.getRules()],coeffs:[...e.coeffs,...t.coeffs],biases:[...e.biases,[t.name,t.bias]]}),{rules:[eK(new eF(to),eY("form-candidate"),{}),eK(new eF("input"),eY("field-candidate"),{}),...r5,eK(eY("form-candidate").when(nh(tk)),eY("form-element"),{}),eK(eY("form-element").when(nh(rZ)),eY("form").note(nD),{}),eK(eY("form-element"),e$("form").through(nl),{}),...oc,eK(eY("field-candidate").when(e=>tk(e.element)&&null!==nd(e)),eY("field").note(e=>{var t,r;let n=e.element,o=no(n),i=nd(e);null===i||i.hasNoteFor("form")||i.setNoteFor("form",nD(i));let a=null==i?void 0:i.noteFor("form"),s=nA(i),l=n.value,u=n.getAttribute("type"),c=n.readOnly,d=n.required,m=na(n.minLength,0),p=na(n.maxLength,250),f=n.pattern,g=n.getAttribute("autocomplete"),h=n.disabled,A="hidden"!==u,y=n.tabIndex,b=!!A&&rQ(n)&&rz(n,{opacity:!1});A&&(b?e=>delete e.__PP_HIDDEN__:tv)(n);let w=b&&e8(rm)(o.fieldAttrs.concat(o.fieldText)),v=A&&null!=(t=null==a?void 0:a.formInputIterator.prev(n))?t:null,_=A&&null!=(r=null==a?void 0:a.formInputIterator.next(n))?r:null;return Object.assign({formFnode:i,formFeatures:a,isFormLogin:s.login,isFormRegister:s.register,isFormPWChange:s.pwChange,isFormRecovery:s.recovery,isFormNoop:s.noop,value:l,visible:b,type:u,readonly:c,required:d,disabled:h,pattern:f,autocomplete:g,minLength:m,maxLength:p,tabIndex:y,prevField:v,nextField:_,searchField:w},o)}),{}),eK(eY("field").when(nS),eY("username-field").note(e=>{let t=e.noteFor("field"),{fieldAttrs:r,fieldText:n,labelText:o,prevField:i}=t,a=e8(t9)(r),s=t8(n),l=t8(o),u=e8(re)(r.concat(n,o)),c=r.concat(n).concat(o),d=u||e8(rt)(c),m=t.isFormLogin;return{autocompleteUsername:Number("username"===t.autocomplete),autocompleteNickname:Number("nickname"===t.autocomplete),autocompleteEmail:Number("email"===t.autocomplete),autocompleteOff:Number("off"===t.autocomplete),attrUsername:Number(a),textUsername:Number(s),labelUsername:Number(l),outlierUsername:Number(d),loginUsername:Number(m&&null===i&&!d),searchField:Number(t.searchField)}}),{}),eK(eY("field").when(nO),eY("username-hidden-field").note(e=>{let t=e.element,r=e.noteFor("field"),{fieldAttrs:n,autocomplete:o}=r,i=e8(t9)(n),a=e8(rt)(n),s=t.matches('[name="username"],[id="username"]'),l=t.readOnly&&rz(t,{opacity:!0})&&"hidden"!==t.type,u=rr(r.value),c=ro(r.value),d=t7(r.value);return{exotic:Number(r.isFormNoop),attrUsername:Number(i),attrEmail:Number(a),usernameAttr:Number(s),autocompleteUsername:Number("username"===o),visibleReadonly:Number(l),hiddenEmailValue:Number(u),hiddenTelValue:Number(c),hiddenUsernameValue:Number(d)}}),{}),eK(eY("field").when(nC),eY("email-field").note(e=>{let t=e.element,r=e.noteFor("field"),{fieldAttrs:n,fieldText:o,labelText:i}=r,a="email"===r.type,s=t.matches('input[name="email"], input[id="email"]'),l=e8(rt)(n),u=rn(o),c=rn(i),d=e8(e3(rr,rn))(t.placeholder.split(" "));return{autocompleteUsername:Number("username"===r.autocomplete),autocompleteNickname:Number("nickname"===r.autocomplete),autocompleteEmail:Number("email"===r.autocomplete),autocompleteOff:Number("off"===r.autocomplete),typeEmail:Number(a),exactAttrEmail:Number(s),attrEmail:Number(l),textEmail:Number(u),labelEmail:Number(c),placeholderEmail:Number(d),searchField:Number(r.searchField)}}),{}),eK(eY("field").when(nT),eY("password-field").note(e=>{var t,r;let n=e.noteFor("field"),{autocomplete:o,fieldAttrs:i,fieldText:a,labelText:s,prevField:l,nextField:u}=n,c=e8(rh)(i),d=e8(rw)(i),m=e8(ry)(i),p=e8(rf)(i),f=rg(a),g=rb(a),h=rA(a),A=rp(a),y=rg(s),b=rb(s),w=rA(s),v=rp(s),_=e8(rv)(i.concat(s,a)),E=l&&"password"===l.getAttribute("type")?l:null,C=u&&"password"===u.getAttribute("type")?u:null,T=E?ni(E):[],R=C?ni(C):[],S=null==E?void 0:E.getAttribute("autocomplete"),O=n6(S)||e8(rb)(T),x="new-password"===S||e8(rg)(T),N=e8(rA)(T),I=null==C?void 0:C.getAttribute("autocomplete"),P=n6(I)||e8(rb)(R),F="new-password"===I||e8(rg)(R),M=e8(rA)(R);return{loginScore:Number(n.isFormLogin),registerScore:Number(n.isFormRegister),pwChangeScore:Number(n.isFormPWChange),exotic:Number(n.isFormNoop),autocompleteNew:Number("new-password"===o),autocompleteCurrent:Number(n6(o)),autocompleteOff:Number("off"===n.autocomplete),isOnlyPassword:null!=(r=null==(t=n.formFeatures)?void 0:t.onePassword)?r:0,prevPwField:Number(null!==E),nextPwField:Number(null!==C),attrCreate:Number(c),attrCurrent:Number(d),attrConfirm:Number(m),attrReset:Number(p),textCreate:Number(f),textCurrent:Number(g),textConfirm:Number(h),textReset:Number(A),labelCreate:Number(y),labelCurrent:Number(b),labelConfirm:Number(w),labelReset:Number(v),passwordOutlier:Number(_),prevPwNew:Number(x),prevPwCurrent:Number(O),prevPwConfirm:Number(N),nextPwNew:Number(F),nextPwCurrent:Number(P),nextPwConfirm:Number(M)}}),{}),eK(eY("field").when(nR),eY("otp-field").note(e=>{var t,r,n,o,i;let a=e.element,s=e.noteFor("field"),{fieldAttrs:l,fieldText:u,labelText:c,prevField:d,nextField:m,type:p,minLength:f,maxLength:g}=s,h=s.formFeatures,A=!!(null==h?void 0:h.formMFA),y=!!(null==h?void 0:h.formOTPOutlier),b=!!(null==h?void 0:h.linkOTPOutlier),w=null==h?void 0:h.visibleInputsCount,v=tj.some(([e,t])=>a.pattern.includes(t)&&e===a.maxLength),_=["code","token","otp","otc","totp"],E=_.some(e=>a.name===e),C=_.some(e=>a.id===e),{area:T,top:R,bottom:S,width:O}=tm(a),x=O<100,N=d?tm(d):null,I=m?tm(m):null,P=x&&d&&(null==d?void 0:d.getAttribute("type"))===p,F=x&&m&&(null==m?void 0:m.getAttribute("type"))===p,M=!!P&&R===(null==N?void 0:N.top)&&S===(null==N?void 0:N.bottom),L=!!P&&T===(null==N?void 0:N.area),k=!!F&&R===(null==I?void 0:I.top)&&S===(null==I?void 0:I.bottom),D=!!F&&T===(null==I?void 0:I.area),U=e8(rT)(l),B=e8(rC)(l),G=e8(rR)(l),H=rT(u),W=rE(u),$=rT(c),q=rE(c),j=rR(c),Y=null!=(n=null==(r=null==(t=null==s?void 0:s.formFnode)?void 0:t.element)?void 0:r.innerText)?n:"",z=[tc(a)(1),tc(a)(2)].flatMap(r8),V=e8(rT)(z),K=e8(rR)(z),Z=(V||U||H||$)&&null!=(i=null==(o=Y.match(/@/g))?void 0:o.length)?i:0;return{formMFA:Number(s.isFormNoop&&A),formOutlier:Number(y),fieldOutlier:Number(K||G||j),linkOutlier:Number(b),emailOutlierCount:Number(Z>1),inputCountOutlier:Number(1!==w&&6!==w),nameMatch:Number(E),idMatch:Number(C),numericMode:Number("numeric"===a.inputMode),patternOTP:Number(v),maxLengthExpected:Number(1===g||6===g),maxLengthInvalid:Number(g>10),maxLength1:Number(1===g),maxLength5:Number(5===g),minLength6:Number(6===f),maxLength6:Number(6===g),autocompleteOTC:Number("one-time-code"===s.autocomplete),siblingOfInterest:Number(M||k),prevAligned:Number(M),prevArea:Number(L),nextAligned:Number(k),nextArea:Number(D),attrOTP:Number(U),textOTP:Number(H),wrapperOTP:Number(V),labelOTP:Number($),attrMFA:Number(B),textMFA:Number(W),labelMFA:Number(q)}}),{}),...n0,eK(eY("field"),e$("field").through(nu),{})],coeffs:[],biases:[]})).rules,e.coeffs,e.biases),aa=document.createElement("form"),as=(e,t)=>(e.get(t.type),Array.from(t.subTypes.reduce((r,n)=>(e.get(n).forEach(e=>{let o=np(e,n),i={type:n,fnode:e,score:o},a=r.get(e);a?r.set(e,t.selectBest([i,a])):r.set(e,i)}),r),new Map).values())),al=([e,t])=>e.score>t.score?e:t,au=e=>{let t=e.find(({type:e})=>e===P.PASSWORD_CHANGE),r=e.find(({type:e})=>e===P.LOGIN),n=e.find(({type:e})=>e===P.REGISTER),o=Math.abs(e[0].score-e[1].score);return t&&n?o<=.01?t:n:r||al(e)},ac=e=>e.Autofill||e.Autofill2FA||e.Autosave||e.AutosuggestAlias||e.AutosuggestPassword,ad=q.runtime.getURL("/assets/protonpass-icon-active.svg"),am=q.runtime.getURL("/assets/protonpass-icon-locked.svg"),ap=q.runtime.getURL("/assets/protonpass-icon-disabled.svg"),af=q.runtime.getURL("/assets/protonpass-icon-counter.svg"),ag=q.runtime.getURL("/dropdown.html"),ah=q.runtime.getURL("/notification.html"),aA={[P.LOGIN]:[{type:F.USERNAME,action:oT.AUTOFILL_LOGIN,filterable:!0},{type:F.USERNAME_HIDDEN},{type:F.EMAIL,action:oT.AUTOFILL_LOGIN,filterable:!0},{type:F.PASSWORD_CURRENT,action:oT.AUTOFILL_LOGIN}],[P.REGISTER]:[{type:F.USERNAME},{type:F.USERNAME_HIDDEN},{type:F.EMAIL,action:oT.AUTOSUGGEST_ALIAS},{type:F.PASSWORD_NEW,action:oT.AUTOSUGGEST_PASSWORD},{type:F.IDENTITY,action:oT.AUTOFILL_IDENTITY}],[P.RECOVERY]:[{type:F.EMAIL,action:oT.AUTOFILL_LOGIN},{type:F.IDENTITY,action:oT.AUTOFILL_IDENTITY}],[P.PASSWORD_CHANGE]:[{type:F.PASSWORD_CURRENT,action:oT.AUTOFILL_LOGIN},{type:F.PASSWORD_NEW,action:oT.AUTOSUGGEST_PASSWORD}],[P.NOOP]:[{type:F.EMAIL,action:oT.AUTOSUGGEST_ALIAS},{type:F.PASSWORD_CURRENT,action:oT.AUTOFILL_LOGIN},{type:F.PASSWORD_NEW,action:oT.AUTOSUGGEST_PASSWORD},{type:F.IDENTITY,action:oT.AUTOFILL_IDENTITY}]},ay=(e,t=250)=>{e.preventAction=!0,setTimeout(()=>e.preventAction=!1,t)},ab=["disabled","aria-disabled","aria-busy","readonly"],aw=e=>ab.some(t=>e.hasAttribute(t)&&"false"!==e.getAttribute(t)),av=e=>{let t=e.parentElement;return!!t&&(aw(t)||av(t))},a_=e=>{let t;return e===document.body||null===e?document.body:"auto"===(t=window.getComputedStyle(e)).overflowY||"scroll"===t.overflowY?e:a_(e.parentElement)},aE=(e,t)=>{let r=e.parentElement;if(t?.has(e)){let n=t.get(e);if(null!==n)return n;if(null===n&&r)return aE(r,t)}let[n,o]=(e=>{let t=e.parentElement,{zIndex:r,position:n,containerType:o}=getComputedStyle(e),i=parseInt(r,10),a=isNaN(i)?0:i,s=""!==r&&"auto"!==r;if(null===t||s&&("absolute"===n||"relative"===n)||"fixed"===n||"sticky"===n||"size"===o||"inline-size"===o)return[!0,a];let{display:l}=getComputedStyle(t);return s&&("flex"===l||"grid"===l)?[!0,a]:[!1,null]})(e);return(t?.set(e,n?o:null),n)?o:r?aE(r,t):0},aC=e=>(...t)=>{try{return e?.(...t)}catch{}},aT=((E={}).AUTHORIZED="AUTHORIZED",E.AUTHORIZING="AUTHORIZING",E.BOOTING="BOOTING",E.ERROR="ERROR",E.IDLE="IDLE",E.OFFLINE="OFFLINE",E.PASSWORD_LOCKED="PASSWORD_LOCKED",E.BIOMETRICS_LOCKED="BIOMETRICS_LOCKED",E.READY="READY",E.SESSION_LOCKED="SESSION_LOCKED",E.UNAUTHORIZED="UNAUTHORIZED",E.MISSING_SCOPE="MISSING_SCOPE",E),aR=iP(aT.AUTHORIZED),aS=iP(aT.ERROR);iP(aT.OFFLINE);let aO=iI(aT.PASSWORD_LOCKED,aT.BIOMETRICS_LOCKED);iP(aT.READY);let ax=iP(aT.SESSION_LOCKED),aN=iP(aT.IDLE),aI=iP(aT.UNAUTHORIZED),aP=iP(aT.MISSING_SCOPE);iI(aT.IDLE,aT.AUTHORIZED,aT.AUTHORIZING,aT.BOOTING);let aF=iI(aT.READY,aT.OFFLINE);iN(aR,aI,aS);let aM=iN(aF,ax,aO),aL=iN(aS,aI,aP);iN(aM,aL);let ak=iN(aI,aS,aN),aD=iN(ax,aO,aP),aU=e=>{let t=getComputedStyle(e);return(e,r)=>{let n=t.getPropertyValue(e);return r?.(n)??n}},aB=e=>parseInt(e.replace("px",""),10),aG=e=>`${e}px`,aH=(e,{node:t,mode:r})=>{let n="content-box"===e("box-sizing"),o=e("height",e=>"auto"!==e&&e?aB(e):t.offsetHeight),i=e("padding-top",aB),a=e("padding-bottom",aB),s=e("border-top",aB),l=e("border-bottom",aB),u=i+s+a+l;return{value:n?o+("outer"===r?u:0):o-("inner"===r?u:0),offset:{top:"outer"===r?0:i+s,bottom:"outer"===r?0:a+l}}},aW=(e,t)=>e.reduce(([e,r],n)=>{let o,i;if(!e)return[e,r];let a=n.getBoundingClientRect(),{height:s,width:l}=a;if(s<=0||l<=0)return[e,r];let u={top:a.top-t.y,right:a.right+t.x,bottom:a.bottom+t.y,left:a.left-t.x};return null===r?[!0,u]:[e&&(o=Math.max(0,Math.floor(Math.min(u.right,r.right)-Math.max(u.left,r.left))),i=Math.max(0,Math.floor(Math.min(u.bottom,r.bottom)-Math.max(u.top,r.top))),o>0&&i>0),{top:Math.floor(Math.min(r.top,u.top)),right:Math.floor(Math.max(r.right,u.right)),bottom:Math.floor(Math.max(r.bottom,u.bottom)),left:Math.floor(Math.min(r.left,u.left))}]},[!0,null])[0],a$={x:10,y:0},aq=["TD","TR","FORM"],aj=e=>[...e.children].filter(e=>!e.tagName.startsWith("PROTONPASS")),aY=(e,t)=>{let r,{input:n,minHeight:o,maxWidth:i}=t=t??(()=>{let{height:t,width:r}=e.getBoundingClientRect();return{input:e,minHeight:t,maxWidth:1.2*r}})(),a=e===n;if(a){if(0!==aB(getComputedStyle(n).borderBottomWidth))return n;let e=n.closest("label");if(e&&1===e.querySelectorAll('input:not([type="hidden"])').length){let t=e.getBoundingClientRect().height>=o,r=aW(aj(e),a$);if(t&&r)return e}}let s=getComputedStyle(e);if(!a){let t=aB(s.paddingBottom),r=aB(s.paddingTop);if(t>1||r>1)return e}let l=aB(s.marginBottom),u=aB(s.marginTop);if(l>1||u>1)return e;let c=e.parentElement;if(aq.includes(c.tagName))return e;let{height:d,width:m}=c.getBoundingClientRect();if(!d||d<o||m>i||[...c.childNodes].some(e=>e.nodeType===Node.TEXT_NODE&&e.nodeValue?.trim()!==""))return e;if("none"!==(r=getComputedStyle(c)).boxShadow||[aB(r.borderTopWidth),aB(r.borderRightWidth),aB(r.borderBottomWidth),aB(r.borderLeftWidth)].every(e=>e>0)&&"none"!==r.borderTopStyle&&"none"!==r.borderRightStyle&&"none"!==r.borderBottomStyle&&"none"!==r.borderLeftStyle)return c;let p=aH(aU(c),{mode:"inner",node:c});if(!a&&p.value>1.2*e.offsetHeight)return e;let f=aj(c);return 1===f.length||aW(f,a$)?aY(c,t):e};var az=r(55377),aV=r.n(az),aK=r(14299);let aZ=e=>{let t=document.createElement(e.type);return e.classNames?.forEach(e=>t.classList.add(e)),e.attributes&&Object.entries(e.attributes).forEach(([e,r])=>t.setAttribute(e,r)),e.parent&&e.parent.appendChild(t),t},aQ=e=>{let t=document.createElement(e.type),r=t.attachShadow({mode:"closed"});if(((e,...t)=>{})(0,e.type,r),e.classNames?.forEach(e=>t.classList.add(e)),e.attributes&&Object.entries(e.attributes).forEach(([e,r])=>{t.setAttribute(e,r)}),e.styles){let t=new CSSStyleSheet;t.replaceSync(e.styles),(r?.wrappedJSObject??r).adoptedStyleSheets.push(t)}return e.parent&&e.parent.appendChild(t),{customElement:t,shadowRoot:r}},aX=e=>{let t;Object.entries((t=e.getAttribute(o_))?JSON.parse(t):{}).forEach(([t,r])=>r?e.style.setProperty(t,r):e.style.removeProperty(t)),e.removeAttribute(o_)},aJ=({control:e,input:t})=>{e.style.removeProperty("float"),e.style.removeProperty("max-width"),e.style.removeProperty("margin-left"),aX(t)},a0=1e3/24,a1=e=>{e.set();let{top:t,left:r,right:n,bottom:o}=e.get(),i=0,a=()=>e.onAnimate(requestAnimationFrame(s=>{if(s-i>=a0){i=s;let{top:l,left:u,right:c,bottom:d}=e.get();(l!==t||u!==r||c!==n||d!==o)&&(e.set(),t=l,r=u,n=c,o=d,a())}else a()}));return a()},a5=({element:e,fieldType:t,zIndex:r,getFormHandle:n})=>{let o=om(),i={fieldType:t,element:e,boxElement:aY(e),icon:null,action:null,value:e.value,autofilled:null,tracked:!1,zIndex:r,getFormHandle:n,getBoxElement:t=>(t?.reflow&&(i.boxElement=aY(e)),i.boxElement),setValue:e=>(i.autofilled=null,i.value=e),setAction:e=>i.action=e,focus(e){let t=i7(i.element);if(e?.preventAction&&ay(i.element),i.element.focus(),t){let e=new FocusEvent("focus",{bubbles:!0,cancelable:!0,relatedTarget:null});return i.element.dispatchEvent(e)}},autofill:async(t,r)=>{let n;await ((e,t,r=250)=>(...n)=>(ay(e,r),t(...n)))(e,(n=async(t,r)=>{let n=async t=>{await iS(t,async t=>e.dispatchEvent(t)).catch(G)};if("function"==typeof e?.click&&e.click(),e===document.activeElement?await n([new FocusEvent("focusin"),new FocusEvent("focus")]):e.focus(),r?.paste){let e=new DataTransfer;e.setData("text/plain",t),await n([new ClipboardEvent("paste",{bubbles:!0,cancelable:!0,clipboardData:e})])}else e.value=t,await n([new KeyboardEvent("keydown",{bubbles:!0}),new KeyboardEvent("keypress",{bubbles:!0}),new KeyboardEvent("keyup",{bubbles:!0})]),e.value!==t&&(e.value=t),await n([new Event("input",{bubbles:!0}),new Event("change",{bubbles:!0})]);e===document.activeElement?e.blur():await n([new FocusEvent("focusout"),new FocusEvent("blur")])},async(...e)=>{try{return await n?.(...e)}catch{}}))(t,r),i.autofilled=r?.type??i.fieldType},attachIcon:m((e,{count:t})=>{if(e)return i.icon||e.service.formManager.getTrackedForms().forEach(e=>e.getFields().forEach(e=>e.detachIcon())),i.icon=i.icon??(({field:e,elements:t})=>{var r;let n,o,i,a,s,l=om(),u={request:-1,animate:-1},c=e.element,{icon:d,control:p}=(r=t.control,n=e.element,o=e.boxElement,i=aQ({type:r,styles:aK.A}),(a=aZ({type:"button",classNames:[]})).tabIndex=-1,a.style.zIndex=e.zIndex.toString(),a.setAttribute("type","button"),s={icon:a,control:i.customElement,input:n,inputBox:o,form:e.getFormHandle().element},n!==o?o.insertBefore(i.customElement,o.firstElementChild):n.parentElement.insertBefore(i.customElement,n),i.shadowRoot.appendChild(a),s),f=e=>{let t=aD(e)?am:ak(e)?ap:ad;d.style.setProperty("background-image",`url("${t}")`,"important")},g=m((e,t)=>{if(!e)return;let r=0!==t&&t?String(t):"";if(d.style.setProperty("--control-count",`"${r}"`),t>0)return d.style.setProperty("background-image",`url("${af}")`,"important");f(e?.getState().status)}),h=()=>{cancelAnimationFrame(u.request),cancelAnimationFrame(u.animate)},A=(t=!1)=>{h();let r=e.getBoxElement({reflow:t}),n=e.getFormHandle().element;u.request=requestAnimationFrame(()=>{a1({onAnimate:e=>u.animate=e,get:()=>e.element.getBoundingClientRect(),set:()=>{aJ({input:c,control:p}),(e=>{let{input:t,inputBox:r}=e;aX(t),((e,t)=>{let{icon:r,input:n}=e,o=(({input:e,control:t,form:r},{getInputStyle:n,getBoxStyle:o,inputBox:i})=>{((...e)=>{e.forEach(e=>{let t=e.style.transform;e.style.transform="translateZ(0)",e.offsetHeight,e.style.transform=t})})(e,t);let{right:a,top:s,height:l}=e.getBoundingClientRect(),{top:u,height:c}=i.getBoundingClientRect(),{top:d,right:m}=t.getBoundingClientRect(),p=i!==e,{value:f,offset:g}=aH(o,{node:i,mode:p?"inner":"outer"}),h=Math.max(Math.min(c-8,28),16),A=n("padding-left",aB),y=n("padding-right",aB),b=h/5,w=Math.max(Math.min(A,y)/1.5,b),v=(e=>{try{let{x:t,y:r,form:n,input:o,inputBox:i}=e,a=i.offsetWidth,s=.5*a;if(Number.isNaN(t)||Number.isNaN(r))return 0;let l=document.elementsFromPoint(t,r),u=0;for(let e of l){if(e===o||e===i)break;if(!iY(e)||e.tagName.startsWith("PROTONPASS")||!n.contains(e)||e.matches("svg *")||(e.innerText?.length??0)>0&&(e.offsetWidth??0)>=.8*a)continue;let r=getComputedStyle(e);if("none"===r.display||"hidden"===r.visibility)continue;let{left:l}=e.getBoundingClientRect(),c=Math.max(0,t-l);c>u&&c<s&&(u=c)}return u}catch(e){return 0}})({x:a-(w+h/2),y:s+l/2,inputBox:i,input:e,form:r});v=0!==v?v+b+h/2:0;let _=Math.max(y,h+b+w+v),E=u-d+g.top+(f-h)/2,C=m-a+w+v;return{input:{paddingRight:aG(_)},icon:{top:aG(E),right:aG(C),size:aG(h),fontSize:h/2.5}}})(e,t),{transition:i,animation:a}=n.style;n.style.setProperty("transition","none"),n.style.setProperty("animation","none");let s=n.getBoundingClientRect().width;r.style.top=o.icon.top,r.style.right=o.icon.right,r.style.width=o.icon.size,r.style.height=o.icon.size,r.style.setProperty("--control-lineheight",o.icon.size),r.style.setProperty("--control-fontsize",aG(o.icon.fontSize)),n.setAttribute(o_,JSON.stringify({"padding-right":n.style.paddingRight})),n.style.setProperty("padding-right",o.input.paddingRight,"important"),n.getBoundingClientRect().width!==s&&(n.style.removeProperty("padding-right"),n.style.setProperty("padding-right",n.style.paddingRight)),requestAnimationFrame(()=>{n.style.setProperty("transition",i),n.style.setProperty("animation",a)})})(e,{inputBox:r,getInputStyle:aU(t),getBoxStyle:aU(r)})})({icon:d,control:p,input:c,inputBox:r,form:n})}})})},y=m((t,r)=>{if(d.setPointerCapture(r.pointerId),r.preventDefault(),r.stopPropagation(),!e.action||!t)return;let n=t.service.iframe,o=n.dropdown?.getState().visible,i=n.dropdown?.getCurrentField();if(o)return e===i&&(ay(e.element),e.element.focus()),n.dropdown?.close();ax(t.getState().status)&&(ay(e.element),e.element.blur()),n?.attachDropdown(e.getFormHandle().element)?.open({action:e.action.type,field:e})}),b=aC(()=>{l.removeAll(),h(),aJ({input:c,control:p}),d.remove(),p.remove()}),w=e.element===e.boxElement?e.element.parentElement:e.boxElement;return l.addListener(d,"pointerdown",y),l.addListener(d,"pointerup",e=>{d.releasePointerCapture(e.pointerId),e.preventDefault(),e.stopPropagation()}),l.addListener(window,"resize",()=>A(!1)),l.addResizeObserver(w,()=>A(!1)),l.addObserver(w,()=>{A(!0)},{childList:!0,subtree:!0}),A(!0),{element:d,setStatus:f,setCount:g,detach:b,reposition:A}})({field:i,elements:e.elements}),i.icon.setCount(t),i.icon}),detachIcon(){i.icon?.detach(),i.icon=null},attach({onChange:e,onSubmit:t}){let r;i.tracked=!0,o.removeAll(),o.addListener(i.element,"blur",m((e,t)=>{if(!0!==i.element.preventAction){let t=e?.service.iframe.dropdown,r=t?.getState().visible;t?.getCurrentField()===i&&r||i.detachIcon()}})),o.addListener(i.element,"focus",m(e=>{let{action:t,element:r}=i;e&&t&&requestAnimationFrame(async()=>{if(!0===r.preventAction)return;let{formType:n}=i.getFormHandle(),o=n===P.LOGIN?await e?.service.autofill.getCredentialsCount()??0:0;i.attachIcon({count:o});let a=e?.service.iframe.dropdown,s=a?.getCurrentField(),l=s?.element,u=a?.getState().visible,c=ax(e.getState().status),d=u&&!i7(l),m=e?.getState().authorized&&(!u||d);(d||c)&&a?.close(),m&&e?.service.iframe.attachDropdown(i.getFormHandle().element)?.open({action:t.type,autofocused:!0,field:i})})})),o.addListener(i.element,"input",i_((r=aV()(m((e,t)=>{e?.service.iframe.dropdown?.sendMessage({type:oR.AUTOFILL_FILTER,payload:{startsWith:t}})}),250,{trailing:!0}),m(e=>{let t=e?.service.iframe.dropdown,{action:n,element:o}=i,{value:a}=i.element;t&&t.getState().visible&&(!0===o.preventAction||n?.filterable?n?.filterable&&r(a):t.close()),i.setValue(a)})),e)),o.addListener(i.element,"keydown",i_(({key:e})=>"Enter"===e&&t(),e)),o.addResizeObserver(i.element,()=>i.icon?.reposition(!1)),o.addObserver(i.element,m((e,t)=>{[F.PASSWORD_CURRENT,F.PASSWORD_NEW].includes(i.fieldType)||t.forEach(t=>{let r=t.target;"attributes"===t.type&&t.oldValue!==r.type&&(i.getFormHandle().detachField(t.target),e?.service.formManager.detect({reason:"FieldTypeChange"}))})}),{attributeFilter:["type"],attributeOldValue:!0})},detach:()=>{i.tracked=!1,i.detachIcon(),o.removeAll()}};return i},a2=["type","id","name"],a6=["style","class",...a2],a3=e=>({childList:!0,subtree:!0,attributeFilter:e,attributes:!0,attributeOldValue:!0});var a4=r(53616);let a8=aC(e=>{if(e.assignedSlot)return e.assignedSlot;let t=e.parentElement;for(;t;){if(t.assignedSlot)return t.assignedSlot;t=t.parentElement}}),a9="popover"in HTMLElement.prototype,a7=(e,t)=>aC(()=>e.matches(t))()??!1,se=e=>aC(()=>Array.from(document.querySelectorAll(e)))()??[],st=(i=se(":popover-open"),a=se(":modal"),s=new Set(i.concat(a)),(l=om()).addListener(document,"toggle",({target:e})=>{e&&iY(e)&&(e instanceof HTMLDialogElement||e.hasAttribute("popover"))&&((a7(e,":modal")||a7(e,":popover-open"))&&document.contains(e)?s.add(e):s.delete(e))},{capture:!0}),l.addObserver(document.body,e=>{for(let{removedNodes:t}of e)for(let e of t)iY(e)&&s.delete(e)},{childList:!0,subtree:!0}),{disconnect:()=>l.removeAll(),ensureTopLevel:e=>{if(a9){let t=st.elements;if(t.findIndex(iP(e))!==t.length-1)return!1}return!0},get elements(){return Array.from(s)}}),sr=aC(e=>e.showPopover()),sn=aC(e=>e.hidePopover()),so=(e,t)=>{let r=e.root;return{root:r,open:()=>{t?(r.customElement.setAttribute("popover","manual"),sr(r.customElement)):r.customElement.removeAttribute("popover")},close:()=>{if(t){let{dropdown:t,notification:n}=e;t?.getState().visible&&n?.getState().visible||sn(r.customElement)}}}},si=((C={}).LIME="ui-lime",C.ORANGE="ui-orange",C.RED="ui-red",C.TEAL="ui-teal",C.VIOLET="ui-violet",C.PURPLE="ui-purple",C.GRAY="ui-gray",C);si.TEAL,si.LIME,si.VIOLET,si.ORANGE,si.PURPLE,si.GRAY,si.GRAY,si.GRAY;let sa=((T={})[T.PassDark=8]="PassDark",T[T.PassLight=12]="PassLight",T.OS="OS",T);sa.PassDark,sa.PassLight,sa.OS;let ss=((R={}).LoginAutofillTelemetry="LoginAutofillTelemetry",R.PassBasicAuthAutofill="PassBasicAuthAutofill",R.PassContentScriptPopoverKillSwitch="PassContentScriptPopoverKillSwitch",R.PassCustomTypeV1="PassCustomTypeV1",R.PassEnableDesktopAutoUpdate="PassEnableDesktopAutoUpdate",R.PassExperimentalWebsiteRules="PassExperimentalWebsiteRules",R.PassExtensionCustomTLDs="PassExtensionCustomTLDs",R.PassHideShowVault="PassHideShowVault",R.PassItemCloning="PassItemCloning",R.PassProtonAnniversaryPromo2025="PassProtonAnniversaryPromo2025",R.PassRenameAdminToManager="PassRenameAdminToManager",R.PassWebInternalAlpha="PassWebInternalAlpha",R.PassWebPrfUnlock="PassWebPrfUnlock",R.PassDesktopAutotype="PassDesktopAutotype",R);Object.values(ss),ss.LoginAutofillTelemetry,ss.PassBasicAuthAutofill,ss.PassEnableDesktopAutoUpdate,ss.PassExperimentalWebsiteRules,ss.PassExtensionCustomTLDs,ss.PassHideShowVault,ss.PassItemCloning,ss.PassProtonAnniversaryPromo2025,ss.PassRenameAdminToManager,ss.PassWebInternalAlpha,ss.PassWebPrfUnlock;let sl=sa.OS;new Date("2025-05-28T12:00:00+01:00").getTime();let su=(e,t,r=5e3)=>{let n,o,i="function"==typeof e?e:e.check,a="function"==typeof e?void 0:e.cancel,s=()=>{clearTimeout(n),clearInterval(o)};return new Promise((e,l)=>a?.()?l():i()?e():void(n=setTimeout(()=>l(s()),r),o=setInterval(()=>{if(a?.())return l(s());i()&&e(s())},t)))},sc=({animation:e,backdropClose:t,classNames:r=[],id:n,popover:o,src:i,backdropExclude:a,onClose:s,onDestroy:l,onError:u,onOpen:c,position:d,dimensions:f})=>{let g=new Map,h={action:null,framePort:null,loaded:!1,port:null,position:{top:-1,left:-1,right:-1,bottom:-1},positionReq:-1,ready:!1,visible:!1},A=m(e=>!!e?.getState().stale),y=()=>su({check:()=>h.loaded,cancel:A},50),b=()=>su({check:()=>h.ready,cancel:A},50),w=om(),v=om(),_=aZ({type:"iframe",classNames:r,attributes:{src:i},parent:o.root.shadowRoot});_.style.setProperty("--frame-animation",e);let E=w.addListener(window,"message",e=>{"PassIFrameReady"===e.data.type&&e.data.endpoint===n&&(h.loaded=!0,E())}),C=e=>{let t={...e,sender:"contentscript"};return b().then(()=>h.port?.postMessage({forwardTo:h.framePort,payload:t,sender:t.sender,type:p.PORT_FORWARDING_MESSAGE,version:"1.33.1"})).catch(e=>u?.(e))},T=(e,t,r)=>(g.set(e,i=>{i?.type===e&&i.sender===n&&(!r?.userAction||st.ensureTopLevel(o.root.customElement)?t(i):H.warn(`[IFrame::${n}] Untrusted user action`))}),()=>g.delete(e)),R=({width:e,height:t})=>{_.style.setProperty("--frame-width",aG(e)),_.style.setProperty("--frame-height",aG(t))},S=()=>{cancelAnimationFrame(h.positionReq),h.positionReq=requestAnimationFrame(()=>(e=>{h.position=e;let{top:t,left:r,right:n}=e;_.style.setProperty("--frame-top",t?aG(t):"unset"),_.style.setProperty("--frame-left",r?aG(r):"unset"),_.style.setProperty("--frame-right",n?aG(n):"unset")})(d(o.root.customElement)))},O=(e={})=>{h.visible&&(cancelAnimationFrame(h.positionReq),v.removeAll(),o.close(),s?.(h,e),_.classList.remove("visible"),h.visible=!1,h.action=null,C({type:oR.IFRAME_HIDDEN}))},x=e=>K(e)&&"type"in e&&"string"==typeof e.type&&g.get(e.type)?.(e),N=async(e,t)=>{let r;h.port?.disconnect(),h.port=e,h.port.onMessage.addListener(x),h.port.onDisconnect.addListener(()=>h.ready=!1),(r={type:oR.IFRAME_INJECT_PORT,payload:{port:e.name}},Y.onSuccess(V({type:p.RESOLVE_EXTENSION_KEY}),({key:e})=>y().then(()=>{let t={...r,key:e,sender:"contentscript"};_.contentWindow?.postMessage(t,i)}).catch(e=>u?.(e)))).then(()=>C({type:oR.IFRAME_INIT,payload:t()}))};return T(oR.IFRAME_CONNECTED,({payload:{framePort:e}})=>{h.ready=!0,h.framePort=e}),T(oR.IFRAME_CLOSE,e=>{O(e.payload),ox(oO.ExtensionUsed,{},{modelVersion:"0"})}),T(oR.IFRAME_DIMENSIONS,e=>{let{width:t,height:r}=iA(f(h),{height:e.payload.height});return R({width:t,height:r})}),{element:_,state:h,close:O,destroy:()=>{l?.(),O({discard:!1,refocus:!1}),w.removeAll(),v.removeAll(),h.port?.onMessage.removeListener(x),aC(()=>o.root.shadowRoot.removeChild(_))(),h.port=null},ensureLoaded:y,ensureReady:b,getPosition:()=>h.position,init:N,open:(e,r)=>{h.visible||(o.open(),h.action=e,h.visible=!0,v.addListener(window,"resize",S),v.addListener(window,"scroll",S),v.addListener(r,"scroll",S),t&&v.addListener(window,"mousedown",e=>{let t=e.target;t&&a?.().includes(t)||O({discard:!0,refocus:!1})}),C({type:oR.IFRAME_OPEN}),_.classList.add("visible"),R(f(h)),S(),c?.(h))},registerMessageHandler:T,sendPortMessage:C,updatePosition:S}};function sd(e){return(sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var sm=/^\s+/,sp=/\s+$/;function sf(e,t){if(t=t||{},(e=e||"")instanceof sf)return e;if(!(this instanceof sf))return new sf(e,t);var r,n,o,i,a,s,l,u,c,d,m,p,f,g,h,A,y,b,w,v,_=(n={r:0,g:0,b:0},o=1,i=null,a=null,s=null,l=!1,u=!1,"string"==typeof(r=e)&&(r=function(e){e=e.replace(sm,"").replace(sp,"").toLowerCase();var t,r=!1;if(sI[e])e=sI[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=sG.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=sG.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=sG.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=sG.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=sG.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=sG.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=sG.hex8.exec(e))?{r:sk(t[1]),g:sk(t[2]),b:sk(t[3]),a:sk(t[4])/255,format:r?"name":"hex8"}:(t=sG.hex6.exec(e))?{r:sk(t[1]),g:sk(t[2]),b:sk(t[3]),format:r?"name":"hex"}:(t=sG.hex4.exec(e))?{r:sk(t[1]+""+t[1]),g:sk(t[2]+""+t[2]),b:sk(t[3]+""+t[3]),a:sk(t[4]+""+t[4])/255,format:r?"name":"hex8"}:!!(t=sG.hex3.exec(e))&&{r:sk(t[1]+""+t[1]),g:sk(t[2]+""+t[2]),b:sk(t[3]+""+t[3]),format:r?"name":"hex"}}(r)),"object"==sd(r)&&(sH(r.r)&&sH(r.g)&&sH(r.b)?(c=r.r,d=r.g,m=r.b,n={r:255*sM(c,255),g:255*sM(d,255),b:255*sM(m,255)},l=!0,u="%"===String(r.r).substr(-1)?"prgb":"rgb"):sH(r.h)&&sH(r.s)&&sH(r.v)?(i=sU(r.s),a=sU(r.v),p=r.h,f=i,g=a,p=6*sM(p,360),f=sM(f,100),g=sM(g,100),h=Math.floor(p),A=p-h,y=g*(1-f),b=g*(1-A*f),w=g*(1-(1-A)*f),n={r:255*[g,b,y,y,w,g][v=h%6],g:255*[w,g,g,b,y,y][v],b:255*[y,y,w,g,g,b][v]},l=!0,u="hsv"):sH(r.h)&&sH(r.s)&&sH(r.l)&&(i=sU(r.s),s=sU(r.l),n=function(e,t,r){var n,o,i;function a(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=sM(e,360),t=sM(t,100),r=sM(r,100),0===t)n=o=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=a(l,s,e+1/3),o=a(l,s,e),i=a(l,s,e-1/3)}return{r:255*n,g:255*o,b:255*i}}(r.h,i,s),l=!0,u="hsl"),r.hasOwnProperty("a")&&(o=r.a)),o=sF(o),{ok:l,format:r.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o});this._originalInput=e,this._r=_.r,this._g=_.g,this._b=_.b,this._a=_.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||_.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=_.ok}function sg(e,t,r){var n,o,i=Math.max(e=sM(e,255),t=sM(t,255),r=sM(r,255)),a=Math.min(e,t,r),s=(i+a)/2;if(i==a)n=o=0;else{var l=i-a;switch(o=s>.5?l/(2-i-a):l/(i+a),i){case e:n=(t-r)/l+6*(t<r);break;case t:n=(r-e)/l+2;break;case r:n=(e-t)/l+4}n/=6}return{h:n,s:o,l:s}}function sh(e,t,r){var n,o=Math.max(e=sM(e,255),t=sM(t,255),r=sM(r,255)),i=Math.min(e,t,r),a=o-i;if(o==i)n=0;else{switch(o){case e:n=(t-r)/a+6*(t<r);break;case t:n=(r-e)/a+2;break;case r:n=(e-t)/a+4}n/=6}return{h:n,s:0===o?0:a/o,v:o}}function sA(e,t,r,n){var o=[sD(Math.round(e).toString(16)),sD(Math.round(t).toString(16)),sD(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function sy(e,t,r,n){return[sD(sB(n)),sD(Math.round(e).toString(16)),sD(Math.round(t).toString(16)),sD(Math.round(r).toString(16))].join("")}function sb(e,t){t=0===t?0:t||10;var r=sf(e).toHsl();return r.s-=t/100,r.s=sL(r.s),sf(r)}function sw(e,t){t=0===t?0:t||10;var r=sf(e).toHsl();return r.s+=t/100,r.s=sL(r.s),sf(r)}function sv(e){return sf(e).desaturate(100)}function s_(e,t){t=0===t?0:t||10;var r=sf(e).toHsl();return r.l+=t/100,r.l=sL(r.l),sf(r)}function sE(e,t){t=0===t?0:t||10;var r=sf(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-(t/100*255)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-(t/100*255)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-(t/100*255)))),sf(r)}function sC(e,t){t=0===t?0:t||10;var r=sf(e).toHsl();return r.l-=t/100,r.l=sL(r.l),sf(r)}function sT(e,t){var r=sf(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,sf(r)}function sR(e){var t=sf(e).toHsl();return t.h=(t.h+180)%360,sf(t)}function sS(e,t){if(isNaN(t)||t<=0)throw Error("Argument to polyad must be a positive number");for(var r=sf(e).toHsl(),n=[sf(e)],o=360/t,i=1;i<t;i++)n.push(sf({h:(r.h+i*o)%360,s:r.s,l:r.l}));return n}function sO(e){var t=sf(e).toHsl(),r=t.h;return[sf(e),sf({h:(r+72)%360,s:t.s,l:t.l}),sf({h:(r+216)%360,s:t.s,l:t.l})]}function sx(e,t,r){t=t||6,r=r||30;var n=sf(e).toHsl(),o=360/r,i=[sf(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,i.push(sf(n));return i}function sN(e,t){t=t||6;for(var r=sf(e).toHsv(),n=r.h,o=r.s,i=r.v,a=[],s=1/t;t--;)a.push(sf({h:n,s:o,v:i})),i=(i+s)%1;return a}sf.prototype={isDark:function(){return 128>this.getBrightness()},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return .2126*((e=n.r/255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*((t=n.g/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((r=n.b/255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=sF(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=sh(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=sh(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=sg(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=sg(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return sA(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t,r,n,o,i;return t=this._r,r=this._g,n=this._b,o=this._a,i=[sD(Math.round(t).toString(16)),sD(Math.round(r).toString(16)),sD(Math.round(n).toString(16)),sD(sB(o))],e&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*sM(this._r,255))+"%",g:Math.round(100*sM(this._g,255))+"%",b:Math.round(100*sM(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*sM(this._r,255))+"%, "+Math.round(100*sM(this._g,255))+"%, "+Math.round(100*sM(this._b,255))+"%)":"rgba("+Math.round(100*sM(this._r,255))+"%, "+Math.round(100*sM(this._g,255))+"%, "+Math.round(100*sM(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(sP[sA(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+sy(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=sf(e);r="#"+sy(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return!t&&n&&("hex"===e||"hex6"===e||"hex3"===e||"hex4"===e||"hex8"===e||"name"===e)?"name"===e&&0===this._a?this.toName():this.toRgbString():("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return sf(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(s_,arguments)},brighten:function(){return this._applyModification(sE,arguments)},darken:function(){return this._applyModification(sC,arguments)},desaturate:function(){return this._applyModification(sb,arguments)},saturate:function(){return this._applyModification(sw,arguments)},greyscale:function(){return this._applyModification(sv,arguments)},spin:function(){return this._applyModification(sT,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(sx,arguments)},complement:function(){return this._applyCombination(sR,arguments)},monochromatic:function(){return this._applyCombination(sN,arguments)},splitcomplement:function(){return this._applyCombination(sO,arguments)},triad:function(){return this._applyCombination(sS,[3])},tetrad:function(){return this._applyCombination(sS,[4])}},sf.fromRatio=function(e,t){if("object"==sd(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&("a"===n?r[n]=e[n]:r[n]=sU(e[n]));e=r}return sf(e,t)},sf.equals=function(e,t){return!!e&&!!t&&sf(e).toRgbString()==sf(t).toRgbString()},sf.random=function(){return sf.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},sf.mix=function(e,t,r){r=0===r?0:r||50;var n=sf(e).toRgb(),o=sf(t).toRgb(),i=r/100;return sf({r:(o.r-n.r)*i+n.r,g:(o.g-n.g)*i+n.g,b:(o.b-n.b)*i+n.b,a:(o.a-n.a)*i+n.a})},sf.readability=function(e,t){var r=sf(e),n=sf(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},sf.isReadable=function(e,t,r){var n,o,i,a,s,l=sf.readability(e,t);switch(s=!1,(o=((n=(n=r)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),i=(n.size||"small").toLowerCase(),"AA"!==o&&"AAA"!==o&&(o="AA"),"small"!==i&&"large"!==i&&(i="small"),a={level:o,size:i}).level+a.size){case"AAsmall":case"AAAlarge":s=l>=4.5;break;case"AAlarge":s=l>=3;break;case"AAAsmall":s=l>=7}return s},sf.mostReadable=function(e,t,r){var n,o,i,a,s=null,l=0;o=(r=r||{}).includeFallbackColors,i=r.level,a=r.size;for(var u=0;u<t.length;u++)(n=sf.readability(e,t[u]))>l&&(l=n,s=sf(t[u]));return sf.isReadable(e,s,{level:i,size:a})||!o?s:(r.includeFallbackColors=!1,sf.mostReadable(e,["#fff","#000"],r))};var sI=sf.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},sP=sf.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(sI);function sF(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function sM(e,t){"string"==typeof(r=e)&&-1!=r.indexOf(".")&&1===parseFloat(r)&&(e="100%");var r,n,o="string"==typeof(n=e)&&-1!=n.indexOf("%");return(e=Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(e*t,10)/100),1e-6>Math.abs(e-t))?1:e%t/parseFloat(t)}function sL(e){return Math.min(1,Math.max(0,e))}function sk(e){return parseInt(e,16)}function sD(e){return 1==e.length?"0"+e:""+e}function sU(e){return e<=1&&(e=100*e+"%"),e}function sB(e){return Math.round(255*parseFloat(e)).toString(16)}var sG=(O="[\\s|\\(]+("+(S="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+S+")[,|\\s]+("+S+")\\s*\\)?",x="[\\s|\\(]+("+S+")[,|\\s]+("+S+")[,|\\s]+("+S+")[,|\\s]+("+S+")\\s*\\)?",{CSS_UNIT:new RegExp(S),rgb:RegExp("rgb"+O),rgba:RegExp("rgba"+x),hsl:RegExp("hsl"+O),hsla:RegExp("hsla"+x),hsv:RegExp("hsv"+O),hsva:RegExp("hsva"+x),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function sH(e){return!!sG.CSS_UNIT.exec(e)}let sW=m(e=>a9&&!e?.getFeatureFlags().PassContentScriptPopoverKillSwitch),s$="Pass::MainWorld::Response",sq="Pass::MainWorld::Abort",sj="Pass::MainWorld::Disconnect",sY=[p.PASSKEY_CREATE,p.PASSKEY_GET,p.PASSKEY_INTERCEPT],sz=(e,t)=>({response:e,token:t,type:s$}),sV=e=>t=>r=>"object"==typeof r&&r?.token===t&&r?.type===e,sK=sV(sq);sV(sj),sV(s$);let sZ=e=>(t,r)=>t.startsWith(`${e}-${r??""}`);sZ("popup"),sZ("page"),sZ("contentscript");let sQ=c("extension"),sX=async e=>{let t=z(e.endpoint),r=`Context::Extension::${e.endpoint}`;try{let n,{tabId:o=0,senderTabId:i=0,url:a=null}=await Y.on(t({type:p.TABS_QUERY,payload:{current:"popup"===e.endpoint}}),e=>"error"===e.type?{tabId:0,url:null,senderTabId:0}:e),s=(n=e.endpoint,`${n}-${i}-${op(16)}`),l=q.runtime.connect(q.runtime.id,{name:s});H.info(`[${r}] tabId resolved & port opened`);let u=async()=>{let{recycle:t}=e.onDisconnect();if(H.info(`[${r}] port disconnected [reconnect=${t}]`),t)try{await ao(250);let t=await sX(e);return e.onRecycle?.(t)}catch{H.info(`[${r}] Recycling context failed`)}},c=aC(()=>l.disconnect()),d=i_(()=>l.onDisconnect.removeListener(u),c,sQ.clear);return l.onDisconnect.addListener(u),sQ.set({endpoint:e.endpoint,port:l,tabId:o,senderTabId:i,url:a,destroy:d})}catch(t){throw H.info(`[${r}] fatal error`,t),sQ.clear(),e.onError?.(t),t}},sJ={Autofill:1,Autofill2FA:2,Autosuggest:4,Autosave:8,Passkey:16};Object.values(sJ).reduce((e,t)=>e^t,0);let s0=(e,t)=>((e??0)&sJ[t])!=0,s1=op(16),s5=(()=>{try{return window.self===window.top}catch(e){return!1}})();(async e=>{var t;let r,n,o;r=B().methodFactory,B().methodFactory=function(e,t,n){let o=r(e,t,n);return function(...e){try{((...e)=>Y(V({type:p.LOG_EVENT,payload:{log:e.join(" ")}})))(...e.map(e=>e instanceof Error?e.message:e)),o(...e)}catch{}}},B().rebuild();let i=(t=await e(),o={instance:null,probe:(n={},{start:(e,t)=>{H.debug(`[ActivityProbe] probe set to ${t}ms`),clearInterval(n?.interval),n.interval=setInterval(e,t),e()},cancel:()=>{H.debug("[ActivityProbe] Cancelling probe.."),clearInterval(n?.interval)}}),listeners:om(),startClient:og()(async()=>{if(!o.instance)return o.instance=(({scriptId:e,mainFrame:t,elements:r,onError:n})=>{var o,i,a,s,l;let u,c,f,g,h,A,y,b,w,v,_,E,C,T,R,S,O,x,N,I,L,k,D,U,B,W,$,j,z,K,Q,X,J=(o={elements:r,mainFrame:t,scriptId:e,destroy:t=>{H.info(`[ContentScript::${e}] destroying.. [reason: "${t.reason}"]`),J.setState({stale:!0}),J.service.formManager.destroy(),J.service.iframe.destroy(),J.service.webauthn?.destroy(),st.disconnect(),(({root:e,control:t})=>{document.querySelectorAll(`${e}, ${t}`).forEach(e=>e.remove()),document.querySelectorAll(`input[${o_}]`).forEach(e=>aX(e))})(r),sQ.read()?.destroy()}},u={authorized:!1,booted:!1,localID:void 0,ready:!1,stale:!1,status:aT.IDLE,UID:void 0},iZ.add(o.elements.control.toUpperCase()),iZ.add(o.elements.root.toUpperCase()),c={autofill:{identity:!0,twofa:!0},autosave:{prompt:!0,passwordSuggest:!0},autosuggest:{password:!0,email:!0,passwordCopy:!1},disallowedDomains:{},loadDomainImages:!0,passkeys:{get:!0,create:!0},passwordOptions:null,showUsernameField:!1,theme:void 0},f={},X=d.set({elements:o.elements,mainFrame:o.mainFrame,scriptId:o.scriptId,service:{autofill:(g={credentialsCount:null,identitiesCount:null},h=iT(async()=>g.credentialsCount=g.credentialsCount??await Y.on(V({type:p.AUTOFILL_LOGIN_QUERY,payload:{}}),e=>"success"===e.type?e.items.length:0)),A=iT(async()=>g.identitiesCount=g.identitiesCount??await Y.on(V({type:p.AUTOFILL_IDENTITY_QUERY}),e=>"success"===e.type?e.items.length:0)),y=m(async(e,t)=>{let r=e?.getState().authorized??!1;(t?.forceSync||!r)&&(g.credentialsCount=null,g.identitiesCount=null);let n=e?.service.formManager.getTrackedForms(),o=n?.filter(e=>e.formType===P.LOGIN)??[],i=n?.some(e=>e.getFieldsFor(F.IDENTITY).length>0);if(o.length){let e=r?await h():0;o?.forEach(t=>t.getFields().forEach(t=>t.icon?.setCount(e)))}i&&r&&await A()}),{autofillIdentity:async(e,t)=>{let r=e.getFormHandle().getFields();for(let t of r)t.autofilled&&t.fieldType===F.IDENTITY&&t.sectionIndex===e.sectionIndex&&(await t.autofill(""),t.autofilled=null);await iW(r,e,t)},autofillLogin:async(e,t)=>{for(let r of(await iC(e.getFieldsFor(F.USERNAME)??[])?.autofill(t.userIdentifier),await iC(e.getFieldsFor(F.EMAIL)??[])?.autofill(t.userIdentifier),e.getFieldsFor(F.PASSWORD_CURRENT)))await r.autofill(t.password);ox(oO.AutofillTriggered,{},{location:"source"})},autofillOTP:async(e,t)=>{let r=e.getFieldsFor(F.OTP);if(0!==r.length){if(1===r.length&&await r[0].autofill(t,{paste:!1}),r.length>1)for(let[e,n]of(await r[0].autofill(t,{paste:!0}),r.map((e,r)=>[e,t?.[r]??""])))e.element.value&&e.element.value===n||await e.autofill(n??"");ox(oO.TwoFAAutofill,{},{})}},autofillPassword:m(async(e,t,r)=>{let n=e?.getExtensionContext()?.url;if(n){for(let e of t.getFieldsFor(F.PASSWORD_NEW))await e.autofill(r);Y(V({type:p.STORE_DISPATCH,payload:{action:iE({id:op(),value:r,origin:(({domain:e,subdomain:t,hostname:r})=>t??e??r)(n),createTime:Math.round(new Date().getTime()/1e3)})}}))}}),getCredentialsCount:h,getIdentitiesCount:A,promptOTP:m(async e=>!!(e?.service.formManager.getTrackedForms().some(e=>!tE(e.element)&&e.getFieldsFor(F.OTP).length>0)&&e?.getFeatures().Autofill2FA)&&Y.on(V({type:p.AUTOFILL_OTP_CHECK}),t=>"success"===t.type&&!!t.shouldPrompt&&(e?.service.iframe.attachNotification()?.open({action:oS.OTP,item:((e,t=[])=>{let r={...e};for(let e=0;e<t.length;++e)delete r[t[e]];return r})(t,["type","shouldPrompt"])}),!0))),sync:y}),autosave:(b=m((e,{autosave:t,data:r,submittedAt:n})=>!!t.shouldPrompt&&!!e?.getFeatures().Autosave&&(e.service.iframe.attachNotification()?.open({action:oS.AUTOSAVE,data:{...t.data,...r,submittedAt:n}}),!0)),w=og()(m(async e=>{let t=await Y.on(V({type:p.FORM_ENTRY_REQUEST}),e=>"success"===e.type?e.submission:null);if(!t)return!1;let{status:r,type:n,data:o,formId:i,submittedAt:a}=t,s=e?.getExtensionContext()?.url,l=s&&iO.every(e=>s[e]===t[e]),u=e?.service.formManager.getTrackedForms()??[],c=u.find(({id:e})=>e===i),d=u.filter(({formType:e,detached:t})=>e===n&&!t),m=d.length>0,f=d.some(({tracker:e})=>e?.getState().processing),g=null!==a&&ij(o,{type:n,partial:!1}),h=r===i$.STAGING&&l&&!m&&g;if(H.debug(`[Autosave] Reconciliating [formId:${i}]`),f)return H.debug(`[Autosave] submission loading [formId:${i}]`),!1;if(h){let e=await Y(V({type:p.FORM_ENTRY_COMMIT,payload:{reason:"AUTOSAVE::FORM_REMOVED"}}));return"success"===e.type&&!!e.submission&&b(e.submission)}return t.status===i$.COMMITTED&&t.autosave.shouldPrompt&&!m?b(t):(m&&(g||!o.userIdentifier)&&(c?c.tracker?.sync({submit:!1,partial:!0,reset:!0}).catch(G):(H.debug(`[Autosave] Stashing for type match [type:${n}]`),d.forEach(({tracker:e})=>e?.reset()),iq("FORM_TYPE_PRESENT"))),!1)}),250),{promptAutoSave:b,reconciliate:w}),detector:(v={rules:null},E={init:async()=>{await Y.onSuccess(V({type:p.WEBSITE_RULES_REQUEST}),({rules:e})=>{null!==e&&(H.debug("[Detector] Resolved website detection rules"),v.rules=e)}).catch(G)},applyRules:()=>{v.rules?.exclude?.forEach(e=>{let t=document.querySelector(e);t&&tT(t)}),v.rules?.version==="2"&&v.rules?.include?.forEach(e=>{let{selector:t,formType:r,fields:n}=e,o=i8(document,t);o&&(({form:e,formType:t,fields:r})=>{rZ(e)&&((delete e.__PP_TYPE__,tI(e,t,1),tU(e.getRootNode()))?rX.add(e):"FORM"!==e.tagName&&tb(e),r.forEach(({field:e,fieldType:t})=>{delete e.__PP_TYPE__,tI(e,t,1),tU(e.getRootNode())&&rJ.add(e)}))})({form:o,formType:r,fields:(n??[])?.map(({selector:e,fieldType:t})=>{let r=i8(o,e);if(r)return{field:r,fieldType:t}}).filter(iF)})})},isEnabled:ac,shouldRunDetection:()=>new Promise(async e=>{await ao(50),requestIdleCallback(()=>{E.applyRules(),((e=document)=>{((e=document)=>{let t=document.body.querySelectorAll("*").length;return e.querySelectorAll("form").forEach(e=>{if(ou(e)){let r=e.querySelectorAll(e7).length,n=e.querySelectorAll(ti).length,o=e.matches("body > form"),i=e.querySelectorAll("*").length,a=0===n||n>40||r>60||o&&i>=.8*t;if(a&&!o)return tT(e);if(a&&o||e.matches("table form")&&e.closest("table").querySelectorAll("form").length>2)return tC(e)}})})(e),((e=document)=>{e.querySelectorAll("table").forEach(e=>{if(ou(e)&&!e.querySelector("table")&&null===e.closest("form")){let t=e.querySelectorAll("form");if(t.length>2||!t.length&&(null!==e.querySelector("thead")||Math.max(...Array.from(e.rows).map(e=>e.cells.length))>3||tm(e).area>15e4))return tT(e)}}),e.querySelectorAll('div[class*="editor" i], div[id*="editor" i], div[class*="composer" i], div[id*="composer" i]').forEach(tT)})(e),((e=document)=>{e.querySelectorAll("input").forEach(e=>{if(tk(e)){if(!tY.includes(e.type))return tC(e);if("hidden"===e.type){let t=e.value.trim();if(!t.length||t.length>320||tq.includes(t)||!e.matches('[name*="user" i],[id*="user" i],[name*="login" i],[id*="login" i],[name*="email" i],[id*="email" i],[name*="identifier" i],[id*="identifier" i]'))return tC(e)}}})})(e),(e=>{let t,r=nL(e),n=e=>e.filter(e=>!r.some(t=>t.contains(e))&&rQ(e)),o=n(Array.from(e.querySelectorAll(e7)).filter(e=>tk(e)&&"hidden"!==e.getAttribute("type"))),i=o.filter(e=>e.matches(ti));if(0===i.length||i.length>50)return;let a=Array.from(e.querySelectorAll(tt)).filter(e=>e!==document.body),s=(t=[],i.map(e=>ty(e,t,20)).filter(e=>!!e)),l=th(a.filter(e=>!s.some(t=>e.contains(t))).concat(s)),u=td(o,n(Array.from(document.querySelectorAll(tn)).filter(nP)));if(u.length>50)return;let c=new WeakMap(u.map(e=>[e,l.find(t=>t.contains(e))]));return th(oa(u,1,(e,t)=>{if(e.parentElement===t.parentElement)return 0;let r=c.get(e),n=c.get(t);return r!==n?Number.MAX_SAFE_INTEGER:r&&r===n||((e,t)=>{let r=ol(e),n=ol(t),o=275/(r.isField&&n.isField?2:1),{dx:i,dy:a}=tg(r.rect,n.rect),s=Math.abs(r.rect.left/n.rect.left),l=Math.abs(r.rect.top/n.rect.top),u=s>.95&&s<1.05,c=l>.95&&l<1.05;return!!u&&!!c||!!u&&a<o||!!c&&i<50||i<50&&a<o})(e,t)?0:Number.MAX_SAFE_INTEGER}).map(e=>{let t;return 1===e.length?tu(t=e[0],5)((e,r)=>r===t||0===r.querySelectorAll(ta).length):e.reduce(tA)}).filter(e=>document.body!==e&&e.querySelectorAll(ti).length>0)).forEach(tb),os.cache=new WeakMap})(e)})(),e(!!r0().concat(nL()).reduce((e,t)=>{if(tR(t)){let r=nM(t).some(nF);return r&&tD(t,{preserveIgnored:!1}),e||r}return rZ(t)?(delete t.__PP_HIDDEN__,!0):e},!1)||r1().concat(nM()).some(nF))})}),runDetection:(_=document,({excludedFieldTypes:e=[],onBottleneck:t})=>{let r,n,o,[i,a]=(r=()=>{let t=ai.against(_.body);return[as(t,{type:"form",subTypes:e5,selectBest:au}),as(t,{type:"field",subTypes:e2.filter(t=>!e.includes(t)),selectBest:al})]},n={maxTime:250,onMaxTime:e=>{let{hostname:r}=window.location;if(e>=1e3)throw t({detectionTime:e,hostname:r}),Error()}},(...e)=>{let t=performance.now(),o=r(...e),i=performance.now()-t;return i>=n.maxTime&&n.onMaxTime(i),o})(),s=(o=new WeakMap,a.forEach(({fnode:e,type:t})=>{let r=e.element,n=i.find(({fnode:e})=>tW(e.element,r))?.fnode.element??aa,a=o?.get(n)??[];return a.push({fieldType:t,field:r}),o.set(n,a)}),o),l=i.map(({fnode:e,type:t})=>{let r,n=s.get(e.element)??[];return{form:e.element,formType:t,fields:n.sort((r=ix("field"),(e,t)=>((e,t)=>{if(e===t)return 0;let r=e.compareDocumentPosition(t);return r&ae||r&an?-1:r&at||r&ar?1:0})(r(e),r(t))))}}).filter(({formType:e,fields:t})=>e!==P.NOOP||t.length>0);return od(),l})}),formManager:(i={onDetection:async e=>{e.length>0?X.service.iframe.attachDropdown(document.body):X.service.iframe.dropdown?.destroy(),await X.service.autofill.sync().catch(G);let t=await X.service.autofill.promptOTP();await (!t&&X.service.autosave.reconciliate())}},C={active:!1,detectionAt:0,detectionCount:0,detectionRequest:-1,observer:null,staleMutationsCount:0,trackedForms:new Map},T=om(),R=()=>Array.from(C.trackedForms.values()),S=e=>{C.trackedForms.get(e)?.detach(),C.trackedForms.delete(e)},O=m(e=>{H.info("[FormManager::Detector] Bottleneck detected : destroying context."),e?.destroy({reason:"bottleneck"})}),x=aV()(m(async(e,t)=>{let r=e?.getSettings(),n=e?.getFeatures(),o=!!(n?.Autofill&&r?.autofill.identity),a=[];if(o||a.push(F.IDENTITY),n?.Autofill2FA||a.push(F.OTP),-1!==C.detectionRequest)return!1;let s=((e=!1)=>(C.trackedForms.forEach(t=>{t.detached&&(S(t.element),e=!0)}),e))();return await e?.service.detector.shouldRunDetection()?(C.detectionRequest=requestIdleCallback(()=>{if(C.active){H.debug(`[FormTracker::Detector] Running detection for "${t}"`);try{let t=e?.service.detector.runDetection({onBottleneck:O,excludedFieldTypes:a});t?.forEach(e=>{let t=C.trackedForms.get(e.form)??(e=>{var t;let r,n,{form:o,formType:i,fields:a}=e,s=om(),l=(r=(t=e.fields.map(ix("field"))).length>1?new WeakMap:null,n=Math.max(0,...t.map(e=>aE(e,r))),r=null,n+5),u=a_(o),c={id:op(),canAutosave:!e.form.hasAttribute("data-protonpass-autosave-ignore"),element:o,formType:i,fields:new Map(a.map(({fieldType:e,field:t})=>[t,a5({element:t,formType:i,fieldType:e,zIndex:l,getFormHandle:()=>c})])),get busy(){let e=Array.from(o.querySelectorAll(ta)),t=c.getFields(({element:e})=>aw(e));return aw(o)||e.some(aw)||t.length>0||av(o)},get detached(){return!tW(document.body,o)||!rZ(o,{skipCache:!0})},getFieldsFor:(e,t)=>Array.from(c.fields.values()).filter(r=>r.fieldType===e&&(t?.(r)??!0)),getFields:e=>{let t=Array.from(c.fields.values());return e?t.filter(e):t},detachField:m((e,t)=>{ay(t),c.fields.get(t)?.detach(),c.fields.delete(t),tD(t,{preserveIgnored:!1}),e?.service.iframe.dropdown?.getCurrentField()?.element===t&&e?.service.iframe.dropdown?.close()}),reconciliate:(t,r)=>{let n=t!==c.formType,o=!1;c.formType=t,c.canAutosave=!e.form.hasAttribute("data-protonpass-autosave-ignore"),c.getFields().forEach(e=>{r.some(t=>e.element===t.field)||(n=!0,c.detachField(e.element))});let i=c.fields,a=new Map;r.forEach(({field:e,fieldType:r})=>{let i=c.fields.get(e);n=void 0===i,o=o||r===F.IDENTITY;let s=i??a5({element:e,formType:t,fieldType:r,zIndex:l,getFormHandle:()=>c});a.set(s.element,s)}),c.fields=a,i.clear(),o&&c.getFields().reduce((e,t)=>{let{fieldType:r}=t,n=r===F.IDENTITY,o=r===F.EMAIL;if(!(n||o))return e;let i=o?M.EMAIL:t.identityType??nJ(t.element);if(void 0===i)return e;let a=e[e.length-1],s={field:t,type:i};if(0===e.length)return[{types:new Set([i]),fields:[s]}];let l=a.fields[a.fields.length-1]?.type;return(i===M.ADDRESS||i===M.FIRSTNAME||i===M.FULLNAME)&&a.types.has(i)&&i!==l?[...e,{types:new Set([i]),fields:[s]}]:(a.types.add(i),a.fields.push(s),e)},[]).forEach((e,t)=>{e.fields.forEach(({field:e,type:r})=>{e.sectionIndex=t,e.identityType=r})}),n&&c.tracker?.reset()},attach(){c.tracker=c.tracker??(e=>{let{tagName:t}=e.element,r=om(),n={error:!1,processing:!1,submitted:!1,detached:!1};H.debug(`[FormTracker] Tracking form [${t}:${e.formType}:${e.id}]`);let o=()=>{clearTimeout(n.timerIdle),delete n.timerIdle},i=()=>{clearTimeout(n.timerSubmit),delete n.timerSubmit},a=()=>{H.debug(`[FormTracker] Resetting state [formId:${e.id}]`),o(),i(),n.submitted=!1,n.processing=!1,n.error=!1,delete n.submittedAt},s=m((e,t)=>{let r,n=e?.getFeatures(),o=e?.getSettings(),i=o?.autofill&&(void 0===(r=o.autofill).inject&&void 0===r.openOnFocus||!!(r.inject||r.openOnFocus));switch(t){case oT.AUTOFILL_LOGIN:return!!(n?.Autofill&&(o?.autofill.login??i));case oT.AUTOFILL_IDENTITY:return!!(n?.Autofill&&(o?.autofill.identity??i));case oT.AUTOSUGGEST_ALIAS:return n?.AutosuggestAlias??!1;case oT.AUTOSUGGEST_PASSWORD:return n?.AutosuggestPassword??!1}}),l=()=>{let t=e=>{let t;return t=e.value,(t?.trim().length??0)!==0},r=iC(e.getFieldsFor(F.USERNAME,t)),n=iC(e.getFieldsFor(F.USERNAME_HIDDEN,t)),o=iC(e.getFieldsFor(F.EMAIL,t)),i=iM(e.getFieldsFor(F.PASSWORD_NEW,t)),a=iM(e.getFieldsFor(F.PASSWORD_CURRENT,t));return{userIdentifier:(r??o??n)?.value??"",password:(i??a)?.value??""}},u=t=>{o(),n.timerIdle=setTimeout(()=>{o(),n.processing||e.busy||e.detached||(H.debug(`[FormTracker] Idle reconciliation [formId:${e.id}]`),t())},5e3)},c=iR(async t=>{if(!e.canAutosave)return null;let r=t.data??l(),s=ij(r,{type:e.formType,partial:t.partial});if(t.reset&&a(),n.interactionAt&&!n.processing&&s){let a;H.debug(`[FormTracker] Syncing submission [formId:${e.id}|submit:${t.submit}]`);let s=await (a={action:(e=>{if(iK(e)){let t=e.action;return"string"==typeof t?t:t.value}})(e.element),data:r,reason:`FORM_TRACKER[submit=${t.submit}]`,submit:t.submit,type:e.formType,formId:e.id},Y(V({type:p.FORM_ENTRY_STAGE,payload:a})));return t.submit&&!n.detached&&(n.processing=!0,n.submittedAt=Date.now(),o(),i(),n.timerSubmit=setTimeout(()=>{H.debug(`[FormTracker] Submit timeout [formId:${e.id}]`),delete n.timerSubmit,n.processing=!1,n.submitted=!0,n.error=!1,u(()=>c({submit:!1,partial:!0,reset:!0}))},1e3)),"success"===s.type?s.submission:null}return null}),d=()=>{n.interactionAt=Date.now(),n.processing=!1,n.timerIdle&&(H.debug(`[FormTracker] Detected interaction while idle [formId:${e.id}]`),c({submit:!1,partial:!0,reset:!0}))},f=m(async t=>{n.submittedAt=Date.now(),n.interactionAt=Date.now(),e.getFields().forEach(({element:e})=>ay(e));let r=t?.service.iframe.dropdown;r?.getState().visible&&r?.close(),await c({partial:!0,submit:!0})}),g=m(t=>{t&&(e.getFields().forEach(t=>{let r=aA[e.formType].find(({type:e})=>e===t.fieldType);if(!r)return t.detach();let{action:n,filterable:o}=r;t.setAction(n&&s(n)?{type:n,filterable:o}:null),t.tracked||t.attach({onChange:d,onSubmit:f})}),e.getFields().find(e=>i7(e.element)&&!e.value)?.focus())}),h=t=>{if(Z(t,{sender:"background",type:p.FORM_STATUS})){let{formId:r,status:s}=t.payload;if(r===e.id)switch(s){case"loading":H.debug(`[Autosave] Form loading detected [formId:${r}]`),n.processing=!0,n.submitted=!1,n.error=!1,i(),o();break;case"submitted":H.debug(`[Autosave] Form submit detected [formId:${r}]`),n.processing=!1,n.submitted=!0,n.error?(iq("XMLHTTP_ERROR"),a()):u(()=>c({submit:!1,partial:!0,reset:!0}));break;case"error":H.debug(`[Autosave] Form error detected [formId:${r}]`),n.error=!0}}};return r.addListener(window,"beforeunload",()=>e.busy&&f()),r.addListener(e.element,"submit",f),q.runtime.onMessage.addListener(h),Array.from(e.element.querySelectorAll(tn)).filter(nP).forEach(e=>r.addListener(e,"click",f)),{detach:()=>{let t=e.element,a=e.getFields(),s=l();n.detached=!0,n.processing=!1,r.removeAll(),o(),i(),e.getFields().forEach(e=>e.detach()),q.runtime.onMessage.removeListener(h),requestAnimationFrame(()=>{if(!n.interactionAt||n.error)return;let e=document.contains(t)&&a.some(({element:e})=>document.contains(e)),r=!n.submittedAt||Date.now()-n.submittedAt<250;!e&&r||c({submit:!0,partial:!0,data:s}).catch(G)})},getState:()=>n,reconciliate:g,reset:a,sync:c}})(c),c.tracker.reconciliate()},detach:m(e=>{H.debug(`[FormHandles]: Detaching tracker for form [${i}:${c.id}]`);let t=e?.service.iframe.dropdown,r=e?.service.iframe.notification,n=t?.getCurrentField()??null,a=r?.getState().action;s.removeAll(),c.tracker?.detach(),c.getFields().forEach(e=>{e===n&&t?.close(),e.fieldType===F.OTP&&a===oS.OTP&&r?.close(),e.detach()}),tD(o,{preserveIgnored:!0,fields:c.getFields().map(ix("element"))})})},d=e=>{c.getFields().forEach(t=>t.action&&t.icon?.reposition(e))},f=og()(m(t=>{d(!0);let r=e.form.parentElement;(null===r||i0(r))&&t?.service.formManager.detect({reason:"NewFormFieldsOnResize"})}),50);return s.addResizeObserver(e.form,f),s.addListener(u,"scroll",()=>d(!1)),c})(e);C.trackedForms.set(e.form,t),t.reconciliate(e.formType,e.fields),t.attach()}),i.onDetection(R())}catch(e){H.warn(`[FormTracker::Detector] ${e}`)}}C.detectionRequest=-1,C.detectionCount++}),!0):((s||0===C.detectionCount)&&e?.service.autosave.reconciliate(),od(),!1)}),250,{leading:!0,trailing:!0}),N=async e=>{let t=Date.now(),r=!C.active||C.detectionCount>0&&t-C.detectionAt<150;C.detectionAt=t,r&&(cancelIdleCallback(C.detectionRequest),C.detectionRequest=-1),C.active&&x(e.reason)},I=e=>{e.some(e=>{if("childList"===e.type){var t;let r,n,o;if(C.staleMutationsCount=0,!i5(e.target))return!1;let i=Array.from(e.removedNodes).some(i4),a=Array.from(e.addedNodes).some(i3);return a&&(n=(r=e.target)?ts(r,tE):null)&&tD(n,{preserveIgnored:!1}),i&&(o=(t=e.target)&&tO(t)?t:tx(t))&&tD(o,{preserveIgnored:!1}),a||i}if("attributes"===e.type){if(!i6(e.target))return!1;let{oldValue:t,attributeName:r,target:n}=e,o=r?n?.getAttribute(r):null;if(iz(e.target)){let e=!!(r&&a2.includes(r));return e&&delete n.__PP_SEEN__,e}if(null!==t&&t===o?C.staleMutationsCount++:C.staleMutationsCount=0,C.staleMutationsCount>25){let e=a3(a6.filter(e=>e!==r));C.observer?.disconnect(),C.observer=T.addObserver(document.body,I,e)}return i0(n)}return!1})&&N({reason:"DomMutation"})},L=((e,t,r,{flushThreshold:n,...o})=>{let i=new Set,a=og()(()=>{let t=Array.from(i.values());i.clear(),t.length>0&&e(t)},r,o),s=e=>{let r=t(e);!1!==r&&i.add(r),n&&i.size>=n?a.flush():a()};return s.cancel=()=>{i.clear(),a.cancel()},s.flush=a.flush,s})(e=>{requestAnimationFrame(()=>{(()=>{if(e.length>=15&&i1(document.body))return!0;for(let t of e)try{if(i1(t))return!0;if(t===document.body)break}catch{}return!1})()&&N({reason:"TransitionEnd"})})},({target:e})=>!!(e&&i5(e))&&e,250,{leading:!0}),k=({target:e})=>{e&&iY(e)&&(()=>{if(iJ(e))return!0;if(tB(e)){let t=i9(e.shadowRoot);return t&&iY(t)&&iJ(t)}return!1})()&&N({reason:"FocusIn"})},{getTrackedForms:R,observe:()=>{C.active||(C.active=!0,C.observer=T.addObserver(document.body,I,a3(a6)),T.addListener(document.body,"transitionend",L),T.addListener(document.body,"animationend",L),T.addListener(document.body,"focusin",k))},detect:N,sync:m(e=>{C.trackedForms.forEach(e=>e.tracker?.reconciliate()),e?.service.autofill.sync().catch(G)}),destroy:()=>{cancelIdleCallback(C.detectionRequest),x.cancel(),L.cancel(),C.active=!1,C.detectionRequest=-1,C.observer=null,C.staleMutationsCount=0,C.detectionCount=0,T.removeAll(),C.trackedForms.forEach(e=>S(e.element)),C.trackedForms.clear()}}),iframe:(a=o.elements,D=om(),U={apps:{dropdown:null,notification:null},root:null},B=m((e,t)=>{let r=e?.getExtensionContext()?.port,n=e?.getExtensionContext()?.url;if(n&&r&&t.getState().port!==r){let o=e.getSettings();t.init(r,()=>({appState:e.getState(),domain:(({domain:e,subdomain:t,hostname:r})=>t??e??r)(n)??"",features:e.getFeatureFlags(),settings:e.getSettings(),theme:((e=sl)=>e===sa.OS?sa[window.matchMedia("(prefers-color-scheme: dark)").matches?"PassDark":"PassLight"]:e)(o.theme)}))}}),W={get dropdown(){return U.apps.dropdown},get notification(){return U.apps.notification},get root(){return U.root??W.init()},ensureInteractive:(e,t)=>{if(t){let t,r=U.root,n=(e?e.closest(":modal")??(t=a8(e),t?.closest(":modal")):iM(st.elements.filter(e=>e.matches(":modal")))??null)??document.body,o=r?.customElement.parentElement;o!==n&&(W.destroy(),r&&o?.removeChild(r.customElement),W.init(n))}},init:e=>{if(U.root)return U.root;U.root=aQ({type:a.root,parent:e??document.body,styles:a4.A}),U.apps.dropdown&&B(U.apps.dropdown),U.apps.notification&&B(U.apps.notification);let t=m(e=>{U.root=null,U.apps.dropdown?.destroy(),U.apps.notification?.destroy(),U.apps.dropdown=null,U.apps.notification=null,e?.getState().stale?W.destroy():W.init()}),r=m(e=>{let t=e?.getSettings();t?.theme===sa.OS&&W.setTheme(t.theme)});return D.addListener(U.root.customElement,oE,t,{once:!0}),D.addListener(window.matchMedia("(prefers-color-scheme: dark)"),"change",r),U.root},destroy:()=>{D.removeAll(),U.apps.dropdown?.destroy(),U.apps.notification?.destroy(),U.root=null},attachDropdown:m((e,t)=>{if(!e)return null;let r=sW();return W.ensureInteractive(t,r),null===U.apps.dropdown&&(H.debug(`[ContentScript::${e.scriptId}] attaching dropdown iframe`),U.apps.dropdown=(({popover:e,onDestroy:t})=>{let r={current:null},n=om(),o=sc({animation:"fadein",backdropClose:!0,id:"dropdown",popover:e,src:ag,onDestroy:()=>{r.current=null,n.removeAll(),t()},onError:()=>o.destroy(),onClose:(e,t)=>{let n=r.current;t.refocus?n?.focus():i7(n?.element)||n?.detachIcon()},backdropExclude:()=>{if(!r.current)return[];let e=r.current.element.getRootNode(),t=tU(e)?e.host:null;return[r.current.icon?.element,r.current.element,t].filter(iF)},position:e=>{let t=r.current;if(!t)return{top:0,left:0};let{boxElement:n,element:o}=t,i=n!==o,a=e.getBoundingClientRect().top,{value:s,offset:l}=aH(aU(n),{node:n,mode:i?"inner":"outer"}),{left:u,top:c,width:d}=n.getBoundingClientRect();return{top:c-a+l.top+s,left:u+d-250}},dimensions:()=>({width:250,height:60})}),i=m(async(e,{action:t,autofocused:r,field:n})=>{if(!e)return;let{authorized:o}=e.getState(),i=e.getExtensionContext()?.url,a=i?(({domain:e,subdomain:t,hostname:r})=>t??e??r)(i):null;if(a)switch(t){case oT.AUTOFILL_IDENTITY:if(!o)return{action:t,domain:""};if(r&&n.autofilled&&!n.icon||r&&!await e.service.autofill.getIdentitiesCount())return;return{action:t,domain:a};case oT.AUTOFILL_LOGIN:if(!o)return{action:t,domain:"",startsWith:""};if(r&&!await e.service.autofill.getCredentialsCount())return;return{action:t,domain:a,startsWith:""};case oT.AUTOSUGGEST_ALIAS:if(!i?.displayName)throw Error();return{action:t,domain:a,prefix:((e="",t=!1)=>{let r=e.toLowerCase().trim();return t&&(r=r.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),r})(i.displayName,!0).replace(/[^a-z0-9\-\_.]/g,"").slice(0,20).replace(/\.*$/,"").replace(/^\.+/,"")};case oT.AUTOSUGGEST_PASSWORD:return Y.on(V({type:p.AUTOSUGGEST_PASSWORD}),e=>{if("error"===e.type)throw Error(e.error);return{action:t,domain:a,config:e.config,copy:e.copy,policy:e.policy}})}}),a=async e=>{let{field:t}=e,n=e.field.element;if(rz(n,{opacity:!0,skipCache:!0}))return o.ensureReady().then(async()=>{r.current=t;let a=await i(e);a&&(o.sendPortMessage({type:oR.DROPDOWN_ACTION,payload:a}),o.open(e.action,((e,t=!1)=>{if(!e)return document.body;let r=getComputedStyle(e),n="absolute"===r.position,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if("fixed"===r.position)return document.body;for(let t=e.parentElement;t;t=t.parentElement){let e=getComputedStyle(t);if((!n||"static"!==e.position)&&o.test(e.overflow+e.overflowY+e.overflowX))return t}return document.body})(n)),a1({onAnimate:G,get:()=>o.getPosition(),set:()=>o.updatePosition()}))}).catch(G)};o.registerMessageHandler(oR.DROPDOWN_FOCUS_CHECK,()=>{document.activeElement!==e.root.customElement&&(r.current?.element.blur(),setTimeout(()=>{let{activeElement:e}=document;e&&iY(e)&&e.blur(),o.sendPortMessage({type:oR.DROPDOWN_FOCUS})},50))}),o.registerMessageHandler(oR.AUTOFILL_LOGIN,m(async(e,{payload:t})=>{let n=r.current?.getFormHandle();n&&(await e?.service.autofill.autofillLogin(n,t),r.current?.focus({preventAction:!0}))}),{userAction:!0}),o.registerMessageHandler(oR.AUTOFILL_GENERATED_PW,m(async(e,{payload:t})=>{let n=r.current?.getFormHandle(),o=e?.getSettings().autosave.passwordSuggest;n&&(await e?.service.autofill.autofillPassword(n,t.password),r.current?.focus({preventAction:!0}),n.tracker?.sync({submit:!1,partial:!0}).then(t=>t&&o&&e.service.autosave.promptAutoSave(t)).catch(G))}),{userAction:!0}),o.registerMessageHandler(oR.AUTOFILL_EMAIL,async({payload:e})=>{await r.current?.autofill(e.email),r.current?.focus({preventAction:!0}),r.current?.getFormHandle()?.tracker?.sync({submit:!1,partial:!0})},{userAction:!0}),o.registerMessageHandler(oR.AUTOFILL_IDENTITY,m(async(e,{payload:t})=>{let n=r.current;n&&(await e?.service.autofill.autofillIdentity(n,t),r.current?.focus({preventAction:!0}))}),{userAction:!0}),n.addListener(window,"popstate",()=>o.close({discard:!1})),n.addListener(window,"hashchange",()=>o.close({discard:!1})),n.addListener(window,"beforeunload",()=>o.close({discard:!1}));let s={close:i_(o.close,()=>s),destroy:o.destroy,getCurrentField:()=>r.current,getState:()=>o.state,init:i_(o.init,()=>s),open:i_(a,()=>s),sendMessage:o.sendPortMessage};return s})({popover:so(W,r),onDestroy:()=>U.apps.dropdown=null}),B(U.apps.dropdown)),U.apps.dropdown}),attachNotification:m(e=>{if(!e)return null;let t=sW();return W.ensureInteractive(null,t),null===U.apps.notification&&(H.debug(`[ContentScript::${e.scriptId}] attaching notification iframe`),U.apps.notification=(({popover:e,onDestroy:t})=>{let r=sc({animation:"slidein",backdropClose:!1,classNames:["fixed"],id:"notification",popover:e,src:ah,onDestroy:t,onError:()=>r.destroy(),onClose:m((e,{action:t},r)=>{switch(t){case oS.AUTOSAVE:return r?.discard&&Y(V({type:p.FORM_ENTRY_STASH,payload:{reason:"AUTOSAVE_DISMISSED"}}));case oS.OTP:return r?.discard&&e?.service.formManager.getTrackedForms().filter(({getFieldsFor:e})=>e(F.OTP).length>0).forEach(({element:e,getFieldsFor:t})=>{tD(e,{preserveIgnored:!0}),tC(e),t(F.OTP).forEach(e=>tC(e.element))}),e?.service.autosave.reconciliate()}}),position:()=>({top:15,right:15}),dimensions:()=>({width:320,height:180})}),n=iR(m((e,t)=>r.ensureReady().then(()=>{let n=t.action===oS.AUTOSAVE,o=e?.service.iframe.notification?.getState();n&&o?.visible&&o?.action===oS.OTP||(r.sendPortMessage({type:oR.NOTIFICATION_ACTION,payload:t}),r.open(t.action))}).catch(G)));r.registerMessageHandler(oR.AUTOFILL_OTP,m(async(e,{payload:{code:t}})=>{let r=e?.service.formManager.getTrackedForms().find(({getFieldsFor:e})=>e(F.OTP).length>0);r&&await e?.service.autofill.autofillOTP(r,t)}),{userAction:!0}),r.registerMessageHandler(oR.PASSKEY_RELAY,({payload:e})=>window.postMessage(e,"*"),{userAction:!0});let o={close:i_(r.close,()=>o),destroy:r.destroy,getState:()=>r.state,init:i_(r.init,()=>o),open:i_(n,()=>o),sendMessage:r.sendPortMessage};return o})({popover:so(W,t),onDestroy:()=>U.apps.notification=null}),B(U.apps.notification)),U.apps.notification}),setTheme:(e=sl)=>{U.root?.customElement.setAttribute(oA,(()=>{switch(e){case sa.PassDark:return"dark";case sa.PassLight:return"light";case sa.OS:return"os"}})());let t=e===sa.OS?window.matchMedia("(prefers-color-scheme: dark)").matches?sa.PassDark:sa.PassLight:e;U.apps.dropdown?.sendMessage({type:oR.IFRAME_THEME,payload:t}),U.apps.notification?.sendMessage({type:oR.IFRAME_THEME,payload:t})}}),webauthn:($=om(),s={requestToken:null},z=j={get data(){let e=Object.freeze({...s});return l?.(e)??e},merge:e=>(s=iA(s,e),j),get:e=>s[e],set:(e,t)=>(s[e]="function"==typeof t?t(s[e]):t,j)},K=e=>{let t=z.get("requestToken");z.set("requestToken",null),t&&window.postMessage(e?sz({type:"success",intercept:!1},t):{token:t,type:sq})},Q=(e,t)=>(K(!1),z.set("requestToken",e),su({check:m(e=>!!e&&!!e.getState().ready&&aM(e.getState().status)),cancel:m(e=>!e||!!e.getState().ready&&(!!(!t()||aL(e.getState().status))||null===z.get("requestToken")||(e?.getState()?.stale??!1)))},50)),{init:m(e=>{$.addListener(window,"message",m(async(e,{data:t})=>{if(!e)return;let r=z.get("requestToken");if(r&&sK(r)(t)&&e?.service.iframe.notification?.close(),"object"==typeof t&&"string"==typeof t?.token&&t?.type==="Pass::MainWorld::Message"&&sY.includes(t?.request?.type))switch(t.request.type){case p.PASSKEY_CREATE:{let{token:r}=t,{request:n,domain:o}=t.request.payload;return Q(r,()=>{let t=e.getSettings();return e.getFeatures().Passkeys&&t.passkeys.create}).then(()=>e?.service.iframe.attachNotification()?.open({action:oS.PASSKEY_CREATE,domain:o,request:n,token:r})).catch(()=>K(!0))}case p.PASSKEY_GET:{let{token:r}=t,{domain:n,request:o}=t.request.payload;return Q(r,()=>{let t=e.getSettings();return e.getFeatures().Passkeys&&t.passkeys.get}).then(async()=>{let t=(JSON.parse(o).allowCredentials??[]).map(ix("id"));await Y.on(V({type:p.PASSKEY_QUERY,payload:{domain:n,credentialIds:t}}),t=>{let i="success"===t.type?t.passkeys:[];return i.length?e?.service.iframe.attachNotification()?.open({action:oS.PASSKEY_GET,domain:n,passkeys:i,request:o,token:r}):K(!0)})}).catch(()=>K(!0))}case p.PASSKEY_INTERCEPT:{let{token:r}=t,n=e.getSettings(),o=e.getFeatures().Passkeys&&(n.passkeys.get||n.passkeys.create);return window.postMessage(sz({type:"success",intercept:o},r))}}})),document.querySelectorAll('input[autocomplete*="webauthn"]').length>0&&e?.service.iframe.attachNotification()}),destroy:()=>{K(!1),window.postMessage({type:sj}),$.removeAll()}})},destroy:o.destroy,getExtensionContext:()=>sQ.read(),getFeatureFlags:()=>f,getFeatures:()=>{let e=c.disallowedDomains??{},t=X.getExtensionContext()?.url,{autofill:r,autosuggest:n,autosave:o,passkeys:i}=c,a=(({disallowedDomains:e,url:t})=>{let r=(t?.domain?e[t.domain]:0)|(t?.subdomain?e[t.subdomain]:0);return{Autofill:s0(r,"Autofill"),Autofill2FA:s0(r,"Autofill2FA"),Autosave:s0(r,"Autosave"),Autosuggest:s0(r,"Autosuggest"),Passkey:s0(r,"Passkey")}})({disallowedDomains:e,url:t});return{Autofill:(r.login||r.identity)&&!a.Autofill,Autofill2FA:r.twofa&&!a.Autofill2FA,AutosuggestPassword:n.password&&!a.Autosuggest,AutosuggestAlias:n.email&&!a.Autosuggest,Autosave:o.prompt&&!a.Autosave,Passkeys:(i.create||i.get)&&!a.Passkey}},getSettings:()=>c,getState:()=>u,setFeatureFlags:e=>(Object.keys(f).forEach(e=>delete f[e]),Object.assign(f,e)),setSettings:e=>Object.assign(c,e),setState:e=>Object.assign(u,e)})),ee=async()=>{let{status:e}=J.getState();J.service.formManager.sync();let t=ax(e);if(aL(e)||t){let e=J.service.iframe.notification?.getState().action,r=[oS.PASSKEY_CREATE,oS.PASSKEY_GET];t&&(!e||r.includes(e))||J.service.iframe.notification?.destroy()}},et=async e=>{var t,r;if(Z(e,{sender:"background"}))switch(e.type){case p.AUTOFILL_SYNC:return J.service.autofill.sync({forceSync:!0});case p.FEATURE_FLAGS_UPDATE:let n;return n=e.payload,J.setFeatureFlags(n);case p.SETTINGS_UPDATE:return t=e.payload,void(J.setSettings(t),J.service.iframe.setTheme(t.theme),ee());case p.WORKER_STATE_CHANGE:return r=e.payload.state,void(J.setState(r),ee());case p.UNLOAD_CONTENT_SCRIPT:return J.destroy({reason:"unload script"})}},er=iT(async({tabId:r,port:o})=>{try{J.service.iframe.init(),J.service.webauthn?.init();let n=await Y(V({type:p.CLIENT_INIT,payload:{endpoint:"contentscript",tabId:r}}));if("error"===n.type)throw Error();J.setState({...n.state,ready:!0,stale:!1}),J.setSettings(n.settings),J.setFeatureFlags(n.features),J.service.iframe.setTheme(n.settings.theme);let i=J.getFeatures(),a=J.service.detector.isEnabled(i);if(!(a||i.Passkeys))return J.destroy({reason:"injection settings"});if(!t)return J.destroy({reason:"subframe discarded"});H.debug(`[ContentScript::${e}] Worker status resolved "${n.state.status}"`),window.postMessage({type:"PassClientScriptReady"}),await ee(),o.onMessage.addListener(et),a&&(J.service.formManager.observe(),await J.service.detector.init(),await J.service.formManager.detect({reason:"InitialLoad"}).catch(G))}catch(e){J.destroy({reason:"startup failure"}),n(e)}});return{start:async()=>{try{let t=await sX({endpoint:"contentscript",onDisconnect:()=>(J.destroy({reason:"port disconnected"}),{recycle:!0}),onError:n,onRecycle:er});H.debug(`[ContentScript::${e}] Starting content-script service`),J.getState().stale||await er(t)}catch{}},destroy:e=>{J.destroy(e),d.clear()}}})({scriptId:s1,mainFrame:s5,elements:t,onError:o.destroyClient}),o.probe.start(()=>Y(V({type:p.PING})),25e3),o.instance.start()},350,{leading:!1,trailing:!0}),stopClient:e=>{o.probe.cancel(),o.startClient.cancel(),o.instance?.destroy({reason:e}),o.instance=null},destroyClient:e=>{let t=e instanceof Error?e.message:e;o.stopClient(String(t??"destroyed")),o.listeners.removeAll(),q.runtime.onMessage.removeListener(o.onMessage)},onMessage:m((e,t,r,n)=>{if(Z(t,{sender:"background"})&&t.type===p.UNLOAD_CONTENT_SCRIPT&&o.destroyClient("unload"),Z(t,{type:p.AUTOFILL_CHECK_FORM,sender:"background"})){let t=e?.service.formManager.getTrackedForms();return n({hasLoginForm:t?.some(({formType:e})=>e===P.LOGIN)}),!0}})},q.runtime.onMessage.addListener(o.onMessage),o.listeners.addListener(document,"visibilitychange",()=>{switch(document.visibilityState){case"visible":return o.startClient();case"hidden":return o.stopClient("hidden")}}),o);return"visible"===document.visibilityState&&(i.startClient()?.catch(i.destroyClient),i.startClient.flush()?.catch(i.destroyClient)),i})(async()=>{let e=await Y(V({type:p.REGISTER_ELEMENTS}));if("error"===e.type)throw Error("Custom elements registration failure");return{root:oC.getTagName(e.hash),control:ov.getTagName(e.hash)}}).catch(G)})()})();
