UNPKG

@passageidentity/passage-js

Version:

Passage Complete for Web - Build a full custom passwordless authentication experience in any modern web app with Passage by 1Password.

10 lines 143 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Sn=require("@passageidentity/webauthnutils"),za=require("jwt-decode"),l_=require("async-mutex"),p_=require("serialize-error");class Fe{static encodeBytes(a){const o=btoa(String.fromCharCode(...new Uint8Array(a))).replace(/\+/g,"-").replace(/\//g,"_");return Eu(o)}static decodeBytes(a){const o=a.replace(/-/g,"+").replace(/_/g,"/"),l=Eu(o);return Uint8Array.from(atob(l),f=>f.charCodeAt(0))}}const Eu=r=>{const a=r.indexOf("=");return r.slice(0,a===-1?r.length:a)};class Ce extends Error{statusCode;statusText;message;name;constructor(a,o){super(),this.name="PassageError",this.statusCode=o.status,this.statusText=o.statusText,this.message=this._parsePsgErrorResponse(a)}_parsePsgErrorResponse(a){try{return a=JSON.parse(a),a.error?a.error:""}catch{return a}}}var Ae=(r=>(r[r.MultipleChoice=300]="MultipleChoice",r[r.MovedPermanantly=301]="MovedPermanantly",r[r.Found=302]="Found",r[r.SeeOther=303]="SeeOther",r[r.NotModified=304]="NotModified",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",r[r.BadRequest=400]="BadRequest",r[r.Unauthorized=401]="Unauthorized",r[r.PaymentRequired=402]="PaymentRequired",r[r.Forbidden=403]="Forbidden",r[r.NotFound=404]="NotFound",r[r.MethodNotAllowed=405]="MethodNotAllowed",r[r.NotAcceptable=406]="NotAcceptable",r[r.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",r[r.RequestTimeout=408]="RequestTimeout",r[r.Conflict=409]="Conflict",r[r.Gone=410]="Gone",r[r.LengthRequired=411]="LengthRequired",r[r.PreconditionFailed=412]="PreconditionFailed",r[r.PayloadTooLarge=413]="PayloadTooLarge",r[r.URITooLong=414]="URITooLong",r[r.UnsupportedMediaType=415]="UnsupportedMediaType",r[r.RangeNotSatisfiable=416]="RangeNotSatisfiable",r[r.ExpectationFailed=417]="ExpectationFailed",r[r.MisdirectedRequest=421]="MisdirectedRequest",r[r.UnprocessableEntity=422]="UnprocessableEntity",r[r.Locked=423]="Locked",r[r.FailedDependency=424]="FailedDependency",r[r.TooEarly=425]="TooEarly",r[r.UpgradeRequired=426]="UpgradeRequired",r[r.PreconditionRequired=428]="PreconditionRequired",r[r.TooManyRequests=429]="TooManyRequests",r[r.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",r[r.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",r[r.InternalServerError=500]="InternalServerError",r[r.NotImplemented=501]="NotImplemented",r[r.BadGateway=502]="BadGateway",r[r.ServiceUnavailable=503]="ServiceUnavailable",r[r.GatewayTimeout=504]="GatewayTimeout",r[r.HTTPVersionNotSupported=505]="HTTPVersionNotSupported",r[r.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",r[r.InsufficientStorage=507]="InsufficientStorage",r[r.LoopDetected=508]="LoopDetected",r[r.NotExtended=510]="NotExtended",r[r.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",r[r.PSGCredObjectDoesNotExist=700]="PSGCredObjectDoesNotExist",r[r.PSGParsePublicKeyForNewDeviceFailed=701]="PSGParsePublicKeyForNewDeviceFailed",r[r.PSGParsePublicKeyForLoginFailed=702]="PSGParsePublicKeyForLoginFailed",r[r.PSGCouldNotGetUserCredential=703]="PSGCouldNotGetUserCredential",r[r.PSGLoginRequired=704]="PSGLoginRequired",r[r.PSGSecureContextRequired=705]="PSGSecureContextRequired",r[r.PSGSocialSessionStorageError=706]="PSGSocialSessionStorageError",r[r.PSGParsePublicKeyForRegistrationFailed=707]="PSGParsePublicKeyForRegistrationFailed",r[r.PSGCanAuthenticateWithPasskeyFailed=708]="PSGCanAuthenticateWithPasskeyFailed",r[r.PSGCanRegisterWithPasskeyFailed=709]="PSGCanRegisterWithPasskeyFailed",r[r.PSGCanUseConditionalMediationFailed=710]="PSGCanUseConditionalMediationFailed",r[r.PSGAuthOriginConfigurationError=711]="PSGAuthOriginConfigurationError",r[r.PSGMustRunInBrowserContext=712]="PSGMustRunInBrowserContext",r))(Ae||{});const d_=()=>async(r,a)=>{},f_=()=>async(r,a,...o)=>o,h_=()=>async(r,a,o)=>o.data,g_=()=>(r,a,o)=>{throw console.error(o),o},__=()=>async(r,a)=>{},w_=()=>({onStart:d_(),onBeforeRequest:f_(),onResponseSuccess:h_(),onError:g_(),onFinish:__()}),v_=(r,a,o,l)=>{const{onStart:f,onBeforeRequest:_,onResponseSuccess:w,onError:I,onFinish:X}=w_(),{onStart:H=f,onBeforeRequest:V=_,onResponseSuccess:se=w,onError:Qe=I,onFinish:Q=X}=o;return async(...ae)=>{H&&await H(l,a);try{let G;V?G=await V(l,a,...ae):G=ae;const M=await a.apply(r,G);let Z;return se?Z=await se(l,a,M):Z=M.data,Z}catch(G){throw Qe?await Qe(l,a,G):G}finally{Q&&await Q(l,a)}}};var kn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vr={exports:{}};/** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */vr.exports;(function(r,a){(function(){var o,l="4.17.21",f=200,_="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",w="Expected a function",I="Invalid `variable` option passed into `_.template`",X="__lodash_hash_undefined__",H=500,V="__lodash_placeholder__",se=1,Qe=2,Q=4,ae=1,G=2,M=1,Z=2,St=4,ce=8,We=16,qe=32,pt=64,Me=128,It=256,Qt=512,br=30,gs="...",_s=800,ws=16,Qa=1,vs=2,ys=3,Tt=1/0,dt=9007199254740991,ms=17976931348623157e292,In=NaN,Je=4294967295,bs=Je-1,Rs=Je>>>1,ks=[["ary",Me],["bind",M],["bindKey",Z],["curry",ce],["curryRight",We],["flip",Qt],["partial",qe],["partialRight",pt],["rearg",It]],jt="[object Arguments]",Tn="[object Array]",Ss="[object AsyncFunction]",en="[object Boolean]",tn="[object Date]",Is="[object DOMException]",Cn="[object Error]",An="[object Function]",ei="[object GeneratorFunction]",Be="[object Map]",nn="[object Number]",Ts="[object Null]",et="[object Object]",ti="[object Promise]",Cs="[object Proxy]",rn="[object RegExp]",Ne="[object Set]",an="[object String]",qn="[object Symbol]",As="[object Undefined]",on="[object WeakMap]",qs="[object WeakSet]",un="[object ArrayBuffer]",Ut="[object DataView]",Rr="[object Float32Array]",kr="[object Float64Array]",Sr="[object Int8Array]",Ir="[object Int16Array]",Tr="[object Int32Array]",Cr="[object Uint8Array]",Ar="[object Uint8ClampedArray]",qr="[object Uint16Array]",Pr="[object Uint32Array]",Ps=/\b__p \+= '';/g,xs=/\b(__p \+=) '' \+/g,Es=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ni=/&(?:amp|lt|gt|quot|#39);/g,ri=/[&<>"']/g,Os=RegExp(ni.source),Ls=RegExp(ri.source),Ds=/<%-([\s\S]+?)%>/g,js=/<%([\s\S]+?)%>/g,ai=/<%=([\s\S]+?)%>/g,Us=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fs=/^\w*$/,Ws=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xr=/[\\^$.*+?()[\]{}|]/g,Ms=RegExp(xr.source),Er=/^\s+/,Bs=/\s/,Ns=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zs=/\{\n\/\* \[wrapped with (.+)\] \*/,Gs=/,? & /,$s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ks=/[()=,{}\[\]\/\s]/,Hs=/\\(\\)?/g,Js=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ii=/\w*$/,Vs=/^[-+]0x[0-9a-f]+$/i,Zs=/^0b[01]+$/i,Ys=/^\[object .+?Constructor\]$/,Xs=/^0o[0-7]+$/i,Qs=/^(?:0|[1-9]\d*)$/,ec=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Pn=/($^)/,tc=/['\n\r\u2028\u2029\\]/g,xn="\\ud800-\\udfff",nc="\\u0300-\\u036f",rc="\\ufe20-\\ufe2f",ac="\\u20d0-\\u20ff",oi=nc+rc+ac,ui="\\u2700-\\u27bf",si="a-z\\xdf-\\xf6\\xf8-\\xff",ic="\\xac\\xb1\\xd7\\xf7",oc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",uc="\\u2000-\\u206f",sc=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ci="A-Z\\xc0-\\xd6\\xd8-\\xde",li="\\ufe0e\\ufe0f",pi=ic+oc+uc+sc,Or="['’]",cc="["+xn+"]",di="["+pi+"]",En="["+oi+"]",fi="\\d+",lc="["+ui+"]",hi="["+si+"]",gi="[^"+xn+pi+fi+ui+si+ci+"]",Lr="\\ud83c[\\udffb-\\udfff]",pc="(?:"+En+"|"+Lr+")",_i="[^"+xn+"]",Dr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+ci+"]",wi="\\u200d",vi="(?:"+hi+"|"+gi+")",dc="(?:"+Ft+"|"+gi+")",yi="(?:"+Or+"(?:d|ll|m|re|s|t|ve))?",mi="(?:"+Or+"(?:D|LL|M|RE|S|T|VE))?",bi=pc+"?",Ri="["+li+"]?",fc="(?:"+wi+"(?:"+[_i,Dr,jr].join("|")+")"+Ri+bi+")*",hc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ki=Ri+bi+fc,_c="(?:"+[lc,Dr,jr].join("|")+")"+ki,wc="(?:"+[_i+En+"?",En,Dr,jr,cc].join("|")+")",vc=RegExp(Or,"g"),yc=RegExp(En,"g"),Ur=RegExp(Lr+"(?="+Lr+")|"+wc+ki,"g"),mc=RegExp([Ft+"?"+hi+"+"+yi+"(?="+[di,Ft,"$"].join("|")+")",dc+"+"+mi+"(?="+[di,Ft+vi,"$"].join("|")+")",Ft+"?"+vi+"+"+yi,Ft+"+"+mi,gc,hc,fi,_c].join("|"),"g"),bc=RegExp("["+wi+xn+oi+li+"]"),Rc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kc=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Sc=-1,J={};J[Rr]=J[kr]=J[Sr]=J[Ir]=J[Tr]=J[Cr]=J[Ar]=J[qr]=J[Pr]=!0,J[jt]=J[Tn]=J[un]=J[en]=J[Ut]=J[tn]=J[Cn]=J[An]=J[Be]=J[nn]=J[et]=J[rn]=J[Ne]=J[an]=J[on]=!1;var K={};K[jt]=K[Tn]=K[un]=K[Ut]=K[en]=K[tn]=K[Rr]=K[kr]=K[Sr]=K[Ir]=K[Tr]=K[Be]=K[nn]=K[et]=K[rn]=K[Ne]=K[an]=K[qn]=K[Cr]=K[Ar]=K[qr]=K[Pr]=!0,K[Cn]=K[An]=K[on]=!1;var Ic={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Tc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cc={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ac={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qc=parseFloat,Pc=parseInt,Si=typeof kn=="object"&&kn&&kn.Object===Object&&kn,xc=typeof self=="object"&&self&&self.Object===Object&&self,le=Si||xc||Function("return this")(),Fr=a&&!a.nodeType&&a,Ct=Fr&&!0&&r&&!r.nodeType&&r,Ii=Ct&&Ct.exports===Fr,Wr=Ii&&Si.process,Pe=function(){try{var h=Ct&&Ct.require&&Ct.require("util").types;return h||Wr&&Wr.binding&&Wr.binding("util")}catch{}}(),Ti=Pe&&Pe.isArrayBuffer,Ci=Pe&&Pe.isDate,Ai=Pe&&Pe.isMap,qi=Pe&&Pe.isRegExp,Pi=Pe&&Pe.isSet,xi=Pe&&Pe.isTypedArray;function be(h,y,v){switch(v.length){case 0:return h.call(y);case 1:return h.call(y,v[0]);case 2:return h.call(y,v[0],v[1]);case 3:return h.call(y,v[0],v[1],v[2])}return h.apply(y,v)}function Ec(h,y,v,T){for(var x=-1,W=h==null?0:h.length;++x<W;){var ie=h[x];y(T,ie,v(ie),h)}return T}function xe(h,y){for(var v=-1,T=h==null?0:h.length;++v<T&&y(h[v],v,h)!==!1;);return h}function Oc(h,y){for(var v=h==null?0:h.length;v--&&y(h[v],v,h)!==!1;);return h}function Ei(h,y){for(var v=-1,T=h==null?0:h.length;++v<T;)if(!y(h[v],v,h))return!1;return!0}function ft(h,y){for(var v=-1,T=h==null?0:h.length,x=0,W=[];++v<T;){var ie=h[v];y(ie,v,h)&&(W[x++]=ie)}return W}function On(h,y){var v=h==null?0:h.length;return!!v&&Wt(h,y,0)>-1}function Mr(h,y,v){for(var T=-1,x=h==null?0:h.length;++T<x;)if(v(y,h[T]))return!0;return!1}function Y(h,y){for(var v=-1,T=h==null?0:h.length,x=Array(T);++v<T;)x[v]=y(h[v],v,h);return x}function ht(h,y){for(var v=-1,T=y.length,x=h.length;++v<T;)h[x+v]=y[v];return h}function Br(h,y,v,T){var x=-1,W=h==null?0:h.length;for(T&&W&&(v=h[++x]);++x<W;)v=y(v,h[x],x,h);return v}function Lc(h,y,v,T){var x=h==null?0:h.length;for(T&&x&&(v=h[--x]);x--;)v=y(v,h[x],x,h);return v}function Nr(h,y){for(var v=-1,T=h==null?0:h.length;++v<T;)if(y(h[v],v,h))return!0;return!1}var Dc=zr("length");function jc(h){return h.split("")}function Uc(h){return h.match($s)||[]}function Oi(h,y,v){var T;return v(h,function(x,W,ie){if(y(x,W,ie))return T=W,!1}),T}function Ln(h,y,v,T){for(var x=h.length,W=v+(T?1:-1);T?W--:++W<x;)if(y(h[W],W,h))return W;return-1}function Wt(h,y,v){return y===y?Vc(h,y,v):Ln(h,Li,v)}function Fc(h,y,v,T){for(var x=v-1,W=h.length;++x<W;)if(T(h[x],y))return x;return-1}function Li(h){return h!==h}function Di(h,y){var v=h==null?0:h.length;return v?$r(h,y)/v:In}function zr(h){return function(y){return y==null?o:y[h]}}function Gr(h){return function(y){return h==null?o:h[y]}}function ji(h,y,v,T,x){return x(h,function(W,ie,$){v=T?(T=!1,W):y(v,W,ie,$)}),v}function Wc(h,y){var v=h.length;for(h.sort(y);v--;)h[v]=h[v].value;return h}function $r(h,y){for(var v,T=-1,x=h.length;++T<x;){var W=y(h[T]);W!==o&&(v=v===o?W:v+W)}return v}function Kr(h,y){for(var v=-1,T=Array(h);++v<h;)T[v]=y(v);return T}function Mc(h,y){return Y(y,function(v){return[v,h[v]]})}function Ui(h){return h&&h.slice(0,Bi(h)+1).replace(Er,"")}function Re(h){return function(y){return h(y)}}function Hr(h,y){return Y(y,function(v){return h[v]})}function sn(h,y){return h.has(y)}function Fi(h,y){for(var v=-1,T=h.length;++v<T&&Wt(y,h[v],0)>-1;);return v}function Wi(h,y){for(var v=h.length;v--&&Wt(y,h[v],0)>-1;);return v}function Bc(h,y){for(var v=h.length,T=0;v--;)h[v]===y&&++T;return T}var Nc=Gr(Ic),zc=Gr(Tc);function Gc(h){return"\\"+Ac[h]}function $c(h,y){return h==null?o:h[y]}function Mt(h){return bc.test(h)}function Kc(h){return Rc.test(h)}function Hc(h){for(var y,v=[];!(y=h.next()).done;)v.push(y.value);return v}function Jr(h){var y=-1,v=Array(h.size);return h.forEach(function(T,x){v[++y]=[x,T]}),v}function Mi(h,y){return function(v){return h(y(v))}}function gt(h,y){for(var v=-1,T=h.length,x=0,W=[];++v<T;){var ie=h[v];(ie===y||ie===V)&&(h[v]=V,W[x++]=v)}return W}function Dn(h){var y=-1,v=Array(h.size);return h.forEach(function(T){v[++y]=T}),v}function Jc(h){var y=-1,v=Array(h.size);return h.forEach(function(T){v[++y]=[T,T]}),v}function Vc(h,y,v){for(var T=v-1,x=h.length;++T<x;)if(h[T]===y)return T;return-1}function Zc(h,y,v){for(var T=v+1;T--;)if(h[T]===y)return T;return T}function Bt(h){return Mt(h)?Xc(h):Dc(h)}function ze(h){return Mt(h)?Qc(h):jc(h)}function Bi(h){for(var y=h.length;y--&&Bs.test(h.charAt(y)););return y}var Yc=Gr(Cc);function Xc(h){for(var y=Ur.lastIndex=0;Ur.test(h);)++y;return y}function Qc(h){return h.match(Ur)||[]}function el(h){return h.match(mc)||[]}var tl=function h(y){y=y==null?le:Nt.defaults(le.Object(),y,Nt.pick(le,kc));var v=y.Array,T=y.Date,x=y.Error,W=y.Function,ie=y.Math,$=y.Object,Vr=y.RegExp,nl=y.String,Ee=y.TypeError,jn=v.prototype,rl=W.prototype,zt=$.prototype,Un=y["__core-js_shared__"],Fn=rl.toString,N=zt.hasOwnProperty,al=0,Ni=function(){var e=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Wn=zt.toString,il=Fn.call($),ol=le._,ul=Vr("^"+Fn.call(N).replace(xr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mn=Ii?y.Buffer:o,_t=y.Symbol,Bn=y.Uint8Array,zi=Mn?Mn.allocUnsafe:o,Nn=Mi($.getPrototypeOf,$),Gi=$.create,$i=zt.propertyIsEnumerable,zn=jn.splice,Ki=_t?_t.isConcatSpreadable:o,cn=_t?_t.iterator:o,At=_t?_t.toStringTag:o,Gn=function(){try{var e=Ot($,"defineProperty");return e({},"",{}),e}catch{}}(),sl=y.clearTimeout!==le.clearTimeout&&y.clearTimeout,cl=T&&T.now!==le.Date.now&&T.now,ll=y.setTimeout!==le.setTimeout&&y.setTimeout,$n=ie.ceil,Kn=ie.floor,Zr=$.getOwnPropertySymbols,pl=Mn?Mn.isBuffer:o,Hi=y.isFinite,dl=jn.join,fl=Mi($.keys,$),oe=ie.max,de=ie.min,hl=T.now,gl=y.parseInt,Ji=ie.random,_l=jn.reverse,Yr=Ot(y,"DataView"),ln=Ot(y,"Map"),Xr=Ot(y,"Promise"),Gt=Ot(y,"Set"),pn=Ot(y,"WeakMap"),dn=Ot($,"create"),Hn=pn&&new pn,$t={},wl=Lt(Yr),vl=Lt(ln),yl=Lt(Xr),ml=Lt(Gt),bl=Lt(pn),Jn=_t?_t.prototype:o,fn=Jn?Jn.valueOf:o,Vi=Jn?Jn.toString:o;function s(e){if(te(e)&&!E(e)&&!(e instanceof U)){if(e instanceof Oe)return e;if(N.call(e,"__wrapped__"))return Yo(e)}return new Oe(e)}var Kt=function(){function e(){}return function(t){if(!ee(t))return{};if(Gi)return Gi(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Vn(){}function Oe(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}s.templateSettings={escape:Ds,evaluate:js,interpolate:ai,variable:"",imports:{_:s}},s.prototype=Vn.prototype,s.prototype.constructor=s,Oe.prototype=Kt(Vn.prototype),Oe.prototype.constructor=Oe;function U(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Je,this.__views__=[]}function Rl(){var e=new U(this.__wrapped__);return e.__actions__=we(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=we(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=we(this.__views__),e}function kl(){if(this.__filtered__){var e=new U(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Sl(){var e=this.__wrapped__.value(),t=this.__dir__,n=E(e),i=t<0,u=n?e.length:0,c=jp(0,u,this.__views__),p=c.start,d=c.end,g=d-p,m=i?d:p-1,b=this.__iteratees__,R=b.length,k=0,C=de(g,this.__takeCount__);if(!n||!i&&u==g&&C==g)return mo(e,this.__actions__);var q=[];e:for(;g--&&k<C;){m+=t;for(var L=-1,P=e[m];++L<R;){var j=b[L],F=j.iteratee,Ie=j.type,_e=F(P);if(Ie==vs)P=_e;else if(!_e){if(Ie==Qa)continue e;break e}}q[k++]=P}return q}U.prototype=Kt(Vn.prototype),U.prototype.constructor=U;function qt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Il(){this.__data__=dn?dn(null):{},this.size=0}function Tl(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Cl(e){var t=this.__data__;if(dn){var n=t[e];return n===X?o:n}return N.call(t,e)?t[e]:o}function Al(e){var t=this.__data__;return dn?t[e]!==o:N.call(t,e)}function ql(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=dn&&t===o?X:t,this}qt.prototype.clear=Il,qt.prototype.delete=Tl,qt.prototype.get=Cl,qt.prototype.has=Al,qt.prototype.set=ql;function tt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pl(){this.__data__=[],this.size=0}function xl(e){var t=this.__data__,n=Zn(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():zn.call(t,n,1),--this.size,!0}function El(e){var t=this.__data__,n=Zn(t,e);return n<0?o:t[n][1]}function Ol(e){return Zn(this.__data__,e)>-1}function Ll(e,t){var n=this.__data__,i=Zn(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}tt.prototype.clear=Pl,tt.prototype.delete=xl,tt.prototype.get=El,tt.prototype.has=Ol,tt.prototype.set=Ll;function nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Dl(){this.size=0,this.__data__={hash:new qt,map:new(ln||tt),string:new qt}}function jl(e){var t=sr(this,e).delete(e);return this.size-=t?1:0,t}function Ul(e){return sr(this,e).get(e)}function Fl(e){return sr(this,e).has(e)}function Wl(e,t){var n=sr(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}nt.prototype.clear=Dl,nt.prototype.delete=jl,nt.prototype.get=Ul,nt.prototype.has=Fl,nt.prototype.set=Wl;function Pt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new nt;++t<n;)this.add(e[t])}function Ml(e){return this.__data__.set(e,X),this}function Bl(e){return this.__data__.has(e)}Pt.prototype.add=Pt.prototype.push=Ml,Pt.prototype.has=Bl;function Ge(e){var t=this.__data__=new tt(e);this.size=t.size}function Nl(){this.__data__=new tt,this.size=0}function zl(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Gl(e){return this.__data__.get(e)}function $l(e){return this.__data__.has(e)}function Kl(e,t){var n=this.__data__;if(n instanceof tt){var i=n.__data__;if(!ln||i.length<f-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new nt(i)}return n.set(e,t),this.size=n.size,this}Ge.prototype.clear=Nl,Ge.prototype.delete=zl,Ge.prototype.get=Gl,Ge.prototype.has=$l,Ge.prototype.set=Kl;function Zi(e,t){var n=E(e),i=!n&&Dt(e),u=!n&&!i&&bt(e),c=!n&&!i&&!u&&Zt(e),p=n||i||u||c,d=p?Kr(e.length,nl):[],g=d.length;for(var m in e)(t||N.call(e,m))&&!(p&&(m=="length"||u&&(m=="offset"||m=="parent")||c&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||ot(m,g)))&&d.push(m);return d}function Yi(e){var t=e.length;return t?e[ca(0,t-1)]:o}function Hl(e,t){return cr(we(e),xt(t,0,e.length))}function Jl(e){return cr(we(e))}function Qr(e,t,n){(n!==o&&!$e(e[t],n)||n===o&&!(t in e))&&rt(e,t,n)}function hn(e,t,n){var i=e[t];(!(N.call(e,t)&&$e(i,n))||n===o&&!(t in e))&&rt(e,t,n)}function Zn(e,t){for(var n=e.length;n--;)if($e(e[n][0],t))return n;return-1}function Vl(e,t,n,i){return wt(e,function(u,c,p){t(i,u,n(u),p)}),i}function Xi(e,t){return e&&Ze(t,ue(t),e)}function Zl(e,t){return e&&Ze(t,ye(t),e)}function rt(e,t,n){t=="__proto__"&&Gn?Gn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ea(e,t){for(var n=-1,i=t.length,u=v(i),c=e==null;++n<i;)u[n]=c?o:La(e,t[n]);return u}function xt(e,t,n){return e===e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function Le(e,t,n,i,u,c){var p,d=t&se,g=t&Qe,m=t&Q;if(n&&(p=u?n(e,i,u,c):n(e)),p!==o)return p;if(!ee(e))return e;var b=E(e);if(b){if(p=Fp(e),!d)return we(e,p)}else{var R=fe(e),k=R==An||R==ei;if(bt(e))return ko(e,d);if(R==et||R==jt||k&&!u){if(p=g||k?{}:No(e),!d)return g?Cp(e,Zl(p,e)):Tp(e,Xi(p,e))}else{if(!K[R])return u?e:{};p=Wp(e,R,d)}}c||(c=new Ge);var C=c.get(e);if(C)return C;c.set(e,p),wu(e)?e.forEach(function(P){p.add(Le(P,t,n,P,e,c))}):gu(e)&&e.forEach(function(P,j){p.set(j,Le(P,t,n,j,e,c))});var q=m?g?ma:ya:g?ye:ue,L=b?o:q(e);return xe(L||e,function(P,j){L&&(j=P,P=e[j]),hn(p,j,Le(P,t,n,j,e,c))}),p}function Yl(e){var t=ue(e);return function(n){return Qi(n,e,t)}}function Qi(e,t,n){var i=n.length;if(e==null)return!i;for(e=$(e);i--;){var u=n[i],c=t[u],p=e[u];if(p===o&&!(u in e)||!c(p))return!1}return!0}function eo(e,t,n){if(typeof e!="function")throw new Ee(w);return bn(function(){e.apply(o,n)},t)}function gn(e,t,n,i){var u=-1,c=On,p=!0,d=e.length,g=[],m=t.length;if(!d)return g;n&&(t=Y(t,Re(n))),i?(c=Mr,p=!1):t.length>=f&&(c=sn,p=!1,t=new Pt(t));e:for(;++u<d;){var b=e[u],R=n==null?b:n(b);if(b=i||b!==0?b:0,p&&R===R){for(var k=m;k--;)if(t[k]===R)continue e;g.push(b)}else c(t,R,i)||g.push(b)}return g}var wt=Ao(Ve),to=Ao(na,!0);function Xl(e,t){var n=!0;return wt(e,function(i,u,c){return n=!!t(i,u,c),n}),n}function Yn(e,t,n){for(var i=-1,u=e.length;++i<u;){var c=e[i],p=t(c);if(p!=null&&(d===o?p===p&&!Se(p):n(p,d)))var d=p,g=c}return g}function Ql(e,t,n,i){var u=e.length;for(n=O(n),n<0&&(n=-n>u?0:u+n),i=i===o||i>u?u:O(i),i<0&&(i+=u),i=n>i?0:yu(i);n<i;)e[n++]=t;return e}function no(e,t){var n=[];return wt(e,function(i,u,c){t(i,u,c)&&n.push(i)}),n}function pe(e,t,n,i,u){var c=-1,p=e.length;for(n||(n=Bp),u||(u=[]);++c<p;){var d=e[c];t>0&&n(d)?t>1?pe(d,t-1,n,i,u):ht(u,d):i||(u[u.length]=d)}return u}var ta=qo(),ro=qo(!0);function Ve(e,t){return e&&ta(e,t,ue)}function na(e,t){return e&&ro(e,t,ue)}function Xn(e,t){return ft(t,function(n){return ut(e[n])})}function Et(e,t){t=yt(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Ye(t[n++])];return n&&n==i?e:o}function ao(e,t,n){var i=t(e);return E(e)?i:ht(i,n(e))}function he(e){return e==null?e===o?As:Ts:At&&At in $(e)?Dp(e):Jp(e)}function ra(e,t){return e>t}function ep(e,t){return e!=null&&N.call(e,t)}function tp(e,t){return e!=null&&t in $(e)}function np(e,t,n){return e>=de(t,n)&&e<oe(t,n)}function aa(e,t,n){for(var i=n?Mr:On,u=e[0].length,c=e.length,p=c,d=v(c),g=1/0,m=[];p--;){var b=e[p];p&&t&&(b=Y(b,Re(t))),g=de(b.length,g),d[p]=!n&&(t||u>=120&&b.length>=120)?new Pt(p&&b):o}b=e[0];var R=-1,k=d[0];e:for(;++R<u&&m.length<g;){var C=b[R],q=t?t(C):C;if(C=n||C!==0?C:0,!(k?sn(k,q):i(m,q,n))){for(p=c;--p;){var L=d[p];if(!(L?sn(L,q):i(e[p],q,n)))continue e}k&&k.push(q),m.push(C)}}return m}function rp(e,t,n,i){return Ve(e,function(u,c,p){t(i,n(u),c,p)}),i}function _n(e,t,n){t=yt(t,e),e=Ko(e,t);var i=e==null?e:e[Ye(je(t))];return i==null?o:be(i,e,n)}function io(e){return te(e)&&he(e)==jt}function ap(e){return te(e)&&he(e)==un}function ip(e){return te(e)&&he(e)==tn}function wn(e,t,n,i,u){return e===t?!0:e==null||t==null||!te(e)&&!te(t)?e!==e&&t!==t:op(e,t,n,i,wn,u)}function op(e,t,n,i,u,c){var p=E(e),d=E(t),g=p?Tn:fe(e),m=d?Tn:fe(t);g=g==jt?et:g,m=m==jt?et:m;var b=g==et,R=m==et,k=g==m;if(k&&bt(e)){if(!bt(t))return!1;p=!0,b=!1}if(k&&!b)return c||(c=new Ge),p||Zt(e)?Wo(e,t,n,i,u,c):Op(e,t,g,n,i,u,c);if(!(n&ae)){var C=b&&N.call(e,"__wrapped__"),q=R&&N.call(t,"__wrapped__");if(C||q){var L=C?e.value():e,P=q?t.value():t;return c||(c=new Ge),u(L,P,n,i,c)}}return k?(c||(c=new Ge),Lp(e,t,n,i,u,c)):!1}function up(e){return te(e)&&fe(e)==Be}function ia(e,t,n,i){var u=n.length,c=u,p=!i;if(e==null)return!c;for(e=$(e);u--;){var d=n[u];if(p&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++u<c;){d=n[u];var g=d[0],m=e[g],b=d[1];if(p&&d[2]){if(m===o&&!(g in e))return!1}else{var R=new Ge;if(i)var k=i(m,b,g,e,t,R);if(!(k===o?wn(b,m,ae|G,i,R):k))return!1}}return!0}function oo(e){if(!ee(e)||zp(e))return!1;var t=ut(e)?ul:Ys;return t.test(Lt(e))}function sp(e){return te(e)&&he(e)==rn}function cp(e){return te(e)&&fe(e)==Ne}function lp(e){return te(e)&&gr(e.length)&&!!J[he(e)]}function uo(e){return typeof e=="function"?e:e==null?me:typeof e=="object"?E(e)?lo(e[0],e[1]):co(e):Pu(e)}function oa(e){if(!mn(e))return fl(e);var t=[];for(var n in $(e))N.call(e,n)&&n!="constructor"&&t.push(n);return t}function pp(e){if(!ee(e))return Hp(e);var t=mn(e),n=[];for(var i in e)i=="constructor"&&(t||!N.call(e,i))||n.push(i);return n}function ua(e,t){return e<t}function so(e,t){var n=-1,i=ve(e)?v(e.length):[];return wt(e,function(u,c,p){i[++n]=t(u,c,p)}),i}function co(e){var t=Ra(e);return t.length==1&&t[0][2]?Go(t[0][0],t[0][1]):function(n){return n===e||ia(n,e,t)}}function lo(e,t){return Sa(e)&&zo(t)?Go(Ye(e),t):function(n){var i=La(n,e);return i===o&&i===t?Da(n,e):wn(t,i,ae|G)}}function Qn(e,t,n,i,u){e!==t&&ta(t,function(c,p){if(u||(u=new Ge),ee(c))dp(e,t,p,n,Qn,i,u);else{var d=i?i(Ta(e,p),c,p+"",e,t,u):o;d===o&&(d=c),Qr(e,p,d)}},ye)}function dp(e,t,n,i,u,c,p){var d=Ta(e,n),g=Ta(t,n),m=p.get(g);if(m){Qr(e,n,m);return}var b=c?c(d,g,n+"",e,t,p):o,R=b===o;if(R){var k=E(g),C=!k&&bt(g),q=!k&&!C&&Zt(g);b=g,k||C||q?E(d)?b=d:ne(d)?b=we(d):C?(R=!1,b=ko(g,!0)):q?(R=!1,b=So(g,!0)):b=[]:Rn(g)||Dt(g)?(b=d,Dt(d)?b=mu(d):(!ee(d)||ut(d))&&(b=No(g))):R=!1}R&&(p.set(g,b),u(b,g,i,c,p),p.delete(g)),Qr(e,n,b)}function po(e,t){var n=e.length;if(n)return t+=t<0?n:0,ot(t,n)?e[t]:o}function fo(e,t,n){t.length?t=Y(t,function(c){return E(c)?function(p){return Et(p,c.length===1?c[0]:c)}:c}):t=[me];var i=-1;t=Y(t,Re(A()));var u=so(e,function(c,p,d){var g=Y(t,function(m){return m(c)});return{criteria:g,index:++i,value:c}});return Wc(u,function(c,p){return Ip(c,p,n)})}function fp(e,t){return ho(e,t,function(n,i){return Da(e,i)})}function ho(e,t,n){for(var i=-1,u=t.length,c={};++i<u;){var p=t[i],d=Et(e,p);n(d,p)&&vn(c,yt(p,e),d)}return c}function hp(e){return function(t){return Et(t,e)}}function sa(e,t,n,i){var u=i?Fc:Wt,c=-1,p=t.length,d=e;for(e===t&&(t=we(t)),n&&(d=Y(e,Re(n)));++c<p;)for(var g=0,m=t[c],b=n?n(m):m;(g=u(d,b,g,i))>-1;)d!==e&&zn.call(d,g,1),zn.call(e,g,1);return e}function go(e,t){for(var n=e?t.length:0,i=n-1;n--;){var u=t[n];if(n==i||u!==c){var c=u;ot(u)?zn.call(e,u,1):da(e,u)}}return e}function ca(e,t){return e+Kn(Ji()*(t-e+1))}function gp(e,t,n,i){for(var u=-1,c=oe($n((t-e)/(n||1)),0),p=v(c);c--;)p[i?c:++u]=e,e+=n;return p}function la(e,t){var n="";if(!e||t<1||t>dt)return n;do t%2&&(n+=e),t=Kn(t/2),t&&(e+=e);while(t);return n}function D(e,t){return Ca($o(e,t,me),e+"")}function _p(e){return Yi(Yt(e))}function wp(e,t){var n=Yt(e);return cr(n,xt(t,0,n.length))}function vn(e,t,n,i){if(!ee(e))return e;t=yt(t,e);for(var u=-1,c=t.length,p=c-1,d=e;d!=null&&++u<c;){var g=Ye(t[u]),m=n;if(g==="__proto__"||g==="constructor"||g==="prototype")return e;if(u!=p){var b=d[g];m=i?i(b,g,d):o,m===o&&(m=ee(b)?b:ot(t[u+1])?[]:{})}hn(d,g,m),d=d[g]}return e}var _o=Hn?function(e,t){return Hn.set(e,t),e}:me,vp=Gn?function(e,t){return Gn(e,"toString",{configurable:!0,enumerable:!1,value:Ua(t),writable:!0})}:me;function yp(e){return cr(Yt(e))}function De(e,t,n){var i=-1,u=e.length;t<0&&(t=-t>u?0:u+t),n=n>u?u:n,n<0&&(n+=u),u=t>n?0:n-t>>>0,t>>>=0;for(var c=v(u);++i<u;)c[i]=e[i+t];return c}function mp(e,t){var n;return wt(e,function(i,u,c){return n=t(i,u,c),!n}),!!n}function er(e,t,n){var i=0,u=e==null?i:e.length;if(typeof t=="number"&&t===t&&u<=Rs){for(;i<u;){var c=i+u>>>1,p=e[c];p!==null&&!Se(p)&&(n?p<=t:p<t)?i=c+1:u=c}return u}return pa(e,t,me,n)}function pa(e,t,n,i){var u=0,c=e==null?0:e.length;if(c===0)return 0;t=n(t);for(var p=t!==t,d=t===null,g=Se(t),m=t===o;u<c;){var b=Kn((u+c)/2),R=n(e[b]),k=R!==o,C=R===null,q=R===R,L=Se(R);if(p)var P=i||q;else m?P=q&&(i||k):d?P=q&&k&&(i||!C):g?P=q&&k&&!C&&(i||!L):C||L?P=!1:P=i?R<=t:R<t;P?u=b+1:c=b}return de(c,bs)}function wo(e,t){for(var n=-1,i=e.length,u=0,c=[];++n<i;){var p=e[n],d=t?t(p):p;if(!n||!$e(d,g)){var g=d;c[u++]=p===0?0:p}}return c}function vo(e){return typeof e=="number"?e:Se(e)?In:+e}function ke(e){if(typeof e=="string")return e;if(E(e))return Y(e,ke)+"";if(Se(e))return Vi?Vi.call(e):"";var t=e+"";return t=="0"&&1/e==-Tt?"-0":t}function vt(e,t,n){var i=-1,u=On,c=e.length,p=!0,d=[],g=d;if(n)p=!1,u=Mr;else if(c>=f){var m=t?null:xp(e);if(m)return Dn(m);p=!1,u=sn,g=new Pt}else g=t?[]:d;e:for(;++i<c;){var b=e[i],R=t?t(b):b;if(b=n||b!==0?b:0,p&&R===R){for(var k=g.length;k--;)if(g[k]===R)continue e;t&&g.push(R),d.push(b)}else u(g,R,n)||(g!==d&&g.push(R),d.push(b))}return d}function da(e,t){return t=yt(t,e),e=Ko(e,t),e==null||delete e[Ye(je(t))]}function yo(e,t,n,i){return vn(e,t,n(Et(e,t)),i)}function tr(e,t,n,i){for(var u=e.length,c=i?u:-1;(i?c--:++c<u)&&t(e[c],c,e););return n?De(e,i?0:c,i?c+1:u):De(e,i?c+1:0,i?u:c)}function mo(e,t){var n=e;return n instanceof U&&(n=n.value()),Br(t,function(i,u){return u.func.apply(u.thisArg,ht([i],u.args))},n)}function fa(e,t,n){var i=e.length;if(i<2)return i?vt(e[0]):[];for(var u=-1,c=v(i);++u<i;)for(var p=e[u],d=-1;++d<i;)d!=u&&(c[u]=gn(c[u]||p,e[d],t,n));return vt(pe(c,1),t,n)}function bo(e,t,n){for(var i=-1,u=e.length,c=t.length,p={};++i<u;){var d=i<c?t[i]:o;n(p,e[i],d)}return p}function ha(e){return ne(e)?e:[]}function ga(e){return typeof e=="function"?e:me}function yt(e,t){return E(e)?e:Sa(e,t)?[e]:Zo(B(e))}var bp=D;function mt(e,t,n){var i=e.length;return n=n===o?i:n,!t&&n>=i?e:De(e,t,n)}var Ro=sl||function(e){return le.clearTimeout(e)};function ko(e,t){if(t)return e.slice();var n=e.length,i=zi?zi(n):new e.constructor(n);return e.copy(i),i}function _a(e){var t=new e.constructor(e.byteLength);return new Bn(t).set(new Bn(e)),t}function Rp(e,t){var n=t?_a(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function kp(e){var t=new e.constructor(e.source,ii.exec(e));return t.lastIndex=e.lastIndex,t}function Sp(e){return fn?$(fn.call(e)):{}}function So(e,t){var n=t?_a(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Io(e,t){if(e!==t){var n=e!==o,i=e===null,u=e===e,c=Se(e),p=t!==o,d=t===null,g=t===t,m=Se(t);if(!d&&!m&&!c&&e>t||c&&p&&g&&!d&&!m||i&&p&&g||!n&&g||!u)return 1;if(!i&&!c&&!m&&e<t||m&&n&&u&&!i&&!c||d&&n&&u||!p&&u||!g)return-1}return 0}function Ip(e,t,n){for(var i=-1,u=e.criteria,c=t.criteria,p=u.length,d=n.length;++i<p;){var g=Io(u[i],c[i]);if(g){if(i>=d)return g;var m=n[i];return g*(m=="desc"?-1:1)}}return e.index-t.index}function To(e,t,n,i){for(var u=-1,c=e.length,p=n.length,d=-1,g=t.length,m=oe(c-p,0),b=v(g+m),R=!i;++d<g;)b[d]=t[d];for(;++u<p;)(R||u<c)&&(b[n[u]]=e[u]);for(;m--;)b[d++]=e[u++];return b}function Co(e,t,n,i){for(var u=-1,c=e.length,p=-1,d=n.length,g=-1,m=t.length,b=oe(c-d,0),R=v(b+m),k=!i;++u<b;)R[u]=e[u];for(var C=u;++g<m;)R[C+g]=t[g];for(;++p<d;)(k||u<c)&&(R[C+n[p]]=e[u++]);return R}function we(e,t){var n=-1,i=e.length;for(t||(t=v(i));++n<i;)t[n]=e[n];return t}function Ze(e,t,n,i){var u=!n;n||(n={});for(var c=-1,p=t.length;++c<p;){var d=t[c],g=i?i(n[d],e[d],d,n,e):o;g===o&&(g=e[d]),u?rt(n,d,g):hn(n,d,g)}return n}function Tp(e,t){return Ze(e,ka(e),t)}function Cp(e,t){return Ze(e,Mo(e),t)}function nr(e,t){return function(n,i){var u=E(n)?Ec:Vl,c=t?t():{};return u(n,e,A(i,2),c)}}function Ht(e){return D(function(t,n){var i=-1,u=n.length,c=u>1?n[u-1]:o,p=u>2?n[2]:o;for(c=e.length>3&&typeof c=="function"?(u--,c):o,p&&ge(n[0],n[1],p)&&(c=u<3?o:c,u=1),t=$(t);++i<u;){var d=n[i];d&&e(t,d,i,c)}return t})}function Ao(e,t){return function(n,i){if(n==null)return n;if(!ve(n))return e(n,i);for(var u=n.length,c=t?u:-1,p=$(n);(t?c--:++c<u)&&i(p[c],c,p)!==!1;);return n}}function qo(e){return function(t,n,i){for(var u=-1,c=$(t),p=i(t),d=p.length;d--;){var g=p[e?d:++u];if(n(c[g],g,c)===!1)break}return t}}function Ap(e,t,n){var i=t&M,u=yn(e);function c(){var p=this&&this!==le&&this instanceof c?u:e;return p.apply(i?n:this,arguments)}return c}function Po(e){return function(t){t=B(t);var n=Mt(t)?ze(t):o,i=n?n[0]:t.charAt(0),u=n?mt(n,1).join(""):t.slice(1);return i[e]()+u}}function Jt(e){return function(t){return Br(Au(Cu(t).replace(vc,"")),e,"")}}function yn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Kt(e.prototype),i=e.apply(n,t);return ee(i)?i:n}}function qp(e,t,n){var i=yn(e);function u(){for(var c=arguments.length,p=v(c),d=c,g=Vt(u);d--;)p[d]=arguments[d];var m=c<3&&p[0]!==g&&p[c-1]!==g?[]:gt(p,g);if(c-=m.length,c<n)return Do(e,t,rr,u.placeholder,o,p,m,o,o,n-c);var b=this&&this!==le&&this instanceof u?i:e;return be(b,this,p)}return u}function xo(e){return function(t,n,i){var u=$(t);if(!ve(t)){var c=A(n,3);t=ue(t),n=function(d){return c(u[d],d,u)}}var p=e(t,n,i);return p>-1?u[c?t[p]:p]:o}}function Eo(e){return it(function(t){var n=t.length,i=n,u=Oe.prototype.thru;for(e&&t.reverse();i--;){var c=t[i];if(typeof c!="function")throw new Ee(w);if(u&&!p&&ur(c)=="wrapper")var p=new Oe([],!0)}for(i=p?i:n;++i<n;){c=t[i];var d=ur(c),g=d=="wrapper"?ba(c):o;g&&Ia(g[0])&&g[1]==(Me|ce|qe|It)&&!g[4].length&&g[9]==1?p=p[ur(g[0])].apply(p,g[3]):p=c.length==1&&Ia(c)?p[d]():p.thru(c)}return function(){var m=arguments,b=m[0];if(p&&m.length==1&&E(b))return p.plant(b).value();for(var R=0,k=n?t[R].apply(this,m):b;++R<n;)k=t[R].call(this,k);return k}})}function rr(e,t,n,i,u,c,p,d,g,m){var b=t&Me,R=t&M,k=t&Z,C=t&(ce|We),q=t&Qt,L=k?o:yn(e);function P(){for(var j=arguments.length,F=v(j),Ie=j;Ie--;)F[Ie]=arguments[Ie];if(C)var _e=Vt(P),Te=Bc(F,_e);if(i&&(F=To(F,i,u,C)),c&&(F=Co(F,c,p,C)),j-=Te,C&&j<m){var re=gt(F,_e);return Do(e,t,rr,P.placeholder,n,F,re,d,g,m-j)}var Ke=R?n:this,ct=k?Ke[e]:e;return j=F.length,d?F=Vp(F,d):q&&j>1&&F.reverse(),b&&g<j&&(F.length=g),this&&this!==le&&this instanceof P&&(ct=L||yn(ct)),ct.apply(Ke,F)}return P}function Oo(e,t){return function(n,i){return rp(n,e,t(i),{})}}function ar(e,t){return function(n,i){var u;if(n===o&&i===o)return t;if(n!==o&&(u=n),i!==o){if(u===o)return i;typeof n=="string"||typeof i=="string"?(n=ke(n),i=ke(i)):(n=vo(n),i=vo(i)),u=e(n,i)}return u}}function wa(e){return it(function(t){return t=Y(t,Re(A())),D(function(n){var i=this;return e(t,function(u){return be(u,i,n)})})})}function ir(e,t){t=t===o?" ":ke(t);var n=t.length;if(n<2)return n?la(t,e):t;var i=la(t,$n(e/Bt(t)));return Mt(t)?mt(ze(i),0,e).join(""):i.slice(0,e)}function Pp(e,t,n,i){var u=t&M,c=yn(e);function p(){for(var d=-1,g=arguments.length,m=-1,b=i.length,R=v(b+g),k=this&&this!==le&&this instanceof p?c:e;++m<b;)R[m]=i[m];for(;g--;)R[m++]=arguments[++d];return be(k,u?n:this,R)}return p}function Lo(e){return function(t,n,i){return i&&typeof i!="number"&&ge(t,n,i)&&(n=i=o),t=st(t),n===o?(n=t,t=0):n=st(n),i=i===o?t<n?1:-1:st(i),gp(t,n,i,e)}}function or(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=Ue(t),n=Ue(n)),e(t,n)}}function Do(e,t,n,i,u,c,p,d,g,m){var b=t&ce,R=b?p:o,k=b?o:p,C=b?c:o,q=b?o:c;t|=b?qe:pt,t&=~(b?pt:qe),t&St||(t&=~(M|Z));var L=[e,t,u,C,R,q,k,d,g,m],P=n.apply(o,L);return Ia(e)&&Ho(P,L),P.placeholder=i,Jo(P,e,t)}function va(e){var t=ie[e];return function(n,i){if(n=Ue(n),i=i==null?0:de(O(i),292),i&&Hi(n)){var u=(B(n)+"e").split("e"),c=t(u[0]+"e"+(+u[1]+i));return u=(B(c)+"e").split("e"),+(u[0]+"e"+(+u[1]-i))}return t(n)}}var xp=Gt&&1/Dn(new Gt([,-0]))[1]==Tt?function(e){return new Gt(e)}:Ma;function jo(e){return function(t){var n=fe(t);return n==Be?Jr(t):n==Ne?Jc(t):Mc(t,e(t))}}function at(e,t,n,i,u,c,p,d){var g=t&Z;if(!g&&typeof e!="function")throw new Ee(w);var m=i?i.length:0;if(m||(t&=~(qe|pt),i=u=o),p=p===o?p:oe(O(p),0),d=d===o?d:O(d),m-=u?u.length:0,t&pt){var b=i,R=u;i=u=o}var k=g?o:ba(e),C=[e,t,n,i,u,b,R,c,p,d];if(k&&Kp(C,k),e=C[0],t=C[1],n=C[2],i=C[3],u=C[4],d=C[9]=C[9]===o?g?0:e.length:oe(C[9]-m,0),!d&&t&(ce|We)&&(t&=~(ce|We)),!t||t==M)var q=Ap(e,t,n);else t==ce||t==We?q=qp(e,t,d):(t==qe||t==(M|qe))&&!u.length?q=Pp(e,t,n,i):q=rr.apply(o,C);var L=k?_o:Ho;return Jo(L(q,C),e,t)}function Uo(e,t,n,i){return e===o||$e(e,zt[n])&&!N.call(i,n)?t:e}function Fo(e,t,n,i,u,c){return ee(e)&&ee(t)&&(c.set(t,e),Qn(e,t,o,Fo,c),c.delete(t)),e}function Ep(e){return Rn(e)?o:e}function Wo(e,t,n,i,u,c){var p=n&ae,d=e.length,g=t.length;if(d!=g&&!(p&&g>d))return!1;var m=c.get(e),b=c.get(t);if(m&&b)return m==t&&b==e;var R=-1,k=!0,C=n&G?new Pt:o;for(c.set(e,t),c.set(t,e);++R<d;){var q=e[R],L=t[R];if(i)var P=p?i(L,q,R,t,e,c):i(q,L,R,e,t,c);if(P!==o){if(P)continue;k=!1;break}if(C){if(!Nr(t,function(j,F){if(!sn(C,F)&&(q===j||u(q,j,n,i,c)))return C.push(F)})){k=!1;break}}else if(!(q===L||u(q,L,n,i,c))){k=!1;break}}return c.delete(e),c.delete(t),k}function Op(e,t,n,i,u,c,p){switch(n){case Ut:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case un:return!(e.byteLength!=t.byteLength||!c(new Bn(e),new Bn(t)));case en:case tn:case nn:return $e(+e,+t);case Cn:return e.name==t.name&&e.message==t.message;case rn:case an:return e==t+"";case Be:var d=Jr;case Ne:var g=i&ae;if(d||(d=Dn),e.size!=t.size&&!g)return!1;var m=p.get(e);if(m)return m==t;i|=G,p.set(e,t);var b=Wo(d(e),d(t),i,u,c,p);return p.delete(e),b;case qn:if(fn)return fn.call(e)==fn.call(t)}return!1}function Lp(e,t,n,i,u,c){var p=n&ae,d=ya(e),g=d.length,m=ya(t),b=m.length;if(g!=b&&!p)return!1;for(var R=g;R--;){var k=d[R];if(!(p?k in t:N.call(t,k)))return!1}var C=c.get(e),q=c.get(t);if(C&&q)return C==t&&q==e;var L=!0;c.set(e,t),c.set(t,e);for(var P=p;++R<g;){k=d[R];var j=e[k],F=t[k];if(i)var Ie=p?i(F,j,k,t,e,c):i(j,F,k,e,t,c);if(!(Ie===o?j===F||u(j,F,n,i,c):Ie)){L=!1;break}P||(P=k=="constructor")}if(L&&!P){var _e=e.constructor,Te=t.constructor;_e!=Te&&"constructor"in e&&"constructor"in t&&!(typeof _e=="function"&&_e instanceof _e&&typeof Te=="function"&&Te instanceof Te)&&(L=!1)}return c.delete(e),c.delete(t),L}function it(e){return Ca($o(e,o,eu),e+"")}function ya(e){return ao(e,ue,ka)}function ma(e){return ao(e,ye,Mo)}var ba=Hn?function(e){return Hn.get(e)}:Ma;function ur(e){for(var t=e.name+"",n=$t[t],i=N.call($t,t)?n.length:0;i--;){var u=n[i],c=u.func;if(c==null||c==e)return u.name}return t}function Vt(e){var t=N.call(s,"placeholder")?s:e;return t.placeholder}function A(){var e=s.iteratee||Fa;return e=e===Fa?uo:e,arguments.length?e(arguments[0],arguments[1]):e}function sr(e,t){var n=e.__data__;return Np(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ra(e){for(var t=ue(e),n=t.length;n--;){var i=t[n],u=e[i];t[n]=[i,u,zo(u)]}return t}function Ot(e,t){var n=$c(e,t);return oo(n)?n:o}function Dp(e){var t=N.call(e,At),n=e[At];try{e[At]=o;var i=!0}catch{}var u=Wn.call(e);return i&&(t?e[At]=n:delete e[At]),u}var ka=Zr?function(e){return e==null?[]:(e=$(e),ft(Zr(e),function(t){return $i.call(e,t)}))}:Ba,Mo=Zr?function(e){for(var t=[];e;)ht(t,ka(e)),e=Nn(e);return t}:Ba,fe=he;(Yr&&fe(new Yr(new ArrayBuffer(1)))!=Ut||ln&&fe(new ln)!=Be||Xr&&fe(Xr.resolve())!=ti||Gt&&fe(new Gt)!=Ne||pn&&fe(new pn)!=on)&&(fe=function(e){var t=he(e),n=t==et?e.constructor:o,i=n?Lt(n):"";if(i)switch(i){case wl:return Ut;case vl:return Be;case yl:return ti;case ml:return Ne;case bl:return on}return t});function jp(e,t,n){for(var i=-1,u=n.length;++i<u;){var c=n[i],p=c.size;switch(c.type){case"drop":e+=p;break;case"dropRight":t-=p;break;case"take":t=de(t,e+p);break;case"takeRight":e=oe(e,t-p);break}}return{start:e,end:t}}function Up(e){var t=e.match(zs);return t?t[1].split(Gs):[]}function Bo(e,t,n){t=yt(t,e);for(var i=-1,u=t.length,c=!1;++i<u;){var p=Ye(t[i]);if(!(c=e!=null&&n(e,p)))break;e=e[p]}return c||++i!=u?c:(u=e==null?0:e.length,!!u&&gr(u)&&ot(p,u)&&(E(e)||Dt(e)))}function Fp(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&N.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function No(e){return typeof e.constructor=="function"&&!mn(e)?Kt(Nn(e)):{}}function Wp(e,t,n){var i=e.constructor;switch(t){case un:return _a(e);case en:case tn:return new i(+e);case Ut:return Rp(e,n);case Rr:case kr:case Sr:case Ir:case Tr:case Cr:case Ar:case qr:case Pr:return So(e,n);case Be:return new i;case nn:case an:return new i(e);case rn:return kp(e);case Ne:return new i;case qn:return Sp(e)}}function Mp(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(Ns,`{ /* [wrapped with `+t+`] */ `)}function Bp(e){return E(e)||Dt(e)||!!(Ki&&e&&e[Ki])}function ot(e,t){var n=typeof e;return t=t??dt,!!t&&(n=="number"||n!="symbol"&&Qs.test(e))&&e>-1&&e%1==0&&e<t}function ge(e,t,n){if(!ee(n))return!1;var i=typeof t;return(i=="number"?ve(n)&&ot(t,n.length):i=="string"&&t in n)?$e(n[t],e):!1}function Sa(e,t){if(E(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Se(e)?!0:Fs.test(e)||!Us.test(e)||t!=null&&e in $(t)}function Np(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ia(e){var t=ur(e),n=s[t];if(typeof n!="function"||!(t in U.prototype))return!1;if(e===n)return!0;var i=ba(n);return!!i&&e===i[0]}function zp(e){return!!Ni&&Ni in e}var Gp=Un?ut:Na;function mn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||zt;return e===n}function zo(e){return e===e&&!ee(e)}function Go(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==o||e in $(n))}}function $p(e){var t=fr(e,function(i){return n.size===H&&n.clear(),i}),n=t.cache;return t}function Kp(e,t){var n=e[1],i=t[1],u=n|i,c=u<(M|Z|Me),p=i==Me&&n==ce||i==Me&&n==It&&e[7].length<=t[8]||i==(Me|It)&&t[7].length<=t[8]&&n==ce;if(!(c||p))return e;i&M&&(e[2]=t[2],u|=n&M?0:St);var d=t[3];if(d){var g=e[3];e[3]=g?To(g,d,t[4]):d,e[4]=g?gt(e[3],V):t[4]}return d=t[5],d&&(g=e[5],e[5]=g?Co(g,d,t[6]):d,e[6]=g?gt(e[5],V):t[6]),d=t[7],d&&(e[7]=d),i&Me&&(e[8]=e[8]==null?t[8]:de(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=u,e}function Hp(e){var t=[];if(e!=null)for(var n in $(e))t.push(n);return t}function Jp(e){return Wn.call(e)}function $o(e,t,n){return t=oe(t===o?e.length-1:t,0),function(){for(var i=arguments,u=-1,c=oe(i.length-t,0),p=v(c);++u<c;)p[u]=i[t+u];u=-1;for(var d=v(t+1);++u<t;)d[u]=i[u];return d[t]=n(p),be(e,this,d)}}function Ko(e,t){return t.length<2?e:Et(e,De(t,0,-1))}function Vp(e,t){for(var n=e.length,i=de(t.length,n),u=we(e);i--;){var c=t[i];e[i]=ot(c,n)?u[c]:o}return e}function Ta(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Ho=Vo(_o),bn=ll||function(e,t){return le.setTimeout(e,t)},Ca=Vo(vp);function Jo(e,t,n){var i=t+"";return Ca(e,Mp(i,Zp(Up(i),n)))}function Vo(e){var t=0,n=0;return function(){var i=hl(),u=ws-(i-n);if(n=i,u>0){if(++t>=_s)return arguments[0]}else t=0;return e.apply(o,arguments)}}function cr(e,t){var n=-1,i=e.length,u=i-1;for(t=t===o?i:t;++n<t;){var c=ca(n,u),p=e[c];e[c]=e[n],e[n]=p}return e.length=t,e}var Zo=$p(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ws,function(n,i,u,c){t.push(u?c.replace(Hs,"$1"):i||n)}),t});function Ye(e){if(typeof e=="string"||Se(e))return e;var t=e+"";return t=="0"&&1/e==-Tt?"-0":t}function Lt(e){if(e!=null){try{return Fn.call(e)}catch{}try{return e+""}catch{}}return""}function Zp(e,t){return xe(ks,function(n){var i="_."+n[0];t&n[1]&&!On(e,i)&&e.push(i)}),e.sort()}function Yo(e){if(e instanceof U)return e.clone();var t=new Oe(e.__wrapped__,e.__chain__);return t.__actions__=we(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Yp(e,t,n){(n?ge(e,t,n):t===o)?t=1:t=oe(O(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var u=0,c=0,p=v($n(i/t));u<i;)p[c++]=De(e,u,u+=t);return p}function Xp(e){for(var t=-1,n=e==null?0:e.length,i=0,u=[];++t<n;){var c=e[t];c&&(u[i++]=c)}return u}function Qp(){var e=arguments.length;if(!e)return[];for(var t=v(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return ht(E(n)?we(n):[n],pe(t,1))}var ed=D(function(e,t){return ne(e)?gn(e,pe(t,1,ne,!0)):[]}),td=D(function(e,t){var n=je(t);return ne(n)&&(n=o),ne(e)?gn(e,pe(t,1,ne,!0),A(n,2)):[]}),nd=D(function(e,t){var n=je(t);return ne(n)&&(n=o),ne(e)?gn(e,pe(t,1,ne,!0),o,n):[]});function rd(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===o?1:O(t),De(e,t<0?0:t,i)):[]}function ad(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===o?1:O(t),t=i-t,De(e,0,t<0?0:t)):[]}function id(e,t){return e&&e.length?tr(e,A(t,3),!0,!0):[]}function od(e,t){return e&&e.length?tr(e,A(t,3),!0):[]}function ud(e,t,n,i){var u=e==null?0:e.length;return u?(n&&typeof n!="number"&&ge(e,t,n)&&(n=0,i=u),Ql(e,t,n,i)):[]}function Xo(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var u=n==null?0:O(n);return u<0&&(u=oe(i+u,0)),Ln(e,A(t,3),u)}function Qo(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var u=i-1;return n!==o&&(u=O(n),u=n<0?oe(i+u,0):de(u,i-1)),Ln(e,A(t,3),u,!0)}function eu(e){var t=e==null?0:e.length;return t?pe(e,1):[]}function sd(e){var t=e==null?0:e.length;return t?pe(e,Tt):[]}function cd(e,t){var n=e==null?0:e.length;return n?(t=t===o?1:O(t),pe(e,t)):[]}function ld(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var u=e[t];i[u[0]]=u[1]}return i}function tu(e){return e&&e.length?e[0]:o}function pd(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var u=n==null?0:O(n);return u<0&&(u=oe(i+u,0)),Wt(e,t,u)}function dd(e){var t=e==null?0:e.length;return t?De(e,0,-1):[]}var fd=D(function(e){var t=Y(e,ha);return t.length&&t[0]===e[0]?aa(t):[]}),hd=D(function(e){var t=je(e),n=Y(e,ha);return t===je(n)?t=o:n.pop(),n.length&&n[0]===e[0]?aa(n,A(t,2)):[]}),gd=D(function(e){var t=je(e),n=Y(e,ha);return t=typeof t=="function"?t:o,t&&n.pop(),n.length&&n[0]===e[0]?aa(n,o,t):[]});function _d(e,t){return e==null?"":dl.call(e,t)}function je(e){var t=e==null?0:e.length;return t?e[t-1]:o}function wd(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var u=i;return n!==o&&(u=O(n),u=u<0?oe(i+u,0):de(u,i-1)),t===t?Zc(e,t,u):Ln(e,Li,u,!0)}function vd(e,t){return e&&e.length?po(e,O(t)):o}var yd=D(nu);function nu(e,t){return e&&e.length&&t&&t.length?sa(e,t):e}function md(e,t,n){return e&&e.length&&t&&t.length?sa(e,t,A(n,2)):e}function bd(e,t,n){return e&&e.length&&t&&t.length?sa(e,t,o,n):e}var Rd=it(function(e,t){var n=e==null?0:e.length,i=ea(e,t);return go(e,Y(t,function(u){return ot(u,n)?+u:u}).sort(Io)),i});function kd(e,t){var n=[];if(!(e&&e.length))return n;var i=-1,u=[],c=e.length;for(t=A(t,3);++i<c;){var p=e[i];t(p,i,e)&&(n.push(p),u.push(i))}return go(e,u),n}function Aa(e){return e==null?e:_l.call(e)}function Sd(e,t,n){var i=e==null?0:e.length;return i?(n&&typeof n!="number"&&ge(e,t,n)?(t=0,n=i):(t=t==null?0:O(t),n=n===o?i:O(n)),De(e,t,n)):[]}function Id(e,t){return er(e,t)}function Td(e,t,n){return pa(e,t,A(n,2))}function Cd(e,t){var n=e==null?0:e.length;if(n){var i=er(e,t);if(i<n&&$e(e[i],t))return i}return-1}function Ad(e,t){return er(e,t,!0)}function qd(e,t,n){return pa(e,t,A(n,2),!0)}function Pd(e,t){var n=e==null?0:e.length;if(n){var i=er(e,t,!0)-1;if($e(e[i],t))return i}return-1}function xd(e){return e&&e.length?wo(e):[]}function Ed(e,t){return e&&e.length?wo(e,A(t,2)):[]}function Od(e){var t=e==null?0:e.length;return t?De(e,1,t):[]}function Ld(e,t,n){return e&&e.length?(t=n||t===o?1:O(t),De(e,0,t<0?0:t)):[]}function Dd(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===o?1:O(t),t=i-t,De(e,t<0?0:t,i)):[]}function jd(e,t){return e&&e.length?tr(e,A(t,3),!1,!0):[]}function Ud(e,t){return e&&e.length?tr(e,A(t,3)):[]}var Fd=D(function(e){return vt(pe(e,1,ne,!0))}),Wd=D(function(e){var t=je(e);return ne(t)&&(t=o),vt(pe(e,1,ne,!0),A(t,2))}),Md=D(function(e){var t=je(e);return t=typeof t=="function"?t:o,vt(pe(e,1,ne,!0),o,t)});function Bd(e){return e&&e.length?vt(e):[]}function Nd(e,t){return e&&e.length?vt(e,A(t,2)):[]}function zd(e,t){return t=typeof t=="function"?t:o,e&&e.length?vt(e,o,t):[]}function qa(e){if(!(e&&e.length))return[];var t=0;return e=ft(e,function(n){if(ne(n))return t=oe(n.length,t),!0}),Kr(t,function(n){return Y(e,zr(n))})}function ru(e,t){if(!(e&&e.length))return[];var n=qa(e);return t==null?n:Y(n,function(i){return be(t,o,i)})}var Gd=D(function(e,t){return ne(e)?gn(e,t):[]}),$d=D(function(e){return fa(ft(e,ne))}),Kd=D(function(e){var t=je(e);return ne(t)&&(t=o),fa(ft(e,ne),A(t,2))}),Hd=D(function(e){var t=je(e);return t=typeof t=="function"?t:o,fa(ft(e,ne),o,t)}),Jd=D(qa);function Vd(e,t){return bo(e||[],t||[],hn)}function Zd(e,t){return bo(e||[],t||[],vn)}va