1import{t as e}from"./rolldown-runtime-hePW80VL.js";var t=e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.LivePhotosKit=r():n.LivePhotosKit=r()})(e,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,`a`,n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=``,t(t.s=25)}([function(e,t,n){function r(e){if(e){var t=e.staticMembers;t&&i.call(this,t),i.call(this.prototype,e)}}function i(e){for(var t in e)if(e.hasOwnProperty(t)&&t!==`staticMembers`){var n=Object.getOwnPropertyDescriptor(e,t);n.get||n.set?Object.defineProperty(this,t,n):a.call(this,t,e[t])}}function a(e,t){var n=this[e];return n instanceof Function&&t instanceof Function?o.call(this,e,t,n):k.instanceOrKindOf(t,k.Metadata)?s.call(this,e,t):void(this[e]=t)}function o(e,t,n){this[e]=function(){var e=this._super;this._super=n;var r=t.apply(this,arguments);return this._super=e,r}}function s(e,t){this.hasOwnProperty(`_metadatas`)||(this._metadatas=Object.create(this._metadatas)),(t.isLPKClass?t.sharedInstance:t).registerOnDefinition(this,e)}function c(e){var t=this[`_callbacksFor_`+e];if(t){var n=void 0;if(arguments.length>1){n=k.arrayPool.get();for(var r=1,i=arguments.length;r<i;r++)n[r-1]=arguments[r]}var a=void 0;if(a=this._triggerPauseStack){var o=a[a.length-1];if(o[o.length-1]!==`IS_FLUSHING`)return void o.push(this,e,n)}for(var s=0,c=t.length;s<c;s++){var l=t[s];l&&l.apply(this,n)}n&&k.arrayPool.ret(n)}}function l(e,t){if(e.indexOf(`.`)!==-1)return d.call(this,e,t);var n=`_callbackToIndexMapFor_`+e,r=this.hasOwnProperty(n)?this[n]:this[n]=this[n]?new E.a(this[n]):new E.a;if(r.get(t)===void 0){var i=`_callbacksFor_`+e,a=this.hasOwnProperty(i)?this[i]:this[i]=this[i]?this[i].slice():[];r.set(t,a.length),a.push(t)}}function u(e,t){if(e.indexOf(`.`)!==-1)return f.call(this,e,t);var n=`_callbackToIndexMapFor_`+e,r=this[n];if(r&&r.get(t)!==void 0){var i=this.hasOwnProperty(n)?this[n]:this[n]=this[n]?new E.a(this[n]):new E.a,a=`_callbacksFor_`+e;(this.hasOwnProperty(a)?this[a]:this[a]=this[a]?this[a].slice():[])[i.get(t)]=null,i.delete(t)}}function d(e,t,n){var r=`_`+e+`_`+k.guidFor(t)+`_`+k.guidFor(n),i=`_chainListenerMaintenanceCallback_for`+r;if(!this[i]){var a=e.indexOf(`.`),o=a!==-1,s=e.substring(a+1),c=s.substring(0,(s.indexOf(`.`)+1||s.length+1)-1),u=e.substring(0,a===-1?e.length:a),p=`_chainListenerPreviousStoredValue_for`+r,m=function(e){var r=n||this;if(c&&o){var i=this[u],a=this[p];i!==a&&(this[p]=i,a&&a.isLPKObservable&&f.call(a,s,t,r),i&&i.isLPKObservable&&d.call(i,s,t,r))}e||t.call(r)};l.call(this,u,m),this.isInitialized&&m.call(this,!0),this[i]=m}}function f(e,t,n){var r=`_`+e+`_`+k.guidFor(t)+`_`+k.guidFor(n),i=`_chainListenerMaintenanceCallback_for`+r,a=this[i];if(a){var o=e.indexOf(`.`),s=e.substring(0,o===-1?e.length:o);u.call(this,s,a);var c=`_chainListenerPreviousStoredValue_for`+r,l=this[c];if(l&&l.isLPKObservable){this[c]=void 0;var d=e.substring(o+1),p=n||this;f.call(l,d,t,p)}this[i]=void 0}}function p(e,t){l.apply(this,arguments),this.isInitialized&&t.call(this)}function m(e,t){u.apply(this,arguments)}function h(){var e=`_runtimeObserver`+(this._nextObserverId=(this._nextObserverId||0)+1),t=k.observer.apply(k.observer,arguments);return t.registerOnDefinition(this,e),t}function g(e){var t=this._metadatas[e];t&&t.invalidateForObject&&t.invalidateForObject(this)}function _(e){return k.resolvePropertyPathFromObject(this,e)}function v(e,t){var n=e.lastIndexOf(`.`);if(n===-1)return void(this[e]=t);var r=k.resolvePropertyPathFromObject(this,e.slice(0,n));r&&(r[e.slice(n+1)]=t)}function y(){for(var e=k.objectPool.get(),t=0,n=arguments.length;t<n;t++){var r=arguments[t];e[r]=this.getPath(r)}return e}function b(){var e=arguments.length,t=arguments[e-1],n=k.arrayPool.get();if(e>1)for(var r=0;r<e-1;r++)n[r]=arguments[r];else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.push(i);k.Object.prototype.pauseNotifications();for(var a=0,o=n.length;a<o;a++){var s=n[a];this.setPath(s,t[s])}k.Object.prototype.resumeNotifications(),k.arrayPool.ret(n)}function x(){(this.hasOwnProperty(`_triggerPauseStack`)?this._triggerPauseStack:this._triggerPauseStack=k.arrayPool.get()).push(k.arrayPool.get())}function S(){var e=this.hasOwnProperty(`_triggerPauseStack`)&&this._triggerPauseStack;
1if(!e)throw"Unmatched `resumeNotifications` call. Cannot over-resume notifications.";var t=e[e.length-1];C(t),e.pop(),k.arrayPool.ret(t),e.length||(delete this._triggerPauseStack,k.arrayPool.ret(e))}function C(e){e.push(`IS_FLUSHING`);for(var t=k.objectPool.get(),n=0,r=e.length-1;n<r;n+=3){var i=e[n],a=e[n+1],o=e[n+2],s=k.guidFor(i)+`:`+a,c=t[s];c!==void 0&&(e[c]=null),t[s]=o?void 0:n}k.objectPool.ret(t);for(var l=0,u=e.length-1;l<u;l+=3){var d=e[l];if(d){var f=e[l+1],p=e[l+2];p?(p.unshift(f),d.trigger.apply(d,p),k.arrayPool.ret(p)):d.trigger(f)}}}var w=n(47),T=n(20),E=n(19),D=n(44),O=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},k={mixin:function(e){for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];if(r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}},instanceOf:function(e,t){return!!e&&(e.constructor===t||k.kindOf(e.constructor,t))},kindOf:function(e,t){if(!(e&&e.isLPKClass&&t&&t.isLPKClass))return!1;do if(e===t)return!0;while(e=e.superclass);return!1},instanceOrKindOf:function(e,t){return k.instanceOf(e,t)||k.kindOf(e,t)},isHash:function(e){var t=void 0;return!((e===void 0?`undefined`:O(e))!==`object`||e===null||(t=e.constructor)&&t!==Object||e.isLPKObject||e.isLPKClass)},arrayPool:w.a,mapPool:w.b,objectPool:w.c,canvasPool:w.d,String:D.a,Array:{mapIntoArray:function(e,t,n){var r=e.length;n.length!==r&&(n.length=r);for(var i=0;i<r;i++)n[i]=t(e[i],i);return n}},resolvePropertyPathFromObject:function(e,t){for(var n=t.indexOf(`.`),r=0,i=e;n!==-1;){if(!(i=i[t.substring(r,n)]))return;r=n+1,n=t.indexOf(`.`,r)}return i[t.substring(r)]},InequalityTests:{DEFAULT:function(e,t,n){return e!==t||Array.isArray(e)||k.isHash(e)},STRICT:function(e,t,n){return e!==t},NAN_AWARE:function(e,t,n){return!Object.is(e,t)}},guidFor:T.a,reusableObject:{},emptyArray:[],Object:null,Metadata:null,observer:null,MetadataExtension:null,metadataExtension:null,AccumulatorMetadata:null,accumulator:null,ObserverMetadata:null,Property:null,property:null,ObservableProperty:null,observableProperty:null,ProxyProperty:null,proxyProperty:null,boundFunction:null};k.Object={staticMembers:{isLPKClass:!0,isLPKObservable:!0,isInitialized:!0,create:function(){var e=Object.create(this.prototype);return e.constructor=this,e.init.apply(e,arguments),e},extend:function(){var e=Object.create(this);return e.prototype=Object.create(e.prototype),Array.prototype.forEach.call(arguments,r,e),e.superclass=this,e.init(),e},init:function(){},isClassFor:function(e){var t=e&&e.constructor;return!(!t||!this.isSuperclassOf(t))},isSuperclassOf:function(e){var t=this;if(!(e&&e.isLPKClass&&t&&t.isLPKClass))return!1;do if(e===t)return!0;while(e=e.superclass);return!1},_super:null,_metadatas:{},trigger:c,_listen:l,_observe:p,_unlisten:u,_unobserve:m,observe:h,propertyChanged:g,pauseNotifications:x,resumeNotifications:S,getPath:_,setPath:v,getMultiple:y,setMultiple:b},isLPKObject:!0,isLPKObservable:!0,isInitialized:!1,_metadatas:{},init:function(e){k.mixin(this,e),this._awakenPropertiesWithAccessors()},_awakenPropertiesWithAccessors:function(){var e=k.arrayPool.get(),t=this._metadatas;do e.push(t);while(t=Object.getPrototypeOf(t));for(var n,r=k.arrayPool.get(),i=k.arrayPool.get(),a=k.arrayPool.get(),o=k.mapPool.get(),s=e.length-1;n=e[s];s--){for(var c in n)if(n.hasOwnProperty(c)){var l=n[c];if(l.hasAccessors){var u=this[c];if(u!==void 0){var d=o.get(l);d!==void 0&&(r[d]=i[d]=void 0),o.set(l,r.length),r.push(l),i.push(u)}}}a.push(r.length)}this.isInitialized=!0,k.Object.prototype.pauseNotifications();for(var f=0,p=i.length;f<p;f++){var m=i[f];m!==void 0&&r[f].awakenForObjectWithValue(this,m)}k.Object.prototype.resumeNotifications(),k.arrayPool.ret(e),k.arrayPool.ret(r),k.arrayPool.ret(i),k.arrayPool.ret(a),k.mapPool.ret(o)},_super:null,trigger:c,_listen:l,_observe:p,_unlisten:u,_unobserve:m,observe:h,propertyChanged:g,pauseNotifications:x,resumeNotifications:S,getPath:_,setPath:v,getMultiple:y,setMultiple:b},k.Object.staticMembers.prototype=k.Object,k.Object=k.Object.staticMembers,delete k.Object.prototype.staticMembers,Object.defineProperty(k.Object,"sharedInstance",{get:function(){return this.hasOwnProperty(`_internalValue_for_sharedInstance`)||(this._internalValue_for_sharedInstance=this.create()),this._internalValue_for_sharedInstance},set:function(){throw`Cannot write to a read-only property.`}}),k.Metadata=k.Object.extend({registerOnDefinition:function(e,t){e._metadatas[t]=this},unregisterFromDefinition:function(e,t){e._metadatas[t]=void 0}}),k.MetadataExtension=k.Metadata.extend({init:function(e){this._super(),this._extensionParams=e},registerOnDefinition:function(e,t){e._metadatas[t].constructor.extend(this._extensionParams).sharedInstance.registerOnDefinition(e,t)}}),k.metadataExtension=k.MetadataExtension.create.bind(k.MetadataExtension),k.AccumulatorMetadata=k.Metadata.extend({init:function(e){this._super(),this.value=e},registerOnDefinition:function(e,t){var n=e[t];e[t]=this.accumulateValues(e,n,this.value)},accumulateValues:function(e,t,n){if(Array.isArray(t)&&Array.isArray(n))return t.concat(n);if(t&&t.isLPKClass&&k.isHash(n))return t.extend(n);if(n instanceof Function)return n.call(e,t);throw`Cannot use accumulators this way yet.`}}),k.accumulator=k.AccumulatorMetadata.create.bind(k.AccumulatorMetadata),k.ObserverMetadata=k.Metadata.extend({staticMembers:{_collector:[]},dependencies:[],observerCallback:function(){throw"Must specify `observerCallback` on observers."},decideRequiresUpdate:k.InequalityTests.DEFAULT,init:function(){if(k.isHash(arguments[0]))this._super.apply(this,arguments);else{var e=Array.prototype.slice.call(arguments),t=e.pop();this._super({dependencies:e,observerCallback:t})}},registerOnDefinition:function(e,t){this._super.apply(this,arguments),this.keyOnObject=t;var n=this;this._invokeObserverCallbackIfNeeded=this._invokeObserverCallbackIfNeeded||=function(){var e=n.dependencies,r=n.observerCallback,i=n.constructor._collector;i.length=e.length;var a=!1;n._shouldForceNextInvocationOfObserverCallback&&(n._shouldForceNextInvocationOfObserverCallback=!1,a=!0);for(var o=0;o<e.length;o++){var s=e[o],c=this.getPath(s),l=`_lastValueSeenByObserver_`+t+`_forDependency_`+s,u=this[l];this[l]=c,!a&&n.decideRequiresUpdate(c,u,s)&&(a=!0),i[o]=c}a&&r.apply(this,i),i.length=0},e[this.keyOnObject]=e[this.keyOnObject]||(e[this.keyOnObject]=function(){n._shouldForceNextInvocationOfObserverCallback=!0,n._invokeObserverCallbackIfNeeded.call(this)});for(var r=this.dependencies,i=0;i<r.length;i++)e.isInitialized?e._observe(r[i],this._invokeObserverCallbackIfNeeded):e._listen(r[i],this._invokeObserverCallbackIfNeeded)},unregisterFromDefinition:function(e,t){this._super.apply(this,arguments);for(var n=this.dependencies,r=0;r<n.length;r++)e._unlisten(n[r],this._invokeObserverCallbackIfNeeded)}}),k.observer=k.ObserverMetadata.create.bind(k.ObserverMetadata),k.Property=k.Metadata.extend({staticMembers:{extend:function(e){return arguments.length!==1||k.isHash(e)?this._super.apply(this,arguments):this._super({defaultValue:e})}},hasAccessors:!0,readOnly:!1,defaultValue:void 0,get:null,set:null,keyOnObject:null,storageKeyOnObject:null,_defaultGetter:function(e){return e},_defaultSetter:function(e){return e},_internalGetterForObject:function(e){return this.get.call(e,e[this.storageKeyOnObject])},_internalSetterForObject:function(e,t){e[this.storageKeyOnObject]=this.set.call(e,t)},init:function(e){var t=this;if(arguments.length!==1||k.isHash(e)?this._super.apply(this,arguments):this._super({defaultValue:e}),this.get||=this._defaultGetter,this.readOnly){if(this.set)throw"Cannot include both `readOnly` and `set`.";this.set=function(e){if(t._isAwakeningInReadOnlyMode)return t._isAwakeningInReadOnlyMode=!1,e;throw`Cannot write to a read-only property`}}else this.set||=this._defaultSetter},registerOnDefinition:function(e,t){this._super.apply(this,arguments),this.keyOnObject=t;var n=this.storageKeyOnObject=`_internalValue_for_`+t;this._internalGetterForObject=this._internalGetterForObject.bind(this),this._internalSetterForObject=this._internalSetterForObject.bind(this);var r=this;Object.defineProperty(e,t,{get:function(){return this.isInitialized?r._internalGetterForObject(this):this[n]},set:function(e){if(!this.isInitialized)return void(this[n]=e);r._internalSetterForObject(this,e)}}),e[t]=this.defaultValue},unregisterFromDefinition:function(e,t){k.reusableObject[t]=void 0;var n=Object.getOwnPropertyDescriptor(k.reusableObject,t);delete k.reusableObject[t],Object.defineProperty(e,t,n),delete e[`_internalValue_for_`+t],this._super.apply(this,arguments)},awakenForObjectWithValue:function(e,t){this.readOnly&&(this._isAwakeningInReadOnlyMode=!0),t instanceof Function&&(t=t.call(e)),e[this.keyOnObject]=t}}),k.property=k.Property.extend.bind(k.Property),k.ObservableProperty=k.Property.extend({isCacheable:!1,dependencies:[],writeDependencies:[],decideRequiresUpdate:k.InequalityTests.DEFAULT,_internalSetterForObject:function(e){this._super.apply(this,arguments),this.invalidateForObject(e)},_internalGetterForObject:function(e){if(!this.isCacheable)return this._super.apply(this,arguments);var t=this.cacheExistenceKeyOnObject;if(e[t])return e[this.cacheStorageKeyOnObject];var n=this._super.apply(this,arguments);return e[t]=!0,e[this.cacheStorageKeyOnObject]=n,n},invalidateForObject:function(e){e[this.cacheExistenceKeyOnObject]=!1,e[this.cacheStorageKeyOnObject]=void 0,e.trigger(this.keyOnObject)},registerOnDefinition:function(e,t){this._super.apply(this,arguments);var n=this;this.cacheStorageKeyOnObject=`_cacheStorageForProperty_`+t,this.cacheExistenceKeyOnObject=`_cacheExistenceForProperty_`+t,k.observer({dependencies:this.dependencies,observerCallback:function(){n.invalidateForObject(this)},decideRequiresUpdate:this.decideRequiresUpdate}).registerOnDefinition(e,`_dependencyObserverForProperty_`+t),this.didChange&&k.observer({dependencies:[t],observerCallback:this.didChange,decideRequiresUpdate:this.decideRequiresUpdate}).registerOnDefinition(e,`_didChangeObserverForProperty_`+t)}}),k.observableProperty=k.ObservableProperty.extend.bind(k.ObservableProperty),k.ProxyProperty=k.ObservableProperty.extend({proxyPath:null,decode:function(e){return e},encode:function(e){return e},init:function(e){var t=typeof e==`string`?e:e.proxyPath;if(!t)throw`A proxyPath must be configured on a ProxyProperty.`;this.dependencies=[t];var n=this;this.get=function(){return n.decode(this.getPath(n.proxyPath))},e&&e.readOnly||(this.set=function(e){this.setPath(n.proxyPath,n.encode(e))}),typeof e==`string`?this._super({proxyPath:e}):this._super.apply(this,arguments)}}),k.proxyProperty=k.ProxyProperty.create.bind(k.ProxyProperty),k.boundFunction=function(e){return k.property(function(){return e.bind(this)})},t.a=k},function(e,t,n){n.d(t,`a`,function(){return r});var r={default:`full`,FULL:`full`,HINT:`hint`,LOOP:`loop`}},function(e,t,n){function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=navigator.userAgent.toLowerCase(),o=/\sedge\//.test(a),s=function(){function e(){r(this,e)}return i(e,null,[{key:`isEdge`,get:function(){return o}}
1,{key:`isChrome`,get:function(){return e._isChrome}},{key:`isSafari`,get:function(){return e._isSafari}},{key:`isFirefox`,get:function(){return e._isFirefox}},{key:`isIE`,get:function(){return e._isIE}},{key:`isIOS`,get:function(){if(e._isIOS)return!0;var t=window.top,n=t.document;return!(!e._macLike||!(`ontouchstart`in t||`createTouch`in n))}}]),e}();t.a=s,s._isChrome=!s.isEdge&&/chrome/.test(a),s._isSafari=!s.isEdge&&!s.isChrome&&/safari/.test(a),s._isFirefox=!s.isEdge&&!s.isChrome&&!s.isSafari&&/firefox/.test(a),s._isIE=!s.isEdge&&!s.isChrome&&!s.isSafari&&!s.isFirefox&&/trident|msie/.test(a),s._isIOS=!!navigator.userAgent.match(/\b(iPad|iPhone|iPod)\b.*\bOS \d+_\d+/i),s._macLike=/mac/i.test(navigator.userAgent)&&!/like mac/i.test(navigator.userAgent)},function(e,t,n){var r=n(10),i=n(1);n.d(t,`a`,function(){return a});var a={_mappingToLocalizedStrings:{live:`Live`,get bounce(){return r.a.getString(`VideoEffects.Badge.Title.Bounce`)},get exposure(){return r.a.getString(`VideoEffects.Badge.Title.LongExposure`)},get loop(){return r.a.getString(`VideoEffects.Badge.Title.Loop`)}},_mappingToPlaybackStyle:{bounce:i.a.LOOP,exposure:i.a.FULL,live:i.a.FULL,loop:i.a.LOOP},default:`live`,BOUNCE:`bounce`,EXPOSURE:`exposure`,LIVE:`live`,LOOP:`loop`,toBadgeText:function(e){return this.toLocalizedString(e).toLocaleUpperCase()},toLocalizedString:function(e){return this._mappingToLocalizedStrings[e||a.default]},toPlaybackStyle:function(e){return this._mappingToPlaybackStyle[e||i.a.default]}}},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(0),a=n(7),o=n(39),s=n(38),c=n(40),l=n(9),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=i.a.Object.extend({layerName:null,renderLayerClass_dom:null,renderLayerMixin:{},init:function(e){this._super(),this.renderLayerMixin=e},getRenderLayer:function(e,t){return this[`renderLayerClass_`+e.approach].extend(this.renderLayerMixin,{layerName:this.layerName}).create(e,t)}}),f=d.extend({renderLayerClass_dom:o.a}),p=d.extend({renderLayerClass_dom:s.a}),m=d.extend({renderLayerClass_dom:c.a}),h=i.a.Object.extend({staticMembers:{PhotoIngredient:f,InterpolatedVideoIngredient:p,VideoIngredient:m,computedStyle:a.a.computedStyle,getRecipeFromPlaybackStyle:function(e){return this._recipesByPlaybackStyle[e]},registerRecipeWithPlaybackStyle:function(e,t){this._recipesByPlaybackStyle=u({},this._recipesByPlaybackStyle,r({},t,e))}},correspondingPlaybackStyle:null,get name(){return`recipe_for_playbackStyle_`+this.correspondingPlaybackStyle},minimumShortenedDuration:0,spontaneousFinishDuration:0,ingredients:null,requiresInterpolation:!1,init:function(e){for(var t in this.ingredients=[],this._super(),e)if(e.hasOwnProperty(t)){var n=e[t];this[t]=n,d.isClassFor(n)&&(n.layerName=t,this.ingredients.push(n))}this.correspondingPlaybackStyle&&h.registerRecipeWithPlaybackStyle(this,this.correspondingPlaybackStyle)},getRenderLayers:function(e){for(var t,n=[],r=0;t=this.ingredients[r];r++)t.isDisabled||n.push(t.getRenderLayer(e,this));return n},beginFinishingPlaybackEarly:function(e){if(!e.isPlaying)return void(e.wantsToPlay=!1);e.duration=Math.min(e.duration,Math.max(this.minimumShortenedDuration,e.currentTime+this.spontaneousFinishDuration))},calculateAnimationDuration:function(e,t,n){return t||0},continuePlayback:function(e){e.currentTime<e.duration?e._rafID=requestAnimationFrame(e._nextFrame.bind(e)):(e.stop(),e.dispatchEvent(n.i(l.f)()))},register:function(){},requestMoreCompatibleRecipe:function(){return this}});t.a=h},function(e,t,n){var r=n(12);t.a={debug:function(e){r.a&&console.debug.apply(console,arguments)},log:function(e){r.a&&console.log.apply(console,arguments)},info:function(e){r.a&&console.info.apply(console,arguments)},warn:function(e){console.warn.apply(console,arguments)},error:function(e){console.error.apply(console,arguments)}}},function(e,t,n){n.d(t,`a`,function(){return r});var r;
1(function(e){e[e.FAILED_TO_DOWNLOAD_RESOURCE=0]=`FAILED_TO_DOWNLOAD_RESOURCE`,e[e.PHOTO_FAILED_TO_LOAD=1]=`PHOTO_FAILED_TO_LOAD`,e[e.VIDEO_FAILED_TO_LOAD=2]=`VIDEO_FAILED_TO_LOAD`})(r||={})},function(e,t,n){var r=n(8),i=n(0);t.a=r.a.extend({_hasBeenDisposed:!1,staticMembers:{computedStyle:function(e){return e._lpk_isComputedStyle=!0,e}},recipe:i.a.observableProperty(),renderer:i.a.observableProperty(),duration:i.a.proxyProperty(`renderer.duration`),canRender:i.a.observableProperty(!1),computedStyles:i.a.property(function(){return[]}),displayWidth:0,displayHeight:0,shouldLoop:!1,init:function(e,t){for(var n in this.renderer=e,this.recipe=t,this._super(),this){var r=this[n];r&&r._lpk_isComputedStyle&&this.computedStyles.push({styleKey:n,getter:r})}},updateSize:function(e,t){if(!arguments.length)return this.updateSize(this.displayWidth,this.displayHeight);this.displayWidth=e,this.displayHeight=t},setUpForRender:function(){},tearDownFromRender:function(){this.reduceMemoryFootprint()},reduceMemoryFootprint:function(){},_canRenderDidChange:i.a.observer(`canRender`,`renderer._lastRecipe`,function(e,t){var n=this.recipe,r=this.renderer;this._hasBeenDisposed||(!e||!t||t!==n&&r._hasInitialized?this.tearDownFromRender():(r._hasInitialized=!0,this.setUpForRender(),this.updateSize()))}),prepareToRenderAtTime:function(){return!0},canRenderAtTime:function(){return!0},renderAtTime:function(e){if(!arguments.length)return this.renderAtTime(this._lastRenderedTime);this._lastRenderedTime=e;for(var t,n=0;t=this.computedStyles[n];n++)t.value=t.getter.call(this,e);this.renderStyles(this.computedStyles)},renderStyles:function(e){},dispose:function(){this.detach(),this._hasBeenDisposed=!0}})},function(e,t,n){var r=n(0);t.a=r.a.Object.extend({element:null,_lpk_isView:!0,tagName:`div`,eventDispatchingElement:null,init:function(e){e?this.element=e:this.tagName&&(this.element=document.createElement(this.tagName)),this._super()},attachInto:function(e,t,n){if(!this.element)return void(this.parentView=e);t||=e.element,n&&n._lpk_isView&&(n=n.element),n?t.insertBefore(this.element,n):t.appendChild(this.element),this.parentView=e},detach:function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.parentView=null},dispatchEvent:function(e){var t=this.eventDispatchingElement||this.element;if(!t)throw`Cannot dispatch an event from a view with no DOM element.`;t.dispatchEvent.call(t,e)},parentView:r.a.observableProperty(null)})},function(e,t,n){function r(e){return function(t){return new CustomEvent(e,{detail:t})}}var i=n(14);n.d(t,`a`,function(){return a}),n.d(t,`b`,function(){return o}),n.d(t,`f`,function(){return s}),n.d(t,`e`,function(){return c}),n.d(t,`c`,function(){return l}),n.d(t,`d`,function(){return u}),function(){function e(e,t){t||={bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent(`CustomEvent`);return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}if(typeof window.CustomEvent==`function`)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}();var a=r(i.a.LIVEPHOTOSKIT_LOADED),o=r(`canplay`),s=r(`ended`),c=r(`error`),l=r(`photoload`),u=r(`videoload`)},function(e,t,n){var r=n(0),i=`ar-sa.ca-cs.cs-cz.da-dk.nl-nl.pt-br.pt-pt.no-no.el-gr.en-us.fi-fi.fr-fr.de-de.he-il.hr-hr.hu-hu.id-id.it-it.ja-jp.ko-kr.ms-my.pl-pl.ro-ro.ru-ru.zh-cn.zh-tw.sk-sk.es-es.sv-se.th-th.tr-tr.uk-ua.vi-vi`.split(`.`),a={"es-419":`es-es`,pt:`pt-pt`,no:`no-no`,nb:`no-no`,nn:`no-no`,zh:`zh-cn`,"zh-Hans":`zh-cn`,"zh-Hant":`zh-tw`,"zh-HK":`zh-tw`,"zh-MO":`zh-tw`,"zh-SG":`zh-cn`},o={};for(var s in a){var c=a[s],l=o[c]||[];o[c]=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(l),[s])}for(var u={},d=0;d<i.length;d++){var f=i[d];try{var p=n(21)(`./`+f+`.lproj/strings.json`),m=f.split(`-`)[0],h=o[f];if(u[f]=p,u[m]||(u[m]=p),h)for(var g in h)u[g]=p}catch{}}var _=r.a.Object.extend({locale:r.a.observableProperty({get:function(e){return e||window.navigator.language},set:function(e){return e}}),getString:function(e){var t=_.locale,n=_.strings;return(n[t]||n[`en-us`])[e]||``},strings:u}).create();t.a=_},function(e,t,n){function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function i(e){var t=parseFloat(e);
1if(+t===t)return t;var n=e===`true`||e!==`false`&&void 0;return!!n===n?n:e}var a=n(27),o=n(0),s=n(5),c=n(1),l=n(3),u=n(12);n.d(t,`a`,function(){return b}),n.d(t,`b`,function(){return x}),n.d(t,`c`,function(){return S});var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=`property`,p={play:`method`,pause:`method`,stop:`method`,toggle:`method`,beginFinishingPlaybackEarly:`method`,isPlaying:`read_only_property`,wantsToPlay:`read_only_property`,currentTime:`read_only_property`,renderedTime:`read_only_property`,duration:`read_only_property`,autoplay:f,caption:f,playbackStyle:f,preloadedEffectType:f,updateSize:`method`,photoWidth:`read_only_property`,photoHeight:`read_only_property`,videoWidth:`read_only_property`,videoHeight:`read_only_property`,effectType:f,proactivelyLoadsVideo:f,photoSrc:f,photoMimeType:f,videoSrc:f,videoMimeType:f,metadataVideoSrc:f,photo:f,video:f,photoTime:f,frameTimes:f,videoRotation:f,canPlay:`read_only_property`,loadProgress:`read_only_property`,errors:`read_only_property`,showsNativeControls:f,observe:`method`};delete p.observe;var m=function(){var e=[];for(var t in p)p.hasOwnProperty(t)&&e.push(t);return e}(),h={},g=m.map(function(e){var t=`data-`+o.a.String.hyphenate(e);return h[t]=e,t}),_=m.map(function(e){return p[e]}),v={enumerable:!1,configurable:!1,writable:!1},y={enumerable:!1,configurable:!1},b=function(e,t){if(!e)return s.a.warn(`LivePhotosKit.augmentElementAsPlayer requires a target element to augment.`),null;if(e.tagName===`IMG`){var n=document.createElement(`div`),r=e.parentNode,b=e.getAttribute(`src`),x=e.getAttribute(`photo-src`)||b;e.removeAttribute(`src`),e.setAttribute(`data-photo-src`,x);for(var S=e.attributes,w=0;w<S.length;w++){var T=S[w],E=T.nodeName,D=T.value;n.setAttribute(E,D)}r.insertBefore(n,e),r.removeChild(e),e=n}var O=void 0,k=void 0,A=e;if(A.__isLPKPlayer__)return A;v.value=!0,Object.defineProperty(A,"__isLPKPlayer__",v),A.setProperties=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};u.a&&!e.videoSrc&&e.photoSrc?s.a.warn("Changing a `photoSrc` independent of its `videoSrc` can result in unexpected behavior"):u.a&&e.videoSrc&&!e.photoSrc&&s.a.warn("Changing a `videoSrc` independent of its `photoSrc` can result in unexpected behavior");var t=d({},k?{photoSrc:k.photo,videoSrc:k.videoSrc,effectType:k.effectType,autoplay:k.autoplay,proactivelyLoadsVideo:k.proactivelyLoadsVideo}:{}
1,e),n=(t.photoSrc,t.videoSrc,t.effectType),r=t.autoplay,i=t.proactivelyLoadsVideo;O=o.a.objectPool.get(),t.preloadedEffectType=n,t.autoplay=!1!==r;var m=n||l.a.default;for(var h in l.a.toPlaybackStyle(m)===c.a.LOOP&&t.autoplay&&(u.a&&!i&&s.a.warn("When using a looping asset you should set `proactivelyLoadsVideo` to `true` unless `autoplay` is also set to `false`"),t.proactivelyLoadsVideo=!0),t)Object.prototype.hasOwnProperty.call(t,h)&&(p[h]===f?O[h]=t[h]:s.a.warn("LivePhotosKit.Player: Initial configuration for `"+h+"` was ignored, because the property is not a writable property."));if(k)for(var g in O){var _=O[g];k[g]=_}else k=a.a.create(A,O);o.a.objectPool.ret(O),O=null},A.setProperties(t);for(var j,M,N=0;(j=m[N])&&(M=_[N]);N++)(function(e,t,n){n===`method`?(v.value=k[t].bind(k),Object.defineProperty(A,t,v)):(y.set=n===f?function(e){k[t]=e}:function(){},y.get=function(){return k[t]},Object.defineProperty(A,t,y))})(0,j,M);v.value=function(){var e=arguments.length,t=arguments[e-1];if(e<1||!(t instanceof Function))throw Error("Invalid arguments passed to `observe`. Form: key, [key, â¦], callback.");for(var n=o.a.arrayPool.get(),r=0,i=e;r<i;r++)n[r]=arguments[r];for(var a=0,s=e-1;a<s;a++){var c=p[n[a]];if(c!==f&&c!==`read_only_property`)throw Error(`Can't observe non-observable property '`+n[a]+`'.`)}n[e-1]=t.bind(this);var l=k.observe.apply(k,n);return o.a.arrayPool.ret(n),new C(l,k)},Object.defineProperty(A,"observe",v);for(var j,M,P,N=0;(j=m[N])&&(M=_[N])&&(P=g[N]);N++)if(M===f){var F=A.getAttribute(P);F&&(j===`effectType`?k.preloadedEffectType=i(F):k[j]=i(F))}var I=A.setAttribute;v.value=function(e,t){var n=h[e];if(!n)return void I.apply(this,arguments);this[n]=i(t)},Object.defineProperty(A,"setAttribute",v);var L=A.removeAttribute;v.value=function(e){var t=h[e];if(!t)return L.apply(this,arguments);this[t]=null},Object.defineProperty(A,"removeAttribute",v);for(var R,z,B,V=0;(R=m[V])&&(z=_[V])&&(B=g[V]);V++)(function(e,t,n,r){if(n!==f&&n!==`read_only_property`)return`continue`;A.observe(t,function(e){e==null||typeof e!=`string`&&+e!==e&&typeof e!=`boolean`?L.call(this,r):I.call(this,r,String(e))})})(0,R,z,B);return A.getAttribute(`data-live-photo`)!==``&&A.setAttribute(`data-live-photo`,``),v.value=k,Object.defineProperty(A,"__internalLPKPlayer__",v),v.value=void 0,y.set=y.get=void 0,A},x=function(e){return b(document.createElement(`div`),e)},S=function(e,t){if(arguments.length>=3||typeof arguments[0]==`string`&&typeof arguments[1]==`string`)throw Error(`LivePhotosKit.Player: Creating a new Player using arguments of the form 'photoSrc, videoSrc, [targetElement, [options]]' is no longer supported. Instead, use the new signature, '[targetElement, [options]]`);return s.a.warn("The `LivePhotosKit.Player` method will be deprecated
1in an upcoming release. Please use the `LivePhotosKit.augementElementAsPlayer` or `LivePhotosKit.createPlayer` methods, instead."),e?b(e,t):x(t)},C=function e(t,n){r(this,e),this.fire=function(){n[t.keyOnObject]()},this.disconnect=function(){t.unregisterFromDefinition(n)},this.connect=function(){t.registerOnDefinition(n)}}},function(e,t,n){var r=/_lpk_debug=true/i;t.a=r.test(window.location.search)||r.test(window.location.hash)},function(e,t,n){t.a={setUpForRender:function(){this.attachInto(this.renderer)},tearDownFromRender:function(){this.detach(),this._super()},renderStyles:function(e){for(var t,n=this.element.style,r=0;t=e[r];r++){var i=t,a=i.styleKey,o=i.value;n[a]!==o&&(n[a]=o)}}}},function(e,t,n){var r=n(55),i=n(56),a=n(57);t.a={APP_NAME:`LivePhotosKit`,BUILD_NUMBER:r.a,MASTERING_NUMBER:i.a,FEEDBACK_URL_PREFIX:`https://feedbackws.icloud.com`,LIVEPHOTOSKIT_LOADED:`livephotoskitloaded`,URL_PREFIX:`https://cdn.apple-livephotoskit.com`,VERSION:a.a}},function(e,t,n){function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var i=n(3),a=n(50),o=n(18),s=n(10),c=n(1);n.d(t,`a`,function(){return d});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u={element:null,label:``,labelPadding:6,leftPadding:5,height:25,backgroundColor:`rgba(255, 255, 255, 0.7)`,itemColor:`rgb(0, 0, 0)`,fontSize:9,borderRadius:5,dottedRadius:8.5,innerRadius:5.25,zIndex:4,shouldAnimateProgressRing:!0,progressRingAnimationSpeed:300,shouldAddEventListeners:!0,effectType:null,playbackStyle:null,configurePlayAction:n.i(a.a)(),configureStopAction:n.i(a.a)()},d=function(){function e(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r(this,e),this._setInstanceProps(n),this._createCanvas(),this.redraw(),this._addEventListeners(),s.a.observe(`locale`,function(){return t.updateBadgeText()})}return l(e,[{key:`attachPlayerInstance`,value:function(e){e.attachBadgeView(this),this.updateBadgeText(e.effectType)}},{key:`redraw`,value:function(){var e=this.progress;e>0&&this.shouldAnimateProgressRing?this._animateProgressRing():this._redraw(e)}},{key:`reset`,value:function(){var e=this._requestedFrame;e&&cancelAnimationFrame(e),this._progress=0,this._previousProgress=0,this.redraw()}},{key:`appendTo`,value:function(e){e.appendChild(this.element)}},{key:`updateAriaLabel`,value:function(){var e=i.a.toLocalizedString(this.effectType),t=s.a.getString(`VideoEffects.Badge`);this.element.setAttribute(`aria-label`,t+`: `+e)}},{key:`updateBadgeText`,value:function(e){e?this.effectType=e:e=this.effectType,this.label=e?i.a.toBadgeText(e):``,this.playbackStyle=i.a.toPlaybackStyle(e),this.updateAriaLabel(),this._redraw()}},{key:`_createCanvas`,value:function(){var e=this.element;if(e){if(e.tagName.toLowerCase()!==`canvas`)throw Error(`Backing element for LivePhotoBadge needs to be an HTMLCanvasElement.`)}else e=this.element=document.createElement(`canvas`);e.setAttribute(`role`,`button`),this.updateAriaLabel(),e.classList.add(`lpk-badge`),this._context=e.getContext(`2d`)}},{key:`_setCanvasSize`,value:function(){var e=this.element,t=o.a(),n=this.height,r=this.width;e.height=n*t,e.width=r*t,e.style.height=n+`px`,e.style.width=r+`px`}},{key:`_setInstanceProps`,value:function(e){var t={};for(var n in u)t.hasOwnProperty.call(u,n)&&(this[n]=e.hasOwnProperty(n)?e[n]:u[n]);this.defaultProps=u}},{key:`_redraw`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=(this.element,this.label).toLowerCase()||i.a.default;this._setCanvasSize(),this._context.clearRect(0,0,this.width,this.height),this._drawBackground(),this._drawLabel(),this.shouldShowError||(this._drawInnerCircle(),i.a.toPlaybackStyle(t)===c.a.LOOP?this._drawLoopCircle():this._drawPlayArrow()),this.shouldShowError?(this._drawProgressRing(1),this._drawErrorSlash()):this.progress>0?this._drawProgressRing(e):this._drawDottedCircle()}},{key:`_drawBackground`,value:function(){var e=o.a(),t=this._context,n=this.borderRadius*e,r=this.width*e,i=this.height*e;t.beginPath(),t.moveTo(n,0),t.lineTo(r-n,0),t.quadraticCurveTo(r,0,r,n),t.lineTo(r,i-n),t.quadraticCurveTo(r,i,r-n,i),t.lineTo(n,i),t.quadraticCurveTo(0,i,0,i-n),t.lineTo(0,n),t.quadraticCurveTo(0,0,n,0
1),t.closePath(),t.fillStyle=this.backgroundColor,t.fill()}},{key:`_drawDottedCircle`,value:function(){for(var t=e.numberOfDots,n=this.dottedRadius*o.a(),r=0;r<t;r++){var i=this.x0+n*Math.cos(2*Math.PI*r/t),a=this.y0+n*Math.sin(2*Math.PI*r/t);this._drawDot(i,a)}}},{key:`_drawDot`,value:function(e,t){var n=this._context,r=o.a()===1?1:1.25;n.beginPath(),n.arc(e,t,r,0,2*Math.PI),n.fillStyle=this.itemColor,n.fill()}},{key:`_drawInnerCircle`,value:function(){var e=o.a(),t=this._context,n=this.innerRadius*e;t.beginPath(),t.arc(this.x0,this.y0,n,0,2*Math.PI),t.lineWidth=e===1?1.25:1.5,t.strokeStyle=this.itemColor,t.stroke()}},{key:`_drawPlayArrow`,value:function(){var e=o.a(),t=this._context,n=5*e,r=4*e,i=this.x0+.5*e,a=this.y0;t.beginPath(),t.moveTo(i-r/2,a-n/2),t.lineTo(i+r/2,a),t.lineTo(i-r/2,a+n/2),t.fillStyle=this.itemColor,t.fill()}},{key:`_drawLoopCircle`,value:function(){var e=o.a(),t=this._context,n=2*e;t.beginPath(),t.arc(this.x0,this.y0,n,0,2*Math.PI),t.fillStyle=this.itemColor,t.fill()}},{key:`_drawLabel`,value:function(){var e=o.a(),t=this._context,n=(this.leftPadding+2*this.dottedRadius+this.labelPadding)*e,r=(this.height/2+4.5)*e;t.fillStyle=this.itemColor,t.font=this.fontStyle,t.fillText(this.label,n,r)}},{key:`_drawProgressRing`,value:function(e){var t=o.a(),n=this._context,r=this.dottedRadius*t,i=2*Math.PI*.75,a=(.75+e)*(2*Math.PI);n.beginPath(),n.arc(this.x0,this.y0,r,i,a,!1),n.lineWidth=1.5*t,n.strokeStyle=this.itemColor,n.stroke()}},{key:`_drawErrorSlash`,value:function(){var e=o.a(),t=this._context,n=this.dottedRadius*e*Math.sqrt(2)/2;t.beginPath(),t.moveTo(this.x0+n,this.y0+n),t.lineTo(this.x0-n,this.y0-n),t.lineWidth=1.5*e,t.strokeStyle=this.itemColor,t.stroke()}},{key:`_animateProgressRing`,value:function(){var e=this,t=this.progress,n=this._previousProgress||0,r=Math.abs(t-n),i=t<n;i&&(t=n,n=this.progress);for(var a=r*this.progressRingAnimationSpeed/(1e3/60),o=r/a,s=[],c=0,l=a;c<l;c++)s.push(n+c*o);s[s.length-1]=t,i&&s.reverse(),(function t(){var n=s.shift();e._redraw(n),s.length&&(e._requestedFrame=window.requestAnimationFrame(t)),n===1&&window.setTimeout(function(){e.progress=0},.25*e.progressRingAnimationSpeed)})()}},{key:`_addEventListeners`,value:function(){var e=this,t=this.element,n=void 0;t.addEventListener(`mouseup`,function(){n=window.setTimeout(function(){e.configurePlayAction()},0)}),t.addEventListener(`mouseenter`,function(){n=window.setTimeout(function(){e.configurePlayAction()},0)}),t.addEventListener(`mouseleave`,function(){n&&window.clearTimeout(n),e.configureStopAction()})}},{key:`width`,get:function(){var e=this._context;if(!e)return 0;var t=this.dottedRadius,n=this.fontStyle,r=this.label,i=this.labelPadding,a=this.leftPadding;e.font=n;var s=e.measureText(r);this._textMetrics=s;var c=r.length>0?s.width:0;return this._width=(c>2?a:-2)+2*t+2*i+Math.ceil(c/o.a())}},{key:`fontStyle`,get:function(){return this.fontSize*o.a()+`pt/1 system, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica`}},{key:`x0`,get:function(){return(this.dottedRadius+this.leftPadding)*o.a()}},{key:`y0`,get:function(){return this.height/2*o.a()}},{key:`progress`,set:function(e){typeof e==`number`&&(this._previousProgress=this._progress,this._progress=e,this.redraw())},get:function(){return this._progress}},{key:`shouldShowError`,set:function(e){this._shouldShowError=!!e,this._redraw(this.progress)},get:function(){return this._shouldShowError}}],[{key:`numberOfDots`,get:function(){return o.a()===1?17:26}}]),e}()},function(e,t,n){var r=n(30),i=n(0),a=n(6);t.a=r.a.extend({mimeType:i.a.observableProperty({dependencies:[`_mimeTypeFromXHR`],get:function(e){return this._mimeTypeFromXHR||e||null}}),_mimeTypeFromXHR:i.a.observableProperty(),requiresMimeTypeForRawArrayBufferSrc:!0,exposedMimeTypeKeyForErrorStrings:`mimeType`,exposedSrcKeyForErrorStrings:`src`,abortCurrentLoad:function(){this.__xhr&&(this._detachXHR(),this._xhr.abort()),this._mimeTypeFromXHR=null,this.abortCurrentSecondaryLoad()},loadSrc:function(e){if(typeof e==`string`){this._mimeTypeFromXHR=null,this._attachXHR();var t=this._xhr;t.open(`GET`,e),t.responseType=`arraybuffer`,t.send(null)}else if(e instanceof ArrayBuffer){if(!this.mimeType&&this.requiresMimeTypeForRawArrayBufferSrc)throw Error("MIME Type must be assigned to `"+this.exposedMimeTypeKeyForErrorStrings+"` prior to assigning a raw ArrayBuffer to `"+this.exposedSrcKeyForErrorStrings+"`.");this.beginSecondaryLoad(e,this.mimeType)}},get _xhr(){var e=this.__xhr;return e||=this.__xhr=new XMLHttpRequest,e},_detachXHR:function(){var e=this._xhr;e.removeEventListener(`progress`,this._xhrProgress),e.removeEventListener(`readystatechange`,this._xhrReadyStateChanged)},_attachXHR:function(){var e=this._xhr;e.addEventListener(`progress`,this._xhrProgress),e.addEventListener(`readystatechange`,this._xhrReadyStateChanged)},_xhrReadyStateChanged:function(){if(this.state===`loading`){if(this._xhr.readyState>=2&&this._xhr.status!==200){var e=Error(`Failed to download resource from URL assigned to '`+this.exposedSrcKeyForErrorStrings+`'.`);
1return e.errCode=a.a.FAILED_TO_DOWNLOAD_RESOURCE,this.loadDidFail(e)}return this._xhr.readyState===4&&this._xhr.status===200?this._xhrLoadDidFinish():void 0}},_xhrProgress:function(e){if(e&&e.total){var t=(+e.loaded||0)/e.total;+t===t&&(this.progress=Math.max(0,Math.min(1,t)))}},_xhrLoadDidFinish:function(){this._mimeTypeFromXHR=this._xhr.getResponseHeader(`Content-Type`),this.beginSecondaryLoad(this._xhr.response,this.mimeType)},beginSecondaryLoad:function(e,t){this._defaultSecondaryLoadTimeout=setTimeout(this.loadDidSucceed.bind(this,e),0)},abortCurrentSecondaryLoad:function(){this._defaultSecondaryLoadTimeout&&=(clearTimeout(this._defaultSecondaryLoadTimeout),null)},init:function(){this._xhrReadyStateChanged=this._xhrReadyStateChanged.bind(this),this._xhrProgress=this._xhrProgress.bind(this),this._super()}})},function(e,t,n){var r=n(2);t.a=r.a.isEdge||r.a.isIE},function(e,t,n){function r(){c.forEach(function(e){return e()})}function i(e){c.push(e)}function a(){return window.devicePixelRatio}function o(){return Math.ceil(a())}t.b=i,t.a=o;var s=void 0,c=[];(function(){window.matchMedia&&(s=window.matchMedia(`only screen and (-webkit-min-device-pixel-ratio:1.3),only screen and (-o-min-device-pixel-ratio:13/10),only screen and (min-resolution:120dpi)`),s.addListener(r))})()},function(e,t,n){function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.a=function(){function e(t){var n=this;r(this,e),this._k=[],this._v=[],t&&t._k.forEach(function(e){n.set(e,t.get(e))})}return i(e,[{key:`_indexOfKey`,value:function(e){return this._k.indexOf(e)}},{key:`get`,value:function(e){var t=this._indexOfKey(e);return t===-1?void 0:this._v[t]}},{key:`set`,value:function(e,t){var n=this._indexOfKey(e);return n===-1&&(n=this._k.push(e)-1),this._v[n]=t,this}},{key:`delete`,value:function(e){var t=this._indexOfKey(e);return t!==-1&&(this._k.splice(t,1),this._v.splice(t,1),!0)}},{key:`clear`,value:function(){this._k.length>0&&(this._k.length=0,this._v.length=0)}}]),e}()},function(e,t,n){function r(e){if(e===null)return`_null`;if(e===void 0)return`_undefined`;if(e.hasOwnProperty(`_LPKGUID`))return e._LPKGUID;var t=e===void 0?`undefined`:i(e);switch(t){case`number`:Object.is(e,-0)&&(e=`-0`);case`string`:case`boolean`:return t+e;case`object`:case`function`:o++;var n=t+o;return a.value=n,Object.defineProperty(e,"_LPKGUID",a),n;default:throw`unrecognized object type`}}t.a=r;var i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},a={value:``,enumerable:!1,writable:!1,configurable:!1},o=0},function(e,t,n){function r(e){return n(i(e))}function i(e){var t=a[e];if(!(t+1))throw Error(`Cannot find module '`+e+`'.`);return t}var a={"./en-us.lproj/strings.json":22};r.keys=function(){return Object.keys(a)},r.resolve=i,e.exports=r,r.id=21},function(e,t){e.exports={"VideoEffects.Badge":`Badge`,"VideoEffects.Badge.Title.Loop":`Loop`,"VideoEffects.Badge.Title.Bounce":`Bounce`,"VideoEffects.Badge.Title.LongExposure":`Long Exposure`}},function(e,t,n){var r=n(28),i=n(32),a=n(34),o=n(37),s=n(35),c=n(4),l=n(0),u=n(8),d=n(5),f=n(1);a.a.register(),o.a.register(),s.a.register(),t.a=u.a.extend({approach:``,autoplay:!0,caption:``,_hasInitialized:!1,_lastRecipe:null,recipe:l.a.observableProperty({get:function(){var e=c.a.getRecipeFromPlaybackStyle(this.playbackStyle);return this._setRecipe(e),e},set:function(e){this._setRecipe(e)}}),_setRecipe:function(e){e&&e!==this._lastRecipe&&(this._lastRecipe=e,this.setUpRenderLayers())},requestMoreCompatibleRecipe:function(){this.recipe=this.recipe.requestMoreCompatibleRecipe()},duration:l.a.observableProperty({dependencies:[`recipe`,`provider.videoDuration`,`provider.photoTime`],get:function(e){var t=this.recipe,n=this.provider,r=n.photoTime,i=n.videoDuration;return t?t.calculateAnimationDuration(e,i,r):0}}),displayWidth:0,displayHeight:0,get backingWidth(){return Math.round(this.displayWidth*devicePixelRatio)},get backingHeight(){return Math.round(this.displayHeight*devicePixelRatio)},get renderLayerWidth(){return this.displayWidth},get renderLayerHeight(){return this.displayHeight},get videoWidth(){return this.videoDecoder.videoWidth},get videoHeight(){return this.videoDecoder.videoHeight},photoWidth:l.a.proxyProperty(`photo.width`),photoHeight:l.a.proxyProperty(`photo.height`),photo:l.a.proxyProperty(`provider.photo`),video:l.a.proxyProperty(`provider.video`),photoTime:l.a.proxyProperty(`provider.photoTime`),frameTimes:l.a.proxyProperty(`provider.frameTimes`),effectType:l.a.proxyProperty(`provider.effectType`),preloadedEffectType:l.a.proxyProperty(`provider.preloadedEffectType`),playbackStyle:l.a.proxyProperty(`provider.playbackStyle`),currentTime:l.a.observableProperty({defaultValue:0,dependencies:[`duration`],get:function(e){return Math.min(this.duration||0,Math.max(0,e||0))},didChange:function(e){this.prepareToRenderAtTime(e)}}),canRenderCurrentTime:l.a.observableProperty({readOnly:!0,dependencies:[`currentTime`],get:function(){return this.canRenderAtTime(this.currentTime)}}),_currentTimeRenderObserver:l.a.observer(`currentTime`,`canRenderCurrentTime`,function(e,t){t&&(this.renderedTime=e)}),renderedTime:l.a.observableProperty({defaultValue:0,didChange:function(e){this.renderAtTime(e),this.currentTime=e}}),areAllRenderLayersPrepared:l.a.observableProperty({defaultValue:!1}),isFullyPreparedForPlayback:l.a.observableProperty({readOnly:!0,dependencies:[`video`,`areAllRenderLayersPrepared`,`photoTime`,`frameTimes`,`playbackStyle`],get:function(){return!!(this.video&&this.areAllRenderLayersPrepared&&(this.photoTime||this.playbackStyle!==f.a.HINT)&&Array.isArray(this.frameTimes))}}),cannotRenderDueToMissingPhotoTimeOrFrameTimes:l.a.observableProperty({readOnly:!0,dependencies:[`video`,`areAllRenderLayersPrepared`,`photoTime`,`frameTimes`,`playbackStyle`],get:function(){return!!(this.video&&this.areAllRenderLayersPrepared&&(!this.photoTime&&this.playbackStyle===f.a.HINT||!Array.isArray(this.frameTimes)))}}),renderLayers:l.a.property(function(){return[]}),videoDecoder:l.a.observableProperty(function(){return this._videoDecoderClass.create({owner:this})}),_videoDecoderClass:r.a.extend({owner:l.a.observableProperty(),provider:l.a.proxyProperty(`owner.provider`)}),provider:l.a.observableProperty(function(){return i.a.create()}),init:function(){this._super(),this.element.className=((this.element.className||``)+` lpk-live-photo-renderer`).trim(),this.element.style.position=`absolute`,this.element.style.overflow=`hidden`,this.element.style.textAlign=`left`},updateSize:function(e,t){if(!arguments.length)return void(this.displayWidth&&this.displayHeight&&this.updateSize(this.displayWidth,this.displayHeight));this.displayWidth=e=Math.round(e),this.displayHeight=t=Math.round(t),this.element.style.width=e+`px`,this.element.style.height=t+`px`;for(var n,r=0;n=this.renderLayers[r];r++)n.updateSize(this.renderLayerWidth,this.renderLayerHeight)},_imageOrVideoDidEnterOrLeave:l.a.observer(`videoDecoder.canProvideFrames`,`photo`,function(){this.prepareToRenderAtTime(this.currentTime)}),prepareToRenderAtTime:l.a.boundFunction(function(e){this.propertyChanged(`canRenderCurrentTime`);for(var t,n=!0,r=0;t=this.renderLayers[r];r++)n=t.prepareToRenderAtTime(e)&&n;this.areAllRenderLayersPrepared=n}),canRenderAtTime:function(e){if(e===0)return!0;
1if(!this.duration&&e)return!1;for(var t,n=!0,r=``,i=0;t=this.renderLayers[i];i++)t.canRenderAtTime(e)||(n=!1,r+=(r?`, `:`Cannot render; waiting for `)+t.layerName);return r&&d.a.log(r+`.`),n},renderAtTime:function(e){if(this.duration)for(var t,n=0;t=this.renderLayers[n];n++)t.renderAtTime(e)},getNewRenderLayers:function(){return this.recipe.getRenderLayers(this)},setUpRenderLayers:function(){var e=this.renderLayers;e&&this._cleanUpRenderLayers(e),this.renderLayers=this.getNewRenderLayers(),this.updateSize(),this.currentTime=0,this.prepareToRenderAtTime(0)},_cleanUpRenderLayers:function(e){for(var t,n=0;t=e[n];n++)t.dispose(),t.tearDownFromRender()},reduceMemoryFootprint:function(){for(var e,t=0;e=this.renderLayers[t];t++)e.reduceMemoryFootprint()},_clearRetainedFramesWhenNecessary:l.a.observer(`provider.videoRotation`,`provider.frameTimes`,function(){this.reduceMemoryFootprint(),this.prepareToRenderAtTime(this.currentTime)})})},function(e,t,n){t.a=n(23).a.extend({approach:`dom`})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(9),a=n(10),o=n(11);n.d(t,`augmentElementAsPlayer`,function(){return o.a}),n.d(t,`createPlayer`,function(){return o.b}),n.d(t,`Player`,function(){return o.c});var s=n(6);n.d(t,`Errors`,function(){return s.a});var c=n(15);n.d(t,`LivePhotoBadge`,function(){return c.a});var l=n(1);n.d(t,`PlaybackStyle`,function(){return l.a}),n.d(t,`Localization`,function(){return u}),n.d(t,`BUILD_NUMBER`,function(){return d}),n.d(t,`MASTERING_NUMBER`,function(){return f}),n.d(t,`VERSION`,function(){return p}),n.d(t,`LIVEPHOTOSKIT_LOADED`,function(){return m});var u={get locale(){return a.a.locale},set locale(e){a.a.locale=e}},d=r.a.BUILD_NUMBER,f=r.a.MASTERING_NUMBER,p=r.a.VERSION,m=r.a.LIVEPHOTOSKIT_LOADED,h=typeof window<`u`&&typeof document<`u`;if(h){var g=window.document;if(setTimeout(function(){return g.dispatchEvent(n.i(i.a)())}),g.styleSheets&&document.head){for(var _=null,v=null,y=0;y<g.styleSheets.length;++y)try{var b=g.styleSheets[y];if(b.cssRules)for(var x=0;x<b.cssRules.length;++x){var S=b.cssRules[x];if(S.cssText.indexOf(`.lpk-live-photo-player`)!==-1){_=S;break}}if(_){v=b;break}}catch(e){if(e.name!==`SecurityError`&&e.message.substring(0,17)!==`Access is denied.`&&e.message.substring(0,17)!==`Member not found.`)throw e}if(!v){var C=document.createElement(`style`);C.type=`text/css`,document.head.appendChild(C),v=C.sheet}var w=`user-select: none;-khtml-user-select: none; -moz-user-select: none;-ms-user-select: none;-webkit-touch-callout: none; -webkit-user-select: none;`;v.addRule?v.addRule(`.lpk-live-photo-player`,w):v.insertRule&&v.insertRule(`.lpk-live-photo-player {`+w+`}`,0)}}if(h&&document.querySelectorAll instanceof Function){var T=function(){k=!0,Array.prototype.forEach.call(document.querySelectorAll(`[data-live-photo]`),function(e){return n.i(o.a)(e)})},E=function(){!k&&D&&O&&T()},D=/interactive|complete|loaded/.test(document.readyState),O=!!window.LivePhotosKit,k=!1;D||document.addEventListener(`DOMContentLoaded`,function(){D=!0,E()}),O||document.addEventListener(`livephotoskitloaded`,function(){O=!0,E()}),E()}},function(e,t,n){var r=n(8),i=n(18),a=n(15);n.d(t,`a`,function(){return o});var o=r.a.extend({badgeView:null,init:function(){var e=this;this._super(),this._createBadgeView(),i.b(function(){return e.badgeView.redraw()})},_createBadgeView:function(){this.badgeView=new a.a,this.element.appendChild(this.badgeView.element);var e=this.badgeView.element.style;e.top=`10px`,e.left=`10px`,e.position=`absolute`,e.zIndex=4},updateToRendererLayout:function(e,t,n,r){var i=this.badgeView.element.style;i.left=e+10+`px`,i.top=t+10+`px`,i.right=``},redraw:function(){this.badgeView.redraw()}})},function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){if(!e)return!1;try{e.appendChild(m),e.removeChild(m)}catch{return!1}return!0}var a=n(8),o=n(24),s=n(26),c=n(54),l=n(0),u=n(9),d=n(53),f=n(1),p=a.a.extend({staticMembers:{activeInstance:l.a.observableProperty(null)},renderer:l.a.observableProperty(function(){return o.a.create()}),showsNativeControls:l.a.observableProperty(!0),isPlaying:l.a.observableProperty(!1),wantsToPlay:l.a.observableProperty({defaultValue:!1,didChange:function(e){e&&(this.constructor.activeInstance=this)}}),canPlay:l.a.observableProperty({readOnly:!0,dependencies:[`isPlaying`,`renderer.isFullyPreparedForPlayback`],get:function(){return this.isPlaying||this.renderer.isFullyPreparedForPlayback},didChange:function(e){e&&(this._hasHadCanPlay=!0,this.dispatchEvent(n.i(u.b)()),this.wantsToPlay&&this.play())}}),_generateErrorIfPlayedWithoutNecessaryMetadata:l.a.observer(`renderer.cannotRenderDueToMissingPhotoTimeOrFrameTimes`,`wantsToPlay`,function(e){e&&this.wantsToPlay&&(this._cannotRenderDueToMissingPhotoTimeOrFrameTimesError=Error("The `photoTime` and/or `frameTimes` values are missing. Provide them directly (or via `metadataVideoSrc`) if they cannot be parsed from the video.")),e||(this._cannotRenderDueToMissingPhotoTimeOrFrameTimesError=null)}),_cannotRenderDueToMissingPhotoTimeOrFrameTimesError:l.a.observableProperty(),_playerErrors:l.a.observableProperty({readOnly:!0,dependencies:[`_cannotRenderDueToMissingPhotoTimeOrFrameTimesError`],get:function(){var e=this._cannotRenderDueToMissingPhotoTimeOrFrameTimesError;return e?[e]:null}}),_captionChanged:l.a.observer(`caption`,function(e){var t=``;e&&(t=`: `+e),this.element.setAttribute(`aria-label`,`Live Photo`+t)}),_effectTypeChanged:l.a.observer(`effectType`,function(e){this.badgeView&&e&&this.updateBadgeText()}),errors:l.a.observableProperty({readOnly:!0,dependencies:[`provider.errors`,`_playerErrors`],get:function(){var e=this.provider.errors,t=this._playerErrors,n=[];return e&&e.length&&n.push.apply(n,r(e)),t&&t.length&&n.push.apply(n,r(t)),n}}),lastError:l.a.observableProperty({dependencies:[`provider.lastError`],get:function(e){return e||this.provider.lastError||null},didChange:function(e){e&&(this.throwError(e),this.stop())}}),playbackRate:l.a.proxyProperty(`renderer.videoDecoder.playbackRate`),currentTime:l.a.proxyProperty(`renderer.currentTime`),renderedTime:l.a.proxyProperty(`renderer.renderedTime`),duration:l.a.proxyProperty(`renderer.duration`),videoWidth:l.a.proxyProperty(`renderer.videoWidth`),videoHeight:l.a.proxyProperty(`renderer.videoHeight`),photoWidth:l.a.proxyProperty(`renderer.photoWidth`),photoHeight:l.a.proxyProperty(`renderer.photoHeight`),recipe:l.a.proxyProperty(`renderer.recipe`),requiresInterpolation:l.a.proxyProperty(`renderer.recipe.requiresInterpolation`),effectType:l.a.proxyProperty(`provider.effectType`),preloadedEffectType:l.a.proxyProperty(`renderer.preloadedEffectType`),playbackStyle:l.a.proxyProperty(`renderer.playbackStyle`),provider:l.a.proxyProperty(`renderer.provider`),proactivelyLoadsVideo:l.a.proxyProperty(`provider.proactivelyLoadsVideo`),metadataVideoSrc:l.a.proxyProperty(`provider.metadataVideoSrc`),photoMimeType:l.a.proxyProperty(`provider.photoMimeType`),photoSrc:l.a.proxyProperty(`provider.photoSrc`),photo:l.a.proxyProperty(`provider.photo`),videoMimeType:l.a.proxyProperty(`provider.videoMimeType`),videoSrc:l.a.proxyProperty(`provider.videoSrc`),video:l.a.proxyProperty(`provider.video`),photoTime:l.a.proxyProperty(`provider.photoTime`),frameTimes:l.a.proxyProperty(`provider.frameTimes`),videoRotation:l.a.proxyProperty(`provider.videoRotation`),loadProgress:l.a.proxyProperty(`provider.progress`),autoplay:l.a.proxyProperty(`renderer.autoplay`),caption:l.a.proxyProperty(`renderer.caption`),_isZeroSizeWarningLogged:l.a.observableProperty(!1),_renderWhenPossible:l.a.observer(`renderer.video`,`renderer.photo`,function(){if(this._cannotRenderDueToMissingPhotoTimeOrFrameTimesError=null,this.updateSize(!0),!this._isZeroSizeWarningLogged){var e=this.element.getBoundingClientRect();e.width!==0&&e.height!==0||(console.warn(`The LivePhotosKit Player located at position (`+e.left+`, `+e.top+`) in the viewport has either a zero width or zero height (or both) and will not render. To fix this, ensure that the Player has a style that will yield a non-zero width and height.`),this._isZeroSizeWarningLogged=!0)}}),attachBadgeView:function(e){var t=this;this.badgeView=e,this.updateBadgeText(),e.configurePlayAction(function(){return t.play()}),e.configureStopAction(function(){return t.beginFinishingPlaybackEarly()})},updateBadgeText:function(){this.badgeView.updateBadgeText(this.effectType)},nativeControls:l.a.observableProperty({readOnly:!0,dependencies:[`showsNativeControls`],get:function(){var e=this;return this.showsNativeControls?this._nativeControls_cachedValue||=s.a.extend({owner:l.a.observableProperty(this),_slurpProgress:l.a.observer(`owner.provider.progress`,function(e){this.badgeView&&(this.badgeView.progress=e)}),_slurpError:l.a.observer(`owner.errors`,function(e){this.badgeView&&(this.badgeView.shouldShowError=!!e&&e.length>0)}),init:function(){this._super.apply(this,arguments),e.attachBadgeView(this.badgeView)}}).create():null},didChange:function(e){this._nativeControls_previousValue&&this._nativeControls_previousValue.detach(),this._nativeControls_previousValue=e,e&&e.attachInto(this)}}),init:function(e,t){var r=this;if(e&&!i(e))throw`Any pre-existing element provided for use as a LivePhotosKit.Player must be able to append child DOM nodes.`;
1for(var a in e&&e.childNodes.length&&(e.innerHTML=``),t)Object.prototype.hasOwnProperty.call(t,a)&&(this[a]=t[a]);switch(this._super(e),this.element.className.indexOf(`lpk-live-photo-player`)<0&&(this.element.className=this.element.className+` lpk-live-photo-player`),this.element.setAttribute(`role`,`image`),n.i(d.a)(this.element,`position`)||this.element.style.position){case`absolute`:case`fixed`:case`relative`:break;default:this.element.style.position=`relative`}switch(n.i(d.a)(this.element,`display`)||this.element.style.display){case`block`:case`inline-block`:case`table`:case`table-caption`:case`table-column-group`:case`table-header-group`:case`table-footer-group`:case`table-row-group`:case`table-cell`:case`table-column`:case`table-row`:break;default:this.element.style.display=`inline-block`}this.renderer.attachInto(this),this.renderer.eventDispatchingElement=this.element,window.addEventListener(`resize`,this.updateSize),`ontouchstart`in document.documentElement&&(this.addEventListener(`touchstart`,function(){return r.play()},!1),this.addEventListener(`touchend`,function(){return r.beginFinishingPlaybackEarly()},!1))},play:function(){if(!this.isPlaying){var e=this.provider;e.video||(e.needsLoadedVideoForPlayback=!0),this.wantsToPlay=!0,this.canPlay&&(this.isPlaying=!0,this._lastFrameNow=Date.now(),this._nextFrame())}return this.isPlaying},pause:function(){this.isPlaying=!1,this.wantsToPlay=!1,this._cancelNextFrame()},stop:function(){this.pause(),this.currentTime=0,this.renderer.duration=NaN},toggle:function(){this.wantsToPlay?this.pause():this.play()},beginFinishingPlaybackEarly:function(){this.recipe.beginFinishingPlaybackEarly(this)},_stopWhenAnotherPlayerStarts:l.a.observer(`_constructor.activeInstance`,function(e){e&&e!==this&&(this.stop(),this.renderer.reduceMemoryFootprint())}),_constructor:l.a.observableProperty(function(){return p}),_stopPlaybackWhenItemsLoadOrUnload:l.a.observer(`video`,`photo`,function(){!this.isPlaying||this.playbackStyle===f.a.LOOP&&this.autoplay||this.stop()}),addEventListener:function(e,t,n){var r=this.element;r.addEventListener.call(r,e,t,n)},removeEventListener:function(e,t,n){var r=this.element;r.removeEventListener.call(r,e,t,n)},_nextFrame:function(){var e=Date.now(),t=(e-this._lastFrameNow)*this.playbackRate;this._lastFrameNow=e,this.currentTime===this.renderedTime&&(this.currentTime+=t/1e3),this.recipe&&this.recipe.continuePlayback(this)},_cancelNextFrame:function(){cancelAnimationFrame(this._rafID)},updateSize:l.a.boundFunction(function(e,t){if(this.photoWidth&&this.photoHeight){var r=!0===e?void 0:e,i=!0===e?e:void 0;if(isNaN(r)||isNaN(t)?(r=this.element.offsetWidth,t=this.element.offsetHeight):(r=Math.round(r),t=Math.round(t),this.element.style.width=r+`px`,this.element.style.height=t+`px`),r&&t){if(this._lastUpdateChangeToken===(this._lastUpdateChangeToken=r+`:`+t)&&!i)return!1;var a=n.i(c.a)(this.photoWidth,this.photoHeight,r,t),o=Math.ceil(a.height),s=Math.ceil(a.width),l=Math.floor(r/2-s/2),u=Math.round(t/2-o/2),d=this.renderer;d.element.style.top=u+`px`,d.element.style.left=l+`px`,d.updateSize(s,o),this.displayWidth=r,this.displayHeight=t,this.nativeControls&&this.nativeControls.updateToRendererLayout(l,u,s,o)}}}),_dispatchPhotoLoadEventOnNewPhoto:l.a.observer(`photo`,function(e){e&&this.dispatchEvent(n.i(u.c)())}),_dispatchVideoLoadEventOnNewVideo:l.a.observer(`video`,function(e){e&&this.dispatchEvent(n.i(u.d)())}),throwError:function(e){this.dispatchEvent(n.i(u.e)({error:e,errorCode:e.errCode}))}}),m=document.createElement(`div`);t.a=p},function(e,t,n){function r(){m=!1}function i(){}function a(e,t){return-(e.importance-t.importance)||e.number-t.number}function o(e,t){for(var n=0,r=e.length,i=0;i<r-n;i++)if(e[i]===t&&(n++,i--),n){var a=i+1;e[a]=e[a+n]}return e.length-=n,e}var s=n(52),c=n(29),l=n(0),u=n(17),d=n(2),f=location.href.indexOf(`_lpk_play_to_decode=true`)!==-1||location.href.indexOf(`_lpk_play_to_decode=false`)===-1&&!d.a.isSafari&&!d.a.isIOS,p=location.href.indexOf(`_lpk_persistent_frames=true`)!==-1||(location.href.indexOf(`_lpk_persistent_frames=false`),!1),m=!0;t.a=l.a.Object.extend({id:l.a.property(function(){return n.i(s.a)()}),provider:l.a.observableProperty(),video:l.a.proxyProperty(`provider.video`),duration:l.a.proxyProperty(`provider.videoDuration`),videoRotation:l.a.proxyProperty(`provider.videoRotation`),frameTimes:l.a.proxyProperty(`provider.frameTimes`),requiresInterpolation:l.a.proxyProperty(`renderer.recipe.requiresInterpolation`),get frameCount(){var e=this.frameTimes;return e?e.length:0},shouldPrepareToSeek:!1,canProvideFrames:l.a.observableProperty({readOnly:!0,dependencies:[`video`],get:function(){return!!this.video}}),videoWidth:l.a.observableProperty({readOnly:!0,dependencies:[`video`,`videoRotation`],get:function(){var e=this.video;
1if(e)return this.videoRotation%180==0?e.videoWidth:e.videoHeight}}),videoHeight:l.a.observableProperty({readOnly:!0,dependencies:[`video`,`videoRotation`],get:function(){var e=this.video;if(e)return this.videoRotation%180==0?e.videoHeight:e.videoWidth}}),playbackRate:l.a.observableProperty(1),_sendPlaybackRateToVideo:l.a.observer(`playbackRate`,`video`,function(e,t){t&&(t.playbackRate=e)}),_pendingFrames:l.a.property(function(){return[]}),init:function(){this._largeCanvas=document.createElement(`canvas`),this._largeContext=this._largeCanvas.getContext(`2d`),this._super.apply(this,arguments)},_handleVideoChange:l.a.observer(`video`,function(){var e=this.video,t=this._lastVideo;if(this._lastVideo=e,e!==t&&(t&&this.cleanUpOldVideo(t),e&&this.setUpNewVideo(e),e&&p))for(var n=+!!u.a;this.frameTimes&&n<this.frameTimes.length;n++)this.getFrame(n).retain()}),setUpNewVideo:function(e){e.addEventListener(`seeked`,this._seeked),e.muted=!0},cleanUpOldVideo:function(e){e.removeEventListener(`seeked`,this._seeked),e.playbackRate=1,e.muted=!1,e.pause(),this._stopSeekingEntirely()},fractionalIndexForTime:function(e){if(e=Math.min(this.duration,Math.max(0,e)),isNaN(e))return e;var t=this.frameTimes,n=t.length,r=void 0;for(r=0;r<n&&t[r]<e;r++);r&&r--;var i=t[r],a=t[r+1];return a?r+Math.min(1,(e-i)/(a-i)):r},timeForFractionalIndex:function(e){if(e<=0)return 0;if(e>=this.frameTimes.length)return this.duration;var t=0|e,n=Math.ceil(e);if(t===n)return this.frameTimes[t];var r=this.frameTimes[t],i=n<this.frameTimes.length?this.frameTimes[n]:this.duration;return i?r+(e-t)*(i-r):r},getFrame:function(e,t){if(!this.frameTimes)throw`Attempted to get frame before ready.`;if(isNaN(this.frameTimes[e]))throw`Frame number `+e+` is is not a frame in the video.`;var n=c.a.getCached(this,e);return isNaN(t)||(n.importance=Math.max(n.importance,t)),n.readyState||(this._pendingFrames.push(n),this._pendingFrames.sort(a),n.didPend(),this._isSeeking||this._scheduleArtificialSeek()),n},peekFrame:function(e){var t=c.a.peekCached(this,e);return t&&t.readyState===2&&!t.lacksOwnPixelData?t:null},getNearestDecodedFrame:function(e){for(var t=Math.max(e,this.frameTimes.length-1-e),n=-1;++n<=t;){var r=this.peekFrame(e+n)||this.peekFrame(e-n);if(r)return r}return null},_scheduleArtificialSeek:function(){this._artificialSeekTimeout||(this._artificialSeekTimeout=setTimeout(this._seeked),this._artificialSeekRAFId=requestAnimationFrame(this._seeked))},_unscheduleArtificialSeek:function(){this._artificialSeekTimeout&&(clearTimeout(this._artificialSeekTimeout),this._artificialSeekTimeout=null,cancelAnimationFrame(this._artificialSeekRAFId),this._artificialSeekRAFId=null)},_stopSeekingEntirely:function(){this._unscheduleArtificialSeek(),this._isPlaying=!1,this._isSeeking=!1,this._expectedNextSeenFrameNumber=NaN,this.video&&this.video.pause()},_seeked:l.a.boundFunction(function(e){var t=this._pendingFrames;if((t.length!==0||this.requiresInterpolation)&&!(e instanceof Event&&e.target!==this.video)&&(e instanceof Event||this.video)){this._unscheduleArtificialSeek(),this._isSeeking=!1;var n=this.fractionalIndexForTime(this.video.currentTime);n|=0;for(var a,o=NaN,s=0;a=t[s];s++)if(a.number===n){o=n,a.didDecode(),this._removePendingFrame(a);break}var c=this._expectedNextSeenFrameNumber;if(this._expectedNextSeenFrameNumber=NaN,c<o)for(var l,u=0;l=t[u];u++)l.number>=c&&l.number<o&&(l.didGetSkipped(),this._removePendingFrame(l),u--);var d=t[0];if(!d)return this._isPlaying&&this.requiresInterpolation&&(this._isPlaying=!1,this.video.pause()),void(this._expectedNextSeenFrameNumber=NaN);var p=d.number>n&&d.number<=n+2&&m;if(f||(p=!1),p){if(!this._isPlaying){this._isPlaying=!0;try{var h=this.video.play();h&&h.then instanceof Function&&h.then(i,r)}catch{m=!1}}this._expectedNextSeenFrameNumber=d.number,this._scheduleArtificialSeek()}else this._isPlaying&&(this._isPlaying=!1,this.video.pause()),this._expectedNextSeenFrameNumber=NaN,this.video.currentTime=d.time+1e-4,this._isSeeking=!0}}),_frameWillDispose:function(e){this._removePendingFrame(e)},_removePendingFrame:function(e){o(this._pendingFrames,e),this._pendingFrames.length||this._unscheduleArtificialSeek()}})},function(e,t,n){function r(e){e.container=document.createElement(`div`),e.container.frame=e,e.container.innerHTML=`<div style="position:absolute; left:0; right:0; top:0; bottom:0; text-align:center; line-height:30px; color:white; text-shadow: black 0px 0px 4px,black 0px 0px 4px,black 0px 0px 4px,black 0px 0px 4px; font-family:HelveticaNeue-Light;"></div>`,e.textBox=e.container.lastChild,e.container.insertBefore(e.image,e.textBox),e.image.style.position=`absolute`,e.container.style.cssText=`position:relative; display:inline-block; border: 1px solid black;`;var t=e._debug_aspect||=e.videoDecoder&&(e.videoDecoder.videoWidth>e.videoDecoder.videoHeight?`landscape`:`portrait`);e.container.style.width=e.image.style.width=t===`landscape`?`40px`:`30px`,e.container.style.height=e.image.style.height=t===`landscape`?`30px`:`40px`,document.body.appendChild(e.container)}var i=n(12),a=n(48),o=n(5),s=n(0),c=n(46),l=n(2);n.d(t,`a`,function(){return u});var u=s.a.Object.extend(c.a,a.a,{staticMembers:{getPoolingCacheKey:function(e,t){return`f`+t+`_in_`+e.id}},container:null,image:null,_context:null,number:-1,time:-1,importance:0,videoDecoder:null,readyState:0,_poolingCacheKey:null,_debugShowInDOM:i.a,lacksOwnPixelData:!1,_postDispose:function(){this.image.width=this.image.height=0},get backingFrame(){return this.lacksOwnPixelData&&this.videoDecoder.getNearestDecodedFrame(this.number)||this},init:function(){this._postDispose=this._postDispose.bind(this);var e=this.image=document.createElement(`canvas`);this._context=this.image.getContext(`2d`),this._super(),this._debugShowInDOM?r(this):f&&(f.appendChild(e),e.style.cssText=`position: absolute; top: 0px; width:1px; height: 1px; display: inline-block;`,e.style.left=d+++`px`)},initFromPool:function(e,t){clearTimeout(this._postDisposalTimeout),this.videoDecoder=e,this.number=t,this.time=e.frameTimes[t],this._debugShowInDOM&&(this.textBox.innerHTML=this.number)},dispose:function(){this.resetReadiness(),this.videoDecoder._frameWillDispose(this),this.number=this.time=-1,this.importance=0,this.videoDecoder=null,this.readyState=0,this.lacksOwnPixelData=!1,this._postDisposalTimeout=setTimeout(this._postDispose,3e3),this.constructor._disposeInstance(this),this._debugShowInDOM&&(this.textBox.innerHTML=`x`,this.textBox.style.color=`#FF0000`,this._context.clearRect(0,0,this.image.width,this.image.height))},didPend:function(){this.readyState=1,this._debugShowInDOM&&(this.textBox.style.color=`#FF8800`)},didDecode:function(){this.obtainPixelData(),this.readyState=2,this.resolveReadiness(this),this._debugShowInDOM&&(this.textBox.style.color=`#00FF00`)},obtainPixelData:function(){var e=this.image,t=this._context,n=this.videoDecoder,r=n.videoRotation,i=n.videoWidth,a=n.videoHeight,o=r%180==0?i:a,s=r%180==0?a:i;e.width===i&&e.height===a||(e.width=i,e.height=a),l.a.isFirefox&&t.getImageData(0,0,1,1);for(var c=0;c<r;c+=90)t.translate(c%180?a:i,0),t.rotate(Math.PI/2);t.drawImage(n.video,0,0,o,s),t.setTransform(1,0,0,1,0,0)},didGetSkipped:function(){o.a.log(` Skipped decoding frame `+this.number+`. Using nearest frame instead.`),this.lacksOwnPixelData=!0,this.readyState=2,this.resolveReadiness(this),this._debugShowInDOM&&(this._context.fillStyle=`red`,this._context.fillRect(0,0,this.image.width,this.image.height),this.textBox.style.color=`#00FF00`)}}),d=0,f=function(){if(!l.a.isIE&&!l.a.isEdge)return null;var e=document.createElement(`div`);return e.style.cssText=`top: 0px; left: 0px; width: 50px; height: 1px; overflow: hidden; position: absolute; z-index: 100000; opacity: 0.001; pointer-events: none;`,document.body?document.body.appendChild(e):setTimeout(function(){return document.body.appendChild(e)},0),e}()},function(e,t,n){var r=n(0);t.a=r.a.Object.extend({state:r.a.observableProperty(`unloaded`),validateResult:function(e){return!!e},loadSrc:function(e){},abortCurrentLoad:function(){},isSrcLoadAllowed:r.a.observableProperty(!0),_loadSrcOnceAllowed:r.a.observer(`isSrcLoadAllowed`,function(e){if(e&&this.state===`unloaded`){var t=this.src;t&&(this.state=`loading`,this.loadSrc(t))}}),src:r.a.observableProperty({didChange:function(e){this._isWritingSrcDueToWritingOfResult||(this._isWritingResultDueToWritingOfSrc=!0,this.result=null,this._isWritingResultDueToWritingOfSrc=!1,this.abortCurrentLoad(),e&&this.isSrcLoadAllowed?(this.state=`loading`,this.loadSrc(e)):this.state=`unloaded`)}}),result:r.a.observableProperty({decideRequiresUpdate:function(){return!0},didChange:function(e){if(!this._isWritingResultDueToWritingOfSrc){var t=this.validateResult(e)?`loaded`:e||this._isWritingResultDueToError?`errored`:`unloaded`;this._isWritingResultDueToLoadOfSrc||this._isWritingResultDueToError||(this._isWritingSrcDueToWritingOfResult=!0,this.src=null,this._isWritingSrcDueToWritingOfResult=!1,this.abortCurrentLoad(),this.state=`unloaded`),this.state=t}}}),error:r.a.observableProperty(null),_clearErrorOnceNoLongerErrored:r.a.observer(`state`,function(e){e!==`errored`&&(this.error=null)}),progress:r.a.observableProperty({defaultValue:0,dependencies:[`state`],get:function(e){return this.state===`loading`?Math.min(1,Math.max(0,+e||0)):+(this.state===`loaded`)}}),_clearProgressOnceUnloaded:r.a.observer(`state`,function(e){e===`unloaded`&&(this.progress=0)}),loadDidFail:function(e){this.state===`loading`&&(this._isWritingResultDueToError=!0,this.result=null,this._isWritingResultDueToError=!1,this.error=e)},loadDidSucceed:function(e){this.state===`loading`&&(this._isWritingResultDueToLoadOfSrc=!0,this.result=e,this._isWritingResultDueToLoadOfSrc=!1,this.error=null)}})},function(e,t,n){function r(e,t,n){var r=e.getContext(`2d`),i=n===7||n===8?270:n===3||n===4?180:n===5||n===6?90:0,a=t.naturalWi
1dth,o=t.naturalHeight,s=i%180==0?a:o,c=i%180==0?o:a,l=n===2||n===4?-1:1,u=n===5||n===7?-1:1;e.width===s&&e.height===c||(e.width=s,e.height=c);for(var d=0;d<i;d+=90)r.translate(d%180?c:s,0),r.rotate(Math.PI/2);r.scale(l,u),r.translate((l-1)/2*a,(u-1)/2*o),r.drawImage(t,0,0),r.setTransform(1,0,0,1,0,0)}var i=n(16),a=n(51),o=n(6),s=n(3),c=[],l={};t.a=i.a.extend({mimeType:`image/jpeg`,beginSecondaryLoad:function(e,t){var r=n.i(a.a)(e);this._exifOrientationInLastLoadedBuffer=r.orientation||NaN,r.photosRenderEffect===3&&(this.effectType=s.a.EXPOSURE),c[0]=e,l.type=t,this._internalImage.src=this._internalImageSrc=URL.createObjectURL(new Blob(c,l)),(window.photoBuffers||(window.photoBuffers=[])).push(e)},abortCurrentSecondaryLoad:function(){this.__internalImage&&this._internalImage.removeAttribute(`src`),this._internalImageSrc&&=(URL.revokeObjectURL(this._internalImageSrc),null),this._exifOrientationInLastLoadedBuffer=null,this.effectType=null},get _internalImage(){var e=this.__internalImage;return e||(e=this.__internalImage=new Image,e.addEventListener(`load`,this._internalImageLoadDidSucceed.bind(this)),e.addEventListener(`error`,function(e){this.loadDidFail(e)}.bind(this))),e},get _internalCanvas(){return this.__internalCanvas||=document.createElement(`canvas`)},loadDidFail:function(e){if(e)return e.errCode=o.a.PHOTO_FAILED_TO_LOAD,this._super(e)},_internalImageLoadDidSucceed:function(){var e=this._internalImage;this._exifOrientationInLastLoadedBuffer!==1&&(r(this._internalCanvas,this._internalImage,this._exifOrientationInLastLoadedBuffer),e=this._internalCanvas),this.loadDidSucceed(e)}})},function(e,t,n){var r=n(0),i=n(33),a=n(31),o=n(3),s=n(1);t.a=r.a.Object.extend({videoSrc:r.a.proxyProperty(`_videoProvider.src`),videoMimeType:r.a.proxyProperty(`_videoProvider.mimeType`),video:r.a.proxyProperty(`_videoProvider.result`),effectType:r.a.observableProperty({dependencies:[`_photoProvider.effectType`,`_videoProvider.effectType`,`preloadedEffectType`],get:function(){return this._photoProvider.effectType||this._videoProvider.effectType||this.preloadedEffectType||o.a.default},didChange:function(e){this.setPlaybackStyle(e)}}),preloadedEffectType:r.a.observableProperty({get:function(e){return e},set:function(e){return this._photoProvider.effectType=null,this._videoProvider.effectType=null,e}}),setPlaybackStyle:function(e){this.effectType=e,this.playbackStyle=o.a.toPlaybackStyle(e)},photoSrc:r.a.proxyProperty(`_photoProvider.src`),photoMimeType:r.a.proxyProperty(`_photoProvider.mimeType`),photo:r.a.proxyProperty(`_photoProvider.result`),playbackStyle:r.a.observableProperty(s.a.default),metadataVideoSrc:r.a.proxyProperty(`_metadataVideoProvider.src`),progress:r.a.observableProperty({readOnly:!0,dependencies:[`_photoProvider.progress`,`_videoProvider.state`,`_videoProvider.progress`,`_metadataVideoProvider.state`,`_metadataVideoProvider.progress`],get:function(){var e=this._videoProvider,t=this._metadataVideoProvider,n=e.state,r=t.state,i=n!==`unloaded`||r!==`unloaded`?.75:0,a=i?r===`unloaded`?e.progress:(e.progress+t.progress)/2:0;return this._photoProvider.progress*(1-i)+a*i}}),photoTime:r.a.observableProperty({dependencies:[`_metadataVideoProvider.photoTime`,`_videoProvider.photoTime`],get:function(e){return+e===e?e:this._metadataVideoProvider.photoTime||this._videoProvider.photoTime||null}}),videoRotation:r.a.observableProperty({dependencies:[`_videoProvider.videoRotation`],get:function(e){if(+e===e)return e;var t=this._videoProvider.videoRotation;return+t===t?t:null},set:function(e){return 90*Math.round(e/90)%360|0}}),frameTimes:r.a.observableProperty({dependencies:[`_metadataVideoProvider.frameTimes`,`_videoProvider.frameTimes`],get:function(e){return e||this._metadataVideoProvider.frameTimes||this._videoProvider.frameTimes},set:function(e){if(!e)return null;if(typeof e==`string`){var t=r.a.arrayPool.get();r.a.String.splitIntoArray(e,`,`,t),r.a.Array.mapIntoArray(t,function(e){return Number(e.trim())},t),e=t}for(var n=Array.isArray(e)&&e.length>=2,i=0,a=e.length;i<a&&n;i++){var o=e[i];+o!==o&&(n=!1)}if(!n)throw Error(`If frameTimes is provided, it must be provided as an Array or comma-delimited string containing numbers.`);return e}}),videoDuration:r.a.observableProperty({readOnly:!0,dependencies:[`frameTimes`],get:function(){return this.frameTimes?this.frameTimes[this.frameTimes.length-1]:void 0}}),proactivelyLoadsVideo:r.a.observableProperty(!1),needsLoadedVideoForPlayback:r.a.observableProperty(!1),_reset_needsLoadedVideoForPlayback_whenAppropriate:r.a.observer(`video`,function(){this.needsLoadedVideoForPlayback=!1}),isVideoLoadAllowed:r.a.observableProperty({readOnly:!0,dependencies:[`proactivelyLoadsVideo`,`needsLoadedVideoForPlayback`],get:function(){return this.proactivelyLoadsVideo||this.needsLoadedVideoForPlayback}}),errors:r.a.observableProperty({readOnly:!0,dependencies:[`_videoProvider.error`,`_photoProvider.error`],get:function(){return[this._photoProvider.error,this._videoProvider.error].filter(function(e){return!!e})}}),lastError:r.a.observableProperty(),_lastPhotoError:r.a.observableProperty({readOnly:!0,dependencies:[`_photoProvider.error`],get:function(){return this._photoProvider.error},didChange:function(e){this.lastError=e}}),_lastVideoError:r.a.observableProperty({readOnly:!0,dependencies:[`_videoProvider.error`],get:function(){return this._videoProvider.error},didChange:function(e){this.lastError=e}}),_metadataVideoProvider:r.a.observableProperty(function(){return i.a.extend({requiresMimeTypeForRawArrayBufferSrc:!1,actuallyProvi
1desResultingVideoFromSecondaryLoad:!1}).create()}),_videoProvider:r.a.observableProperty(function(){return i.a.extend({owner:r.a.observableProperty(this),isSrcLoadAllowed:r.a.proxyProperty(`owner.isVideoLoadAllowed`),exposedSrcKeyForErrorStrings:`videoSrc`,exposedMimeTypeKeyForErrorStrings:`videoMimeType`}).create()}),_photoProvider:r.a.observableProperty(function(){return a.a.extend({exposedSrcKeyForErrorStrings:`photoSrc`,exposedMimeTypeKeyForErrorStrings:`photoMimeType`}).create()})})},function(e,t,n){function r(e){var t=[0,0,0,0,0,0,0,0,1];t[0]=i(e.slice(0,4),16,16),t[1]=i(e.slice(4,8),16,16),t[3]=i(e.slice(12,16),16,16),t[4]=i(e.slice(16,20),16,16);for(var n=0;n<_.length;n++)if(a(_[n],t))return 90*n;return 0}function i(e,t,n){var r=e[0]<<24|e[1]<<16|e[2]<<8|e[3];return Math.abs(r>>n)*(r&1<<t+n-1?-1:1)}function a(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var o=n(16),s=n(45),c=n(0),l=n(5),u=n(6),d=n(2),f=n(3),p=[],m={},h=o.a.extend({__internalVideo:null,_internalVideoSRC:null,photoTime:c.a.observableProperty(),playbackStyle:c.a.observableProperty(null),effectType:c.a.observableProperty(null),frameTimes:c.a.observableProperty(),videoRotation:c.a.observableProperty(),actuallyProvi
1desResultingVideoFromSecondaryLoad:!0,_clearMetadataPropertiesOnUnload:c.a.observer(`state`,function(e){e!==`loaded`&&(this.photoTime=this.frameTimes=this.videoRotation=void 0)}),beginSecondaryLoad:function(e,t){this.preprocessAndAttemptToReadMetadataFromBuffer(e),this.actuallyProvidesResultingVideoFromSecondaryLoad&&(p[0]=e,m.type=t===`video/quicktime`?`video/mp4`:t,t===`application/octet-stream`&&(l.a.warn('Encountered a Content-Type of "application/octet-stream" for the file obtained for `videoSrc`.Some browsers may be unable to use the video with this MIME type. If the video portion of the Player is not functioning, make sure the proper MIME type is being provided with the response,or provide the proper MIME type manually by assigning it to the `videoMimeType` property on the Player instance. For now, an attempt will be made to treat the videoâs bytes as "video/mp4", but playback is not guaranteed unless either of these corrective steps are taken.'),t=`video/mp4`),this._internalVideo.src=this._internalVideoSRC=URL.createObjectURL(new Blob(p,m)),d.a.isIOS&&this._internalVideo.load())},abortCurrentSecondaryLoad:function(){this.__internalVideo&&(this.__internalVideo.pause(),this.__internalVideo.removeAttribute(`src`),this.__internalVideo.load(),d.a.isIOS&&(this.__internalVideo=null),this._internalVideoSRC&&=(URL.revokeObjectURL(this._internalVideoSRC),null),this.effectType=null)},get _internalVideo(){var e=this.__internalVideo;return e||(e=this.__internalVideo=document.createElement(`video`),e.addEventListener(`canplay`,this.loadDidSucceed.bind(this)),e.addEventListener(`error`,this.loadDidFail.bind(this)),e.volume=0),e},loadDidFail:function(e){if(e)return e.errCode=u.a.VIDEO_FAILED_TO_LOAD,this._super(e);var t=this.__internalVideo;return t.error.errCode=u.a.VIDEO_FAILED_TO_LOAD,t&&this._super(t.error)},loadDidSucceed:function(){var e=this.__internalVideo;return e&&this._super(e)},preprocessAndAttemptToReadMetadataFromBuffer:function(e){var t=void 0,n=void 0;try{t=new s.a(new s.b(e)),t.read()}catch{t=null}if(!t)return this.photoTime=null,this.frameTimes=null,void(this.videoRotation=0);var i=(n=t.tracks)&&(n=n.vide)&&(n=n[0])&&n.getAllSampleSeconds&&n.getAllSampleSeconds();i&&(this.frameTimes=i);var a=void 0;try{a=t.tracks.meta[0].timeToSeconds(t.tracks.meta[0].trak.edts.elst.editList[0].trackDuration)}catch{}a&&(this.photoTime=a);var o=new Uint8Array(e),c=(n=t.tracks)&&(n=n.soun)&&(n=n[0])&&(n=n.trak)&&n.offset;if(c){var l=`free`;o[c+4]=l.charCodeAt(0),o[c+5]=l.charCodeAt(1),o[c+6]=l.charCodeAt(2),o[c+7]=l.charCodeAt(3)}var u=(n=t.tracks)&&(n=n.vide)&&(n=n[0])&&(n=n.trak)&&(n=n.tkhd)&&(n=n.offset)&&n+48,d=0;if(u){for(var p=[],m=0;m<g.length;m++)p[m]=o[u+m];if(d=r(p))for(var h=0;h<g.length;h++)o[u+h]=g[h]}this.videoRotation=d;var _=t.metaData.keys&&t.metaData.keys.keyList.get(`com.apple.photos.variation-identifier`),v=void 0;if(_>0)switch(t.metaData.values.items[_]){case 1:v=f.a.LOOP;break;case 2:v=f.a.BOUNCE;break;case 3:v=f.a.EXPOSURE}this.effectType=v}}),g=[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],_=[[1,0,0,0,1,0,0,0,1],[0,1,0,-1,0,0,0,0,1],[-1,0,0,0,-1,0,0,0,1],[0,-1,0,1,0,0,0,0,1]];t.a=h},function(e,t,n){var r=n(4),i=n(1),a=n(2).a.isSafari;t.a=r.a.create({correspondingPlaybackStyle:i.a.FULL,get minimumShortenedDuration(){return this.enterDuration+this.exitDuration+.01},get spontaneousFinishDuration(){return this.exitDuration},enterDuration:1/3,exitDuration:.5,videoBeginTime:.15,zoomScaleFactor:1.075,blurRadius:5,blurRadiusStep:.2,requiresInterpolation:!0,quantizeRadius:function(e){return this.blurRadiusStep?Math.round(e/this.blurRadiusStep)*this.blurRadiusStep:e},easeInOut:function(e){return e<0?0:e>1?1:.5-.5*Math.cos(e*Math.PI)},calculateAnimationDuration:function(e,t,n){var r=t?t+this.videoBeginTime+this.exitDuration:0;return Math.max(0,Math.min(e||1/0,r))},getEntranceExitParameter:function(e,t){return Math.min(Math.max(0,Math.min(1,1-this.easeInOut((e-(t-this.exitDuration))/this.exitDuration))),1-Math.max(0,Math.min(1,1-this.easeInOut(e/this.enterDuration))))||0},getTransform:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:1,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,s=1+(this.zoomScaleFactor-1)*this.getEntranceExitParameter(e,t),c=-(s-1)/2*n,l=-(s-1)/2*r,u=Math.round(c*devicePixelRatio)/devicePixelRatio,d=Math.round(l*devicePixelRatio)/devicePixelRatio;return Math.abs(s-i)<1e-5?`translate3d(`+u+`px, `+d+`px, 0) scale3d(`+a+`, `+o+`, 1)`:c||l||s?`translate3d(`+c+`px, `+l+`px, 0) scale3d(`+s+`, `+s+`, 1)`:`translate3d(0, 0, 0)`},photo:r.a.PhotoIngredient.create({opacity:r.a.computedStyle(function(e){if(e<this.recipe.enterDuration)return(1-this.recipe.easeInOut(e/this.recipe.enterDuration)).toString();if(e<this.renderer.duration-this.recipe.exitDuration)return`0`;var t=this.recipe.easeInOut((e-(this.renderer.duration-this.recipe.exitDuration))/this.recipe.exitDuration);return t===1?`1`:t}),display:r.a.computedStyle(function(e){return e>this.recipe.enterDuration&&e<this.renderer.duration-this.recipe.exitDuration?`none`:``}),filter:r.a.computedStyle(function(e){if(!a)return``;var t=this.recipe,n=t.blurRadius*t.getEntranceExitParameter(e,this.renderer.duration);return n?`blur(`+t.quantizeRadius(n)+`px)`:``}),transform:r.a.computedStyle(function(e){return this.recipe.getTransform(e,this.renderer.duration,this.displayWidth,this.displayHeight)}),zIndex:r.a.computedStyle(function(){return 3})}),video:r.a.InterpolatedVideoIngredient.create({get backingScaleFactor(){return this.recipe.zoomScaleFactor},lookaheadTime:.01+7/15,videoTimeAtTime:function(e){var t=Math.max(0,Math.min(this.videoDuration,e-this.recipe.videoBeginTime));return Math.min(t,this.renderer.duration-this.recipe.exitDuration-this.recipe.videoBeginTime)},prepareVideoFramesFromTime:function(e){this.retainFramesForTime(e,e+this.lookaheadTime)},display:r.a.computedStyle(function(e){return e===0||e===this.renderer.duration?`none`:``}),transform:r.a.computedStyle(function(e){return this.recipe.getTransform(e,this.renderer.duration,this.displayWidth,this.displayHeight,this.backingScaleFactor,this.backingScaleX,this.backingScaleY)}),zIndex:r.a.computedStyle(function(){return 1})})})},function(e,t,n){var r=n(4),i=n(1);t.a=r.a.create({correspondingPlaybackStyle:i.a.HINT,minimumShortenedDuration:.9,get spontaneousFinishDuration(){return this.exitBlurDuration},exitBlurDuration:.75,bottomVideoRevealBeginTime:.1,zoomScaleFactor:1.075,blurRadius:7.5,blurRadiusStep:1,requiresInterpolation:!0,quantizeRadius:function(e){return Math.round(e/this.blurRadiusStep)*this.blurRadiusStep},tween:function(e){return e<0?0:e>1?1:.5-.5*Math.cos(e*Math.PI)},calculateAnimationDuration:function(e,t,n){var r=t?t-n+this.exitBlurDuration:0;return Math.max(0,Math.min(e||1/0,r))},photo:r.a.PhotoIngredient.create({hideDuration:.06,get returnDuration(){return this.recipe.exitBlurDuration},opacity:r.a.computedStyle(function(e){if(e<this.hideDuration)return(1-this.recipe.tween(e/this.hideDuration)).toString();if(e<this.renderer.duration-this.returnDuration)return`0`;var t=this.recipe.tween((e-(this.renderer.duration-this.returnDuration))/this.returnDuration);return t===1?``:t.toString()}),display:r.a.computedStyle(function(e){return e>this.hideDuration&&e<this.renderer.duration-this.returnDuration?`none`:``}),webkitFilter:r.a.computedStyle(function(e){if(e<this.renderer.duration-this.returnDuration)return``;var t=this.recipe.blurRadius*(1-this.recipe.tween((e-(this.renderer.duration-this.returnDuration))/this.returnDuration));return t?`blur(`+this.recipe.quantizeRadius(t)+`px)`:``}),transform:r.a.computedStyle(function(e){if(e<this.renderer.duration-this.returnDuration)return`translateZ(0)`;var t=1+(this.recipe.zoomScaleFactor-1)*(1-this.recipe.tween((e-(this.renderer.duration-this.returnDuration))/this.returnDuration));return`translate3d(`+-(t-1)/2*this.displayWidth+`px, `+-(t-1)/2*this.displayHeight+`px, 0) scale3d(`+t+`, `+t+`, 1)`}),zIndex:r.a.computedStyle(function(){return 3})}),video:r.a.InterpolatedVideoIngredient.create({get backingScaleFactor(){return this.recipe.zoomScaleFactor},scaleInDuration:.15,get blurOutDuration(){return this.recipe.exitBlurDuration},lookaheadTime:.01+7/15,videoTimeAtTime:function(e){return Math.min(this.videoDuration,e+this.renderer.photoTime)},prepareVideoFramesFromTime:function(e){this.retainFramesForTime(e,e+this.lookaheadTime)},display:r.a.computedStyle(function(e){return e&&e!==this.renderer.duration?``:`none`}),transform:r.a.computedStyle(function(e){var t=1+(this.recipe.zoomScaleFactor-1)*Math.max(0,Math.min(1,1-this.recipe.tween((e-(this.renderer.duration-this.blurOutDuration))/this.blurOutDuration)-(1-this.recipe.tween(e/this.scaleInDuration)))),n=-(t-1)/2*this.displayWidth,r=-(t-1)/2*this.displayHeight,i=Math.round(n*devicePixelRatio)/devicePixelRatio,a=Math.round(r*devicePixelRatio)/devicePixelRatio;return Math.abs(t-this.backingScaleFactor)<1e-5?`translate3d(`+i+`px, `+a+`px, 0) scale3d(`+this.backingScaleX+`, `+this.backingScaleY+`, 1)`:`translate3d(`+n+`px, `+r+`px, 0) scale3d(`+t+`, `+t+`, 1)`}),webkitFilter:r.a.computedStyle(function(e){var t=this.recipe.blurRadius*this.recipe.tween((e-(this.renderer.duration-this.blurOutDuration))/this.blurOutDuration);return t?`blur(`+this.recipe.quantizeRadius(t)+`px)`:``}),zIndex:r.a.computedStyle(function(){return 1})})})},function(e,t,n){var r=n(4);t.a=(n(2).a.isSafari,r.a.create({requiresInterpolation:!0,photo:r.a.PhotoIngredient.create({display:r.a.computedStyle(function(e){return this.isPlaying||e>0?`none`:``})}),video:r.a.InterpolatedVideoIngredient.create({lookaheadTime:.01+7/15,videoTimeAtTime:function(e){return e%this.renderer.duration},prepareVideoFramesFromTime:function(e){this.retainFramesForTime(e,e+this.lookaheadTime)},display:r.a.computedStyle(function(e){return``})}
1),beginFinishingPlaybackEarly:function(e){e.autoplay||(e.isPlaying?e.pause():e.wantsToPlay=!1)},continuePlayback:function(e){var t=e.currentTime,n=e.duration;t>=n&&(e.currentTime=t%n),e._rafID=requestAnimationFrame(e._nextFrame.bind(e))}}))},function(e,t,n){var r=n(4),i=n(36),a=n(1);i.a.register(),t.a=r.a.create({correspondingPlaybackStyle:a.a.LOOP,photo:r.a.PhotoIngredient.create({display:r.a.computedStyle(function(e){return this.isPlaying||e>0?`none`:``})}),video:r.a.VideoIngredient.create({display:r.a.computedStyle(function(e){return``})}),beginFinishingPlaybackEarly:function(e){e.autoplay||(e.isPlaying?e.pause():e.wantsToPlay=!1)},continuePlayback:function(e){var t=e.currentTime,n=e.duration;t>=n&&(e.currentTime=t%n),e._rafID=requestAnimationFrame(e._nextFrame.bind(e))},requestMoreCompatibleRecipe:function(e){return r.a.registerRecipeWithPlaybackStyle(i.a,this.correspondingPlaybackStyle),i.a}})},function(e,t,n){var r=n(0),i=n(41),a=n(1),o=n(13);t.a=i.a.extend(o.a,{_loCanvas:null,_hiCanvas:null,backingScaleFactor:1,setUpForRender:function(){var e=this.element,t=(this.isPlaying,this.renderer),n=t.autoplay,i=t.parentView,o=t.playbackStyle,s=t.video;
1if(!this._loCanvas||!this._hiCanvas){e.innerHTML&&=``;var c=this._loCanvas=r.a.canvasPool.get(),l=this._hiCanvas=r.a.canvasPool.get();c._context=c.getContext(`2d`),l._context=l.getContext(`2d`),c.style.cssText=l.style.cssText=`position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform: translateZ(0);`,e.appendChild(c),e.appendChild(l),this._swapCanvases()}e.className=`lpk-render-layer lpk-video`,e.style.position=`absolute`,e.style.transformOrigin=`0 0`,e.style.zIndex=1,this._super(),o===a.a.LOOP&&(this.shouldLoop=!0),this.shouldLoop&&requestAnimationFrame(function(){s.currentTime=-1,n&&i.play()}),window.test=this},updateSize:function(e,t){if(!arguments.length)return this._super();this._super(e,t);var n=Math.ceil(e*this.backingScaleFactor),r=Math.ceil(t*this.backingScaleFactor);this.backingScaleX=n/e,this.backingScaleY=r/t,this.element.style.width=n+`px`,this.element.style.height=r+`px`,this._loCanvas&&this._hiCanvas&&(this._loCanvas.width=this._hiCanvas.width=n*devicePixelRatio,this._loCanvas.height=this._hiCanvas.height=r*devicePixelRatio,this._loCanvas._drawnFrameNumber=this._hiCanvas._drawnFrameNumber=-1,this.renderAtTime())},renderAtTime:function(e){if(!arguments.length)return this._super();this._super(e);var t=this.backingScaleX,n=this.backingScaleY;t===1&&n===1||(this.element.style.transform+=` scale3d(`+1/t+`, `+1/n+`, 1)`)},renderFramePair:function(e,t,n){(e&&this._hiCanvas._drawnFrameNumber===e.number||t&&this._loCanvas._drawnFrameNumber===t.number)&&this._swapCanvases(),this._putFrameInCanvasIfNeeded(e,this._loCanvas),this._putFrameInCanvasIfNeeded(t,this._hiCanvas),t&&(this._hiCanvas.style.opacity=n)},_swapCanvases:function(){var e=this._hiCanvas;this._hiCanvas=this._loCanvas,this._loCanvas=e,this._loCanvas.style.opacity=``,this._loCanvas.style.zIndex=1,this._hiCanvas.style.zIndex=2},_putFrameInCanvasIfNeeded:function(e,t){t._drawnFrameNumber!==(t._drawnFrameNumber=e?e.number:-1)&&(t.setAttribute(`data-frame-number`,t._drawnFrameNumber.toString()),e?t._context.drawImage(e.image,0,0,t.width,t.height):t._context.clearRect(0,0,t.width,t.height))},dispose:function(){this._super(),this._loCanvas&&r.a.canvasPool.ret(this._loCanvas),this._hiCanvas&&r.a.canvasPool.ret(this._hiCanvas)},tearDownFromRender:function(){var e=this.renderer.parentView;this.shouldLoop=!1,e&&e.stop(),this._clearAllRetainedFrames(),this._super()}})},function(e,t,n){var r=n(42),i=n(13),a=n(49);t.a=r.a.extend(i.a,{tagName:`canvas`,get _canvas(){return this.element},get _context(){return this.__context||=this._canvas.getContext(`2d`)},init:function(){this._super.apply(this,arguments),this.element.className=`lpk-render-layer lpk-photo`,this.element.style.position=`absolute`,this.element.style.width=this.element.style.height=`100%`,this.element.style.transformOrigin=`0 0`,this.element.style.zIndex=2},tearDownFromRender:function(){this._super(),this._canvas.width=this._canvas.height=0},updateSize:function(e,t){if(!arguments.length)return this._super();this._super(e,t);var r=Math.ceil(e*devicePixelRatio),i=Math.ceil(t*devicePixelRatio),o=this.photo,s=this._canvas;this._lastPhoto===(this._lastPhoto=o)&&s.width===r&&s.height===i||(s.width=r,s.height=i,o&&n.i(a.a)(this._context,o,0,0,r,i))}})},function(e,t,n){var r=n(0),i=n(2),a=n(13);t.a=n(43).a.extend(a.a,{_isPlayingChanged:r.a.observer(`isPlaying`,function(e){this._video&&(e?(this.duration=1/0,this.play()):this.pause())}),_isVisible:!1,applyStyles:function(){var e=this.element,t=this.video,n=this.videoRotation,r=t.videoHeight,i=t.videoWidth,a=1;[90,270].indexOf(n)>=0&&(a=i/r);var o=` 2 height: 100%; 3 position: absolute; 4 width: 100%; 5 -moz-transform: scale(`+a+`) rotate(`+n+`deg); 6 -webkit-transform: scale(`+a+`) rotate(`+n+`deg); 7 -o-transform: scale(`+a+`) rotate(`+n+`deg); 8 -ms-transform: scale(`+a+`) rotate(`+n+`deg); 9 transform: scale(`+a+`) rotate(`+n+`deg); 10 z-index: 1; 11 `;e.setAttribute(`style`,o),e.className=`lpk-render-layer lpk-video`,t.style.height=`100%`,t.style.width=`100%`},cleanupElement:function(){var e=this.element,t=this.renderer,n=this._video,r=t.parentView;e.innerHtml&&=``,n&&(n.loop=!1,n.muted=!1,n.removeEventListener(`pause`,this.playIfPlaying)),r&&r.stop(),delete this._video},pause:function(){var e=this._isVisible,t=this._video;e&&t.pause()},play:function(){if(this._isVisible){var e=this._video,t=e.play();t?t.catch(this._handlePlayFailure):i.a.isIE||i.a.isEdge||(e.pause(),setTimeout(this._handlePlayFailure))}},_handlePlayFailure:r.a.boundFunction(function(){this.renderer.requestMoreCompatibleRecipe()}),playIfPlaying:r.a.boundFunction(function(){var e=this.isPlaying,t=this._video;
11if(e&&t.paused){var n=t.play();n&&n.catch(function(){})}}),setUpForRender:function(){var e=this.element,t=(this.isPlaying,this.renderer),n=t.autoplay,r=t.parentView,i=t.video;this.cleanupElement(),e.appendChild(i),this.applyStyles(),i.loop=!0,i.muted=!0,this._video=i,this._isVisible=!0,this._super(),n&&(i.addEventListener(`pause`,this.playIfPlaying),r.play())},tearDownFromRender:function(){this.cleanupElement(),this._isVisible=!1,this._super()}})},function(e,t,n){function r(e){e.retain()}function i(e){e.release()}var a=n(0),o=n(7),s=n(17),c=o.a.extend({videoDecoder:a.a.proxyProperty(`renderer.videoDecoder`),videoDuration:a.a.proxyProperty(`videoDecoder.duration`),canRender:a.a.proxyProperty({readOnly:!0,proxyPath:`videoDecoder.canProvideFrames`}),init:function(){this._super.apply(this,arguments);var e=this.layerName,t=this.recipe;this._framePrepIDKey=t.name+`_`+e+`_framePrepID`},videoTimeAtTime:function(e){return e},_videoTimeAtTime:function(e){return isNaN(e)?e:this.videoTimeAtTime(e)},prepareToRenderAtTime:function(e){var t=this._currentPrepID=++l;if(!this.canRender)return!1;this.prepareVideoFramesFromTime(e);for(var n,r=this._retainedFrames,i=0,a=0;n=r[a];a++)n.readyState!==2&&(n[this._framePrepIDKey]=t,n.onReadyOrFail(this._frameDidPrepare),i++);return this._preppingFrameCount=i,!i},reduceMemoryFootprint:function(){this._super(),this._clearAllRetainedFrames()},_clearAllRetainedFrames:function(){this._clearExtraRetainedFrames(),this._clearRetainedInstantaneousFrames()},_clearExtraRetainedFrames:function(){var e=this._retainedFrames;e&&(e.forEach(i),e.length=0)},_clearRetainedInstantaneousFrames:function(){this._retainedLoFrame&&this._retainedLoFrame.release(),this._retainedHiFrame&&this._retainedHiFrame.release(),this._retainedLoFrame=this._retainedHiFrame=null},_frameDidPrepare:a.a.boundFunction(function(e){e[this._framePrepIDKey]===this._currentPrepID&&(e[this._framePrepIDKey]=void 0,--this._preppingFrameCount||this.renderer.prepareToRenderAtTime(this.renderer.currentTime))}),prepareVideoFramesFromTime:function(e){this.retainFramesForTime(e)},canRenderAtTime:function(e){if(this.display(e)===`none`)return!0;if(!this.canRender)return!1;for(var t,n=!0,r=this.requiredFramesForTime(e),i=0;t=r[i];i++)n&&=t.readyState===2,t.retain().release();return n},renderAtTime:function(e){if(!arguments.length)return this._super();if(this.display(e)===`none`)return this._clearRetainedInstantaneousFrames(),this._super(e);var t=this._videoTimeAtTime(e),n=this.requiredFramesForVideoTime(t),r=n[0]||null,i=n[1]||null;if(r&&r.retain(),i&&i.retain(),this._clearRetainedInstantaneousFrames(),this._retainedLoFrame=r,this._retainedHiFrame=i,r&&=r.backingFrame,i&&=i.backingFrame,r&&i&&r.number>i.number){var a=r;i=r,r=a}r===i&&(i=null);var o=!r||i?this.videoDecoder.fractionalIndexForTime(t):r.frameNumber,s=o-(0|o);this.renderFramePair(r,i,s),this._super(e)},renderFramePair:function(){},requiredFramesForVideoTime:function(e,t,n){isNaN(t)&&(t=e);var r=this.videoDecoder,i=this.videoDuration,a=r.frameCount,o=u;if(o.length=0,t<0||e>i||isNaN(e)||isNaN(t))return o;var c=Math.max(0,Math.floor(r.fractionalIndexForTime(e))),l=Math.min(r.frameCount,Math.ceil(r.fractionalIndexForTime(t))),d=l<c,f=d?a-1:l;if(c===f-1){var p=r.frameTimes;p[f]-p[c]<1/30+.001&&(f=c)}for(var m=c;m<=f;m++)s.a&&m===0||(o.push(r.getFrame(m,n)),m+1===a&&d&&(m=-1,f=l));return o},requiredFramesForTime:function(e,t,n){return this.requiredFramesForVideoTime(this._videoTimeAtTime(e),this._videoTimeAtTime(t),n)},retainFramesForVideoTime:function(e,t,n){t===void 0&&(t=e);var a=this.lookaheadTime,o=this.shouldLoop,s=this.requiredFramesForVideoTime(e,t,n),c=this._retainedFrames||=[];s.forEach(r);for(var l=c.length-1;l>=0;l--){var u=c[l],d=u.time;(!o||d>a/2)&&(i(u),c.splice(l,1))}c.push.apply(c,s)},retainFramesForTime:function(e,t,n){return this.retainFramesForVideoTime(this._videoTimeAtTime(e),this._videoTimeAtTime(t),n)},dispose:function(){this.retainFramesForVideoTime(NaN),this._super()}}),l=1,u=[];t.a=c},function(e,t,n){var r=n(7),i=n(0);t.a=r.a.extend({isPlaying:i.a.proxyProperty({readOnly:!0,proxyPath:`renderer.parentView.isPlaying`}),photo:i.a.proxyProperty({readOnly:!0,proxyPath:`renderer.photo`}),canRender:i.a.proxyProperty(`photo`),canRenderAtTime:function(e){var t=this.photo;return!(this.display(e)!==`none`&&(!t||t instanceof Image&&!t.complete))}})},function(e,t,n){var r=n(7),i=n(0);t.a=r.a.extend({canRender:i.a.proxyProperty({readOnly:!0,proxyPath:`video`}),isPlaying:i.a.proxyProperty({readOnly:!0,proxyPath:`renderer.parentView.isPlaying`}),video:i.a.proxyProperty({readOnly:!0,proxyPath:`renderer.video`}),videoRotation:i.a.proxyProperty({readOnly:!0,proxyPath:`renderer.provider.videoRotation`})})},function(e,t,n){function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function i(e){var t=n.i(o.a)(e),r=l.get(t);if(r)return r;var i=e.map(function(e){if(e[0]===`i`&&f(e[1]))return`I`+e.substring(1)});return e=e.concat(i.filter(function(e){return!!e})),r=new RegExp(e.join(`|`),`g`),l.set(t,r),r}function a(e,t){var n=e.charCodeAt(0),r=t.charCodeAt(0),i=new Map;return function(e){var t=i.get(e);if(t!==void 0)return t;var a=e.charCodeAt(0);return t=a>=n&&a<=r,i.set(e,t),t}}var o=n(20),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=[`iOS`,`iPhone`,`iPad`,`iPod`,`WebKit`],l=new Map,u=a(`0`,`9`),d=a(`a`,`z`),f=a(`A`,`Z`),p=function(e){return d(e)||f(e)},m=function(e){return p(e)||u(e)},h=new Map;t.a=function(){function e(){r(this,e)}return s(e,null,[{key:`splitIntoArray`,value:function(e,t,n){for(var r=e.indexOf(t),i=0,a=t.length;r!==-1;)n.push(e.substring(i,r)),i=r+a,r=e.indexOf(t,i);n.push(e.substring(i))}},{key:`hyphenate`,value:function(t,r,i){if(!t)return``;r||r===null||!1===r||(r=c);var a=r||i?n.i(o.a)(r)+`#`+t+`#`+!!i:t,s=h.get(a);if(s)return s;
11if(Array.isArray(r)){var l=e.hyphenateCarefully(t,r,i);return h.set(a,l),l}var g=t.length,_=``,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;for(v=0;v<g;v++)y=t[v-1],b=t[v],x=b.toLowerCase(),S=t[v+1],y&&m(b)&&m(y)&&(!f(y)&&f(b)||u(y)&&p(b)||S&&f(y)&&f(b)&&d(S))?_+=`-`+x:_+=x;return h.set(a,_),_}},{key:`hyphenateCarefully`,value:function(t,n,r){var a=i(n),o=t.match(a);if(!o||!o.length)return e.hyphenate(t,null,r);for(var s=t.split(a),c=e.hyphenate(s[0]),l=0,u=o.length;l<u;l++){var d=o[l];r||(d=d.toLowerCase());var f=s[l+1];f&&=e.hyphenate(f,null,r),c+=(c&&`-`)+d,f&&(c+=(p(f[0])?`-`:``)+f)}return c}}]),e}()},function(e,t,n){function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function i(e,t){e||a(t)}function a(e){throw e}var o=n(5);n.d(t,`b`,function(){return c}),n.d(t,`a`,function(){return l});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=(function(){function e(t,n){r(this,e),this.w=t,this.h=n}s(e,[{key:`toString`,value:function(){return`(`+this.w+`, `+this.h+`)`}},{key:`getHalfSize`,value:function(){return new e(this.w>>>1,this.h>>>1)}},{key:`length`,value:function(){return this.w*this.h}}])}(),function(){function e(t,n,i){r(this,e),this.bytes=new Uint8Array(t),this.start=n||0,this.pos=this.start,this.end=n+i||this.bytes.length}return s(e,[{key:`readU8Array`,value:function(e){if(this.pos>this.end-e)return null;var t=this.bytes.subarray(this.pos,this.pos+e);return this.pos+=e,t}},{key:`readU32Array`,value:function(e,t,n){if(t||=1,this.pos>this.end-e*t*4)return null;if(t===1){for(var r=new Uint32Array(e),i=0;i<e;i++)r[i]=this.readU32();return r}for(var a=Array(e),o=0;o<e;o++){var s=null;if(n){s={};for(var c=0;c<t;c++)s[n[c]]=this.readU32()}else{s=new Uint32Array(t);for(var l=0;l<t;l++)s[l]=this.readU32()}a[o]=s}return a}},{key:`read8`,value:function(){return this.readU8()<<24>>24}},{key:`readU8`,value:function(){return this.pos>=this.end?null:this.bytes[this.pos++]}},{key:`read16`,value:function(){return this.readU16()<<16>>16}},{key:`readU16`,value:function(){if(this.pos>=this.end-1)return null;var e=this.bytes[this.pos+0]<<8|this.bytes[this.pos+1];return this.pos+=2,e}},{key:`read24`,value:function(){return this.readU24()<<8>>8}},{key:`readU24`,value:function(){var e=this.pos,t=this.bytes;if(e>this.end-3)return null;var n=t[e+0]<<16|t[e+1]<<8|t[e+2];return this.pos+=3,n}},{key:`peek32`,value:function(e){var t=this.pos,n=this.bytes;if(t>this.end-4)return null;var r=n[t+0]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3];return e&&(this.pos+=4),r}},{key:`read32`,value:function(){return this.peek32(!0)}},{key:`readU32`,value:function(){return this.peek32(!0)>>>0}},{key:`read4CC`,value:function(){var e=this.pos;if(e>this.end-4)return null;for(var t=``,n=0;n<4;n++)t+=String.fromCharCode(this.bytes[e+n]);return this.pos+=4,t}},{key:`readFP16`,value:function(){return this.read32()/65536}},{key:`readFP8`,value:function(){return this.read16()/256}},{key:`readISO639`,value:function(){for(var e=this.readU16(),t=``,n=0;n<3;n++){var r=e>>>5*(2-n)&31;t+=String.fromCharCode(r+96)}return t}},{key:`readUTF8`,value:function(e){for(var t=``,n=0;n<e;n++)t+=String.fromCharCode(this.readU8());return t}},{key:`readPString`,value:function(e){var t=this.readU8();i(t<=e);var n=this.readUTF8(t);return this.reserved(e-t-1,0),n}},{key:`skip`,value:function(e){this.seek(this.pos+e)}},{key:`reserved`,value:function(e,t){for(var n=0;n<e;n++)i(this.readU8()===t)}},{key:`seek`,value:function(e){(e<0||e>this.end)&&a(`Index out of bounds (bounds: [0, `+this.end+`], index: `+e+`).`),this.pos=e}},{key:`subStream`,value:function(t,n){return new e(this.bytes.buffer,t,n)}},{key:`uint`,value:function(e){for(var t=this.position,n=t+e,r=0,i=t;i<n;i++)r<<=8,r|=255&this.readU8();return r}},{key:`length`,get:function(){return this.end-this.start}},{key:`position`,get:function(){return this.pos}},{key:`remaining`,get:function(){return this.end-this.pos}}]),e}()),l=function(){function e(t){r(this,e),this.stream=t,this.tracks={},this.metaData={}}return s(e,[{key:`getPath`,value:function(e){for(var t=e.split(`.`),n=this,r=0,i=t.length;r<i;r++)n=n?n[t[r]]:void 0;return n}},{key:`readBoxes`,value:function(e,t){for(;e.peek32();){var n=this.readBox(e);if(n.type in t){var r=t[n.type];Array.isArray(r)||(t[n.type]=[r]),t[n.type].push(n)}else t[n.type]=n}}},{key:`readBox`,value:function(e){function t(){o.version=e.readU8(),o.flags=e.readU24()}function n(){return o.size-(e.position-o.offset)}function r(){e.skip(n())}function a(){var t=e.subStream(e.position,n());s.readBoxes(t,o),e.skip(t.length)}var o={offset:e.position},s=this;(function(){o.size=e.readU32(),o.type=e.read4CC()})();var c=void 0,l=void 0,d=void 0;switch(o.type){case`ftyp`:var f=o;f.name=`File Type Box`,f.majorBrand=e.read4CC(),f.minorVersion=e.readU32(),f.compatibleBrands=Array((f.size-16)/4);for(var p=0;p<f.compatibleBrands.length;p++)f.compatibleBrands[p]=e.read4CC();break;case`moov`:o.name=`Movie Box`,a();break;case`mvhd`:var m=o;m.name=`Movie Header Box`,t(),i(m.version==0),m.creationTime=e.readU32(),m.modificationTime=e.readU32(),m.timeScale=e.readU32(),m.duration=e.readU32(),m.rate=e.readFP16(),m.volume=e.readFP8(),e.skip(10),m.matrix=e.readU32Array(9),e.skip(24),m.nextTrackId=e.readU32();break;case`trak`:var h=o;h.name=`Track Box`,a();var g=new u(this,h),_=h.mdia&&h.mdia.hdlr&&h.mdia.hdlr.handlerType||`unknownHandlerType`,v=this.tracks;(v[_]||(v[_]=[])).push(g),v[h.tkhd.trackId]=g;break;case`tkhd`:var y=o;y.name=`Track Header Box`,t(),i(y.version==0),y.creationTime=e.readU32(),y.modificationTime=e.readU32(),y.trackId=e.readU32(),e.skip(4),y.duration=e.readU32(),e.skip(8),y.layer=e.readU16(),y.alternateGroup=e.readU16(),y.volume=e.readFP8(),e.skip(2),y.matrix=e.readU32Array(9),y.width=e.readFP16(),y.height=e.readFP16();break;case`edts`:o.name=`Edit Atom`,a();break;case`elst`:var b=o;b.name=`Edit List Atom`,t(),b.editList=[],d=e.readU32();for(var x=0;x<d;x++)b.editList.push({trackDuration:e.read32(),mediaTime:e.read32(),mediaRate:e.readU32()});i(!n()),r();break;case`mdia`:o.name=`Media Box`,a();break;case`mdhd`:var S=o;S.name=`Media Header Box`,t(),i(S.version==0),S.creationTime=e.readU32(),S.modificationTime=e.readU32(),S.timeScale=e.readU32(),S.duration=e.readU32(),S.language=e.readISO639(),e.skip(2);break;case`hdlr`:var C=o;C.name=`Handler Reference Box`,t(),e.skip(4),C.handlerType=e.read4CC(),e.skip(12),l=C.size-32,l>0&&(C.name=e.readUTF8(l));break;case`minf`:o.name=`Media Information Box`,a();break;case`stbl`:o.name=`Sample Table Box`,a();break;case`stsd`:var w=o;w.name=`Sample Description Box`,t(),w.sd=[],e.readU32(),a();break;case`avc1`:var T=o;e.reserved(6,0),T.dataReferenceIndex=e.readU16(),i(e.readU16()==0),i(e.readU16()==0),e.readU32(),e.readU32(),e.readU32(),T.width=e.readU16(),T.height=e.readU16(),T.horizontalResolution=e.readFP16(),T.verticalResolution=e.readFP16(),i(e.readU32()==0),T.frameCount=e.readU16(),T.compressorName=e.readPString(32),T.depth=e.readU16(),i(e.readU16()==65535),a();break;case`mp4a`:var E=o;if(e.reserved(6,0),E.dataReferenceIndex=e.readU16(),E.version=e.readU16(),E.version!==0){r();break}e.skip(2),e.skip(4),E.channelCount=e.readU16(),E.sampleSize=e.readU16(),E.compressionId=e.readU16(),E.packetSize=e.readU16(),E.sampleRate=e.readU32()>>>16,a();break;case`esds`:o.name=`Elementary Stream Descriptor`,t(),r();break;case`avcC`:var D=o;D.name=`AVC Configuration Box`,D.configurationVersion=e.readU8(),D.avcProfileIndicaation=e.readU8(),D.profileCompatibility=e.readU8(),D.avcLevelIndication=e.readU8(),D.lengthSizeMinusOne=3&e.readU8(),i(D.lengthSizeMinusOne==3,`TODO`),c=31&e.readU8(),D.sps=[];for(var O=0;O<c;O++)D.sps.push(e.readU8Array(e.readU16()));c=31&e.readU8(),D.pps=[];for(var k=0;k<c;
11k++)D.pps.push(e.readU8Array(e.readU16()));r();break;case`btrt`:var A=o;A.name=`Bit Rate Box`,A.bufferSizeDb=e.readU32(),A.maxBitrate=e.readU32(),A.avgBitrate=e.readU32();break;case`stts`:var j=o;j.name=`Decoding Time to Sample Box`,t(),j.table=e.readU32Array(e.readU32(),2,[`count`,`delta`]);break;case`stss`:var M=o;M.name=`Sync Sample Box`,t(),M.samples=e.readU32Array(e.readU32());break;case`stsc`:var N=o;N.name=`Sample to Chunk Box`,t(),N.table=e.readU32Array(e.readU32(),3,[`firstChunk`,`samplesPerChunk`,`sampleDescriptionId`]);break;case`stsz`:var P=o;P.name=`Sample Size Box`,t(),P.sampleSize=e.readU32(),c=e.readU32(),P.sampleSize==0&&(P.table=e.readU32Array(c));break;case`stco`:var F=o;F.name=`Chunk Offset Box`,t(),F.table=e.readU32Array(e.readU32());break;case`smhd`:var I=o;I.name=`Sound Media Header Box`,t(),I.balance=e.readFP8(),e.reserved(2,0);break;case`mdat`:var L=o;L.name=`Media Data Box`,i(L.size>=8,`Cannot parse large media data yet.`),L.data=e.readU8Array(n());break;case`mebx`:o.name=`Mebx`,a();break;case`meta`:o.name=`Metadata`,a();break;case`keys`:var R=o;R.name=`Metadata Item Keys`,t();var z=R.keyCount=e.read32(),B=R.offset-R.size;R.keyList=new Map;for(var V=1;V<=z;V++){var H=e.read32()-8;H<1||H>B||(e.skip(4),R.keyList.set(e.readUTF8(H),V))}this.metaData.keys=R;break;case`ilst`:var U=o;U.name=`Metadata Item List`,U.items=[];for(var W=U.offset+U.size;e.position<W;){var G=(e.position,e.readU32(),e.readU32()),K=e.readU32()-16,q=(e.read4CC(),e.readU8()),J=e.readU24(),Y=(e.readU16(),e.readU16(),void 0);Y=q===0&&J!==1?e.uint(K):e.readUTF8(K),U.items[G]=Y}this.metaData.values=U;break;default:r()}return o}},{key:`read`,value:function(){var e=new Date().getTime();this.file={},this.readBoxes(this.stream,this.file),o.a.info(`Parsed stream in `+(new Date().getTime()-e)+` ms`)}},{key:`traceSamples`,value:function(){var e=this.tracks[1],t=this.tracks[2];o.a.info(`Video Samples: `+e.getSampleCount()),o.a.info(`Audio Samples: `+t.getSampleCount());for(var n=0,r=0,i=0;i<100;i++){var a=e.sampleToOffset(n),s=t.sampleToOffset(r),c=e.sampleToSize(n,1),l=t.sampleToSize(r,1);a<s?(o.a.info(`V Sample `+n+` Offset : `+a+`, Size : `+c),n++):(o.a.info(`A Sample `+r+` Offset : `+s+`, Size : `+l),r++)}}}]),e}(),u=function(){function e(t,n){r(this,e),this.file=t,this.trak=n}return s(e,[{key:`getSampleSizeTable`,value:function(){return this.trak.mdia.minf.stbl.stsz.table}},{key:`getSampleCount`,value:function(){return this.getSampleSizeTable().length}},{key:`sampleToSize`,value:function(e,t){for(var n=this.getSampleSizeTable(),r=0,i=e;i<e+t;i++)r+=n[i];return r}},{key:`sampleToChunk`,value:function(e){var t=this.trak.mdia.minf.stbl.stsc.table;if(t.length===1){var n=t[0];return i(n.firstChunk===1),{index:e/n.samplesPerChunk,offset:e%n.samplesPerChunk}}for(var r=0,a=0;a<t.length;a++){var o=t[a];if(a>0){var s=t[a-1],c=o.firstChunk-s.firstChunk,l=s.samplesPerChunk*c;if(!(e>=l))return{index:r+Math.floor(e/s.samplesPerChunk),offset:e%s.samplesPerChunk};if(e-=l,a===t.length-1)return{index:r+c+Math.floor(e/o.samplesPerChunk),offset:e%o.samplesPerChunk};r+=c}}i(!1)}},{key:`chunkToOffset`,value:function(e){return this.trak.mdia.minf.stbl.stco.table[e]}},{key:`sampleToOffset`,value:function(e){var t=this.sampleToChunk(e);return this.chunkToOffset(t.index)+this.sampleToSize(e-t.offset,t.offset)}},{key:`timeToSample`,value:function(e){for(var t=this.trak.mdia.minf.stbl.stts.table,n=0,r=0;r<t.length;r++){var i=t[r].count*t[r].delta;if(!(e>=i))return n+Math.floor(e/t[r].delta);e-=i,n+=t[r].count}}},{key:`sampleToTime`,value:function(e){for(var t=this.trak.mdia.minf.stbl.stts.table,n=0,r=0,i=0;i<t.length&&n<e;i++){var a=t[i],o=Math.min(e-n,a.count);n+=o,r+=o*a.delta}return r}},{key:`getTotalTime`,value:function(){for(var e=this.trak.mdia.minf.stbl.stts.table,t=0,n=0;n<e.length;n++)t+=e[n].count*e[n].delta;return i(this.trak.mdia.mdhd.duration===t),this.trak.mdia.mdhd.duration}},{key:`getTotalTimeInSeconds`,value:function(){return this.timeToSeconds(this.getTotalTime())}},{key:`getTimeScale`,value:function(){return this.trak.mdia.mdhd.timeScale}},{key:`timeToSeconds`,value:function(e){return e/this.getTimeScale()}},{key:`secondsToTime`,value:function(e){return e*this.getTimeScale()}},{key:`secondsToSample`,value:function(e){return this.timeToSample(this.secondsToTime(e))}},{key:`sampleToSeconds`,value:function(e){return this.timeToSeconds(this.sampleToTime(e))}},{key:`getAllSampleTimes`,value:function(){for(var e=[],t=this.getSampleC
11ount(),n=0;n<t;n++)e.push(this.sampleToTime(n));return e}},{key:`getAllSampleSeconds`,value:function(){for(var e=[],t=this.getSampleCount(),n=0;n<t;n++)e.push(this.sampleToSeconds(n));return e}},{key:`getSampleNALUnits`,value:function(e){for(var t=this.file.stream.bytes,n=this.sampleToOffset(e),r=n+this.sampleToSize(e,1),i=[];r-n>0;){var a=new c(t.buffer,n).readU32();i.push(t.subarray(n+4,n+a+4)),n=n+a+4}return i}}]),e}()},function(e,t,n){t.a={staticMembers:{_pool:null,_cache:null,init:function(){this._pool=[],this._cache={},this._super()},getPoolingCacheKey:function(){throw"Must implement `getPoolingCacheKey` to use PoolCaching."},getCached:function(){var e=this.getPoolingCacheKey.apply(this,arguments),t=this._cache[e];return t||(t=this._cache[e]=this._pool.pop()||this.create(),t._poolingCacheKey=e,t.initFromPool.apply(t,arguments)),t},peekCached:function(){var e=this.getPoolingCacheKey.apply(this,arguments);return this._cache[e]||null},_disposeInstance:function(e){delete this._cache[e._poolingCacheKey],e._poolingCacheKey=void 0,e._poolingLifecycleCount=1+(0|e._poolingLifecycleCount),this._pool.push(e)}},dispose:function(){},_poolingCacheKey:null,initFromPool:function(){},_retainCount:0,retain:function(){return this._retainCount++,this},release:function(){return this._retainCount--,this._retainCount||this.dispose(),this}}},function(e,t,n){function r(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}function i(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var o=n(19);n.d(t,`a`,function(){return l}),n.d(t,`b`,function(){return u}),n.d(t,`c`,function(){return d}),n.d(t,`d`,function(){return f});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function(){function e(){a(this,e),this._a=[]}return s(e,[{key:`get`,value:function(){return this._a.pop()||this.create()}},{key:`ret`,value:function(e){this.prepare(e),this._a.push(e)}}]),e}(),l=new(function(e){function t(){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:`create`,value:function(){return[]}},{key:`prepare`,value:function(e){e.length=0}}]),t}(c)),u=new(function(e){function t(){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:`create`,value:function(){return new o.a}},{key:`prepare`,value:function(e){e.clear()}}]),t}(c)),d=new(function(e){function t(){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:`create`,value:function(){return Object.create(null)}},{key:`prepare`,value:function(e){var t=e;for(var n in t)delete t[n]}}]),t}(c)),f=new(function(e){function t(){return a(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:`create`,value:function(){return document.createElement(`canvas`)}},{key:`prepare`,value:function(e){var t=e.parentNode;t&&t.removeChild(e),e.width=e.height=0}}]),t}(c))},function(e,t,n){function r(e,t){return e.apply(void 0,t)}t.a={_readiness:`pending`,_resolutionArgs:null,_fulfillmentCallbacks:null,_rejectionCallbacks:null,onReadyOrFail:function(e,t){this._resolveIfAlreadyResolved(e,t,!1)||this._pendCallbacks(e,t)},onReadyOrFailSync:function(e,t){this._resolveIfAlreadyResolved(e,t,!0)||this._pendCallbacks(e,t)},_resolveIfAlreadyResolved:function(e,t,n){var i=this._resolutionArgs;return this._readiness===`success`&&e?(n?r(e,i):setTimeout(r,0,e,i),!0):!(this._readiness!==`failure`||!t)&&(n?r(t,i):setTimeout(r,0,t,i),!0)},_pendCallbacks:function(e,t){e&&(this._fulfillmentCallbacks||=[]).push(e),t&&(this._rejectionCallbacks||=[]).push(t)},clearReadinessCallbacks:function(){this._fulfillmentCallbacks&&(this._fulfillmentCallbacks.length=0),this._rejectionCallbacks&&(this._rejectionCallbacks.length=0)},resetReadiness:function(){this._readiness=`pending`,this._resolutionArgs&&(this._resolutionArgs.length=0),this.clearReadinessCallbacks()},resolveReadiness:function(){this._readiness===`pending`&&(this._readiness=`
11success`,(this._resolutionArgs=this._resolutionArgs||[]).push.apply(this._resolutionArgs,arguments),this._invokeCallbacks(this._fulfillmentCallbacks),this.clearReadinessCallbacks())},rejectReadiness:function(){this._readiness===`pending`&&(this._readiness=`failure`,(this._resolutionArgs=this._resolutionArgs||[]).push.apply(this._resolutionArgs,arguments),this._invokeCallbacks(this._rejectionCallbacks),this.clearReadinessCallbacks())},_invokeCallbacks:function(e){if(e){for(var t,n=0;t=e[n];n++)t.apply(void 0,this._resolutionArgs);e.length=0}}}},function(e,t,n){function r(){for(var e=1;e<arguments.length;e++)this[e-1]=arguments[e];return this}function i(e){return e&&e.tagName===`IMG`&&/^data:image\/svg|\.svg\?|\.svg$/.test(e.src)}var a=document.createElement(`canvas`),o=a.getContext(`2d`),s=document.createElement(`canvas`),c=s.getContext(`2d`);a.width=s.width=a.height=s.height=0;var l=!1,u=!1,d=function(e,t){if(i(t))return e.drawImage.apply(e,r.apply(f,arguments)),!0;var n=l,d=u;l=u=!1;var p=t instanceof HTMLImageElement?t.naturalWidth:t.width,m=t instanceof HTMLImageElement?t.naturalHeight:t.height;if(!p||!m)throw`Source image provided to drawImageSmooth was not loaded, or otherwise had no dimensions.`;var h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;switch(arguments.length-1){case 3:h=0,g=0,_=p,v=m,y=arguments[2],b=arguments[3],x=p,S=m;break;case 5:h=0,g=0,_=p,v=m,y=arguments[2],b=arguments[3],x=arguments[4],S=arguments[5];break;case 9:h=arguments[2],g=arguments[3],_=arguments[4],v=arguments[5],y=arguments[6],b=arguments[7],x=arguments[8],S=arguments[9]}var C=x/_,w=S/v;if(C&&w){var T=2**Math.ceil(Math.log(1.1*Math.max(C,w))/Math.log(2));if(T>=1)return e.drawImage.apply(e,r.apply(f,arguments)),!0;var E=void 0;if(n){E=`_cachedSmoothDownsample_from`+h+`,`+g+`,`+_+`,`+v+`@`+T+`x`;var D=t[E];if(D)return e.drawImage(D,0,0,D.width,D.height,y,b,x,S),!0}if(d)return e.drawImage.apply(e,r.apply(f,arguments)),!1;var O=1,k=_,A=v,j=Math.max(2**Math.ceil(Math.log(k)/Math.log(2)),a.width),M=Math.max(2**Math.ceil(Math.log(A)/Math.log(2)),a.height);for(a.width===j&&a.height===M||(a.width=s.width=j,a.height=s.height=M),o.drawImage(t,h,g,_,v,0,0,_,v);O>T;){c.drawImage(a,0,0,k,A,0,0,k=Math.ceil(k/2),A=Math.ceil(A/2)),o.clearRect(0,0,k,A);var N=a;a=s,s=N;var P=o;o=c,c=P,O/=2}if(n){var F=document.createElement(`canvas`);F.width=k,F.height=A,F.getContext(`2d`).drawImage(a,0,0),t[E]=F}return e.drawImage(a,0,0,k,A,y,b,x,S),o.clearRect(0,0,_,v),c.clearRect(0,0,_,v),!0}};d.usingCache=function(){return l=!0,this},d.avoidingWorkIf=function(e){return u=e,this};var f=[];t.a=d},function(e,t,n){function r(){var e=`_callbacksForEventHandler`+ ++i;return function(t){var n=this[e]||(this[e]=[]);if(typeof t==`function`)return n.push(t);if(n)for(var r=0,i=n.length;r<i;++r)n[r](t)}}t.a=r;var i=1},function(e,t,n){function r(e){var t=e&&new DataView(e),n={};return t&&i(t)&&a(t,n),n}function i(e){return e.getUint16(0)===65496}function a(e,t){for(var n=e.byteLength,r=2;r<n;){var i=e.getUint16(r);i===65505&&o(e,r+4,t),i!==65472&&i!==65474||s(e,r+5,t),r+=2+e.getUint16(r+2)}return t}function o(e,t,n){if(e.getUint32(t)!==1165519206)return n;var r=t+6,i=void 0,a=e.getUint16(r);if(a===18761)i=!0;else{if(a!==19789)return n;i=!1}for(var o=r+e.getUint32(r+4,i),s=e.getUint16(o,i),l=0;l<s;l++){var u=o+12*l+2,f=e.getUint16(u,i);f===274&&(n.orientation=e.getUint16(u+8,i)),f===34665&&c(e,r,d(e,u,i),i,n)}return n}function s(e,t,n){return n.height=e.getUint16(t),n.width=e.getUint16(t+2),n}function c(e,t,n,r,i){var a=u(e,t+n,r),o=void 0;return 37500 in a&&(o=a[37500],l(e,t+e.getUint32(o+8),i)),i}function l(e,t,n){for(var r=``,i=0;i<9;i++)r+=String.fromCharCode(e.getUint8(t+i));if(r!==`Apple iOS`)return n;var a=e.getUint16(t+9+3)===18761,o=u(e,t+9+3+2,a);return 27 in o&&(n.photosRenderEffect=d(e,o[27],a)),n}function u(e,t,n){for(var r=e.getUint16(t,n),i=t+2,a={},o=0;o<r;o++){var s=i+12*o;a[e.getUint16(s,n)]=s}return a}function d(e,t,n){var r=e.getUint16(t+2,n),i=e.getUint32(t+4,n),a=e.getUint32(t+8,n),o=[];switch(r){case 3:if(i===1)return e.getUint16(t+8,n);if(i===2)return[e.getUint16(t+8,n),e.getUint16(t+10,n)];for(var s=0;s<i;s++)o[s]=e.getUint16(a+4*s,n);return o;case 4:if(i===1)return a;for(var c=0;c<i;c++)o[c]=e.getUint32(a+4*c,n);return o;case 9:if(i===1)return e.getInt32(t+8,n);for(var l=0;l<i;l++)o[l]=e.getInt32(a+4*l,n);return o;default:return null}}t.a=r},function(e,t,n){function r(){for(var e=i()+i();e.length<16;)e+=i();return e.slice(0,16)}function i(){return Math.random().toString(16).substring(2)}t.a=r},function(e,t,n){function r(e,t){var n=e,r=n._computedStyle;r||=n._computedStyle=document.defaultView.getComputedStyle(e,null);var a=r.getPropertyValue(t);return!a&&i.get(t)&&(a=i.get(t)(r)||a),a}t.a=r;var i=function(){var e=new Map;return e.set(`font`,function(e){for(var t=``,n=0,r=a.length;n<r;n++){var i=a[n],o=e.getPropertyValue(`font-`+i);if(o&&(t&&(t+=` `),t+=o,i===`size`)){var s=e.getPropertyValue(`line-height`);s&&(t+=`/`+s)}}return t}),e}(),a=[`style`,`variant`,`weight`,`size`,`family`]},function(e,t,n){function r(e,t,n,r,i,a,o){var s=void 0;if(typeof e==`string`){var c=e;c===`fit`&&(s=!1),c===`cover`&&(s=!0)}else s=!!e;var l=arguments.length;l!==6&&(o=l-1);var u=void 0,d=void 0,f=void 0,p=void 0,m=void 0;if(o===2||o===3){var h=t,g=n;d=h.height,u=h.width,p=g.height,f=g.width,m=r}else u=t,d=n,f=r,p=i,m=a;var _=u/d,v=f/p,y=s?_<v:_>v;return m||={},m.width=y?f:p*_,m.height=y?f/_:p,m}function i(e,t,n,i,a){return r(!1,e,t,n,i,a,arguments.length)}t.a=i},function(e,t,n){t.a=`current`},function(e,t,n){t.a=`Mcurrent`},function(e,t,n){t.a=`1.5.6`}])})}));export{t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.