{"version":3,"file":"js/dashboard-vendors-common.467675a1f954ec58.js","sources":["webpack:///./node_modules/dayjs/dayjs.min.js","webpack:///./node_modules/dayjs/locale/en.js","webpack:///./node_modules/dayjs/locale/nb.js","webpack:///./node_modules/dayjs/plugin/customParseFormat.js","webpack:///./node_modules/dayjs/plugin/localizedFormat.js","webpack:///./node_modules/dayjs/plugin/timezone.js","webpack:///./node_modules/dayjs/plugin/utc.js","webpack:///./node_modules/vue-loader/dist/exportHelper.js","webpack:///./node_modules/@googlemaps/js-api-loader/dist/index.js","webpack:///./node_modules/@googlemaps/markerclusterer/dist/index.esm.mjs","webpack:///./node_modules/supercluster/index.js","webpack:///./node_modules/fast-equals/dist/es/index.mjs","webpack:///./node_modules/kdbush/index.js","webpack:///./node_modules/dompurify/dist/purify.es.mjs","webpack:///./node_modules/nostics/dist/index.mjs","webpack:///./node_modules/vee-validate/dist/vee-validate.mjs","webpack:///./node_modules/wasm-feature-detect/dist/esm/index.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),Y=_.prototype;return O.prototype=Y,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){Y[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_locale_en=n()}(this,(function(){\"use strict\";return{name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(e){var n=[\"th\",\"st\",\"nd\",\"rd\"],t=e%100;return\"[\"+e+(n[(t-20)%10]||n[t]||n[0])+\"]\"}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t(require(\"dayjs\")):\"function\"==typeof define&&define.amd?define([\"dayjs\"],t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_locale_nb=t(e.dayjs)}(this,(function(e){\"use strict\";function t(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var n=t(e),a={name:\"nb\",weekdays:\"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag\".split(\"_\"),weekdaysShort:\"sø._ma._ti._on._to._fr._lø.\".split(\"_\"),weekdaysMin:\"sø_ma_ti_on_to_fr_lø\".split(\"_\"),months:\"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember\".split(\"_\"),monthsShort:\"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.\".split(\"_\"),ordinal:function(e){return e+\".\"},weekStart:1,yearStart:4,formats:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D. MMMM YYYY\",LLL:\"D. MMMM YYYY [kl.] HH:mm\",LLLL:\"dddd D. MMMM YYYY [kl.] HH:mm\"},relativeTime:{future:\"om %s\",past:\"%s siden\",s:\"noen sekunder\",m:\"ett minutt\",mm:\"%d minutter\",h:\"en time\",hh:\"%d timer\",d:\"en dag\",dd:\"%d dager\",M:\"en måned\",MM:\"%d måneder\",y:\"ett år\",yy:\"%d år\"}};return n.default.locale(a,null,!0),a}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\\[|\\]$/g,\"\")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if(\"string\"==typeof i)r+=i.length;else{var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,\"\")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if(\"string\"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if([\"x\",\"X\"].indexOf(t)>-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){\"use strict\";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,r){var o,a=function(t,n,i){void 0===i&&(i={});var r=new Date(t),o=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||\"short\",r=t+\"|\"+i,o=e[r];return o||(o=new Intl.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:t,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",timeZoneName:i}),e[r]=o),o}(n,i);return o.formatToParts(r)},u=function(e,n){for(var i=a(e,n),o=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(o[c]=parseInt(m,10))}var l=o[3],d=24===l?0:l,h=o[0]+\"-\"+o[1]+\"-\"+o[2]+\" \"+d+\":\"+o[4]+\":\"+o[5]+\":000\",v=+e;return(r.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){if(void 0===t&&(t=o),!this.isValid())return this;var n,i=this.utcOffset(),a=this.toDate(),f=a.toLocaleString(\"en-US\",{timeZone:t}),s=u(+a,t);if(!Number(s))n=this.utcOffset(0,e);else if(n=r(f,{locale:this.$L}).$set(\"millisecond\",this.$ms).utcOffset(s,!0),e){var m=n.utcOffset();n=n.add(i-m,\"minute\")}return n.$x.$timezone=t,n},f.offsetName=function(t){var e=this.$x.$timezone||r.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return\"timezonename\"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=r(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},r.tz=function(t,e,n){var i=n&&e,a=n||e||o,f=u(+r(),a);if(\"string\"!=typeof t)return r(t).tz(a);var s=r.utc(t,i).valueOf();if(Number.isNaN(s)){var m=r(NaN);return m.$x.$timezone=a,m}var c=function(t,e,n){var i=t-60*e*1e3,r=u(i,n);if(e===r)return[i,e];var o=u(i-=60*(r-e)*1e3,n);return r===o?[i,r]:[t-60*Math.min(r,o)*1e3,Math.max(r,o)]}(s,f,a),l=c[0],d=c[1],h=r(l).utcOffset(d);return h.$x.$timezone=a,h},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(t){o=t}}}));","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_utc=i()}(this,(function(){\"use strict\";var t=\"minute\",i=/[+-]\\d\\d(?::?\\d\\d)?/g,e=/([+-]|\\d\\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var r=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),r.call(this,t)};var o=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else o.call(this)};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if(\"string\"==typeof s&&(s=function(t){void 0===t&&(t=\"\");var s=t.match(i);if(!s)return null;var f=(\"\"+s[0]).match(e)||[\"-\",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:\"+\"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s;if(0===u)return this.utc(f);var r=this.clone();if(f)return r.$offset=u,r.$u=!1,r;var o=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(r=this.local().add(u+o,t)).$offset=u,r.$x.$localOffset=o,r};var h=u.format;u.format=function(t){var i=t||(this.$u?\"YYYY-MM-DDTHH:mm:ss[Z]\":\"\");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return\"s\"===t&&this.$offset?n(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)}}}));","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// runtime helper for setting properties on components\n// in a tree-shakable way\nexports.default = (sfc, props) => {\n    const target = sfc.__vccOpts || sfc;\n    for (const [key, val] of props) {\n        target[key] = val;\n    }\n    return target;\n};\n","const MSG_DEPRECATED_LOADER = \"The Loader class is no longer available in this version.\" +\n    \"\\nPlease use the new functional API: setOptions() and importLibrary().\" +\n    \"\\nFor more information, see the updated documentation at: \" +\n    \"https://github.com/googlemaps/js-api-loader/blob/main/README.md\";\nconst MSG_REPEATED_SET_OPTIONS = (options) => `The setOptions() function should only be called once. The options passed ` +\n    `to the additional call (${JSON.stringify(options)}) will be ignored.`;\nconst MSG_IMPORT_LIBRARY_EXISTS = (options) => `The google.maps.importLibrary() function is already defined, and ` +\n    `@googlemaps/js-api-loader will use the existing function instead of ` +\n    `overwriting it. The options passed to setOptions ` +\n    `(${JSON.stringify(options)}) will be ignored.`;\nconst MSG_SET_OPTIONS_NOT_CALLED = \"No options were set before calling importLibrary. Make sure to configure \" +\n    \"the loader using setOptions().\";\nconst MSG_SCRIPT_ELEMENT_EXISTS = \"There already is a script loading the Google Maps JavaScript \" +\n    \"API, and no google.maps.importLibrary function is defined. \" +\n    \"@googlemaps/js-api-loader will proceed to bootstrap the API \" +\n    \"with the specified options, but the existing script might cause \" +\n    \"problems using the API. Make sure to remove the script \" +\n    \"loading the API.\";\nconst MSG_API_KEY_USED = \"The 'apiKey' parameter was used in setOptions(), but 'key' is the correct \" +\n    \"parameter name. Please update your configuration.\";\nconst MSG_TRUSTED_TYPES_POLICY_FAILED = (policyName, error) => `Failed to create Trusted Types policy \"${policyName}\": ${error instanceof Error ? error.message : String(error)}.\\n\\n` +\n    `If your Content Security Policy uses \"require-trusted-types-for 'script'\", ` +\n    `allow this policy with \"trusted-types ${policyName} google-maps-api-loader google-maps-api#html lit-html\". ` +\n    `The \"google-maps-api-loader\", \"lit-html\", and \"google-maps-api#html\" policies are required for full Maps JavaScript API execution. ` +\n    `Falling back to a string script URL.`;\nconst __DEV__$1 = process.env.NODE_ENV !== 'production';\nconst logDevWarning = __DEV__$1\n    ? (message) => {\n        console.warn(`[@googlemaps/js-api-loader] ${message}`);\n    }\n    : () => { };\nconst logDevNotice = __DEV__$1\n    ? (message) => {\n        console.info(`[@googlemaps/js-api-loader] ${message}`);\n    }\n    : () => { };\n\n/*\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst TRUSTED_TYPES_POLICY_NAME = \"@googlemaps/js-api-loader\";\nconst fallbackPolicy = { createScriptURL: (url) => url };\nlet policy;\n/*\n * Tries to create a Trusted Types policy when supported. Falls back to a string passthrough\n * when Trusted Types is unsupported, blocked by CSP, or already registered.\n */\nfunction getPolicy() {\n    if (policy) {\n        return policy;\n    }\n    const trustedTypes = globalThis.trustedTypes;\n    if (!trustedTypes) {\n        policy = fallbackPolicy;\n        return policy;\n    }\n    try {\n        policy = trustedTypes.createPolicy(TRUSTED_TYPES_POLICY_NAME, {\n            createScriptURL: (url) => url,\n        });\n    }\n    catch (e) {\n        logDevWarning(MSG_TRUSTED_TYPES_POLICY_FAILED(TRUSTED_TYPES_POLICY_NAME, e));\n        policy = fallbackPolicy;\n    }\n    return policy;\n}\nfunction setScriptSrc(script, src) {\n    script.src = getPolicy().createScriptURL(src);\n}\n\n/*\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n\nconst bootstrap = bootstrapParams => {\n  var bootstrapPromise;\n  var script;\n  var bootstrapParamsKey;\n  var PRODUCT_NAME = \"The Google Maps JavaScript API\";\n  var GOOGLE = \"google\";\n  var IMPORT_API_NAME = \"importLibrary\";\n  var PENDING_BOOTSTRAP_KEY = \"__ib__\";\n  var doc = document;\n  var global_ = window;\n  var google_ = global_[GOOGLE] || (global_[GOOGLE] = {});\n  var namespace = google_.maps || (google_.maps = {});\n  var libraries = new Set();\n  var searchParams = new URLSearchParams();\n  var triggerBootstrap = () => bootstrapPromise || (bootstrapPromise = new Promise(async(resolve, reject) => {\n    await (script = doc.createElement(\"script\"));\n    searchParams.set(\"libraries\", [...libraries] + \"\");\n    for (bootstrapParamsKey in bootstrapParams) {\n      searchParams.set(bootstrapParamsKey.replace(/[A-Z]/g, g => \"_\" + g[0].toLowerCase()), bootstrapParams[bootstrapParamsKey]);\n    }\n    searchParams.set(\"callback\", GOOGLE + \".maps.\" + PENDING_BOOTSTRAP_KEY);\n    setScriptSrc(script, \"https://maps.googleapis.com/maps/api/js?\" + searchParams);\n    namespace[PENDING_BOOTSTRAP_KEY] = resolve;\n    script.onerror = () => bootstrapPromise = reject(Error(PRODUCT_NAME + \" could not load.\"));\n    script.nonce = doc.querySelector(\"script[nonce]\")?.nonce || \"\";\n    doc.head.append(script);\n  }));\n  namespace[IMPORT_API_NAME] ? console.warn(PRODUCT_NAME + \" only loads once. Ignoring:\", bootstrapParams) : namespace[IMPORT_API_NAME] = (libraryName, ...args) => libraries.add(libraryName) && triggerBootstrap().then(() => namespace[IMPORT_API_NAME](libraryName, ...args));\n};\n\n/*\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars */\n/**\n * @deprecated Use the new functional API: `setOptions()` and `importLibrary()`.\n * See the migration guide for more details: MIGRATION.md\n */\nclass Loader {\n    constructor(...args) {\n        throw new Error(`[@googlemaps/js-api-loader]: ${MSG_DEPRECATED_LOADER}`);\n    }\n}\n\n/*\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst __DEV__ = process.env.NODE_ENV !== \"production\";\nlet setOptionsWasCalled_ = false;\n/**\n * Sets the options for the Maps JavaScript API.\n *\n * Has to be called before any library is loaded.\n *\n * See https://developers.google.com/maps/documentation/javascript/load-maps-js-api#required_parameters\n * for the full documentation of available options.\n *\n * @param options The options to set.\n */\nfunction setOptions(options) {\n    if (setOptionsWasCalled_) {\n        logDevWarning(MSG_REPEATED_SET_OPTIONS(options));\n        return;\n    }\n    if (options.apiKey) {\n        logDevWarning(MSG_API_KEY_USED);\n        if (!options.key) {\n            options.key = options.apiKey;\n        }\n    }\n    installImportLibrary_(options);\n    setOptionsWasCalled_ = true;\n}\nasync function importLibrary(libraryName) {\n    if (!setOptionsWasCalled_) {\n        logDevWarning(MSG_SET_OPTIONS_NOT_CALLED);\n    }\n    if (!window?.google?.maps?.importLibrary) {\n        throw new Error(\"google.maps.importLibrary is not installed.\");\n    }\n    return (await google.maps.importLibrary(libraryName));\n}\n/**\n * The installImportLibrary_ function makes sure that a usable version of the\n * `google.maps.importLibrary` function exists.\n */\nfunction installImportLibrary_(options) {\n    const importLibraryExists = Boolean(window.google?.maps?.importLibrary);\n    if (importLibraryExists) {\n        logDevNotice(MSG_IMPORT_LIBRARY_EXISTS(options));\n    }\n    else if (__DEV__) {\n        const scriptEl = document.querySelector('script[src*=\"maps.googleapis.com/maps/api/js\"]');\n        if (scriptEl) {\n            logDevWarning(MSG_SCRIPT_ELEMENT_EXISTS);\n        }\n    }\n    // If the google.maps.importLibrary function already exists, bootstrap()\n    // won't do anything, so we won't call it\n    if (!importLibraryExists) {\n        bootstrap(options);\n    }\n}\n\nexport { Loader, importLibrary, setOptions };\n//# sourceMappingURL=index.js.map\n","import { deepEqual } from 'fast-equals';\nimport SuperCluster from 'supercluster';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\n\r\nfunction __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n    var e = new Error(message);\r\n    return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\n/**\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * util class that creates a common set of convenience functions to wrap\n * shared behavior of Advanced Markers and Markers.\n */\nclass MarkerUtils {\n    static isAdvancedMarkerAvailable(map) {\n        return (google.maps.marker &&\n            map.getMapCapabilities().isAdvancedMarkersAvailable === true);\n    }\n    static isAdvancedMarker(marker) {\n        return (google.maps.marker &&\n            marker instanceof google.maps.marker.AdvancedMarkerElement);\n    }\n    static setMap(marker, map) {\n        if (this.isAdvancedMarker(marker)) {\n            marker.map = map;\n        }\n        else {\n            marker.setMap(map);\n        }\n    }\n    static getPosition(marker) {\n        // SuperClusterAlgorithm.calculate expects a LatLng instance so we fake it for Adv Markers\n        if (this.isAdvancedMarker(marker)) {\n            if (marker.position) {\n                if (marker.position instanceof google.maps.LatLng) {\n                    return marker.position;\n                }\n                // since we can't cast to LatLngLiteral for reasons =(\n                if (Number.isFinite(marker.position.lat) &&\n                    Number.isFinite(marker.position.lng)) {\n                    return new google.maps.LatLng(marker.position.lat, marker.position.lng);\n                }\n            }\n            // @ts-ignore\n            return new google.maps.LatLng(null);\n        }\n        return marker.getPosition();\n    }\n    static getVisible(marker) {\n        if (this.isAdvancedMarker(marker)) {\n            /**\n             * Always return true for Advanced Markers because the clusterer\n             * uses getVisible as a way to count legacy markers not as an actual\n             * indicator of visibility for some reason. Even when markers are hidden\n             * Marker.getVisible returns `true` and this is used to set the marker count\n             * on the cluster. See the behavior of Cluster.count\n             */\n            return true;\n        }\n        return marker.getVisible();\n    }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Cluster {\n    constructor({ markers, position }) {\n        this.markers = [];\n        if (markers)\n            this.markers = markers;\n        if (position) {\n            if (position instanceof google.maps.LatLng) {\n                this._position = position;\n            }\n            else {\n                this._position = new google.maps.LatLng(position);\n            }\n        }\n    }\n    get bounds() {\n        if (this.markers.length === 0 && !this._position) {\n            return;\n        }\n        const bounds = new google.maps.LatLngBounds(this._position, this._position);\n        for (const marker of this.markers) {\n            bounds.extend(MarkerUtils.getPosition(marker));\n        }\n        return bounds;\n    }\n    get position() {\n        // @ts-ignore\n        return this._position || this.bounds.getCenter();\n    }\n    /**\n     * Get the count of **visible** markers.\n     */\n    get count() {\n        return this.markers.filter((m) => MarkerUtils.getVisible(m)).length;\n    }\n    /**\n     * Add a marker to the cluster.\n     */\n    push(marker) {\n        this.markers.push(marker);\n    }\n    /**\n     * Cleanup references and remove marker from map.\n     */\n    delete() {\n        if (this.marker) {\n            MarkerUtils.setMap(this.marker, null);\n            this.marker = undefined;\n        }\n        this.markers.length = 0;\n    }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A typescript assertion function used in cases where typescript has to be\n * convinced that the object in question can not be null.\n *\n * @param value\n * @param message\n */\nfunction assertNotNull(value, message = \"assertion failed\") {\n    if (value === null || value === undefined) {\n        throw Error(message);\n    }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns the markers visible in a padded map viewport\n *\n * @param map\n * @param mapCanvasProjection\n * @param markers The list of marker to filter\n * @param viewportPaddingPixels The padding in pixel\n * @returns The list of markers in the padded viewport\n */\nconst filterMarkersToPaddedViewport = (map, mapCanvasProjection, markers, viewportPaddingPixels) => {\n    const bounds = map.getBounds();\n    assertNotNull(bounds);\n    const extendedMapBounds = extendBoundsToPaddedViewport(bounds, mapCanvasProjection, viewportPaddingPixels);\n    return markers.filter((marker) => extendedMapBounds.contains(MarkerUtils.getPosition(marker)));\n};\n/**\n * Extends bounds by a number of pixels in each direction\n */\nconst extendBoundsToPaddedViewport = (bounds, projection, numPixels) => {\n    const { northEast, southWest } = latLngBoundsToPixelBounds(bounds, projection);\n    const extendedPixelBounds = extendPixelBounds({ northEast, southWest }, numPixels);\n    return pixelBoundsToLatLngBounds(extendedPixelBounds, projection);\n};\n/**\n * Gets the extended bounds as a bbox [westLng, southLat, eastLng, northLat]\n */\nconst getPaddedViewport = (bounds, projection, pixels) => {\n    const extended = extendBoundsToPaddedViewport(bounds, projection, pixels);\n    const ne = extended.getNorthEast();\n    const sw = extended.getSouthWest();\n    return [sw.lng(), sw.lat(), ne.lng(), ne.lat()];\n};\n/**\n * Returns the distance between 2 positions.\n *\n * @hidden\n */\nconst distanceBetweenPoints = (p1, p2) => {\n    const R = 6371; // Radius of the Earth in km\n    const dLat = ((p2.lat - p1.lat) * Math.PI) / 180;\n    const dLon = ((p2.lng - p1.lng) * Math.PI) / 180;\n    const sinDLat = Math.sin(dLat / 2);\n    const sinDLon = Math.sin(dLon / 2);\n    const a = sinDLat * sinDLat +\n        Math.cos((p1.lat * Math.PI) / 180) *\n            Math.cos((p2.lat * Math.PI) / 180) *\n            sinDLon *\n            sinDLon;\n    const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n    return R * c;\n};\n/**\n * Converts a LatLng bound to pixels.\n *\n * @hidden\n */\nconst latLngBoundsToPixelBounds = (bounds, projection) => {\n    const northEast = projection.fromLatLngToDivPixel(bounds.getNorthEast());\n    const southWest = projection.fromLatLngToDivPixel(bounds.getSouthWest());\n    assertNotNull(northEast);\n    assertNotNull(southWest);\n    return { northEast, southWest };\n};\n/**\n * Extends a pixel bounds by numPixels in all directions.\n *\n * @hidden\n */\nconst extendPixelBounds = ({ northEast, southWest }, numPixels) => {\n    northEast.x += numPixels;\n    northEast.y -= numPixels;\n    southWest.x -= numPixels;\n    southWest.y += numPixels;\n    return { northEast, southWest };\n};\n/**\n * @hidden\n */\nconst pixelBoundsToLatLngBounds = ({ northEast, southWest }, projection) => {\n    const sw = projection.fromDivPixelToLatLng(southWest);\n    const ne = projection.fromDivPixelToLatLng(northEast);\n    return new google.maps.LatLngBounds(sw, ne);\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @hidden\n */\nclass AbstractAlgorithm {\n    constructor({ maxZoom = 16 }) {\n        this.maxZoom = maxZoom;\n    }\n    /**\n     * Helper function to bypass clustering based upon some map state such as\n     * zoom, number of markers, etc.\n     *\n     * ```typescript\n     *  cluster({markers, map}: AlgorithmInput): Cluster[] {\n     *    if (shouldBypassClustering(map)) {\n     *      return this.noop({markers})\n     *    }\n     * }\n     * ```\n     */\n    noop({ markers, }) {\n        return noop(markers);\n    }\n}\n/**\n * Abstract viewport algorithm proves a class to filter markers by a padded\n * viewport. This is a common optimization.\n *\n * @hidden\n */\nclass AbstractViewportAlgorithm extends AbstractAlgorithm {\n    constructor(_a) {\n        var { viewportPadding = 60 } = _a, options = __rest(_a, [\"viewportPadding\"]);\n        super(options);\n        this.viewportPadding = 60;\n        this.viewportPadding = viewportPadding;\n    }\n    calculate({ markers, map, mapCanvasProjection, }) {\n        const zoom = map.getZoom();\n        assertNotNull(zoom);\n        if (zoom >= this.maxZoom) {\n            return {\n                clusters: this.noop({\n                    markers,\n                }),\n                changed: false,\n            };\n        }\n        return {\n            clusters: this.cluster({\n                markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n                map,\n                mapCanvasProjection,\n            }),\n        };\n    }\n}\n/**\n * @hidden\n */\nconst noop = (markers) => {\n    const clusters = markers.map((marker) => new Cluster({\n        position: MarkerUtils.getPosition(marker),\n        markers: [marker],\n    }));\n    return clusters;\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The default Grid algorithm historically used in Google Maps marker\n * clustering.\n *\n * The Grid algorithm does not implement caching and markers may flash as the\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\n */\nclass GridAlgorithm extends AbstractViewportAlgorithm {\n    constructor(_a) {\n        var { maxDistance = 40000, gridSize = 40 } = _a, options = __rest(_a, [\"maxDistance\", \"gridSize\"]);\n        super(options);\n        this.clusters = [];\n        this.state = { zoom: -1 };\n        this.maxDistance = maxDistance;\n        this.gridSize = gridSize;\n    }\n    calculate({ markers, map, mapCanvasProjection, }) {\n        const zoom = map.getZoom();\n        assertNotNull(zoom);\n        const newState = { zoom };\n        let changed = false;\n        if (this.state.zoom >= this.maxZoom && newState.zoom >= this.maxZoom) ;\n        else {\n            changed = !deepEqual(this.state, newState);\n        }\n        this.state = newState;\n        if (zoom >= this.maxZoom) {\n            return {\n                clusters: this.noop({ markers }),\n                changed,\n            };\n        }\n        return {\n            clusters: this.cluster({\n                markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n                map,\n                mapCanvasProjection,\n            }),\n        };\n    }\n    cluster({ markers, map, mapCanvasProjection, }) {\n        this.clusters = [];\n        markers.forEach((marker) => {\n            this.addToClosestCluster(marker, map, mapCanvasProjection);\n        });\n        return this.clusters;\n    }\n    addToClosestCluster(marker, map, projection) {\n        let maxDistance = this.maxDistance; // Some large number\n        let cluster = null;\n        for (let i = 0; i < this.clusters.length; i++) {\n            const candidate = this.clusters[i];\n            assertNotNull(candidate.bounds);\n            const distance = distanceBetweenPoints(candidate.bounds.getCenter().toJSON(), MarkerUtils.getPosition(marker).toJSON());\n            if (distance < maxDistance) {\n                maxDistance = distance;\n                cluster = candidate;\n            }\n        }\n        if (cluster) {\n            assertNotNull(cluster.bounds);\n            if (extendBoundsToPaddedViewport(cluster.bounds, projection, this.gridSize).contains(MarkerUtils.getPosition(marker))) {\n                cluster.push(marker);\n            }\n            else {\n                const cluster = new Cluster({ markers: [marker] });\n                this.clusters.push(cluster);\n            }\n        }\n        else {\n            const cluster = new Cluster({ markers: [marker] });\n            this.clusters.push(cluster);\n        }\n    }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Noop algorithm does not generate any clusters or filter markers by the an extended viewport.\n */\nclass NoopAlgorithm extends AbstractAlgorithm {\n    constructor(_a) {\n        var options = __rest(_a, []);\n        super(options);\n    }\n    calculate({ markers, map, mapCanvasProjection, }) {\n        return {\n            clusters: this.cluster({ markers, map, mapCanvasProjection }),\n            changed: false,\n        };\n    }\n    cluster(input) {\n        return this.noop(input);\n    }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterAlgorithm extends AbstractAlgorithm {\n    constructor(_a) {\n        var { maxZoom, radius = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\"]);\n        super({ maxZoom });\n        this.markers = [];\n        this.clusters = [];\n        this.state = { zoom: -1 };\n        this.superCluster = new SuperCluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n    }\n    calculate(input) {\n        let changed = false;\n        let zoom = input.map.getZoom();\n        assertNotNull(zoom);\n        zoom = Math.round(zoom);\n        const state = { zoom: zoom };\n        if (!deepEqual(input.markers, this.markers)) {\n            changed = true;\n            // TODO use proxy to avoid copy?\n            this.markers = [...input.markers];\n            const points = this.markers.map((marker) => {\n                const position = MarkerUtils.getPosition(marker);\n                const coordinates = [position.lng(), position.lat()];\n                return {\n                    type: \"Feature\",\n                    geometry: { type: \"Point\", coordinates },\n                    properties: { marker },\n                };\n            });\n            this.superCluster.load(points);\n        }\n        if (!changed) {\n            if (this.state.zoom <= this.maxZoom || state.zoom <= this.maxZoom) {\n                changed = !deepEqual(this.state, state);\n            }\n        }\n        this.state = state;\n        // when input is empty, return right away\n        if (input.markers.length === 0) {\n            this.clusters = [];\n            return { clusters: this.clusters, changed };\n        }\n        if (changed) {\n            this.clusters = this.cluster(input);\n        }\n        return { clusters: this.clusters, changed };\n    }\n    cluster({ map }) {\n        const zoom = map.getZoom();\n        assertNotNull(zoom);\n        return this.superCluster\n            .getClusters([-180, -90, 180, 90], Math.round(zoom))\n            .map((feature) => this.transformCluster(feature));\n    }\n    transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n        if (properties.cluster) {\n            return new Cluster({\n                markers: this.superCluster\n                    .getLeaves(properties.cluster_id, Infinity)\n                    .map((leaf) => leaf.properties.marker),\n                position: { lat, lng },\n            });\n        }\n        const marker = properties.marker;\n        return new Cluster({\n            markers: [marker],\n            position: MarkerUtils.getPosition(marker),\n        });\n    }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterViewportAlgorithm extends AbstractViewportAlgorithm {\n    constructor(_a) {\n        var { maxZoom, radius = 60, viewportPadding = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\", \"viewportPadding\"]);\n        super({ maxZoom, viewportPadding });\n        this.markers = [];\n        this.clusters = [];\n        this.superCluster = new SuperCluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n        this.state = { zoom: -1, view: [0, 0, 0, 0] };\n    }\n    calculate(input) {\n        const state = this.getViewportState(input);\n        let changed = !deepEqual(this.state, state);\n        if (!deepEqual(input.markers, this.markers)) {\n            changed = true;\n            // TODO use proxy to avoid copy?\n            this.markers = [...input.markers];\n            const points = this.markers.map((marker) => {\n                const position = MarkerUtils.getPosition(marker);\n                const coordinates = [position.lng(), position.lat()];\n                return {\n                    type: \"Feature\",\n                    geometry: {\n                        type: \"Point\",\n                        coordinates,\n                    },\n                    properties: { marker },\n                };\n            });\n            this.superCluster.load(points);\n        }\n        if (changed) {\n            this.clusters = this.cluster(input);\n            this.state = state;\n        }\n        return { clusters: this.clusters, changed };\n    }\n    cluster(input) {\n        /* recalculate new state because we can't use the cached version. */\n        const state = this.getViewportState(input);\n        return this.superCluster\n            .getClusters(state.view, state.zoom)\n            .map((feature) => this.transformCluster(feature));\n    }\n    transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n        if (properties.cluster) {\n            return new Cluster({\n                markers: this.superCluster\n                    .getLeaves(properties.cluster_id, Infinity)\n                    .map((leaf) => leaf.properties.marker),\n                position: { lat, lng },\n            });\n        }\n        const marker = properties.marker;\n        return new Cluster({\n            markers: [marker],\n            position: MarkerUtils.getPosition(marker),\n        });\n    }\n    getViewportState(input) {\n        const mapZoom = input.map.getZoom();\n        const mapBounds = input.map.getBounds();\n        assertNotNull(mapZoom);\n        assertNotNull(mapBounds);\n        return {\n            zoom: Math.round(mapZoom),\n            view: getPaddedViewport(mapBounds, input.mapCanvasProjection, this.viewportPadding),\n        };\n    }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides statistics on all clusters in the current render cycle for use in {@link Renderer.render}.\n */\nclass ClusterStats {\n    constructor(markers, clusters) {\n        this.markers = { sum: markers.length };\n        const clusterMarkerCounts = clusters.map((a) => a.count);\n        const clusterMarkerSum = clusterMarkerCounts.reduce((a, b) => a + b, 0);\n        this.clusters = {\n            count: clusters.length,\n            markers: {\n                mean: clusterMarkerSum / clusters.length,\n                sum: clusterMarkerSum,\n                min: Math.min(...clusterMarkerCounts),\n                max: Math.max(...clusterMarkerCounts),\n            },\n        };\n    }\n}\nclass DefaultRenderer {\n    /**\n     * The default render function for the library used by {@link MarkerClusterer}.\n     *\n     * Currently set to use the following:\n     *\n     * ```typescript\n     * // change color if this cluster has more markers than the mean cluster\n     * const color =\n     *   count > Math.max(10, stats.clusters.markers.mean)\n     *     ? \"#ff0000\"\n     *     : \"#0000ff\";\n     *\n     * // create svg url with fill color\n     * const svg = window.btoa(`\n     * <svg fill=\"${color}\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\">\n     *   <circle cx=\"120\" cy=\"120\" opacity=\".6\" r=\"70\" />\n     *   <circle cx=\"120\" cy=\"120\" opacity=\".3\" r=\"90\" />\n     *   <circle cx=\"120\" cy=\"120\" opacity=\".2\" r=\"110\" />\n     *   <circle cx=\"120\" cy=\"120\" opacity=\".1\" r=\"130\" />\n     * </svg>`);\n     *\n     * // create marker using svg icon\n     * return new google.maps.Marker({\n     *   position,\n     *   icon: {\n     *     url: `data:image/svg+xml;base64,${svg}`,\n     *     scaledSize: new google.maps.Size(45, 45),\n     *   },\n     *   label: {\n     *     text: String(count),\n     *     color: \"rgba(255,255,255,0.9)\",\n     *     fontSize: \"12px\",\n     *   },\n     *   // adjust zIndex to be above other markers\n     *   zIndex: 1000 + count,\n     * });\n     * ```\n     */\n    render({ count, position }, stats, map) {\n        // change color if this cluster has more markers than the mean cluster\n        const color = count > Math.max(10, stats.clusters.markers.mean) ? \"#ff0000\" : \"#0000ff\";\n        // create svg literal with fill color\n        const svg = `<svg fill=\"${color}\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"50\" height=\"50\">\n<circle cx=\"120\" cy=\"120\" opacity=\".6\" r=\"70\" />\n<circle cx=\"120\" cy=\"120\" opacity=\".3\" r=\"90\" />\n<circle cx=\"120\" cy=\"120\" opacity=\".2\" r=\"110\" />\n<text x=\"50%\" y=\"50%\" style=\"fill:#fff\" text-anchor=\"middle\" font-size=\"50\" dominant-baseline=\"middle\" font-family=\"roboto,arial,sans-serif\">${count}</text>\n</svg>`;\n        const title = `Cluster of ${count} markers`, \n        // adjust zIndex to be above other markers\n        zIndex = Number(google.maps.Marker.MAX_ZINDEX) + count;\n        if (MarkerUtils.isAdvancedMarkerAvailable(map)) {\n            // create cluster SVG element\n            const parser = new DOMParser();\n            const svgEl = parser.parseFromString(svg, \"image/svg+xml\").documentElement;\n            svgEl.setAttribute(\"transform\", \"translate(0 25)\");\n            const clusterOptions = {\n                map,\n                position,\n                zIndex,\n                title,\n                content: svgEl,\n            };\n            return new google.maps.marker.AdvancedMarkerElement(clusterOptions);\n        }\n        const clusterOptions = {\n            position,\n            zIndex,\n            title,\n            icon: {\n                url: `data:image/svg+xml;base64,${btoa(svg)}`,\n                anchor: new google.maps.Point(25, 25),\n            },\n        };\n        return new google.maps.Marker(clusterOptions);\n    }\n}\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Extends an object's prototype by another's.\n *\n * @param type1 The Type to be extended.\n * @param type2 The Type to extend with.\n * @ignore\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extend(type1, type2) {\n    /* istanbul ignore next */\n    // eslint-disable-next-line prefer-const\n    for (let property in type2.prototype) {\n        type1.prototype[property] = type2.prototype[property];\n    }\n}\n/**\n * @ignore\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nclass OverlayViewSafe {\n    constructor() {\n        // MarkerClusterer implements google.maps.OverlayView interface. We use the\n        // extend function to extend MarkerClusterer with google.maps.OverlayView\n        // because it might not always be available when the code is defined so we\n        // look for it at the last possible moment. If it doesn't exist now then\n        // there is no point going ahead :)\n        extend(OverlayViewSafe, google.maps.OverlayView);\n    }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar MarkerClustererEvents;\n(function (MarkerClustererEvents) {\n    MarkerClustererEvents[\"CLUSTERING_BEGIN\"] = \"clusteringbegin\";\n    MarkerClustererEvents[\"CLUSTERING_END\"] = \"clusteringend\";\n    MarkerClustererEvents[\"CLUSTER_CLICK\"] = \"click\";\n    MarkerClustererEvents[\"GMP_CLICK\"] = \"gmp-click\";\n})(MarkerClustererEvents || (MarkerClustererEvents = {}));\nconst defaultOnClusterClickHandler = (_, cluster, map) => {\n    if (cluster.bounds)\n        map.fitBounds(cluster.bounds);\n};\n/**\n * MarkerClusterer creates and manages per-zoom-level clusters for large amounts\n * of markers. See {@link MarkerClustererOptions} for more details.\n *\n */\nclass MarkerClusterer extends OverlayViewSafe {\n    constructor({ map, markers = [], algorithmOptions = {}, algorithm = new SuperClusterAlgorithm(algorithmOptions), renderer = new DefaultRenderer(), onClusterClick = defaultOnClusterClickHandler, }) {\n        super();\n        /** @see {@link MarkerClustererOptions.map} */\n        this.map = null;\n        this.idleListener = null;\n        this.markers = [...markers];\n        this.clusters = [];\n        this.algorithm = algorithm;\n        this.renderer = renderer;\n        this.onClusterClick = onClusterClick;\n        if (map) {\n            this.setMap(map);\n        }\n    }\n    addMarker(marker, noDraw) {\n        if (this.markers.includes(marker)) {\n            return;\n        }\n        this.markers.push(marker);\n        if (!noDraw) {\n            this.render();\n        }\n    }\n    addMarkers(markers, noDraw) {\n        markers.forEach((marker) => {\n            this.addMarker(marker, true);\n        });\n        if (!noDraw) {\n            this.render();\n        }\n    }\n    removeMarker(marker, noDraw) {\n        const index = this.markers.indexOf(marker);\n        if (index === -1) {\n            // Marker is not in our list of markers, so do nothing:\n            return false;\n        }\n        MarkerUtils.setMap(marker, null);\n        this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n        if (!noDraw) {\n            this.render();\n        }\n        return true;\n    }\n    removeMarkers(markers, noDraw) {\n        let removed = false;\n        markers.forEach((marker) => {\n            removed = this.removeMarker(marker, true) || removed;\n        });\n        if (removed && !noDraw) {\n            this.render();\n        }\n        return removed;\n    }\n    clearMarkers(noDraw) {\n        this.markers.length = 0;\n        if (!noDraw) {\n            this.render();\n        }\n    }\n    /**\n     * Recalculates and draws all the marker clusters.\n     */\n    render() {\n        const map = this.getMap();\n        if (map instanceof google.maps.Map && map.getProjection()) {\n            google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);\n            const { clusters, changed } = this.algorithm.calculate({\n                markers: this.markers,\n                map,\n                mapCanvasProjection: this.getProjection(),\n            });\n            // Allow algorithms to return flag on whether the clusters/markers have changed.\n            if (changed || changed == undefined) {\n                // Accumulate the markers of the clusters composed of a single marker.\n                // Those clusters directly use the marker.\n                // Clusters with more than one markers use a group marker generated by a renderer.\n                const singleMarker = new Set();\n                for (const cluster of clusters) {\n                    if (cluster.markers.length == 1) {\n                        singleMarker.add(cluster.markers[0]);\n                    }\n                }\n                const groupMarkers = [];\n                // Iterate the clusters that are currently rendered.\n                for (const cluster of this.clusters) {\n                    if (cluster.marker == null) {\n                        continue;\n                    }\n                    if (cluster.markers.length == 1) {\n                        if (!singleMarker.has(cluster.marker)) {\n                            // The marker:\n                            // - was previously rendered because it is from a cluster with 1 marker,\n                            // - should no more be rendered as it is not in singleMarker.\n                            MarkerUtils.setMap(cluster.marker, null);\n                        }\n                    }\n                    else {\n                        // Delay the removal of old group markers to avoid flickering.\n                        groupMarkers.push(cluster.marker);\n                    }\n                }\n                this.clusters = clusters;\n                this.renderClusters();\n                // Delayed removal of the markers of the former groups.\n                requestAnimationFrame(() => groupMarkers.forEach((marker) => MarkerUtils.setMap(marker, null)));\n            }\n            google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_END, this);\n        }\n    }\n    onAdd() {\n        const map = this.getMap();\n        assertNotNull(map);\n        this.idleListener = map.addListener(\"idle\", this.render.bind(this));\n        this.render();\n    }\n    onRemove() {\n        if (this.idleListener)\n            google.maps.event.removeListener(this.idleListener);\n        this.reset();\n    }\n    reset() {\n        this.markers.forEach((marker) => MarkerUtils.setMap(marker, null));\n        this.clusters.forEach((cluster) => cluster.delete());\n        this.clusters = [];\n    }\n    renderClusters() {\n        // Generate stats to pass to renderers.\n        const stats = new ClusterStats(this.markers, this.clusters);\n        const map = this.getMap();\n        this.clusters.forEach((cluster) => {\n            if (cluster.markers.length === 1) {\n                cluster.marker = cluster.markers[0];\n            }\n            else {\n                // Generate the marker to represent the group.\n                cluster.marker = this.renderer.render(cluster, stats, map);\n                // Make sure all individual markers are removed from the map.\n                cluster.markers.forEach((marker) => MarkerUtils.setMap(marker, null));\n                if (this.onClusterClick) {\n                    // legacy Marker uses 'click' events, whereas AdvancedMarkerElement uses 'gmp-click'\n                    const markerClickEventName = MarkerUtils.isAdvancedMarker(cluster.marker)\n                        ? MarkerClustererEvents.GMP_CLICK\n                        : MarkerClustererEvents.CLUSTER_CLICK;\n                    cluster.marker.addListener(markerClickEventName, \n                    /* istanbul ignore next */\n                    (event) => {\n                        google.maps.event.trigger(this, MarkerClustererEvents.CLUSTER_CLICK, cluster);\n                        this.onClusterClick(event, cluster, map);\n                    });\n                }\n            }\n            MarkerUtils.setMap(cluster.marker, map);\n        });\n    }\n}\n\nexport { AbstractAlgorithm, AbstractViewportAlgorithm, Cluster, ClusterStats, DefaultRenderer, GridAlgorithm, MarkerClusterer, MarkerClustererEvents, MarkerUtils, NoopAlgorithm, SuperClusterAlgorithm, SuperClusterViewportAlgorithm, defaultOnClusterClickHandler, distanceBetweenPoints, extendBoundsToPaddedViewport, extendPixelBounds, filterMarkersToPaddedViewport, getPaddedViewport, noop, pixelBoundsToLatLngBounds };\n//# sourceMappingURL=index.esm.mjs.map\n","\nimport KDBush from 'kdbush';\n\nconst defaultOptions = {\n    minZoom: 0,   // min zoom to generate clusters on\n    maxZoom: 16,  // max zoom level to cluster the points on\n    minPoints: 2, // minimum points to form a cluster\n    radius: 40,   // cluster radius in pixels\n    extent: 512,  // tile extent (radius is calculated relative to it)\n    nodeSize: 64, // size of the KD-tree leaf node, affects performance\n    log: false,   // whether to log timing info\n\n    // whether to generate numeric ids for input features (in vector tiles)\n    generateId: false,\n\n    // a reduce function for calculating custom cluster properties\n    reduce: null, // (accumulated, props) => { accumulated.sum += props.sum; }\n\n    // properties to use for individual points when running the reducer\n    map: props => props // props => ({sum: props.my_value})\n};\n\nconst fround = Math.fround || (tmp => ((x) => { tmp[0] = +x; return tmp[0]; }))(new Float32Array(1));\n\nconst OFFSET_ZOOM = 2;\nconst OFFSET_ID = 3;\nconst OFFSET_PARENT = 4;\nconst OFFSET_NUM = 5;\nconst OFFSET_PROP = 6;\n\nexport default class Supercluster {\n    constructor(options) {\n        this.options = Object.assign(Object.create(defaultOptions), options);\n        this.trees = new Array(this.options.maxZoom + 1);\n        this.stride = this.options.reduce ? 7 : 6;\n        this.clusterProps = [];\n    }\n\n    load(points) {\n        const {log, minZoom, maxZoom} = this.options;\n\n        if (log) console.time('total time');\n\n        const timerId = `prepare ${  points.length  } points`;\n        if (log) console.time(timerId);\n\n        this.points = points;\n\n        // generate a cluster object for each point and index input points into a KD-tree\n        const data = [];\n\n        for (let i = 0; i < points.length; i++) {\n            const p = points[i];\n            if (!p.geometry) continue;\n\n            const [lng, lat] = p.geometry.coordinates;\n            const x = fround(lngX(lng));\n            const y = fround(latY(lat));\n            // store internal point/cluster data in flat numeric arrays for performance\n            data.push(\n                x, y, // projected point coordinates\n                Infinity, // the last zoom the point was processed at\n                i, // index of the source feature in the original input array\n                -1, // parent cluster id\n                1 // number of points in a cluster\n            );\n            if (this.options.reduce) data.push(0); // noop\n        }\n        let tree = this.trees[maxZoom + 1] = this._createTree(data);\n\n        if (log) console.timeEnd(timerId);\n\n        // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n        // results in a cluster hierarchy across zoom levels\n        for (let z = maxZoom; z >= minZoom; z--) {\n            const now = +Date.now();\n\n            // create a new set of clusters for the zoom and index them with a KD-tree\n            tree = this.trees[z] = this._createTree(this._cluster(tree, z));\n\n            if (log) console.log('z%d: %d clusters in %dms', z, tree.numItems, +Date.now() - now);\n        }\n\n        if (log) console.timeEnd('total time');\n\n        return this;\n    }\n\n    getClusters(bbox, zoom) {\n        let minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180;\n        const minLat = Math.max(-90, Math.min(90, bbox[1]));\n        let maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180;\n        const maxLat = Math.max(-90, Math.min(90, bbox[3]));\n\n        if (bbox[2] - bbox[0] >= 360) {\n            minLng = -180;\n            maxLng = 180;\n        } else if (minLng > maxLng) {\n            const easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom);\n            const westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom);\n            return easternHem.concat(westernHem);\n        }\n\n        const tree = this.trees[this._limitZoom(zoom)];\n        const ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));\n        const data = tree.data;\n        const clusters = [];\n        for (const id of ids) {\n            const k = this.stride * id;\n            clusters.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n        }\n        return clusters;\n    }\n\n    getChildren(clusterId) {\n        const originId = this._getOriginId(clusterId);\n        const originZoom = this._getOriginZoom(clusterId);\n        const errorMsg = 'No cluster with the specified id.';\n\n        const tree = this.trees[originZoom];\n        if (!tree) throw new Error(errorMsg);\n\n        const data = tree.data;\n        if (originId * this.stride >= data.length) throw new Error(errorMsg);\n\n        const r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));\n        const x = data[originId * this.stride];\n        const y = data[originId * this.stride + 1];\n        const ids = tree.within(x, y, r);\n        const children = [];\n        for (const id of ids) {\n            const k = id * this.stride;\n            if (data[k + OFFSET_PARENT] === clusterId) {\n                children.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n            }\n        }\n\n        if (children.length === 0) throw new Error(errorMsg);\n\n        return children;\n    }\n\n    getLeaves(clusterId, limit, offset) {\n        limit = limit || 10;\n        offset = offset || 0;\n\n        const leaves = [];\n        this._appendLeaves(leaves, clusterId, limit, offset, 0);\n\n        return leaves;\n    }\n\n    getTile(z, x, y) {\n        const tree = this.trees[this._limitZoom(z)];\n        const z2 = Math.pow(2, z);\n        const {extent, radius} = this.options;\n        const p = radius / extent;\n        const top = (y - p) / z2;\n        const bottom = (y + 1 + p) / z2;\n\n        const tile = {\n            features: []\n        };\n\n        this._addTileFeatures(\n            tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom),\n            tree.data, x, y, z2, tile);\n\n        if (x === 0) {\n            this._addTileFeatures(\n                tree.range(1 - p / z2, top, 1, bottom),\n                tree.data, z2, y, z2, tile);\n        }\n        if (x === z2 - 1) {\n            this._addTileFeatures(\n                tree.range(0, top, p / z2, bottom),\n                tree.data, -1, y, z2, tile);\n        }\n\n        return tile.features.length ? tile : null;\n    }\n\n    getClusterExpansionZoom(clusterId) {\n        let expansionZoom = this._getOriginZoom(clusterId) - 1;\n        while (expansionZoom <= this.options.maxZoom) {\n            const children = this.getChildren(clusterId);\n            expansionZoom++;\n            if (children.length !== 1) break;\n            clusterId = children[0].properties.cluster_id;\n        }\n        return expansionZoom;\n    }\n\n    _appendLeaves(result, clusterId, limit, offset, skipped) {\n        const children = this.getChildren(clusterId);\n\n        for (const child of children) {\n            const props = child.properties;\n\n            if (props && props.cluster) {\n                if (skipped + props.point_count <= offset) {\n                    // skip the whole cluster\n                    skipped += props.point_count;\n                } else {\n                    // enter the cluster\n                    skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped);\n                    // exit the cluster\n                }\n            } else if (skipped < offset) {\n                // skip a single point\n                skipped++;\n            } else {\n                // add a single point\n                result.push(child);\n            }\n            if (result.length === limit) break;\n        }\n\n        return skipped;\n    }\n\n    _createTree(data) {\n        const tree = new KDBush(data.length / this.stride | 0, this.options.nodeSize, Float32Array);\n        for (let i = 0; i < data.length; i += this.stride) tree.add(data[i], data[i + 1]);\n        tree.finish();\n        tree.data = data;\n        return tree;\n    }\n\n    _addTileFeatures(ids, data, x, y, z2, tile) {\n        for (const i of ids) {\n            const k = i * this.stride;\n            const isCluster = data[k + OFFSET_NUM] > 1;\n\n            let tags, px, py;\n            if (isCluster) {\n                tags = getClusterProperties(data, k, this.clusterProps);\n                px = data[k];\n                py = data[k + 1];\n            } else {\n                const p = this.points[data[k + OFFSET_ID]];\n                tags = p.properties;\n                const [lng, lat] = p.geometry.coordinates;\n                px = lngX(lng);\n                py = latY(lat);\n            }\n\n            const f = {\n                type: 1,\n                geometry: [[\n                    Math.round(this.options.extent * (px * z2 - x)),\n                    Math.round(this.options.extent * (py * z2 - y))\n                ]],\n                tags\n            };\n\n            // assign id\n            let id;\n            if (isCluster || this.options.generateId) {\n                // optionally generate id for points\n                id = data[k + OFFSET_ID];\n            } else {\n                // keep id if already assigned\n                id = this.points[data[k + OFFSET_ID]].id;\n            }\n\n            if (id !== undefined) f.id = id;\n\n            tile.features.push(f);\n        }\n    }\n\n    _limitZoom(z) {\n        return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));\n    }\n\n    _cluster(tree, zoom) {\n        const {radius, extent, reduce, minPoints} = this.options;\n        const r = radius / (extent * Math.pow(2, zoom));\n        const data = tree.data;\n        const nextData = [];\n        const stride = this.stride;\n\n        // loop through each point\n        for (let i = 0; i < data.length; i += stride) {\n            // if we've already visited the point at this zoom level, skip it\n            if (data[i + OFFSET_ZOOM] <= zoom) continue;\n            data[i + OFFSET_ZOOM] = zoom;\n\n            // find all nearby points\n            const x = data[i];\n            const y = data[i + 1];\n            const neighborIds = tree.within(data[i], data[i + 1], r);\n\n            const numPointsOrigin = data[i + OFFSET_NUM];\n            let numPoints = numPointsOrigin;\n\n            // count the number of points in a potential cluster\n            for (const neighborId of neighborIds) {\n                const k = neighborId * stride;\n                // filter out neighbors that are already processed\n                if (data[k + OFFSET_ZOOM] > zoom) numPoints += data[k + OFFSET_NUM];\n            }\n\n            // if there were neighbors to merge, and there are enough points to form a cluster\n            if (numPoints > numPointsOrigin && numPoints >= minPoints) {\n                let wx = x * numPointsOrigin;\n                let wy = y * numPointsOrigin;\n\n                let clusterProperties;\n                let clusterPropIndex = -1;\n\n                // encode both zoom and point index on which the cluster originated -- offset by total length of features\n                const id = ((i / stride | 0) << 5) + (zoom + 1) + this.points.length;\n\n                for (const neighborId of neighborIds) {\n                    const k = neighborId * stride;\n\n                    if (data[k + OFFSET_ZOOM] <= zoom) continue;\n                    data[k + OFFSET_ZOOM] = zoom; // save the zoom (so it doesn't get processed twice)\n\n                    const numPoints2 = data[k + OFFSET_NUM];\n                    wx += data[k] * numPoints2; // accumulate coordinates for calculating weighted center\n                    wy += data[k + 1] * numPoints2;\n\n                    data[k + OFFSET_PARENT] = id;\n\n                    if (reduce) {\n                        if (!clusterProperties) {\n                            clusterProperties = this._map(data, i, true);\n                            clusterPropIndex = this.clusterProps.length;\n                            this.clusterProps.push(clusterProperties);\n                        }\n                        reduce(clusterProperties, this._map(data, k));\n                    }\n                }\n\n                data[i + OFFSET_PARENT] = id;\n                nextData.push(wx / numPoints, wy / numPoints, Infinity, id, -1, numPoints);\n                if (reduce) nextData.push(clusterPropIndex);\n\n            } else { // left points as unclustered\n                for (let j = 0; j < stride; j++) nextData.push(data[i + j]);\n\n                if (numPoints > 1) {\n                    for (const neighborId of neighborIds) {\n                        const k = neighborId * stride;\n                        if (data[k + OFFSET_ZOOM] <= zoom) continue;\n                        data[k + OFFSET_ZOOM] = zoom;\n                        for (let j = 0; j < stride; j++) nextData.push(data[k + j]);\n                    }\n                }\n            }\n        }\n\n        return nextData;\n    }\n\n    // get index of the point from which the cluster originated\n    _getOriginId(clusterId) {\n        return (clusterId - this.points.length) >> 5;\n    }\n\n    // get zoom of the point from which the cluster originated\n    _getOriginZoom(clusterId) {\n        return (clusterId - this.points.length) % 32;\n    }\n\n    _map(data, i, clone) {\n        if (data[i + OFFSET_NUM] > 1) {\n            const props = this.clusterProps[data[i + OFFSET_PROP]];\n            return clone ? Object.assign({}, props) : props;\n        }\n        const original = this.points[data[i + OFFSET_ID]].properties;\n        const result = this.options.map(original);\n        return clone && result === original ? Object.assign({}, result) : result;\n    }\n}\n\nfunction getClusterJSON(data, i, clusterProps) {\n    return {\n        type: 'Feature',\n        id: data[i + OFFSET_ID],\n        properties: getClusterProperties(data, i, clusterProps),\n        geometry: {\n            type: 'Point',\n            coordinates: [xLng(data[i]), yLat(data[i + 1])]\n        }\n    };\n}\n\nfunction getClusterProperties(data, i, clusterProps) {\n    const count = data[i + OFFSET_NUM];\n    const abbrev =\n        count >= 10000 ? `${Math.round(count / 1000)  }k` :\n        count >= 1000 ? `${Math.round(count / 100) / 10  }k` : count;\n    const propIndex = data[i + OFFSET_PROP];\n    const properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);\n    return Object.assign(properties, {\n        cluster: true,\n        cluster_id: data[i + OFFSET_ID],\n        point_count: count,\n        point_count_abbreviated: abbrev\n    });\n}\n\n// longitude/latitude to spherical mercator in [0..1] range\nfunction lngX(lng) {\n    return lng / 360 + 0.5;\n}\nfunction latY(lat) {\n    const sin = Math.sin(lat * Math.PI / 180);\n    const y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);\n    return y < 0 ? 0 : y > 1 ? 1 : y;\n}\n\n// spherical mercator to longitude/latitude\nfunction xLng(x) {\n    return (x - 0.5) * 360;\n}\nfunction yLat(y) {\n    const y2 = (180 - y * 360) * Math.PI / 180;\n    return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n}\n","const { getOwnPropertyNames, getOwnPropertySymbols } = Object;\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst { hasOwnProperty } = Object.prototype;\n/**\n * Combine two comparators into a single comparators.\n */\nfunction combineComparators(comparatorA, comparatorB) {\n    return function isEqual(a, b, state) {\n        return comparatorA(a, b, state) && comparatorB(a, b, state);\n    };\n}\n/**\n * Wrap the provided `areItemsEqual` method to manage the circular state, allowing\n * for circular references to be safely included in the comparison without creating\n * stack overflows.\n */\nfunction createIsCircular(areItemsEqual) {\n    return function isCircular(a, b, state) {\n        if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n            return areItemsEqual(a, b, state);\n        }\n        const { cache } = state;\n        const cachedA = cache.get(a);\n        const cachedB = cache.get(b);\n        if (cachedA && cachedB) {\n            return cachedA === b && cachedB === a;\n        }\n        cache.set(a, b);\n        cache.set(b, a);\n        const result = areItemsEqual(a, b, state);\n        cache.delete(a);\n        cache.delete(b);\n        return result;\n    };\n}\n/**\n * Get the `@@toStringTag` of the value, if it exists.\n */\nfunction getShortTag(value) {\n    return value != null ? value[Symbol.toStringTag] : undefined;\n}\n/**\n * Get the properties to strictly examine, which include both own properties that are\n * not enumerable and symbol properties.\n */\nfunction getStrictProperties(object) {\n    return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));\n}\n/**\n * Whether the object contains the property passed as an own property.\n */\nconst hasOwn = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nObject.hasOwn || ((object, property) => hasOwnProperty.call(object, property));\n/**\n * Whether the values passed are strictly equal or both NaN.\n */\nfunction sameValueZeroEqual(a, b) {\n    return a === b || (!a && !b && a !== a && b !== b);\n}\n\nconst PREACT_VNODE = '__v';\nconst PREACT_OWNER = '__o';\nconst REACT_OWNER = '_owner';\nconst { getOwnPropertyDescriptor, keys } = Object;\n/**\n * Whether the array buffers are equal in value.\n */\nfunction areArrayBuffersEqual(a, b) {\n    return a.byteLength === b.byteLength && areTypedArraysEqual(new Uint8Array(a), new Uint8Array(b));\n}\n/**\n * Whether the arrays are equal in value.\n */\nfunction areArraysEqual(a, b, state) {\n    let index = a.length;\n    if (b.length !== index) {\n        return false;\n    }\n    while (index-- > 0) {\n        if (!state.equals(a[index], b[index], index, index, a, b, state)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Whether the dataviews are equal in value.\n */\nfunction areDataViewsEqual(a, b) {\n    return (a.byteLength === b.byteLength\n        && areTypedArraysEqual(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)));\n}\n/**\n * Whether the dates passed are equal in value.\n */\nfunction areDatesEqual(a, b) {\n    return sameValueZeroEqual(a.getTime(), b.getTime());\n}\n/**\n * Whether the errors passed are equal in value.\n */\nfunction areErrorsEqual(a, b) {\n    return a.name === b.name && a.message === b.message && a.cause === b.cause && a.stack === b.stack;\n}\n/**\n * Whether the functions passed are equal in value.\n */\nfunction areFunctionsEqual(a, b) {\n    return a === b;\n}\n/**\n * Whether the `Map`s are equal in value.\n */\nfunction areMapsEqual(a, b, state) {\n    const size = a.size;\n    if (size !== b.size) {\n        return false;\n    }\n    if (!size) {\n        return true;\n    }\n    const matchedIndices = new Array(size);\n    const aIterable = a.entries();\n    let aResult;\n    let bResult;\n    let index = 0;\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    while ((aResult = aIterable.next())) {\n        if (aResult.done) {\n            break;\n        }\n        const bIterable = b.entries();\n        let hasMatch = false;\n        let matchIndex = 0;\n        // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n        while ((bResult = bIterable.next())) {\n            if (bResult.done) {\n                break;\n            }\n            if (matchedIndices[matchIndex]) {\n                matchIndex++;\n                continue;\n            }\n            const aEntry = aResult.value;\n            const bEntry = bResult.value;\n            if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state)\n                && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {\n                hasMatch = matchedIndices[matchIndex] = true;\n                break;\n            }\n            matchIndex++;\n        }\n        if (!hasMatch) {\n            return false;\n        }\n        index++;\n    }\n    return true;\n}\n/**\n * Whether the numbers are equal in value.\n */\nconst areNumbersEqual = sameValueZeroEqual;\n/**\n * Whether the objects are equal in value.\n */\nfunction areObjectsEqual(a, b, state) {\n    const properties = keys(a);\n    let index = properties.length;\n    if (keys(b).length !== index) {\n        return false;\n    }\n    // Decrementing `while` showed faster results than either incrementing or\n    // decrementing `for` loop and than an incrementing `while` loop. Declarative\n    // methods like `some` / `every` were not used to avoid incurring the garbage\n    // cost of anonymous callbacks.\n    while (index-- > 0) {\n        if (!isPropertyEqual(a, b, state, properties[index])) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Whether the objects are equal in value with strict property checking.\n */\nfunction areObjectsEqualStrict(a, b, state) {\n    const properties = getStrictProperties(a);\n    let index = properties.length;\n    if (getStrictProperties(b).length !== index) {\n        return false;\n    }\n    let property;\n    let descriptorA;\n    let descriptorB;\n    // Decrementing `while` showed faster results than either incrementing or\n    // decrementing `for` loop and than an incrementing `while` loop. Declarative\n    // methods like `some` / `every` were not used to avoid incurring the garbage\n    // cost of anonymous callbacks.\n    while (index-- > 0) {\n        property = properties[index];\n        if (!isPropertyEqual(a, b, state, property)) {\n            return false;\n        }\n        descriptorA = getOwnPropertyDescriptor(a, property);\n        descriptorB = getOwnPropertyDescriptor(b, property);\n        if ((descriptorA || descriptorB)\n            && (!descriptorA\n                || !descriptorB\n                || descriptorA.configurable !== descriptorB.configurable\n                || descriptorA.enumerable !== descriptorB.enumerable\n                || descriptorA.writable !== descriptorB.writable)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Whether the primitive wrappers passed are equal in value.\n */\nfunction arePrimitiveWrappersEqual(a, b) {\n    return sameValueZeroEqual(a.valueOf(), b.valueOf());\n}\n/**\n * Whether the regexps passed are equal in value.\n */\nfunction areRegExpsEqual(a, b) {\n    return a.source === b.source && a.flags === b.flags;\n}\n/**\n * Whether the `Set`s are equal in value.\n */\nfunction areSetsEqual(a, b, state) {\n    const size = a.size;\n    if (size !== b.size) {\n        return false;\n    }\n    if (!size) {\n        return true;\n    }\n    const matchedIndices = new Array(size);\n    const aIterable = a.values();\n    let aResult;\n    let bResult;\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    while ((aResult = aIterable.next())) {\n        if (aResult.done) {\n            break;\n        }\n        const bIterable = b.values();\n        let hasMatch = false;\n        let matchIndex = 0;\n        // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n        while ((bResult = bIterable.next())) {\n            if (bResult.done) {\n                break;\n            }\n            if (!matchedIndices[matchIndex]\n                && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {\n                hasMatch = matchedIndices[matchIndex] = true;\n                break;\n            }\n            matchIndex++;\n        }\n        if (!hasMatch) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Whether the TypedArray instances are equal in value.\n */\nfunction areTypedArraysEqual(a, b) {\n    let index = a.byteLength;\n    if (b.byteLength !== index || a.byteOffset !== b.byteOffset) {\n        return false;\n    }\n    while (index-- > 0) {\n        if (a[index] !== b[index]) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Whether the URL instances are equal in value.\n */\nfunction areUrlsEqual(a, b) {\n    return (a.hostname === b.hostname\n        && a.pathname === b.pathname\n        && a.protocol === b.protocol\n        && a.port === b.port\n        && a.hash === b.hash\n        && a.username === b.username\n        && a.password === b.password);\n}\nfunction isPropertyEqual(a, b, state, property) {\n    if ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE)\n        && (a.$$typeof || b.$$typeof)) {\n        return true;\n    }\n    return hasOwn(b, property) && state.equals(a[property], b[property], property, property, a, b, state);\n}\n\nconst ARRAY_BUFFER_TAG = '[object ArrayBuffer]';\nconst ARGUMENTS_TAG = '[object Arguments]';\nconst BOOLEAN_TAG = '[object Boolean]';\nconst DATA_VIEW_TAG = '[object DataView]';\nconst DATE_TAG = '[object Date]';\nconst ERROR_TAG = '[object Error]';\nconst MAP_TAG = '[object Map]';\nconst NUMBER_TAG = '[object Number]';\nconst OBJECT_TAG = '[object Object]';\nconst REG_EXP_TAG = '[object RegExp]';\nconst SET_TAG = '[object Set]';\nconst STRING_TAG = '[object String]';\nconst TYPED_ARRAY_TAGS = {\n    '[object Int8Array]': true,\n    '[object Uint8Array]': true,\n    '[object Uint8ClampedArray]': true,\n    '[object Int16Array]': true,\n    '[object Uint16Array]': true,\n    '[object Int32Array]': true,\n    '[object Uint32Array]': true,\n    '[object Float16Array]': true,\n    '[object Float32Array]': true,\n    '[object Float64Array]': true,\n    '[object BigInt64Array]': true,\n    '[object BigUint64Array]': true,\n};\nconst URL_TAG = '[object URL]';\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst toString = Object.prototype.toString;\n/**\n * Create a comparator method based on the type-specific equality comparators passed.\n */\nfunction createEqualityComparator({ areArrayBuffersEqual, areArraysEqual, areDataViewsEqual, areDatesEqual, areErrorsEqual, areFunctionsEqual, areMapsEqual, areNumbersEqual, areObjectsEqual, arePrimitiveWrappersEqual, areRegExpsEqual, areSetsEqual, areTypedArraysEqual, areUrlsEqual, unknownTagComparators, }) {\n    /**\n     * compare the value of the two objects and return true if they are equivalent in values\n     */\n    return function comparator(a, b, state) {\n        // If the items are strictly equal, no need to do a value comparison.\n        if (a === b) {\n            return true;\n        }\n        // If either of the items are nullish and fail the strictly equal check\n        // above, then they must be unequal.\n        if (a == null || b == null) {\n            return false;\n        }\n        const type = typeof a;\n        if (type !== typeof b) {\n            return false;\n        }\n        if (type !== 'object') {\n            if (type === 'number') {\n                return areNumbersEqual(a, b, state);\n            }\n            if (type === 'function') {\n                return areFunctionsEqual(a, b, state);\n            }\n            // If a primitive value that is not strictly equal, it must be unequal.\n            return false;\n        }\n        const constructor = a.constructor;\n        // Checks are listed in order of commonality of use-case:\n        //   1. Common complex object types (plain object, array)\n        //   2. Common data values (date, regexp)\n        //   3. Less-common complex object types (map, set)\n        //   4. Less-common data values (promise, primitive wrappers)\n        // Inherently this is both subjective and assumptive, however\n        // when reviewing comparable libraries in the wild this order\n        // appears to be generally consistent.\n        // Constructors should match, otherwise there is potential for false positives\n        // between class and subclass or custom object and POJO.\n        if (constructor !== b.constructor) {\n            return false;\n        }\n        // `isPlainObject` only checks against the object's own realm. Cross-realm\n        // comparisons are rare, and will be handled in the ultimate fallback, so\n        // we can avoid capturing the string tag.\n        if (constructor === Object) {\n            return areObjectsEqual(a, b, state);\n        }\n        // `isArray()` works on subclasses and is cross-realm, so we can avoid capturing\n        // the string tag or doing an `instanceof` check.\n        if (Array.isArray(a)) {\n            return areArraysEqual(a, b, state);\n        }\n        // Try to fast-path equality checks for other complex object types in the\n        // same realm to avoid capturing the string tag. Strict equality is used\n        // instead of `instanceof` because it is more performant for the common\n        // use-case. If someone is subclassing a native class, it will be handled\n        // with the string tag comparison.\n        if (constructor === Date) {\n            return areDatesEqual(a, b, state);\n        }\n        if (constructor === RegExp) {\n            return areRegExpsEqual(a, b, state);\n        }\n        if (constructor === Map) {\n            return areMapsEqual(a, b, state);\n        }\n        if (constructor === Set) {\n            return areSetsEqual(a, b, state);\n        }\n        // Since this is a custom object, capture the string tag to determing its type.\n        // This is reasonably performant in modern environments like v8 and SpiderMonkey.\n        const tag = toString.call(a);\n        if (tag === DATE_TAG) {\n            return areDatesEqual(a, b, state);\n        }\n        // For RegExp, the properties are not enumerable, and therefore will give false positives if\n        // tested like a standard object.\n        if (tag === REG_EXP_TAG) {\n            return areRegExpsEqual(a, b, state);\n        }\n        if (tag === MAP_TAG) {\n            return areMapsEqual(a, b, state);\n        }\n        if (tag === SET_TAG) {\n            return areSetsEqual(a, b, state);\n        }\n        if (tag === OBJECT_TAG) {\n            // The exception for value comparison is custom `Promise`-like class instances. These should\n            // be treated the same as standard `Promise` objects, which means strict equality, and if\n            // it reaches this point then that strict equality comparison has already failed.\n            return typeof a.then !== 'function' && typeof b.then !== 'function' && areObjectsEqual(a, b, state);\n        }\n        // If a URL tag, it should be tested explicitly. Like RegExp, the properties are not\n        // enumerable, and therefore will give false positives if tested like a standard object.\n        if (tag === URL_TAG) {\n            return areUrlsEqual(a, b, state);\n        }\n        // If an error tag, it should be tested explicitly. Like RegExp, the properties are not\n        // enumerable, and therefore will give false positives if tested like a standard object.\n        if (tag === ERROR_TAG) {\n            return areErrorsEqual(a, b, state);\n        }\n        // If an arguments tag, it should be treated as a standard object.\n        if (tag === ARGUMENTS_TAG) {\n            return areObjectsEqual(a, b, state);\n        }\n        if (TYPED_ARRAY_TAGS[tag]) {\n            return areTypedArraysEqual(a, b, state);\n        }\n        if (tag === ARRAY_BUFFER_TAG) {\n            return areArrayBuffersEqual(a, b, state);\n        }\n        if (tag === DATA_VIEW_TAG) {\n            return areDataViewsEqual(a, b, state);\n        }\n        // As the penultimate fallback, check if the values passed are primitive wrappers. This\n        // is very rare in modern JS, which is why it is deprioritized compared to all other object\n        // types.\n        if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {\n            return arePrimitiveWrappersEqual(a, b, state);\n        }\n        if (unknownTagComparators) {\n            let unknownTagComparator = unknownTagComparators[tag];\n            if (!unknownTagComparator) {\n                const shortTag = getShortTag(a);\n                if (shortTag) {\n                    unknownTagComparator = unknownTagComparators[shortTag];\n                }\n            }\n            // If the custom config has an unknown tag comparator that matches the captured tag or the\n            // @@toStringTag, it is the source of truth for whether the values are equal.\n            if (unknownTagComparator) {\n                return unknownTagComparator(a, b, state);\n            }\n        }\n        // If not matching any tags that require a specific type of comparison, then we hard-code false because\n        // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:\n        //   - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only\n        //     comparison that can be made.\n        //   - For types that can be introspected, but rarely have requirements to be compared\n        //     (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common\n        //     use-cases (may be included in a future release, if requested enough).\n        //   - For types that can be introspected but do not have an objective definition of what\n        //     equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.\n        // In all cases, these decisions should be reevaluated based on changes to the language and\n        // common development practices.\n        return false;\n    };\n}\n/**\n * Create the configuration object used for building comparators.\n */\nfunction createEqualityComparatorConfig({ circular, createCustomConfig, strict, }) {\n    let config = {\n        areArrayBuffersEqual,\n        areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,\n        areDataViewsEqual,\n        areDatesEqual: areDatesEqual,\n        areErrorsEqual: areErrorsEqual,\n        areFunctionsEqual: areFunctionsEqual,\n        areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,\n        areNumbersEqual: areNumbersEqual,\n        areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual,\n        arePrimitiveWrappersEqual: arePrimitiveWrappersEqual,\n        areRegExpsEqual: areRegExpsEqual,\n        areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,\n        areTypedArraysEqual: strict\n            ? combineComparators(areTypedArraysEqual, areObjectsEqualStrict)\n            : areTypedArraysEqual,\n        areUrlsEqual: areUrlsEqual,\n        unknownTagComparators: undefined,\n    };\n    if (createCustomConfig) {\n        config = Object.assign({}, config, createCustomConfig(config));\n    }\n    if (circular) {\n        const areArraysEqual = createIsCircular(config.areArraysEqual);\n        const areMapsEqual = createIsCircular(config.areMapsEqual);\n        const areObjectsEqual = createIsCircular(config.areObjectsEqual);\n        const areSetsEqual = createIsCircular(config.areSetsEqual);\n        config = Object.assign({}, config, {\n            areArraysEqual,\n            areMapsEqual,\n            areObjectsEqual,\n            areSetsEqual,\n        });\n    }\n    return config;\n}\n/**\n * Default equality comparator pass-through, used as the standard `isEqual` creator for\n * use inside the built comparator.\n */\nfunction createInternalEqualityComparator(compare) {\n    return function (a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {\n        return compare(a, b, state);\n    };\n}\n/**\n * Create the `isEqual` function used by the consuming application.\n */\nfunction createIsEqual({ circular, comparator, createState, equals, strict }) {\n    if (createState) {\n        return function isEqual(a, b) {\n            const { cache = circular ? new WeakMap() : undefined, meta } = createState();\n            return comparator(a, b, {\n                cache,\n                equals,\n                meta,\n                strict,\n            });\n        };\n    }\n    if (circular) {\n        return function isEqual(a, b) {\n            return comparator(a, b, {\n                cache: new WeakMap(),\n                equals,\n                meta: undefined,\n                strict,\n            });\n        };\n    }\n    const state = {\n        cache: undefined,\n        equals,\n        meta: undefined,\n        strict,\n    };\n    return function isEqual(a, b) {\n        return comparator(a, b, state);\n    };\n}\n\n/**\n * Whether the items passed are deeply-equal in value.\n */\nconst deepEqual = createCustomEqual();\n/**\n * Whether the items passed are deeply-equal in value based on strict comparison.\n */\nconst strictDeepEqual = createCustomEqual({ strict: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references.\n */\nconst circularDeepEqual = createCustomEqual({ circular: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references,\n * based on strict comparison.\n */\nconst strictCircularDeepEqual = createCustomEqual({\n    circular: true,\n    strict: true,\n});\n/**\n * Whether the items passed are shallowly-equal in value.\n */\nconst shallowEqual = createCustomEqual({\n    createInternalComparator: () => sameValueZeroEqual,\n});\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nconst strictShallowEqual = createCustomEqual({\n    strict: true,\n    createInternalComparator: () => sameValueZeroEqual,\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nconst circularShallowEqual = createCustomEqual({\n    circular: true,\n    createInternalComparator: () => sameValueZeroEqual,\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references,\n * based on strict comparison.\n */\nconst strictCircularShallowEqual = createCustomEqual({\n    circular: true,\n    createInternalComparator: () => sameValueZeroEqual,\n    strict: true,\n});\n/**\n * Create a custom equality comparison method.\n *\n * This can be done to create very targeted comparisons in extreme hot-path scenarios\n * where the standard methods are not performant enough, but can also be used to provide\n * support for legacy environments that do not support expected features like\n * `RegExp.prototype.flags` out of the box.\n */\nfunction createCustomEqual(options = {}) {\n    const { circular = false, createInternalComparator: createCustomInternalComparator, createState, strict = false, } = options;\n    const config = createEqualityComparatorConfig(options);\n    const comparator = createEqualityComparator(config);\n    const equals = createCustomInternalComparator\n        ? createCustomInternalComparator(comparator)\n        : createInternalEqualityComparator(comparator);\n    return createIsEqual({ circular, comparator, createState, equals, strict });\n}\n\nexport { circularDeepEqual, circularShallowEqual, createCustomEqual, deepEqual, sameValueZeroEqual, shallowEqual, strictCircularDeepEqual, strictCircularShallowEqual, strictDeepEqual, strictShallowEqual };\n//# sourceMappingURL=index.mjs.map\n","\nconst ARRAY_TYPES = [\n    Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array,\n    Int32Array, Uint32Array, Float32Array, Float64Array\n];\n\n/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */\n\nconst VERSION = 1; // serialized format version\nconst HEADER_SIZE = 8;\n\nexport default class KDBush {\n\n    /**\n     * Creates an index from raw `ArrayBuffer` data.\n     * @param {ArrayBuffer} data\n     */\n    static from(data) {\n        if (!(data instanceof ArrayBuffer)) {\n            throw new Error('Data must be an instance of ArrayBuffer.');\n        }\n        const [magic, versionAndType] = new Uint8Array(data, 0, 2);\n        if (magic !== 0xdb) {\n            throw new Error('Data does not appear to be in a KDBush format.');\n        }\n        const version = versionAndType >> 4;\n        if (version !== VERSION) {\n            throw new Error(`Got v${version} data when expected v${VERSION}.`);\n        }\n        const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];\n        if (!ArrayType) {\n            throw new Error('Unrecognized array type.');\n        }\n        const [nodeSize] = new Uint16Array(data, 2, 1);\n        const [numItems] = new Uint32Array(data, 4, 1);\n\n        return new KDBush(numItems, nodeSize, ArrayType, data);\n    }\n\n    /**\n     * Creates an index that will hold a given number of items.\n     * @param {number} numItems\n     * @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).\n     * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).\n     * @param {ArrayBuffer} [data] (For internal use only)\n     */\n    constructor(numItems, nodeSize = 64, ArrayType = Float64Array, data) {\n        if (isNaN(numItems) || numItems < 0) throw new Error(`Unpexpected numItems value: ${numItems}.`);\n\n        this.numItems = +numItems;\n        this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);\n        this.ArrayType = ArrayType;\n        this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;\n\n        const arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);\n        const coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;\n        const idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;\n        const padCoords = (8 - idsByteSize % 8) % 8;\n\n        if (arrayTypeIndex < 0) {\n            throw new Error(`Unexpected typed array class: ${ArrayType}.`);\n        }\n\n        if (data && (data instanceof ArrayBuffer)) { // reconstruct an index from a buffer\n            this.data = data;\n            this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n            this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n            this._pos = numItems * 2;\n            this._finished = true;\n        } else { // initialize a new index\n            this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);\n            this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n            this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n            this._pos = 0;\n            this._finished = false;\n\n            // set header\n            new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);\n            new Uint16Array(this.data, 2, 1)[0] = nodeSize;\n            new Uint32Array(this.data, 4, 1)[0] = numItems;\n        }\n    }\n\n    /**\n     * Add a point to the index.\n     * @param {number} x\n     * @param {number} y\n     * @returns {number} An incremental index associated with the added item (starting from `0`).\n     */\n    add(x, y) {\n        const index = this._pos >> 1;\n        this.ids[index] = index;\n        this.coords[this._pos++] = x;\n        this.coords[this._pos++] = y;\n        return index;\n    }\n\n    /**\n     * Perform indexing of the added points.\n     */\n    finish() {\n        const numAdded = this._pos >> 1;\n        if (numAdded !== this.numItems) {\n            throw new Error(`Added ${numAdded} items when expected ${this.numItems}.`);\n        }\n        // kd-sort both arrays for efficient search\n        sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);\n\n        this._finished = true;\n        return this;\n    }\n\n    /**\n     * Search the index for items within a given bounding box.\n     * @param {number} minX\n     * @param {number} minY\n     * @param {number} maxX\n     * @param {number} maxY\n     * @returns {number[]} An array of indices correponding to the found items.\n     */\n    range(minX, minY, maxX, maxY) {\n        if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n        const {ids, coords, nodeSize} = this;\n        const stack = [0, ids.length - 1, 0];\n        const result = [];\n\n        // recursively search for items in range in the kd-sorted arrays\n        while (stack.length) {\n            const axis = stack.pop() || 0;\n            const right = stack.pop() || 0;\n            const left = stack.pop() || 0;\n\n            // if we reached \"tree node\", search linearly\n            if (right - left <= nodeSize) {\n                for (let i = left; i <= right; i++) {\n                    const x = coords[2 * i];\n                    const y = coords[2 * i + 1];\n                    if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n                }\n                continue;\n            }\n\n            // otherwise find the middle index\n            const m = (left + right) >> 1;\n\n            // include the middle item if it's in range\n            const x = coords[2 * m];\n            const y = coords[2 * m + 1];\n            if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n            // queue search in halves that intersect the query\n            if (axis === 0 ? minX <= x : minY <= y) {\n                stack.push(left);\n                stack.push(m - 1);\n                stack.push(1 - axis);\n            }\n            if (axis === 0 ? maxX >= x : maxY >= y) {\n                stack.push(m + 1);\n                stack.push(right);\n                stack.push(1 - axis);\n            }\n        }\n\n        return result;\n    }\n\n    /**\n     * Search the index for items within a given radius.\n     * @param {number} qx\n     * @param {number} qy\n     * @param {number} r Query radius.\n     * @returns {number[]} An array of indices correponding to the found items.\n     */\n    within(qx, qy, r) {\n        if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n        const {ids, coords, nodeSize} = this;\n        const stack = [0, ids.length - 1, 0];\n        const result = [];\n        const r2 = r * r;\n\n        // recursively search for items within radius in the kd-sorted arrays\n        while (stack.length) {\n            const axis = stack.pop() || 0;\n            const right = stack.pop() || 0;\n            const left = stack.pop() || 0;\n\n            // if we reached \"tree node\", search linearly\n            if (right - left <= nodeSize) {\n                for (let i = left; i <= right; i++) {\n                    if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n                }\n                continue;\n            }\n\n            // otherwise find the middle index\n            const m = (left + right) >> 1;\n\n            // include the middle item if it's in range\n            const x = coords[2 * m];\n            const y = coords[2 * m + 1];\n            if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n            // queue search in halves that intersect the query\n            if (axis === 0 ? qx - r <= x : qy - r <= y) {\n                stack.push(left);\n                stack.push(m - 1);\n                stack.push(1 - axis);\n            }\n            if (axis === 0 ? qx + r >= x : qy + r >= y) {\n                stack.push(m + 1);\n                stack.push(right);\n                stack.push(1 - axis);\n            }\n        }\n\n        return result;\n    }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType<TypedArrayConstructor>} coords\n * @param {number} nodeSize\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction sort(ids, coords, nodeSize, left, right, axis) {\n    if (right - left <= nodeSize) return;\n\n    const m = (left + right) >> 1; // middle index\n\n    // sort ids and coords around the middle index so that the halves lie\n    // either left/right or top/bottom correspondingly (taking turns)\n    select(ids, coords, m, left, right, axis);\n\n    // recursively kd-sort first half and second half on the opposite axis\n    sort(ids, coords, nodeSize, left, m - 1, 1 - axis);\n    sort(ids, coords, nodeSize, m + 1, right, 1 - axis);\n}\n\n/**\n * Custom Floyd-Rivest selection algorithm: sort ids and coords so that\n * [left..k-1] items are smaller than k-th item (on either x or y axis)\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType<TypedArrayConstructor>} coords\n * @param {number} k\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction select(ids, coords, k, left, right, axis) {\n\n    while (right > left) {\n        if (right - left > 600) {\n            const n = right - left + 1;\n            const m = k - left + 1;\n            const z = Math.log(n);\n            const s = 0.5 * Math.exp(2 * z / 3);\n            const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n            const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n            const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n            select(ids, coords, k, newLeft, newRight, axis);\n        }\n\n        const t = coords[2 * k + axis];\n        let i = left;\n        let j = right;\n\n        swapItem(ids, coords, left, k);\n        if (coords[2 * right + axis] > t) swapItem(ids, coords, left, right);\n\n        while (i < j) {\n            swapItem(ids, coords, i, j);\n            i++;\n            j--;\n            while (coords[2 * i + axis] < t) i++;\n            while (coords[2 * j + axis] > t) j--;\n        }\n\n        if (coords[2 * left + axis] === t) swapItem(ids, coords, left, j);\n        else {\n            j++;\n            swapItem(ids, coords, j, right);\n        }\n\n        if (j <= k) left = j + 1;\n        if (k <= j) right = j - 1;\n    }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType<TypedArrayConstructor>} coords\n * @param {number} i\n * @param {number} j\n */\nfunction swapItem(ids, coords, i, j) {\n    swap(ids, i, j);\n    swap(coords, 2 * i, 2 * j);\n    swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\n/**\n * @param {InstanceType<TypedArrayConstructor>} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n    const tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n\n/**\n * @param {number} ax\n * @param {number} ay\n * @param {number} bx\n * @param {number} by\n */\nfunction sqDist(ax, ay, bx, by) {\n    const dx = ax - bx;\n    const dy = ay - by;\n    return dx * dx + dy * dy;\n}\n","/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */\n\nfunction _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n  return n;\n}\nfunction _arrayWithHoles(r) {\n  if (Array.isArray(r)) return r;\n}\nfunction _iterableToArrayLimit(r, l) {\n  var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n  if (null != t) {\n    var e,\n      n,\n      i,\n      u,\n      a = [],\n      f = true,\n      o = false;\n    try {\n      if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n    } catch (r) {\n      o = true, n = r;\n    } finally {\n      try {\n        if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n      } finally {\n        if (o) throw n;\n      }\n    }\n    return a;\n  }\n}\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _slicedToArray(r, e) {\n  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n  }\n}\n\nconst entries = Object.entries,\n  setPrototypeOf = Object.setPrototypeOf,\n  isFrozen = Object.isFrozen,\n  getPrototypeOf = Object.getPrototypeOf,\n  getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nlet freeze = Object.freeze,\n  seal = Object.seal,\n  create = Object.create; // eslint-disable-line import/no-mutable-exports\nlet _ref = typeof Reflect !== 'undefined' && Reflect,\n  apply = _ref.apply,\n  construct = _ref.construct;\nif (!freeze) {\n  freeze = function freeze(x) {\n    return x;\n  };\n}\nif (!seal) {\n  seal = function seal(x) {\n    return x;\n  };\n}\nif (!apply) {\n  apply = function apply(func, thisArg) {\n    for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n      args[_key - 2] = arguments[_key];\n    }\n    return func.apply(thisArg, args);\n  };\n}\nif (!construct) {\n  construct = function construct(Func) {\n    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n      args[_key2 - 1] = arguments[_key2];\n    }\n    return new Func(...args);\n  };\n}\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString = typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\nconst symbolToString = typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(func) {\n  return function (thisArg) {\n    if (thisArg instanceof RegExp) {\n      thisArg.lastIndex = 0;\n    }\n    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n      args[_key3 - 1] = arguments[_key3];\n    }\n    return apply(func, thisArg, args);\n  };\n}\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(Func) {\n  return function () {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n    return construct(Func, args);\n  };\n}\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(set, array) {\n  let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n  if (setPrototypeOf) {\n    // Make 'in' and truthy checks like Boolean(set.constructor)\n    // independent of any properties defined on Object.prototype.\n    // Prevent prototype setters from intercepting set as a this value.\n    setPrototypeOf(set, null);\n  }\n  if (!arrayIsArray(array)) {\n    return set;\n  }\n  let l = array.length;\n  while (l--) {\n    let element = array[l];\n    if (typeof element === 'string') {\n      const lcElement = transformCaseFunc(element);\n      if (lcElement !== element) {\n        // Config presets (e.g. tags.js, attrs.js) are immutable.\n        if (!isFrozen(array)) {\n          array[l] = lcElement;\n        }\n        element = lcElement;\n      }\n    }\n    set[element] = true;\n  }\n  return set;\n}\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray(array) {\n  for (let index = 0; index < array.length; index++) {\n    const isPropertyExist = objectHasOwnProperty(array, index);\n    if (!isPropertyExist) {\n      array[index] = null;\n    }\n  }\n  return array;\n}\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone(object) {\n  const newObject = create(null);\n  for (const _ref2 of entries(object)) {\n    var _ref3 = _slicedToArray(_ref2, 2);\n    const property = _ref3[0];\n    const value = _ref3[1];\n    const isPropertyExist = objectHasOwnProperty(object, property);\n    if (isPropertyExist) {\n      if (arrayIsArray(value)) {\n        newObject[property] = cleanArray(value);\n      } else if (value && typeof value === 'object' && value.constructor === Object) {\n        newObject[property] = clone(value);\n      } else {\n        newObject[property] = value;\n      }\n    }\n  }\n  return newObject;\n}\n/**\n * Convert non-node values into strings without depending on direct property access.\n *\n * @param value - The value to stringify.\n * @returns A string representation of the provided value.\n */\nfunction stringifyValue(value) {\n  switch (typeof value) {\n    case 'string':\n      {\n        return value;\n      }\n    case 'number':\n      {\n        return numberToString(value);\n      }\n    case 'boolean':\n      {\n        return booleanToString(value);\n      }\n    case 'bigint':\n      {\n        return bigintToString ? bigintToString(value) : '0';\n      }\n    case 'symbol':\n      {\n        return symbolToString ? symbolToString(value) : 'Symbol()';\n      }\n    case 'undefined':\n      {\n        return objectToString(value);\n      }\n    case 'function':\n    case 'object':\n      {\n        if (value === null) {\n          return objectToString(value);\n        }\n        const valueAsRecord = value;\n        const valueToString = lookupGetter(valueAsRecord, 'toString');\n        if (typeof valueToString === 'function') {\n          const stringified = valueToString(valueAsRecord);\n          return typeof stringified === 'string' ? stringified : objectToString(stringified);\n        }\n        return objectToString(value);\n      }\n    default:\n      {\n        return objectToString(value);\n      }\n  }\n}\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter(object, prop) {\n  while (object !== null) {\n    const desc = getOwnPropertyDescriptor(object, prop);\n    if (desc) {\n      if (desc.get) {\n        return unapply(desc.get);\n      }\n      if (typeof desc.value === 'function') {\n        return unapply(desc.value);\n      }\n    }\n    object = getPrototypeOf(object);\n  }\n  function fallbackValue() {\n    return null;\n  }\n  return fallbackValue;\n}\nfunction isRegex(value) {\n  try {\n    regExpTest(value, '');\n    return true;\n  } catch (_unused) {\n    return false;\n  }\n}\n\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nconst text = freeze(['#text']);\n\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'command', 'commandfor', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns']);\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dominant-baseline', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'pointer-events', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-orientation', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'vector-effect', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\nconst MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nconst ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n// Markup-significant character probes used by _sanitizeElements.\n// Shared module-level instances are safe despite the sticky /g flags:\n// unapply() resets lastIndex for RegExp receivers before every call.\nconst ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nconst COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nconst FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nconst SELF_CLOSING_TAG = seal(/\\/>/i);\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n  element: 1,\n  attribute: 2,\n  text: 3,\n  cdataSection: 4,\n  entityReference: 5,\n  // Deprecated\n  entityNode: 6,\n  // Deprecated\n  processingInstruction: 7,\n  comment: 8,\n  document: 9,\n  documentType: 10,\n  documentFragment: 11,\n  notation: 12 // Deprecated\n};\n/* HTML-namespace elements whose child text nodes are serialized *literally*\n   (unescaped) by the HTML fragment-serialization algorithm. Two reparse-mXSS\n   shapes ride on that literal serialization:\n     (a) an element child - a tree the HTML parser can never build, but the DOM\n         API and an XML/XHTML parse can - after which a `</tag>`-bearing text\n         sibling breaks the element open on reparse; and\n     (b) text-only content that already carries the element's OWN end tag, e.g.\n         `<style>...</style><img onerror=x>` built as a node, which the literal\n         serializer emits verbatim for the HTML parser to re-open.\n   Shape (a) is handled by the firstElementChild branch in _isUnsafeNode; shape\n   (b) by the LITERAL_TEXT_CLOSE probe. Both read textContent (the raw-serialized\n   form for these elements) rather than innerHTML, because an XML/XHTML working\n   document serializes innerHTML with `<` escaped, which silently blinds the\n   innerHTML-based probes (rule 1's second probe and FALLBACK_TAG_CLOSE) there.\n   `script` is never allow-listed, but is kept here so the guard matches the\n   serializer's own literal-text list exactly. */\nconst LITERAL_TEXT_ELEMENT_NAMES = ['style', 'script', 'xmp', 'iframe', 'noembed', 'noframes', 'plaintext', 'noscript'];\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));\n/* Per-element end-tag matcher. On an HTML reparse the ONLY token that\n   terminates a literal-text element's raw content is its own end tag; a foreign\n   literal-text close (e.g. `</xmp>` sitting inside `<style>`) does not break\n   out, so matching is per-element, not a shared alternation. The lookahead\n   requires an HTML tag-name terminator (whitespace, `/` or `>`) so a longer\n   name such as `</styles` is not mistaken for `</style`. */\nconst LITERAL_TEXT_CLOSE = function () {\n  const map = {};\n  arrayForEach(LITERAL_TEXT_ELEMENT_NAMES, name => {\n    map[name] = seal(new RegExp('</' + name + '(?=[\\\\t\\\\n\\\\f\\\\r />])', 'i'));\n  });\n  return freeze(map);\n}();\nconst getGlobal = function getGlobal() {\n  return typeof window === 'undefined' ? null : window;\n};\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n  if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n    return null;\n  }\n  // Allow the callers to control the unique policy name\n  // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n  // Policy creation with duplicate names throws in Trusted Types.\n  let suffix = null;\n  const ATTR_NAME = 'data-tt-policy-suffix';\n  if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n    suffix = purifyHostElement.getAttribute(ATTR_NAME);\n  }\n  const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n  try {\n    return trustedTypes.createPolicy(policyName, {\n      createHTML(html) {\n        return html;\n      },\n      createScriptURL(scriptUrl) {\n        return scriptUrl;\n      }\n    });\n  } catch (_) {\n    // Policy creation failed (most likely another DOMPurify script has\n    // already run). Skip creating the policy, as this will only cause errors\n    // if TT are enforced.\n    console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n    return null;\n  }\n};\nconst _createHooksMap = function _createHooksMap() {\n  return {\n    afterSanitizeAttributes: [],\n    afterSanitizeElements: [],\n    afterSanitizeShadowDOM: [],\n    beforeSanitizeAttributes: [],\n    beforeSanitizeElements: [],\n    beforeSanitizeShadowDOM: [],\n    uponSanitizeAttribute: [],\n    uponSanitizeElement: [],\n    uponSanitizeShadowNode: []\n  };\n};\n/**\n * Resolve a set-valued configuration option: a fresh set built from\n * cfg[key] when it is an own array property (seeded with a clone of\n * options.base when given, case-normalized via options.transform),\n * the fallback set otherwise.\n *\n * @param cfg the cloned, prototype-free configuration object\n * @param key the configuration property to read\n * @param fallback the set to use when the option is absent or not an array\n * @param options transform and optional base set to merge into\n * @returns the resolved set\n */\nconst _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n  return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n};\n/**\n * Resolve an object-valued configuration option: a prototype-free clone\n * of cfg[key] when it is an own, truthy object property, else a fresh\n * fallback built by makeFallback (fresh on every parse, so a previous\n * parse can never leak state into the next one).\n *\n * @param cfg the cloned, prototype-free configuration object\n * @param key the configuration property to read\n * @param makeFallback builds the fallback value when the option is absent\n * @returns the resolved object\n */\nconst _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {\n  const value = objectHasOwnProperty(cfg, key) ? cfg[key] : undefined;\n  return value && typeof value === 'object' ? clone(value) : makeFallback();\n};\nfunction createDOMPurify() {\n  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n  const DOMPurify = root => createDOMPurify(root);\n  DOMPurify.version = '3.4.14';\n  DOMPurify.removed = [];\n  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n    // Not running in a browser, provide a factory function\n    // so that you can pass your own Window\n    DOMPurify.isSupported = false;\n    return DOMPurify;\n  }\n  let document = window.document;\n  const originalDocument = document;\n  const currentScript = originalDocument.currentScript;\n  window.DocumentFragment;\n    const HTMLTemplateElement = window.HTMLTemplateElement,\n    Node = window.Node,\n    Element = window.Element,\n    NodeFilter = window.NodeFilter,\n    _window$NamedNodeMap = window.NamedNodeMap;\n    _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap;\n    window.HTMLFormElement;\n    const DOMParser = window.DOMParser,\n    trustedTypes = window.trustedTypes;\n  const ElementPrototype = Element.prototype;\n  const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n  const remove = lookupGetter(ElementPrototype, 'remove');\n  const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n  const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n  const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n  const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');\n  const getAttributes = lookupGetter(ElementPrototype, 'attributes');\n  const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;\n  const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;\n  const getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, 'ownerDocument') : null;\n  /* Clobber-safe nodeType / nodeName reads through the cached Node.prototype\n     getters, with a direct-property fallback for environments that lack\n     Node.prototype. Sites that need a different fallback (e.g. _isClobbered\n     returns early on a null name) intentionally keep their own reads. */\n  const _readNodeType = function _readNodeType(node) {\n    return getNodeType ? getNodeType(node) : node.nodeType;\n  };\n  const _readNodeName = function _readNodeName(node) {\n    return getNodeName ? getNodeName(node) : node.nodeName;\n  };\n  // As per issue #47, the web-components registry is inherited by a\n  // new document created via createHTMLDocument. As per the spec\n  // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n  // a new empty registry is used when creating a template contents owner\n  // document, so we use that as our parent document to ensure nothing\n  // is inherited.\n  if (typeof HTMLTemplateElement === 'function') {\n    const template = document.createElement('template');\n    if (template.content && template.content.ownerDocument) {\n      document = template.content.ownerDocument;\n    }\n  }\n  let trustedTypesPolicy;\n  let emptyHTML = '';\n  // The instance's own internal Trusted Types policy. Unlike a caller-supplied\n  // `TRUSTED_TYPES_POLICY`, this is created at most once — Trusted Types throws\n  // on duplicate policy names — and is the only policy allowed to persist\n  // across configurations and survive `clearConfig()`.\n  let defaultTrustedTypesPolicy;\n  let defaultTrustedTypesPolicyResolved = false;\n  // Tracks whether we are already inside a call to the configured Trusted Types\n  // policy (`createHTML` or `createScriptURL`). If a supplied policy callback\n  // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would\n  // re-enter the policy and recurse until the stack overflows. We detect that\n  // re-entry and throw a clear, actionable error instead. The guard is shared\n  // across both callbacks, because either one re-entering `sanitize` triggers\n  // the same unbounded recursion.\n  let IN_TRUSTED_TYPES_POLICY = 0;\n  const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n    if (IN_TRUSTED_TYPES_POLICY > 0) {\n      throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + 'infinite recursion. Do not pass a policy whose callbacks wrap ' + 'DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted ' + 'Types\" section of the README.');\n    }\n  };\n  const _createTrustedHTML = function _createTrustedHTML(html) {\n    _assertNotInTrustedTypesPolicy();\n    IN_TRUSTED_TYPES_POLICY++;\n    try {\n      return trustedTypesPolicy.createHTML(html);\n    } finally {\n      IN_TRUSTED_TYPES_POLICY--;\n    }\n  };\n  const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n    _assertNotInTrustedTypesPolicy();\n    IN_TRUSTED_TYPES_POLICY++;\n    try {\n      return trustedTypesPolicy.createScriptURL(scriptUrl);\n    } finally {\n      IN_TRUSTED_TYPES_POLICY--;\n    }\n  };\n  // Lazily resolve (and cache) the instance's internal default policy.\n  // Resolution is attempted at most once: a successful `createPolicy` cannot be\n  // repeated (Trusted Types throws on duplicate names), and a failed or\n  // unsupported attempt must not be retried on every parse.\n  const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n    if (!defaultTrustedTypesPolicyResolved) {\n      defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n      defaultTrustedTypesPolicyResolved = true;\n    }\n    return defaultTrustedTypesPolicy;\n  };\n  const _document = document,\n    implementation = _document.implementation,\n    createNodeIterator = _document.createNodeIterator,\n    createDocumentFragment = _document.createDocumentFragment,\n    getElementsByTagName = _document.getElementsByTagName;\n  const importNode = originalDocument.importNode;\n  let hooks = _createHooksMap();\n  /**\n   * Expose whether this browser supports running the full DOMPurify.\n   */\n  DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n  const MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n    ERB_EXPR$1 = ERB_EXPR,\n    TMPLIT_EXPR$1 = TMPLIT_EXPR,\n    DATA_ATTR$1 = DATA_ATTR,\n    ARIA_ATTR$1 = ARIA_ATTR,\n    IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n    ATTR_WHITESPACE$1 = ATTR_WHITESPACE,\n    CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\n  let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n  /**\n   * We consider the elements and attributes below to be safe. Ideally\n   * don't add any new ones but feel free to remove unwanted ones.\n   */\n  /* allowed element names */\n  let ALLOWED_TAGS = null;\n  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n  /* Allowed attribute names */\n  let ALLOWED_ATTR = null;\n  const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n  /*\n   * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n   * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n   * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n   * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n   */\n  let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n    tagNameCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    },\n    attributeNameCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    },\n    allowCustomizedBuiltInElements: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: false\n    }\n  }));\n  /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n  let FORBID_TAGS = null;\n  /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n  let FORBID_ATTR = null;\n  /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n  const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\n    tagCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    },\n    attributeCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    }\n  }));\n  /* Decide if ARIA attributes are okay */\n  let ALLOW_ARIA_ATTR = true;\n  /* Decide if custom data attributes are okay */\n  let ALLOW_DATA_ATTR = true;\n  /* Decide if unknown protocols are okay */\n  let ALLOW_UNKNOWN_PROTOCOLS = false;\n  /* Decide if self-closing tags in attributes are allowed.\n   * Usually removed due to a mXSS issue in jQuery 3.0 */\n  let ALLOW_SELF_CLOSE_IN_ATTR = true;\n  /* Output should be safe for common template engines.\n   * This means, DOMPurify removes data attributes, mustaches and ERB\n   */\n  let SAFE_FOR_TEMPLATES = false;\n  /* Output should be safe even for XML used within HTML and alike.\n   * This means, DOMPurify removes comments when containing risky content.\n   */\n  let SAFE_FOR_XML = true;\n  /* Decide if document with <html>... should be returned */\n  let WHOLE_DOCUMENT = false;\n  /* Track whether config is already set on this instance of DOMPurify. */\n  let SET_CONFIG = false;\n  /* Pristine allowlist bindings captured at setConfig() time. On the\n   * persistent-config path sanitize() restores the sets from these before\n   * the per-walk hook clone-guard, so a hook's in-call widening cannot\n   * carry across calls. Null until setConfig() is called; reset by\n   * clearConfig(). */\n  let SET_CONFIG_ALLOWED_TAGS = null;\n  let SET_CONFIG_ALLOWED_ATTR = null;\n  /* Decide if all elements (e.g. style, script) must be children of\n   * document.body. By default, browsers might move them to document.head */\n  let FORCE_BODY = false;\n  /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n   * string (or a TrustedHTML object if Trusted Types are supported).\n   * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n   */\n  let RETURN_DOM = false;\n  /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n   * string  (or a TrustedHTML object if Trusted Types are supported) */\n  let RETURN_DOM_FRAGMENT = false;\n  /* Try to return a Trusted Type object instead of a string, return a string in\n   * case Trusted Types are not supported  */\n  let RETURN_TRUSTED_TYPE = false;\n  /* Output should be free from DOM clobbering attacks?\n   * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n   */\n  let SANITIZE_DOM = true;\n  /* Achieve full DOM Clobbering protection by isolating the namespace of named\n   * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n   *\n   * HTML/DOM spec rules that enable DOM Clobbering:\n   *   - Named Access on Window (§7.3.3)\n   *   - DOM Tree Accessors (§3.1.5)\n   *   - Form Element Parent-Child Relations (§4.10.3)\n   *   - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n   *   - HTMLCollection (§4.2.10.2)\n   *\n   * Namespace isolation is implemented by prefixing `id` and `name` attributes\n   * with a constant string, i.e., `user-content-`\n   */\n  let SANITIZE_NAMED_PROPS = false;\n  const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n  /* Keep element content when removing element? */\n  let KEEP_CONTENT = true;\n  /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n   * of importing it into a new Document and returning a sanitized copy */\n  let IN_PLACE = false;\n  /* Allow usage of profiles like html, svg and mathMl */\n  let USE_PROFILES = {};\n  /* Tags to ignore content of when KEEP_CONTENT is true */\n  let FORBID_CONTENTS = null;\n  const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',\n  // <selectedcontent> mirrors the selected <option>'s subtree, cloned by\n  // the UA (customizable <select>) — including any on* handlers — and the\n  // engine re-mirrors synchronously whenever a removal changes which\n  // option/selectedcontent is current, even inside DOMPurify's inert\n  // DOMParser document. Hoisting its children on removal re-inserts a fresh\n  // mirror target ahead of the walk, which the engine refills, looping\n  // forever (DoS) and amplifying output. Dropping its content on removal\n  // (rather than hoisting) breaks that cascade; the content is a duplicate\n  // of the option, which is sanitized on its own. See campaign-3 F1/F6.\n  'selectedcontent', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n  /* Tags that are safe for data: URIs */\n  let DATA_URI_TAGS = null;\n  const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n  /* Attributes safe for values like \"javascript:\" */\n  let URI_SAFE_ATTRIBUTES = null;\n  const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n  const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n  const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n  const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n  /* Document namespace */\n  let NAMESPACE = HTML_NAMESPACE;\n  let IS_EMPTY_INPUT = false;\n  /* Allowed XHTML+XML namespaces */\n  let ALLOWED_NAMESPACES = null;\n  const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n  const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(['mi', 'mo', 'mn', 'ms', 'mtext']);\n  let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n  const DEFAULT_HTML_INTEGRATION_POINTS = freeze(['annotation-xml']);\n  let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n  // Certain elements are allowed in both SVG and HTML\n  // namespace. We need to specify them explicitly\n  // so that they don't get erroneously deleted from\n  // HTML namespace.\n  const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n  /* Parsing of strict XHTML documents */\n  let PARSER_MEDIA_TYPE = null;\n  const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n  const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n  let transformCaseFunc = null;\n  /* Keep a reference to config to pass to hooks */\n  let CONFIG = null;\n  /* Ideally, do not touch anything below this line */\n  /* ______________________________________________ */\n  const formElement = document.createElement('form');\n  const isRegexOrFunction = function isRegexOrFunction(testValue) {\n    return testValue instanceof RegExp || testValue instanceof Function;\n  };\n  /**\n   * _parseConfig\n   *\n   * @param cfg optional config literal\n   */\n  // eslint-disable-next-line complexity\n  const _parseConfig = function _parseConfig() {\n    let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    if (CONFIG && CONFIG === cfg) {\n      return;\n    }\n    /* Shield configuration object from tampering */\n    if (!cfg || typeof cfg !== 'object') {\n      cfg = {};\n    }\n    /* Shield configuration object from prototype pollution */\n    cfg = clone(cfg);\n    PARSER_MEDIA_TYPE =\n    // eslint-disable-next-line unicorn/prefer-includes\n    SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n    // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n    transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n    /* Set configuration parameters */\n    ALLOWED_TAGS = _resolveSetOption(cfg, 'ALLOWED_TAGS', DEFAULT_ALLOWED_TAGS, {\n      transform: transformCaseFunc\n    });\n    ALLOWED_ATTR = _resolveSetOption(cfg, 'ALLOWED_ATTR', DEFAULT_ALLOWED_ATTR, {\n      transform: transformCaseFunc\n    });\n    ALLOWED_NAMESPACES = _resolveSetOption(cfg, 'ALLOWED_NAMESPACES', DEFAULT_ALLOWED_NAMESPACES, {\n      transform: stringToString\n    });\n    URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, 'ADD_URI_SAFE_ATTR', DEFAULT_URI_SAFE_ATTRIBUTES, {\n      transform: transformCaseFunc,\n      base: DEFAULT_URI_SAFE_ATTRIBUTES\n    });\n    DATA_URI_TAGS = _resolveSetOption(cfg, 'ADD_DATA_URI_TAGS', DEFAULT_DATA_URI_TAGS, {\n      transform: transformCaseFunc,\n      base: DEFAULT_DATA_URI_TAGS\n    });\n    FORBID_CONTENTS = _resolveSetOption(cfg, 'FORBID_CONTENTS', DEFAULT_FORBID_CONTENTS, {\n      transform: transformCaseFunc\n    });\n    FORBID_TAGS = _resolveSetOption(cfg, 'FORBID_TAGS', clone({}), {\n      transform: transformCaseFunc\n    });\n    FORBID_ATTR = _resolveSetOption(cfg, 'FORBID_ATTR', clone({}), {\n      transform: transformCaseFunc\n    });\n    USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n    ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n    ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n    ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n    ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n    SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n    SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n    WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n    RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n    RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n    RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n    FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n    SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n    SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n    KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n    IN_PLACE = cfg.IN_PLACE || false; // Default false\n    IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp\n    NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace\n    MATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, 'MATHML_TEXT_INTEGRATION_POINTS', () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS) // Default built-in map\n    );\n    HTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, 'HTML_INTEGRATION_POINTS', () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS) // Default built-in map\n    );\n    const customElementHandling = _resolveObjectOption(cfg, 'CUSTOM_ELEMENT_HANDLING', () => create(null));\n    CUSTOM_ELEMENT_HANDLING = create(null);\n    if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {\n      CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck; // Default undefined\n    }\n    if (objectHasOwnProperty(customElementHandling, 'attributeNameCheck') && isRegexOrFunction(customElementHandling.attributeNameCheck)) {\n      CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck; // Default undefined\n    }\n    if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {\n      CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined\n    }\n    seal(CUSTOM_ELEMENT_HANDLING);\n    if (SAFE_FOR_TEMPLATES) {\n      ALLOW_DATA_ATTR = false;\n    }\n    if (RETURN_DOM_FRAGMENT) {\n      RETURN_DOM = true;\n    }\n    /* Parse profile info */\n    if (USE_PROFILES) {\n      ALLOWED_TAGS = addToSet({}, text);\n      ALLOWED_ATTR = create(null);\n      if (USE_PROFILES.html === true) {\n        addToSet(ALLOWED_TAGS, html$1);\n        addToSet(ALLOWED_ATTR, html);\n      }\n      if (USE_PROFILES.svg === true) {\n        addToSet(ALLOWED_TAGS, svg$1);\n        addToSet(ALLOWED_ATTR, svg);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n      if (USE_PROFILES.svgFilters === true) {\n        addToSet(ALLOWED_TAGS, svgFilters);\n        addToSet(ALLOWED_ATTR, svg);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n      if (USE_PROFILES.mathMl === true) {\n        addToSet(ALLOWED_TAGS, mathMl$1);\n        addToSet(ALLOWED_ATTR, mathMl);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n    }\n    /* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent\n     * leaking across calls when switching from function to array config */\n    EXTRA_ELEMENT_HANDLING.tagCheck = null;\n    EXTRA_ELEMENT_HANDLING.attributeCheck = null;\n    /* Merge configuration parameters */\n    if (objectHasOwnProperty(cfg, 'ADD_TAGS')) {\n      if (typeof cfg.ADD_TAGS === 'function') {\n        EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n      } else if (arrayIsArray(cfg.ADD_TAGS)) {\n        if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n          ALLOWED_TAGS = clone(ALLOWED_TAGS);\n        }\n        addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n      }\n    }\n    if (objectHasOwnProperty(cfg, 'ADD_ATTR')) {\n      if (typeof cfg.ADD_ATTR === 'function') {\n        EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n      } else if (arrayIsArray(cfg.ADD_ATTR)) {\n        if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n          ALLOWED_ATTR = clone(ALLOWED_ATTR);\n        }\n        addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n      }\n    }\n    if (objectHasOwnProperty(cfg, 'ADD_FORBID_CONTENTS') && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n      if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n        FORBID_CONTENTS = clone(FORBID_CONTENTS);\n      }\n      addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n    }\n    /* Add #text in case KEEP_CONTENT is set to true */\n    if (KEEP_CONTENT) {\n      ALLOWED_TAGS['#text'] = true;\n    }\n    /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n    if (WHOLE_DOCUMENT) {\n      addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n    }\n    /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n    if (ALLOWED_TAGS.table) {\n      addToSet(ALLOWED_TAGS, ['tbody']);\n      delete FORBID_TAGS.tbody;\n    }\n    // Re-derive the active Trusted Types policy from this configuration on\n    // every parse. The active policy must never be sticky closure state that\n    // outlives the config that set it: a caller-supplied policy left in place\n    // after `clearConfig()` — or after a later call that supplied none, or\n    // `TRUSTED_TYPES_POLICY: null` — could sign a subsequent \"default\"\n    // `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.\n    // See GHSA-vxr8-fq34-vvx9.\n    if (cfg.TRUSTED_TYPES_POLICY) {\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n        throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n      }\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n        throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n      }\n      // A caller-supplied policy applies to this configuration only.\n      const previousTrustedTypesPolicy = trustedTypesPolicy;\n      trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n      // Sign local variables required by `sanitize`. If the supplied policy's\n      // `createHTML` is circular (i.e. it calls `DOMPurify.sanitize`), this\n      // throws via the re-entrancy guard. Restore the previous policy first so\n      // the instance is not left in a poisoned state. See #1422.\n      try {\n        emptyHTML = _createTrustedHTML('');\n      } catch (error) {\n        trustedTypesPolicy = previousTrustedTypesPolicy;\n        throw error;\n      }\n    } else if (cfg.TRUSTED_TYPES_POLICY === null) {\n      // Explicit opt-out for this call: perform no Trusted Types signing and\n      // create nothing (so a strict `trusted-types` CSP that disallows a\n      // `dompurify` policy can still call `sanitize` from inside its own\n      // policy — see #1422). Resetting to `undefined` rather than a sticky\n      // `null` also drops any previously retained caller policy, so it cannot\n      // resurface on a later call, while still allowing the next config-less\n      // call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.\n      trustedTypesPolicy = undefined;\n      emptyHTML = '';\n    } else {\n      // No policy supplied: keep the currently active policy if one is set — a\n      // previously supplied policy is intentionally sticky across config-less\n      // calls — otherwise fall back to the instance's own internal policy,\n      // created at most once. (A policy supplied for a *single* call still\n      // lingers by design; what must not linger is a policy whose configuration\n      // has been torn down via `clearConfig()`, which restores the default.)\n      if (trustedTypesPolicy === undefined) {\n        trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n      }\n      // Sign internal variables only when a policy is active. A falsy policy\n      // (Trusted Types unsupported, creation failed, or an explicit opt-out)\n      // leaves `emptyHTML` as a plain string, so we never call `.createHTML` on\n      // a non-policy and throw. See #1422.\n      if (trustedTypesPolicy && typeof emptyHTML === 'string') {\n        emptyHTML = _createTrustedHTML('');\n      }\n    }\n    // Prevent further manipulation of configuration.\n    // Not available in IE8, Safari 5, etc.\n    if (freeze) {\n      freeze(cfg);\n    }\n    CONFIG = cfg;\n  };\n  /* Keep track of all possible SVG and MathML tags\n   * so that we can perform the namespace checks\n   * correctly. */\n  const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n  const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n  /**\n   * Namespace rules for an element in the SVG namespace.\n   *\n   * @param tagName the element's lowercase tag name\n   * @param parent the (possibly simulated) parent node\n   * @param parentTagName the parent's lowercase tag name\n   * @returns true if a spec-compliant parser could produce this element\n   */\n  const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n    // The only way to switch from HTML namespace to SVG\n    // is via <svg>. If it happens via any other tag, then\n    // it should be killed.\n    if (parent.namespaceURI === HTML_NAMESPACE) {\n      return tagName === 'svg';\n    }\n    // The only way to switch from MathML to SVG is via <svg>\n    // if the parent is either <annotation-xml> or a MathML\n    // text integration point.\n    if (parent.namespaceURI === MATHML_NAMESPACE) {\n      return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n    }\n    // We only allow elements that are defined in SVG\n    // spec. All others are disallowed in SVG namespace.\n    return Boolean(ALL_SVG_TAGS[tagName]);\n  };\n  /**\n   * Namespace rules for an element in the MathML namespace.\n   *\n   * @param tagName the element's lowercase tag name\n   * @param parent the (possibly simulated) parent node\n   * @param parentTagName the parent's lowercase tag name\n   * @returns true if a spec-compliant parser could produce this element\n   */\n  const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n    // The only way to switch from HTML namespace to MathML\n    // is via <math>. If it happens via any other tag, then\n    // it should be killed.\n    if (parent.namespaceURI === HTML_NAMESPACE) {\n      return tagName === 'math';\n    }\n    // The only way to switch from SVG to MathML is via\n    // <math> and HTML integration points\n    if (parent.namespaceURI === SVG_NAMESPACE) {\n      return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n    }\n    // We only allow elements that are defined in MathML\n    // spec. All others are disallowed in MathML namespace.\n    return Boolean(ALL_MATHML_TAGS[tagName]);\n  };\n  /**\n   * Namespace rules for an element in the HTML namespace.\n   *\n   * @param tagName the element's lowercase tag name\n   * @param parent the (possibly simulated) parent node\n   * @param parentTagName the parent's lowercase tag name\n   * @returns true if a spec-compliant parser could produce this element\n   */\n  const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n    // The only way to switch from SVG to HTML is via\n    // HTML integration points, and from MathML to HTML\n    // is via MathML text integration points\n    if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n      return false;\n    }\n    if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n      return false;\n    }\n    // We disallow tags that are specific for MathML\n    // or SVG and should never appear in HTML namespace\n    return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n  };\n  /**\n   * @param element a DOM element whose namespace is being checked\n   * @returns Return false if the element has a\n   *  namespace that a spec-compliant parser would never\n   *  return. Return true otherwise.\n   */\n  const _checkValidNamespace = function _checkValidNamespace(element) {\n    let parent = getParentNode(element);\n    // In JSDOM, if we're inside shadow DOM, then parentNode\n    // can be null. We just simulate parent in this case.\n    if (!parent || !parent.tagName) {\n      parent = {\n        namespaceURI: NAMESPACE,\n        tagName: 'template'\n      };\n    }\n    const tagName = stringToLowerCase(element.tagName);\n    const parentTagName = stringToLowerCase(parent.tagName);\n    if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n      return false;\n    }\n    if (element.namespaceURI === SVG_NAMESPACE) {\n      return _checkSvgNamespace(tagName, parent, parentTagName);\n    }\n    if (element.namespaceURI === MATHML_NAMESPACE) {\n      return _checkMathMlNamespace(tagName, parent, parentTagName);\n    }\n    if (element.namespaceURI === HTML_NAMESPACE) {\n      return _checkHtmlNamespace(tagName, parent, parentTagName);\n    }\n    // For XHTML and XML documents that support custom namespaces\n    if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n      return true;\n    }\n    // The code should never reach this place (this means\n    // that the element somehow got namespace that is not\n    // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n    // Return false just in case.\n    return false;\n  };\n  /**\n   * _forceRemove\n   *\n   * @param node a DOM node\n   */\n  const _forceRemove = function _forceRemove(node) {\n    arrayPush(DOMPurify.removed, {\n      element: node\n    });\n    try {\n      // eslint-disable-next-line unicorn/prefer-dom-node-remove\n      getParentNode(node).removeChild(node);\n    } catch (_) {\n      /* The normal detach failed — this is reached for a parentless node\n         (getParentNode() is null, so .removeChild throws). Element.prototype\n         .remove() is itself a spec no-op on a parentless node, so a recorded\n         \"removal\" would otherwise hand the caller back an intact,\n         payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or\n         the style-with-element-child rule decided to kill). Fail closed by\n         throwing — exactly as a clobbered root does at the IN_PLACE entry —\n         rather than trying to \"neutralize\" the node via its own methods.\n         Neutralizing would mean calling getAttributeNames()/removeAttribute()\n         on the node, both of which a <form> root can clobber via a named child\n         (and _isClobbered does not even probe getAttributeNames), so the\n         neutralize step could itself be silently defeated, leaving the payload\n         intact. A throw touches only the cached, clobber-safe remove() and\n         getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)\n         to every root-kill reason. REPORT-3.\n                This lives inside the catch, so it never fires for a normally-removed\n         in-tree node: those have a parent, removeChild() succeeds, and the\n         catch is not entered. Only a kept (parentless) root reaches here. */\n      remove(node);\n      if (!getParentNode(node)) {\n        throw typeErrorCreate('a node selected for removal could not be detached from its tree ' + 'and cannot be safely returned; refusing to sanitize in place');\n      }\n    }\n  };\n  /**\n   * _stripAttributeNode\n   *\n   * Remove a single Attr node case/namespace-exactly on an attribute-teardown\n   * path. Name-based removeAttribute() ASCII-lowercases its lookup key for an\n   * HTML element in an HTML document and so silently misses a case-preserved\n   * handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect\n   * _removeAttribute() was fixed for, which a name-based call would reintroduce\n   * on these IN_PLACE teardown paths. Unlike _removeAttribute this does not\n   * record into DOMPurify.removed: the neutralize passes intentionally do not\n   * book-keep. A clobbered/detached node falls back to best-effort name-based\n   * removal.\n   *\n   * @param element the element to strip the attribute from\n   * @param attribute the Attr node to remove\n   * @param name the attribute's name, for the fallback path\n   */\n  const _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {\n    try {\n      element.removeAttributeNode(attribute);\n    } catch (_) {\n      try {\n        element.removeAttribute(name);\n      } catch (_) {}\n    }\n  };\n  /**\n   * _neutralizeRoot\n   *\n   * Fail-closed teardown of an in-place root after the sanitize walk aborts\n   * (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered\n   * custom element's reaction detaches a node so `_forceRemove`'s deliberate\n   * parentless guard throws, or any other re-entrant engine mutation — would\n   * otherwise leave the caller's *live* tree half-sanitized, with everything\n   * after the abort point still carrying its handlers. There is no safe way\n   * to resume the walk (the tree mutated under us), so we strip the root bare:\n   * remove every child and every attribute, then let the caller's catch see\n   * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`\n   * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).\n   *\n   * @param root the in-place root to empty\n   */\n  const _neutralizeRoot = function _neutralizeRoot(root) {\n    /* Strip every disallowed attribute (on* handlers included) off the whole\n       subtree BEFORE detaching anything. Detaching first would hand back\n       handler-bearing originals (e.g. an already-loading `<img onerror>`)\n       whose queued resource event still fires in page scope after we throw.\n       Clobber-safe reads; a doomed clobbered node's own attributes are\n       irrelevant while its non-clobbered descendants are reached and scrubbed. */\n    _neutralizeSubtree(root);\n    const childNodes = getChildNodes(root);\n    if (childNodes) {\n      const snapshot = [];\n      arrayForEach(childNodes, child => {\n        arrayPush(snapshot, child);\n      });\n      arrayForEach(snapshot, child => {\n        try {\n          remove(child);\n        } catch (_) {\n          /* Best-effort teardown; a still-attached child is handled below */\n        }\n      });\n    }\n    const attributes = getAttributes(root);\n    if (attributes) {\n      for (let i = attributes.length - 1; i >= 0; --i) {\n        const attribute = attributes[i];\n        const name = attribute && attribute.name;\n        if (typeof name === 'string') {\n          _stripAttributeNode(root, attribute, name);\n        }\n      }\n    }\n  };\n  /**\n   * _removeAttribute\n   *\n   * Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their\n   * lookup key for HTML elements in an HTML document, so they silently miss an\n   * attribute whose stored qualified name still contains uppercase ASCII\n   * letters. That happens when the node came from a case-preserving source\n   * (an XML/XHTML document imported via importNode(), or createAttributeNS()),\n   * where e.g. `ONERROR` survives the walk: the policy check lowercases to\n   * `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up\n   * `onerror` and finds nothing. Remove the exact Attr node instead, which is\n   * case- and namespace-exact, and fall back to name-based removal only when\n   * the caller could not supply the node.\n   *\n   * @param name an Attribute name\n   * @param element a DOM node\n   * @param attr the exact Attr node to remove, when the caller has it\n   */\n  const _removeAttribute = function _removeAttribute(name, element, attr) {\n    if (!attr) {\n      try {\n        attr = element.getAttributeNode(name);\n      } catch (_) {\n        attr = null;\n      }\n    }\n    arrayPush(DOMPurify.removed, {\n      attribute: attr || null,\n      from: element\n    });\n    try {\n      if (attr) {\n        element.removeAttributeNode(attr);\n      } else {\n        element.removeAttribute(name);\n      }\n    } catch (_) {\n      /* Clobbered or already-detached node - best-effort fall back to a\n         name-based removal so the \"is\" handling below still runs. */\n      try {\n        element.removeAttribute(name);\n      } catch (_) {}\n    }\n    // We void attribute values for unremovable \"is\" attributes\n    if (name === 'is') {\n      if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n        try {\n          _forceRemove(element);\n        } catch (_) {}\n      } else {\n        try {\n          element.setAttribute(name, '');\n        } catch (_) {}\n      }\n    }\n  };\n  /**\n   * _stripDisallowedAttributes\n   *\n   * Removes every attribute the active configuration does not allow from a\n   * single element, using the same allowlist as the main attribute pass (so\n   * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to\n   * neutralise nodes that are being discarded from an in-place tree.\n   *\n   * @param element the element to strip\n   */\n  const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n    const attributes = getAttributes(element);\n    if (!attributes) {\n      return;\n    }\n    for (let i = attributes.length - 1; i >= 0; --i) {\n      const attribute = attributes[i];\n      const name = attribute && attribute.name;\n      if (typeof name !== 'string' || ALLOWED_ATTR[transformCaseFunc(name)]) {\n        continue;\n      }\n      _stripAttributeNode(element, attribute, name);\n    }\n  };\n  /**\n   * _neutralizeSubtree\n   *\n   * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT\n   * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,\n   * namespace, comment, processing-instruction and KEEP_CONTENT:false removals\n   * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path\n   * those dropped nodes are detached from the caller's LIVE tree but a\n   * handler-bearing original among them (an `<img onerror>`/`<video>` that was\n   * loading) keeps its queued resource event, which fires in page scope after\n   * sanitize returns. This walks a removed subtree and strips every attribute\n   * the active configuration does not allow — so `on*` handlers are cancelled\n   * through the SAME allowlist that governs kept nodes, not a separate `/^on/`\n   * blocklist. Run synchronously before sanitize returns, i.e. before any\n   * queued event can fire. Hook-free by design: these nodes leave the output,\n   * so firing attribute hooks for them would be surprising. Clobber-safe reads;\n   * a doomed clobbered node may shadow `removeAttribute` (its own attributes are\n   * irrelevant — it is discarded — while its non-clobbered descendants, e.g.\n   * the `<img>`, are reached and scrubbed).\n   *\n   * @param root the root of a removed subtree to neutralise\n   */\n  const _neutralizeSubtree = function _neutralizeSubtree(root) {\n    const stack = [root];\n    while (stack.length > 0) {\n      const node = stack.pop();\n      const nodeType = _readNodeType(node);\n      if (nodeType === NODE_TYPE.element) {\n        _stripDisallowedAttributes(node);\n      }\n      const childNodes = getChildNodes(node);\n      if (childNodes) {\n        for (let i = childNodes.length - 1; i >= 0; --i) {\n          stack.push(childNodes[i]);\n        }\n      }\n    }\n  };\n  /**\n   * _neutralizePatchLinkage\n   *\n   * IN_PLACE entry pre-pass (declarative-partial-updates / streaming\n   * hardening, https://github.com/WICG/declarative-partial-updates).\n   *\n   * The main walk strips patch linkage (`for`/`patchsrc`) and removes range\n   * markers (PIs / markup comments) node-by-node, in document order, AS it\n   * reaches each node. On a live in-place root that leaves a window: from the\n   * moment the root is connected until the walk arrives at a given node, that\n   * node's linkage is live. A patch applied on connection/stream can fire as\n   * a microtask during the walk and inject or teleport an unsanitized DOM\n   * range into a region the iterator has already passed and will not revisit,\n   * so the post-return \"tree is sanitized\" contract is violated. Sweep the\n   * whole tree once up front and sever every linkage before the walk begins,\n   * closing that window.\n   *\n   * This CANNOT undo a patch that already fired before sanitize ran — that is\n   * the irreducible \"do not IN_PLACE a live-connected attacker tree\" caveat —\n   * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML\n   * to group with the rest of the declarative-partial-updates handling and\n   * stay overridable, consistent with the codebase.\n   *\n   * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a\n   * clobbered root cannot defeat the sweep of its non-clobbered descendants.\n   *\n   * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe\n   * .html Q1): this mirrors the existing policy of keeping `for` on\n   * <label>/<output>. If the shipping feature can drive a patch through a\n   * surviving `for`-on-label/output + `id` pair, this pre-pass and the\n   * attribute check at _isBasicCustomElement's caller must additionally drop\n   * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.\n   *\n   * @param root the in-place root to sweep\n   */\n  /**\n   * Central policy for declarative-partial-updates patch-linkage attributes,\n   * shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so\n   * the two sites cannot drift: `patchsrc` always links, `for` links\n   * everywhere except on <label>/<output>, and the whole policy is gated on\n   * SAFE_FOR_XML (see the rationale block in _isValidAttribute).\n   *\n   * @param lcName the transformCaseFunc'd attribute name\n   * @param lcTag the transformCaseFunc'd tag name of the carrying element\n   * @return true if the attribute is patch linkage and must be dropped\n   */\n  const _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {\n    if (!SAFE_FOR_XML) {\n      return false;\n    }\n    if (lcName === 'patchsrc') {\n      return true;\n    }\n    return lcName === 'for' && lcTag !== 'label' && lcTag !== 'output';\n  };\n  const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n    if (!SAFE_FOR_XML) {\n      return;\n    }\n    const stack = [root];\n    while (stack.length > 0) {\n      const node = stack.pop();\n      const nodeType = _readNodeType(node);\n      /* Remove range markers (the target side of a patch linkage): every\n         processing instruction, and any markup-bearing comment. */\n      if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n        try {\n          remove(node);\n        } catch (_) {\n          /* Best-effort */\n        }\n        continue;\n      }\n      /* Strip patch-source attributes (the source side) off elements. */\n      if (nodeType === NODE_TYPE.element) {\n        const element = node;\n        const lcTag = transformCaseFunc(_readNodeName(node));\n        try {\n          if (element.hasAttribute && element.hasAttribute('patchsrc')) {\n            element.removeAttribute('patchsrc');\n          }\n          if (element.hasAttribute && element.hasAttribute('for') && _isPatchLinkageAttribute('for', lcTag)) {\n            element.removeAttribute('for');\n          }\n        } catch (_) {\n          /* Clobbered removeAttribute/hasAttribute on a doomed node — ignore */\n        }\n      }\n      const childNodes = getChildNodes(node);\n      if (childNodes) {\n        for (let i = childNodes.length - 1; i >= 0; --i) {\n          stack.push(childNodes[i]);\n        }\n      }\n    }\n  };\n  /**\n   * _initDocument\n   *\n   * @param dirty - a string of dirty markup\n   * @return a DOM, filled with the dirty markup\n   */\n  const _initDocument = function _initDocument(dirty) {\n    /* Create a HTML document */\n    let doc = null;\n    let leadingWhitespace = null;\n    if (FORCE_BODY) {\n      dirty = '<remove></remove>' + dirty;\n    } else {\n      /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n      const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n      leadingWhitespace = matches && matches[0];\n    }\n    if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n      // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n      dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n    }\n    const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n    /*\n     * Use the DOMParser API by default, fallback later if needs be\n     * DOMParser not work for svg when has multiple root element.\n     */\n    if (NAMESPACE === HTML_NAMESPACE) {\n      try {\n        doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n      } catch (_) {}\n    }\n    /* Use createHTMLDocument in case DOMParser is not available */\n    if (!doc || !doc.documentElement) {\n      doc = implementation.createDocument(NAMESPACE, 'template', null);\n      try {\n        doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n      } catch (_) {\n        // Syntax error if dirtyPayload is invalid xml\n      }\n    }\n    const body = doc.body || doc.documentElement;\n    if (dirty && leadingWhitespace) {\n      body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n    }\n    /* Work on whole document or just its body */\n    if (NAMESPACE === HTML_NAMESPACE) {\n      return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n    }\n    return WHOLE_DOCUMENT ? doc.documentElement : body;\n  };\n  /**\n   * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n   *\n   * @param root The root element or node to start traversing on.\n   * @return The created NodeIterator\n   */\n  const _createNodeIterator = function _createNodeIterator(root) {\n    /* Read ownerDocument through the cached Node.prototype getter, never the\n       direct property. HTMLFormElement has [LegacyOverrideBuiltIns], so a\n       clobbering child (<input name=\"ownerDocument\"> or a form-associated\n       external input) shadows the prototype getter and makes a direct read\n       return that <input>. createNodeIterator.call(<input>, ...) then throws\n       \"Illegal invocation\", and on the IN_PLACE path that throw lands before\n       the walk's fail-closed barrier - leaving the caller's live tree, with\n       any already-armed handler in it, un-neutralized. The cached getter\n       returns the real Document regardless of the clobber. */\n    const doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;\n    return createNodeIterator.call(doc || root, root,\n    // eslint-disable-next-line no-bitwise\n    NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n  };\n  /**\n   * Replace template expression syntax (mustache, ERB, template\n   * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n   * sites. Order matters: mustache, then ERB, then template literal.\n   *\n   * @param value the string to scrub\n   * @returns the scrubbed string\n   */\n  const _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n    value = stringReplace(value, MUSTACHE_EXPR$1, ' ');\n    value = stringReplace(value, ERB_EXPR$1, ' ');\n    value = stringReplace(value, TMPLIT_EXPR$1, ' ');\n    return value;\n  };\n  /**\n   * Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n   * character data of an element subtree. Used as the final safety net for\n   * SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n   * which only form after text-node normalization (e.g. fragments split across\n   * stripped elements) cannot survive into a template-evaluating framework.\n   *\n   * Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n   * in place rather than round-tripping through innerHTML. This preserves\n   * descendant node references (important for IN_PLACE callers), avoids a\n   * serialize/reparse cycle, and reads literal character data — which means\n   * `<%...%>` in text content matches the ERB regex against its real bytes\n   * instead of the HTML-entity-escaped form innerHTML would produce.\n   *\n   * Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n   * attributes is performed during the per-node `_sanitizeAttributes` pass.\n   *\n   * @param node The root element whose character data should be scrubbed.\n   */\n  const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n    var _node$querySelectorAl;\n    node.normalize();\n    /* Clobber-safe ownerDocument read, same reasoning as _createNodeIterator:\n       under SAFE_FOR_TEMPLATES this runs on the live IN_PLACE root, which may\n       carry a form-named-getter override of ownerDocument. */\n    const doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;\n    const walker = createNodeIterator.call(doc || node, node,\n    // eslint-disable-next-line no-bitwise\n    NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n    let currentNode = walker.nextNode();\n    while (currentNode) {\n      currentNode.data = _stripTemplateExpressions(currentNode.data);\n      currentNode = walker.nextNode();\n    }\n    // NodeIterator does not descend into <template>.content per the DOM spec,\n    // so we must explicitly recurse into each template's content fragment,\n    // mirroring the approach used by _sanitizeShadowDOM.\n    const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, 'template');\n    if (templates) {\n      arrayForEach(templates, tmpl => {\n        if (_isDocumentFragment(tmpl.content)) {\n          _scrubTemplateExpressions2(tmpl.content);\n        }\n      });\n    }\n  };\n  /**\n   * _isClobbered\n   *\n   * Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n   * interface with [LegacyOverrideBuiltIns]; a descendant element with a\n   * `name` attribute matching a prototype property shadows that property\n   * on direct reads. We use this check at the IN_PLACE entry-point and\n   * during attribute sanitization to refuse clobbered forms.\n   *\n   * @param element element to check for clobbering attacks\n   * @return true if clobbered, false if safe\n   */\n  const _isClobbered = function _isClobbered(element) {\n    // Realm-independent tag-name probe. If we can't determine the tag\n    // name at all, we can't reason about clobbering — return false\n    // (the caller's other defences still apply).\n    const realTagName = getNodeName ? getNodeName(element) : null;\n    if (typeof realTagName !== 'string') {\n      return false;\n    }\n    if (transformCaseFunc(realTagName) !== 'form') {\n      return false;\n    }\n    return typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' ||\n    // Realm-safe NamedNodeMap detection: equality against the cached\n    // prototype getter. Clobbered .attributes (e.g. <input name=\"attributes\">)\n    // makes the direct read diverge from the cached read; a clean form\n    // (same-realm OR foreign-realm) has both reads pointing at the same\n    // canonical NamedNodeMap.\n    element.attributes !== getAttributes(element) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function' ||\n    // NodeType clobbering probe. Cached Node.prototype.nodeType getter\n    // returns the integer 1 for any Element regardless of realm; direct\n    // read on a clobbered form (e.g. <input name=\"nodeType\">) returns\n    // the named child element. Cheap addition — nodeType is read from\n    // an internal slot, no serialization cost — and removes a residual\n    // clobbering surface used by several mXSS / PI / comment branches\n    // in _sanitizeElements that compare currentNode.nodeType directly.\n    element.nodeType !== getNodeType(element) ||\n    // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named\n    // \"childNodes\" shadows the prototype getter. Direct reads of\n    // form.childNodes from a clobbered form return the named child\n    // instead of the real NodeList, so any walk that reads it directly\n    // skips the form's real children. Compare the direct read to the\n    // cached Node.prototype getter — when the form's named-property\n    // getter intercepts the read, the two values differ and we flag\n    // the form. This catches every clobbering child type (input,\n    // select, etc.) regardless of whether the named child happens to\n    // carry a numeric .length, which a typeof-based probe would miss\n    // (e.g. HTMLSelectElement.length is a defined unsigned-long).\n    element.childNodes !== getChildNodes(element);\n  };\n  /**\n   * Checks whether the given value is a DocumentFragment from any realm.\n   *\n   * The realm-independent replacement reads `nodeType` through the cached\n   * Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n   * constant (11). nodeType is a numeric value resolved from the node's\n   * internal slot, identical across realms for the same kind of node.\n   *\n   * @param value object to check\n   * @return true if value is a DocumentFragment-shaped node from any realm\n   */\n  const _isDocumentFragment = function _isDocumentFragment(value) {\n    if (!getNodeType || typeof value !== 'object' || value === null) {\n      return false;\n    }\n    try {\n      return getNodeType(value) === NODE_TYPE.documentFragment;\n    } catch (_) {\n      return false;\n    }\n  };\n  /**\n   * Checks whether the given object is a DOM node, including nodes that\n   * originate from a different window/realm (e.g. an iframe's\n   * contentDocument). The previous `value instanceof Node` check was\n   * realm-bound: nodes from a different window failed it, causing\n   * sanitize() to silently stringify them and reset IN_PLACE to false,\n   * returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n   *\n   * @param value object to check whether it's a DOM node\n   * @return true if value is a DOM node from any realm\n   */\n  const _isNode = function _isNode(value) {\n    if (!getNodeType || typeof value !== 'object' || value === null) {\n      return false;\n    }\n    try {\n      return typeof getNodeType(value) === 'number';\n    } catch (_) {\n      return false;\n    }\n  };\n  function _executeHooks(hooks, currentNode, data) {\n    if (hooks.length === 0) {\n      return;\n    }\n    arrayForEach(hooks, hook => {\n      hook.call(DOMPurify, currentNode, data, CONFIG);\n    });\n  }\n  /**\n   * Structural-threat checks that condemn a node regardless of the\n   * allowlists: mXSS via namespace confusion, risky CSS construction,\n   * processing instructions, markup-bearing comments. Pure predicate;\n   * the caller removes. Check order is load-bearing.\n   *\n   * @param currentNode the node to inspect\n   * @param tagName the node's transformCaseFunc'd tag name\n   * @return true if the node must be removed\n   */\n  const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n    /* Detect mXSS attempts abusing namespace confusion */\n    if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {\n      return true;\n    }\n    /* Remove rawtext/literal-text elements whose literal serialization\n       re-opens markup on an HTML reparse - shapes (a) and (b) documented at\n       LITERAL_TEXT_ELEMENTS. Both are invisible to rule 1 above (which\n       self-disables once there is an element child, and whose second probe\n       reads the innerHTML an XML/XHTML document serializes escaped), which\n       is why both probes here read textContent instead. Previously only\n       `style`-with-element-child was covered; every element in\n       LITERAL_TEXT_ELEMENTS shares this literal serialization and is\n       equally affected. */\n    if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === 'string' && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) {\n      return true;\n    }\n    /* Remove any occurrence of processing instructions */\n    if (currentNode.nodeType === NODE_TYPE.processingInstruction) {\n      return true;\n    }\n    /* Remove any kind of possibly harmful comments */\n    if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) {\n      return true;\n    }\n    return false;\n  };\n  /**\n   * Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate\n   * function, per the validation in _parseConfig) against a name.\n   * Additional arguments are forwarded to predicate functions - the\n   * attributeNameCheck predicate receives the tag name as its second\n   * argument. A null/absent check never matches.\n   *\n   * @param check the configured tagNameCheck / attributeNameCheck value\n   * @param name the name to test\n   * @param args extra arguments forwarded to a predicate function\n   * @return true if the check matches the name\n   */\n  const _matchesNameCheck = function _matchesNameCheck(check, name) {\n    if (check instanceof RegExp) {\n      return regExpTest(check, name);\n    }\n    if (check instanceof Function) {\n      for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n        args[_key - 2] = arguments[_key];\n      }\n      return Boolean(check(name, ...args));\n    }\n    return false;\n  };\n  /**\n   * Handle a node whose tag is forbidden or not allowlisted: keep\n   * allowed custom elements (false return exits _sanitizeElements\n   * early - the namespace and fallback-tag removal checks are\n   * intentionally skipped for kept custom elements), else hoist\n   * content per KEEP_CONTENT and remove.\n   *\n   * A kept custom element is the ONLY case in which this function\n   * returns false, so the caller uses that return value to run the\n   * afterSanitizeElements hook on the kept element and keep the\n   * element-hook lifecycle consistent with normal allowlisted\n   * elements (GHSA-c2j3-45gr-mqc4).\n   *\n   * @param currentNode the disallowed node\n   * @param tagName the node's transformCaseFunc'd tag name\n   * @return true if the node was removed, false if kept\n   */\n  const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {\n    /* Check if we have a custom element to handle */\n    if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n      return false;\n    }\n    /* Keep content except for bad-listed elements.\n         Use the cached prototype getters exclusively — the previous code\n         had `|| currentNode.parentNode` / `|| currentNode.childNodes`\n         fallbacks, but the cached getters always return the canonical\n         value (or null for a real parent-less node), so the fallback\n         path was dead in safe cases and a clobbering surface in unsafe\n         ones. Falsy cached results stay falsy; the `if (childNodes &&\n         parentNode)` check already gates correctly. */\n    if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n      const parentNode = getParentNode(currentNode);\n      const childNodes = getChildNodes(currentNode);\n      if (childNodes && parentNode) {\n        const childCount = childNodes.length;\n        /* Hoist by moving each child up one level rather than deep-cloning\n             it. Moving transfers every descendant exactly once, so a chain of\n             nested disallowed elements costs O(n) instead of the O(n^2) that\n             re-cloning the shrinking subtree at each level produced; it also\n             empties the removed original, so `DOMPurify.removed` no longer\n             pins whole subtrees. Moving preserves the in-place guarantee too:\n             an original carrying already-queued resource events (`<img\n             onerror>`, `<video>`/`<audio>` error, lazy/`onload`, …) is\n             relocated and sanitised rather than left detached but still armed.\n                      The sole case that must clone is removing the walk root itself.\n             The result is serialised from the root's subtree, so a restrictive\n             ALLOWED_TAGS that strips the root (`body` on the string path) must\n             leave the content inside it, which only cloning does. In IN_PLACE\n             the root is pre-validated as an allowed tag and so is never removed\n             here, so that path always takes the move branch.\n                      `childNodes` is live; a tail-to-head walk keeps `childNodes[i]`\n             valid whether we move (drops the trailing entry) or clone (leaves\n             the list intact). */\n        for (let i = childCount - 1; i >= 0; --i) {\n          const hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];\n          parentNode.insertBefore(hoisted, getNextSibling(currentNode));\n        }\n      }\n    }\n    _forceRemove(currentNode);\n    return true;\n  };\n  /**\n   * Fork a hook-mutable allowlist off its shared binding the first time a\n   * (possibly lazily-installed) uponSanitize* hook is about to see it, so the\n   * hook cannot widen the per-instance default or the setConfig binding by\n   * reference and leak past the call. Returns the set unchanged once it is\n   * already call-local, so repeated calls across elements are idempotent.\n   *\n   * @param hookList the uponSanitize* hook array for this event\n   * @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding\n   * @param defaultSet the per-instance DEFAULT_ALLOWED_* constant\n   * @param setConfigSet the captured setConfig() binding, or null\n   * @return a call-local clone if a hook is present and set is still shared,\n   *   else set unchanged\n   */\n  const _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {\n    if (hookList.length === 0) {\n      return set;\n    }\n    return set === defaultSet || set === setConfigSet ? clone(set) : set;\n  };\n  /**\n   * Shared guard for a node that a hook has detached from the walk tree,\n   * used after each element-hook site in _sanitizeElements. Detaching is a\n   * long-standing user pattern (issue #469; draw.io-style foreignObject\n   * filtering). Per the cached, unclobberable parentNode getter the node is\n   * genuinely out of the tree, so it can reach neither the serialized\n   * output nor an IN_PLACE live tree; treat it as removed and stop\n   * processing it. Without this guard, the unsafe-node / namespace checks\n   * would call _forceRemove on a parentless node and hit the REPORT-3\n   * fail-closed throw — which exists for nodes DOMPurify wants gone but\n   * *cannot* detach (clobbered / parentless roots), the opposite of a node\n   * that is already safely gone. The walk root is exempt: a detached\n   * IN_PLACE root is legitimate input and must still be fully sanitized,\n   * and a kill-decision on it must keep hitting the REPORT-3 throw.\n   *\n   * Nodes detached by hooks stay the hook's responsibility for placement:\n   * they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE\n   * pass (which iterates DOMPurify.removed) does not reach them. But a\n   * hook-detached subtree can still hold a queued resource-event handler -\n   * e.g. an <img onload> that began loading when the caller built the live\n   * tree - which fires in page scope after sanitize returns even though the\n   * handler never reached the returned tree. That is the audit-5 F1 hazard,\n   * and the documented node.remove() hook pattern walks straight into it.\n   * So on the IN_PLACE path we neutralize the detached subtree inline,\n   * stripping its non-allow-listed attributes before returning, exactly as\n   * the post-walk pass does for _forceRemove'd subtrees.\n   *\n   * @param currentNode the node a hook may have detached\n   * @param root the current walk root\n   * @return true if the node is detached and now handled, false otherwise\n   */\n  const _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {\n    if (currentNode === root || getParentNode(currentNode) !== null) {\n      return false;\n    }\n    if (IN_PLACE) {\n      _neutralizeSubtree(currentNode);\n    }\n    return true;\n  };\n  /**\n   * _sanitizeElements\n   *\n   * @protect nodeName\n   * @protect textContent\n   * @protect removeChild\n   * @param currentNode to check for permission to exist\n   * @return true if node was killed, false if left alive\n   */\n  const _sanitizeElements = function _sanitizeElements(currentNode, root) {\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n    /* A hook may have detached the node - treat it as removed (see\n       _handleHookDetachedNode for the full rationale). */\n    if (_handleHookDetachedNode(currentNode, root)) {\n      return true;\n    }\n    /* Check if element is clobbered or can clobber */\n    if (_isClobbered(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Now let's check the element's type and name */\n    const tagName = transformCaseFunc(_readNodeName(currentNode));\n    /* Close the pre-walk clone-guard's timing gap: an uponSanitizeElement\n       hook may have been installed after that guard sampled the hook arrays\n       (e.g. lazily from beforeSanitizeElements), leaving ALLOWED_TAGS still\n       aliasing a shared binding that a widening hook would mutate by\n       reference. Fork it before exposing it to the hook. */\n    ALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);\n    /* Execute a hook if present */\n    _executeHooks(hooks.uponSanitizeElement, currentNode, {\n      tagName,\n      allowedTags: ALLOWED_TAGS\n    });\n    /* The uponSanitizeElement hook may have detached the node, exactly as\n       above (see _handleHookDetachedNode for the full rationale). */\n    if (_handleHookDetachedNode(currentNode, root)) {\n      return true;\n    }\n    /* Remove mXSS vectors, processing instructions and risky comments */\n    if (_isUnsafeNode(currentNode, tagName)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Remove element if anything forbids its presence */\n    if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n      const removed = _sanitizeDisallowedNode(currentNode, tagName, root);\n      /* A false return means the node is a custom element kept via\n         CUSTOM_ELEMENT_HANDLING - the only keep path through\n         _sanitizeDisallowedNode. Run afterSanitizeElements on it so the\n         element-hook lifecycle matches normal allowlisted elements: a\n         security policy applied in this hook (e.g. stripping an attribute\n         from every surviving element) must not silently skip kept custom\n         elements (GHSA-c2j3-45gr-mqc4). This mirrors the normal-element\n         tail below - the hook runs, then the walker's subsequent\n         _sanitizeAttributes pass sanitizes the element's attributes. The\n         deliberately skipped namespace and fallback-tag removal checks stay\n         skipped; they are removal decisions, not the hook contract. */\n      if (removed === false) {\n        _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n      }\n      return removed;\n    }\n    /* Check whether element has a valid namespace.\n       Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype\n       nodeType getter rather than `instanceof Element`, which is realm-\n       bound and short-circuits to false for any node minted in a different\n       realm — letting a foreign-realm element with a forbidden namespace\n       slip past the namespace check entirely. */\n    const nt = _readNodeType(currentNode);\n    if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Make sure that older browsers don't get fallback-tag mXSS */\n    if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n    /* Sanitize element content to be template-safe */\n    if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n      /* Get the element's text content */\n      const content = _stripTemplateExpressions(currentNode.textContent);\n      if (currentNode.textContent !== content) {\n        arrayPush(DOMPurify.removed, {\n          element: currentNode.cloneNode()\n        });\n        currentNode.textContent = content;\n      }\n    }\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n    return false;\n  };\n  /**\n   * _isValidAttribute\n   *\n   * @param lcTag Lowercase tag name of containing element.\n   * @param lcName Lowercase attribute name.\n   * @param value Attribute value.\n   * @return Returns true if `value` is valid, otherwise false.\n   */\n  // eslint-disable-next-line complexity\n  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n    /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */\n    if (FORBID_ATTR[lcName]) {\n      return false;\n    }\n    /* Reject declarative-partial-updates patch-linkage attributes\n       (https://github.com/WICG/declarative-partial-updates).\n            Empirical note (Chrome 150, verified — see\n       test/declarative-patch-probe-v3.html): expansion is NOT applied after\n       sanitization. For the string path it fires during sanitize()'s own\n       parse, so the walk sees and sanitizes the fully materialized expanded\n       tree — teleports into MathML/SVG integration points included; a\n       weaponized `<template for>`->`<img onerror>` comes back with the handler\n       stripped. For the IN_PLACE path it fires on connection, before the walk.\n       Either way DOMPurify is NOT blind to the patch.\n            This removal is therefore defense-in-depth rather than the sole barrier:\n       it prevents live linkage from surviving into the OUTPUT and re-expanding\n       in the caller's context, and keeps behaviour deterministic if a future\n       engine defers expansion. `for` is legitimate only on <label>/<output>;\n       anywhere else (notably <template for>) it links the element to a patch\n       target and teleports or removes an arbitrary DOM range by id/marker name.\n       `patchsrc` fetches remote markup and is treated as a script-loading\n       mechanism (CSP). Gated on SAFE_FOR_XML so the removal groups with the\n       other structural-threat checks and stays overridable, consistent with\n       the rest of the codebase. PI range markers are already removed by\n       _isUnsafeNode. */\n    if (_isPatchLinkageAttribute(lcName, lcTag)) {\n      return false;\n    }\n    /* Make sure attribute cannot clobber */\n    if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n      return false;\n    }\n    const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n    /* Allow valid data-* attributes: At least one character after \"-\"\n        (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n        XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n        We don't need to check the value; it's always URI safe. */\n    if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) {\n      return true;\n    }\n    /* Allow valid aria-* attributes, the value is always URI safe */\n    if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) {\n      return true;\n    }\n    /* A name outside the allowlist is acceptable on custom-element terms\n       only. The value checks below are intentionally skipped in that case:\n       if the user supplied a tagNameCheck we also allow derived custom\n       elements using the same test, and attributes passing the configured\n       attributeNameCheck are allowed as custom elements define these at\n       their own discretion. */\n    if (!nameIsPermitted) {\n      return (\n        // Condition a) covers a basically valid custom element tag name whose\n        // tag passes the configured tagNameCheck and whose attribute name\n        // passes the configured attributeNameCheck ...\n        _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) ||\n        // Condition b) covers an `is` attribute whose value passes the\n        // configured tagNameCheck while customized built-in elements are\n        // allowed.\n        lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value)\n      );\n    }\n    /* Check value is safe. First, is attr inert? If so, is safe */\n    if (URI_SAFE_ATTRIBUTES[lcName]) {\n      return true;\n    }\n    /* Check no script, data or unknown possibly unsafe URI\n        unless we know URI values are safe for that attribute */\n    if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) {\n      return true;\n    }\n    /* Keep image data URIs alive if src/xlink:href is allowed */\n    /* Further prevent gadget XSS for dynamically built script tags */\n    if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) {\n      return true;\n    }\n    /* Allow unknown protocols: This provides support for links that\n        are handled by protocol handlers which may be unknown ahead of\n        time, e.g. fb:, spotify: */\n    if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) {\n      return true;\n    }\n    /* Only an empty (binary) value remains safe at this point;\n       anything else is presumed unsafe, do not add it back */\n    return !value;\n  };\n  /* Names the HTML spec reserves from valid-custom-element-name; these must\n   * never be treated as basic custom elements even when a permissive\n   * CUSTOM_ELEMENT_HANDLING.tagNameCheck is configured. */\n  const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ['annotation-xml', 'color-profile', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'missing-glyph']);\n  /**\n   * _isBasicCustomElement\n   * checks if at least one dash is included in tagName, and it's not the first char\n   * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n   *\n   * @param tagName name of the tag of the node to sanitize\n   * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n   */\n  const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n    return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n  };\n  /**\n   * Wrap an attribute value in the matching Trusted Types object when\n   * the active policy requires it. Namespaced attributes pass through\n   * unchanged (no TT support yet, see\n   * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n   *\n   * @param lcTag lowercase tag name of the containing element\n   * @param lcName lowercase attribute name\n   * @param namespaceURI the attribute's namespace, if any\n   * @param value the attribute value to wrap\n   * @return the value, wrapped when Trusted Types demand it\n   */\n  const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n    if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function' && !namespaceURI) {\n      switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n        case 'TrustedHTML':\n          {\n            return _createTrustedHTML(value);\n          }\n        case 'TrustedScriptURL':\n          {\n            return _createTrustedScriptURL(value);\n          }\n      }\n    }\n    return value;\n  };\n  /**\n   * Write a modified attribute value back onto the element. On\n   * success, re-probe for clobbering introduced by the new value and\n   * remove the element when found; otherwise pop the removal entry\n   * recorded by the earlier _removeAttribute (long-standing pairing\n   * with the SANITIZE_NAMED_PROPS path - do not \"fix\" casually). On\n   * failure, remove the attribute instead.\n   *\n   * @param currentNode the element carrying the attribute\n   * @param name the attribute name as present on the element\n   * @param namespaceURI the attribute's namespace, if any\n   * @param value the new attribute value\n   */\n  const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n    try {\n      if (namespaceURI) {\n        currentNode.setAttributeNS(namespaceURI, name, value);\n      } else {\n        /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n        currentNode.setAttribute(name, value);\n      }\n      if (_isClobbered(currentNode)) {\n        _forceRemove(currentNode);\n      } else {\n        arrayPop(DOMPurify.removed);\n      }\n    } catch (_) {\n      _removeAttribute(name, currentNode);\n    }\n  };\n  /**\n   * _sanitizeAttributes\n   *\n   * @protect attributes\n   * @protect nodeName\n   * @protect removeAttribute\n   * @protect setAttribute\n   *\n   * @param currentNode to sanitize\n   */\n  const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n    const attributes = currentNode.attributes;\n    /* Check if we have attributes; if not we might have a text node */\n    if (!attributes || _isClobbered(currentNode)) {\n      return;\n    }\n    /* Same lazy-install guard as uponSanitizeElement (see there): fork the\n       attribute allowlist off its shared binding before a hook can see it. */\n    ALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);\n    const hookEvent = {\n      attrName: '',\n      attrValue: '',\n      keepAttr: true,\n      allowedAttributes: ALLOWED_ATTR,\n      forceKeepAttr: undefined\n    };\n    let l = attributes.length;\n    const lcTag = transformCaseFunc(currentNode.nodeName);\n    /* Go backwards over all attributes; safely remove bad ones */\n    while (l--) {\n      const attr = attributes[l];\n      const name = attr.name,\n        namespaceURI = attr.namespaceURI,\n        attrValue = attr.value;\n      const lcName = transformCaseFunc(name);\n      const initValue = attrValue;\n      let value = name === 'value' ? initValue : stringTrim(initValue);\n      /* Execute a hook if present */\n      hookEvent.attrName = lcName;\n      hookEvent.attrValue = value;\n      hookEvent.keepAttr = true;\n      hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n      _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n      value = hookEvent.attrValue;\n      /* Full DOM Clobbering protection via namespace isolation,\n       * Prefix id and name attributes with `user-content-`\n       */\n      if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name') && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n        // Remove the attribute with this value\n        _removeAttribute(name, currentNode, attr);\n        // Prefix the value and later re-create the attribute with the sanitized value\n        value = SANITIZE_NAMED_PROPS_PREFIX + value;\n      }\n      // Else: already prefixed, leave the attribute alone — the prefix is\n      // itself the clobbering protection, and re-applying it is incorrect.\n      /* Work around a security issue with comments inside attributes */\n      if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\n        _removeAttribute(name, currentNode, attr);\n        continue;\n      }\n      /* Make sure we cannot easily use animated hrefs, even if animations are allowed */\n      if (lcName === 'attributename' && stringMatch(value, 'href')) {\n        _removeAttribute(name, currentNode, attr);\n        continue;\n      }\n      /* Did the hooks force-keep the attribute? */\n      if (hookEvent.forceKeepAttr) {\n        continue;\n      }\n      /* Did the hooks approve of the attribute? */\n      if (!hookEvent.keepAttr) {\n        _removeAttribute(name, currentNode, attr);\n        continue;\n      }\n      /* Work around a security issue in jQuery 3.0 */\n      if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n        _removeAttribute(name, currentNode, attr);\n        continue;\n      }\n      /* Sanitize attribute content to be template-safe */\n      if (SAFE_FOR_TEMPLATES) {\n        value = _stripTemplateExpressions(value);\n      }\n      /* Is `value` valid for this attribute? */\n      if (!_isValidAttribute(lcTag, lcName, value)) {\n        _removeAttribute(name, currentNode, attr);\n        continue;\n      }\n      /* Handle attributes that require Trusted Types */\n      value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n      /* Handle invalid data-* attribute set by try-catching it */\n      if (value !== initValue) {\n        _setAttributeValue(currentNode, name, namespaceURI, value);\n      }\n    }\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n  };\n  /**\n   * _sanitizeShadowDOM\n   *\n   * @param fragment to iterate over recursively\n   */\n  const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n    let shadowNode = null;\n    const shadowIterator = _createNodeIterator(fragment);\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n    while (shadowNode = shadowIterator.nextNode()) {\n      /* Execute a hook if present */\n      _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n      /* Sanitize tags and elements */\n      _sanitizeElements(shadowNode, fragment);\n      /* Check attributes next */\n      _sanitizeAttributes(shadowNode);\n      /* Deep shadow DOM detected.\n         Realm-safe check (GHSA-hpcv-96wg-7vj8): use nodeType against the\n         DOCUMENT_FRAGMENT_NODE constant rather than instanceof, so we\n         recurse into <template>.content from foreign realms too. */\n      if (_isDocumentFragment(shadowNode.content)) {\n        _sanitizeShadowDOM2(shadowNode.content);\n      }\n      /* An element iterated here may itself host an attached\n         shadow root. The default NodeIterator does not enter shadow\n         trees, so a shadow root nested inside template.content was\n         previously reached by no walk at all (the pre-pass at\n         _sanitizeAttachedShadowRoots descends via childNodes, which\n         doesn't enter template.content; the template-content recursion\n         above iterates the content but never inspected shadowRoot).\n         Walk it explicitly. The nodeType guard avoids reading\n         shadowRoot off text / comment / CDATA / PI nodes that the\n         iterator also surfaces. */\n      if (_readNodeType(shadowNode) === NODE_TYPE.element) {\n        const innerSr = getShadowRoot(shadowNode);\n        if (_isDocumentFragment(innerSr)) {\n          _sanitizeAttachedShadowRoots(innerSr);\n          _sanitizeShadowDOM2(innerSr);\n        }\n      }\n    }\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n  };\n  /**\n   * _sanitizeAttachedShadowRoots\n   *\n   * Walks `root` and feeds every attached shadow root we encounter into\n   * the existing _sanitizeShadowDOM pipeline. The default node iterator\n   * does not descend into shadow trees, so nodes inside an attached\n   * shadow root would otherwise be skipped entirely.\n   *\n   * Two real input paths put attached shadow roots in front of us:\n   *   1. IN_PLACE on a DOM node that already has shadow roots attached.\n   *   2. DOM-node input where importNode(dirty, true) deep-clones the\n   *      shadow root because it was created with `clonable: true`.\n   *\n   * This pass runs once, up front, so the main iteration loop (and the\n   * existing _sanitizeShadowDOM template-content recursion) stay\n   * untouched — string-input paths are not affected.\n   *\n   * @param root the subtree root to walk for attached shadow roots\n   */\n  const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n    /* Iterative (explicit stack) rather than per-child recursion. DOM APIs\n       impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data\n       built straight into the DOM — the IN_PLACE surface) deeper than the JS\n       call-stack budget would otherwise overflow native recursion here and\n       throw at the IN_PLACE entry pre-pass, before a single node is\n       sanitized, leaving the caller's live tree untouched (fail-open). See\n       campaign-3 F4. A heap stack keeps depth off the call stack.\n            Each work item is either a node to descend into, or a deferred\n       `_sanitizeShadowDOM` for an already-walked shadow root. The deferred\n       form preserves the original post-order discipline: a shadow root's\n       nested shadow roots are discovered before the outer shadow is\n       sanitized (which may remove hosts). Pushes are in reverse of the\n       desired processing order (LIFO): template content, then children, then\n       the shadow-sanitize, then the shadow walk — so the order matches the\n       previous recursion exactly. */\n    const stack = [{\n      node: root,\n      shadow: null\n    }];\n    while (stack.length > 0) {\n      const item = stack.pop();\n      /* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */\n      if (item.shadow) {\n        _sanitizeShadowDOM2(item.shadow);\n        continue;\n      }\n      const node = item.node;\n      const nodeType = _readNodeType(node);\n      const isElement = nodeType === NODE_TYPE.element;\n      /* (pushed last → processed first) Children, snapshotted in reverse so\n         the first child is processed first. Snapshotting matters because a\n         hook may detach siblings mid-walk. */\n      const childNodes = getChildNodes(node);\n      if (childNodes) {\n        for (let i = childNodes.length - 1; i >= 0; --i) {\n          stack.push({\n            node: childNodes[i],\n            shadow: null\n          });\n        }\n      }\n      /* (pushed before children → processed after them, matching the old\n         \"template content last\" order) When the node is a <template>,\n         descend into its content. */\n      if (isElement) {\n        const rootName = getNodeName ? getNodeName(node) : null;\n        if (typeof rootName === 'string' && transformCaseFunc(rootName) === 'template') {\n          const content = node.content;\n          if (_isDocumentFragment(content)) {\n            stack.push({\n              node: content,\n              shadow: null\n            });\n          }\n        }\n      }\n      /* Shadow root (processed first): walk its subtree, then sanitise it.\n         Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\n         rather than `instanceof DocumentFragment`, which is realm-bound and\n         silently skipped foreign-realm shadow roots (e.g.\n         iframe.contentDocument attachShadow). */\n      if (isElement) {\n        const sr = getShadowRoot(node);\n        if (_isDocumentFragment(sr)) {\n          /* Push the deferred sanitise first so it pops after the shadow\n             walk we push next, i.e. nested shadow roots are discovered\n             before this one is sanitised. */\n          stack.push({\n            node: null,\n            shadow: sr\n          }, {\n            node: sr,\n            shadow: null\n          });\n        }\n      }\n    }\n  };\n  // eslint-disable-next-line complexity\n  DOMPurify.sanitize = function (dirty) {\n    let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    let body = null;\n    let importedNode = null;\n    let currentNode = null;\n    let returnNode = null;\n    /* Make sure we have a string to sanitize.\n      DO NOT return early, as this will return the wrong type if\n      the user has requested a DOM object rather than a string */\n    IS_EMPTY_INPUT = !dirty;\n    if (IS_EMPTY_INPUT) {\n      dirty = '<!-->';\n    }\n    /* Stringify, in case dirty is an object */\n    if (typeof dirty !== 'string' && !_isNode(dirty)) {\n      dirty = stringifyValue(dirty);\n      if (typeof dirty !== 'string') {\n        throw typeErrorCreate('dirty is not a string, aborting');\n      }\n    }\n    /* Return dirty HTML if DOMPurify cannot run */\n    if (!DOMPurify.isSupported) {\n      return dirty;\n    }\n    /* Assign config vars */\n    if (SET_CONFIG) {\n      /* Persistent setConfig() path: _parseConfig is skipped, so the sets are\n       * not re-derived per call. Restore them from the pristine bindings\n       * captured at setConfig() time so a previous call's hook clone (mutated\n       * below) does not carry over. */\n      ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n      ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n    } else {\n      _parseConfig(cfg);\n    }\n    /* Clone the hook-mutable allowlists before the walk whenever an\n     * uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS\n     * and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so\n     * a hook that widens them would otherwise mutate the shared set\n     * permanently: across later calls and across every element. Cloning per\n     * walk keeps documented in-call widening working while scoping it to the\n     * call. A single guard for both config paths - the per-call path rebinds\n     * the sets in _parseConfig each call, the persistent path restores them\n     * from the captured bindings just above - so the two cannot diverge. */\n    if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {\n      ALLOWED_TAGS = clone(ALLOWED_TAGS);\n    }\n    if (hooks.uponSanitizeAttribute.length > 0) {\n      ALLOWED_ATTR = clone(ALLOWED_ATTR);\n    }\n    /* Clean up removed elements */\n    DOMPurify.removed = [];\n    /* Resolve IN_PLACE for this call without mutating persistent config.\n       Writing the IN_PLACE closure variable here leaks under setConfig(),\n       where _parseConfig is skipped on later calls: a single string call would\n       disable in-place mode for every subsequent node call, returning a\n       sanitized copy while leaving the caller's node — which in-place callers\n       keep using and whose return value they ignore — unsanitized. REPORT-2. */\n    const inPlace = IN_PLACE && typeof dirty !== 'string' && _isNode(dirty);\n    if (inPlace) {\n      /* Declarative-partial-updates / streaming pre-pass: sever every patch\n         linkage across the live tree BEFORE the walk, so no patch can fire\n         mid-walk and inject into an already-processed region. Runs first, so\n         it also covers the forbidden/clobbered roots that throw below. */\n      _neutralizePatchLinkage(dirty);\n      /* Do some early pre-sanitization to avoid unsafe root nodes.\n         Read nodeName through the cached prototype getter — a clobbering\n         child named \"nodeName\" on the form root would otherwise shadow\n         the property and let this check skip the root-allowlist\n         validation entirely. */\n      const nn = _readNodeName(dirty);\n      if (typeof nn === 'string') {\n        const tagName = transformCaseFunc(nn);\n        if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n          /* Fail closed on a live root: neutralize handlers/children before\n             throwing, exactly as the mid-walk abort path does. */\n          _neutralizeRoot(dirty);\n          throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n        }\n      }\n      /* Pre-flight the root through _isClobbered. The iterator-driven\n         removal path can not detach a parent-less root: _forceRemove\n         falls through to Element.prototype.remove(), which per spec\n         is a no-op on a node with no parent. A clobbered root would\n         then survive the main loop with its attributes uninspected,\n         because _sanitizeAttributes early-returns on _isClobbered. The\n         result would be an attacker-controlled form, complete with any\n         event-handler attributes the caller passed in, handed back to\n         the application unsanitized. Refuse to sanitize such a root\n         the same way we refuse a forbidden tag. GHSA-r47g-fvhr-h676. */\n      if (_isClobbered(dirty)) {\n        /* Fail closed on a live clobbered root before throwing.\n           _neutralizeRoot's reads are clobber-safe (cached getters); the\n           form's non-clobbered descendants, e.g. an armed <img>, are scrubbed. */\n        _neutralizeRoot(dirty);\n        throw typeErrorCreate('root node is clobbered and cannot be sanitized in-place');\n      }\n      /* Sanitize attached shadow roots before the main iterator runs.\n         The iterator does not descend into shadow trees. Same fail-closed\n         barrier as the main walk (campaign-3 F2): a custom-element reaction\n         inside a shadow root could abort this pre-pass before the walk runs,\n         which would otherwise leave the entire live tree unsanitized. */\n      try {\n        _sanitizeAttachedShadowRoots(dirty);\n      } catch (error) {\n        _neutralizeRoot(dirty);\n        throw error;\n      }\n    } else if (_isNode(dirty)) {\n      /* If dirty is a DOM element, append to an empty document to avoid\n         elements being stripped by the parser */\n      body = _initDocument('<!---->');\n      importedNode = body.ownerDocument.importNode(dirty, true);\n      if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n        /* Node is already a body, use as is */\n        body = importedNode;\n      } else if (importedNode.nodeName === 'HTML') {\n        body = importedNode;\n      } else {\n        // eslint-disable-next-line unicorn/prefer-dom-node-append\n        body.appendChild(importedNode);\n      }\n      /* Clonable shadow roots are deep-cloned by importNode(); sanitize\n         them before the main iterator runs, since the iterator does not\n         descend into shadow trees. The walk routes every read through a\n         cached prototype getter so clobbering descendants on a form root\n         cannot hide a shadow host from this pass. */\n      _sanitizeAttachedShadowRoots(importedNode);\n    } else {\n      /* Exit directly if we have nothing to do */\n      if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n      // eslint-disable-next-line unicorn/prefer-includes\n      dirty.indexOf('<') === -1) {\n        return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n      }\n      /* Initialize the document to work on */\n      body = _initDocument(dirty);\n      /* Check we have a DOM node from the data */\n      if (!body) {\n        return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n      }\n    }\n    /* Remove first element node (ours) if FORCE_BODY is set */\n    if (body && FORCE_BODY) {\n      _forceRemove(body.firstChild);\n    }\n    /* Get node iterator */\n    const walkRoot = inPlace ? dirty : body;\n    /* Now start iterating over the created document.\n       The walk runs inside an exception barrier (campaign-3 F2): a re-entrant\n       engine/custom-element mutation can detach a node mid-walk so\n       `_forceRemove`'s parentless guard throws, aborting the loop. Without the\n       barrier the caller's in-place tree would be left half-sanitized with the\n       unvisited tail still armed. _createNodeIterator itself is inside the\n       barrier too: constructing the iterator dereferences the root's document,\n       and any failure there (e.g. an exotic/clobbered root) must still fail\n       closed rather than skip the neutralize. On any throw we fail closed -\n       strip the in-place root bare - then rethrow so the existing throw\n       contract is preserved. (String/DOM-copy paths never return the partial\n       body, so the propagating throw is already fail-closed there.) */\n    try {\n      const nodeIterator = _createNodeIterator(walkRoot);\n      while (currentNode = nodeIterator.nextNode()) {\n        /* Sanitize tags and elements */\n        _sanitizeElements(currentNode, walkRoot);\n        /* Check attributes next */\n        _sanitizeAttributes(currentNode);\n        /* Shadow DOM detected, sanitize it.\n           Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\n           instead of instanceof, so foreign-realm <template>.content is\n           walked correctly. */\n        if (_isDocumentFragment(currentNode.content)) {\n          _sanitizeShadowDOM2(currentNode.content);\n        }\n      }\n    } catch (error) {\n      if (inPlace) {\n        _neutralizeRoot(dirty);\n        /* Nodes _forceRemove'd earlier in the aborted walk are already\n           detached from the root, so _neutralizeRoot's subtree pass does not\n           reach them. Defuse them too, mirroring the success-path loop below. */\n        arrayForEach(DOMPurify.removed, entry => {\n          if (entry.element) {\n            _neutralizeSubtree(entry.element);\n          }\n        });\n      }\n      throw error;\n    }\n    /* If we sanitized `dirty` in-place, return it. */\n    if (inPlace) {\n      /* Fail-closed completion of the audit-5 F1 fix: every node removed from\n         the caller's live tree is detached but may still hold a queued\n         resource-event handler that fires in page scope after we return. The\n         move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the\n         non-allow-listed attributes off every other removed subtree (clobber,\n         mXSS, namespace, comments, KEEP_CONTENT:false, …) so those handlers are\n         cancelled before any event can fire. Runs synchronously, pre-return. */\n      arrayForEach(DOMPurify.removed, entry => {\n        if (entry.element) {\n          _neutralizeSubtree(entry.element);\n        }\n      });\n      if (SAFE_FOR_TEMPLATES) {\n        _scrubTemplateExpressions2(dirty);\n      }\n      return dirty;\n    }\n    /* Return sanitized string or DOM */\n    if (RETURN_DOM) {\n      if (SAFE_FOR_TEMPLATES) {\n        _scrubTemplateExpressions2(body);\n      }\n      if (RETURN_DOM_FRAGMENT) {\n        returnNode = createDocumentFragment.call(body.ownerDocument);\n        while (body.firstChild) {\n          // eslint-disable-next-line unicorn/prefer-dom-node-append\n          returnNode.appendChild(body.firstChild);\n        }\n      } else {\n        returnNode = body;\n      }\n      if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n        /*\n          AdoptNode() is not used because internal state is not reset\n          (e.g. the past names map of a HTMLFormElement), this is safe\n          in theory but we would rather not risk another attack vector.\n          The state that is cloned by importNode() is explicitly defined\n          by the specs.\n        */\n        returnNode = importNode.call(originalDocument, returnNode, true);\n      }\n      return returnNode;\n    }\n    let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n    /* Serialize doctype if allowed */\n    if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n      serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n    }\n    /* Sanitize final string template-safe */\n    if (SAFE_FOR_TEMPLATES) {\n      serializedHTML = _stripTemplateExpressions(serializedHTML);\n    }\n    return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n  };\n  DOMPurify.setConfig = function () {\n    let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    _parseConfig(cfg);\n    SET_CONFIG = true;\n    SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n    SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n  };\n  DOMPurify.clearConfig = function () {\n    CONFIG = null;\n    SET_CONFIG = false;\n    SET_CONFIG_ALLOWED_TAGS = null;\n    SET_CONFIG_ALLOWED_ATTR = null;\n    // Drop any caller-supplied Trusted Types policy so it cannot poison later\n    // `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and\n    // never recreated — Trusted Types throws on duplicate names) is restored by\n    // the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.\n    trustedTypesPolicy = defaultTrustedTypesPolicy;\n    emptyHTML = '';\n  };\n  DOMPurify.isValidAttribute = function (tag, attr, value) {\n    /* Initialize shared config vars if necessary. */\n    if (!CONFIG) {\n      _parseConfig({});\n    }\n    const lcTag = transformCaseFunc(tag);\n    const lcName = transformCaseFunc(attr);\n    return _isValidAttribute(lcTag, lcName, value);\n  };\n  DOMPurify.addHook = function (entryPoint, hookFunction) {\n    if (typeof hookFunction !== 'function') {\n      return;\n    }\n    /* Reject unknown entry points. Without this, a non-hook key (e.g.\n     * '__proto__') indexes off the prototype chain rather than a real\n     * hook array, and arrayPush then writes to Object.prototype. Guard\n     * with an own-property check against the known hook names. */\n    if (!objectHasOwnProperty(hooks, entryPoint)) {\n      return;\n    }\n    arrayPush(hooks[entryPoint], hookFunction);\n  };\n  DOMPurify.removeHook = function (entryPoint, hookFunction) {\n    if (!objectHasOwnProperty(hooks, entryPoint)) {\n      return undefined;\n    }\n    if (hookFunction !== undefined) {\n      const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n      return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];\n    }\n    return arrayPop(hooks[entryPoint]);\n  };\n  DOMPurify.removeHooks = function (entryPoint) {\n    if (!objectHasOwnProperty(hooks, entryPoint)) {\n      return;\n    }\n    hooks[entryPoint] = [];\n  };\n  DOMPurify.removeAllHooks = function () {\n    hooks = _createHooksMap();\n  };\n  return DOMPurify;\n}\nvar purify = createDOMPurify();\n\nexport { purify as default };\n//# sourceMappingURL=purify.es.mjs.map\n","//#region src/formatters/plain.ts\n/**\n* Renders a diagnostic into a multi-line, unicode-decorated string suitable\n* for terminal output. The first line is `[<name>] <message>`; optional\n* details (`fix`, `sources`, `docs`) follow with `├▶`/`╰▶` connectors.\n*/\nfunction formatDiagnostic(diagnostic) {\n\tconst header = `[${diagnostic.name}] ${diagnostic.message}`;\n\tconst details = [];\n\tif (diagnostic.fix) details.push(`fix: ${diagnostic.fix}`);\n\tif (diagnostic.sources?.length) details.push(`sources: ${diagnostic.sources.join(\", \")}`);\n\tif (diagnostic.docs) details.push(`see: ${diagnostic.docs}`);\n\tif (details.length === 0) return header;\n\treturn [header, ...details.map((detail, i) => {\n\t\treturn `${i < details.length - 1 ? \"├▶\" : \"╰▶\"} ${detail}`;\n\t})].join(\"\\n\");\n}\n//#endregion\n//#region src/utils.ts\n/**\n* Transforms a value or a function that returns a value to a value.\n*\n* @param valFn either a value or a function that returns a value\n* @param args  arguments to pass to the function if `valFn` is a function\n*\n* @internal\n*/\nfunction toValueWithArgs(valFn, ...args) {\n\treturn typeof valFn === \"function\" ? valFn(...args) : valFn;\n}\n//#endregion\n//#region src/diagnostic.ts\n/**\n* Creates a console reporter that renders each diagnostic with `formatter` and\n* prints the result via `console[method]`. Both default sensibly (`'warn'` and\n* {@link formatDiagnostic}); `method` can also be overridden per call through\n* the reporter options.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction createConsoleReporter({ method: defaultMethod = \"warn\", formatter = formatDiagnostic } = {}) {\n\treturn (diagnostic, { method = defaultMethod } = {}) => {\n\t\tconsole[method](formatter(diagnostic));\n\t};\n}\nconst captureStackTrace = Error.captureStackTrace;\nvar Diagnostic = class Diagnostic extends Error {\n\tname = \"Diagnostic\";\n\t/**\n\t* URL to extended documentation for this diagnostic code.\n\t* Auto-generated from {@link DefineDiagnosticsOptions.docsBase}.\n\t*/\n\tdocs;\n\t/**\n\t* Optional actionable instructions on how to resolve the problem.\n\t*/\n\tfix;\n\t/**\n\t* Locations in user code that contributed to this diagnostic, in\n\t* `file:line:column` format. Relevant when the stack trace doesn't reflect\n\t* the user's source (e.g. compilers, bundlers), otherwise redundant with the\n\t* stack and should be omitted.\n\t*/\n\tsources;\n\t/**\n\t* Alias for {@link Error.message}: the reason this diagnostic was raised.\n\t*/\n\tget why() {\n\t\treturn this.message;\n\t}\n\t/**\n\t* @param init        structured initializer; `why` is required\n\t* @param captureFrom V8 stack-cutoff frame. Defaults to {@link Diagnostic}\n\t* so the top of the trace is the `new Diagnostic(...)` call site.\n\t* `defineDiagnostics` passes its action method to strip its own frames too.\n\t* Ignored on engines without `Error.captureStackTrace`.\n\t*/\n\tconstructor(init, captureFrom = Diagnostic) {\n\t\tsuper(init.why, { cause: init.cause });\n\t\tthis.fix = init.fix;\n\t\tthis.docs = init.docs;\n\t\tthis.sources = init.sources;\n\t\tcaptureStackTrace?.(this, captureFrom);\n\t}\n\t/**\n\t* Converts the diagnostic into a serializable structured object.\n\t*/\n\ttoJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\twhy: this.why,\n\t\t\tfix: this.fix,\n\t\t\tdocs: this.docs,\n\t\t\tsources: this.sources,\n\t\t\tcause: this.cause,\n\t\t\tstack: this.stack\n\t\t};\n\t}\n};\n/**\n* Resolves the docs URL for a code from a `docsBase` (string template or\n* resolver function). Shared by {@link defineDiagnostics} and\n* {@link defineProdDiagnostics}. Per-code `docs` overrides are handled by the\n* caller; this only covers the `docsBase`-derived case.\n*\n* @internal\n*/\nfunction deriveDocs(docsBase, code) {\n\treturn typeof docsBase === \"string\" ? `${docsBase}/${code.toLowerCase()}` : docsBase?.(code);\n}\n/**\n* Creates a typed diagnostics object from a set of code definitions. Each\n* code becomes a callable {@link DiagnosticHandle}: invoke to report, or\n* `throw` the result to raise. No `new` required, no proxy.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction defineDiagnostics(options) {\n\tconst reporters = options.reporters ?? [];\n\tconst result = {};\n\tconst { docsBase } = options;\n\tfor (const code of Object.keys(options.codes)) {\n\t\tconst def = options.codes[code];\n\t\tconst docs = def.docs === false ? void 0 : def.docs || deriveDocs(docsBase, code);\n\t\tconst handle = (params = {}, reporterOptions = {}) => {\n\t\t\tconst diagnostic = new Diagnostic({\n\t\t\t\twhy: toValueWithArgs(def.why, params),\n\t\t\t\tfix: toValueWithArgs(def.fix, params),\n\t\t\t\tdocs,\n\t\t\t\tcause: params.cause,\n\t\t\t\tsources: params.sources\n\t\t\t}, handle);\n\t\t\tdiagnostic.name = code;\n\t\t\tfor (const reporter of reporters) reporter(diagnostic, reporterOptions);\n\t\t\treturn diagnostic;\n\t\t};\n\t\tresult[code] = handle;\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/prod-diagnostics.ts\n/**\n* Production counterpart to {@link defineDiagnostics}. Returns a `Proxy` that\n* builds a minimal {@link Diagnostic} for any accessed code: the code becomes\n* both the `message` (`why`) and the instance `name`, and `docs` is derived\n* from `docsBase`. It carries no catalog text, so it stays tiny in a bundle.\n*\n* The strip plugin (`@nostics/unplugin`) can rewrite a `defineDiagnostics()`\n* call into a `process.env.NODE_ENV === 'production'` ternary that selects this\n* factory in production, dropping every `why`/`fix` string from the bundle.\n*\n* @example\n* ```ts\n* const diagnostics = defineProdDiagnostics({ docsBase: 'https://docs.example.com' })\n* throw diagnostics.NUXT_B2011() // Error: NUXT_B2011, docs derived from docsBase\n* ```\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction defineProdDiagnostics(options = {}) {\n\tconst { docsBase, reporters = [] } = options;\n\treturn new Proxy({}, { get(_target, code) {\n\t\tif (typeof code !== \"string\") return void 0;\n\t\tconst handle = (params = {}, reporterOptions = {}) => {\n\t\t\tconst diagnostic = new Diagnostic({\n\t\t\t\twhy: code,\n\t\t\t\tdocs: deriveDocs(docsBase, code),\n\t\t\t\tcause: params.cause,\n\t\t\t\tsources: params.sources\n\t\t\t}, handle);\n\t\t\tdiagnostic.name = code;\n\t\t\tfor (const reporter of reporters) reporter(diagnostic, reporterOptions);\n\t\t\treturn diagnostic;\n\t\t};\n\t\treturn handle;\n\t} });\n}\n//#endregion\nexport { Diagnostic, createConsoleReporter, defineDiagnostics, defineProdDiagnostics, formatDiagnostic };\n\n//# sourceMappingURL=index.mjs.map","/**\n  * vee-validate v4.15.1\n  * (c) 2025 Abdelrahman Awad\n  * @license MIT\n  */\nimport { getCurrentInstance, inject, warn as warn$1, computed, toValue, ref, watch, nextTick, unref, isRef, reactive, onUnmounted, onMounted, provide, onBeforeUnmount, defineComponent, toRef, resolveDynamicComponent, h, readonly, watchEffect, shallowRef } from 'vue';\n\nfunction isCallable(fn) {\n    return typeof fn === 'function';\n}\nfunction isNullOrUndefined(value) {\n    return value === null || value === undefined;\n}\nconst isObject = (obj) => obj !== null && !!obj && typeof obj === 'object' && !Array.isArray(obj);\nfunction isIndex(value) {\n    return Number(value) >= 0;\n}\nfunction toNumber(value) {\n    const n = parseFloat(value);\n    return isNaN(n) ? value : n;\n}\nfunction isObjectLike(value) {\n    return typeof value === 'object' && value !== null;\n}\nfunction getTag(value) {\n    if (value == null) {\n        return value === undefined ? '[object Undefined]' : '[object Null]';\n    }\n    return Object.prototype.toString.call(value);\n}\n// Reference: https://github.com/lodash/lodash/blob/master/isPlainObject.js\nfunction isPlainObject(value) {\n    if (!isObjectLike(value) || getTag(value) !== '[object Object]') {\n        return false;\n    }\n    if (Object.getPrototypeOf(value) === null) {\n        return true;\n    }\n    let proto = value;\n    while (Object.getPrototypeOf(proto) !== null) {\n        proto = Object.getPrototypeOf(proto);\n    }\n    return Object.getPrototypeOf(value) === proto;\n}\nfunction merge(target, source) {\n    Object.keys(source).forEach(key => {\n        if (isPlainObject(source[key]) && isPlainObject(target[key])) {\n            if (!target[key]) {\n                target[key] = {};\n            }\n            merge(target[key], source[key]);\n            return;\n        }\n        target[key] = source[key];\n    });\n    return target;\n}\n/**\n * Constructs a path with dot paths for arrays to use brackets to be compatible with vee-validate path syntax\n */\nfunction normalizeFormPath(path) {\n    const pathArr = path.split('.');\n    if (!pathArr.length) {\n        return '';\n    }\n    let fullPath = String(pathArr[0]);\n    for (let i = 1; i < pathArr.length; i++) {\n        if (isIndex(pathArr[i])) {\n            fullPath += `[${pathArr[i]}]`;\n            continue;\n        }\n        fullPath += `.${pathArr[i]}`;\n    }\n    return fullPath;\n}\n\nconst RULES = {};\n/**\n * Adds a custom validator to the list of validation rules.\n */\nfunction defineRule(id, validator) {\n    // makes sure new rules are properly formatted.\n    guardExtend(id, validator);\n    RULES[id] = validator;\n}\n/**\n * Gets an already defined rule\n */\nfunction resolveRule(id) {\n    return RULES[id];\n}\n/**\n * Guards from extension violations.\n */\nfunction guardExtend(id, validator) {\n    if (isCallable(validator)) {\n        return;\n    }\n    throw new Error(`Extension Error: The validator '${id}' must be a function.`);\n}\n\nfunction set(obj, key, val) {\n\tif (typeof val.value === 'object') val.value = klona(val.value);\n\tif (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') {\n\t\tObject.defineProperty(obj, key, val);\n\t} else obj[key] = val.value;\n}\n\nfunction klona(x) {\n\tif (typeof x !== 'object') return x;\n\n\tvar i=0, k, list, tmp, str=Object.prototype.toString.call(x);\n\n\tif (str === '[object Object]') {\n\t\ttmp = Object.create(x.__proto__ || null);\n\t} else if (str === '[object Array]') {\n\t\ttmp = Array(x.length);\n\t} else if (str === '[object Set]') {\n\t\ttmp = new Set;\n\t\tx.forEach(function (val) {\n\t\t\ttmp.add(klona(val));\n\t\t});\n\t} else if (str === '[object Map]') {\n\t\ttmp = new Map;\n\t\tx.forEach(function (val, key) {\n\t\t\ttmp.set(klona(key), klona(val));\n\t\t});\n\t} else if (str === '[object Date]') {\n\t\ttmp = new Date(+x);\n\t} else if (str === '[object RegExp]') {\n\t\ttmp = new RegExp(x.source, x.flags);\n\t} else if (str === '[object DataView]') {\n\t\ttmp = new x.constructor( klona(x.buffer) );\n\t} else if (str === '[object ArrayBuffer]') {\n\t\ttmp = x.slice(0);\n\t} else if (str.slice(-6) === 'Array]') {\n\t\t// ArrayBuffer.isView(x)\n\t\t// ~> `new` bcuz `Buffer.slice` => ref\n\t\ttmp = new x.constructor(x);\n\t}\n\n\tif (tmp) {\n\t\tfor (list=Object.getOwnPropertySymbols(x); i < list.length; i++) {\n\t\t\tset(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));\n\t\t}\n\n\t\tfor (i=0, list=Object.getOwnPropertyNames(x); i < list.length; i++) {\n\t\t\tif (Object.hasOwnProperty.call(tmp, k=list[i]) && tmp[k] === x[k]) continue;\n\t\t\tset(tmp, k, Object.getOwnPropertyDescriptor(x, k));\n\t\t}\n\t}\n\n\treturn tmp || x;\n}\n\nconst FormContextKey = Symbol('vee-validate-form');\nconst PublicFormContextKey = Symbol('vee-validate-form-context');\nconst FieldContextKey = Symbol('vee-validate-field-instance');\nconst IS_ABSENT = Symbol('Default empty value');\n\nconst isClient = typeof window !== 'undefined';\nfunction isLocator(value) {\n    return isCallable(value) && !!value.__locatorRef;\n}\nfunction isTypedSchema(value) {\n    return !!value && isCallable(value.parse) && value.__type === 'VVTypedSchema';\n}\nfunction isYupValidator(value) {\n    return !!value && isCallable(value.validate);\n}\nfunction hasCheckedAttr(type) {\n    return type === 'checkbox' || type === 'radio';\n}\nfunction isContainerValue(value) {\n    return isObject(value) || Array.isArray(value);\n}\n/**\n * True if the value is an empty object or array\n */\nfunction isEmptyContainer(value) {\n    if (Array.isArray(value)) {\n        return value.length === 0;\n    }\n    return isObject(value) && Object.keys(value).length === 0;\n}\n/**\n * Checks if the path opted out of nested fields using `[fieldName]` syntax\n */\nfunction isNotNestedPath(path) {\n    return /^\\[.+\\]$/i.test(path);\n}\n/**\n * Checks if an element is a native HTML5 multi-select input element\n */\nfunction isNativeMultiSelect(el) {\n    return isNativeSelect(el) && el.multiple;\n}\n/**\n * Checks if an element is a native HTML5 select input element\n */\nfunction isNativeSelect(el) {\n    return el.tagName === 'SELECT';\n}\n/**\n * Checks if a tag name with attrs object will render a native multi-select element\n */\nfunction isNativeMultiSelectNode(tag, attrs) {\n    // The falsy value array is the values that Vue won't add the `multiple` prop if it has one of these values\n    const hasTruthyBindingValue = ![false, null, undefined, 0].includes(attrs.multiple) && !Number.isNaN(attrs.multiple);\n    return tag === 'select' && 'multiple' in attrs && hasTruthyBindingValue;\n}\n/**\n * Checks if a node should have a `:value` binding or not\n *\n * These nodes should not have a value binding\n * For files, because they are not reactive\n * For multi-selects because the value binding will reset the value\n */\nfunction shouldHaveValueBinding(tag, attrs) {\n    return !isNativeMultiSelectNode(tag, attrs) && attrs.type !== 'file' && !hasCheckedAttr(attrs.type);\n}\nfunction isFormSubmitEvent(evt) {\n    return isEvent(evt) && evt.target && 'submit' in evt.target;\n}\nfunction isEvent(evt) {\n    if (!evt) {\n        return false;\n    }\n    if (typeof Event !== 'undefined' && isCallable(Event) && evt instanceof Event) {\n        return true;\n    }\n    // this is for IE and Cypress #3161\n    /* istanbul ignore next */\n    if (evt && evt.srcElement) {\n        return true;\n    }\n    return false;\n}\nfunction isPropPresent(obj, prop) {\n    return prop in obj && obj[prop] !== IS_ABSENT;\n}\n/**\n * Compares if two values are the same borrowed from:\n * https://github.com/epoberezkin/fast-deep-equal\n * We added a case for file matching since `Object.keys` doesn't work with Files.\n *\n * NB: keys with the value undefined are ignored in the evaluation and considered equal to missing keys.\n * */\nfunction isEqual(a, b) {\n    if (a === b)\n        return true;\n    if (a && b && typeof a === 'object' && typeof b === 'object') {\n        if (a.constructor !== b.constructor)\n            return false;\n        // eslint-disable-next-line no-var\n        var length, i, keys;\n        if (Array.isArray(a)) {\n            length = a.length;\n            if (length != b.length)\n                return false;\n            for (i = length; i-- !== 0;)\n                if (!isEqual(a[i], b[i]))\n                    return false;\n            return true;\n        }\n        if (a instanceof Map && b instanceof Map) {\n            if (a.size !== b.size)\n                return false;\n            for (i of a.entries())\n                if (!b.has(i[0]))\n                    return false;\n            for (i of a.entries())\n                if (!isEqual(i[1], b.get(i[0])))\n                    return false;\n            return true;\n        }\n        // We added this part for file comparison, arguably a little naive but should work for most cases.\n        // #3911\n        if (isFile(a) && isFile(b)) {\n            if (a.size !== b.size)\n                return false;\n            if (a.name !== b.name)\n                return false;\n            if (a.lastModified !== b.lastModified)\n                return false;\n            if (a.type !== b.type)\n                return false;\n            return true;\n        }\n        if (a instanceof Set && b instanceof Set) {\n            if (a.size !== b.size)\n                return false;\n            for (i of a.entries())\n                if (!b.has(i[0]))\n                    return false;\n            return true;\n        }\n        if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n            length = a.length;\n            if (length != b.length)\n                return false;\n            for (i = length; i-- !== 0;)\n                if (a[i] !== b[i])\n                    return false;\n            return true;\n        }\n        if (a.constructor === RegExp)\n            return a.source === b.source && a.flags === b.flags;\n        if (a.valueOf !== Object.prototype.valueOf)\n            return a.valueOf() === b.valueOf();\n        if (a.toString !== Object.prototype.toString)\n            return a.toString() === b.toString();\n        // Remove undefined values before object comparison\n        a = normalizeObject(a);\n        b = normalizeObject(b);\n        keys = Object.keys(a);\n        length = keys.length;\n        if (length !== Object.keys(b).length)\n            return false;\n        for (i = length; i-- !== 0;)\n            if (!Object.prototype.hasOwnProperty.call(b, keys[i]))\n                return false;\n        for (i = length; i-- !== 0;) {\n            // eslint-disable-next-line no-var\n            var key = keys[i];\n            if (!isEqual(a[key], b[key]))\n                return false;\n        }\n        return true;\n    }\n    // true if both NaN, false otherwise\n    return a !== a && b !== b;\n}\n/**\n * Returns a new object where keys with an `undefined` value are removed.\n *\n * @param a object to normalize\n */\nfunction normalizeObject(a) {\n    return Object.fromEntries(Object.entries(a).filter(([, value]) => value !== undefined));\n}\nfunction isFile(a) {\n    if (!isClient) {\n        return false;\n    }\n    return a instanceof File;\n}\n\nfunction cleanupNonNestedPath(path) {\n    if (isNotNestedPath(path)) {\n        return path.replace(/\\[|\\]/gi, '');\n    }\n    return path;\n}\nfunction getFromPath(object, path, fallback) {\n    if (!object) {\n        return fallback;\n    }\n    if (isNotNestedPath(path)) {\n        return object[cleanupNonNestedPath(path)];\n    }\n    const resolvedValue = (path || '')\n        .split(/\\.|\\[(\\d+)\\]/)\n        .filter(Boolean)\n        .reduce((acc, propKey) => {\n        if (isContainerValue(acc) && propKey in acc) {\n            return acc[propKey];\n        }\n        return fallback;\n    }, object);\n    return resolvedValue;\n}\n/**\n * Sets a nested property value in a path, creates the path properties if it doesn't exist\n */\nfunction setInPath(object, path, value) {\n    if (isNotNestedPath(path)) {\n        object[cleanupNonNestedPath(path)] = value;\n        return;\n    }\n    const keys = path.split(/\\.|\\[(\\d+)\\]/).filter(Boolean);\n    let acc = object;\n    for (let i = 0; i < keys.length; i++) {\n        // Last key, set it\n        if (i === keys.length - 1) {\n            acc[keys[i]] = value;\n            return;\n        }\n        // Key does not exist, create a container for it\n        if (!(keys[i] in acc) || isNullOrUndefined(acc[keys[i]])) {\n            // container can be either an object or an array depending on the next key if it exists\n            acc[keys[i]] = isIndex(keys[i + 1]) ? [] : {};\n        }\n        acc = acc[keys[i]];\n    }\n}\nfunction unset(object, key) {\n    if (Array.isArray(object) && isIndex(key)) {\n        object.splice(Number(key), 1);\n        return;\n    }\n    if (isObject(object)) {\n        delete object[key];\n    }\n}\n/**\n * Removes a nested property from object\n */\nfunction unsetPath(object, path) {\n    if (isNotNestedPath(path)) {\n        delete object[cleanupNonNestedPath(path)];\n        return;\n    }\n    const keys = path.split(/\\.|\\[(\\d+)\\]/).filter(Boolean);\n    let acc = object;\n    for (let i = 0; i < keys.length; i++) {\n        // Last key, unset it\n        if (i === keys.length - 1) {\n            unset(acc, keys[i]);\n            break;\n        }\n        // Key does not exist, exit\n        if (!(keys[i] in acc) || isNullOrUndefined(acc[keys[i]])) {\n            break;\n        }\n        acc = acc[keys[i]];\n    }\n    const pathValues = keys.map((_, idx) => {\n        return getFromPath(object, keys.slice(0, idx).join('.'));\n    });\n    for (let i = pathValues.length - 1; i >= 0; i--) {\n        if (!isEmptyContainer(pathValues[i])) {\n            continue;\n        }\n        if (i === 0) {\n            unset(object, keys[0]);\n            continue;\n        }\n        unset(pathValues[i - 1], keys[i - 1]);\n    }\n}\n/**\n * A typed version of Object.keys\n */\nfunction keysOf(record) {\n    return Object.keys(record);\n}\n// Uses same component provide as its own injections\n// Due to changes in https://github.com/vuejs/vue-next/pull/2424\nfunction injectWithSelf(symbol, def = undefined) {\n    const vm = getCurrentInstance();\n    return (vm === null || vm === void 0 ? void 0 : vm.provides[symbol]) || inject(symbol, def);\n}\nfunction warn(message) {\n    warn$1(`[vee-validate]: ${message}`);\n}\nfunction resolveNextCheckboxValue(currentValue, checkedValue, uncheckedValue) {\n    if (Array.isArray(currentValue)) {\n        const newVal = [...currentValue];\n        // Use isEqual since checked object values can possibly fail the equality check #3883\n        const idx = newVal.findIndex(v => isEqual(v, checkedValue));\n        idx >= 0 ? newVal.splice(idx, 1) : newVal.push(checkedValue);\n        return newVal;\n    }\n    return isEqual(currentValue, checkedValue) ? uncheckedValue : checkedValue;\n}\n/**\n * Creates a throttled function that only invokes the provided function (`func`) at most once per within a given number of milliseconds\n * (`limit`)\n */\nfunction throttle(func, limit) {\n    let inThrottle;\n    let lastResult;\n    return function (...args) {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const context = this;\n        if (!inThrottle) {\n            inThrottle = true;\n            setTimeout(() => (inThrottle = false), limit);\n            lastResult = func.apply(context, args);\n        }\n        return lastResult;\n    };\n}\nfunction debounceAsync(inner, ms = 0) {\n    let timer = null;\n    let resolves = [];\n    return function (...args) {\n        // Run the function after a certain amount of time\n        if (timer) {\n            clearTimeout(timer);\n        }\n        // @ts-expect-error timer is a number\n        timer = setTimeout(() => {\n            // Get the result of the inner function, then apply it to the resolve function of\n            // each promise that has been created since the last time the inner function was run\n            const result = inner(...args);\n            resolves.forEach(r => r(result));\n            resolves = [];\n        }, ms);\n        return new Promise(resolve => resolves.push(resolve));\n    };\n}\nfunction applyModelModifiers(value, modifiers) {\n    if (!isObject(modifiers)) {\n        return value;\n    }\n    if (modifiers.number) {\n        return toNumber(value);\n    }\n    return value;\n}\nfunction withLatest(fn, onDone) {\n    let latestRun;\n    return async function runLatest(...args) {\n        const pending = fn(...args);\n        latestRun = pending;\n        const result = await pending;\n        if (pending !== latestRun) {\n            return result;\n        }\n        latestRun = undefined;\n        return onDone(result, args);\n    };\n}\nfunction computedDeep({ get, set }) {\n    const baseRef = ref(klona(get()));\n    watch(get, newValue => {\n        if (isEqual(newValue, baseRef.value)) {\n            return;\n        }\n        baseRef.value = klona(newValue);\n    }, {\n        deep: true,\n    });\n    watch(baseRef, newValue => {\n        if (isEqual(newValue, get())) {\n            return;\n        }\n        set(klona(newValue));\n    }, {\n        deep: true,\n    });\n    return baseRef;\n}\nfunction normalizeErrorItem(message) {\n    return Array.isArray(message) ? message : message ? [message] : [];\n}\nfunction resolveFieldOrPathState(path) {\n    const form = injectWithSelf(FormContextKey);\n    const state = path ? computed(() => form === null || form === void 0 ? void 0 : form.getPathState(toValue(path))) : undefined;\n    const field = path ? undefined : inject(FieldContextKey);\n    if (!field && !(state === null || state === void 0 ? void 0 : state.value)) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`field with name ${toValue(path)} was not found`);\n        }\n    }\n    return state || field;\n}\nfunction omit(obj, keys) {\n    const target = {};\n    for (const key in obj) {\n        if (!keys.includes(key)) {\n            target[key] = obj[key];\n        }\n    }\n    return target;\n}\nfunction debounceNextTick(inner) {\n    let lastTick = null;\n    let resolves = [];\n    return function (...args) {\n        // Run the function after a certain amount of time\n        const thisTick = nextTick(() => {\n            if (lastTick !== thisTick) {\n                return;\n            }\n            // Get the result of the inner function, then apply it to the resolve function of\n            // each promise that has been created since the last time the inner function was run\n            const result = inner(...args);\n            resolves.forEach(r => r(result));\n            resolves = [];\n            lastTick = null;\n        });\n        lastTick = thisTick;\n        return new Promise(resolve => resolves.push(resolve));\n    };\n}\n\nfunction normalizeChildren(tag, context, slotProps) {\n    if (!context.slots.default) {\n        return context.slots.default;\n    }\n    if (typeof tag === 'string' || !tag) {\n        return context.slots.default(slotProps());\n    }\n    return {\n        default: () => { var _a, _b; return (_b = (_a = context.slots).default) === null || _b === void 0 ? void 0 : _b.call(_a, slotProps()); },\n    };\n}\n/**\n * Vue adds a `_value` prop at the moment on the input elements to store the REAL value on them, real values are different than the `value` attribute\n * as they do not get casted to strings unlike `el.value` which preserves user-code behavior\n */\nfunction getBoundValue(el) {\n    if (hasValueBinding(el)) {\n        return el._value;\n    }\n    return undefined;\n}\n/**\n * Vue adds a `_value` prop at the moment on the input elements to store the REAL value on them, real values are different than the `value` attribute\n * as they do not get casted to strings unlike `el.value` which preserves user-code behavior\n */\nfunction hasValueBinding(el) {\n    return '_value' in el;\n}\n\nfunction parseInputValue(el) {\n    if (el.type === 'number') {\n        return Number.isNaN(el.valueAsNumber) ? el.value : el.valueAsNumber;\n    }\n    if (el.type === 'range') {\n        return Number.isNaN(el.valueAsNumber) ? el.value : el.valueAsNumber;\n    }\n    return el.value;\n}\nfunction normalizeEventValue(value) {\n    if (!isEvent(value)) {\n        return value;\n    }\n    const input = value.target;\n    // Vue sets the current bound value on `_value` prop\n    // for checkboxes it it should fetch the value binding type as is (boolean instead of string)\n    if (hasCheckedAttr(input.type) && hasValueBinding(input)) {\n        return getBoundValue(input);\n    }\n    if (input.type === 'file' && input.files) {\n        const files = Array.from(input.files);\n        return input.multiple ? files : files[0];\n    }\n    if (isNativeMultiSelect(input)) {\n        return Array.from(input.options)\n            .filter(opt => opt.selected && !opt.disabled)\n            .map(getBoundValue);\n    }\n    // makes sure we get the actual `option` bound value\n    // #3440\n    if (isNativeSelect(input)) {\n        const selectedOption = Array.from(input.options).find(opt => opt.selected);\n        return selectedOption ? getBoundValue(selectedOption) : input.value;\n    }\n    return parseInputValue(input);\n}\n\n/**\n * Normalizes the given rules expression.\n */\nfunction normalizeRules(rules) {\n    const acc = {};\n    Object.defineProperty(acc, '_$$isNormalized', {\n        value: true,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n    });\n    if (!rules) {\n        return acc;\n    }\n    // Object is already normalized, skip.\n    if (isObject(rules) && rules._$$isNormalized) {\n        return rules;\n    }\n    if (isObject(rules)) {\n        return Object.keys(rules).reduce((prev, curr) => {\n            const params = normalizeParams(rules[curr]);\n            if (rules[curr] !== false) {\n                prev[curr] = buildParams(params);\n            }\n            return prev;\n        }, acc);\n    }\n    /* istanbul ignore if */\n    if (typeof rules !== 'string') {\n        return acc;\n    }\n    return rules.split('|').reduce((prev, rule) => {\n        const parsedRule = parseRule(rule);\n        if (!parsedRule.name) {\n            return prev;\n        }\n        prev[parsedRule.name] = buildParams(parsedRule.params);\n        return prev;\n    }, acc);\n}\n/**\n * Normalizes a rule param.\n */\nfunction normalizeParams(params) {\n    if (params === true) {\n        return [];\n    }\n    if (Array.isArray(params)) {\n        return params;\n    }\n    if (isObject(params)) {\n        return params;\n    }\n    return [params];\n}\nfunction buildParams(provided) {\n    const mapValueToLocator = (value) => {\n        // A target param using interpolation\n        if (typeof value === 'string' && value[0] === '@') {\n            return createLocator(value.slice(1));\n        }\n        return value;\n    };\n    if (Array.isArray(provided)) {\n        return provided.map(mapValueToLocator);\n    }\n    // #3073\n    if (provided instanceof RegExp) {\n        return [provided];\n    }\n    return Object.keys(provided).reduce((prev, key) => {\n        prev[key] = mapValueToLocator(provided[key]);\n        return prev;\n    }, {});\n}\n/**\n * Parses a rule string expression.\n */\nconst parseRule = (rule) => {\n    let params = [];\n    const name = rule.split(':')[0];\n    if (rule.includes(':')) {\n        params = rule.split(':').slice(1).join(':').split(',');\n    }\n    return { name, params };\n};\nfunction createLocator(value) {\n    const locator = (crossTable) => {\n        var _a;\n        const val = (_a = getFromPath(crossTable, value)) !== null && _a !== void 0 ? _a : crossTable[value];\n        return val;\n    };\n    locator.__locatorRef = value;\n    return locator;\n}\nfunction extractLocators(params) {\n    if (Array.isArray(params)) {\n        return params.filter(isLocator);\n    }\n    return keysOf(params)\n        .filter(key => isLocator(params[key]))\n        .map(key => params[key]);\n}\n\nconst DEFAULT_CONFIG = {\n    generateMessage: ({ field }) => `${field} is not valid.`,\n    bails: true,\n    validateOnBlur: true,\n    validateOnChange: true,\n    validateOnInput: false,\n    validateOnModelUpdate: true,\n};\nlet currentConfig = Object.assign({}, DEFAULT_CONFIG);\nconst getConfig = () => currentConfig;\nconst setConfig = (newConf) => {\n    currentConfig = Object.assign(Object.assign({}, currentConfig), newConf);\n};\nconst configure = setConfig;\n\n/**\n * Validates a value against the rules.\n */\nasync function validate(value, rules, options = {}) {\n    const shouldBail = options === null || options === void 0 ? void 0 : options.bails;\n    const field = {\n        name: (options === null || options === void 0 ? void 0 : options.name) || '{field}',\n        rules,\n        label: options === null || options === void 0 ? void 0 : options.label,\n        bails: shouldBail !== null && shouldBail !== void 0 ? shouldBail : true,\n        formData: (options === null || options === void 0 ? void 0 : options.values) || {},\n    };\n    const result = await _validate(field, value);\n    return Object.assign(Object.assign({}, result), { valid: !result.errors.length });\n}\n/**\n * Starts the validation process.\n */\nasync function _validate(field, value) {\n    const rules = field.rules;\n    if (isTypedSchema(rules) || isYupValidator(rules)) {\n        return validateFieldWithTypedSchema(value, Object.assign(Object.assign({}, field), { rules }));\n    }\n    // if a generic function or chain of generic functions\n    if (isCallable(rules) || Array.isArray(rules)) {\n        const ctx = {\n            field: field.label || field.name,\n            name: field.name,\n            label: field.label,\n            form: field.formData,\n            value,\n        };\n        // Normalize the pipeline\n        const pipeline = Array.isArray(rules) ? rules : [rules];\n        const length = pipeline.length;\n        const errors = [];\n        for (let i = 0; i < length; i++) {\n            const rule = pipeline[i];\n            const result = await rule(value, ctx);\n            const isValid = typeof result !== 'string' && !Array.isArray(result) && result;\n            if (isValid) {\n                continue;\n            }\n            if (Array.isArray(result)) {\n                errors.push(...result);\n            }\n            else {\n                const message = typeof result === 'string' ? result : _generateFieldError(ctx);\n                errors.push(message);\n            }\n            if (field.bails) {\n                return {\n                    errors,\n                };\n            }\n        }\n        return {\n            errors,\n        };\n    }\n    const normalizedContext = Object.assign(Object.assign({}, field), { rules: normalizeRules(rules) });\n    const errors = [];\n    const rulesKeys = Object.keys(normalizedContext.rules);\n    const length = rulesKeys.length;\n    for (let i = 0; i < length; i++) {\n        const rule = rulesKeys[i];\n        const result = await _test(normalizedContext, value, {\n            name: rule,\n            params: normalizedContext.rules[rule],\n        });\n        if (result.error) {\n            errors.push(result.error);\n            if (field.bails) {\n                return {\n                    errors,\n                };\n            }\n        }\n    }\n    return {\n        errors,\n    };\n}\nfunction isYupError(err) {\n    return !!err && err.name === 'ValidationError';\n}\nfunction yupToTypedSchema(yupSchema) {\n    const schema = {\n        __type: 'VVTypedSchema',\n        async parse(values, context) {\n            var _a;\n            try {\n                const output = await yupSchema.validate(values, { abortEarly: false, context: (context === null || context === void 0 ? void 0 : context.formData) || {} });\n                return {\n                    output,\n                    errors: [],\n                };\n            }\n            catch (err) {\n                // Yup errors have a name prop one them.\n                // https://github.com/jquense/yup#validationerrorerrors-string--arraystring-value-any-path-string\n                if (!isYupError(err)) {\n                    throw err;\n                }\n                if (!((_a = err.inner) === null || _a === void 0 ? void 0 : _a.length) && err.errors.length) {\n                    return { errors: [{ path: err.path, errors: err.errors }] };\n                }\n                const errors = err.inner.reduce((acc, curr) => {\n                    const path = curr.path || '';\n                    if (!acc[path]) {\n                        acc[path] = { errors: [], path };\n                    }\n                    acc[path].errors.push(...curr.errors);\n                    return acc;\n                }, {});\n                return { errors: Object.values(errors) };\n            }\n        },\n    };\n    return schema;\n}\n/**\n * Handles yup validation\n */\nasync function validateFieldWithTypedSchema(value, context) {\n    const typedSchema = isTypedSchema(context.rules) ? context.rules : yupToTypedSchema(context.rules);\n    const result = await typedSchema.parse(value, { formData: context.formData });\n    const messages = [];\n    for (const error of result.errors) {\n        if (error.errors.length) {\n            messages.push(...error.errors);\n        }\n    }\n    return {\n        value: result.value,\n        errors: messages,\n    };\n}\n/**\n * Tests a single input value against a rule.\n */\nasync function _test(field, value, rule) {\n    const validator = resolveRule(rule.name);\n    if (!validator) {\n        throw new Error(`No such validator '${rule.name}' exists.`);\n    }\n    const params = fillTargetValues(rule.params, field.formData);\n    const ctx = {\n        field: field.label || field.name,\n        name: field.name,\n        label: field.label,\n        value,\n        form: field.formData,\n        rule: Object.assign(Object.assign({}, rule), { params }),\n    };\n    const result = await validator(value, params, ctx);\n    if (typeof result === 'string') {\n        return {\n            error: result,\n        };\n    }\n    return {\n        error: result ? undefined : _generateFieldError(ctx),\n    };\n}\n/**\n * Generates error messages.\n */\nfunction _generateFieldError(fieldCtx) {\n    const message = getConfig().generateMessage;\n    if (!message) {\n        return 'Field is invalid';\n    }\n    return message(fieldCtx);\n}\nfunction fillTargetValues(params, crossTable) {\n    const normalize = (value) => {\n        if (isLocator(value)) {\n            return value(crossTable);\n        }\n        return value;\n    };\n    if (Array.isArray(params)) {\n        return params.map(normalize);\n    }\n    return Object.keys(params).reduce((acc, param) => {\n        acc[param] = normalize(params[param]);\n        return acc;\n    }, {});\n}\nasync function validateTypedSchema(schema, values) {\n    const typedSchema = isTypedSchema(schema) ? schema : yupToTypedSchema(schema);\n    const validationResult = await typedSchema.parse(klona(values), { formData: klona(values) });\n    const results = {};\n    const errors = {};\n    for (const error of validationResult.errors) {\n        const messages = error.errors;\n        // Fixes issue with path mapping with Yup 1.0 including quotes around array indices\n        const path = (error.path || '').replace(/\\[\"(\\d+)\"\\]/g, (_, m) => {\n            return `[${m}]`;\n        });\n        results[path] = { valid: !messages.length, errors: messages };\n        if (messages.length) {\n            errors[path] = messages[0];\n        }\n    }\n    return {\n        valid: !validationResult.errors.length,\n        results,\n        errors,\n        values: validationResult.value,\n        source: 'schema',\n    };\n}\nasync function validateObjectSchema(schema, values, opts) {\n    const paths = keysOf(schema);\n    const validations = paths.map(async (path) => {\n        var _a, _b, _c;\n        const strings = (_a = opts === null || opts === void 0 ? void 0 : opts.names) === null || _a === void 0 ? void 0 : _a[path];\n        const fieldResult = await validate(getFromPath(values, path), schema[path], {\n            name: (strings === null || strings === void 0 ? void 0 : strings.name) || path,\n            label: strings === null || strings === void 0 ? void 0 : strings.label,\n            values: values,\n            bails: (_c = (_b = opts === null || opts === void 0 ? void 0 : opts.bailsMap) === null || _b === void 0 ? void 0 : _b[path]) !== null && _c !== void 0 ? _c : true,\n        });\n        return Object.assign(Object.assign({}, fieldResult), { path });\n    });\n    let isAllValid = true;\n    const validationResults = await Promise.all(validations);\n    const results = {};\n    const errors = {};\n    for (const result of validationResults) {\n        results[result.path] = {\n            valid: result.valid,\n            errors: result.errors,\n        };\n        if (!result.valid) {\n            isAllValid = false;\n            errors[result.path] = result.errors[0];\n        }\n    }\n    return {\n        valid: isAllValid,\n        results,\n        errors,\n        source: 'schema',\n    };\n}\n\nlet ID_COUNTER = 0;\nfunction useFieldState(path, init) {\n    const { value, initialValue, setInitialValue } = _useFieldValue(path, init.modelValue, init.form);\n    if (!init.form) {\n        const { errors, setErrors } = createFieldErrors();\n        const id = ID_COUNTER >= Number.MAX_SAFE_INTEGER ? 0 : ++ID_COUNTER;\n        const meta = createFieldMeta(value, initialValue, errors, init.schema);\n        function setState(state) {\n            var _a;\n            if ('value' in state) {\n                value.value = state.value;\n            }\n            if ('errors' in state) {\n                setErrors(state.errors);\n            }\n            if ('touched' in state) {\n                meta.touched = (_a = state.touched) !== null && _a !== void 0 ? _a : meta.touched;\n            }\n            if ('initialValue' in state) {\n                setInitialValue(state.initialValue);\n            }\n        }\n        return {\n            id,\n            path,\n            value,\n            initialValue,\n            meta,\n            flags: { pendingUnmount: { [id]: false }, pendingReset: false },\n            errors,\n            setState,\n        };\n    }\n    const state = init.form.createPathState(path, {\n        bails: init.bails,\n        label: init.label,\n        type: init.type,\n        validate: init.validate,\n        schema: init.schema,\n    });\n    const errors = computed(() => state.errors);\n    function setState(state) {\n        var _a, _b, _c;\n        if ('value' in state) {\n            value.value = state.value;\n        }\n        if ('errors' in state) {\n            (_a = init.form) === null || _a === void 0 ? void 0 : _a.setFieldError(unref(path), state.errors);\n        }\n        if ('touched' in state) {\n            (_b = init.form) === null || _b === void 0 ? void 0 : _b.setFieldTouched(unref(path), (_c = state.touched) !== null && _c !== void 0 ? _c : false);\n        }\n        if ('initialValue' in state) {\n            setInitialValue(state.initialValue);\n        }\n    }\n    return {\n        id: Array.isArray(state.id) ? state.id[state.id.length - 1] : state.id,\n        path,\n        value,\n        errors,\n        meta: state,\n        initialValue,\n        flags: state.__flags,\n        setState,\n    };\n}\n/**\n * Creates the field value and resolves the initial value\n */\nfunction _useFieldValue(path, modelValue, form) {\n    const modelRef = ref(unref(modelValue));\n    function resolveInitialValue() {\n        if (!form) {\n            return unref(modelRef);\n        }\n        return getFromPath(form.initialValues.value, unref(path), unref(modelRef));\n    }\n    function setInitialValue(value) {\n        if (!form) {\n            modelRef.value = value;\n            return;\n        }\n        form.setFieldInitialValue(unref(path), value, true);\n    }\n    const initialValue = computed(resolveInitialValue);\n    // if no form is associated, use a regular ref.\n    if (!form) {\n        const value = ref(resolveInitialValue());\n        return {\n            value,\n            initialValue,\n            setInitialValue,\n        };\n    }\n    // to set the initial value, first check if there is a current value, if there is then use it.\n    // otherwise use the configured initial value if it exists.\n    // prioritize model value over form values\n    // #3429\n    const currentValue = resolveModelValue(modelValue, form, initialValue, path);\n    form.stageInitialValue(unref(path), currentValue, true);\n    // otherwise use a computed setter that triggers the `setFieldValue`\n    const value = computed({\n        get() {\n            return getFromPath(form.values, unref(path));\n        },\n        set(newVal) {\n            form.setFieldValue(unref(path), newVal, false);\n        },\n    });\n    return {\n        value,\n        initialValue,\n        setInitialValue,\n    };\n}\n/*\n  to set the initial value, first check if there is a current value, if there is then use it.\n  otherwise use the configured initial value if it exists.\n  prioritize model value over form values\n  #3429\n*/\nfunction resolveModelValue(modelValue, form, initialValue, path) {\n    if (isRef(modelValue)) {\n        return unref(modelValue);\n    }\n    if (modelValue !== undefined) {\n        return modelValue;\n    }\n    return getFromPath(form.values, unref(path), unref(initialValue));\n}\n/**\n * Creates meta flags state and some associated effects with them\n */\nfunction createFieldMeta(currentValue, initialValue, errors, schema) {\n    const isRequired = computed(() => { var _a, _b, _c; return (_c = (_b = (_a = toValue(schema)) === null || _a === void 0 ? void 0 : _a.describe) === null || _b === void 0 ? void 0 : _b.call(_a).required) !== null && _c !== void 0 ? _c : false; });\n    const meta = reactive({\n        touched: false,\n        pending: false,\n        valid: true,\n        required: isRequired,\n        validated: !!unref(errors).length,\n        initialValue: computed(() => unref(initialValue)),\n        dirty: computed(() => {\n            return !isEqual(unref(currentValue), unref(initialValue));\n        }),\n    });\n    watch(errors, value => {\n        meta.valid = !value.length;\n    }, {\n        immediate: true,\n        flush: 'sync',\n    });\n    return meta;\n}\n/**\n * Creates the error message state for the field state\n */\nfunction createFieldErrors() {\n    const errors = ref([]);\n    return {\n        errors,\n        setErrors: (messages) => {\n            errors.value = normalizeErrorItem(messages);\n        },\n    };\n}\n\nconst DEVTOOLS_FORMS = {};\nconst DEVTOOLS_FIELDS = {};\nconst INSPECTOR_ID = 'vee-validate-inspector';\nconst COLORS = {\n    error: 0xbd4b4b,\n    success: 0x06d77b,\n    unknown: 0x54436b,\n    white: 0xffffff,\n    black: 0x000000,\n    blue: 0x035397,\n    purple: 0xb980f0,\n    orange: 0xf5a962,\n    gray: 0xbbbfca,\n};\nlet SELECTED_NODE = null;\n/**\n * Plugin API\n */\nlet API;\nasync function installDevtoolsPlugin(app) {\n    if ((process.env.NODE_ENV !== 'production')) {\n        if (!isClient) {\n            return;\n        }\n        const devtools = await import('@vue/devtools-api');\n        devtools.setupDevtoolsPlugin({\n            id: 'vee-validate-devtools-plugin',\n            label: 'VeeValidate Plugin',\n            packageName: 'vee-validate',\n            homepage: 'https://vee-validate.logaretm.com/v4',\n            app,\n            logo: 'https://vee-validate.logaretm.com/v4/logo.png',\n        }, api => {\n            API = api;\n            api.addInspector({\n                id: INSPECTOR_ID,\n                icon: 'rule',\n                label: 'vee-validate',\n                noSelectionText: 'Select a vee-validate node to inspect',\n                actions: [\n                    {\n                        icon: 'done_outline',\n                        tooltip: 'Validate selected item',\n                        action: async () => {\n                            if (!SELECTED_NODE) {\n                                // eslint-disable-next-line no-console\n                                console.error('There is not a valid selected vee-validate node or component');\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'field') {\n                                await SELECTED_NODE.field.validate();\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'form') {\n                                await SELECTED_NODE.form.validate();\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'pathState') {\n                                await SELECTED_NODE.form.validateField(SELECTED_NODE.state.path);\n                            }\n                        },\n                    },\n                    {\n                        icon: 'delete_sweep',\n                        tooltip: 'Clear validation state of the selected item',\n                        action: () => {\n                            if (!SELECTED_NODE) {\n                                // eslint-disable-next-line no-console\n                                console.error('There is not a valid selected vee-validate node or component');\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'field') {\n                                SELECTED_NODE.field.resetField();\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'form') {\n                                SELECTED_NODE.form.resetForm();\n                            }\n                            if (SELECTED_NODE.type === 'pathState') {\n                                SELECTED_NODE.form.resetField(SELECTED_NODE.state.path);\n                            }\n                        },\n                    },\n                ],\n            });\n            api.on.getInspectorTree(payload => {\n                if (payload.inspectorId !== INSPECTOR_ID) {\n                    return;\n                }\n                const forms = Object.values(DEVTOOLS_FORMS);\n                const fields = Object.values(DEVTOOLS_FIELDS);\n                payload.rootNodes = [\n                    ...forms.map(mapFormForDevtoolsInspector),\n                    ...fields.map(field => mapFieldForDevtoolsInspector(field)),\n                ];\n            });\n            api.on.getInspectorState(payload => {\n                if (payload.inspectorId !== INSPECTOR_ID) {\n                    return;\n                }\n                const { form, field, state, type } = decodeNodeId(payload.nodeId);\n                api.unhighlightElement();\n                if (form && type === 'form') {\n                    payload.state = buildFormState(form);\n                    SELECTED_NODE = { type: 'form', form };\n                    api.highlightElement(form._vm);\n                    return;\n                }\n                if (state && type === 'pathState' && form) {\n                    payload.state = buildFieldState(state);\n                    SELECTED_NODE = { type: 'pathState', state, form };\n                    return;\n                }\n                if (field && type === 'field') {\n                    payload.state = buildFieldState({\n                        errors: field.errors.value,\n                        dirty: field.meta.dirty,\n                        valid: field.meta.valid,\n                        touched: field.meta.touched,\n                        value: field.value.value,\n                        initialValue: field.meta.initialValue,\n                    });\n                    SELECTED_NODE = { field, type: 'field' };\n                    api.highlightElement(field._vm);\n                    return;\n                }\n                SELECTED_NODE = null;\n                api.unhighlightElement();\n            });\n        });\n    }\n}\nconst refreshInspector = throttle(() => {\n    setTimeout(async () => {\n        await nextTick();\n        API === null || API === void 0 ? void 0 : API.sendInspectorState(INSPECTOR_ID);\n        API === null || API === void 0 ? void 0 : API.sendInspectorTree(INSPECTOR_ID);\n    }, 100);\n}, 100);\nfunction registerFormWithDevTools(form) {\n    const vm = getCurrentInstance();\n    if (!API) {\n        const app = vm === null || vm === void 0 ? void 0 : vm.appContext.app;\n        if (!app) {\n            return;\n        }\n        installDevtoolsPlugin(app);\n    }\n    DEVTOOLS_FORMS[form.formId] = Object.assign({}, form);\n    DEVTOOLS_FORMS[form.formId]._vm = vm;\n    onUnmounted(() => {\n        delete DEVTOOLS_FORMS[form.formId];\n        refreshInspector();\n    });\n    refreshInspector();\n}\nfunction registerSingleFieldWithDevtools(field) {\n    const vm = getCurrentInstance();\n    if (!API) {\n        const app = vm === null || vm === void 0 ? void 0 : vm.appContext.app;\n        if (!app) {\n            return;\n        }\n        installDevtoolsPlugin(app);\n    }\n    DEVTOOLS_FIELDS[field.id] = Object.assign({}, field);\n    DEVTOOLS_FIELDS[field.id]._vm = vm;\n    onUnmounted(() => {\n        delete DEVTOOLS_FIELDS[field.id];\n        refreshInspector();\n    });\n    refreshInspector();\n}\nfunction mapFormForDevtoolsInspector(form) {\n    const { textColor, bgColor } = getValidityColors(form.meta.value.valid);\n    const formTreeNodes = {};\n    Object.values(form.getAllPathStates()).forEach(state => {\n        setInPath(formTreeNodes, toValue(state.path), mapPathForDevtoolsInspector(state, form));\n    });\n    function buildFormTree(tree, path = []) {\n        const key = [...path].pop();\n        if ('id' in tree) {\n            return Object.assign(Object.assign({}, tree), { label: key || tree.label });\n        }\n        if (isObject(tree)) {\n            return {\n                id: `${path.join('.')}`,\n                label: key || '',\n                children: Object.keys(tree).map(key => buildFormTree(tree[key], [...path, key])),\n            };\n        }\n        if (Array.isArray(tree)) {\n            return {\n                id: `${path.join('.')}`,\n                label: `${key}[]`,\n                children: tree.map((c, idx) => buildFormTree(c, [...path, String(idx)])),\n            };\n        }\n        return { id: '', label: '', children: [] };\n    }\n    const { children } = buildFormTree(formTreeNodes);\n    return {\n        id: encodeNodeId(form),\n        label: form.name,\n        children,\n        tags: [\n            {\n                label: 'Form',\n                textColor,\n                backgroundColor: bgColor,\n            },\n            {\n                label: `${form.getAllPathStates().length} fields`,\n                textColor: COLORS.white,\n                backgroundColor: COLORS.unknown,\n            },\n        ],\n    };\n}\nfunction mapPathForDevtoolsInspector(state, form) {\n    return {\n        id: encodeNodeId(form, state),\n        label: toValue(state.path),\n        tags: getFieldNodeTags(state.multiple, state.fieldsCount, state.type, state.valid, form),\n    };\n}\nfunction mapFieldForDevtoolsInspector(field, form) {\n    return {\n        id: encodeNodeId(form, field),\n        label: unref(field.name),\n        tags: getFieldNodeTags(false, 1, field.type, field.meta.valid, form),\n    };\n}\nfunction getFieldNodeTags(multiple, fieldsCount, type, valid, form) {\n    const { textColor, bgColor } = getValidityColors(valid);\n    return [\n        multiple\n            ? undefined\n            : {\n                label: 'Field',\n                textColor,\n                backgroundColor: bgColor,\n            },\n        !form\n            ? {\n                label: 'Standalone',\n                textColor: COLORS.black,\n                backgroundColor: COLORS.gray,\n            }\n            : undefined,\n        type === 'checkbox'\n            ? {\n                label: 'Checkbox',\n                textColor: COLORS.white,\n                backgroundColor: COLORS.blue,\n            }\n            : undefined,\n        type === 'radio'\n            ? {\n                label: 'Radio',\n                textColor: COLORS.white,\n                backgroundColor: COLORS.purple,\n            }\n            : undefined,\n        multiple\n            ? {\n                label: 'Multiple',\n                textColor: COLORS.black,\n                backgroundColor: COLORS.orange,\n            }\n            : undefined,\n    ].filter(Boolean);\n}\nfunction encodeNodeId(form, stateOrField) {\n    const type = stateOrField ? ('path' in stateOrField ? 'pathState' : 'field') : 'form';\n    const fieldPath = stateOrField ? ('path' in stateOrField ? stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.path : toValue(stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.name)) : '';\n    const idObject = { f: form === null || form === void 0 ? void 0 : form.formId, ff: (stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.id) || fieldPath, type };\n    return btoa(encodeURIComponent(JSON.stringify(idObject)));\n}\nfunction decodeNodeId(nodeId) {\n    try {\n        const idObject = JSON.parse(decodeURIComponent(atob(nodeId)));\n        const form = DEVTOOLS_FORMS[idObject.f];\n        if (!form && idObject.ff) {\n            const field = DEVTOOLS_FIELDS[idObject.ff];\n            if (!field) {\n                return {};\n            }\n            return {\n                type: idObject.type,\n                field,\n            };\n        }\n        if (!form) {\n            return {};\n        }\n        const state = form.getPathState(idObject.ff);\n        return {\n            type: idObject.type,\n            form,\n            state,\n        };\n    }\n    catch (err) {\n        // console.error(`Devtools: [vee-validate] Failed to parse node id ${nodeId}`);\n    }\n    return {};\n}\nfunction buildFieldState(state) {\n    return {\n        'Field state': [\n            { key: 'errors', value: state.errors },\n            {\n                key: 'initialValue',\n                value: state.initialValue,\n            },\n            {\n                key: 'currentValue',\n                value: state.value,\n            },\n            {\n                key: 'touched',\n                value: state.touched,\n            },\n            {\n                key: 'dirty',\n                value: state.dirty,\n            },\n            {\n                key: 'valid',\n                value: state.valid,\n            },\n        ],\n    };\n}\nfunction buildFormState(form) {\n    const { errorBag, meta, values, isSubmitting, isValidating, submitCount } = form;\n    return {\n        'Form state': [\n            {\n                key: 'submitCount',\n                value: submitCount.value,\n            },\n            {\n                key: 'isSubmitting',\n                value: isSubmitting.value,\n            },\n            {\n                key: 'isValidating',\n                value: isValidating.value,\n            },\n            {\n                key: 'touched',\n                value: meta.value.touched,\n            },\n            {\n                key: 'dirty',\n                value: meta.value.dirty,\n            },\n            {\n                key: 'valid',\n                value: meta.value.valid,\n            },\n            {\n                key: 'initialValues',\n                value: meta.value.initialValues,\n            },\n            {\n                key: 'currentValues',\n                value: values,\n            },\n            {\n                key: 'errors',\n                value: keysOf(errorBag.value).reduce((acc, key) => {\n                    var _a;\n                    const message = (_a = errorBag.value[key]) === null || _a === void 0 ? void 0 : _a[0];\n                    if (message) {\n                        acc[key] = message;\n                    }\n                    return acc;\n                }, {}),\n            },\n        ],\n    };\n}\n/**\n * Resolves the tag color based on the form state\n */\nfunction getValidityColors(valid) {\n    return {\n        bgColor: valid ? COLORS.success : COLORS.error,\n        textColor: valid ? COLORS.black : COLORS.white,\n    };\n}\n\n/**\n * Creates a field composite.\n */\nfunction useField(path, rules, opts) {\n    if (hasCheckedAttr(opts === null || opts === void 0 ? void 0 : opts.type)) {\n        return useFieldWithChecked(path, rules, opts);\n    }\n    return _useField(path, rules, opts);\n}\nfunction _useField(path, rules, opts) {\n    const { initialValue: modelValue, validateOnMount, bails, type, checkedValue, label, validateOnValueUpdate, uncheckedValue, controlled, keepValueOnUnmount, syncVModel, form: controlForm, } = normalizeOptions(opts);\n    const injectedForm = controlled ? injectWithSelf(FormContextKey) : undefined;\n    const form = controlForm || injectedForm;\n    const name = computed(() => normalizeFormPath(toValue(path)));\n    const validator = computed(() => {\n        const schema = toValue(form === null || form === void 0 ? void 0 : form.schema);\n        if (schema) {\n            return undefined;\n        }\n        const rulesValue = unref(rules);\n        if (isYupValidator(rulesValue) ||\n            isTypedSchema(rulesValue) ||\n            isCallable(rulesValue) ||\n            Array.isArray(rulesValue)) {\n            return rulesValue;\n        }\n        return normalizeRules(rulesValue);\n    });\n    const isTyped = !isCallable(validator.value) && isTypedSchema(toValue(rules));\n    const { id, value, initialValue, meta, setState, errors, flags } = useFieldState(name, {\n        modelValue,\n        form,\n        bails,\n        label,\n        type,\n        validate: validator.value ? validate$1 : undefined,\n        schema: isTyped ? rules : undefined,\n    });\n    const errorMessage = computed(() => errors.value[0]);\n    if (syncVModel) {\n        useVModel({\n            value,\n            prop: syncVModel,\n            handleChange,\n            shouldValidate: () => validateOnValueUpdate && !flags.pendingReset,\n        });\n    }\n    /**\n     * Handles common onBlur meta update\n     */\n    const handleBlur = (evt, shouldValidate = false) => {\n        meta.touched = true;\n        if (shouldValidate) {\n            validateWithStateMutation();\n        }\n    };\n    async function validateCurrentValue(mode) {\n        var _a, _b;\n        if (form === null || form === void 0 ? void 0 : form.validateSchema) {\n            const { results } = await form.validateSchema(mode);\n            return (_a = results[toValue(name)]) !== null && _a !== void 0 ? _a : { valid: true, errors: [] };\n        }\n        if (validator.value) {\n            return validate(value.value, validator.value, {\n                name: toValue(name),\n                label: toValue(label),\n                values: (_b = form === null || form === void 0 ? void 0 : form.values) !== null && _b !== void 0 ? _b : {},\n                bails,\n            });\n        }\n        return { valid: true, errors: [] };\n    }\n    const validateWithStateMutation = withLatest(async () => {\n        meta.pending = true;\n        meta.validated = true;\n        return validateCurrentValue('validated-only');\n    }, result => {\n        if (flags.pendingUnmount[field.id]) {\n            return result;\n        }\n        setState({ errors: result.errors });\n        meta.pending = false;\n        meta.valid = result.valid;\n        return result;\n    });\n    const validateValidStateOnly = withLatest(async () => {\n        return validateCurrentValue('silent');\n    }, result => {\n        meta.valid = result.valid;\n        return result;\n    });\n    function validate$1(opts) {\n        if ((opts === null || opts === void 0 ? void 0 : opts.mode) === 'silent') {\n            return validateValidStateOnly();\n        }\n        return validateWithStateMutation();\n    }\n    // Common input/change event handler\n    function handleChange(e, shouldValidate = true) {\n        const newValue = normalizeEventValue(e);\n        setValue(newValue, shouldValidate);\n    }\n    // Runs the initial validation\n    onMounted(() => {\n        if (validateOnMount) {\n            return validateWithStateMutation();\n        }\n        // validate self initially if no form was handling this\n        // forms should have their own initial silent validation run to make things more efficient\n        if (!form || !form.validateSchema) {\n            validateValidStateOnly();\n        }\n    });\n    function setTouched(isTouched) {\n        meta.touched = isTouched;\n    }\n    function resetField(state) {\n        var _a;\n        const newValue = state && 'value' in state ? state.value : initialValue.value;\n        setState({\n            value: klona(newValue),\n            initialValue: klona(newValue),\n            touched: (_a = state === null || state === void 0 ? void 0 : state.touched) !== null && _a !== void 0 ? _a : false,\n            errors: (state === null || state === void 0 ? void 0 : state.errors) || [],\n        });\n        meta.pending = false;\n        meta.validated = false;\n        validateValidStateOnly();\n    }\n    const vm = getCurrentInstance();\n    function setValue(newValue, shouldValidate = true) {\n        value.value = vm && syncVModel ? applyModelModifiers(newValue, vm.props.modelModifiers) : newValue;\n        const validateFn = shouldValidate ? validateWithStateMutation : validateValidStateOnly;\n        validateFn();\n    }\n    function setErrors(errors) {\n        setState({ errors: Array.isArray(errors) ? errors : [errors] });\n    }\n    const valueProxy = computed({\n        get() {\n            return value.value;\n        },\n        set(newValue) {\n            setValue(newValue, validateOnValueUpdate);\n        },\n    });\n    const field = {\n        id,\n        name,\n        label,\n        value: valueProxy,\n        meta,\n        errors,\n        errorMessage,\n        type,\n        checkedValue,\n        uncheckedValue,\n        bails,\n        keepValueOnUnmount,\n        resetField,\n        handleReset: () => resetField(),\n        validate: validate$1,\n        handleChange,\n        handleBlur,\n        setState,\n        setTouched,\n        setErrors,\n        setValue,\n    };\n    provide(FieldContextKey, field);\n    if (isRef(rules) && typeof unref(rules) !== 'function') {\n        watch(rules, (value, oldValue) => {\n            if (isEqual(value, oldValue)) {\n                return;\n            }\n            meta.validated ? validateWithStateMutation() : validateValidStateOnly();\n        }, {\n            deep: true,\n        });\n    }\n    if ((process.env.NODE_ENV !== 'production')) {\n        field._vm = getCurrentInstance();\n        watch(() => (Object.assign(Object.assign({ errors: errors.value }, meta), { value: value.value })), refreshInspector, {\n            deep: true,\n        });\n        if (!form) {\n            registerSingleFieldWithDevtools(field);\n        }\n    }\n    // if no associated form return the field API immediately\n    if (!form) {\n        return field;\n    }\n    // associate the field with the given form\n    // extract cross-field dependencies in a computed prop\n    const dependencies = computed(() => {\n        const rulesVal = validator.value;\n        // is falsy, a function schema or a yup schema\n        if (!rulesVal ||\n            isCallable(rulesVal) ||\n            isYupValidator(rulesVal) ||\n            isTypedSchema(rulesVal) ||\n            Array.isArray(rulesVal)) {\n            return {};\n        }\n        return Object.keys(rulesVal).reduce((acc, rule) => {\n            const deps = extractLocators(rulesVal[rule])\n                .map((dep) => dep.__locatorRef)\n                .reduce((depAcc, depName) => {\n                const depValue = getFromPath(form.values, depName) || form.values[depName];\n                if (depValue !== undefined) {\n                    depAcc[depName] = depValue;\n                }\n                return depAcc;\n            }, {});\n            Object.assign(acc, deps);\n            return acc;\n        }, {});\n    });\n    // Adds a watcher that runs the validation whenever field dependencies change\n    watch(dependencies, (deps, oldDeps) => {\n        // Skip if no dependencies or if the field wasn't manipulated\n        if (!Object.keys(deps).length) {\n            return;\n        }\n        const shouldValidate = !isEqual(deps, oldDeps);\n        if (shouldValidate) {\n            meta.validated ? validateWithStateMutation() : validateValidStateOnly();\n        }\n    });\n    onBeforeUnmount(() => {\n        var _a;\n        const shouldKeepValue = (_a = toValue(field.keepValueOnUnmount)) !== null && _a !== void 0 ? _a : toValue(form.keepValuesOnUnmount);\n        const path = toValue(name);\n        if (shouldKeepValue || !form || flags.pendingUnmount[field.id]) {\n            form === null || form === void 0 ? void 0 : form.removePathState(path, id);\n            return;\n        }\n        flags.pendingUnmount[field.id] = true;\n        const pathState = form.getPathState(path);\n        const matchesId = Array.isArray(pathState === null || pathState === void 0 ? void 0 : pathState.id) && (pathState === null || pathState === void 0 ? void 0 : pathState.multiple)\n            ? pathState === null || pathState === void 0 ? void 0 : pathState.id.includes(field.id)\n            : (pathState === null || pathState === void 0 ? void 0 : pathState.id) === field.id;\n        if (!matchesId) {\n            return;\n        }\n        if ((pathState === null || pathState === void 0 ? void 0 : pathState.multiple) && Array.isArray(pathState.value)) {\n            const valueIdx = pathState.value.findIndex(i => isEqual(i, toValue(field.checkedValue)));\n            if (valueIdx > -1) {\n                const newVal = [...pathState.value];\n                newVal.splice(valueIdx, 1);\n                form.setFieldValue(path, newVal);\n            }\n            if (Array.isArray(pathState.id)) {\n                pathState.id.splice(pathState.id.indexOf(field.id), 1);\n            }\n        }\n        else {\n            form.unsetPathValue(toValue(name));\n        }\n        form.removePathState(path, id);\n    });\n    return field;\n}\n/**\n * Normalizes partial field options to include the full options\n */\nfunction normalizeOptions(opts) {\n    const defaults = () => ({\n        initialValue: undefined,\n        validateOnMount: false,\n        bails: true,\n        label: undefined,\n        validateOnValueUpdate: true,\n        keepValueOnUnmount: undefined,\n        syncVModel: false,\n        controlled: true,\n    });\n    const isVModelSynced = !!(opts === null || opts === void 0 ? void 0 : opts.syncVModel);\n    const modelPropName = typeof (opts === null || opts === void 0 ? void 0 : opts.syncVModel) === 'string' ? opts.syncVModel : (opts === null || opts === void 0 ? void 0 : opts.modelPropName) || 'modelValue';\n    const initialValue = isVModelSynced && !('initialValue' in (opts || {}))\n        ? getCurrentModelValue(getCurrentInstance(), modelPropName)\n        : opts === null || opts === void 0 ? void 0 : opts.initialValue;\n    if (!opts) {\n        return Object.assign(Object.assign({}, defaults()), { initialValue });\n    }\n    // TODO: Deprecate this in next major release\n    const checkedValue = 'valueProp' in opts ? opts.valueProp : opts.checkedValue;\n    const controlled = 'standalone' in opts ? !opts.standalone : opts.controlled;\n    const syncVModel = (opts === null || opts === void 0 ? void 0 : opts.modelPropName) || (opts === null || opts === void 0 ? void 0 : opts.syncVModel) || false;\n    return Object.assign(Object.assign(Object.assign({}, defaults()), (opts || {})), { initialValue, controlled: controlled !== null && controlled !== void 0 ? controlled : true, checkedValue,\n        syncVModel });\n}\nfunction useFieldWithChecked(name, rules, opts) {\n    const form = !(opts === null || opts === void 0 ? void 0 : opts.standalone) ? injectWithSelf(FormContextKey) : undefined;\n    const checkedValue = opts === null || opts === void 0 ? void 0 : opts.checkedValue;\n    const uncheckedValue = opts === null || opts === void 0 ? void 0 : opts.uncheckedValue;\n    function patchCheckedApi(field) {\n        const handleChange = field.handleChange;\n        const checked = computed(() => {\n            const currentValue = toValue(field.value);\n            const checkedVal = toValue(checkedValue);\n            return Array.isArray(currentValue)\n                ? currentValue.findIndex(v => isEqual(v, checkedVal)) >= 0\n                : isEqual(checkedVal, currentValue);\n        });\n        function handleCheckboxChange(e, shouldValidate = true) {\n            var _a, _b;\n            if (checked.value === ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked)) {\n                if (shouldValidate) {\n                    field.validate();\n                }\n                return;\n            }\n            const path = toValue(name);\n            const pathState = form === null || form === void 0 ? void 0 : form.getPathState(path);\n            const value = normalizeEventValue(e);\n            let newValue = (_b = toValue(checkedValue)) !== null && _b !== void 0 ? _b : value;\n            if (form && (pathState === null || pathState === void 0 ? void 0 : pathState.multiple) && pathState.type === 'checkbox') {\n                newValue = resolveNextCheckboxValue(getFromPath(form.values, path) || [], newValue, undefined);\n            }\n            else if ((opts === null || opts === void 0 ? void 0 : opts.type) === 'checkbox') {\n                newValue = resolveNextCheckboxValue(toValue(field.value), newValue, toValue(uncheckedValue));\n            }\n            handleChange(newValue, shouldValidate);\n        }\n        return Object.assign(Object.assign({}, field), { checked,\n            checkedValue,\n            uncheckedValue, handleChange: handleCheckboxChange });\n    }\n    return patchCheckedApi(_useField(name, rules, opts));\n}\nfunction useVModel({ prop, value, handleChange, shouldValidate }) {\n    const vm = getCurrentInstance();\n    /* istanbul ignore next */\n    if (!vm || !prop) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            // eslint-disable-next-line no-console\n            console.warn('Failed to setup model events because `useField` was not called in setup.');\n        }\n        return;\n    }\n    const propName = typeof prop === 'string' ? prop : 'modelValue';\n    const emitName = `update:${propName}`;\n    // Component doesn't have a model prop setup (must be defined on the props)\n    if (!(propName in vm.props)) {\n        return;\n    }\n    watch(value, newValue => {\n        if (isEqual(newValue, getCurrentModelValue(vm, propName))) {\n            return;\n        }\n        vm.emit(emitName, newValue);\n    });\n    watch(() => getCurrentModelValue(vm, propName), propValue => {\n        if (propValue === IS_ABSENT && value.value === undefined) {\n            return;\n        }\n        const newValue = propValue === IS_ABSENT ? undefined : propValue;\n        if (isEqual(newValue, value.value)) {\n            return;\n        }\n        handleChange(newValue, shouldValidate());\n    });\n}\nfunction getCurrentModelValue(vm, propName) {\n    if (!vm) {\n        return undefined;\n    }\n    return vm.props[propName];\n}\n\nconst FieldImpl = /** #__PURE__ */ defineComponent({\n    name: 'Field',\n    inheritAttrs: false,\n    props: {\n        as: {\n            type: [String, Object],\n            default: undefined,\n        },\n        name: {\n            type: String,\n            required: true,\n        },\n        rules: {\n            type: [Object, String, Function],\n            default: undefined,\n        },\n        validateOnMount: {\n            type: Boolean,\n            default: false,\n        },\n        validateOnBlur: {\n            type: Boolean,\n            default: undefined,\n        },\n        validateOnChange: {\n            type: Boolean,\n            default: undefined,\n        },\n        validateOnInput: {\n            type: Boolean,\n            default: undefined,\n        },\n        validateOnModelUpdate: {\n            type: Boolean,\n            default: undefined,\n        },\n        bails: {\n            type: Boolean,\n            default: () => getConfig().bails,\n        },\n        label: {\n            type: String,\n            default: undefined,\n        },\n        uncheckedValue: {\n            type: null,\n            default: undefined,\n        },\n        modelValue: {\n            type: null,\n            default: IS_ABSENT,\n        },\n        modelModifiers: {\n            type: null,\n            default: () => ({}),\n        },\n        'onUpdate:modelValue': {\n            type: null,\n            default: undefined,\n        },\n        standalone: {\n            type: Boolean,\n            default: false,\n        },\n        keepValue: {\n            type: Boolean,\n            default: undefined,\n        },\n    },\n    setup(props, ctx) {\n        const rules = toRef(props, 'rules');\n        const name = toRef(props, 'name');\n        const label = toRef(props, 'label');\n        const uncheckedValue = toRef(props, 'uncheckedValue');\n        const keepValue = toRef(props, 'keepValue');\n        const { errors, value, errorMessage, validate: validateField, handleChange, handleBlur, setTouched, resetField, handleReset, meta, checked, setErrors, setValue, } = useField(name, rules, {\n            validateOnMount: props.validateOnMount,\n            bails: props.bails,\n            standalone: props.standalone,\n            type: ctx.attrs.type,\n            initialValue: resolveInitialValue(props, ctx),\n            // Only for checkboxes and radio buttons\n            checkedValue: ctx.attrs.value,\n            uncheckedValue,\n            label,\n            validateOnValueUpdate: props.validateOnModelUpdate,\n            keepValueOnUnmount: keepValue,\n            syncVModel: true,\n        });\n        // If there is a v-model applied on the component we need to emit the `update:modelValue` whenever the value binding changes\n        const onChangeHandler = function handleChangeWithModel(e, shouldValidate = true) {\n            handleChange(e, shouldValidate);\n        };\n        const sharedProps = computed(() => {\n            const { validateOnInput, validateOnChange, validateOnBlur, validateOnModelUpdate } = resolveValidationTriggers(props);\n            function baseOnBlur(e) {\n                handleBlur(e, validateOnBlur);\n                if (isCallable(ctx.attrs.onBlur)) {\n                    ctx.attrs.onBlur(e);\n                }\n            }\n            function baseOnInput(e) {\n                onChangeHandler(e, validateOnInput);\n                if (isCallable(ctx.attrs.onInput)) {\n                    ctx.attrs.onInput(e);\n                }\n            }\n            function baseOnChange(e) {\n                onChangeHandler(e, validateOnChange);\n                if (isCallable(ctx.attrs.onChange)) {\n                    ctx.attrs.onChange(e);\n                }\n            }\n            const attrs = {\n                name: props.name,\n                onBlur: baseOnBlur,\n                onInput: baseOnInput,\n                onChange: baseOnChange,\n            };\n            attrs['onUpdate:modelValue'] = e => onChangeHandler(e, validateOnModelUpdate);\n            return attrs;\n        });\n        const fieldProps = computed(() => {\n            const attrs = Object.assign({}, sharedProps.value);\n            if (hasCheckedAttr(ctx.attrs.type) && checked) {\n                attrs.checked = checked.value;\n            }\n            const tag = resolveTag(props, ctx);\n            if (shouldHaveValueBinding(tag, ctx.attrs)) {\n                attrs.value = value.value;\n            }\n            return attrs;\n        });\n        const componentProps = computed(() => {\n            return Object.assign(Object.assign({}, sharedProps.value), { modelValue: value.value });\n        });\n        function slotProps() {\n            return {\n                field: fieldProps.value,\n                componentField: componentProps.value,\n                value: value.value,\n                meta,\n                errors: errors.value,\n                errorMessage: errorMessage.value,\n                validate: validateField,\n                resetField,\n                handleChange: onChangeHandler,\n                handleInput: e => onChangeHandler(e, false),\n                handleReset,\n                handleBlur: sharedProps.value.onBlur,\n                setTouched,\n                setErrors,\n                setValue,\n            };\n        }\n        ctx.expose({\n            value,\n            meta,\n            errors,\n            errorMessage,\n            setErrors,\n            setTouched,\n            setValue,\n            reset: resetField,\n            validate: validateField,\n            handleChange,\n        });\n        return () => {\n            const tag = resolveDynamicComponent(resolveTag(props, ctx));\n            const children = normalizeChildren(tag, ctx, slotProps);\n            if (tag) {\n                return h(tag, Object.assign(Object.assign({}, ctx.attrs), fieldProps.value), children);\n            }\n            return children;\n        };\n    },\n});\nfunction resolveTag(props, ctx) {\n    let tag = props.as || '';\n    if (!props.as && !ctx.slots.default) {\n        tag = 'input';\n    }\n    return tag;\n}\nfunction resolveValidationTriggers(props) {\n    var _a, _b, _c, _d;\n    const { validateOnInput, validateOnChange, validateOnBlur, validateOnModelUpdate } = getConfig();\n    return {\n        validateOnInput: (_a = props.validateOnInput) !== null && _a !== void 0 ? _a : validateOnInput,\n        validateOnChange: (_b = props.validateOnChange) !== null && _b !== void 0 ? _b : validateOnChange,\n        validateOnBlur: (_c = props.validateOnBlur) !== null && _c !== void 0 ? _c : validateOnBlur,\n        validateOnModelUpdate: (_d = props.validateOnModelUpdate) !== null && _d !== void 0 ? _d : validateOnModelUpdate,\n    };\n}\nfunction resolveInitialValue(props, ctx) {\n    // Gets the initial value either from `value` prop/attr or `v-model` binding (modelValue)\n    // For checkboxes and radio buttons it will always be the model value not the `value` attribute\n    if (!hasCheckedAttr(ctx.attrs.type)) {\n        return isPropPresent(props, 'modelValue') ? props.modelValue : ctx.attrs.value;\n    }\n    return isPropPresent(props, 'modelValue') ? props.modelValue : undefined;\n}\nconst Field = FieldImpl;\n\nlet FORM_COUNTER = 0;\nconst PRIVATE_PATH_STATE_KEYS = ['bails', 'fieldsCount', 'id', 'multiple', 'type', 'validate'];\nfunction resolveInitialValues(opts) {\n    const givenInitial = (opts === null || opts === void 0 ? void 0 : opts.initialValues) || {};\n    const providedValues = Object.assign({}, toValue(givenInitial));\n    const schema = unref(opts === null || opts === void 0 ? void 0 : opts.validationSchema);\n    if (schema && isTypedSchema(schema) && isCallable(schema.cast)) {\n        return klona(schema.cast(providedValues) || {});\n    }\n    return klona(providedValues);\n}\nfunction useForm(opts) {\n    var _a;\n    const formId = FORM_COUNTER++;\n    const name = (opts === null || opts === void 0 ? void 0 : opts.name) || 'Form';\n    // Prevents fields from double resetting their values, which causes checkboxes to toggle their initial value\n    let FIELD_ID_COUNTER = 0;\n    // If the form is currently submitting\n    const isSubmitting = ref(false);\n    // If the form is currently validating\n    const isValidating = ref(false);\n    // The number of times the user tried to submit the form\n    const submitCount = ref(0);\n    // field arrays managed by this form\n    const fieldArrays = [];\n    // a private ref for all form values\n    const formValues = reactive(resolveInitialValues(opts));\n    const pathStates = ref([]);\n    const extraErrorsBag = ref({});\n    const pathStateLookup = ref({});\n    const rebuildPathLookup = debounceNextTick(() => {\n        pathStateLookup.value = pathStates.value.reduce((names, state) => {\n            names[normalizeFormPath(toValue(state.path))] = state;\n            return names;\n        }, {});\n    });\n    /**\n     * Manually sets an error message on a specific field\n     */\n    function setFieldError(field, message) {\n        const state = findPathState(field);\n        if (!state) {\n            if (typeof field === 'string') {\n                extraErrorsBag.value[normalizeFormPath(field)] = normalizeErrorItem(message);\n            }\n            return;\n        }\n        // Move the error from the extras path if exists\n        if (typeof field === 'string') {\n            const normalizedPath = normalizeFormPath(field);\n            if (extraErrorsBag.value[normalizedPath]) {\n                delete extraErrorsBag.value[normalizedPath];\n            }\n        }\n        state.errors = normalizeErrorItem(message);\n        state.valid = !state.errors.length;\n    }\n    /**\n     * Sets errors for the fields specified in the object\n     */\n    function setErrors(paths) {\n        keysOf(paths).forEach(path => {\n            setFieldError(path, paths[path]);\n        });\n    }\n    if (opts === null || opts === void 0 ? void 0 : opts.initialErrors) {\n        setErrors(opts.initialErrors);\n    }\n    const errorBag = computed(() => {\n        const pathErrors = pathStates.value.reduce((acc, state) => {\n            if (state.errors.length) {\n                acc[toValue(state.path)] = state.errors;\n            }\n            return acc;\n        }, {});\n        return Object.assign(Object.assign({}, extraErrorsBag.value), pathErrors);\n    });\n    // Gets the first error of each field\n    const errors = computed(() => {\n        return keysOf(errorBag.value).reduce((acc, key) => {\n            const errors = errorBag.value[key];\n            if (errors === null || errors === void 0 ? void 0 : errors.length) {\n                acc[key] = errors[0];\n            }\n            return acc;\n        }, {});\n    });\n    /**\n     * Holds a computed reference to all fields names and labels\n     */\n    const fieldNames = computed(() => {\n        return pathStates.value.reduce((names, state) => {\n            names[toValue(state.path)] = { name: toValue(state.path) || '', label: state.label || '' };\n            return names;\n        }, {});\n    });\n    const fieldBailsMap = computed(() => {\n        return pathStates.value.reduce((map, state) => {\n            var _a;\n            map[toValue(state.path)] = (_a = state.bails) !== null && _a !== void 0 ? _a : true;\n            return map;\n        }, {});\n    });\n    // mutable non-reactive reference to initial errors\n    // we need this to process initial errors then unset them\n    const initialErrors = Object.assign({}, ((opts === null || opts === void 0 ? void 0 : opts.initialErrors) || {}));\n    const keepValuesOnUnmount = (_a = opts === null || opts === void 0 ? void 0 : opts.keepValuesOnUnmount) !== null && _a !== void 0 ? _a : false;\n    // initial form values\n    const { initialValues, originalInitialValues, setInitialValues } = useFormInitialValues(pathStates, formValues, opts);\n    // form meta aggregations\n    const meta = useFormMeta(pathStates, formValues, originalInitialValues, errors);\n    const controlledValues = computed(() => {\n        return pathStates.value.reduce((acc, state) => {\n            const value = getFromPath(formValues, toValue(state.path));\n            setInPath(acc, toValue(state.path), value);\n            return acc;\n        }, {});\n    });\n    const schema = opts === null || opts === void 0 ? void 0 : opts.validationSchema;\n    function createPathState(path, config) {\n        var _a, _b;\n        const initialValue = computed(() => getFromPath(initialValues.value, toValue(path)));\n        const pathStateExists = pathStateLookup.value[toValue(path)];\n        const isCheckboxOrRadio = (config === null || config === void 0 ? void 0 : config.type) === 'checkbox' || (config === null || config === void 0 ? void 0 : config.type) === 'radio';\n        if (pathStateExists && isCheckboxOrRadio) {\n            pathStateExists.multiple = true;\n            const id = FIELD_ID_COUNTER++;\n            if (Array.isArray(pathStateExists.id)) {\n                pathStateExists.id.push(id);\n            }\n            else {\n                pathStateExists.id = [pathStateExists.id, id];\n            }\n            pathStateExists.fieldsCount++;\n            pathStateExists.__flags.pendingUnmount[id] = false;\n            return pathStateExists;\n        }\n        const currentValue = computed(() => getFromPath(formValues, toValue(path)));\n        const pathValue = toValue(path);\n        const unsetBatchIndex = UNSET_BATCH.findIndex(_path => _path === pathValue);\n        if (unsetBatchIndex !== -1) {\n            UNSET_BATCH.splice(unsetBatchIndex, 1);\n        }\n        const isRequired = computed(() => {\n            var _a, _b, _c, _d;\n            const schemaValue = toValue(schema);\n            if (isTypedSchema(schemaValue)) {\n                return (_b = (_a = schemaValue.describe) === null || _a === void 0 ? void 0 : _a.call(schemaValue, toValue(path)).required) !== null && _b !== void 0 ? _b : false;\n            }\n            // Path own schema\n            const configSchemaValue = toValue(config === null || config === void 0 ? void 0 : config.schema);\n            if (isTypedSchema(configSchemaValue)) {\n                return (_d = (_c = configSchemaValue.describe) === null || _c === void 0 ? void 0 : _c.call(configSchemaValue).required) !== null && _d !== void 0 ? _d : false;\n            }\n            return false;\n        });\n        const id = FIELD_ID_COUNTER++;\n        const state = reactive({\n            id,\n            path,\n            touched: false,\n            pending: false,\n            valid: true,\n            validated: !!((_a = initialErrors[pathValue]) === null || _a === void 0 ? void 0 : _a.length),\n            required: isRequired,\n            initialValue,\n            errors: shallowRef([]),\n            bails: (_b = config === null || config === void 0 ? void 0 : config.bails) !== null && _b !== void 0 ? _b : false,\n            label: config === null || config === void 0 ? void 0 : config.label,\n            type: (config === null || config === void 0 ? void 0 : config.type) || 'default',\n            value: currentValue,\n            multiple: false,\n            __flags: {\n                pendingUnmount: { [id]: false },\n                pendingReset: false,\n            },\n            fieldsCount: 1,\n            validate: config === null || config === void 0 ? void 0 : config.validate,\n            dirty: computed(() => {\n                return !isEqual(unref(currentValue), unref(initialValue));\n            }),\n        });\n        pathStates.value.push(state);\n        pathStateLookup.value[pathValue] = state;\n        rebuildPathLookup();\n        if (errors.value[pathValue] && !initialErrors[pathValue]) {\n            nextTick(() => {\n                validateField(pathValue, { mode: 'silent' });\n            });\n        }\n        // Handles when a path changes\n        if (isRef(path)) {\n            watch(path, newPath => {\n                rebuildPathLookup();\n                const nextValue = klona(currentValue.value);\n                pathStateLookup.value[newPath] = state;\n                nextTick(() => {\n                    setInPath(formValues, newPath, nextValue);\n                });\n            });\n        }\n        return state;\n    }\n    /**\n     * Batches validation runs in 5ms batches\n     * Must have two distinct batch queues to make sure they don't override each other settings #3783\n     */\n    const debouncedSilentValidation = debounceAsync(_validateSchema, 5);\n    const debouncedValidation = debounceAsync(_validateSchema, 5);\n    const validateSchema = withLatest(async (mode) => {\n        return (await (mode === 'silent'\n            ? debouncedSilentValidation()\n            : debouncedValidation()));\n    }, (formResult, [mode]) => {\n        // fields by id lookup\n        // errors fields names, we need it to also check if custom errors are updated\n        const currentErrorsPaths = keysOf(formCtx.errorBag.value);\n        // collect all the keys from the schema and all fields\n        // this ensures we have a complete key map of all the fields\n        const paths = [\n            ...new Set([...keysOf(formResult.results), ...pathStates.value.map(p => p.path), ...currentErrorsPaths]),\n        ].sort();\n        // aggregates the paths into a single result object while applying the results on the fields\n        const results = paths.reduce((validation, _path) => {\n            var _a;\n            const expectedPath = _path;\n            const pathState = findPathState(expectedPath) || findHoistedPath(expectedPath);\n            const messages = ((_a = formResult.results[expectedPath]) === null || _a === void 0 ? void 0 : _a.errors) || [];\n            // This is the real path of the field, because it might've been a hoisted field\n            const path = (toValue(pathState === null || pathState === void 0 ? void 0 : pathState.path) || expectedPath);\n            // It is possible that multiple paths are collected across loops\n            // We want to merge them to avoid overriding any iteration's results\n            const fieldResult = mergeValidationResults({ errors: messages, valid: !messages.length }, validation.results[path]);\n            validation.results[path] = fieldResult;\n            if (!fieldResult.valid) {\n                validation.errors[path] = fieldResult.errors[0];\n            }\n            // clean up extra errors if path state exists\n            if (pathState && extraErrorsBag.value[path]) {\n                delete extraErrorsBag.value[path];\n            }\n            // field not rendered\n            if (!pathState) {\n                setFieldError(path, messages);\n                return validation;\n            }\n            // always update the valid flag regardless of the mode\n            pathState.valid = fieldResult.valid;\n            if (mode === 'silent') {\n                return validation;\n            }\n            if (mode === 'validated-only' && !pathState.validated) {\n                return validation;\n            }\n            setFieldError(pathState, fieldResult.errors);\n            return validation;\n        }, {\n            valid: formResult.valid,\n            results: {},\n            errors: {},\n            source: formResult.source,\n        });\n        if (formResult.values) {\n            results.values = formResult.values;\n            results.source = formResult.source;\n        }\n        keysOf(results.results).forEach(path => {\n            var _a;\n            const pathState = findPathState(path);\n            if (!pathState) {\n                return;\n            }\n            if (mode === 'silent') {\n                return;\n            }\n            if (mode === 'validated-only' && !pathState.validated) {\n                return;\n            }\n            setFieldError(pathState, (_a = results.results[path]) === null || _a === void 0 ? void 0 : _a.errors);\n        });\n        return results;\n    });\n    function mutateAllPathState(mutation) {\n        pathStates.value.forEach(mutation);\n    }\n    function findPathState(path) {\n        const normalizedPath = typeof path === 'string' ? normalizeFormPath(path) : path;\n        const pathState = typeof normalizedPath === 'string' ? pathStateLookup.value[normalizedPath] : normalizedPath;\n        return pathState;\n    }\n    function findHoistedPath(path) {\n        const candidates = pathStates.value.filter(state => path.startsWith(toValue(state.path)));\n        return candidates.reduce((bestCandidate, candidate) => {\n            if (!bestCandidate) {\n                return candidate;\n            }\n            return (candidate.path.length > bestCandidate.path.length ? candidate : bestCandidate);\n        }, undefined);\n    }\n    let UNSET_BATCH = [];\n    let PENDING_UNSET;\n    function unsetPathValue(path) {\n        UNSET_BATCH.push(path);\n        if (!PENDING_UNSET) {\n            PENDING_UNSET = nextTick(() => {\n                const sortedPaths = [...UNSET_BATCH].sort().reverse();\n                sortedPaths.forEach(p => {\n                    unsetPath(formValues, p);\n                });\n                UNSET_BATCH = [];\n                PENDING_UNSET = null;\n            });\n        }\n        return PENDING_UNSET;\n    }\n    function makeSubmissionFactory(onlyControlled) {\n        return function submitHandlerFactory(fn, onValidationError) {\n            return function submissionHandler(e) {\n                if (e instanceof Event) {\n                    e.preventDefault();\n                    e.stopPropagation();\n                }\n                // Touch all fields\n                mutateAllPathState(s => (s.touched = true));\n                isSubmitting.value = true;\n                submitCount.value++;\n                return validate()\n                    .then(result => {\n                    const values = klona(formValues);\n                    if (result.valid && typeof fn === 'function') {\n                        const controlled = klona(controlledValues.value);\n                        let submittedValues = (onlyControlled ? controlled : values);\n                        if (result.values) {\n                            submittedValues =\n                                result.source === 'schema'\n                                    ? result.values\n                                    : Object.assign({}, submittedValues, result.values);\n                        }\n                        return fn(submittedValues, {\n                            evt: e,\n                            controlledValues: controlled,\n                            setErrors,\n                            setFieldError,\n                            setTouched,\n                            setFieldTouched,\n                            setValues,\n                            setFieldValue,\n                            resetForm,\n                            resetField,\n                        });\n                    }\n                    if (!result.valid && typeof onValidationError === 'function') {\n                        onValidationError({\n                            values,\n                            evt: e,\n                            errors: result.errors,\n                            results: result.results,\n                        });\n                    }\n                })\n                    .then(returnVal => {\n                    isSubmitting.value = false;\n                    return returnVal;\n                }, err => {\n                    isSubmitting.value = false;\n                    // re-throw the err so it doesn't go silent\n                    throw err;\n                });\n            };\n        };\n    }\n    const handleSubmitImpl = makeSubmissionFactory(false);\n    const handleSubmit = handleSubmitImpl;\n    handleSubmit.withControlled = makeSubmissionFactory(true);\n    function removePathState(path, id) {\n        const idx = pathStates.value.findIndex(s => {\n            return s.path === path && (Array.isArray(s.id) ? s.id.includes(id) : s.id === id);\n        });\n        const pathState = pathStates.value[idx];\n        if (idx === -1 || !pathState) {\n            return;\n        }\n        nextTick(() => {\n            validateField(path, { mode: 'silent', warn: false });\n        });\n        if (pathState.multiple && pathState.fieldsCount) {\n            pathState.fieldsCount--;\n        }\n        if (Array.isArray(pathState.id)) {\n            const idIndex = pathState.id.indexOf(id);\n            if (idIndex >= 0) {\n                pathState.id.splice(idIndex, 1);\n            }\n            delete pathState.__flags.pendingUnmount[id];\n        }\n        if (!pathState.multiple || pathState.fieldsCount <= 0) {\n            pathStates.value.splice(idx, 1);\n            unsetInitialValue(path);\n            rebuildPathLookup();\n            delete pathStateLookup.value[path];\n        }\n    }\n    function destroyPath(path) {\n        keysOf(pathStateLookup.value).forEach(key => {\n            if (key.startsWith(path)) {\n                delete pathStateLookup.value[key];\n            }\n        });\n        pathStates.value = pathStates.value.filter(s => !s.path.startsWith(path));\n        nextTick(() => {\n            rebuildPathLookup();\n        });\n    }\n    const formCtx = {\n        name,\n        formId,\n        values: formValues,\n        controlledValues,\n        errorBag,\n        errors,\n        schema,\n        submitCount,\n        meta,\n        isSubmitting,\n        isValidating,\n        fieldArrays,\n        keepValuesOnUnmount,\n        validateSchema: unref(schema) ? validateSchema : undefined,\n        validate,\n        setFieldError,\n        validateField,\n        setFieldValue,\n        setValues,\n        setErrors,\n        setFieldTouched,\n        setTouched,\n        resetForm,\n        resetField,\n        handleSubmit,\n        useFieldModel,\n        defineInputBinds,\n        defineComponentBinds: defineComponentBinds,\n        defineField,\n        stageInitialValue,\n        unsetInitialValue,\n        setFieldInitialValue,\n        createPathState,\n        getPathState: findPathState,\n        unsetPathValue,\n        removePathState,\n        initialValues: initialValues,\n        getAllPathStates: () => pathStates.value,\n        destroyPath,\n        isFieldTouched,\n        isFieldDirty,\n        isFieldValid,\n    };\n    /**\n     * Sets a single field value\n     */\n    function setFieldValue(field, value, shouldValidate = true) {\n        const clonedValue = klona(value);\n        const path = typeof field === 'string' ? field : field.path;\n        const pathState = findPathState(path);\n        if (!pathState) {\n            createPathState(path);\n        }\n        setInPath(formValues, path, clonedValue);\n        if (shouldValidate) {\n            validateField(path);\n        }\n    }\n    function forceSetValues(fields, shouldValidate = true) {\n        // clean up old values\n        keysOf(formValues).forEach(key => {\n            delete formValues[key];\n        });\n        // set up new values\n        keysOf(fields).forEach(path => {\n            setFieldValue(path, fields[path], false);\n        });\n        if (shouldValidate) {\n            validate();\n        }\n    }\n    /**\n     * Sets multiple fields values\n     */\n    function setValues(fields, shouldValidate = true) {\n        merge(formValues, fields);\n        // regenerate the arrays when the form values change\n        fieldArrays.forEach(f => f && f.reset());\n        if (shouldValidate) {\n            validate();\n        }\n    }\n    function createModel(path, shouldValidate) {\n        const pathState = findPathState(toValue(path)) || createPathState(path);\n        return computed({\n            get() {\n                return pathState.value;\n            },\n            set(value) {\n                var _a;\n                const pathValue = toValue(path);\n                setFieldValue(pathValue, value, (_a = toValue(shouldValidate)) !== null && _a !== void 0 ? _a : false);\n            },\n        });\n    }\n    /**\n     * Sets the touched meta state on a field\n     */\n    function setFieldTouched(field, isTouched) {\n        const pathState = findPathState(field);\n        if (pathState) {\n            pathState.touched = isTouched;\n        }\n    }\n    function isFieldTouched(field) {\n        const pathState = findPathState(field);\n        if (pathState) {\n            return pathState.touched;\n        }\n        // Find all nested paths and consider their touched state\n        return pathStates.value.filter(s => s.path.startsWith(field)).some(s => s.touched);\n    }\n    function isFieldDirty(field) {\n        const pathState = findPathState(field);\n        if (pathState) {\n            return pathState.dirty;\n        }\n        return pathStates.value.filter(s => s.path.startsWith(field)).some(s => s.dirty);\n    }\n    function isFieldValid(field) {\n        const pathState = findPathState(field);\n        if (pathState) {\n            return pathState.valid;\n        }\n        return pathStates.value.filter(s => s.path.startsWith(field)).every(s => s.valid);\n    }\n    /**\n     * Sets the touched meta state on multiple fields\n     */\n    function setTouched(fields) {\n        if (typeof fields === 'boolean') {\n            mutateAllPathState(state => {\n                state.touched = fields;\n            });\n            return;\n        }\n        keysOf(fields).forEach(field => {\n            setFieldTouched(field, !!fields[field]);\n        });\n    }\n    function resetField(field, state) {\n        var _a;\n        const newValue = state && 'value' in state ? state.value : getFromPath(initialValues.value, field);\n        const pathState = findPathState(field);\n        if (pathState) {\n            pathState.__flags.pendingReset = true;\n        }\n        setFieldInitialValue(field, klona(newValue), true);\n        setFieldValue(field, newValue, false);\n        setFieldTouched(field, (_a = state === null || state === void 0 ? void 0 : state.touched) !== null && _a !== void 0 ? _a : false);\n        setFieldError(field, (state === null || state === void 0 ? void 0 : state.errors) || []);\n        nextTick(() => {\n            if (pathState) {\n                pathState.__flags.pendingReset = false;\n            }\n        });\n    }\n    /**\n     * Resets all fields\n     */\n    function resetForm(resetState, opts) {\n        let newValues = klona((resetState === null || resetState === void 0 ? void 0 : resetState.values) ? resetState.values : originalInitialValues.value);\n        newValues = (opts === null || opts === void 0 ? void 0 : opts.force) ? newValues : merge(originalInitialValues.value, newValues);\n        newValues = isTypedSchema(schema) && isCallable(schema.cast) ? schema.cast(newValues) : newValues;\n        setInitialValues(newValues, { force: opts === null || opts === void 0 ? void 0 : opts.force });\n        mutateAllPathState(state => {\n            var _a;\n            state.__flags.pendingReset = true;\n            state.validated = false;\n            state.touched = ((_a = resetState === null || resetState === void 0 ? void 0 : resetState.touched) === null || _a === void 0 ? void 0 : _a[toValue(state.path)]) || false;\n            setFieldValue(toValue(state.path), getFromPath(newValues, toValue(state.path)), false);\n            setFieldError(toValue(state.path), undefined);\n        });\n        (opts === null || opts === void 0 ? void 0 : opts.force) ? forceSetValues(newValues, false) : setValues(newValues, false);\n        setErrors((resetState === null || resetState === void 0 ? void 0 : resetState.errors) || {});\n        submitCount.value = (resetState === null || resetState === void 0 ? void 0 : resetState.submitCount) || 0;\n        nextTick(() => {\n            validate({ mode: 'silent' });\n            mutateAllPathState(state => {\n                state.__flags.pendingReset = false;\n            });\n        });\n    }\n    async function validate(opts) {\n        const mode = (opts === null || opts === void 0 ? void 0 : opts.mode) || 'force';\n        if (mode === 'force') {\n            mutateAllPathState(f => (f.validated = true));\n        }\n        if (formCtx.validateSchema) {\n            return formCtx.validateSchema(mode);\n        }\n        isValidating.value = true;\n        // No schema, each field is responsible to validate itself\n        const validations = await Promise.all(pathStates.value.map(state => {\n            if (!state.validate) {\n                return Promise.resolve({\n                    key: toValue(state.path),\n                    valid: true,\n                    errors: [],\n                    value: undefined,\n                });\n            }\n            return state.validate(opts).then(result => {\n                return {\n                    key: toValue(state.path),\n                    valid: result.valid,\n                    errors: result.errors,\n                    value: result.value,\n                };\n            });\n        }));\n        isValidating.value = false;\n        const results = {};\n        const errors = {};\n        const values = {};\n        for (const validation of validations) {\n            results[validation.key] = {\n                valid: validation.valid,\n                errors: validation.errors,\n            };\n            if (validation.value) {\n                setInPath(values, validation.key, validation.value);\n            }\n            if (validation.errors.length) {\n                errors[validation.key] = validation.errors[0];\n            }\n        }\n        return {\n            valid: validations.every(r => r.valid),\n            results,\n            errors,\n            values,\n            source: 'fields',\n        };\n    }\n    async function validateField(path, opts) {\n        var _a;\n        const state = findPathState(path);\n        if (state && (opts === null || opts === void 0 ? void 0 : opts.mode) !== 'silent') {\n            state.validated = true;\n        }\n        if (schema) {\n            const { results } = await validateSchema((opts === null || opts === void 0 ? void 0 : opts.mode) || 'validated-only');\n            return results[path] || { errors: [], valid: true };\n        }\n        if (state === null || state === void 0 ? void 0 : state.validate) {\n            return state.validate(opts);\n        }\n        const shouldWarn = !state && ((_a = opts === null || opts === void 0 ? void 0 : opts.warn) !== null && _a !== void 0 ? _a : true);\n        if (shouldWarn) {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn$1(`field with path ${path} was not found`);\n            }\n        }\n        return Promise.resolve({ errors: [], valid: true });\n    }\n    function unsetInitialValue(path) {\n        unsetPath(initialValues.value, path);\n    }\n    /**\n     * Sneaky function to set initial field values\n     */\n    function stageInitialValue(path, value, updateOriginal = false) {\n        setFieldInitialValue(path, value);\n        setInPath(formValues, path, value);\n        if (updateOriginal && !(opts === null || opts === void 0 ? void 0 : opts.initialValues)) {\n            setInPath(originalInitialValues.value, path, klona(value));\n        }\n    }\n    function setFieldInitialValue(path, value, updateOriginal = false) {\n        setInPath(initialValues.value, path, klona(value));\n        if (updateOriginal) {\n            setInPath(originalInitialValues.value, path, klona(value));\n        }\n    }\n    async function _validateSchema() {\n        const schemaValue = unref(schema);\n        if (!schemaValue) {\n            return { valid: true, results: {}, errors: {}, source: 'none' };\n        }\n        isValidating.value = true;\n        const formResult = isYupValidator(schemaValue) || isTypedSchema(schemaValue)\n            ? await validateTypedSchema(schemaValue, formValues)\n            : await validateObjectSchema(schemaValue, formValues, {\n                names: fieldNames.value,\n                bailsMap: fieldBailsMap.value,\n            });\n        isValidating.value = false;\n        return formResult;\n    }\n    const submitForm = handleSubmit((_, { evt }) => {\n        if (isFormSubmitEvent(evt)) {\n            evt.target.submit();\n        }\n    });\n    // Trigger initial validation\n    onMounted(() => {\n        if (opts === null || opts === void 0 ? void 0 : opts.initialErrors) {\n            setErrors(opts.initialErrors);\n        }\n        if (opts === null || opts === void 0 ? void 0 : opts.initialTouched) {\n            setTouched(opts.initialTouched);\n        }\n        // if validate on mount was enabled\n        if (opts === null || opts === void 0 ? void 0 : opts.validateOnMount) {\n            validate();\n            return;\n        }\n        // otherwise run initial silent validation through schema if available\n        // the useField should skip their own silent validation if a yup schema is present\n        if (formCtx.validateSchema) {\n            formCtx.validateSchema('silent');\n        }\n    });\n    if (isRef(schema)) {\n        watch(schema, () => {\n            var _a;\n            (_a = formCtx.validateSchema) === null || _a === void 0 ? void 0 : _a.call(formCtx, 'validated-only');\n        });\n    }\n    // Provide injections\n    provide(FormContextKey, formCtx);\n    if ((process.env.NODE_ENV !== 'production')) {\n        registerFormWithDevTools(formCtx);\n        watch(() => (Object.assign(Object.assign({ errors: errorBag.value }, meta.value), { values: formValues, isSubmitting: isSubmitting.value, isValidating: isValidating.value, submitCount: submitCount.value })), refreshInspector, {\n            deep: true,\n        });\n    }\n    function defineField(path, config) {\n        const label = isCallable(config) ? undefined : config === null || config === void 0 ? void 0 : config.label;\n        const pathState = (findPathState(toValue(path)) || createPathState(path, { label }));\n        const evalConfig = () => (isCallable(config) ? config(omit(pathState, PRIVATE_PATH_STATE_KEYS)) : config || {});\n        function onBlur() {\n            var _a;\n            pathState.touched = true;\n            const validateOnBlur = (_a = evalConfig().validateOnBlur) !== null && _a !== void 0 ? _a : getConfig().validateOnBlur;\n            if (validateOnBlur) {\n                validateField(toValue(pathState.path));\n            }\n        }\n        function onInput() {\n            var _a;\n            const validateOnInput = (_a = evalConfig().validateOnInput) !== null && _a !== void 0 ? _a : getConfig().validateOnInput;\n            if (validateOnInput) {\n                nextTick(() => {\n                    validateField(toValue(pathState.path));\n                });\n            }\n        }\n        function onChange() {\n            var _a;\n            const validateOnChange = (_a = evalConfig().validateOnChange) !== null && _a !== void 0 ? _a : getConfig().validateOnChange;\n            if (validateOnChange) {\n                nextTick(() => {\n                    validateField(toValue(pathState.path));\n                });\n            }\n        }\n        const props = computed(() => {\n            const base = {\n                onChange,\n                onInput,\n                onBlur,\n            };\n            if (isCallable(config)) {\n                return Object.assign(Object.assign({}, base), (config(omit(pathState, PRIVATE_PATH_STATE_KEYS)).props || {}));\n            }\n            if (config === null || config === void 0 ? void 0 : config.props) {\n                return Object.assign(Object.assign({}, base), config.props(omit(pathState, PRIVATE_PATH_STATE_KEYS)));\n            }\n            return base;\n        });\n        const model = createModel(path, () => { var _a, _b, _c; return (_c = (_a = evalConfig().validateOnModelUpdate) !== null && _a !== void 0 ? _a : (_b = getConfig()) === null || _b === void 0 ? void 0 : _b.validateOnModelUpdate) !== null && _c !== void 0 ? _c : true; });\n        return [model, props];\n    }\n    function useFieldModel(pathOrPaths) {\n        if (!Array.isArray(pathOrPaths)) {\n            return createModel(pathOrPaths);\n        }\n        return pathOrPaths.map(p => createModel(p, true));\n    }\n    /**\n     * @deprecated use defineField instead\n     */\n    function defineInputBinds(path, config) {\n        const [model, props] = defineField(path, config);\n        function onBlur() {\n            props.value.onBlur();\n        }\n        function onInput(e) {\n            const value = normalizeEventValue(e);\n            setFieldValue(toValue(path), value, false);\n            props.value.onInput();\n        }\n        function onChange(e) {\n            const value = normalizeEventValue(e);\n            setFieldValue(toValue(path), value, false);\n            props.value.onChange();\n        }\n        return computed(() => {\n            return Object.assign(Object.assign({}, props.value), { onBlur,\n                onInput,\n                onChange, value: model.value });\n        });\n    }\n    /**\n     * @deprecated use defineField instead\n     */\n    function defineComponentBinds(path, config) {\n        const [model, props] = defineField(path, config);\n        const pathState = findPathState(toValue(path));\n        function onUpdateModelValue(value) {\n            model.value = value;\n        }\n        return computed(() => {\n            const conf = isCallable(config) ? config(omit(pathState, PRIVATE_PATH_STATE_KEYS)) : config || {};\n            return Object.assign({ [conf.model || 'modelValue']: model.value, [`onUpdate:${conf.model || 'modelValue'}`]: onUpdateModelValue }, props.value);\n        });\n    }\n    const ctx = Object.assign(Object.assign({}, formCtx), { values: readonly(formValues), handleReset: () => resetForm(), submitForm });\n    provide(PublicFormContextKey, ctx);\n    return ctx;\n}\n/**\n * Manages form meta aggregation\n */\nfunction useFormMeta(pathsState, currentValues, initialValues, errors) {\n    const MERGE_STRATEGIES = {\n        touched: 'some',\n        pending: 'some',\n        valid: 'every',\n    };\n    const isDirty = computed(() => {\n        return !isEqual(currentValues, unref(initialValues));\n    });\n    function calculateFlags() {\n        const states = pathsState.value;\n        return keysOf(MERGE_STRATEGIES).reduce((acc, flag) => {\n            const mergeMethod = MERGE_STRATEGIES[flag];\n            acc[flag] = states[mergeMethod](s => s[flag]);\n            return acc;\n        }, {});\n    }\n    const flags = reactive(calculateFlags());\n    watchEffect(() => {\n        const value = calculateFlags();\n        flags.touched = value.touched;\n        flags.valid = value.valid;\n        flags.pending = value.pending;\n    });\n    return computed(() => {\n        return Object.assign(Object.assign({ initialValues: unref(initialValues) }, flags), { valid: flags.valid && !keysOf(errors.value).length, dirty: isDirty.value });\n    });\n}\n/**\n * Manages the initial values prop\n */\nfunction useFormInitialValues(pathsState, formValues, opts) {\n    const values = resolveInitialValues(opts);\n    // these are the mutable initial values as the fields are mounted/unmounted\n    const initialValues = ref(values);\n    // these are the original initial value as provided by the user initially, they don't keep track of conditional fields\n    // this is important because some conditional fields will overwrite the initial values for other fields who had the same name\n    // like array fields, any push/insert operation will overwrite the initial values because they \"create new fields\"\n    // so these are the values that the reset function should use\n    // these only change when the user explicitly changes the initial values or when the user resets them with new values.\n    const originalInitialValues = ref(klona(values));\n    function setInitialValues(values, opts) {\n        if (opts === null || opts === void 0 ? void 0 : opts.force) {\n            initialValues.value = klona(values);\n            originalInitialValues.value = klona(values);\n        }\n        else {\n            initialValues.value = merge(klona(initialValues.value) || {}, klona(values));\n            originalInitialValues.value = merge(klona(originalInitialValues.value) || {}, klona(values));\n        }\n        if (!(opts === null || opts === void 0 ? void 0 : opts.updateFields)) {\n            return;\n        }\n        // update the pristine non-touched fields\n        // those are excluded because it's unlikely you want to change the form values using initial values\n        // we mostly watch them for API population or newly inserted fields\n        // if the user API is taking too much time before user interaction they should consider disabling or hiding their inputs until the values are ready\n        pathsState.value.forEach(state => {\n            const wasTouched = state.touched;\n            if (wasTouched) {\n                return;\n            }\n            const newValue = getFromPath(initialValues.value, toValue(state.path));\n            setInPath(formValues, toValue(state.path), klona(newValue));\n        });\n    }\n    return {\n        initialValues,\n        originalInitialValues,\n        setInitialValues,\n    };\n}\nfunction mergeValidationResults(a, b) {\n    if (!b) {\n        return a;\n    }\n    return {\n        valid: a.valid && b.valid,\n        errors: [...a.errors, ...b.errors],\n    };\n}\nfunction useFormContext() {\n    return inject(PublicFormContextKey);\n}\n\nconst FormImpl = /** #__PURE__ */ defineComponent({\n    name: 'Form',\n    inheritAttrs: false,\n    props: {\n        as: {\n            type: null,\n            default: 'form',\n        },\n        validationSchema: {\n            type: Object,\n            default: undefined,\n        },\n        initialValues: {\n            type: Object,\n            default: undefined,\n        },\n        initialErrors: {\n            type: Object,\n            default: undefined,\n        },\n        initialTouched: {\n            type: Object,\n            default: undefined,\n        },\n        validateOnMount: {\n            type: Boolean,\n            default: false,\n        },\n        onSubmit: {\n            type: Function,\n            default: undefined,\n        },\n        onInvalidSubmit: {\n            type: Function,\n            default: undefined,\n        },\n        keepValues: {\n            type: Boolean,\n            default: false,\n        },\n        name: {\n            type: String,\n            default: 'Form',\n        },\n    },\n    setup(props, ctx) {\n        const validationSchema = toRef(props, 'validationSchema');\n        const keepValues = toRef(props, 'keepValues');\n        const { errors, errorBag, values, meta, isSubmitting, isValidating, submitCount, controlledValues, validate, validateField, handleReset, resetForm, handleSubmit, setErrors, setFieldError, setFieldValue, setValues, setFieldTouched, setTouched, resetField, } = useForm({\n            validationSchema: validationSchema.value ? validationSchema : undefined,\n            initialValues: props.initialValues,\n            initialErrors: props.initialErrors,\n            initialTouched: props.initialTouched,\n            validateOnMount: props.validateOnMount,\n            keepValuesOnUnmount: keepValues,\n            name: props.name,\n        });\n        const submitForm = handleSubmit((_, { evt }) => {\n            if (isFormSubmitEvent(evt)) {\n                evt.target.submit();\n            }\n        }, props.onInvalidSubmit);\n        const onSubmit = props.onSubmit ? handleSubmit(props.onSubmit, props.onInvalidSubmit) : submitForm;\n        function handleFormReset(e) {\n            if (isEvent(e)) {\n                // Prevent default form reset behavior\n                e.preventDefault();\n            }\n            handleReset();\n            if (typeof ctx.attrs.onReset === 'function') {\n                ctx.attrs.onReset();\n            }\n        }\n        function handleScopedSlotSubmit(evt, onSubmit) {\n            const onSuccess = typeof evt === 'function' && !onSubmit ? evt : onSubmit;\n            return handleSubmit(onSuccess, props.onInvalidSubmit)(evt);\n        }\n        function getValues() {\n            return klona(values);\n        }\n        function getMeta() {\n            return klona(meta.value);\n        }\n        function getErrors() {\n            return klona(errors.value);\n        }\n        function slotProps() {\n            return {\n                meta: meta.value,\n                errors: errors.value,\n                errorBag: errorBag.value,\n                values,\n                isSubmitting: isSubmitting.value,\n                isValidating: isValidating.value,\n                submitCount: submitCount.value,\n                controlledValues: controlledValues.value,\n                validate,\n                validateField,\n                handleSubmit: handleScopedSlotSubmit,\n                handleReset,\n                submitForm,\n                setErrors,\n                setFieldError,\n                setFieldValue,\n                setValues,\n                setFieldTouched,\n                setTouched,\n                resetForm,\n                resetField,\n                getValues,\n                getMeta,\n                getErrors,\n            };\n        }\n        // expose these functions and methods as part of public API\n        ctx.expose({\n            setFieldError,\n            setErrors,\n            setFieldValue,\n            setValues,\n            setFieldTouched,\n            setTouched,\n            resetForm,\n            validate,\n            validateField,\n            resetField,\n            getValues,\n            getMeta,\n            getErrors,\n            values,\n            meta,\n            errors,\n        });\n        return function renderForm() {\n            // avoid resolving the form component as itself\n            const tag = props.as === 'form' ? props.as : !props.as ? null : resolveDynamicComponent(props.as);\n            const children = normalizeChildren(tag, ctx, slotProps);\n            if (!tag) {\n                return children;\n            }\n            // Attributes to add on a native `form` tag\n            const formAttrs = tag === 'form'\n                ? {\n                    // Disables native validation as vee-validate will handle it.\n                    novalidate: true,\n                }\n                : {};\n            return h(tag, Object.assign(Object.assign(Object.assign({}, formAttrs), ctx.attrs), { onSubmit, onReset: handleFormReset }), children);\n        };\n    },\n});\nconst Form = FormImpl;\n\nfunction useFieldArray(arrayPath) {\n    const form = injectWithSelf(FormContextKey, undefined);\n    const fields = ref([]);\n    const noOp = () => { };\n    const noOpApi = {\n        fields,\n        remove: noOp,\n        push: noOp,\n        swap: noOp,\n        insert: noOp,\n        update: noOp,\n        replace: noOp,\n        prepend: noOp,\n        move: noOp,\n    };\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('FieldArray requires being a child of `<Form/>` or `useForm` being called before it. Array fields may not work correctly');\n        }\n        return noOpApi;\n    }\n    if (!unref(arrayPath)) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('FieldArray requires a field path to be provided, did you forget to pass the `name` prop?');\n        }\n        return noOpApi;\n    }\n    const alreadyExists = form.fieldArrays.find(a => unref(a.path) === unref(arrayPath));\n    if (alreadyExists) {\n        return alreadyExists;\n    }\n    let entryCounter = 0;\n    function getCurrentValues() {\n        return getFromPath(form === null || form === void 0 ? void 0 : form.values, toValue(arrayPath), []) || [];\n    }\n    function initFields() {\n        const currentValues = getCurrentValues();\n        if (!Array.isArray(currentValues)) {\n            return;\n        }\n        fields.value = currentValues.map((v, idx) => createEntry(v, idx, fields.value));\n        updateEntryFlags();\n    }\n    initFields();\n    function updateEntryFlags() {\n        const fieldsLength = fields.value.length;\n        for (let i = 0; i < fieldsLength; i++) {\n            const entry = fields.value[i];\n            entry.isFirst = i === 0;\n            entry.isLast = i === fieldsLength - 1;\n        }\n    }\n    function createEntry(value, idx, currentFields) {\n        // Skips the work by returning the current entry if it already exists\n        // This should make the `key` prop stable and doesn't cause more re-renders than needed\n        // The value is computed and should update anyways\n        if (currentFields && !isNullOrUndefined(idx) && currentFields[idx]) {\n            return currentFields[idx];\n        }\n        const key = entryCounter++;\n        const entry = {\n            key,\n            value: computedDeep({\n                get() {\n                    const currentValues = getFromPath(form === null || form === void 0 ? void 0 : form.values, toValue(arrayPath), []) || [];\n                    const idx = fields.value.findIndex(e => e.key === key);\n                    return idx === -1 ? value : currentValues[idx];\n                },\n                set(value) {\n                    const idx = fields.value.findIndex(e => e.key === key);\n                    if (idx === -1) {\n                        if ((process.env.NODE_ENV !== 'production')) {\n                            warn(`Attempting to update a non-existent array item`);\n                        }\n                        return;\n                    }\n                    update(idx, value);\n                },\n            }), // will be auto unwrapped\n            isFirst: false,\n            isLast: false,\n        };\n        return entry;\n    }\n    function afterMutation() {\n        updateEntryFlags();\n        // Should trigger a silent validation since a field may not do that #4096\n        form === null || form === void 0 ? void 0 : form.validate({ mode: 'silent' });\n    }\n    function remove(idx) {\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        if (!pathValue || !Array.isArray(pathValue)) {\n            return;\n        }\n        const newValue = [...pathValue];\n        newValue.splice(idx, 1);\n        const fieldPath = pathName + `[${idx}]`;\n        form.destroyPath(fieldPath);\n        form.unsetInitialValue(fieldPath);\n        setInPath(form.values, pathName, newValue);\n        fields.value.splice(idx, 1);\n        afterMutation();\n    }\n    function push(initialValue) {\n        const value = klona(initialValue);\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        const normalizedPathValue = isNullOrUndefined(pathValue) ? [] : pathValue;\n        if (!Array.isArray(normalizedPathValue)) {\n            return;\n        }\n        const newValue = [...normalizedPathValue];\n        newValue.push(value);\n        form.stageInitialValue(pathName + `[${newValue.length - 1}]`, value);\n        setInPath(form.values, pathName, newValue);\n        fields.value.push(createEntry(value));\n        afterMutation();\n    }\n    function swap(indexA, indexB) {\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        if (!Array.isArray(pathValue) || !(indexA in pathValue) || !(indexB in pathValue)) {\n            return;\n        }\n        const newValue = [...pathValue];\n        const newFields = [...fields.value];\n        // the old switcheroo\n        const temp = newValue[indexA];\n        newValue[indexA] = newValue[indexB];\n        newValue[indexB] = temp;\n        const tempEntry = newFields[indexA];\n        newFields[indexA] = newFields[indexB];\n        newFields[indexB] = tempEntry;\n        setInPath(form.values, pathName, newValue);\n        fields.value = newFields;\n        updateEntryFlags();\n    }\n    function insert(idx, initialValue) {\n        const value = klona(initialValue);\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        if (!Array.isArray(pathValue) || pathValue.length < idx) {\n            return;\n        }\n        const newValue = [...pathValue];\n        const newFields = [...fields.value];\n        newValue.splice(idx, 0, value);\n        newFields.splice(idx, 0, createEntry(value));\n        setInPath(form.values, pathName, newValue);\n        fields.value = newFields;\n        afterMutation();\n    }\n    function replace(arr) {\n        const pathName = toValue(arrayPath);\n        form.stageInitialValue(pathName, arr);\n        setInPath(form.values, pathName, arr);\n        initFields();\n        afterMutation();\n    }\n    function update(idx, value) {\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        if (!Array.isArray(pathValue) || pathValue.length - 1 < idx) {\n            return;\n        }\n        setInPath(form.values, `${pathName}[${idx}]`, value);\n        form === null || form === void 0 ? void 0 : form.validate({ mode: 'validated-only' });\n    }\n    function prepend(initialValue) {\n        const value = klona(initialValue);\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        const normalizedPathValue = isNullOrUndefined(pathValue) ? [] : pathValue;\n        if (!Array.isArray(normalizedPathValue)) {\n            return;\n        }\n        const newValue = [value, ...normalizedPathValue];\n        setInPath(form.values, pathName, newValue);\n        form.stageInitialValue(pathName + `[0]`, value);\n        fields.value.unshift(createEntry(value));\n        afterMutation();\n    }\n    function move(oldIdx, newIdx) {\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        const newValue = isNullOrUndefined(pathValue) ? [] : [...pathValue];\n        if (!Array.isArray(pathValue) || !(oldIdx in pathValue) || !(newIdx in pathValue)) {\n            return;\n        }\n        const newFields = [...fields.value];\n        const movedItem = newFields[oldIdx];\n        newFields.splice(oldIdx, 1);\n        newFields.splice(newIdx, 0, movedItem);\n        const movedValue = newValue[oldIdx];\n        newValue.splice(oldIdx, 1);\n        newValue.splice(newIdx, 0, movedValue);\n        setInPath(form.values, pathName, newValue);\n        fields.value = newFields;\n        afterMutation();\n    }\n    const fieldArrayCtx = {\n        fields,\n        remove,\n        push,\n        swap,\n        insert,\n        update,\n        replace,\n        prepend,\n        move,\n    };\n    form.fieldArrays.push(Object.assign({ path: arrayPath, reset: initFields }, fieldArrayCtx));\n    onBeforeUnmount(() => {\n        const idx = form.fieldArrays.findIndex(i => toValue(i.path) === toValue(arrayPath));\n        if (idx >= 0) {\n            form.fieldArrays.splice(idx, 1);\n        }\n    });\n    // Makes sure to sync the form values with the array value if they go out of sync\n    // #4153\n    watch(getCurrentValues, formValues => {\n        const fieldsValues = fields.value.map(f => f.value);\n        // If form values are not the same as the current values then something overrode them.\n        if (!isEqual(formValues, fieldsValues)) {\n            initFields();\n        }\n    });\n    return fieldArrayCtx;\n}\n\nconst FieldArrayImpl = /** #__PURE__ */ defineComponent({\n    name: 'FieldArray',\n    inheritAttrs: false,\n    props: {\n        name: {\n            type: String,\n            required: true,\n        },\n    },\n    setup(props, ctx) {\n        const { push, remove, swap, insert, replace, update, prepend, move, fields } = useFieldArray(() => props.name);\n        function slotProps() {\n            return {\n                fields: fields.value,\n                push,\n                remove,\n                swap,\n                insert,\n                update,\n                replace,\n                prepend,\n                move,\n            };\n        }\n        ctx.expose({\n            push,\n            remove,\n            swap,\n            insert,\n            update,\n            replace,\n            prepend,\n            move,\n        });\n        return () => {\n            const children = normalizeChildren(undefined, ctx, slotProps);\n            return children;\n        };\n    },\n});\nconst FieldArray = FieldArrayImpl;\n\nconst ErrorMessageImpl = /** #__PURE__ */ defineComponent({\n    name: 'ErrorMessage',\n    props: {\n        as: {\n            type: String,\n            default: undefined,\n        },\n        name: {\n            type: String,\n            required: true,\n        },\n    },\n    setup(props, ctx) {\n        const form = inject(FormContextKey, undefined);\n        const message = computed(() => {\n            return form === null || form === void 0 ? void 0 : form.errors.value[props.name];\n        });\n        function slotProps() {\n            return {\n                message: message.value,\n            };\n        }\n        return () => {\n            // Renders nothing if there are no messages\n            if (!message.value) {\n                return undefined;\n            }\n            const tag = (props.as ? resolveDynamicComponent(props.as) : props.as);\n            const children = normalizeChildren(tag, ctx, slotProps);\n            const attrs = Object.assign({ role: 'alert' }, ctx.attrs);\n            // If no tag was specified and there are children\n            // render the slot as is without wrapping it\n            if (!tag && (Array.isArray(children) || !children) && (children === null || children === void 0 ? void 0 : children.length)) {\n                return children;\n            }\n            // If no children in slot\n            // render whatever specified and fallback to a <span> with the message in it's contents\n            if ((Array.isArray(children) || !children) && !(children === null || children === void 0 ? void 0 : children.length)) {\n                return h(tag || 'span', attrs, message.value);\n            }\n            return h(tag, attrs, children);\n        };\n    },\n});\nconst ErrorMessage = ErrorMessageImpl;\n\nfunction useResetForm() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return function resetForm(state, opts) {\n        if (!form) {\n            return;\n        }\n        return form.resetForm(state, opts);\n    };\n}\n\n/**\n * If a field is dirty or not\n */\nfunction useIsFieldDirty(path) {\n    const fieldOrPath = resolveFieldOrPathState(path);\n    return computed(() => {\n        var _a, _b;\n        if (!fieldOrPath) {\n            return false;\n        }\n        return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.dirty : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.dirty)) !== null && _b !== void 0 ? _b : false;\n    });\n}\n\n/**\n * If a field is touched or not\n */\nfunction useIsFieldTouched(path) {\n    const fieldOrPath = resolveFieldOrPathState(path);\n    return computed(() => {\n        var _a, _b;\n        if (!fieldOrPath) {\n            return false;\n        }\n        return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.touched : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.touched)) !== null && _b !== void 0 ? _b : false;\n    });\n}\n\n/**\n * If a field is validated and is valid\n */\nfunction useIsFieldValid(path) {\n    const fieldOrPath = resolveFieldOrPathState(path);\n    return computed(() => {\n        var _a, _b;\n        if (!fieldOrPath) {\n            return false;\n        }\n        return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.valid : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.valid)) !== null && _b !== void 0 ? _b : false;\n    });\n}\n\n/**\n * If the form is submitting or not\n */\nfunction useIsSubmitting() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.isSubmitting.value) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * If the form is validating or not\n */\nfunction useIsValidating() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.isValidating.value) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * Validates a single field\n */\nfunction useValidateField(path) {\n    const form = injectWithSelf(FormContextKey);\n    const field = path ? undefined : inject(FieldContextKey);\n    return function validateField() {\n        if (field) {\n            return field.validate();\n        }\n        if (form && path) {\n            return form === null || form === void 0 ? void 0 : form.validateField(toValue(path));\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`field with name ${unref(path)} was not found`);\n        }\n        return Promise.resolve({\n            errors: [],\n            valid: true,\n        });\n    };\n}\n\n/**\n * If the form is dirty or not\n */\nfunction useIsFormDirty() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.meta.value.dirty) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * If the form is touched or not\n */\nfunction useIsFormTouched() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.meta.value.touched) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * If the form has been validated and is valid\n */\nfunction useIsFormValid() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.meta.value.valid) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * Validate multiple fields\n */\nfunction useValidateForm() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return function validateField() {\n        if (!form) {\n            return Promise.resolve({ results: {}, errors: {}, valid: true, source: 'none' });\n        }\n        return form.validate();\n    };\n}\n\n/**\n * The number of form's submission count\n */\nfunction useSubmitCount() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.submitCount.value) !== null && _a !== void 0 ? _a : 0;\n    });\n}\n\n/**\n * Gives access to a field's current value\n */\nfunction useFieldValue(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return computed(() => {\n        if (path) {\n            return getFromPath(form === null || form === void 0 ? void 0 : form.values, toValue(path));\n        }\n        return toValue(field === null || field === void 0 ? void 0 : field.value);\n    });\n}\n\n/**\n * Gives access to a form's values\n */\nfunction useFormValues() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        return (form === null || form === void 0 ? void 0 : form.values) || {};\n    });\n}\n\n/**\n * Gives access to all form errors\n */\nfunction useFormErrors() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        return ((form === null || form === void 0 ? void 0 : form.errors.value) || {});\n    });\n}\n\n/**\n * Gives access to a single field error\n */\nfunction useFieldError(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return computed(() => {\n        if (path) {\n            return form === null || form === void 0 ? void 0 : form.errors.value[toValue(path)];\n        }\n        return field === null || field === void 0 ? void 0 : field.errorMessage.value;\n    });\n}\n\nfunction useSubmitForm(cb) {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    const onSubmit = form ? form.handleSubmit(cb) : undefined;\n    return function submitForm(e) {\n        if (!onSubmit) {\n            return;\n        }\n        return onSubmit(e);\n    };\n}\n\n/**\n * Sets a field's error message\n */\nfunction useSetFieldError(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return function setFieldError(message) {\n        if (path && form) {\n            form.setFieldError(toValue(path), message);\n            return;\n        }\n        if (field) {\n            field.setErrors(message || []);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set error message since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n        }\n    };\n}\n\n/**\n * Sets a field's touched meta state\n */\nfunction useSetFieldTouched(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return function setFieldTouched(touched) {\n        if (path && form) {\n            form.setFieldTouched(toValue(path), touched);\n            return;\n        }\n        if (field) {\n            field.setTouched(touched);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set touched state since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n        }\n    };\n}\n\n/**\n * Sets a field's value\n */\nfunction useSetFieldValue(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return function setFieldValue(value, shouldValidate = true) {\n        if (path && form) {\n            form.setFieldValue(toValue(path), value, shouldValidate);\n            return;\n        }\n        if (field) {\n            field.setValue(value, shouldValidate);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set value since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n        }\n    };\n}\n\n/**\n * Sets multiple fields errors\n */\nfunction useSetFormErrors() {\n    const form = injectWithSelf(FormContextKey);\n    function setFormErrors(fields) {\n        if (form) {\n            form.setErrors(fields);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set errors because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n        }\n    }\n    return setFormErrors;\n}\n\n/**\n * Sets multiple fields touched or all fields in the form\n */\nfunction useSetFormTouched() {\n    const form = injectWithSelf(FormContextKey);\n    function setFormTouched(fields) {\n        if (form) {\n            form.setTouched(fields);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set touched state because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n        }\n    }\n    return setFormTouched;\n}\n\n/**\n * Sets multiple fields values\n */\nfunction useSetFormValues() {\n    const form = injectWithSelf(FormContextKey);\n    function setFormValues(fields, shouldValidate = true) {\n        if (form) {\n            form.setValues(fields, shouldValidate);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set form values because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n        }\n    }\n    return setFormValues;\n}\n\nexport { ErrorMessage, Field, FieldArray, FieldContextKey, Form, FormContextKey, IS_ABSENT, PublicFormContextKey, cleanupNonNestedPath, configure, defineRule, isNotNestedPath, normalizeRules, useField, useFieldArray, useFieldError, useFieldValue, useForm, useFormContext, useFormErrors, useFormValues, useIsFieldDirty, useIsFieldTouched, useIsFieldValid, useIsFormDirty, useIsFormTouched, useIsFormValid, useIsSubmitting, useIsValidating, useResetForm, useSetFieldError, useSetFieldTouched, useSetFieldValue, useSetFormErrors, useSetFormTouched, useSetFormValues, useSubmitCount, useSubmitForm, useValidateField, useValidateForm, validate, validateObjectSchema as validateObject };\n","export const bigInt=()=>(async e=>{try{return(await WebAssembly.instantiate(e)).instance.exports.b(BigInt(0))===BigInt(0)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,126,1,126,3,2,1,0,7,5,1,1,98,0,0,10,6,1,4,0,32,0,11])),bulkMemory=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),exceptions=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),exceptionsFinal=()=>(async()=>{try{return new WebAssembly.Module(Uint8Array.from(atob(\"AGFzbQEAAAABBAFgAAADAgEAChABDgACaR9AAQMAAAsACxoL\"),(e=>e.codePointAt(0)))),!0}catch(e){return!1}})(),extendedConst=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,0,1,11,9,1,0,65,1,65,2,106,11,0])),gc=()=>(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,95,1,120,0])))(),jsStringBuiltins=()=>(async()=>{try{return await WebAssembly.instantiate(Uint8Array.from(atob(\"AGFzbQEAAAABBgFgAW8BfwIXAQ53YXNtOmpzLXN0cmluZwR0ZXN0AAA=\"),(e=>e.codePointAt(0))),{},{builtins:[\"js-string\"]}),!0}catch(e){return!1}})(),jspi=()=>(async()=>\"Suspending\"in WebAssembly)(),memory64=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,4,1])),multiMemory=()=>(async()=>{try{return new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,5,5,2,0,0,0,0])),!0}catch(e){return!1}})(),multiValue=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11])),mutableGlobals=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),referenceTypes=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),relaxedSimd=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,15,1,13,0,65,1,253,15,65,2,253,15,253,128,2,11])),saturatedFloatToInt=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),signExtensions=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),simd=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),streamingCompilation=()=>(async()=>\"compileStreaming\"in WebAssembly)(),tailCall=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11])),threads=()=>(async e=>{try{return\"undefined\"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),typeReflection=()=>(async()=>\"Function\"in WebAssembly)(),typedFunctionReferences=()=>(async()=>{try{return new WebAssembly.Module(Uint8Array.from(atob(\"AGFzbQEAAAABEANgAX8Bf2ABZAABf2AAAX8DBAMBAAIJBQEDAAEBChwDCwBBCkEqIAAUAGoLBwAgAEEBagsGANIBEAAL\"),(e=>e.codePointAt(0)))),!0}catch(e){return!1}})(),wideArithmetic=()=>(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,10,1,96,4,126,126,126,126,2,126,126,3,2,1,0,10,14,1,12,0,32,0,32,1,32,2,32,3,252,19,11])))();\n"],"names":["String","Array","i","arguments","b","Math","Date","f","v","Number","t","c","h","e","r","Error","m","n","Intl","parseInt","s","JSON","window","document","Set","URLSearchParams","console","Promise","globalThis","google","Object","Uint8Array","a","RegExp","Map","Symbol","WeakMap","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","ArrayBuffer","isNaN","SuppressedError","DOMParser","btoa","requestAnimationFrame","Reflect","Boolean","BigInt","TypeError","Function","Event","File","clearTimeout","setTimeout","l","p","parseFloat","o","WebAssembly","MessageChannel","SharedArrayBuffer"],"mappings":"wHAAoE,EAAO,OAAO,CAAC,AAA2H,WAAW,aAAa,IAAuB,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,OAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,6FAA6F,EAAE,uFAAkY,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAEA,OAAO,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