@vergiss/chooks
Version:
React hooks library
2 lines • 44.5 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.Chooks=e(require("react")):t.Chooks=e(t.react)}(this,(function(t){return(()=>{var e={4282:(t,e,r)=>{"use strict";r.r(e),r.d(e,{useChangedProps:()=>o,useCountdown:()=>m,useDebounce:()=>a,useFetch:()=>O,useHover:()=>x,useInView:()=>I,useLocalStorage:()=>s,useMount:()=>b,useMousePosition:()=>S,usePageTitle:()=>_,useToggle:()=>y,useUnmount:()=>w,useUrlParams:()=>u});var n=r(9297);function o(t,e){var r=(0,n.useState)(t)[1];(0,n.useEffect)((function(){r((function(r){return r===t||e(r,t),t}))}),[t])}r(9554),r(1539),r(8674),r(4916),r(3123),r(4747),r(2564);var i=function(t){return t};function u(t,e){var r=e||i,o=function(t,e){if(void 0===e&&(e=window.location.href),!e)return null;var r=e.split("?")[1];if(!r)return null;var n={};return r.split("&").forEach((function(t){var e=t.split("="),r=e[0],o=e[1];n[r]=o})),t?n[t]:n}(t);return(0,n.useMemo)((function(){return r(o)}),[r,o])}r(3843),r(3710),r(1058),r(9714);var c={expireAge:0};function s(t,e,r){void 0===r&&(r=c);var o=r.expireAge,i=localStorage.getItem(t),u=i?function(t,e){try{return JSON.parse(t)}catch(t){return{}}}(i):e,s=(0,n.useState)(u),a=s[0],f=s[1],l=function(e){var n=JSON.stringify(e);localStorage.setItem(t,n),f(e),r.expireAge&&r.expireAge>0&&localStorage.setItem(t+"__expiration",(Date.now()+r.expireAge).toString())};if(r.expireAge&&r.expireAge>0){var p=localStorage.getItem(t+"__expiration");if(p){var h=parseInt(p,10);Date.now()>=h&&(localStorage.removeItem(t+"__expiration"),localStorage.removeItem(t),f(null))}}return(0,n.useEffect)((function(){l(u)}),[u,o]),[a,l]}function a(t,e,r){var o=(0,n.useRef)(t);o.current=t;var i=function(t,e,r){var n;return function(){for(var o=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];n&&window.clearTimeout(n),n=window.setTimeout((function(){t.apply(r||o,i)}),e)}}(o.current,e,r);return(0,n.useRef)(i).current}r(9601),r(2772),r(7042);var f=function(){return(f=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},l=6e4,p=60*l,h=24*p,v={updateFrequency:1e3};function d(t){return t?function(t){return"Date"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)}(t)?t:new Date(t):new Date(0)}function g(t){var e=d(t).getTime()-(new Date).getTime();return Math.max(e,0)}function m(t,e){void 0===e&&(e=v);var r=(0,n.useRef)(null),o=(0,n.useState)(t),i=o[0],u=o[1],c=(0,n.useState)((function(){return g(i)})),s=c[0],a=c[1],d=(0,n.useState)(!1),m=d[0],y=d[1];(0,n.useEffect)((function(){if(m)clearInterval(r.current);else{if(i){a(g(i));var t=r.current=setInterval((function(){var e=g(i);a(e),e<=0&&clearInterval(t)}),e.updateFrequency);return function(){return clearInterval(t)}}a(0)}}),[i,m,e.updateFrequency]);var x=(0,n.useMemo)((function(){return t=s,{day:e=Math.floor(t/h),hour:r=Math.floor((t-e*h)/p),min:n=Math.floor((t-e*h-r*p)/l),sec:Math.floor((t-e*h-r*p-n*l)/1e3)};var t,e,r,n}),[s]);return{data:f(f({},x),{left:s}),stop:function(){return y(!0)},start:function(){return y(!1)},setTarget:u}}function y(t){var e=(0,n.useState)(t),r=e[0],o=e[1];return(0,n.useEffect)((function(){o(t)}),[t]),[r,function(){o((function(t){return!t}))}]}function x(t){var e=(0,n.useState)(!1),r=e[0],o=e[1];return(0,n.useEffect)((function(){if(t.current){var e=function(){return o(!0)},r=function(){return o(!1)};return t.current.addEventListener("mouseenter",e),t.current.addEventListener("mouseleave",r),function(){t.current&&(t.current.removeEventListener("mouseenter",e),t.current.removeEventListener("mouseleave",r))}}}),[t,o]),r}function b(t){(0,n.useEffect)((function(){t()}),[])}function w(t){(0,n.useEffect)((function(){return t}),[])}var E={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN};function S(){var t=(0,n.useState)(E),e=t[0],r=t[1];return(0,n.useEffect)((function(){var t=function(t){var e=t.screenX,n=t.screenY,o=t.clientX,i=t.clientY,u=t.pageX,c=t.pageY;r({screenX:e,screenY:n,clientX:o,clientY:i,pageX:u,pageY:c})};return document.addEventListener("mousemove",t),function(){document.removeEventListener("mousemove",t)}}),[]),e}var T={preservePreTitle:!0};function _(t,e){void 0===e&&(e=T);var r=(0,n.useRef)(document.title);(0,n.useEffect)((function(){document.title=t}),[t,e]),w((function(){e.preservePreTitle&&(document.title=r.current)}))}function I(t){var e=(0,n.useState)((function(){return function(t){if(!t)return!1;var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,r=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,n=t.getBoundingClientRect();if(n){var o=n.top,i=n.bottom,u=n.left,c=n.right;return i>0&&o<=r&&u<=e&&c>0}return!1}(t.current)})),r=e[0],o=e[1];return(0,n.useEffect)((function(){var e=t.current;if(!e)return function(){};try{var r=new IntersectionObserver((function(t){console.log("entries:",t);for(var e=0,r=t;e<r.length;e++)r[e].isIntersecting?o(!0):o(!1)}));return r.observe(e),function(){r.disconnect()}}catch(t){console.error("Your browser doesn't support IntersectionObserver")}}),[t]),r}function O(t){var e=(0,n.useState)("pending"),r=e[0],o=e[1],i=(0,n.useState)(null),u=i[0],c=i[1];return(0,n.useEffect)((function(){return t().then((function(t){c(t),o("resolved")}),(function(t){u.current=t,o("error")})),function(){o("pending"),c(null)}}),[t]),{result:u,status:r,loading:"pending"===r}}r(6337)},3099:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},1530:(t,e,r)=>{"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},5787:t=>{t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},9670:(t,e,r)=>{var n=r(111);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},8533:(t,e,r)=>{"use strict";var n=r(2092).forEach,o=r(9341),i=r(9207),u=o("forEach"),c=i("forEach");t.exports=u&&c?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},1318:(t,e,r)=>{var n=r(5656),o=r(7466),i=r(1400),u=function(t){return function(e,r,u){var c,s=n(e),a=o(s.length),f=i(u,a);if(t&&r!=r){for(;a>f;)if((c=s[f++])!=c)return!0}else for(;a>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},2092:(t,e,r)=>{var n=r(9974),o=r(8361),i=r(7908),u=r(7466),c=r(5417),s=[].push,a=function(t){var e=1==t,r=2==t,a=3==t,f=4==t,l=6==t,p=5==t||l;return function(h,v,d,g){for(var m,y,x=i(h),b=o(x),w=n(v,d,3),E=u(b.length),S=0,T=g||c,_=e?T(h,E):r?T(h,0):void 0;E>S;S++)if((p||S in b)&&(y=w(m=b[S],S,x),t))if(e)_[S]=y;else if(y)switch(t){case 3:return!0;case 5:return m;case 6:return S;case 2:s.call(_,m)}else if(f)return!1;return l?-1:a||f?f:_}};t.exports={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6)}},1194:(t,e,r)=>{var n=r(7293),o=r(5112),i=r(7392),u=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,r)=>{"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},9207:(t,e,r)=>{var n=r(9781),o=r(7293),i=r(6656),u=Object.defineProperty,c={},s=function(t){throw t};t.exports=function(t,e){if(i(c,t))return c[t];e||(e={});var r=[][t],a=!!i(e,"ACCESSORS")&&e.ACCESSORS,f=i(e,0)?e[0]:s,l=i(e,1)?e[1]:void 0;return c[t]=!!r&&!o((function(){if(a&&!n)return!0;var t={length:-1};a?u(t,1,{enumerable:!0,get:s}):t[1]=1,r.call(t,f,l)}))}},5417:(t,e,r)=>{var n=r(111),o=r(3157),i=r(5112)("species");t.exports=function(t,e){var r;return o(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!o(r.prototype)?n(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},7072:(t,e,r)=>{var n=r(5112)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[n]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},4326:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:(t,e,r)=>{var n=r(1694),o=r(4326),i=r(5112)("toStringTag"),u="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:u?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},9920:(t,e,r)=>{var n=r(6656),o=r(3887),i=r(1236),u=r(3070);t.exports=function(t,e){for(var r=o(e),c=u.f,s=i.f,a=0;a<r.length;a++){var f=r[a];n(t,f)||c(t,f,s(e,f))}}},8880:(t,e,r)=>{var n=r(9781),o=r(3070),i=r(9114);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var n=r(7593),o=r(3070),i=r(9114);t.exports=function(t,e,r){var u=n(e);u in t?o.f(t,u,i(0,r)):t[u]=r}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,r)=>{var n=r(7854),o=r(111),i=n.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},6833:(t,e,r)=>{var n=r(8113);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(n)},5268:(t,e,r)=>{var n=r(4326),o=r(7854);t.exports="process"==n(o.process)},8113:(t,e,r)=>{var n=r(5005);t.exports=n("navigator","userAgent")||""},7392:(t,e,r)=>{var n,o,i=r(7854),u=r(8113),c=i.process,s=c&&c.versions,a=s&&s.v8;a?o=(n=a.split("."))[0]+n[1]:u&&(!(n=u.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=u.match(/Chrome\/(\d+)/))&&(o=n[1]),t.exports=o&&+o},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,r)=>{var n=r(7854),o=r(1236).f,i=r(8880),u=r(1320),c=r(3505),s=r(9920),a=r(4705);t.exports=function(t,e){var r,f,l,p,h,v=t.target,d=t.global,g=t.stat;if(r=d?n:g?n[v]||c(v,{}):(n[v]||{}).prototype)for(f in e){if(p=e[f],l=t.noTargetGet?(h=o(r,f))&&h.value:r[f],!a(d?f:v+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;s(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),u(r,f,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,r)=>{"use strict";r(4916);var n=r(1320),o=r(7293),i=r(5112),u=r(2261),c=r(8880),s=i("species"),a=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f="$0"==="a".replace(/./,"$0"),l=i("replace"),p=!!/./[l]&&""===/./[l]("a","$0"),h=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,e,r,l){var v=i(t),d=!o((function(){var e={};return e[v]=function(){return 7},7!=""[t](e)})),g=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[v]=/./[v]),r.exec=function(){return e=!0,null},r[v](""),!e}));if(!d||!g||"replace"===t&&(!a||!f||p)||"split"===t&&!h){var m=/./[v],y=r(v,""[t],(function(t,e,r,n,o){return e.exec===u?d&&!o?{done:!0,value:m.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),x=y[0],b=y[1];n(String.prototype,t,x),n(RegExp.prototype,v,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}l&&c(RegExp.prototype[v],"sham",!0)}},9974:(t,e,r)=>{var n=r(3099);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},5005:(t,e,r)=>{var n=r(857),o=r(7854),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},1246:(t,e,r)=>{var n=r(648),o=r(7497),i=r(5112)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},6656:t=>{var e={}.hasOwnProperty;t.exports=function(t,r){return e.call(t,r)}},3501:t=>{t.exports={}},842:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),o=r(7293),i=r(317);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var n=r(7293),o=r(4326),i="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},2788:(t,e,r)=>{var n=r(5465),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return o.call(t)}),t.exports=n.inspectSource},9909:(t,e,r)=>{var n,o,i,u=r(8536),c=r(7854),s=r(111),a=r(8880),f=r(6656),l=r(5465),p=r(6200),h=r(3501),v=c.WeakMap;if(u){var d=l.state||(l.state=new v),g=d.get,m=d.has,y=d.set;n=function(t,e){return e.facade=t,y.call(d,t,e),e},o=function(t){return g.call(d,t)||{}},i=function(t){return m.call(d,t)}}else{var x=p("state");h[x]=!0,n=function(t,e){return e.facade=t,a(t,x,e),e},o=function(t){return f(t,x)?t[x]:{}},i=function(t){return f(t,x)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),o=r(7497),i=n("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},3157:(t,e,r)=>{var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},4705:(t,e,r)=>{var n=r(7293),o=/#|\.prototype\./,i=function(t,e){var r=c[u(t)];return r==a||r!=s&&("function"==typeof e?n(e):!!e)},u=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},s=i.NATIVE="N",a=i.POLYFILL="P";t.exports=i},111:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},1913:t=>{t.exports=!1},7850:(t,e,r)=>{var n=r(111),o=r(4326),i=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},408:(t,e,r)=>{var n=r(9670),o=r(7659),i=r(7466),u=r(9974),c=r(1246),s=r(9212),a=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var f,l,p,h,v,d,g,m=r&&r.that,y=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_ITERATOR),b=!(!r||!r.INTERRUPTED),w=u(e,m,1+y+b),E=function(t){return f&&s(f),new a(!0,t)},S=function(t){return y?(n(t),b?w(t[0],t[1],E):w(t[0],t[1])):b?w(t,E):w(t)};if(x)f=t;else{if("function"!=typeof(l=c(t)))throw TypeError("Target is not iterable");if(o(l)){for(p=0,h=i(t.length);h>p;p++)if((v=S(t[p]))&&v instanceof a)return v;return new a(!1)}f=l.call(t)}for(d=f.next;!(g=d.call(f)).done;){try{v=S(g.value)}catch(t){throw s(f),t}if("object"==typeof v&&v&&v instanceof a)return v}return new a(!1)}},9212:(t,e,r)=>{var n=r(9670);t.exports=function(t){var e=t.return;if(void 0!==e)return n(e.call(t)).value}},7497:t=>{t.exports={}},5948:(t,e,r)=>{var n,o,i,u,c,s,a,f,l=r(7854),p=r(1236).f,h=r(261).set,v=r(6833),d=r(5268),g=l.MutationObserver||l.WebKitMutationObserver,m=l.document,y=l.process,x=l.Promise,b=p(l,"queueMicrotask"),w=b&&b.value;w||(n=function(){var t,e;for(d&&(t=y.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?u():i=void 0,t}}i=void 0,t&&t.enter()},!v&&!d&&g&&m?(c=!0,s=m.createTextNode(""),new g(n).observe(s,{characterData:!0}),u=function(){s.data=c=!c}):x&&x.resolve?(a=x.resolve(void 0),f=a.then,u=function(){f.call(a,n)}):u=d?function(){y.nextTick(n)}:function(){h.call(l,n)}),t.exports=w||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,u()),i=e}},3366:(t,e,r)=>{var n=r(7854);t.exports=n.Promise},133:(t,e,r)=>{var n=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},8536:(t,e,r)=>{var n=r(7854),o=r(2788),i=n.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},8523:(t,e,r)=>{"use strict";var n=r(3099),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},3009:(t,e,r)=>{var n=r(7854),o=r(3111).trim,i=r(1361),u=n.parseInt,c=/^[+-]?0[Xx]/,s=8!==u(i+"08")||22!==u(i+"0x16");t.exports=s?function(t,e){var r=o(String(t));return u(r,e>>>0||(c.test(r)?16:10))}:u},1574:(t,e,r)=>{"use strict";var n=r(9781),o=r(7293),i=r(1956),u=r(5181),c=r(5296),s=r(7908),a=r(8361),f=Object.assign,l=Object.defineProperty;t.exports=!f||o((function(){if(n&&1!==f({b:1},f(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=f({},t)[r]||i(f({},e)).join("")!=o}))?function(t,e){for(var r=s(t),o=arguments.length,f=1,l=u.f,p=c.f;o>f;)for(var h,v=a(arguments[f++]),d=l?i(v).concat(l(v)):i(v),g=d.length,m=0;g>m;)h=d[m++],n&&!p.call(v,h)||(r[h]=v[h]);return r}:f},3070:(t,e,r)=>{var n=r(9781),o=r(4664),i=r(9670),u=r(7593),c=Object.defineProperty;e.f=n?c:function(t,e,r){if(i(t),e=u(e,!0),i(r),o)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:(t,e,r)=>{var n=r(9781),o=r(5296),i=r(9114),u=r(5656),c=r(7593),s=r(6656),a=r(4664),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=u(t),e=c(e,!0),a)try{return f(t,e)}catch(t){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},8006:(t,e,r)=>{var n=r(6324),o=r(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},6324:(t,e,r)=>{var n=r(6656),o=r(5656),i=r(1318).indexOf,u=r(3501);t.exports=function(t,e){var r,c=o(t),s=0,a=[];for(r in c)!n(u,r)&&n(c,r)&&a.push(r);for(;e.length>s;)n(c,r=e[s++])&&(~i(a,r)||a.push(r));return a}},1956:(t,e,r)=>{var n=r(6324),o=r(748);t.exports=Object.keys||function(t){return n(t,o)}},5296:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},288:(t,e,r)=>{"use strict";var n=r(1694),o=r(648);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},3887:(t,e,r)=>{var n=r(5005),o=r(8006),i=r(5181),u=r(9670);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(u(t)),r=i.f;return r?e.concat(r(t)):e}},857:(t,e,r)=>{var n=r(7854);t.exports=n},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:(t,e,r)=>{var n=r(9670),o=r(111),i=r(8523);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},2248:(t,e,r)=>{var n=r(1320);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},1320:(t,e,r)=>{var n=r(7854),o=r(8880),i=r(6656),u=r(3505),c=r(2788),s=r(9909),a=s.get,f=s.enforce,l=String(String).split("String");(t.exports=function(t,e,r,c){var s,a=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,h=!!c&&!!c.noTargetGet;"function"==typeof r&&("string"!=typeof e||i(r,"name")||o(r,"name",e),(s=f(r)).source||(s.source=l.join("string"==typeof e?e:""))),t!==n?(a?!h&&t[e]&&(p=!0):delete t[e],p?t[e]=r:o(t,e,r)):p?t[e]=r:u(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&a(this).source||c(this)}))},7651:(t,e,r)=>{var n=r(4326),o=r(2261);t.exports=function(t,e){var r=t.exec;if("function"==typeof r){var i=r.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},2261:(t,e,r)=>{"use strict";var n,o,i=r(7066),u=r(2999),c=RegExp.prototype.exec,s=String.prototype.replace,a=c,f=(n=/a/,o=/b*/g,c.call(n,"a"),c.call(o,"a"),0!==n.lastIndex||0!==o.lastIndex),l=u.UNSUPPORTED_Y||u.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(f||p||l)&&(a=function(t){var e,r,n,o,u=this,a=l&&u.sticky,h=i.call(u),v=u.source,d=0,g=t;return a&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),g=String(t).slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==t[u.lastIndex-1])&&(v="(?: "+v+")",g=" "+g,d++),r=new RegExp("^(?:"+v+")",h)),p&&(r=new RegExp("^"+v+"$(?!\\s)",h)),f&&(e=u.lastIndex),n=c.call(a?r:u,g),a?n?(n.input=n.input.slice(d),n[0]=n[0].slice(d),n.index=u.lastIndex,u.lastIndex+=n[0].length):u.lastIndex=0:f&&n&&(u.lastIndex=u.global?n.index+n[0].length:e),p&&n&&n.length>1&&s.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n}),t.exports=a},7066:(t,e,r)=>{"use strict";var n=r(9670);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:(t,e,r)=>{"use strict";var n=r(7293);function o(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},4488:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:(t,e,r)=>{var n=r(7854),o=r(8880);t.exports=function(t,e){try{o(n,t,e)}catch(r){n[t]=e}return e}},6340:(t,e,r)=>{"use strict";var n=r(5005),o=r(3070),i=r(5112),u=r(9781),c=i("species");t.exports=function(t){var e=n(t),r=o.f;u&&e&&!e[c]&&r(e,c,{configurable:!0,get:function(){return this}})}},8003:(t,e,r)=>{var n=r(3070).f,o=r(6656),i=r(5112)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},6200:(t,e,r)=>{var n=r(2309),o=r(9711),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:(t,e,r)=>{var n=r(7854),o=r(3505),i="__core-js_shared__",u=n[i]||o(i,{});t.exports=u},2309:(t,e,r)=>{var n=r(1913),o=r(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,r)=>{var n=r(9670),o=r(3099),i=r(5112)("species");t.exports=function(t,e){var r,u=n(t).constructor;return void 0===u||null==(r=n(u)[i])?e:o(r)}},8710:(t,e,r)=>{var n=r(9958),o=r(4488),i=function(t){return function(e,r){var i,u,c=String(o(e)),s=n(r),a=c.length;return s<0||s>=a?t?"":void 0:(i=c.charCodeAt(s))<55296||i>56319||s+1===a||(u=c.charCodeAt(s+1))<56320||u>57343?t?c.charAt(s):i:t?c.slice(s,s+2):u-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},3111:(t,e,r)=>{var n=r(4488),o="["+r(1361)+"]",i=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),c=function(t){return function(e){var r=String(n(e));return 1&t&&(r=r.replace(i,"")),2&t&&(r=r.replace(u,"")),r}};t.exports={start:c(1),end:c(2),trim:c(3)}},261:(t,e,r)=>{var n,o,i,u=r(7854),c=r(7293),s=r(9974),a=r(490),f=r(317),l=r(6833),p=r(5268),h=u.location,v=u.setImmediate,d=u.clearImmediate,g=u.process,m=u.MessageChannel,y=u.Dispatch,x=0,b={},w=function(t){if(b.hasOwnProperty(t)){var e=b[t];delete b[t],e()}},E=function(t){return function(){w(t)}},S=function(t){w(t.data)},T=function(t){u.postMessage(t+"",h.protocol+"//"+h.host)};v&&d||(v=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return b[++x]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},n(x),x},d=function(t){delete b[t]},p?n=function(t){g.nextTick(E(t))}:y&&y.now?n=function(t){y.now(E(t))}:m&&!l?(i=(o=new m).port2,o.port1.onmessage=S,n=s(i.postMessage,i,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts&&h&&"file:"!==h.protocol&&!c(T)?(n=T,u.addEventListener("message",S,!1)):n="onreadystatechange"in f("script")?function(t){a.appendChild(f("script")).onreadystatechange=function(){a.removeChild(this),w(t)}}:function(t){setTimeout(E(t),0)}),t.exports={set:v,clear:d}},1400:(t,e,r)=>{var n=r(9958),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},5656:(t,e,r)=>{var n=r(8361),o=r(4488);t.exports=function(t){return n(o(t))}},9958:t=>{var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},7466:(t,e,r)=>{var n=r(9958),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},7908:(t,e,r)=>{var n=r(4488);t.exports=function(t){return Object(n(t))}},7593:(t,e,r)=>{var n=r(111);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},1694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},9711:t=>{var e=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+r).toString(36)}},3307:(t,e,r)=>{var n=r(133);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:(t,e,r)=>{var n=r(7854),o=r(2309),i=r(6656),u=r(9711),c=r(133),s=r(3307),a=o("wks"),f=n.Symbol,l=s?f:f&&f.withoutSetter||u;t.exports=function(t){return i(a,t)||(c&&i(f,t)?a[t]=f[t]:a[t]=l("Symbol."+t)),a[t]}},1361:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9554:(t,e,r)=>{"use strict";var n=r(2109),o=r(8533);n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},2772:(t,e,r)=>{"use strict";var n=r(2109),o=r(1318).indexOf,i=r(9341),u=r(9207),c=[].indexOf,s=!!c&&1/[1].indexOf(1,-0)<0,a=i("indexOf"),f=u("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:s||!a||!f},{indexOf:function(t){return s?c.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},7042:(t,e,r)=>{"use strict";var n=r(2109),o=r(111),i=r(3157),u=r(1400),c=r(7466),s=r(5656),a=r(6135),f=r(5112),l=r(1194),p=r(9207),h=l("slice"),v=p("slice",{ACCESSORS:!0,0:0,1:2}),d=f("species"),g=[].slice,m=Math.max;n({target:"Array",proto:!0,forced:!h||!v},{slice:function(t,e){var r,n,f,l=s(this),p=c(l.length),h=u(t,p),v=u(void 0===e?p:e,p);if(i(l)&&("function"!=typeof(r=l.constructor)||r!==Array&&!i(r.prototype)?o(r)&&null===(r=r[d])&&(r=void 0):r=void 0,r===Array||void 0===r))return g.call(l,h,v);for(n=new(void 0===r?Array:r)(m(v-h,0)),f=0;h<v;h++,f++)h in l&&a(n,f,l[h]);return n.length=f,n}})},3843:(t,e,r)=>{r(2109)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},3710:(t,e,r)=>{var n=r(1320),o=Date.prototype,i="Invalid Date",u=o.toString,c=o.getTime;new Date(NaN)+""!=i&&n(o,"toString",(function(){var t=c.call(this);return t==t?u.call(this):i}))},9601:(t,e,r)=>{var n=r(2109),o=r(1574);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},1539:(t,e,r)=>{var n=r(1694),o=r(1320),i=r(288);n||o(Object.prototype,"toString",i,{unsafe:!0})},1058:(t,e,r)=>{var n=r(2109),o=r(3009);n({global:!0,forced:parseInt!=o},{parseInt:o})},8674:(t,e,r)=>{"use strict";var n,o,i,u,c=r(2109),s=r(1913),a=r(7854),f=r(5005),l=r(3366),p=r(1320),h=r(2248),v=r(8003),d=r(6340),g=r(111),m=r(3099),y=r(5787),x=r(2788),b=r(408),w=r(7072),E=r(6707),S=r(261).set,T=r(5948),_=r(9478),I=r(842),O=r(8523),R=r(2534),j=r(9909),M=r(4705),A=r(5112),L=r(5268),P=r(7392),C=A("species"),D="Promise",N=j.get,k=j.set,U=j.getterFor(D),F=l,V=a.TypeError,q=a.document,B=a.process,H=f("fetch"),Y=O.f,X=Y,W=!!(q&&q.createEvent&&a.dispatchEvent),G="function"==typeof PromiseRejectionEvent,$="unhandledrejection",z=M(D,(function(){if(x(F)===String(F)){if(66===P)return!0;if(!L&&!G)return!0}if(s&&!F.prototype.finally)return!0;if(P>=51&&/native code/.test(F))return!1;var t=F.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[C]=e,!(t.then((function(){}))instanceof e)})),K=z||!w((function(t){F.all(t).catch((function(){}))})),J=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},Q=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;T((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var u,c,s,a=r[i++],f=o?a.ok:a.fail,l=a.resolve,p=a.reject,h=a.domain;try{f?(o||(2===t.rejection&&rt(t),t.rejection=1),!0===f?u=n:(h&&h.enter(),u=f(n),h&&(h.exit(),s=!0)),u===a.promise?p(V("Promise-chain cycle")):(c=J(u))?c.call(u,l,p):l(u)):p(n)}catch(t){h&&!s&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&tt(t)}))}},Z=function(t,e,r){var n,o;W?((n=q.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),a.dispatchEvent(n)):n={promise:e,reason:r},!G&&(o=a["on"+t])?o(n):t===$&&I("Unhandled promise rejection",r)},tt=function(t){S.call(a,(function(){var e,r=t.facade,n=t.value;if(et(t)&&(e=R((function(){L?B.emit("unhandledRejection",n,r):Z($,r,n)})),t.rejection=L||et(t)?2:1,e.error))throw e.value}))},et=function(t){return 1!==t.rejection&&!t.parent},rt=function(t){S.call(a,(function(){var e=t.facade;L?B.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},nt=function(t,e,r){return function(n){t(e,n,r)}},ot=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Q(t,!0))},it=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw V("Promise can't be resolved itself");var n=J(e);n?T((function(){var r={done:!1};try{n.call(e,nt(it,r,t),nt(ot,r,t))}catch(e){ot(r,e,t)}})):(t.value=e,t.state=1,Q(t,!1))}catch(e){ot({done:!1},e,t)}}};z&&(F=function(t){y(this,F,D),m(t),n.call(this);var e=N(this);try{t(nt(it,e),nt(ot,e))}catch(t){ot(e,t)}},(n=function(t){k(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(F.prototype,{then:function(t,e){var r=U(this),n=Y(E(this,F));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=L?B.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&Q(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=N(t);this.promise=t,this.resolve=nt(it,e),this.reject=nt(ot,e)},O.f=Y=function(t){return t===F||t===i?new o(t):X(t)},s||"function"!=typeof l||(u=l.prototype.then,p(l.prototype,"then",(function(t,e){var r=this;return new F((function(t,e){u.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof H&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return _(F,H.apply(a,arguments))}}))),c({global:!0,wrap:!0,forced:z},{Promise:F}),v(F,D,!1,!0),d(D),i=f(D),c({target:D,stat:!0,forced:z},{reject:function(t){var e=Y(this);return e.reject.call(void 0,t),e.promise}}),c({target:D,stat:!0,forced:s||z},{resolve:function(t){return _(s&&this===i?F:this,t)}}),c({target:D,stat:!0,forced:K},{all:function(t){var e=this,r=Y(e),n=r.resolve,o=r.reject,i=R((function(){var r=m(e.resolve),i=[],u=0,c=1;b(t,(function(t){var s=u++,a=!1;i.push(void 0),c++,r.call(e,t).then((function(t){a||(a=!0,i[s]=t,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=Y(e),n=r.reject,o=R((function(){var o=m(e.resolve);b(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},4916:(t,e,r)=>{"use strict";var n=r(2109),o=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},9714:(t,e,r)=>{"use strict";var n=r(1320),o=r(9670),i=r(7293),u=r(7066),c="toString",s=RegExp.prototype,a=s.toString,f=i((function(){return"/a/b"!=a.call({source:"a",flags:"b"})})),l=a.name!=c;(f||l)&&n(RegExp.prototype,c,(function(){var t=o(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in s)?u.call(t):r)}),{unsafe:!0})},3123:(t,e,r)=>{"use strict";var n=r(7007),o=r(7850),i=r(9670),u=r(4488),c=r(6707),s=r(1530),a=r(7466),f=r(7651),l=r(2261),p=r(7293),h=[].push,v=Math.min,d=4294967295,g=!p((function(){return!RegExp(d,"y")}));n("split",2,(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=String(u(this)),i=void 0===r?d:r>>>0;if(0===i)return[];if(void 0===t)return[n];if(!o(t))return e.call(n,t,i);for(var c,s,a,f=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=new RegExp(t.source,p+"g");(c=l.call(g,n))&&!((s=g.lastIndex)>v&&(f.push(n.slice(v,c.index)),c.length>1&&c.index<n.length&&h.apply(f,c.slice(1)),a=c[0].length,v=s,f.length>=i));)g.lastIndex===c.index&&g.lastIndex++;return v===n.length?!a&&g.test("")||f.push(""):f.push(n.slice(v)),f.length>i?f.slice(0,i):f}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var o=u(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(String(o),e,r)},function(t,o){var u=r(n,t,this,o,n!==e);if(u.done)return u.value;var l=i(t),p=String(this),h=c(l,RegExp),m=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(g?"y":"g"),x=new h(g?l:"^(?:"+l.source+")",y),b=void 0===o?d:o>>>0;if(0===b)return[];if(0===p.length)return null===f(x,p)?[p]:[];for(var w=0,E=0,S=[];E<p.length;){x.lastIndex=g?E:0;var T,_=f(x,g?p:p.slice(E));if(null===_||(T=v(a(x.lastIndex+(g?0:E)),p.length))===w)E=s(p,E,m);else{if(S.push(p.slice(w,E)),S.length===b)return S;for(var I=1;I<=_.length-1;I++)if(S.push(_[I]),S.length===b)return S;E=w=T}}return S.push(p.slice(w)),S}]}),!g)},4747:(t,e,r)=>{var n=r(7854),o=r(8324),i=r(8533),u=r(8880);for(var c in o){var s=n[c],a=s&&s.prototype;if(a&&a.forEach!==i)try{u(a,"forEach",i)}catch(t){a.forEach=i}}},2564:(t,e,r)=>{var n=r(2109),o=r(7854),i=r(8113),u=[].slice,c=function(t){return function(e,r){var n=arguments.length>2,o=n?u.call(arguments,2):void 0;return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,r)}};n({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:c(o.setTimeout),setInterval:c(o.setInterval)})},6337:()=>{!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){for(var e=window.document,r=o(e);r;)r=o(e=r.ownerDocument);return e}(),e=[],r=null,n=null;u.prototype.THROTTLE_TIMEOUT=100,u.prototype.POLL_INTERVAL=null,u.prototype.USE_MUTATION_OBSERVER=!0,u._setupCrossOriginUpdater=function(){return r||(r=function(t,r){n=t&&r?l(t,r):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach((function(t){t._checkForIntersections()}))}),r},u._resetCrossOriginUpdater=function(){r=null,n=null},u.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},u.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},u.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},u.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},u.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,r){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==r[e-1]}))},u.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},u.prototype._monitorIntersections=function(e){var r=e.defaultView;if(r&&-1==this._monitoringDocuments.indexOf(e)){var n=this._checkForIntersections,i=null,u=null;if(this.POLL_INTERVAL?i=r.setInterval(n,this.POLL_INTERVAL):(c(r,"resize",n,!0),c(e,"scroll",n,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in r&&(u=new r.MutationObserver(n)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(i&&t.clearInterval(i),s(t,"resize",n,!0)),s(e,"scroll",n,!0),u&&u.disconnect()})),e!=(this.root&&this.root.ownerDocument||t)){var a=o(e);a&&this._monitorIntersections(a.ownerDocument)}}},u.prototype._unmonitorIntersections=function(e){var r=this._monitoringDocuments.indexOf(e);if(-1!=r){var n=this.root&&this.root.ownerDocument||t;if(!this._observationTargets.some((function(t){var r=t.element.ownerDocument;if(r==e)return!0;for(;r&&r!=n;){var i=o(r);if((r=i&&i.ownerDocument)==e)return!0}return!1}))){var i=this._monitoringUnsubscribes[r];if(this._monitoringDocuments.splice(r,1),this._monitoringUnsubscribes.splice(r,1),i(),e!=n){var u=o(e);u&&this._unmonitorIntersections(u.ownerDocument)}}}},u.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},u.prototype._checkForIntersections=function(){if(this.root||!r||n){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(n){var o=n.element,u=a(o),c=this._rootContainsTarget(o),s=n.entry,f=t&&c&&this._computeTargetAndRootIntersection(o,u,e),l=n.entry=new i({time:window.performance&&performance.now&&performance.now(),target:o,boundingClientRect:u,rootBounds:r&&!this.root?null:e,intersectionRect:f});s?t&&c?this._hasCrossedThreshold(s,l)&&this._queuedEntries.push(l):s&&s.isIntersecting&&this._queuedEntries.push(l):this._queuedEntries.push(l)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},u.prototype._computeTargetAndRootIntersection=function(e,o,i){if("none"!=window.getComputedStyle(e).display){for(var u,c,s,f,p,v,d,g,m=o,y=h(e),x=!1;!x&&y;){var b=null,w=1==y.nodeType?window.getComputedStyle(y):{};if("none"==w.display)return null;if(y==this.root||9==y.nodeType)if(x=!0,y==this.root||y==t)r&&!this.root?!n||0==n.width&&0==n.height?(y=null,b=null,m=null):b=n:b=i;else{var E=h(y),S=E&&a(E),T=E&&this._computeTargetAndRootIntersection(E,S,i);S&&T?(y=E,b=l(S,T)):(y=null,m=null)}else{var _=y.ownerDocument;y!=_.body&&y!=_.documentElement&&"visible"!=w.overflow&&(b=a(y))}if(b&&(u=b,c=m,void 0,void 0,void 0,void 0,void 0,void 0,s=Math.max(u.top,c.top),f=Math.min(u.bottom,c.bottom),p=Math.max(u.left,c.left),g=f-s,m=(d=(v=Math.min(u.right,c.right))-p)>=0&&g>=0&&{top:s,bottom:f,left:p,right:v,width:d,height:g}||null),!m)break;y=y&&h(y)}return m}},u.prototype._getRootRect=function(){var e;if(this.root)e=a(this.root);else{var r=t.documentElement,n=t.body;e={top:0,left:0,right:r.clientWidth||n.clientWidth,width:r.clientWidth||n.clientWidth,bottom:r.clientHeight||n.clientHeight,height:r.clientHeight||n.clientHeight}}return this._expandRectByRootMargin(e)},u.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,r){return"px"==e.unit?e.value:e.value*(r%2?t.width:t.height)/100})),r={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return r.width=r.right-r.left,r.height=r.bottom-r.top,r},u.prototype._hasCrossedThreshold=function(t,e){var r=t&&t.isIntersecting?t.intersectionRatio||0:-1,n=e.isIntersecting?e.intersectionRatio||0:-1;if(r!==n)for(var o=0;o<this.thresholds.length;o++){var i=this.thresholds[o];if(i==r||i==n||i<r!=i<n)return!0}},u.prototype._rootIsInDom=function(){return!this.root||p(t,this.root)},u.prototype._rootContainsTarget=function(e){return p(this.root||t,e)&&(!this.root||this.root.ownerDocument==e.ownerDocument)},u.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},u.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=u,window.IntersectionObserverEntry=i}function o(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function i(t){this.time=t.time,this.target=t.target,this.rootBounds=f(t.rootBounds),this.boundingClientRect=f(t.boundingClientRect),this.intersectionRect=f(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,r=e.width*e.height,n=this.intersectionRect,o=n.width*n.height;this.intersectionRatio=r?Number((o/r).toFixed(4)):this.isIntersecting?1:0}function u(t,e){var r,n,o,i=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(i.root&&1!=i.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(r=this._checkForIntersections.bind(this),n=this.THROTTLE_TIMEOUT,o=null,function(){o||(o=setTimeout((function(){r(),o=null}),n))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function c(t,e,r,n){"function"==typeof t.addEventListener?t.addEventListener(e,r,n||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,r)}function s(t,e,r,n){"function"==typeof t.removeEventListener?t.removeEventListener(e,r,n||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,r)}function a(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function f(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function l(t,e){var r=e.top-t.top,n=e.left-t.left;return{top:r,left:n,height:e.height,width:e.width,bottom:r+e.height,right:n+e.width}}function p(t,e){for(var r=e;r;){if(r==t)return!0;r=h(r)}return!1}function h(e){var r=e.parentNode;return 9==e.nodeType&&e!=t?o(e):r&&11==r.nodeType&&r.host?r.host:r&&r.assignedSlot?r.assignedSlot.parentNode:r}}()},9297:e=>{"use strict";e.exports=t}},r={};function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{}};return e[t](o,o.exports,n),o.exports}return n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(4282)})()}));
//# sourceMappingURL=chooks.min.js.map