7 lines
17 KiB
JavaScript
7 lines
17 KiB
JavaScript
|
import{b as xt}from"./browser-detector.e77caf03.js";var st={exports:{}},It=st.exports={};It.forEach=function(r,i){for(var c=0;c<r.length;c++){var e=i(r[c]);if(e)return e}};var Nt=function(r){var i=r.stateHandler.getState;function c(u){var s=i(u);return s&&!!s.isDetectable}function e(u){i(u).isDetectable=!0}function l(u){return!!i(u).busy}function p(u,s){i(u).busy=!!s}return{isDetectable:c,markAsDetectable:e,isBusy:l,markBusy:p}},Pt=function(r){var i={};function c(u){var s=r.get(u);return s===void 0?[]:i[s]||[]}function e(u,s){var h=r.get(u);i[h]||(i[h]=[]),i[h].push(s)}function l(u,s){for(var h=c(u),d=0,g=h.length;d<g;++d)if(h[d]===s){h.splice(d,1);break}}function p(u){var s=c(u);!s||(s.length=0)}return{get:c,add:e,removeListener:l,removeAllListeners:p}},Mt=function(){var r=1;function i(){return r++}return{generate:i}},Wt=function(r){var i=r.idGenerator,c=r.stateHandler.getState;function e(p){var u=c(p);return u&&u.id!==void 0?u.id:null}function l(p){var u=c(p);if(!u)throw new Error("setId required the element to have a resize detection state.");var s=i.generate();return u.id=s,s}return{get:e,set:l}},Bt=function(r){function i(){}var c={log:i,warn:i,error:i};if(!r&&window.console){var e=function(l,p){l[p]=function(){var s=console[p];if(s.apply)s.apply(console,arguments);else for(var h=0;h<arguments.length;h++)s(arguments[h])}};e(c,"log"),e(c,"warn"),e(c,"error")}return c},kt={exports:{}},_t=kt.exports={};_t.getOption=Rt;function Rt(r,i,c){var e=r[i];return e==null&&c!==void 0?c:e}var bt=kt.exports,Ft=function(i){i=i||{};var c=i.reporter,e=bt.getOption(i,"async",!0),l=bt.getOption(i,"auto",!0);l&&!e&&(c&&c.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),e=!0);var p=pt(),u,s=!1;function h(w,A){!s&&l&&e&&p.size()===0&&C(),p.add(w,A)}function d(){for(s=!0;p.size();){var w=p;p=pt(),w.process()}s=!1}function g(w){s||(w===void 0&&(w=e),u&&(P(u),u=null),w?C():d())}function C(){u=k(d)}function P(w){var A=clearTimeout;return A(w)}function k(w){var A=function(M){return setTimeout(M,0)};return A(w)}return{add:h,force:g}};function pt(){var r={},i=0,c=0,e=0;function l(s,h){h||(h=s,s=0),s>c?c=s:s<e&&(e=s),r[s]||(r[s]=[]),r[s].push(h),i++}function p(){for(var s=e;s<=c;s++)for(var h=r[s],d=0;d<h.length;d++){var g=h[d];g()}}function u(){return i}return{add:l,process:p,size:u}}var dt="_erd";function qt(r){return r[dt]={},mt(r)}function mt(r){return r[dt]}function $t(r){delete r[dt]}var Ut={initState:qt,getState:mt,cleanState:$t},Z=xt.exports,Gt=function(r){r=r||{};var i=r.reporter,c=r.batchProcessor,e=r.stateHandler.getState;if(!i)throw new Error("Missing required dependency: reporter.");function l(d,g){function C(){g(d)}if(Z.isIE(8))e(d).object={proxy:C},d.attachEvent("onresize",C);else{var P=s(d);if(!P)throw new Error("Element is not detectable by this strategy.");P.contentDocument.defaultView.addEventListener("resize",C)}}function p(d){var g=r.important?" !important; ":"; ";return(d.join(g)+g).trim()}function u(d,g,C){C||(C=g,g=d,d=null),d=d||{},d.debug;function P(k,w){var A=p(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),M=!1,W=window.getComputedStyle(k),m=k.offsetWidth,D=k.offsetHeight;e(k).startSize={width:m,height:D};function o(){function t(){if(W.position==="static"){k.style.setProperty("position","relative",d.important?"important":"");var z=function(T,S,L,f){function y(j){return j.replace(/[^-\d\.]/g,"")}var I=L[f];I!=="auto"&&y(I)!=="0"&&(T.warn("An element that is positioned static has style."+f+"="+I+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+f+" will be set to 0. Element: ",S),S.style.setProperty(f,"0",d.important?"important":""))};z(i,k,W,"top"),z(i,k,W,"right"),z(i,k,W,"bottom"),z(i,k,W,"left")}}function E(){M||t();function z(S,L){if(!S.contentDocument){var f=e(S);f.checkForObjectDocumentTimeoutId&&window.clearTimeout(f.checkForObjectDocumentTimeoutId),f.checkForObjectDocumen
|
||
|
`;S+="."+E+" > div::-webkit-scrollbar { "+d(["display: none"])+` }
|
||
|
|
||
|
`,S+="."+T+" { "+d(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+z,"animation-name: "+z])+` }
|
||
|
`,S+="@-webkit-keyframes "+z+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
|
||
|
`,S+="@keyframes "+z+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",n(S)}}function P(o){o.className+=" "+s+"_animation_active"}function k(o,t,E){if(o.addEventListener)o.addEventListener(t,E);else if(o.attachEvent)o.attachEvent("on"+t,E);else return i.error("[scroll] Don't know how to add event listeners.")}function w(o,t,E){if(o.removeEventListener)o.removeEventListener(t,E);else if(o.detachEvent)o.detachEvent("on"+t,E);else return i.error("[scroll] Don't know how to remove event listeners.")}function A(o){return e(o).container.childNodes[0].childNodes[0].childNodes[0]}function M(o){return e(o).container.childNodes[0].childNodes[0].childNodes[1]}function W(o,t){var E=e(o).listeners;if(!E.push)throw new Error("Cannot add listener to an element that is not detectable.");e(o).listeners.push(t)}function m(o,t,E){E||(E=t,t=o,o=null),o=o||{};function n(){if(o.debug){var a=Array.prototype.slice.call(arguments);if(a.unshift(l.get(t),"Scroll: "),i.log.apply)i.log.apply(null,a);else for(var v=0;v<a.length;v++)i.log(a[v])}}function z(a){function v(x){var B=x.getRootNode&&x.getRootNode().contains(x);return x===x.ownerDocument.body||x.ownerDocument.body.contains(x)||B}return!v(a)||window.getComputedStyle(a)===null}function T(a){var v=e(a).container.childNodes[0],x=window.getComputedStyle(v);return!x.width||x.width.indexOf("px")===-1}function S(){var a=window.getComputedStyle(t),v={};return v.position=a.position,v.width=t.offsetWidth,v.height=t.offsetHeight,v.top=a.top,v.right=a.right,v.bottom=a.bottom,v.left=a.left,v.widthCSS=a.width,v.heightCSS=a.height,v}function L(){var a=S();e(t).startSize={width:a.width,height:a.height},n("Element start size",e(t).startSize)}function f(){e(t).listeners=[]}function y(){if(n("storeStyle invoked."),!e(t)){n("Aborting because element has been uninstalled");return}var a=S();e(t).style=a}function I(a,v,x){e(a).lastWidth=v,e(a).lastHeight=x}function j(a){return A(a).childNodes[0]}function U(){return 2*p.width+1}function et(){return 2*p.height+1}function rt(a){return a+10+U()}function it(a){return a+10+et()}function Dt(a){return a*2+U()}function Ct(a){return a*2+et()}function ct(a,v,x){var B=A(a),G=M(a),Y=rt(v),K=it(x),O=Dt(v),b=Ct(x);B.scrollLeft=Y,B.scrollTop=K,G.scrollLeft=O,G.scrollTop=b}function ut(){var a=e(t).container;if(!a){a=document.createElement("div"),a.className=s,a.style.cssText=d(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),e(t).container=a,P(a),t.appendChild(a);var v=function(){e(t).onRendered&&e(t).onRendered()};k(a,"animationstart",v),e(t).onAnimationStart=v}return a}function zt(){function a(){var H=e(t).style;if(H.position==="static"){t.style.setProperty("position","relative",o.important?"important":"");var F=function(X,V,Tt,at){function jt(Ot){return Ot.replace(/[^-\d\.]/g,"")}var ot=Tt[at];ot!=="auto"&&jt(ot)!=="0"&&(X.warn("An element that is positioned static has style."+at+"="+ot+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+at+" will be set to 0. Element: ",V),V.style[at]=0)};F(i,t,H,"top"),F(i,t,H,"right"),F(i,t,H,"bottom"),F(i,t,H,"left")}}function v(H,F,X,V){return H=H?H+"px":"0",F=F?F+"px":"0",X=X?X+"px":"0",V=V?V+"px":"0",["left: "+H,"top: "+F,"right: "+V,"bottom: "+X]}if(n("Injecting elements"),!e(t)){n("Aborting because element has been uninstalled");return}a();var x=e(t).container;x||(x=ut());var B=p.width,G=p.height,Y=d(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),K=d(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(v(-(1+B),-(1+G),-G,-B))),O=d(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),b=d(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),N=d(["position: absolute","left: 0","top: 0"]),J=d(["position: absolute","w
|