X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Fextra_polyfills.js;h=a1a646292d1c62f5d34380906c25e0e327908a58;hb=0843f3e0b678937aa9e025c1366fe66a41b08e35;hp=8449f252846b50af5610f25c03fe3c12790d4899;hpb=6ff583e5e10e59fe76cb51ce3d04587307af9eae;p=akkoma diff --git a/priv/static/packs/extra_polyfills.js b/priv/static/packs/extra_polyfills.js index 8449f2528..a1a646292 100644 --- a/priv/static/packs/extra_polyfills.js +++ b/priv/static/packs/extra_polyfills.js @@ -1,2 +1,2 @@ -webpackJsonp([1],{801:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(933),r=(n.n(i),n(934)),o=(n.n(r),n(935));n.n(o)()()},933:function(t,e){!function(t,e){"use strict";function n(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||l(),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,i=this.intersectionRect,r=i.width*i.height;this.intersectionRatio=n?r/n:this.isIntersecting?1:0}function i(t,e){var n=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(n.root&&1!=n.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=o(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(n.rootMargin),this.thresholds=this._initThresholds(n.threshold),this.root=n.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function r(){return t.performance&&performance.now&&performance.now()}function o(t,e){var n=null;return function(){n||(n=setTimeout(function(){t(),n=null},e))}}function s(t,e,n,i){"function"==typeof t.addEventListener?t.addEventListener(e,n,i||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function c(t,e,n,i){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,i||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function u(t,e){var n=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom),r=Math.max(t.left,e.left),o=Math.min(t.right,e.right),s=o-r,c=i-n;return s>=0&&c>=0&&{top:n,bottom:i,left:r,right:o,width:s,height:c}}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):l()}function l(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function h(t,e){for(var n=e;n;){if(n==t)return!0;n=f(n)}return!1}function f(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e}if("IntersectionObserver"in t&&"IntersectionObserverEntry"in t&&"intersectionRatio"in t.IntersectionObserverEntry.prototype)return void("isIntersecting"in t.IntersectionObserverEntry.prototype||Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}));var d=[];i.prototype.THROTTLE_TIMEOUT=100,i.prototype.POLL_INTERVAL=null,i.prototype.USE_MUTATION_OBSERVER=!0,i.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(),this._checkForIntersections()}},i.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},i.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},i.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},i.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){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!==n[e-1]})},i.prototype._parseRootMargin=function(t){var e=t||"0px",n=e.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 n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},i.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(t,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},i.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,c(t,"resize",this._checkForIntersections,!0),c(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},i.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),e=t?this._getRootRect():l();this._observationTargets.forEach(function(i){var o=i.element,s=a(o),c=this._rootContainsTarget(o),u=i.entry,l=t&&c&&this._computeTargetAndRootIntersection(o,e),h=i.entry=new n({time:r(),target:o,boundingClientRect:s,rootBounds:e,intersectionRect:l});u?t&&c?this._hasCrossedThreshold(u,h)&&this._queuedEntries.push(h):u&&u.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},i.prototype._computeTargetAndRootIntersection=function(n,i){if("none"!=t.getComputedStyle(n).display){for(var r=a(n),o=r,s=f(n),c=!1;!c;){var l=null,h=1==s.nodeType?t.getComputedStyle(s):{};if("none"==h.display)return;if(s==this.root||s==e?(c=!0,l=i):s!=e.body&&s!=e.documentElement&&"visible"!=h.overflow&&(l=a(s)),l&&!(o=u(l,o)))break;s=f(s)}return o}},i.prototype._getRootRect=function(){var t;if(this.root)t=a(this.root);else{var n=e.documentElement,i=e.body;t={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},i.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},i.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,i=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==i)for(var r=0;r9?h=setTimeout(r,l):(l=0,r()))}function s(){var t,e,n,i=y>9?9:1;if(E=Date.now(),v=!1,h=null,b>2||E-l-50i;e++)t=m.shift(),T++,t&&t(R);m.length?o():b=0}function c(t){return w++,m.push(t),o(),w}function u(t){var e=t-1-T;m[e]&&(m[e]=null)}var a,l,h,f,d="undefined"!=typeof window?window:void 0!=typeof n?n:this||{},g=d.cancelRequestAnimationFrame&&d.requestAnimationFrame||setTimeout,p=d.cancelRequestAnimationFrame||clearTimeout,m=[],b=0,v=!1,y=7,_=35,I=125,w=0,E=0,T=0,R={get didTimeout(){return!1},timeRemaining:function(){var t=y-(Date.now()-E);return t<0?0:t}},k=function(t){var e,n,i=function(){var r=Date.now()-n;r<99?e=setTimeout(i,99-r):(e=null,t())};return function(){n=Date.now(),e||(e=setTimeout(i,99))}}(function(){y=22,I=66,_=0});if(d.requestIdleCallback&&d.cancelIdleCallback)try{d.requestIdleCallback(function(){},{timeout:0})}catch(t){!function(t){var e,n;if(d.requestIdleCallback=function(e,n){return n&&"number"==typeof n.timeout?t(e,n.timeout):t(e)},d.IdleCallbackDeadline&&(e=IdleCallbackDeadline.prototype)){if(!(n=Object.getOwnPropertyDescriptor(e,"timeRemaining"))||!n.configurable||!n.get)return;Object.defineProperty(e,"timeRemaining",{value:function(){return n.get.call(this)},enumerable:!0,configurable:!0})}}(d.requestIdleCallback)}else d.requestIdleCallback=c,d.cancelIdleCallback=u,d.document&&document.addEventListener&&(d.addEventListener("scroll",e,!0),d.addEventListener("resize",e),document.addEventListener("focus",e,!0),document.addEventListener("mouseover",e,!0),["click","keypress","touchstart","mousedown"].forEach(function(t){document.addEventListener(t,e,{capture:!0,passive:!0})}),d.MutationObserver&&new MutationObserver(e).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));return{request:c,cancel:u}})}).call(e,n(46))},935:function(t,e,n){"use strict";function i(t,e){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+t+"' height='"+e+"'%3E%3C/svg%3E"}function r(t){if(t.srcset&&!b&&window.picturefill){var e=window.picturefill._;t[e.ns]&&t[e.ns].evaled||e.fillImg(t,{reselect:!0}),t[e.ns].curSrc||(t[e.ns].supported=!1,e.fillImg(t,{reselect:!0})),t.currentSrc=t[e.ns].curSrc||t.src}}function o(t){for(var e,n=getComputedStyle(t).fontFamily,i={};null!==(e=f.exec(n));)i[e[1]]=e[2];return i}function s(t,e,n){var r=i(e||1,n||0);v.call(t,"src")!==r&&y.call(t,"src",r)}function c(t,e){t.naturalWidth?e(t):setTimeout(c,100,t,e)}function u(t){var e=o(t),n=t[h];if(e["object-fit"]=e["object-fit"]||"fill",!n.img){if("fill"===e["object-fit"])return;if(!n.skipTest&&g&&!e["object-position"])return}if(!n.img){n.img=new Image(t.width,t.height),n.img.srcset=v.call(t,"data-ofi-srcset")||t.srcset,n.img.src=v.call(t,"data-ofi-src")||t.src,y.call(t,"data-ofi-src",t.src),t.srcset&&y.call(t,"data-ofi-srcset",t.srcset),s(t,t.naturalWidth||t.width,t.naturalHeight||t.height),t.srcset&&(t.srcset="");try{a(t)}catch(t){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}r(n.img),t.style.backgroundImage='url("'+(n.img.currentSrc||n.img.src).replace(/"/g,'\\"')+'")',t.style.backgroundPosition=e["object-position"]||"center",t.style.backgroundRepeat="no-repeat",t.style.backgroundOrigin="content-box",/scale-down/.test(e["object-fit"])?c(n.img,function(){n.img.naturalWidth>t.width||n.img.naturalHeight>t.height?t.style.backgroundSize="contain":t.style.backgroundSize="auto"}):t.style.backgroundSize=e["object-fit"].replace("none","auto").replace("fill","100% 100%"),c(n.img,function(e){s(t,e.naturalWidth,e.naturalHeight)})}function a(t){var e={get:function(e){return t[h].img[e||"src"]},set:function(e,n){return t[h].img[n||"src"]=e,y.call(t,"data-ofi-"+n,e),u(t),e}};Object.defineProperty(t,"src",e),Object.defineProperty(t,"currentSrc",{get:function(){return e.get("currentSrc")}}),Object.defineProperty(t,"srcset",{get:function(){return e.get("srcset")},set:function(t){return e.set(t,"srcset")}})}function l(t,e){var n=!_&&!t;if(e=e||{},t=t||"img",p&&!e.skipTest||!m)return!1;"img"===t?t=document.getElementsByTagName("img"):"string"==typeof t?t=document.querySelectorAll(t):"length"in t||(t=[t]);for(var i=0;ii;e++)t=h.shift(),y++,t&&t(_);h.length?k():f=0}function O(t){return b++,h.push(t),k(),b}function L(t){var e=t-1-y;h[e]&&(h[e]=null)}if(u.requestIdleCallback&&u.cancelIdleCallback)try{u.requestIdleCallback(function(){},{timeout:0})}catch(t){!function(n){var t,e;if(u.requestIdleCallback=function(t,e){return e&&"number"==typeof e.timeout?n(t,e.timeout):n(t)},u.IdleCallbackDeadline&&(t=IdleCallbackDeadline.prototype)){if(!(e=Object.getOwnPropertyDescriptor(t,"timeRemaining"))||!e.configurable||!e.get)return;Object.defineProperty(t,"timeRemaining",{value:function(){return e.get.call(this)},enumerable:!0,configurable:!0})}}(u.requestIdleCallback)}else u.requestIdleCallback=O,u.cancelIdleCallback=L,u.document&&document.addEventListener&&(u.addEventListener("scroll",w,!0),u.addEventListener("resize",w),document.addEventListener("focus",w,!0),document.addEventListener("mouseover",w,!0),["click","keypress","touchstart","mousedown"].forEach(function(t){document.addEventListener(t,w,{capture:!0,passive:!0})}),u.MutationObserver&&new MutationObserver(w).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));return{request:O,cancel:L}})?t.apply(r,e):t)||(i.exports=n)}).call(this,t(55))},958:function(t,e,n){"use strict";var o="bfred-it:object-fit-images",s=/(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g,i="undefined"==typeof Image?{style:{"object-position":1}}:new Image,c="object-fit"in i.style,r="object-position"in i.style,u="background-size"in i.style,a="string"==typeof i.currentSrc,l=i.getAttribute,h=i.setAttribute,f=!1;function d(t,e,n){var i="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+(e||1)+"' height='"+(n||0)+"'%3E%3C/svg%3E";l.call(t,"src")!==i&&h.call(t,"src",i)}function g(t,e){t.naturalWidth?e(t):setTimeout(g,100,t,e)}function p(e){var n,i,t=function(t){for(var e,n=getComputedStyle(t).fontFamily,i={};null!==(e=s.exec(n));)i[e[1]]=e[2];return i}(e),r=e[o];if(t["object-fit"]=t["object-fit"]||"fill",!r.img){if("fill"===t["object-fit"])return;if(!r.skipTest&&c&&!t["object-position"])return}if(!r.img){r.img=new Image(e.width,e.height),r.img.srcset=l.call(e,"data-ofi-srcset")||e.srcset,r.img.src=l.call(e,"data-ofi-src")||e.src,h.call(e,"data-ofi-src",e.src),e.srcset&&h.call(e,"data-ofi-srcset",e.srcset),d(e,e.naturalWidth||e.width,e.naturalHeight||e.height),e.srcset&&(e.srcset="");try{n=e,i={get:function(t){return n[o].img[t||"src"]},set:function(t,e){return n[o].img[e||"src"]=t,h.call(n,"data-ofi-"+e,t),p(n),t}},Object.defineProperty(n,"src",i),Object.defineProperty(n,"currentSrc",{get:function(){return i.get("currentSrc")}}),Object.defineProperty(n,"srcset",{get:function(){return i.get("srcset")},set:function(t){return i.set(t,"srcset")}})}catch(t){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}!function(t){if(t.srcset&&!a&&window.picturefill){var e=window.picturefill._;t[e.ns]&&t[e.ns].evaled||e.fillImg(t,{reselect:!0}),t[e.ns].curSrc||(t[e.ns].supported=!1,e.fillImg(t,{reselect:!0})),t.currentSrc=t[e.ns].curSrc||t.src}}(r.img),e.style.backgroundImage='url("'+(r.img.currentSrc||r.img.src).replace(/"/g,'\\"')+'")',e.style.backgroundPosition=t["object-position"]||"center",e.style.backgroundRepeat="no-repeat",e.style.backgroundOrigin="content-box",/scale-down/.test(t["object-fit"])?g(r.img,function(){r.img.naturalWidth>e.width||r.img.naturalHeight>e.height?e.style.backgroundSize="contain":e.style.backgroundSize="auto"}):e.style.backgroundSize=t["object-fit"].replace("none","auto").replace("fill","100% 100%"),g(r.img,function(t){d(e,t.naturalWidth,t.naturalHeight)})}function m(t,e){var n=!f&&!t;if(e=e||{},t=t||"img",r&&!e.skipTest||!u)return!1;"img"===t?t=document.getElementsByTagName("img"):"string"==typeof t?t=document.querySelectorAll(t):"length"in t||(t=[t]);for(var i=0;i