!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["dotlottie-player"]={})}(this,(function(exports){"use strict";function _taggedTemplateLiteral(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function __decorate(t,e,r,i){var s,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */}const isCEPolyfill="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,removeNodes=(t,e,r=null)=>{for(;e!==r;){const r=e.nextSibling;t.removeChild(e),e=r}},marker=`{{lit-${String(Math.random()).slice(2)}}}`,nodeMarker=`\x3c!--${marker}--\x3e`,markerRegex=new RegExp(`${marker}|${nodeMarker}`),boundAttributeSuffix="$lit$";class Template{constructor(t,e){this.parts=[],this.element=e;const r=[],i=[],s=document.createTreeWalker(e.content,133,null,!1);let n=0,a=-1,o=0;const{strings:h,values:{length:l}}=t;for(;o0;){const e=h[o],r=lastAttributeNameRegex.exec(e)[2],i=r.toLowerCase()+boundAttributeSuffix,s=t.getAttribute(i);t.removeAttribute(i);const n=s.split(markerRegex);this.parts.push({type:"attribute",index:a,name:r,strings:n}),o+=n.length-1}}"TEMPLATE"===t.tagName&&(i.push(t),s.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(marker)>=0){const i=t.parentNode,s=e.split(markerRegex),n=s.length-1;for(let e=0;e{const r=t.length-e.length;return r>=0&&t.slice(r)===e},isTemplatePartActive=t=>-1!==t.index,createMarker=()=>document.createComment(""),lastAttributeNameRegex=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,walkerNodeFilter=133;function removeNodesFromTemplate(t,e){const{element:{content:r},parts:i}=t,s=document.createTreeWalker(r,walkerNodeFilter,null,!1);let n=nextActiveIndexInTemplateParts(i),a=i[n],o=-1,h=0;const l=[];let p=null;for(;s.nextNode();){o++;const t=s.currentNode;for(t.previousSibling===p&&(p=null),e.has(t)&&(l.push(t),null===p&&(p=t)),null!==p&&h++;void 0!==a&&a.index===o;)a.index=null!==p?-1:a.index-h,n=nextActiveIndexInTemplateParts(i,n),a=i[n]}l.forEach(t=>t.parentNode.removeChild(t))}const countNodes=t=>{let e=11===t.nodeType?0:1;const r=document.createTreeWalker(t,walkerNodeFilter,null,!1);for(;r.nextNode();)e++;return e},nextActiveIndexInTemplateParts=(t,e=-1)=>{for(let r=e+1;r0){for(;-1!==a;)s[a].index+=o,a=nextActiveIndexInTemplateParts(s,a);return}a=nextActiveIndexInTemplateParts(s,a)}}} /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const directives=new WeakMap,isDirective=t=>"function"==typeof t&&directives.has(t),noChange={},nothing={}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ class TemplateInstance{constructor(t,e,r){this.__parts=[],this.template=t,this.processor=e,this.options=r}update(t){let e=0;for(const r of this.__parts)void 0!==r&&r.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=isCEPolyfill?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],r=this.template.parts,i=document.createTreeWalker(t,133,null,!1);let s,n=0,a=0,o=i.nextNode();for(;n-1||r)&&-1===t.indexOf("--\x3e",s+1);const n=lastAttributeNameRegex.exec(t);e+=null===n?t+(r?commentMarker:nodeMarker):t.substr(0,n.index)+n[1]+n[2]+boundAttributeSuffix+n[3]+marker}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");return t.innerHTML=this.getHTML(),t}} /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const isPrimitive=t=>null===t||!("object"==typeof t||"function"==typeof t),isIterable=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class AttributeCommitter{constructor(t,e,r){this.dirty=!0,this.element=t,this.name=e,this.strings=r,this.parts=[];for(let t=0;t{try{const t={get capture(){return eventOptionsSupported=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class EventPart{constructor(t,e,r){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=r,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;isDirective(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=noChange,t(this)}if(this.__pendingValue===noChange)return;const t=this.__pendingValue,e=this.value,r=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),i=null!=t&&(null==e||r);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=getOptions(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=noChange}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const getOptions=t=>t&&(eventOptionsSupported?{capture:t.capture,passive:t.passive,once:t.once}:t.capture) /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */;function templateFactory(t){let e=templateCaches.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},templateCaches.set(t.type,e));let r=e.stringsArray.get(t.strings);if(void 0!==r)return r;const i=t.strings.join(marker);return r=e.keyString.get(i),void 0===r&&(r=new Template(t,t.getTemplateElement()),e.keyString.set(i,r)),e.stringsArray.set(t.strings,r),r}const templateCaches=new Map,parts=new WeakMap,render=(t,e,r)=>{let i=parts.get(e);void 0===i&&(removeNodes(e,e.firstChild),parts.set(e,i=new NodePart(Object.assign({templateFactory:templateFactory},r))),i.appendInto(e)),i.setValue(t),i.commit()}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ class DefaultTemplateProcessor{handleAttributeExpressions(t,e,r,i){const s=e[0];if("."===s){return new PropertyCommitter(t,e.slice(1),r).parts}if("@"===s)return[new EventPart(t,e.slice(1),i.eventContext)];if("?"===s)return[new BooleanAttributePart(t,e.slice(1),r)];return new AttributeCommitter(t,e,r).parts}handleTextExpression(t){return new NodePart(t)}}const defaultTemplateProcessor=new DefaultTemplateProcessor; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const html=(t,...e)=>new TemplateResult(t,e,"html",defaultTemplateProcessor) /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */,getTemplateCacheKey=(t,e)=>`${t}--${e}`;let compatibleShadyCSSVersion=!0;void 0===window.ShadyCSS?compatibleShadyCSSVersion=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),compatibleShadyCSSVersion=!1);const shadyTemplateFactory=t=>e=>{const r=getTemplateCacheKey(e.type,t);let i=templateCaches.get(r);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},templateCaches.set(r,i));let s=i.stringsArray.get(e.strings);if(void 0!==s)return s;const n=e.strings.join(marker);if(s=i.keyString.get(n),void 0===s){const r=e.getTemplateElement();compatibleShadyCSSVersion&&window.ShadyCSS.prepareTemplateDom(r,t),s=new Template(e,r),i.keyString.set(n,s)}return i.stringsArray.set(e.strings,s),s},TEMPLATE_TYPES=["html","svg"],removeStylesFromLitTemplates=t=>{TEMPLATE_TYPES.forEach(e=>{const r=templateCaches.get(getTemplateCacheKey(e,t));void 0!==r&&r.keyString.forEach(t=>{const{element:{content:e}}=t,r=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{r.add(t)}),removeNodesFromTemplate(t,r)})})},shadyRenderSet=new Set,prepareTemplateStyles=(t,e,r)=>{shadyRenderSet.add(t);const i=r?r.element:document.createElement("template"),s=e.querySelectorAll("style"),{length:n}=s;if(0===n)return void window.ShadyCSS.prepareTemplateStyles(i,t);const a=document.createElement("style");for(let t=0;t{if(!r||"object"!=typeof r||!r.scopeName)throw new Error("The `scopeName` option is required.");const i=r.scopeName,s=parts.has(e),n=compatibleShadyCSSVersion&&11===e.nodeType&&!!e.host,a=n&&!shadyRenderSet.has(i),o=a?document.createDocumentFragment():e;if(render(t,o,Object.assign({templateFactory:shadyTemplateFactory(i)},r)),a){const t=parts.get(o);parts.delete(o);const r=t.value instanceof TemplateInstance?t.value.template:void 0;prepareTemplateStyles(i,o,r),removeNodes(e,e.firstChild),e.appendChild(o),parts.set(e,t)}!s&&n&&window.ShadyCSS.styleElement(e.host)}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ var _a;window.JSCompiler_renameProperty=(t,e)=>t;const defaultConverter={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},notEqual=(t,e)=>e!==t&&(e==e||t==t),defaultPropertyDeclaration={attribute:!0,type:String,converter:defaultConverter,reflect:!1,hasChanged:notEqual},STATE_HAS_UPDATED=1,STATE_UPDATE_REQUESTED=4,STATE_IS_REFLECTING_TO_ATTRIBUTE=8,STATE_IS_REFLECTING_TO_PROPERTY=16,finalized="finalized";class UpdatingElement extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=new Promise(t=>this._enableUpdatingResolver=t),this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach((e,r)=>{const i=this._attributeNameForProperty(r,e);void 0!==i&&(this._attributeToPropertyMap.set(i,r),t.push(i))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((t,e)=>this._classProperties.set(e,t))}}static createProperty(t,e=defaultPropertyDeclaration){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const r="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,r,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}static getPropertyDescriptor(t,e,r){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this._requestUpdate(t,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||defaultPropertyDeclaration}static finalize(){const t=Object.getPrototypeOf(this);if(t.hasOwnProperty(finalized)||t.finalize(),this[finalized]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const r of e)this.createProperty(r,t[r])}}static _attributeNameForProperty(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,r=notEqual){return r(t,e)}static _propertyValueFromAttribute(t,e){const r=e.type,i=e.converter||defaultConverter,s="function"==typeof i?i:i.fromAttribute;return s?s(t,r):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const r=e.type,i=e.converter;return(i&&i.toAttribute||defaultConverter.toAttribute)(t,r)}initialize(){this._saveInstanceProperties(),this._requestUpdate()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,e)=>this[e]=t),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,e,r){e!==r&&this._attributeToProperty(t,r)}_propertyToAttribute(t,e,r=defaultPropertyDeclaration){const i=this.constructor,s=i._attributeNameForProperty(t,r);if(void 0!==s){const t=i._propertyValueToAttribute(e,r);if(void 0===t)return;this._updateState=this._updateState|STATE_IS_REFLECTING_TO_ATTRIBUTE,null==t?this.removeAttribute(s):this.setAttribute(s,t),this._updateState=this._updateState&~STATE_IS_REFLECTING_TO_ATTRIBUTE}}_attributeToProperty(t,e){if(this._updateState&STATE_IS_REFLECTING_TO_ATTRIBUTE)return;const r=this.constructor,i=r._attributeToPropertyMap.get(t);if(void 0!==i){const t=r.getPropertyOptions(i);this._updateState=this._updateState|STATE_IS_REFLECTING_TO_PROPERTY,this[i]=r._propertyValueFromAttribute(e,t),this._updateState=this._updateState&~STATE_IS_REFLECTING_TO_PROPERTY}}_requestUpdate(t,e){let r=!0;if(void 0!==t){const i=this.constructor,s=i.getPropertyOptions(t);i._valueHasChanged(this[t],e,s.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==s.reflect||this._updateState&STATE_IS_REFLECTING_TO_PROPERTY||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,s))):r=!1}!this._hasRequestedUpdate&&r&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(t,e){return this._requestUpdate(t,e),this.updateComplete}async _enqueueUpdate(){this._updateState=this._updateState|STATE_UPDATE_REQUESTED;try{await this._updatePromise}catch(t){}const t=this.performUpdate();return null!=t&&await t,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return this._updateState&STATE_UPDATE_REQUESTED}get hasUpdated(){return this._updateState&STATE_HAS_UPDATED}performUpdate(){this._instanceProperties&&this._applyInstanceProperties();let t=!1;const e=this._changedProperties;try{t=this.shouldUpdate(e),t?this.update(e):this._markUpdated()}catch(e){throw t=!1,this._markUpdated(),e}t&&(this._updateState&STATE_HAS_UPDATED||(this._updateState=this._updateState|STATE_HAS_UPDATED,this.firstUpdated(e)),this.updated(e))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~STATE_UPDATE_REQUESTED}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((t,e)=>this._propertyToAttribute(e,this[e],t)),this._reflectingProperties=void 0),this._markUpdated()}updated(t){}firstUpdated(t){}}_a=finalized,UpdatingElement[_a]=!0; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ const legacyCustomElement=(t,e)=>(window.customElements.define(t,e),e),standardCustomElement=(t,e)=>{const{kind:r,elements:i}=e;return{kind:r,elements:i,finisher(e){window.customElements.define(t,e)}}},customElement=t=>e=>"function"==typeof e?legacyCustomElement(t,e):standardCustomElement(t,e),standardProperty=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?Object.assign(Object.assign({},e),{finisher(r){r.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}},legacyProperty=(t,e,r)=>{e.constructor.createProperty(r,t)};function property(t){return(e,r)=>void 0!==r?legacyProperty(t,e,r):standardProperty(t,e)}function query(t){return(e,r)=>{const i={get(){return this.renderRoot.querySelector(t)},enumerable:!0,configurable:!0};return void 0!==r?legacyQuery(i,e,r):standardQuery(i,e)}}const legacyQuery=(t,e,r)=>{Object.defineProperty(e,r,t)},standardQuery=(t,e)=>({kind:"method",placement:"prototype",key:e.key,descriptor:t}) /** @license Copyright (c) 2019 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */,supportsAdoptingStyleSheets="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,constructionToken=Symbol();class CSSResult{constructor(t,e){if(e!==constructionToken)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(supportsAdoptingStyleSheets?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const textFromCSSResult=t=>{if(t instanceof CSSResult)return t.cssText;if("number"==typeof t)return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)},css=(t,...e)=>{const r=e.reduce((e,r,i)=>e+textFromCSSResult(r)+t[i+1],t[0]);return new CSSResult(r,constructionToken)}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ (window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");const renderNotImplemented={};class LitElement extends UpdatingElement{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(void 0===t)this._styles=[];else if(Array.isArray(t)){const e=(t,r)=>t.reduceRight((t,r)=>Array.isArray(r)?e(r,t):(t.add(r),t),r),r=e(t,new Set),i=[];r.forEach(t=>i.unshift(t)),this._styles=i}else this._styles=[t]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?supportsAdoptingStyleSheets?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==renderNotImplemented&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return renderNotImplemented}}LitElement.finalized=!0,LitElement.render=render$1;var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return commonjsRequire(t,null==e?r.path:e)}},r.exports),r.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var lottie_svg=createCommonjsModule((function(module){"undefined"!=typeof navigator&&function(t,e){module.exports?module.exports=e(t):(t.lottie=e(t),t.bodymovin=t.lottie)}(window||{},(function(window){var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_floor=Math.floor,bm_min=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],r=e.length;for(t=0;t1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1==e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+r[t]+r[e]+r[i]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t].length,i=0;i0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function M(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=s,this.rotate=n,this.rotateX=a,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=c,this.shear=l,this.scale=f,this.setTransform=d,this.translate=u,this.transform=m,this.applyToPoint=b,this.applyToX=S,this.applyToY=P,this.applyToZ=x,this.applyToPointArray=T,this.applyToTriplePoints=A,this.applyToPointStringified=C,this.toCSS=I,this.to2dCSS=M,this.clone=v,this.cloneFromProps=_,this.equals=g,this.inversePoints=E,this.inversePoint=w,this.getInverseMatrix=k,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}(); /*! Transformation Matrix v2.0 (c) Epistemex 2014-2015 www.epistemex.com By Ken Fyrstenberg Contributions by leeoniya. License: MIT, header required. */!function(t,e){var r=this,i=e.pow(256,6),s=e.pow(2,52),n=2*s;function a(t){var e,r=t.length,i=this,s=0,n=i.i=i.j=0,a=i.S=[];for(r||(t=[r++]);s<256;)a[s]=s++;for(s=0;s<256;s++)a[s]=a[n=255&n+t[s%r]+(e=a[s])],a[n]=e;i.g=function(t){for(var e,r=0,s=i.i,n=i.j,a=i.S;t--;)e=a[s=255&s+1],r=256*r+a[255&(a[s]=a[n=255&n+e])+(a[n]=e)];return i.i=s,i.j=n,r}}function o(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function h(t,e){for(var r,i=t+"",s=0;s=n;)t/=2,e/=2,r>>>=1;return(t+r)/e};return y.int32=function(){return 0|m.g(4)},y.quick=function(){return m.g(4)/4294967296},y.double=y,h(l(m.S),t),(c.pass||f||function(t,r,i,s){return s&&(s.S&&o(s,m),t.state=function(){return o(m,{})}),i?(e.random=t,r):t})(y,u,"global"in c?c.global:this==e,c.state)},h(e.random(),t)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,r,i,s,n){var a=n||("bez_"+t+"_"+r+"_"+i+"_"+s).replace(/\./g,"p");if(e[a])return e[a];var o=new h([t,r,i,s]);return e[a]=o,o}},e={};var r="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function n(t){return 3*t}function a(t,e,r){return((i(e,r)*t+s(e,r))*t+n(e))*t}function o(t,e,r){return 3*i(e,r)*t*t+2*s(e,r)*t+n(e)}function h(t){this._p=t,this._mSampleValues=r?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:a(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<11;++r)this._mSampleValues[r]=a(.1*r,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],i=this._mSampleValues,s=0,n=1;10!==n&&i[n]<=t;++n)s+=.1;var h=s+.1*((t-i[--n])/(i[n+1]-i[n])),l=o(h,e,r);return l>=.001?function(t,e,r,i){for(var s=0;s<4;++s){var n=o(e,r,i);if(0===n)return e;e-=(a(e,r,i)-t)/n}return e}(t,h,e,r):0===l?h:function(t,e,r,i,s){var n,o,h=0;do{(n=a(o=e+(r-e)/2,i,s)-t)>0?r=o:e=o}while(Math.abs(n)>1e-7&&++h<10);return o}(t,s,s+.1,e,r)}},t}();function extendPrototype(t,e){var r,i,s=t.length;for(r=0;r-.001&&a<.001}var e=function(t,e,r,i){var s,n,a,o,h,l,p=defaultCurveSegments,c=0,f=[],d=[],u=bezier_length_pool.newElement();for(a=r.length,s=0;sa?-1:1,l=!0;l;)if(i[n]<=a&&i[n+1]>a?(o=(a-i[n])/(i[n+1]-i[n]),l=!1):n+=h,n<0||n>=s-1){if(n===s-1)return r[n];l=!1}return r[n]+(r[n+1]-r[n])*o}var o=createTypedArray("float32",8);return{getSegmentsLength:function(t){var r,i=segments_length_pool.newElement(),s=t.c,n=t.v,a=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(r=0;r1?1:s,h),c=a(n=n>1?1:n,h),f=t.length,d=1-p,u=1-c,m=d*d*d,y=p*d*d*3,g=p*p*d*3,v=p*p*p,_=d*d*u,b=p*d*u+d*p*u+d*d*c,S=p*p*u+d*p*c+p*d*c,P=p*p*c,x=d*u*u,k=p*u*u+d*c*u+d*u*c,w=p*c*u+d*c*c+p*u*c,E=p*c*c,A=u*u*u,T=c*u*u+u*c*u+u*u*c,C=c*c*u+u*c*c+c*u*c,I=c*c*c;for(l=0;lf?c>d?c-f-d:d-f-c:d>f?d-f-c:f-c-d)>-1e-4&&p<1e-4}}}!function(){for(var t=0,e=["ms","moz","webkit","o"],r=0;r=0;e-=1)if("sh"==t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(n=t[e].ks.k.length,s=0;sr[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&void 0))}var n,a=function(){var t=[4,4,14];function e(t){var e,r,i,s=t.length;for(e=0;e=0;r-=1)if("sh"==t[r].ty)if(t[r].ks.k.i)t[r].ks.k.c=t[r].closed;else for(s=t[r].ks.k.length,i=0;i0&&(p=!1),p){var c=createTag("style");c.setAttribute("f-forigin",n[s].fOrigin),c.setAttribute("f-origin",n[s].origin),c.setAttribute("f-family",n[s].fFamily),c.type="text/css",c.innerHTML="@font-face {font-family: "+n[s].fFamily+"; font-style: normal; src: url('"+n[s].fPath+"');}",e.appendChild(c)}}else if("g"===n[s].fOrigin||1===n[s].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),l=0;l=a.t-s){n.h&&(n=a),d=0;break}if(a.t-s>t){d=u;break}u=v||t<_){var S=t>=v?b.points.length-1:0;for(h=b.points[S].point.length,o=0;o=k&&x=v)r[0]=g[0],r[1]=g[1],r[2]=g[2];else if(t<=_)r[0]=n.s[0],r[1]=n.s[1],r[2]=n.s[2];else{!function(t,e){var r=e[0],i=e[1],s=e[2],n=e[3],a=Math.atan2(2*i*n-2*r*s,1-2*i*i-2*s*s),o=Math.asin(2*r*i+2*s*n),h=Math.atan2(2*r*n-2*i*s,1-2*r*r-2*s*s);t[0]=a/degToRads,t[1]=o/degToRads,t[2]=h/degToRads}(r,function(t,e,r){var i,s,n,a,o,h=[],l=t[0],p=t[1],c=t[2],f=t[3],d=e[0],u=e[1],m=e[2],y=e[3];(s=l*d+p*u+c*m+f*y)<0&&(s=-s,d=-d,u=-u,m=-m,y=-y);1-s>1e-6?(i=Math.acos(s),n=Math.sin(i),a=Math.sin((1-r)*i)/n,o=Math.sin(r*i)/n):(a=1-r,o=r);return h[0]=a*l+o*d,h[1]=a*p+o*u,h[2]=a*c+o*m,h[3]=a*f+o*y,h}(i(n.s),i(g),(t-_)/(v-_)))}else for(u=0;u=v?l=1:t<_?l=0:(n.o.x.constructor===Array?(n.__fnct||(n.__fnct=[]),n.__fnct[u]?f=n.__fnct[u]:(w=void 0===n.o.x[u]?n.o.x[0]:n.o.x[u],E=void 0===n.o.y[u]?n.o.y[0]:n.o.y[u],A=void 0===n.i.x[u]?n.i.x[0]:n.i.x[u],T=void 0===n.i.y[u]?n.i.y[0]:n.i.y[u],f=BezierFactory.getBezierEasing(w,E,A,T).get,n.__fnct[u]=f)):n.__fnct?f=n.__fnct:(w=n.o.x,E=n.o.y,A=n.i.x,T=n.i.y,f=BezierFactory.getBezierEasing(w,E,A,T).get,n.__fnct=f),l=f((t-_)/(v-_)))),g=a.s||n.e,C=1===n.h?n.s[u]:n.s[u]+(g[u]-n.s[u])*l,"multidimensional"===this.propType?r[u]=C:r=C}return e.lastIndex=d,r}function i(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),n=Math.cos(r/2),a=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(r/2),l=Math.sin(i/2);return[o*h*a+s*n*l,o*n*a+s*h*l,s*h*a-o*n*l,s*n*a-o*h*l]}function s(){var e=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(e,this._caching);this.pv=s}return this._caching.lastFrame=e,this.pv}function n(t){var r;if("unidimensional"===this.propType)r=t*this.mult,e(this.v-r)>1e-5&&(this.v=r,this._mdf=!0);else for(var i=0,s=this.v.length;i1e-5&&(this.v[i]=r,this._mdf=!0),i+=1}function a(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{this.lock=!0,this._mdf=this._isFirstFrame;var t,e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/s,0),i=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/s,0)):(r=this.p.pv,i=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/s,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var n=this.px,a=this.py;n._caching.lastFrame+n.offsetTime<=n.keyframes[0].t?(r[0]=n.getValueAtTime((n.keyframes[0].t+.01)/s,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/s,0),i[0]=n.getValueAtTime(n.keyframes[0].t/s,0),i[1]=a.getValueAtTime(a.keyframes[0].t/s,0)):n._caching.lastFrame+n.offsetTime>=n.keyframes[n.keyframes.length-1].t?(r[0]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/s,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/s,0),i[0]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/s,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/s,0)):(r=[n.pv,a.pv],i[0]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/s,n.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/s,a.offsetTime))}else r=i=t;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}if(this.r){if(this.r.effectsSequence.length)return;this.pre.rotate(-this.r.v),this.appliedTransformations=4}else this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,r,i){return new e(t,r,i)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r=this._maxLength&&this.doubleArrayLength(),r){case"v":n=this.v;break;case"i":n=this.i;break;case"o":n=this.o}(!n[i]||n[i]&&!s)&&(n[i]=point_pool.newElement()),n[i][0]=t,n[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,n,a,o){this.setXYAt(t,e,"v",a,o),this.setXYAt(r,i,"o",a,o),this.setXYAt(s,n,"i",a,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var n,a=this._length-1,o=this._length;for(n=s;n=d[d.length-1].t-this.offsetTime)i=d[d.length-1].s?d[d.length-1].s[0]:d[d.length-2].e[0],n=!0;else{for(var u,m,y=f,g=d.length-1,v=!0;v&&(u=d[y],!((m=d[y+1]).t-this.offsetTime>t));)y=m.t-this.offsetTime)p=1;else if(tr&&t>r)||(this._caching.lastIndex=i=1?n.push({s:t-1,e:e-1}):(n.push({s:t,e:1}),n.push({s:0,e:e-1}));var a,o,h=[],l=n.length;for(a=0;ai+r);else p=o.s*s<=i?0:(o.s*s-i)/r,c=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,c])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e1?1:this.s.v<0?0:this.s.v)+s)>(r=(this.e.v>1?1:this.e.v<0?0:this.e.v)+s)){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var a,o,h,l,p,c,f=this.shapes.length,d=0;if(r===e)for(a=0;a=0;a-=1)if((u=this.shapes[a]).shape._mdf){for((m=u.localShapeCollection).releaseShapes(),2===this.m&&f>1?(g=this.calculateShapeEdges(e,r,u.totalShapeLength,b,d),b+=u.totalShapeLength):g=[[v,_]],h=g.length,o=0;o=1?y.push({s:u.totalShapeLength*(v-1),e:u.totalShapeLength*(_-1)}):(y.push({s:u.totalShapeLength*v,e:u.totalShapeLength}),y.push({s:0,e:u.totalShapeLength*(_-1)}));var S=this.addShapes(u,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(u.shape.paths.shapes[u.shape.paths._length-1].c){var P=S.pop();this.addPaths(S,m),S=this.addShapes(u,y[1],P)}else this.addPaths(S,m),S=this.addShapes(u,y[1]);this.addPaths(S,m)}}u.shape.paths=m}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;re.e){r.c=!1;break}e.s<=u&&e.e>=u+a.addedLength?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[s],f[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(f[i].v[s-1],f[i].v[s],f[i].o[s-1],f[i].i[s],(e.s-u)/a.addedLength,(e.e-u)/a.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),u+=a.addedLength,o+=1}if(f[i].c&&h.length){if(a=h[s-1],u<=e.e){var g=h[s-1].addedLength;e.s<=u&&e.e>=u+g?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[0],f[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(f[i].v[s-1],f[i].v[0],f[i].o[s-1],f[i].i[0],(e.s-u)/g,(e.e-u)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;u+=a.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),u>e.e)break;i0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e0?Math.floor(l):Math.ceil(l),f=(this.tr.v.props,this.pMatrix.props),d=this.rMatrix.props,u=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var m,y,g=0;if(l>0){for(;gc;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),g-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),g-=p)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,n=this._currentCopies;n;){if(y=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==g){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),m=0;m.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t=o+ot||!u?(v=(o+ot-l)/h.partialLength,N=d.point[0]+(h.point[0]-d.point[0])*v,B=d.point[1]+(h.point[1]-d.point[1])*v,k.translate(-S[0]*A[s].an/200,-S[1]*R/100),p=!1):u&&(l+=h.partialLength,(c+=1)>=u.length&&(c=0,m[f+=1]?u=m[f].points:b.v.c?(c=0,u=m[f=0].points):(l-=h.partialLength,u=null)),u&&(d=h,y=(h=u[c]).partialLength));O=A[s].an/2-A[s].add,k.translate(-O,0,0)}else O=A[s].an/2-A[s].add,k.translate(-O,0,0),k.translate(-S[0]*A[s].an/200,-S[1]*R/100,0);for(A[s].l/2,F=0;F1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{this.lock=!0,this._mdf=!1;var i,s=this.effectsSequence.length,n=t||this.data.d.k[this.keysIndex].s;for(i=0;ie));)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r=FontManager.getCombinedCharacterCodes(),i=[],s=0,n=t.length;s=55296&&e<=56319&&(e=t.charCodeAt(s+1))>=56320&&e<=57343?(i.push(t.substr(s,2)),++s):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,n,a,o,h=this.elem.globalData.fontManager,l=this.data,p=[],c=0,f=l.m.g,d=0,u=0,m=0,y=[],g=0,v=0,_=h.getFontByName(t.f),b=0,S=_.fStyle?_.fStyle.split(" "):[],P="normal",x="normal";for(r=S.length,e=0;eC&&" "!==A[e]?(-1===F?r+=1:e=F,E+=t.finalLineHeight||1.2*t.finalSize,A.splice(e,F===e?1:0,"\r"),F=-1,g=0):(g+=b,g+=w);E+=_.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Iv?g:v,g=-2*w,s="",i=!0,m+=1):s=M,h.chars?(o=h.getCharData(M,_.fStyle,h.getFontByName(t.f).fFamily),b=i?0:o.w*t.finalSize/100):b=h.measureText(s,t.f,t.finalSize)," "===M?D+=b+w:(g+=b+w+D,D=0),p.push({l:b,an:b,add:d,n:i,anIndexes:[],val:s,line:m,animatorJustifyOffset:0}),2==f){if(d+=b,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(d-=b);u<=e;)p[u].an=d,p[u].ind=c,p[u].extra=b,u+=1;c+=1,d=0}}else if(3==f){if(d+=b,""===s||e===r-1){for(""===s&&(d-=b);u<=e;)p[u].an=d,p[u].ind=c,p[u].extra=b,u+=1;d=0,c+=1}}else p[c].ind=c,p[c].extra=0,c+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var R,z,L=l.a;a=L.length;var O,N,B=[];for(n=0;n0?s=this.ne.v/100:n=-this.ne.v/100,this.xe.v>0?a=1-this.xe.v/100:o=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(s,n,a,o).get,l=0,p=this.finalS,c=this.finalE,f=this.data.sh;if(2===f)l=h(l=c===p?i>=c?1:0:t(0,e(.5/(c-p)+(i-p)/(c-p),1)));else if(3===f)l=h(l=c===p?i>=c?0:1:1-t(0,e(.5/(c-p)+(i-p)/(c-p),1)));else if(4===f)c===p?l=0:(l=t(0,e(.5/(c-p)+(i-p)/(c-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===f){if(c===p)l=0;else{var d=c-p,u=-d/2+(i=e(t(0,i+.5-p),c-p)),m=d/2;l=Math.sqrt(1-u*u/(m*m))}l=h(l)}else 6===f?(c===p?l=0:(i=e(t(0,i+.5-p),c-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(c-p)))/2),l=h(l)):(i>=r(p)&&(l=t(0,e(i-p<0?e(c,1)-(p-i):c-i,1))),l=h(l));return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(i>s){var n=i;i=s,s=n}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}(),pool_factory=function(t,e,r,i){var s=0,n=t,a=createSizedArray(n);return{newElement:function(){return s?a[s-=1]:e()},release:function(t){s===n&&(a=pooling.double(a),n*=2),r&&r(t),a[s]=t,s+=1}}},pooling={double:function(t){return t.concat(createSizedArray(t.length))}},point_pool=pool_factory(8,(function(){return createTypedArray("float32",2)})),shape_pool=(factory=pool_factory(4,(function(){return new ShapePath}),(function(t){var e,r=t._length;for(e=0;e0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+locationHref+"#"+y+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function HierarchyElement(){}function FrameElement(){}function TransformElement(){}function RenderableElement(){}function RenderableDOMElement(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,s=t.length;i=0;e--)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 13:return this.createCamera(t)}return this.createNull(t)},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t=0;e--)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e1&&(n+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==n){var a="";r.elem&&(e.c&&(a=t.inv?this.solidPath+n:n),r.elem.setAttribute("d",a)),r.lastPath=n}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;rt?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t0;)h=i.transformers[m].mProps._mdf||h,u--,m--;if(h)for(u=g-i.styles[p].lvl,m=i.transformers.length-1;u>0;)d=i.transformers[m].mProps.v.props,f.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),u--,m--}else f=t;if(a=(c=i.sh.paths)._length,h){for(o="",n=0;n=1?.99:e.h.v<=-1?-.99:e.h.v),_=Math.cos(g+e.a.v)*v+p[0],b=Math.sin(g+e.a.v)*v+p[1];h.setAttribute("fx",_),h.setAttribute("fy",b),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",b))}}function o(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){t.ty;switch(t.ty){case"fl":return s;case"gf":return a;case"gs":return n;case"st":return o;case"sh":case"el":case"rc":case"sr":return i;case"tr":return r}}}}();function BaseElement(){}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ISolidElement(t,e,r){this.initElement(t,e,r)}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGTextElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function SVGTintFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),r.setAttribute("result","f1"),t.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i,s=createNS("feMerge");t.appendChild(s),(i=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(i),(i=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");t.appendChild(r),this.feGaussianBlur=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),r.setAttribute("result","f1"),t.appendChild(r);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var n=createNS("feFuncG");n.setAttribute("type","table"),i.appendChild(n),this.feFuncG=n;var a=createNS("feFuncB");a.setAttribute("type","table"),i.appendChild(a),this.feFuncB=a}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,i=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=createNS("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(t,e){var r=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",r.width),t.setAttribute("height",r.height),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var s=createNS("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var n=createNS("feFlood");n.setAttribute("flood-color","#00ff00"),n.setAttribute("flood-opacity","1"),n.setAttribute("result","drop_shadow_3"),this.feFlood=n,t.appendChild(n);var a=createNS("feComposite");a.setAttribute("in","drop_shadow_3"),a.setAttribute("in2","drop_shadow_2"),a.setAttribute("operator","in"),a.setAttribute("result","drop_shadow_4"),t.appendChild(a);var o,h=createNS("feMerge");t.appendChild(h),o=createNS("feMergeNode"),h.appendChild(o),(o=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=h,this.originalNodeAdded=!1,h.appendChild(o)}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t=0;t-=1)this.shapeModifiers[t].processShapes(this._isFirstFrame)}},lcEnum:{1:"butt",2:"round",3:"square"},ljEnum:{1:"miter",2:"round",3:"bevel"},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;tt?this.textSpans[t]:createNS(h?"path":"text"),_<=t&&(a.setAttribute("stroke-linecap","butt"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=a,this.layerElement.appendChild(a)),a.style.display="inherit"),p.reset(),p.scale(r.finalSize/100,r.finalSize/100),f&&(o[t].n&&(d=-y,u+=r.yOffset,u+=m?1:0,m=!1),this.applyTextPropertiesToMatrix(r,p,o[t].line,d,u),d+=o[t].l||0,d+=y),h?(l=(g=(v=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily))&&v.data||{}).shapes?g.shapes[0].it:[],f?c+=this.createPathShape(p,l):a.setAttribute("d",this.createPathShape(p,l))):(f&&a.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),a.textContent=o[t].val,a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));f&&a&&a.setAttribute("d",c)}else{var b=this.textContainer,S="start";switch(r.j){case 1:S="end";break;case 2:S="middle"}b.setAttribute("text-anchor",S),b.setAttribute("letter-spacing",y);var P=this.buildTextContents(r.finalText);for(e=P.length,u=r.ps?r.ps[1]+r.ascent:0,t=0;t1&&o&&this.setShapesAsAnimated(a)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e=0;o-=1){if((f=this.searchProcessedElement(t[o]))?e[o]=r[f-1]:t[o]._render=a,"fl"==t[o].ty||"st"==t[o].ty||"gf"==t[o].ty||"gs"==t[o].ty)f?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&i.appendChild(e[o].style.pElem),m.push(e[o].style);else if("gr"==t[o].ty){if(f)for(l=e[o].it.length,h=0;h=l?d<0?i:s:i+f*Math.pow((n-t)/d,1/r),p[c++]=a,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),n=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",n)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGEffects(t){var e,r,i=t.data.ef?t.data.ef.length:0,s=createElementID(),n=filtersFactory.createFilter(s),a=0;for(this.filters=[],e=0;e=0;r-=1)e[r].animation.destroy(t)},t.freeze=function(){a=!0},t.unfreeze=function(){a=!1,u()},t.getRegisteredAnimations=function(){var t,r=e.length,i=[];for(t=0;tthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,n=t.layers,a=n.length;for(r=0;rthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!=t||!0===this.isPaused&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!=t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"))},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.goToAndStop=function(t,e,r){r&&this.name!=r||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())},AnimationItem.prototype.goToAndPlay=function(t,e,r){this.goToAndStop(t,e,r),this.play()},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.timeCompleted=this.totalFrames=t[0]-t[1],this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.timeCompleted=this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-t)),this.firstFrame=t,this.timeCompleted=this.totalFrames=e-t,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var r,i=t.length;for(r=0;r1){for(i=0;il.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var c=this.getValueAtTime(s/this.comp.globalData.frameRate,0),f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),d=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),u=Math.floor((h-s)/i);if(this.pv.length){for(a=(o=new Array(c.length)).length,n=0;n=p)return this.pv;if(r?s=p+(i=e?Math.abs(elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var c=this.getValueAtTime(p/this.comp.globalData.frameRate,0),f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),d=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),u=Math.floor((p-h)/i)+1;if(this.pv.length){for(a=(o=new Array(c.length)).length,n=0;n1?(s+t-n)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;oa){var p=o,c=r.c&&o===h-1?0:o+1,f=(a-l)/n[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[c],r.o[p],r.i[c],f,n[o]);break}l+=n[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){t=1==t?this.v.c?0:.999:t;var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),n=s[0]-i[0],a=s[1]-i[1],o=Math.sqrt(Math.pow(n,2)+Math.pow(a,2));return 0===o?[0,0]:"tangent"===r?[n/o,a/o]:[-a/o,n/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([l],o),extendPrototype([l],h),h.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shape_pool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime1&&(defaultCurveSegments=t)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&(expressionsPlugin=e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/master/LICENSE */ t.exports=function t(e,r,i){function s(a,o){if(!r[a]){if(!e[a]){var h="function"==typeof commonjsRequire&&commonjsRequire;if(!o&&h)return h(a,!0);if(n)return n(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var p=r[a]={exports:{}};e[a][0].call(p.exports,(function(t){var r=e[a][1][t];return s(r||t)}),p,p.exports,t,e,r,i)}return r[a].exports}for(var n="function"==typeof commonjsRequire&&commonjsRequire,a=0;a>2,o=(3&e)<<4|r>>4,h=d>1?(15&r)<<2|s>>6:64,l=d>2?63&s:64,p.push(n.charAt(a)+n.charAt(o)+n.charAt(h)+n.charAt(l));return p.join("")},r.decode=function(t){var e,r,i,a,o,h,l=0,p=0;if("data:"===t.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var c,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===n.charAt(64)&&f--,t.charAt(t.length-2)===n.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(c=s.uint8array?new Uint8Array(0|f):new Array(0|f);l>4,r=(15&a)<<4|(o=n.indexOf(t.charAt(l++)))>>2,i=(3&o)<<6|(h=n.indexOf(t.charAt(l++))),c[p++]=e,64!==o&&(c[p++]=r),64!==h&&(c[p++]=i);return c}},{"./support":30,"./utils":32}],2:[function(t,e,r){var i=t("./external"),s=t("./stream/DataWorker"),n=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");function o(t,e,r,i,s){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=s}n=t("./stream/DataLengthProbe"),o.prototype={getContentWorker:function(){var t=new s(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new n("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new s(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new n("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new n("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){var i=t("./utils"),s=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,r,i){var n=s,a=i+r;t^=-1;for(var o=i;o>>8^n[255&(t^e[o])];return-1^t}(0|e,t,t.length,0):function(t,e,r,i){var n=s,a=i+r;t^=-1;for(var o=i;o>>8^n[255&(t^e.charCodeAt(o))];return-1^t}(0|e,t,t.length,0):0}},{"./utils":32}],5:[function(t,e,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){var i=null;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,r){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,s=t("pako"),n=t("./utils"),a=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",n.inherits(h,a),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(n.transformTo(o,t.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new h("Deflate",t)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){var i=t("../utils"),s=t("../stream/GenericWorker"),n=t("../utf8"),a=t("../crc32"),o=t("../signature"),h=function(t,e){var r,i="";for(r=0;r>>=8;return i},l=function(t,e,r,s,l,p){var c,f,d=t.file,u=t.compression,m=p!==n.utf8encode,y=i.transformTo("string",p(d.name)),g=i.transformTo("string",n.utf8encode(d.name)),v=d.comment,_=i.transformTo("string",p(v)),b=i.transformTo("string",n.utf8encode(v)),S=g.length!==d.name.length,P=b.length!==v.length,x="",k="",w="",E=d.dir,A=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(T.crc32=t.crc32,T.compressedSize=t.compressedSize,T.uncompressedSize=t.uncompressedSize);var C=0;e&&(C|=8),m||!S&&!P||(C|=2048);var I,F,M,D=0,R=0;E&&(D|=16),"UNIX"===l?(R=798,D|=(I=d.unixPermissions,F=E,M=I,I||(M=F?16893:33204),(65535&M)<<16)):(R=20,D|=63&(d.dosPermissions||0)),c=A.getUTCHours(),c<<=6,c|=A.getUTCMinutes(),c<<=5,c|=A.getUTCSeconds()/2,f=A.getUTCFullYear()-1980,f<<=4,f|=A.getUTCMonth()+1,f<<=5,f|=A.getUTCDate(),S&&(k=h(1,1)+h(a(y),4)+g,x+="up"+h(k.length,2)+k),P&&(w=h(1,1)+h(a(_),4)+b,x+="uc"+h(w.length,2)+w);var z="";return z+="\n\0",z+=h(C,2),z+=u.magic,z+=h(c,2),z+=h(f,2),z+=h(T.crc32,4),z+=h(T.compressedSize,4),z+=h(T.uncompressedSize,4),z+=h(y.length,2),z+=h(x.length,2),{fileRecord:o.LOCAL_FILE_HEADER+z+y+x,dirRecord:o.CENTRAL_FILE_HEADER+h(R,2)+z+h(_.length,2)+"\0\0\0\0"+h(D,4)+h(s,4)+y+x+_}},p=function(t){return o.DATA_DESCRIPTOR+h(t.crc32,4)+h(t.compressedSize,4)+h(t.uncompressedSize,4)};function c(t,e,r,i){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(c,s),c.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=l(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=l(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:p(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e0?t.substring(0,e):""},m=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},y=function(t,e){return e=void 0!==e?e:o.createFolders,t=m(t),this.files[t]||d.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function g(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,i;for(e in this.files)this.files.hasOwnProperty(e)&&(i=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,i))},filter:function(t){var e=[];return this.forEach((function(r,i){t(r,i)&&e.push(i)})),e},file:function(t,e,r){if(1===arguments.length){if(g(t)){var i=t;return this.filter((function(t,e){return!e.dir&&i.test(t)}))}var s=this.files[this.root+t];return s&&!s.dir?s:null}return t=this.root+t,d.call(this,t,e,r),this},folder:function(t){if(!t)return this;if(g(t))return this.filter((function(e,r){return r.dir&&t.test(e)}));var e=this.root+t,r=y.call(this,e),i=this.clone();return i.root=r.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter((function(e,r){return r.name.slice(0,t.length)===t})),i=0;i=0;--n)if(this.data[n]===e&&this.data[n+1]===r&&this.data[n+2]===i&&this.data[n+3]===s)return n-this.zero;return-1},s.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),s=t.charCodeAt(3),n=this.readData(4);return e===n[0]&&r===n[1]&&i===n[2]&&s===n[3]},s.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=s},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){var i=t("../utils");function s(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=s},{"../utils":32}],19:[function(t,e,r){var i=t("./Uint8ArrayReader");function s(t){i.call(this,t)}t("../utils").inherits(s,i),s.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){var i=t("./DataReader");function s(t){i.call(this,t)}t("../utils").inherits(s,i),s.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},s.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},s.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},s.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=s},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){var i=t("./ArrayReader");function s(t){i.call(this,t)}t("../utils").inherits(s,i),s.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){var i=t("../utils"),s=t("../support"),n=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||s.uint8array?"nodebuffer"===e?new o(t):s.uint8array?new h(i.transformTo("uint8array",t)):new n(i.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){var i=t("./GenericWorker"),s=t("../utils");function n(t){i.call(this,"ConvertWorker to "+t),this.destType=t}s.inherits(n,i),n.prototype.processChunk=function(t){this.push({data:s.transformTo(this.destType,t.data),meta:t.meta})},e.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){var i=t("./GenericWorker"),s=t("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(n,i),n.prototype.processChunk=function(t){this.streamInfo.crc32=s(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){var i=t("../utils"),s=t("./GenericWorker");function n(t){s.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(n,s),n.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}s.prototype.processChunk.call(this,t)},e.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){var i=t("../utils"),s=t("./GenericWorker");function n(t){s.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}i.inherits(n,s),n.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=i},{}],29:[function(t,e,r){var i=t("../utils"),s=t("./ConvertWorker"),n=t("./GenericWorker"),a=t("../base64"),o=t("../support"),h=t("../external"),l=null;if(o.nodestream)try{l=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function p(t,e){return new h.Promise((function(r,s){var n=[],o=t._internalType,h=t._outputType,l=t._mimeType;t.on("data",(function(t,r){n.push(t),e&&e(r)})).on("error",(function(t){n=[],s(t)})).on("end",(function(){try{var t=function(t,e,r){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),r);case"base64":return a.encode(e);default:return i.transformTo(t,e)}}(h,function(t,e){var r,i=0,s=null,n=0;for(r=0;r=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;function l(){a.call(this,"utf-8 decode"),this.leftOver=null}function p(){a.call(this,"utf-8 encode")}o[254]=o[254]=1,r.utf8encode=function(t){return s.nodebuffer?n.newBufferFrom(t,"utf-8"):function(t){var e,r,i,n,a,o=t.length,h=0;for(n=0;n>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e}(t)},r.utf8decode=function(t){return s.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,s,n,a=t.length,h=new Array(2*a);for(r=0,e=0;e4)h[r++]=65533,e+=n-1;else{for(s&=2===n?31:3===n?15:7;n>1&&e1?h[r++]=65533:s<65536?h[r++]=s:(s-=65536,h[r++]=55296|s>>10&1023,h[r++]=56320|1023&s)}return h.length!==r&&(h.subarray?h=h.subarray(0,r):h.length=r),i.applyFromCharCode(h)}(t=i.transformTo(s.uint8array?"uint8array":"array",t))},i.inherits(l,a),l.prototype.processChunk=function(t){var e=i.transformTo(s.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var n=e;(e=new Uint8Array(n.length+this.leftOver.length)).set(this.leftOver,0),e.set(n,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}(e),h=e;a!==e.length&&(s.uint8array?(h=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(h=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:r.utf8decode(h),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,i.inherits(p,a),p.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){var i=t("./support"),s=t("./base64"),n=t("./nodejsUtils"),a=t("set-immediate-shim"),o=t("./external");function h(t){return t}function l(t,e){for(var r=0;r1;)try{return p.stringifyByChunk(t,i,e)}catch(t){e=Math.floor(e/2)}return p.stringifyByChar(t)}function f(t,e){for(var r=0;r1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t0)this.isSignature(e,n.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=h},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){var i=t("./reader/readerFor"),s=t("./utils"),n=t("./compressedObject"),a=t("./crc32"),o=t("./utf8"),h=t("./compressions"),l=t("./support");function p(t,e){this.options=t,this.loadOptions=e}p.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===t&&(this.dosPermissions=63&this.externalFileAttributes),3===t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,i,s=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+40?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(a[r]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var p;if(p="string"==typeof e.dictionary?n.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=i.deflateSetDictionary(this.strm,p)))throw new Error(a[r]);this._dict_set=!0}}function p(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}l.prototype.push=function(t,e){var r,a,o=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=n.string2buf(t):"[object ArrayBuffer]"===h.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new s.Buf8(l),o.next_out=0,o.avail_out=l),1!==(r=i.deflate(o,a))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(n.buf2binstring(s.shrinkBuf(o.output,o.next_out))):this.onData(s.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==r);return 4===a?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),o.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=l,r.deflate=p,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,p(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,p(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){var i=t("./zlib/inflate"),s=t("./utils/common"),n=t("./utils/strings"),a=t("./zlib/constants"),o=t("./zlib/messages"),h=t("./zlib/zstream"),l=t("./zlib/gzheader"),p=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(o[r]);this.header=new l,i.inflateGetHeader(this.strm,this.header)}function f(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}c.prototype.push=function(t,e){var r,o,h,l,c,f,d=this.strm,u=this.options.chunkSize,m=this.options.dictionary,y=!1;if(this.ended)return!1;o=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?d.input=n.binstring2buf(t):"[object ArrayBuffer]"===p.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new s.Buf8(u),d.next_out=0,d.avail_out=u),(r=i.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(f="string"==typeof m?n.string2buf(m):"[object ArrayBuffer]"===p.call(m)?new Uint8Array(m):m,r=i.inflateSetDictionary(this.strm,f)),r===a.Z_BUF_ERROR&&!0===y&&(r=a.Z_OK,y=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==a.Z_STREAM_END&&(0!==d.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(h=n.utf8border(d.output,d.next_out),l=d.next_out-h,c=n.buf2string(d.output,h),d.next_out=l,d.avail_out=u-l,l&&s.arraySet(d.output,d.output,h,l,0),this.onData(c)):this.onData(s.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(y=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=c,r.inflate=f,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},r.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var s={arraySet:function(t,e,r,i,s){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),s);else for(var n=0;n=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function h(t,e){if(e<65537&&(t.subarray&&n||!t.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",a=0;a>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},r.buf2binstring=function(t){return h(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,s=e.length;r4)l[i++]=65533,r+=n-1;else{for(s&=2===n?31:3===n?15:7;n>1&&r1?l[i++]=65533:s<65536?l[i++]=s:(s-=65536,l[i++]=55296|s>>10&1023,l[i++]=56320|1023&s)}return h(l,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){e.exports=function(t,e,r,i){for(var s=65535&t|0,n=t>>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{n=n+(s=s+e[i++]|0)|0}while(--a);s%=65521,n%=65521}return s|n<<16|0}},{}],44:[function(t,e,r){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,r){var i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,s){var n=i,a=s+r;t^=-1;for(var o=s;o>>8^n[255&(t^e[o])];return-1^t}},{}],46:[function(t,e,r){var i,s=t("../utils/common"),n=t("./trees"),a=t("./adler32"),o=t("./crc32"),h=t("./messages");function l(t,e){return t.msg=h[e],e}function p(t){return(t<<1)-(t>4?9:0)}function c(t){for(var e=t.length;--e>=0;)t[e]=0}function f(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(s.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function d(t,e){n._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,f(t.strm)}function u(t,e){t.pending_buf[t.pending++]=e}function m(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function y(t,e){var r,i,s=t.max_chain_length,n=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,l=t.window,p=t.w_mask,c=t.prev,f=t.strstart+258,d=l[n+a-1],u=l[n+a];t.prev_length>=t.good_match&&(s>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(r=e)+a]===u&&l[r+a-1]===d&&l[r]===l[n]&&l[++r]===l[n+1]){n+=2,r++;do{}while(l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&na){if(t.match_start=e,a=i,i>=o)break;d=l[n+a-1],u=l[n+a]}}}while((e=c[e&p])>h&&0!=--s);return a<=t.lookahead?a:t.lookahead}function g(t){var e,r,i,n,h,l,p,c,f,d,u=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=u+(u-262)){s.arraySet(t.window,t.window,u,u,0),t.match_start-=u,t.strstart-=u,t.block_start-=u,e=r=t.hash_size;do{i=t.head[--e],t.head[e]=i>=u?i-u:0}while(--r);e=r=u;do{i=t.prev[--e],t.prev[e]=i>=u?i-u:0}while(--r);n+=u}if(0===t.strm.avail_in)break;if(l=t.strm,p=t.window,c=t.strstart+t.lookahead,f=n,d=void 0,(d=l.avail_in)>f&&(d=f),r=0===d?0:(l.avail_in-=d,s.arraySet(p,l.input,l.next_in,d,c),1===l.state.wrap?l.adler=a(l.adler,p,d,c):2===l.state.wrap&&(l.adler=o(l.adler,p,d,c)),l.next_in+=d,l.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=n._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){s=t.strstart+t.lookahead-3,i=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=s&&(t.ins_h=(t.ins_h<15&&(o=2,i-=16),n<1||n>9||8!==r||i<8||i>15||e<0||e>9||a<0||a>4)return l(t,-2);8===i&&(i=9);var h=new S;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=i,h.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(g(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,d(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(d(t,!1),t.strm.avail_out),1)})),new b(4,4,8,4,v),new b(4,5,16,8,v),new b(4,6,32,32,v),new b(4,4,16,16,_),new b(8,16,32,32,_),new b(8,16,128,128,_),new b(8,32,128,256,_),new b(32,128,258,1024,_),new b(32,258,258,4096,_)],r.deflateInit=function(t,e){return k(t,e,8,15,8,0)},r.deflateInit2=k,r.deflateReset=x,r.deflateResetKeep=P,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},r.deflate=function(t,e){var r,s,a,h;if(!t||!t.state||e>5||e<0)return t?l(t,-2):-2;if(s=t.state,!t.output||!t.input&&0!==t.avail_in||666===s.status&&4!==e)return l(t,0===t.avail_out?-5:-2);if(s.strm=t,r=s.last_flush,s.last_flush=e,42===s.status)if(2===s.wrap)t.adler=0,u(s,31),u(s,139),u(s,8),s.gzhead?(u(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),u(s,255&s.gzhead.time),u(s,s.gzhead.time>>8&255),u(s,s.gzhead.time>>16&255),u(s,s.gzhead.time>>24&255),u(s,9===s.level?2:s.strategy>=2||s.level<2?4:0),u(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(u(s,255&s.gzhead.extra.length),u(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=o(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69):(u(s,0),u(s,0),u(s,0),u(s,0),u(s,0),u(s,9===s.level?2:s.strategy>=2||s.level<2?4:0),u(s,3),s.status=113);else{var y=8+(s.w_bits-8<<4)<<8;y|=(s.strategy>=2||s.level<2?0:s.level<6?1:6===s.level?2:3)<<6,0!==s.strstart&&(y|=32),y+=31-y%31,s.status=113,m(s,y),0!==s.strstart&&(m(s,t.adler>>>16),m(s,65535&t.adler)),t.adler=1}if(69===s.status)if(s.gzhead.extra){for(a=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>a&&(t.adler=o(t.adler,s.pending_buf,s.pending-a,a)),f(t),a=s.pending,s.pending!==s.pending_buf_size));)u(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>a&&(t.adler=o(t.adler,s.pending_buf,s.pending-a,a)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=73)}else s.status=73;if(73===s.status)if(s.gzhead.name){a=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>a&&(t.adler=o(t.adler,s.pending_buf,s.pending-a,a)),f(t),a=s.pending,s.pending===s.pending_buf_size)){h=1;break}h=s.gzindexa&&(t.adler=o(t.adler,s.pending_buf,s.pending-a,a)),0===h&&(s.gzindex=0,s.status=91)}else s.status=91;if(91===s.status)if(s.gzhead.comment){a=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>a&&(t.adler=o(t.adler,s.pending_buf,s.pending-a,a)),f(t),a=s.pending,s.pending===s.pending_buf_size)){h=1;break}h=s.gzindexa&&(t.adler=o(t.adler,s.pending_buf,s.pending-a,a)),0===h&&(s.status=103)}else s.status=103;if(103===s.status&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&f(t),s.pending+2<=s.pending_buf_size&&(u(s,255&t.adler),u(s,t.adler>>8&255),t.adler=0,s.status=113)):s.status=113),0!==s.pending){if(f(t),0===t.avail_out)return s.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(r)&&4!==e)return l(t,-5);if(666===s.status&&0!==t.avail_in)return l(t,-5);if(0!==t.avail_in||0!==s.lookahead||0!==e&&666!==s.status){var v=2===s.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(g(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(s,e):3===s.strategy?function(t,e){for(var r,i,s,a,o=t.window;;){if(t.lookahead<=258){if(g(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=o[s=t.strstart-1])===o[++s]&&i===o[++s]&&i===o[++s]){a=t.strstart+258;do{}while(i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&st.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=n._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(s,e):i[s.level].func(s,e);if(3!==v&&4!==v||(s.status=666),1===v||3===v)return 0===t.avail_out&&(s.last_flush=-1),0;if(2===v&&(1===e?n._tr_align(s):5!==e&&(n._tr_stored_block(s,0,0,!1),3===e&&(c(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),f(t),0===t.avail_out))return s.last_flush=-1,0}return 4!==e?0:s.wrap<=0?1:(2===s.wrap?(u(s,255&t.adler),u(s,t.adler>>8&255),u(s,t.adler>>16&255),u(s,t.adler>>24&255),u(s,255&t.total_in),u(s,t.total_in>>8&255),u(s,t.total_in>>16&255),u(s,t.total_in>>24&255)):(m(s,t.adler>>>16),m(s,65535&t.adler)),f(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?0:1)},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?l(t,-2):(t.state=null,113===e?l(t,-3):0):-2},r.deflateSetDictionary=function(t,e){var r,i,n,o,h,l,p,f,d=e.length;if(!t||!t.state)return-2;if(2===(o=(r=t.state).wrap)||1===o&&42!==r.status||r.lookahead)return-2;for(1===o&&(t.adler=a(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===o&&(c(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new s.Buf8(r.w_size),s.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),h=t.avail_in,l=t.next_in,p=t.input,t.avail_in=d,t.next_in=0,t.input=e,g(r);r.lookahead>=3;){i=r.strstart,n=r.lookahead-2;do{r.ins_h=(r.ins_h<>>=b=_>>>24,u-=b,0==(b=_>>>16&255))E[n++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=m[(65535&_)+(d&(1<>>=b,u-=b),u<15&&(d+=w[i++]<>>=b=_>>>24,u-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=y[(65535&_)+(d&(1<h){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=b,u-=b,P>(b=n-a)){if((b=P-b)>p&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(x=0,k=f,0===c){if(x+=l-b,b2;)E[n++]=k[x++],E[n++]=k[x++],E[n++]=k[x++],S-=3;S&&(E[n++]=k[x++],S>1&&(E[n++]=k[x++]))}else{x=n-P;do{E[n++]=E[x++],E[n++]=E[x++],E[n++]=E[x++],S-=3}while(S>2);S&&(E[n++]=E[x++],S>1&&(E[n++]=E[x++]))}break}}break}}while(i>3,d&=(1<<(u-=S<<3))-1,t.next_in=i,t.next_out=n,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):-2}function c(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,p(t)):-2}function f(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,c(t))):-2}function d(t,e){var r,i;return t?(i=new l,t.state=i,i.window=null,0!==(r=f(t,e))&&(t.state=null),r):-2}var u,m,y=!0;function g(t){if(y){var e;for(u=new i.Buf32(512),m=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(o(1,t.lens,0,288,u,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;o(2,t.lens,0,32,m,0,t.work,{bits:5}),y=!1}t.lencode=u,t.lenbits=9,t.distcode=m,t.distbits=5}function v(t,e,r,s){var n,a=t.state;return null===a.window&&(a.wsize=1<=a.wsize?(i.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((n=a.wsize-a.wnext)>s&&(n=s),i.arraySet(a.window,e,r-s,n,a.wnext),(s-=n)?(i.arraySet(a.window,e,r-s,s,0),a.wnext=s,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=n(r.check,z,2,0),m=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",r.mode=30;break}if(y-=4,I=8+(15&(m>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(z[0]=255&m,z[1]=m>>>8&255,r.check=n(r.check,z,2,0)),m=0,y=0,r.mode=3;case 3:for(;y<32;){if(0===d)break t;d--,m+=l[c++]<>>8&255,z[2]=m>>>16&255,z[3]=m>>>24&255,r.check=n(r.check,z,4,0)),m=0,y=0,r.mode=4;case 4:for(;y<16;){if(0===d)break t;d--,m+=l[c++]<>8),512&r.flags&&(z[0]=255&m,z[1]=m>>>8&255,r.check=n(r.check,z,2,0)),m=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===d)break t;d--,m+=l[c++]<>>8&255,r.check=n(r.check,z,2,0)),m=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>d&&(S=d),S&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,l,c,S,I)),512&r.flags&&(r.check=n(r.check,l,S,c)),d-=S,c+=S,r.length-=S),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;S=0;do{I=l[c+S++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I))}while(I&&S>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===d)break t;d--,m+=l[c++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===d)break t;d--,m+=l[c++]<>>=1)){case 0:r.mode=14;break;case 1:if(g(r),r.mode=20,6===e){m>>>=2,y-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}m>>>=2,y-=2;break;case 14:for(m>>>=7&y,y-=7&y;y<32;){if(0===d)break t;d--,m+=l[c++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,m=0,y=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(S=r.length){if(S>d&&(S=d),S>u&&(S=u),0===S)break t;i.arraySet(p,l,c,S,f),d-=S,c+=S,u-=S,f+=S,r.length-=S;break}r.mode=12;break;case 17:for(;y<14;){if(0===d)break t;d--,m+=l[c++]<>>=5,y-=5,r.ndist=1+(31&m),m>>>=5,y-=5,r.ncode=4+(15&m),m>>>=4,y-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,y-=3}for(;r.have<19;)r.lens[L[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},F=o(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,F){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,E=65535&R,!((k=R>>>24)<=y);){if(0===d)break t;d--,m+=l[c++]<>>=k,y-=k,r.lens[r.have++]=E;else{if(16===E){for(D=k+2;y>>=k,y-=k,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],S=3+(3&m),m>>>=2,y-=2}else if(17===E){for(D=k+3;y>>=k)),m>>>=3,y-=3}else{for(D=k+7;y>>=k)),m>>>=7,y-=7}if(r.have+S>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;S--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,M={bits:r.lenbits},F=o(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,F){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},F=o(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,F){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&u>=258){t.next_out=f,t.avail_out=u,t.next_in=c,t.avail_in=d,r.hold=m,r.bits=y,a(t,b),f=t.next_out,p=t.output,u=t.avail_out,c=t.next_in,l=t.input,d=t.avail_in,m=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;w=(R=r.lencode[m&(1<>>16&255,E=65535&R,!((k=R>>>24)<=y);){if(0===d)break t;d--,m+=l[c++]<>A)])>>>16&255,E=65535&R,!(A+(k=R>>>24)<=y);){if(0===d)break t;d--,m+=l[c++]<>>=A,y-=A,r.back+=A}if(m>>>=k,y-=k,r.back+=k,r.length=E,0===w){r.mode=26;break}if(32&w){r.back=-1,r.mode=12;break}if(64&w){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&w,r.mode=22;case 22:if(r.extra){for(D=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;w=(R=r.distcode[m&(1<>>16&255,E=65535&R,!((k=R>>>24)<=y);){if(0===d)break t;d--,m+=l[c++]<>A)])>>>16&255,E=65535&R,!(A+(k=R>>>24)<=y);){if(0===d)break t;d--,m+=l[c++]<>>=A,y-=A,r.back+=A}if(m>>>=k,y-=k,r.back+=k,64&w){t.msg="invalid distance code",r.mode=30;break}r.offset=E,r.extra=15&w,r.mode=24;case 24:if(r.extra){for(D=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===u)break t;if(S=b-u,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}S>r.wnext?(S-=r.wnext,P=r.wsize-S):P=r.wnext-S,S>r.length&&(S=r.length),x=r.window}else x=p,P=f-r.offset,S=r.length;S>u&&(S=u),u-=S,r.length-=S;do{p[f++]=x[P++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===u)break t;p[f++]=r.length,u--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===d)break t;d--,m|=l[c++]<=1&&0===z[E];E--);if(A>E&&(A=E),0===E)return l[p++]=20971520,l[p++]=20971520,f.bits=1,0;for(w=1;w0&&(0===t||1!==E))return-1;for(L[1]=0,x=1;x<15;x++)L[x+1]=L[x]+z[x];for(k=0;k852||2===t&&F>592)return 1;for(;;){_=x-C,c[k]v?(b=O[N+c[k]],S=D[R+c[k]]):(b=96,S=0),d=1<>C)+(u-=d)]=_<<24|b<<16|S|0}while(0!==u);for(d=1<>=1;if(0!==d?(M&=d-1,M+=d):M=0,k++,0==--z[x]){if(x===E)break;x=e[r+c[k]]}if(x>A&&(M&y)!==m){for(0===C&&(C=A),g+=w,I=1<<(T=x-C);T+C852||2===t&&F>592)return 1;l[m=M&y]=A<<24|T<<16|g-p|0}}return 0!==M&&(l[g+M]=x-C<<24|64<<16|0),f.bits=A,0}},{"../utils/common":41}],51:[function(t,e,r){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,r){var i=t("../utils/common");function s(t){for(var e=t.length;--e>=0;)t[e]=0}var n=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);s(l);var p=new Array(60);s(p);var c=new Array(512);s(c);var f=new Array(256);s(f);var d=new Array(29);s(d);var u,m,y,g=new Array(30);function v(t,e,r,i,s){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=s,this.has_stree=t&&t.length}function _(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function b(t){return t<256?c[t]:c[256+(t>>>7)]}function S(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function P(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function w(t,e,r){var i,s,n=new Array(16),a=0;for(i=1;i<=15;i++)n[i]=a=a+r[i-1]<<1;for(s=0;s<=e;s++){var o=t[2*s+1];0!==o&&(t[2*s]=k(n[o]++,o))}}function E(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function A(t){t.bi_valid>8?S(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function T(t,e,r,i){var s=2*e,n=2*r;return t[s]>1;r>=1;r--)C(t,n,r);s=h;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],C(t,n,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,n[2*s]=n[2*r]+n[2*i],t.depth[s]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,n[2*r+1]=n[2*i+1]=s,t.heap[1]=s++,C(t,n,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,s,n,a,o,h=e.dyn_tree,l=e.max_code,p=e.stat_desc.static_tree,c=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,u=e.stat_desc.max_length,m=0;for(n=0;n<=15;n++)t.bl_count[n]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(n=h[2*h[2*(i=t.heap[r])+1]+1]+1)>u&&(n=u,m++),h[2*i+1]=n,i>l||(t.bl_count[n]++,a=0,i>=d&&(a=f[i-d]),o=h[2*i],t.opt_len+=o*(n+a),c&&(t.static_len+=o*(p[2*i+1]+a)));if(0!==m){do{for(n=u-1;0===t.bl_count[n];)n--;t.bl_count[n]--,t.bl_count[n+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(n=u;0!==n;n--)for(i=t.bl_count[n];0!==i;)(s=t.heap[--r])>l||(h[2*s+1]!==n&&(t.opt_len+=(n-h[2*s+1])*h[2*s],h[2*s+1]=n),i--)}}(t,e),w(n,l,t.bl_count)}function M(t,e,r){var i,s,n=-1,a=e[1],o=0,h=7,l=4;for(0===a&&(h=138,l=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)s=a,a=e[2*(i+1)+1],++o>=7;i<30;i++)for(g[i]=s<<7,t=0;t<1<0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),F(t,t.l_desc),F(t,t.d_desc),a=function(t){var e;for(M(t,t.dyn_ltree,t.l_desc.max_code),M(t,t.dyn_dtree,t.d_desc.max_code),F(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),s=t.opt_len+3+7>>>3,(n=t.static_len+3+7>>>3)<=s&&(s=n)):s=n=r+5,r+4<=s&&-1!==e?z(t,e,r,i):4===t.strategy||n===s?(P(t,2+(i?1:0),3),I(t,l,p)):(P(t,4+(i?1:0),3),function(t,e,r,i){var s;for(P(t,e-257,5),P(t,r-1,5),P(t,i-4,4),s=0;s>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(f[r]+256+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){P(t,2,3),x(t,256,l),function(t){16===t.bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}));function _templateObject(){const t=_taggedTemplateLiteral(["\n* {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n}\n\n:host {\n --lottie-player-toolbar-height: 35px;\n --lottie-player-toolbar-background-color: transparent;\n --lottie-player-toolbar-icon-color: #999;\n --lottie-player-toolbar-icon-hover-color: #222;\n --lottie-player-toolbar-icon-active-color: #555;\n --lottie-player-seeker-track-color: #CCC;\n --lottie-player-seeker-thumb-color: rgba(0, 107, 120, 0.8);\n\n display: block;\n}\n\n.main {\n display: grid;\n grid-auto-columns: auto;\n grid-template-rows: auto;\n height: inherit;\n width: inherit;\n}\n\n.main.controls {\n grid-template-rows: 1fr var(--lottie-player-toolbar-height);\n}\n\n.animation {\n display: flex;\n justify-content: center;\n align-items: center;\n width: inherit;\n height: inherit;\n}\n\n.toolbar {\n display: grid;\n grid-template-columns: 32px 32px 1fr 32px;\n align-items: center;\n justify-items: center;\n background-color: var(--lottie-player-toolbar-background-color);\n}\n\n.toolbar button {\n cursor: pointer;\n fill: var(--lottie-player-toolbar-icon-color);\n display: flex;\n background: none;\n border: 0;\n padding: 0;\n outline: none;\n height: 100%;\n}\n\n.toolbar button:hover {\n fill: var(--lottie-player-toolbar-icon-hover-color);\n}\n\n.toolbar button.active {\n fill: var(--lottie-player-toolbar-icon-active-color);\n}\n\n.toolbar button svg {\n}\n\n.toolbar button.disabled svg {\n display: none;\n}\n\n.toolbar a {\n filter: grayscale(100%);\n display: flex;\n transition: filter .5s, opacity 0.5s;\n opacity: 0.4;\n height: 100%;\n align-items: center;\n}\n\n.toolbar a:hover {\n filter: none;\n display: flex;\n opacity: 1;\n}\n\n.toolbar a svg {\n}\n\n.seeker {\n -webkit-appearance: none;\n width: 95%;\n outline: none;\n}\n\n.seeker::-webkit-slider-runnable-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n}\n.seeker::-webkit-slider-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -webkit-appearance: none;\n margin-top: -5px;\n}\n.seeker:focus::-webkit-slider-runnable-track {\n background: #999;\n}\n.seeker::-moz-range-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n}\n.seeker::-moz-range-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n}\n.seeker::-ms-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n}\n.seeker::-ms-fill-lower {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n}\n.seeker::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n}\n.seeker::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n}\n.seeker:focus::-ms-fill-lower {\n background: var(--lottie-player-seeker-track-color);\n}\n.seeker:focus::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n}\n\n.error {\n display: flex;\n justify-content: center;\n height: 100%;\n align-items: center;\n}\n"]);return _templateObject=function(){return t},t}var styles=css(_templateObject()),PlayerState,PlayMode,PlayerEvents;function _templateObject5(){const t=_taggedTemplateLiteral(['\n
\n ']);return _templateObject5=function(){return t},t}function _templateObject4(){const t=_taggedTemplateLiteral(["\n
\n ']);return _templateObject3=function(){return t},t}function _templateObject2(){const t=_taggedTemplateLiteral(['\n \n \n \n ']);return _templateObject2=function(){return t},t}function _templateObject$1(){const t=_taggedTemplateLiteral(['\n
\n \n \n \n \n \n \n
\n ']);return _templateObject$1=function(){return t},t}function fetchPath(t){return new Promise((e,r)=>{const i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="arraybuffer",i.send(),i.onreadystatechange=function(){4==i.readyState&&200==i.status&&jszip.loadAsync(i.response).then(t=>{t.file("manifest.json").async("string").then(r=>{const i=JSON.parse(r);if(!("animations"in i))throw new Error("Manifest not found");if(0===i.animations.length)throw new Error("No animations listed in the manifest");const s=i.animations[0];t.file("animations/".concat(s.id,".json")).async("string").then(r=>{const i=JSON.parse(r);"assets"in i&&Promise.all(i.assets.map(e=>{if(e.p&&null!=t.file("images/".concat(e.p)))return new Promise(r=>{t.file("images/".concat(e.p)).async("base64").then(t=>{e.p="data:;base64,"+t,e.e=1,r()})})})).then(()=>{e(i)})})})}).catch(t=>{r(t)})}})}PlayerState=exports.PlayerState||(exports.PlayerState={}),PlayerState.Loading="loading",PlayerState.Playing="playing",PlayerState.Paused="paused",PlayerState.Stopped="stopped",PlayerState.Frozen="frozen",PlayerState.Error="error",PlayMode=exports.PlayMode||(exports.PlayMode={}),PlayMode.Normal="normal",PlayMode.Bounce="bounce",PlayerEvents=exports.PlayerEvents||(exports.PlayerEvents={}),PlayerEvents.Load="load",PlayerEvents.Error="error",PlayerEvents.Ready="ready",PlayerEvents.Play="play",PlayerEvents.Pause="pause",PlayerEvents.Stop="stop",PlayerEvents.Freeze="freeze",PlayerEvents.Loop="loop",PlayerEvents.Complete="complete",PlayerEvents.Frame="frame",exports.DotLottiePlayer=class extends LitElement{constructor(){super(...arguments),this.mode=exports.PlayMode.Normal,this.autoplay=!1,this.background="transparent",this.controls=!1,this.direction=1,this.hover=!1,this.loop=!1,this.renderer="svg",this.speed=1,this.currentState=exports.PlayerState.Loading,this.intermission=1,this._counter=0}_onVisibilityChange(){document.hidden&&this.currentState===exports.PlayerState.Playing?this.freeze():this.currentState===exports.PlayerState.Frozen&&this.play()}_handleSeekChange(t){if(!this._lottie||isNaN(t.target.value))return;const e=t.target.value/100*this._lottie.totalFrames;this.seek(e)}async load(t){if(!this.shadowRoot)return;const e={container:this.container,loop:!1,autoplay:!1,renderer:this.renderer,rendererSettings:{scaleMode:"noScale",clearCanvas:!1,progressiveLoad:!0,hideOnTransparent:!0}};try{const r=await fetchPath(t);this._lottie&&this._lottie.destroy(),this._lottie=lottie_svg.loadAnimation(Object.assign(Object.assign({},e),{animationData:r}))}catch(t){return this.currentState=exports.PlayerState.Error,void this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Error))}this._lottie&&(this._lottie.addEventListener("enterFrame",()=>{this.seeker=this._lottie.currentFrame/this._lottie.totalFrames*100,this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Frame,{detail:{frame:this._lottie.currentFrame,seeker:this.seeker}}))}),this._lottie.addEventListener("complete",()=>{this.currentState===exports.PlayerState.Playing?!this.loop||this.count&&this._counter>=this.count?this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Complete)):this.mode===exports.PlayMode.Bounce?(this.count&&(this._counter+=.5),setTimeout(()=>{this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Loop)),this.currentState===exports.PlayerState.Playing&&(this._lottie.setDirection(-1*this._lottie.playDirection),this._lottie.play())},this.intermission)):(this.count&&(this._counter+=1),window.setTimeout(()=>{this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Loop)),this.currentState===exports.PlayerState.Playing&&(this._lottie.stop(),this._lottie.play())},this.intermission)):this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Complete))}),this._lottie.addEventListener("DOMLoaded",()=>{this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Ready))}),this._lottie.addEventListener("data_ready",()=>{this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Load))}),this._lottie.addEventListener("data_failed",()=>{this.currentState=exports.PlayerState.Error,this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Error))}),this.container.addEventListener("mouseenter",()=>{this.hover&&this.currentState!==exports.PlayerState.Playing&&this.play()}),this.container.addEventListener("mouseleave",()=>{this.hover&&this.currentState===exports.PlayerState.Playing&&this.stop()}),this.setSpeed(this.speed),this.setDirection(this.direction),this.autoplay&&this.play())}getLottie(){return this._lottie}play(){this._lottie&&(this._lottie.play(),this.currentState=exports.PlayerState.Playing,this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Play)))}pause(){this._lottie&&(this._lottie.pause(),this.currentState=exports.PlayerState.Paused,this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Pause)))}stop(){this._lottie&&(this._counter=0,this._lottie.stop(),this.currentState=exports.PlayerState.Stopped,this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Stop)))}seek(t){if(!this._lottie)return;const e=t.toString().match(/^([0-9]+)(%?)$/);if(!e)return;const r="%"===e[2]?this._lottie.totalFrames*Number(e[1])/100:e[1];this.seeker=r,this.currentState===exports.PlayerState.Playing?this._lottie.goToAndPlay(r,!0):(this._lottie.goToAndStop(r,!0),this._lottie.pause())}snapshot(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.shadowRoot)return;const e=this.shadowRoot.querySelector(".animation svg"),r=(new XMLSerializer).serializeToString(e);if(t){const t=document.createElement("a");t.href="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r),t.download="download_"+this.seeker+".svg",document.body.appendChild(t),t.click(),document.body.removeChild(t)}return r}freeze(){this._lottie&&(this._lottie.pause(),this.currentState=exports.PlayerState.Frozen,this.dispatchEvent(new CustomEvent(exports.PlayerEvents.Freeze)))}setSpeed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this._lottie&&this._lottie.setSpeed(t)}setDirection(t){this._lottie&&this._lottie.setDirection(t)}setLooping(t){this._lottie&&(this.loop=t,this._lottie.loop=t)}togglePlay(){return this.currentState===exports.PlayerState.Playing?this.pause():this.play()}toggleLooping(){this.setLooping(!this.loop)}static get styles(){return styles}async firstUpdated(){"IntersectionObserver"in window&&(this._io=new IntersectionObserver(t=>{t[0].isIntersecting?this.currentState===exports.PlayerState.Frozen&&this.play():this.currentState===exports.PlayerState.Playing&&this.freeze()}),this._io.observe(this.container)),void 0!==document.hidden&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange()),this.src&&await this.load(this.src)}disconnectedCallback(){this._io&&(this._io.disconnect(),this._io=void 0),document.removeEventListener("visibilitychange",()=>this._onVisibilityChange())}renderControls(){const t=this.currentState===exports.PlayerState.Playing,e=this.currentState===exports.PlayerState.Paused,r=this.currentState===exports.PlayerState.Stopped;return html(_templateObject$1(),this.togglePlay,t||e?"active":"",html(t?_templateObject2():_templateObject3()),this.stop,r?"active":"",this.seeker,this._handleSeekChange,()=>{this._prevState=this.currentState,this.freeze()},()=>{this._prevState===exports.PlayerState.Playing&&this.play()},this.toggleLooping,this.loop?"active":"")}render(){const t=this.controls?"controls":"";return html(_templateObject4(),"main "+t,"background:"+this.background,this.currentState===exports.PlayerState.Error?html(_templateObject5()):void 0,this.controls?this.renderControls():void 0)}},__decorate([query(".animation")],exports.DotLottiePlayer.prototype,"container",void 0),__decorate([property()],exports.DotLottiePlayer.prototype,"mode",void 0),__decorate([property({type:Boolean})],exports.DotLottiePlayer.prototype,"autoplay",void 0),__decorate([property({type:String,reflect:!0})],exports.DotLottiePlayer.prototype,"background",void 0),__decorate([property({type:Boolean})],exports.DotLottiePlayer.prototype,"controls",void 0),__decorate([property({type:Number})],exports.DotLottiePlayer.prototype,"count",void 0),__decorate([property({type:Number})],exports.DotLottiePlayer.prototype,"direction",void 0),__decorate([property({type:Boolean})],exports.DotLottiePlayer.prototype,"hover",void 0),__decorate([property({type:Boolean,reflect:!0})],exports.DotLottiePlayer.prototype,"loop",void 0),__decorate([property({type:String})],exports.DotLottiePlayer.prototype,"renderer",void 0),__decorate([property({type:Number})],exports.DotLottiePlayer.prototype,"speed",void 0),__decorate([property({type:String})],exports.DotLottiePlayer.prototype,"src",void 0),__decorate([property({type:String})],exports.DotLottiePlayer.prototype,"currentState",void 0),__decorate([property()],exports.DotLottiePlayer.prototype,"seeker",void 0),__decorate([property()],exports.DotLottiePlayer.prototype,"intermission",void 0),exports.DotLottiePlayer=__decorate([customElement("dotlottie-player")],exports.DotLottiePlayer),exports.fetchPath=fetchPath,Object.defineProperty(exports,"__esModule",{value:!0})})); //# sourceMappingURL=dotlottie-player.js.map