HEX
Server: Apache
System: Linux server.tanduk.space 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: coachou (1042)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /home/coachou/.trash/cdn.ampproject.org/v0/amp-intersection-observer-polyfill-0.1.js
;
(self.AMP=self.AMP||[]).push({m:0,v:"2206071918001",n:"amp-intersection-observer-polyfill",ev:"0.1",l:!0,f:function(t,n){!function(){function t(n){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i<n;i++)r[i]=t[i];return r}function i(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function r(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,r)}return i}var e,o=function(){function t(n,e){this.At=n,this.xt=function(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?r(Object(e),!0).forEach((function(n){i(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):r(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}({root:null,rootMargin:"0px 0px 0px 0px"},e),this.Et=[],this.Ot=null,t._upgraders.push(this.Pt.bind(this))}var e,o=t.prototype;return o.disconnect=function(){this.Ot?this.Ot.disconnect():this.Et.length=0},o.takeRecords=function(){return this.Ot?this.Ot.takeRecords():[]},o.observe=function(t){this.Ot?this.Ot.observe(t):-1==this.Et.indexOf(t)&&this.Et.push(t)},o.unobserve=function(t){if(this.Ot)this.Ot.unobserve(t);else{var n=this.Et.indexOf(t);-1!=n&&this.Et.splice(n,1)}},o.Pt=function(t){var i=new t(this.At,this.xt);this.Ot=i;for(var r,e=function(t,i){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,i){if(t){if("string"==typeof t)return n(t,i);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,i):void 0}}(t))||t&&"number"==typeof t.length){r&&(t=r);var e=0;return function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.Et);!(r=e()).done;){var o=r.value;i.observe(o)}this.Et.length=0},(e=[{key:"root",get:function(){return this.Ot?this.Ot.root:this.xt.root||null}},{key:"rootMargin",get:function(){return this.Ot?this.Ot.rootMargin:this.xt.rootMargin}},{key:"thresholds",get:function(){return this.Ot?this.Ot.thresholds:[].concat(this.xt.threshold||0)}}])&&function(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}();o._upgraders=[],Array.isArray;var u=Object.prototype;function s(t,n,i,r){return{left:t,top:n,width:i,height:r,bottom:n+r,right:t+i,x:t,y:n}}u.hasOwnProperty,u.toString;var f=function(){function t(){}return t.getTop=function(t){return t.top},t.getLocation=function(t){return t.location},t.getDocumentReferrer=function(t){return t.document.referrer},t.getHostname=function(t){return t.location.hostname},t.getUserAgent=function(t){return t.navigator.userAgent},t.getUserLanguage=function(t){return t.navigator.userLanguage||t.navigator.language},t.getDevicePixelRatio=function(){return self.devicePixelRatio||1},t.getSendBeacon=function(t){if(t.navigator.sendBeacon)return t.navigator.sendBeacon.bind(t.navigator)},t.getXMLHttpRequest=function(t){return t.XMLHttpRequest},t.getImage=function(t){return t.Image},t}(),h=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function c(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return n}}function l(t){var n=(t||self).location;return function(t){var n,i=Object.create(null);if(!t)return i;for(;n=h.exec(t);){var r=c(n[1],n[1]),e=n[2]?c(n[2].replace(/\+/g," "),n[2]):"";i[r]=e}return i}(n.originalHash||n.hash)}var a,v,b,d="";function w(t){var n;return d||(d=(null===(n=t.AMP_CONFIG)||void 0===n?void 0:n.v)||"01".concat("2206071918001")),d}function m(t,n){var i=n||l(t);return["1","actions","amp","amp4ads","amp4email"].includes(i.development)||!!t.AMP_DEV_MODE}function p(t,n,i,r,e,o,u,s,f,h,c){return t}function y(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}function g(t,n){p(O(t,n));var i=j(t)[n];return i.obj||(p(i.ctor),p(i.context),i.obj=new i.ctor(i.context),p(i.obj),i.context=null,i.resolve&&i.resolve(i.obj)),i.obj}function j(t){var n=t.__AMP_SERVICES;return n||(n=t.__AMP_SERVICES={}),n}function O(t,n){var i=t.__AMP_SERVICES&&t.__AMP_SERVICES[n];return!(!i||!i.ctor)}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]),v="amp-intersection-observer-polyfill",b=function(n){return function(t,n){var i=t.IntersectionObserver._stub;if(i){var r=t.IntersectionObserver._native;delete t.IntersectionObserver,delete t.IntersectionObserverEntry,n();var o=t.IntersectionObserver;r&&(t.IntersectionObserver=function(t,n){return function(i,r){var e;return 9===(null==r||null===(e=r.root)||void 0===e?void 0:e.nodeType)?new n(i,r):new t(i,r)}}(r,o));var u=i._upgraders.slice(0),s=e||(e=Promise.resolve(void 0)),f=function(t){s.then((function(){return t(o)}))};u.forEach(f),i._upgraders={"push":f}}else n()}(n,(function(){!function(){"use strict";if("object"===("undefined"==typeof window?"undefined":t(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 n=function(t){for(var n=window.document,i=o(n);i;)i=o(n=i.ownerDocument);return n}(),i=[],r=null,e=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return r||(r=function(t,n){e=t&&n?a(t,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},i.forEach((function(t){t._checkForIntersections()}))}),r},s._resetCrossOriginUpdater=function(){r=null,e=null},s.prototype.observe=function(t){if(!this._observationTargets.some((function(n){return n.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()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(n){return n.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var n=t||[0];return Array.isArray(n)||(n=[n]),n.sort().filter((function(t,n,i){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!==i[n-1]}))},s.prototype._parseRootMargin=function(t){var n=(t||"0px").split(/\s+/).map((function(t){var n=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!n)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(n[1]),unit:n[2]}}));return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},s.prototype._monitorIntersections=function(t){var i=t.defaultView;if(i&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,e=null,u=null;this.POLL_INTERVAL?e=i.setInterval(r,this.POLL_INTERVAL):(f(i,"resize",r,!0),f(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in i&&(u=new i.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push((function(){var n=t.defaultView;n&&(e&&n.clearInterval(e),h(n,"resize",r,!0)),h(t,"scroll",r,!0),u&&u.disconnect()}));var s=this.root&&(this.root.ownerDocument||this.root)||n;if(t!=s){var c=o(t);c&&this._monitorIntersections(c.ownerDocument)}}},s.prototype._unmonitorIntersections=function(t){var i=this._monitoringDocuments.indexOf(t);if(-1!=i){var r=this.root&&(this.root.ownerDocument||this.root)||n;if(!this._observationTargets.some((function(n){var i=n.element.ownerDocument;if(i==t)return!0;for(;i&&i!=r;){var e=o(i);if((i=e&&e.ownerDocument)==t)return!0}return!1}))){var e=this._monitoringUnsubscribes[i];if(this._monitoringDocuments.splice(i,1),this._monitoringUnsubscribes.splice(i,1),e(),t!=r){var u=o(t);u&&this._unmonitorIntersections(u.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var n=0;n<t.length;n++)t[n]()},s.prototype._checkForIntersections=function(){if(this.root||!r||e){var t=this._rootIsInDom(),n=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(i){var e=i.element,o=c(e),s=this._rootContainsTarget(e),f=i.entry,h=t&&s&&this._computeTargetAndRootIntersection(e,o,n),l=null;this._rootContainsTarget(e)?r&&!this.root||(l=n):l={top:0,bottom:0,left:0,right:0,width:0,height:0};var a=i.entry=new u({time:window.performance&&performance.now&&performance.now(),target:e,boundingClientRect:o,rootBounds:l,intersectionRect:h});f?t&&s?this._hasCrossedThreshold(f,a)&&this._queuedEntries.push(a):f&&f.isIntersecting&&this._queuedEntries.push(a):this._queuedEntries.push(a)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(t,i,o){if("none"!=window.getComputedStyle(t).display){for(var u,s,f,h,l,v,d,w,m=i,p=b(t),y=!1;!y&&p;){var g=null,j=1==p.nodeType?window.getComputedStyle(p):{};if("none"==j.display)return null;if(p==this.root||9==p.nodeType)if(y=!0,p==this.root||p==n)r&&!this.root?!e||0==e.width&&0==e.height?(p=null,g=null,m=null):g=e:g=o;else{var O=b(p),M=O&&c(O),x=O&&this._computeTargetAndRootIntersection(O,M,o);M&&x?(p=O,g=a(M,x)):(p=null,m=null)}else{var E=p.ownerDocument;p!=E.body&&p!=E.documentElement&&"visible"!=j.overflow&&(g=c(p))}if(g&&(u=g,s=m,f=Math.max(u.top,s.top),h=Math.min(u.bottom,s.bottom),l=Math.max(u.left,s.left),w=h-f,m=(d=(v=Math.min(u.right,s.right))-l)>=0&&w>=0&&{top:f,bottom:h,left:l,right:v,width:d,height:w}||null),!m)break;p=p&&b(p)}return m}},s.prototype._getRootRect=function(){var t;if(this.root&&!d(this.root))t=c(this.root);else{var i=d(this.root)?this.root:n,r=i.documentElement,e=i.body;t={top:0,left:0,right:r.clientWidth||e.clientWidth,width:r.clientWidth||e.clientWidth,bottom:r.clientHeight||e.clientHeight,height:r.clientHeight||e.clientHeight}}return this._expandRectByRootMargin(t)},s.prototype._expandRectByRootMargin=function(t){var n=this._rootMarginValues.map((function(n,i){return"px"==n.unit?n.value:n.value*(i%2?t.width:t.height)/100})),i={top:t.top-n[0],right:t.right+n[1],bottom:t.bottom+n[2],left:t.left-n[3]};return i.width=i.right-i.left,i.height=i.bottom-i.top,i},s.prototype._hasCrossedThreshold=function(t,n){var i=t&&t.isIntersecting?t.intersectionRatio||0:-1,r=n.isIntersecting?n.intersectionRatio||0:-1;if(i!==r)for(var e=0;e<this.thresholds.length;e++){var o=this.thresholds[e];if(o==i||o==r||o<i!=o<r)return!0}},s.prototype._rootIsInDom=function(){return!this.root||v(n,this.root)},s.prototype._rootContainsTarget=function(t){var i=this.root&&(this.root.ownerDocument||this.root)||n;return v(i,t)&&(!this.root||i==t.ownerDocument)},s.prototype._registerInstance=function(){i.indexOf(this)<0&&i.push(this)},s.prototype._unregisterInstance=function(){var t=i.indexOf(this);-1!=t&&i.splice(t,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=u}function o(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function u(t){this.time=t.time,this.target=t.target,this.rootBounds=l(t.rootBounds),this.boundingClientRect=l(t.boundingClientRect),this.intersectionRect=l(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var n=this.boundingClientRect,i=n.width*n.height,r=this.intersectionRect,e=r.width*r.height;this.intersectionRatio=i?Number((e/i).toFixed(4)):this.isIntersecting?1:0}function s(t,n){var i,r,e,o=n||{};if("function"!=typeof t)throw new Error("callback must be a function");if(o.root&&1!=o.root.nodeType&&9!=o.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(i=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,e=null,function(){e||(e=setTimeout((function(){i(),e=null}),r))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(o.rootMargin),this.thresholds=this._initThresholds(o.threshold),this.root=o.root||null,this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function f(t,n,i,r){"function"==typeof t.addEventListener?t.addEventListener(n,i,r||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+n,i)}function h(t,n,i,r){"function"==typeof t.removeEventListener?t.removeEventListener(n,i,r||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+n,i)}function c(t){var n;try{n=t.getBoundingClientRect()}catch(t){}return n?(n.width&&n.height||(n={top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.right-n.left,height:n.bottom-n.top}),n):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(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 a(t,n){var i=n.top-t.top,r=n.left-t.left;return{top:i,left:r,height:n.height,width:n.width,bottom:i+n.height,right:r+n.width}}function v(t,n){for(var i=n;i;){if(i==t)return!0;i=b(i)}return!1}function b(t){var i=t.parentNode;return 9==t.nodeType&&t!=n?o(t):(i&&i.assignedSlot&&(i=i.assignedSlot.parentNode),i&&11==i.nodeType&&i.host?i.host:i)}function d(t){return t&&9===t.nodeType}}(),function(t){if(t!=f.getTop(t)&&"inabox"==function(t){var n=t||self;return n.__AMP_MODE?n.__AMP_MODE:n.__AMP_MODE=function(t){return{localDev:!1,development:m(t,l(t)),esm:!1,test:!1,rtvVersion:w(t)}}(n)}(t).runtime){var n=function(t){return function(t,n){return O(t=y(t),n)?g(t,n):null}(t,"iframeMessagingClient")}(t),i=t.IntersectionObserver._setupCrossOriginUpdater;if(n&&i){var r=i();n.makeRequest("send-positions","position",(function(t){var n,i,e,o,u,f,h=t.targetRect,c=(n=t.viewportRect,i=h,e=Math.max(i.top,0),o=Math.max(i.left,0),u=Math.min(i.bottom,n.height),f=Math.min(i.right,n.width),e>u||o>f?s(0,0,0,0):s(o,e,f-o,u-e));r(h,c)}))}}}(n)})),{}},function(t,n,i,r,e,o){var u=j(t),s=u[i];s||(s=u[i]={obj:null,promise:null,resolve:null,reject:null,context:null,ctor:null,sharedInstance:!1}),s.ctor||(s.ctor=r,s.context=n,s.sharedInstance=!1,s.resolve&&g(t,i))}(a=y(a=window),a,v,b),g(a,v)}();
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}});
//# sourceMappingURL=amp-intersection-observer-polyfill-0.1.js.map