PageSourceSearch

https://www.yorn.net/apps/digital-yorn/clientlib-yorn-all.min.js

js yorn.net collected 2026-10-02 12:43:12 UTC 977,225 bytes, 11,251 lines download raw bytes

1/*
2 * ADOBE CONFIDENTIAL
3 *
4 * Copyright 2012 Adobe Systems Incorporated
5 * All Rights Reserved.
6 *
7 * NOTICE:  All information contained herein is, and remains
8 * the property of Adobe Systems Incorporated and its suppliers,
9 * if any.  The intellectual and technical concepts contained
10 * herein are proprietary to Adobe Systems Incorporated and its
11 * suppliers and may be covered by U.S. and Foreign Patents,
12 * patents in process, and are protected by trade secret or copyright law.
13 * Dissemination of this information or reproduction of this material
14 * is strictly forbidden unless prior written permission is obtained
15 * from Adobe Systems Incorporated.
16 *
17 */
18(function(factory) {
19    "use strict";
20
21    if (typeof module === "object" && module.exports) {
22        module.exports = factory();
23    } else {
24        var g = window.Granite = window.Granite || {};
25        g.Sling = factory();
26    }
27}(function() {
28    "use strict";
29
30    /**
31     * A helper class providing a set of Sling-related utilities.
32     * @static
33     * @singleton
34     * @class Granite.Sling
35     * @deprecated Using the constants is no longer needed and actually is not a best practice as it is not RESTful,
36     *             where the server should drive the client via hypermedia and the client should not make any
37     *             assumption about the URL.
38     */
39    return {
40        /**
41         * The selector for infinite hierarchy depth when retrieving repository content.
42         * @static
43         * @final
44         * @type String
45         */
46        SELECTOR_INFINITY: ".infinity",
47
48        /**
49         * The parameter name for the used character set.
50         * @static
51         * @final
52         * @type String
53         */
54        CHARSET: "_charset_",
55
56        /**
57         * The parameter name for the status.
58         * @static
59         * @final
60         * @type String
61         */
62        STATUS: ":status",
63
64        /**
65         * The parameter value for the status type "browser".
66         * @static
67         * @final
68         * @type String
69         */
70        STATUS_BROWSER: "browser",
71
72        /**
73         * The parameter name for the operation.
74         * @static
75         * @final
76         * @type String
77         */
78        OPERATION: ":operation",
79
80        /**
81         * The parameter value for the delete operation.
82         * @static
83         * @final
84         * @type String
85         */
86        OPERATION_DELETE: "delete",
87
88        /**
89         * The parameter value for the move operation.
90         * @static
91         * @final
92         * @type String
93         */
94        OPERATION_MOVE: "move",
95
96        /**
97         * The parameter name suffix for deleting.
98         * @static
99         * @final
100         * @type String
101         */
102        DELETE_SUFFIX: "@Delete",
103
104        /**
105         * The parameter name suffix for setting a type hint.
106         * @static
107         * @final
108         * @type String
109         */
110        TYPEHINT_SUFFIX: "@TypeHint",
111
112        /**
113         * The parameter name suffix for copying.
114         * @static
115         * @final
116         * @type String
117         */
118        COPY_SUFFIX: "@CopyFrom",
119
120        /**
121         * The parameter name suffix for moving.
122         * @static
123         * @final
124         * @type String
125         */
126        MOVE_SUFFIX: "@MoveFrom",
127
128        /**
129         * The parameter name for the ordering.
130         * @static
131         * @final
132         * @type String
133         */
134        ORDER: ":order",
135
136        /**
137         * The parameter name for the replace flag.
138         * @static
139         * @final
140         * @type String
141         */
142        REPLACE: ":replace",
143
144        /**
145         * The parameter name for the destination flag.
146         * @static
147         * @final
148         * @type String
149         */
150        DESTINATION: ":dest",
151
152        /**
153         * The parameter name for the save parameter prefix.
154         * @static
155         * @final
156         * @type String
157         */
158        SAVE_PARAM_PREFIX: ":saveParamPrefix",
159
160        /**
161         * The parameter name for input fields that should be ignored by Sling.
162         * @static
163         * @final
164         * @type String
165         */
166        IGNORE_PARAM: ":ignore",
167
168        /**
169         * The parameter name for login requests.
170         * @static
171         * @final
172         * @type String
173         */
174        REQUEST_LOGIN_PARAM: "sling:authRequestLogin",
175
176        /**
177         * The login URL.
178         * @static
179         * @final
180         * @type String
181         */
182        LOGIN_URL: "/system/sling/login.html",
183
184        /**
185         * The logout URL.
186         * @static
187         * @final
188         * @type String
189         */
190        LOGOUT_URL: "/system/sling/logout.html"
191    };
192}));
193
194/*
195 * ADOBE CONFIDENTIAL
196 *
197 * Copyright 2012 Adobe Systems Incorporated
198 * All Rights Reserved.
199 *
200 * NOTICE:  All information contained herein is, and remains
201 * the property of Adobe Systems Incorporated and its suppliers,
202 * if any.  The intellectual and technical concepts contained
203 * herein are proprietary to Adobe Systems Incorporated and its
204 * suppliers and may be covered by U.S. and Foreign Patents,
205 * patents in process, and are protected by trade secret or copyright law.
206 * Dissemination of this information or reproduction of this material
207 * is strictly forbidden unless prior written permission is obtained
208 * from Adobe Systems Incorporated.
209 *
210 */
211(function(factory) {
212    "use strict";
213
214    if (typeof module === "object" && module.exports) {
215        module.exports = factory();
216    } else {
217        var g = window.Granite = window.Granite || {};
218        g.Util = factory();
219    }
220}(function() {
221    "use strict";
222
223    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Polyfill
224    var isArray = function(arg) {
225        return Object.prototype.toString.call(arg) === "[object Array]";
226    };
227
228    /**
229     * A helper class providing a set of general utilities.
230     * @static
231     * @singleton
232     * @class Granite.Util
233     */
234    return {
235        /**
236         * Replaces occurrences of <code>{n}</code> in the specified text with the texts from the snippets.
237         *
238         * @example
239         * var text = Granite.Util.patchText("{0} has signed in.", "Jack");
240         * // text = "Jack has signed in."
241         * var text2 = Granite.Util.patchText("{0} {1} has signed in from {2}.", ["Jack", "McFarland", "x.x.x.x"]);
242         * // text2 = "Jack McFarland has signed in from x.x.x.x."
243         *
244         * @param {String} text The text.
245         * @param {String|String[]} snippets The text(s) replacing <code>{n}</code>.
246         * @returns {String} The patched text.
247         */
248        patchText: function(text, snippets) {
249            if (snippets) {
250                if (!isArray(snippets)) {
251                    text = text.replace("{0}", snippets);
252                } else {
253                    for (var i = 0; i < snippets.length; i++) {
254                        text = text.replace(("{" + i + "}"), snippets[i]);
255                    }
256                }
257            }
258            return text;
259        },
260
261        /**
262         * Returns the top most accessible window.
263         * Check {@link .setIFrameMode} to avoid security exception message on WebKit browsers
264         * if this method is called in an iFrame included in a window from different domain.
265         *
266         * @returns {Window} The top window.
267         */
268        getTopWindow: function() {
269            var win = window;
270            if (this.iFrameTopWindow) {
271                return this.iFrameTopWindow;
272            }
273            try {
274                // try to access parent
275                // win.parent.location.href throws an exception if not authorized (e.g. different location in a portlet)
276                while (win.parent && win !== win.parent && win.parent.location.href) {
277                    win = win.parent;
278                }
279            } catch (error) {
280                // ignored
281            }
282            return win;
283        },
284
285        /**
286         * Allows to define if Granite.Util is running in an iFrame and parent window is in another domain
287         * (and optionally define what would be the top window in that case.
288         * This is necessary to use {@link .getTopWindow} in a iFrame on WebKit based browsers because
289         * {@link .getTopWindow} iterates on parent windows to find the top one which triggers a security exception
290         * if one parent window is in a different domain. Exception cannot be caught but is not breaking the JS
291         * execution.
292         *
293         * @param {Window} [topWindow=window] The iFrame top window. Must be running on the same host to avoid
294         * security exception.
295         */
296        setIFrameMode: function(topWindow) {
297            this.iFrameTopWindow = topWindow || window;
298        },
299
300        /**
301         * Applies default properties if non-existent into the base object.
302         * Child objects are merged recursively.
303         * REMARK:
304         *   - objects are recursively merged
305         *   - simple type object properties are copied over the base
306         *   - arrays are cloned and override the base (no value merging)
307         *
308         * @param {Object} base The object.
309         * @param {...Object} pass The objects to be copied onto the base.
310         * @returns {Object} The base object with defaults.
311         */
312        applyDefaults: function() {
313            var override;
314            var base = arguments[0] || {};
315
316            for (var i = 1; i < arguments.length; i++) {
317                override = arguments[i];
318
319                for (var name in override) {
320                    var value = override[name];
321
322                    if (override.hasOwnProperty(name) && value !== undefined) {
323                        if (value !== null && typeof value === "object" && !(value instanceof Array)) {
324                            // nested object
325                            base[name] = this.applyDefaults(base[name], value);
326                        } else if (value instanceof Array) {
327                            // override array
328                            base[name] = value.slice(0);
329                        } else {
330                            // simple type
331                            base[name] = value;
332                        }
333                    }
334                }
335            }
336
337            return base;
338        },
339
340        /**
341         * Returns the keycode from the given event.
342         * It is a normalized value over variation of browsers' inconsistencies.
343         *
344         * @param {UIEvent} event The event.
345         * @returns {Number} The keycode.
346         */
347        getKeyCode: function(event) {
348            return event.keyCode ? event.keyCode : event.which;
349        }
350    };
351}));
352
353/*
354 * ADOBE CONFIDENTIAL
355 *
356 * Copyright 2012 Adobe Systems Incorporated
357 * All Rights Reserved.
358 *
359 * NOTICE:  All information contained herein is, and remains
360 * the property of Adobe Systems Incorporated and its suppliers,
361 * if any.  The intellectual and technical concepts contained
362 * herein are proprietary to Adobe Systems Incorporated and its
363 * suppliers and may be covered by U.S. and Foreign Patents,
364 * patents in process, and are protected by trade secret or copyright law.
365 * Dissemination of this information or reproduction of this material
366 * is strictly forbidden unless prior written permission is obtained
367 * from Adobe Systems Incorporated.
368 *
369 */
370/* global CQURLInfo:false, G_XHR_HOOK:false */
371/* eslint strict: 0 */
372(function(factory) {
373    "use strict";
374
375    if (typeof module === "object" && module.exports) {
376        module.exports = factory(require("@granite/util"), require("jquery"));
377    } else {
378        window.Granite.HTTP = factory(Granite.Util, jQuery);
379    }
380}(function(util, $) {
381    /**
382     * A helper class providing a set of HTTP-related utilities.
383     * @static
384     * @singleton
385     * @class Granite.HTTP
386     */
387    return (function() {
388        /**
389         * The context path used on the server.
390         * May only be set by {@link #detectContextPath}.
391         * @type String
392         */
393        var contextPath = null;
394
395        /**
396         * The regular expression to detect the context path used
397         * on the server using the URL of this script.
398         * @readonly
399         * @type RegExp
400         */
401        // eslint-disable-next-line max-len
402        var SCRIPT_URL_REGEXP = /^(?:http|https):\/\/[^/]+(\/.*)\/(?:etc\.clientlibs|etc(\/.*)*\/clientlibs|libs(\/.*)*\/clientlibs|apps(\/.*)*\/clientlibs|etc\/designs).*\.js(\?.*)?$/;
403
404        /**
405         * The regular expression to match `#` and other non-ASCII characters in a URI.
406         * @readonly
407         * @type RegExp
408         */
409        var ENCODE_PATH_REGEXP = /[^\w-.~%:/?[\]@!$&'()*+,;=]/;
410
411        /**
412         * The regular expression to parse URI.
413         * @readonly
414         * @type RegExp
415         * @see https://tools.ietf.org/html/rfc3986#appendix-B
416         */
417        var URI_REGEXP = /^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
418
419        /**
420         * Indicates after a session timeout if a refresh has already been triggered
421         * in order to avoid multiple alerts.
422         * @type String
423         */
424        var loginRedirected = false;
425
426        var self = {};
427
428        /**
429         * Returns the scheme and authority (userinfo, host, port) components of the given URI;
430         * or an empty string if the URI does not have the components.
431         *
432         * This method assumes the URI is valid.
433         *
434         * e.g. `scheme://userinfo@host:80/path?query#fragment` -> `scheme://userinfo@host:80`
435         *
436         * @param {String} uri The URI
437         * @returns {String} The scheme and authority components
438         */
439        self.getSchemeAndAuthority = function(uri) {
440            if (!uri) {
441                return "";
442            }
443
444            var result = URI_REGEXP.exec(uri);
445
446            if (result === null) {
447                return "";
448            }
449
450            return [ result[1], result[3] ].join("");
451        };
452
453        /**
454         * Returns the context path used on the server.
455         *
456         * @returns {String} The context path
457         */
458        self.getContextPath = function() {
459            // Keep cache of calculated path.
460            if (contextPath === null) {
461                contextPath = self.detectContextPath();
462            }
463            return contextPath;
464        };
465
466        /**
467         * Detects the context path used on the server.
468         *
469         * @returns {String} The context path
470         * @private
471         */
472        self.detectContextPath = function() {
473            try {
474                if (window.CQURLInfo) {
475                    contextPath = CQURLInfo.contextPath || "";
476                } else {
477                    var scripts = document.getElementsByTagName("script");
478                    for (var i = 0; i < scripts.length; i++) {
479                        var result = SCRIPT_URL_REGEXP.exec(scripts[i].src);
480                        if (result) {
481                            contextPath = result[1];
482                            return contextPath;
483                        }
484                    }
485                    contextPath = "";
486                }
487            } catch (e) {
488                // ignored
489            }
490
491            return contextPath;
492        };
493
494        /**
495         * Makes sure the specified relative URL starts with the context path
496         * used on the server. If an absolute URL is passed, it will be returned
497         * as-is.
498         *
499         * @param {String} url The URL
500         * @returns {String} The externalized URL
501         */
502        self.externalize = function(url) {
503            try {
504                if (url.indexOf("/") === 0 && self.getContextPath() && url.indexOf(self.getContextPath() + "/") !== 0) {
505                    url = self.getContextPath() + url;
506                }
507            } catch (e) {
508                // ignored
509            }
510            return url;
511        };
512
513        /**
514         * Removes scheme, authority and context path from the specified
515         * absolute URL if it has the same scheme and authority as the
516         * specified document (or the current one). If a relative URL is passed,
517         * the context path will be stripped if present.
518         *
519         * @param {String} url The URL
520         * @param {String} doc (optional) The document
521         * @returns {String} The internalized URL
522         */
523        self.internalize = function(url, doc) {
524            if (url.charAt(0) === "/") {
525                if (contextPath === url) {
526                    return "";
527                } else if (contextPath && url.indexOf(contextPath + "/") === 0) {
528                    return url.substring(contextPath.length);
529                } else {
530                    return url;
531                }
532            }
533
534            if (!doc) {
535                doc = document;
536            }
537            var docHost = self.getSchemeAndAuthority(doc.location.href);
538            var urlHost = self.getSchemeAndAuthority(url);
539            if (docHost === urlHost) {
540                return url.substring(urlHost.length + (contextPath ? contextPath.length : 0));
541            } else {
542                return url;
543            }
544        };
545
546        /**
547         * Removes all parts but the path from the specified URL.
548         * <p>Examples:<pre><code>
549         /x/y.sel.html?param=abc => /x/y
550         </code></pre>
551         * <pre><code>
552         http://www.day.com/foo/bar.html => /foo/bar
553         </code></pre><p>
554         *
555         * @param {String} url The URL, may be empty. If empty <code>window.location.href</code> is taken.
556         * @returns {String} The path
557         */
558        self.getPath = function(url) {
559            if (!url) {
560                if (window.CQURLInfo && CQURLInfo.requestPath) {
561                    return CQURLInfo.requestPath;
562                } else {
563                    url = window.location.pathname;
564                }
565            } else {
566                url = self.removeParameters(url);
567                url = self.removeAnchor(url);
568            }
569
570            url = self.internalize(url);
571            var i = url.indexOf(".", url.lastIndexOf("/"));
572            if (i !== -1) {
573                url = url.substring(0, i);
574            }
575            return url;
576        };
577
578        /**
579         * Removes the fragment component from the given URI.
580         *
581         * This method assumes the URI is valid.
582         *
583         * e.g. `scheme://userinfo@host:80/path?query#fragment` -> `scheme://userinfo@host:80/path?query`
584         *
585         * @param {String} uri The URI
586         * @returns {String} The URI without fragment component
587         */
588        self.removeAnchor = function(uri) {
589            var fragmentIndex = uri.indexOf("#");
590            if (fragmentIndex >= 0) {
591                return uri.substring(0, fragmentIndex);
592            } else {
593                return uri;
594            }
595        };
596
597        /**
598         * Removes the query component and its subsequent fragment component from the given URI.
599         * i.e. When query component exists, the subsequent fragment component is also removed.
600         * However, when query component doesn't exist, fragment component is not removed.
601         *
602         * The assumption here is that the usages of `#` before the `?` are intended as part of the path component
603         * that need to be encoded separately.
604         * This assumption is made because `c.d.cq.commons.jcr.JcrUtil#isValidName` allows `#`.
605         *
606         * e.g. `scheme://userinfo@host:80/path#with#hash?query#fragment` -> `scheme://userinfo@host:80/path#with#hash`
607         *
608         * @param {String} uri The URL
609         * @returns {String} The URI without the query component and its subsequent fragment component
610         */
611        self.removeParameters = function(uri) {
612            var queryIndex = uri.indexOf("?");
613            if (queryIndex >= 0) {
614                return uri.substring(0, queryIndex);
615            } else {
616                return uri;
617            }
618        };
619
620        /**
621         * Encodes the path component of the given URI if it is not already encoded.
622         * See {@link #encodePath} for the details of the encoding.
623         *
624         * e.g. `scheme://userinfo@host:80/path#with#hash?query#fragment`
625         * -> `scheme://userinfo@host:80/path%23with%23hash?query#fragment`
626         *
627         * @param {String} uri The URI to encode
628         * @returns {String} The encoded URI
629         */
630        self.encodePathOfURI = function(uri) {
631            var DELIMS = [ "?", "#" ];
632
633            var parts = [ uri ];
634            var delim;
635            for (var i = 0, ln = DELIMS.length; i < ln; i++) {
636                delim = DELIMS[i];
637                if (uri.indexOf(delim) >= 0) {
638                    parts = uri.split(delim);
639                    break;
640                }
641            }
642
643            if (ENCODE_PATH_REGEXP.test(parts[0])) {
644                parts[0] = self.encodePath(parts[0]);
645            }
646
647            return parts.join(delim);
648        };
649
650        /**
651         * Encodes the given URI using `encodeURI`.
652         *
653         * This method is used to encode URI components from the scheme component up to the path component (inclusive).
654         * Therefore, `?` and `#` are also encoded in addition.
655         *
656         * However `[` and `]` are not encoded.
657         * The assumption here is that the usages of `[` and `]` are only at the host component (for IPv6),
658         * not at the path component.
659         * This assumption is made because `c.d.cq.commons.jcr.JcrUtil#isValidName` disallows `[` and `]`.
660         *
661         * Examples
662         *
663         * * `scheme://userinfo@host:80/path?query#fragment` -> `scheme://userinfo@host:80/path%3Fquery%23fragment`
664         * * `http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/` -> `http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/`
665         *
666         * @param {String} uri The URI to encode
667         * @returns {String} The encoded URI
668         */
669        self.encodePath = function(uri) {
670            uri = encodeURI(uri);
671
672            // Decode back `%5B` and `%5D`.
673            // The `[` and `]` are not valid characters at the path component and need to be encoded,
674            // which `encodeURI` does correctly.
675            // However as mentioned in the doc, they are assumed to be used for authority component only.
676            uri = uri.replace(/%5B/g, "[").replace(/%5D/g, "]");
677
678            uri = uri.replace(/\?/g, "%3F");
679            uri = uri.replace(/#/g, "%23");
680
681            return uri;
682        };
683
684        /**
685         * Handles login redirection if needed.
686         */
687        self.handleLoginRedirect = function() {
688            if (!loginRedirected) {
689                loginRedirected = true;
690                alert(Granite.I18n.get("Your request could not be completed because you have been signed out."));
691
692                var l = util.getTopWindow().document.location;
693                l.href = self.externalize("/") + "?resource=" + encodeURIComponent(l.pathname + l.search + l.hash);
694            }
695        };
696
697        /**
698         * Gets the XHR hooked URL if called in a portlet context
699         *
700         * @param {String} url The URL to get
701         * @param {String} method The method to use to retrieve the XHR hooked URL
702         * @param {Object} params The parameters
703         * @returns {String} The XHR hooked URL if available, the provided URL otherwise
704         */
705        self.getXhrHook = function(url, method, params) {
706            method = method || "GET";
707            if (window.G_XHR_HOOK && typeof G_XHR_HOOK === "function") {
708                var p = {
709                    "url": url,
710                    "method": method
711                };
712                if (params) {
713                    p["params"] = params;
714                }
715                return G_XHR_HOOK(p);
716            }
717            return null;
718        };
719
720        /**
721         * Evaluates and returns the body of the specified response object.
722         * Alternatively, a URL can be specified, in which case it will be
723         * requested using a synchronous {@link #get} in order to acquire
724         * the response object.
725         *
726         * @param {Object|String} response The response object or URL
727         * @returns {Object} The evaluated response body
728         * @since 5.3
729         */
730        self.eval = function(response) {
731            if (typeof response !== "object") {
732                response = $.ajax({
733                    url: response,
734                    type: "get",
735                    async: false
736                });
737            }
738            try {
739                // support responseText for backward compatibility (pre 5.3)
740                var text = response.body ? response.body : response.responseText;
741                return JSON.parse(text);
742            } catch (e) {
743                // ignored
744            }
745            return null;
746        };
747
748        return self;
749    }());
750}));
751
752/*
753 * ADOBE CONFIDENTIAL
754 * ___________________
755 *
756 * Copyright 2012 Adobe
757 * All Rights Reserved.
758 *
759 * NOTICE: All information contained herein is, and remains
760 * the property of Adobe and its suppliers, if any. The intellectual
761 * and technical concepts contained herein are proprietary to Adobe
762 * and its suppliers and are protected by all applicable intellectual
763 * property laws, including trade secret and copyright laws.
764 * Dissemination of this information or reproduction of this material
765 * is strictly forbidden unless prior written permission is obtained
766 * from Adobe.
767 */
768(function(factory) {
769    "use strict";
770
771    if (typeof module === "object" && module.exports) {
772        module.exports = factory(require("@granite/http"));
773    } else {
774        window.Granite.I18n = factory(window.Granite.HTTP);
775    }
776}(function(HTTP) {
777    "use strict";
778
779    /**
780     * A helper class providing a set of utilities related to internationalization (i18n).
781     *
782     * <h3>Locale Priorities</h3>
783     * <p>The locale is read based on the following priorities:</p>
784     * <ol>
785     *   <li>manually specified locale</li>
786     *   <li><code>document.documentElement.lang</code></li>
787     *   <li><code>Granite.I18n.LOCALE_DEFAULT</code></li>
788     * </ol>
789     *
790     * <h3>Dictionary Priorities</h3>
791     * <p>The dictionary URL is read based on the following priorities:</p>
792     * <ol>
793     *   <li>manually specified URL (<code>urlPrefix</code, <code>urlSuffix</code>)</li>
794     *   <li><code>data-i18n-dictionary-src</code> attribute at &lt;html&gt; element,
795     *       which has the type of <a href="http://tools.ietf.org/html/rfc6570">URI Template</a> string</li>
796     *   <li>The URL resolved from default <code>urlPrefix</code> and <code>urlSuffix</code></li>
797     * </ol>
798     *
799     * <h3>URI Template of data-i18n-dictionary-src</h3>
800     * <p>It expects the variable named <code>locale</code>,
801     * which will be fetched from the locale (based on priorities above).
802     * E.g. <code>&lt;html lang="en" data-i18n-dictionary-src="/libs/cq/i18n/dict.{+locale}.json"&gt;</code>.</p>
803     *
804     * @static
805     * @class Granite.I18n
806     */
807    return (function() {
808        /**
809         * The map where the dictionaries are stored under their locale.
810         * @type Object
811         */
812        var dicts = {};
813
814        /**
815         * The prefix for the URL used to request dictionaries from the server.
816         * @type String
817         */
818        var urlPrefix = "/libs/cq/i18n/dict.";
819
820        /**
821         * The suffix for the URL used to request dictionaries from the server.
822         * @type String
823         */
824        var urlSuffix = ".json";
825
826        /**
827         * The manually specified locale as a String or a function that returns the locale as a string.
828         * @type String
829         */
830        var manualLocale = undefined;
831
832        /**
833         * If the current locale represents pseudo translations.
834         * In that case the dictionary is expected to provide just a special
835         * translation pattern to automatically convert all original strings.
836         */
837        var pseudoTranslations = false;
838
839        var languages = null;
840
841        var self = {};
842
843        /**
844         * Indicates if the dictionary parameters are specified manually.
845         */
846        var manualDictionary = false;
847
848        var getDictionaryUrl = function(locale) {
849            if (manualDictionary) {
850                return urlPrefix + locale + urlSuffix;
851            }
852
853            var dictionarySrc;
854            var htmlEl = document.querySelector("html");
855            if (htmlEl) {
856                dictionarySrc = htmlEl.getAttribute("data-i18n-dictionary-src");
857            }
858
859            if (!dictionarySrc) {
860                return urlPrefix + locale + urlSuffix;
861            }
862
863            // dictionarySrc is a URITemplate
864            // Use simple string replacement for now; for more complicated scenario, please use Granite.URITemplate
865            return dictionarySrc.replace("{locale}", encodeURIComponent(locale)).replace("{+locale}", locale);
866        };
867
868        var patchText = function(text, snippets) {
869            if (snippets) {
870                if (Array.isArray(snippets)) {
871                    for (var i = 0; i < snippets.length; i++) {
872                        text = text.replace("{" + i + "}", snippets[i]);
873                    }
874                } else {
875                    text = text.replace("{0}", snippets);
876                }
877            }
878            return text;
879        };
880
881        /**
882         * The default locale (en).
883         * @readonly
884         * @type String
885         */
886        self.LOCALE_DEFAULT = "en";
887
888        /**
889         * The language code for pseudo translations.
890         * @readonly
891         * @type String
892         */
893        self.PSEUDO_LANGUAGE = "zz";
894
895        /**
896         * The dictionary key for pseudo translation pattern.
897         * @readonly
898         * @type String
899         */
900        self.PSEUDO_PATTERN_KEY = "_pseudoPattern_";
901
902        /**
903         * Initializes I18n with the given config options:
904         * <ul>
905         * <li>locale: the current locale (defaults to "en")</li>
906         * <li>urlPrefix: the prefix for the URL used to request dictionaries from
907         * the server (defaults to "/libs/cq/i18n/dict.")</li>
908         * <li>urlSuffix: the suffix for the URL used to request dictionaries from
909         * the server (defaults to ".json")</li>
910         * </ul>
911         * Sample config. The dictionary would be requested from
912         * "/apps/i18n/dict.fr.json":
913         <code><pre>{
914         "locale": "fr",
915         "urlPrefix": "/apps/i18n/dict.",
916         "urlSuffix": ".json"
917         }</pre></code>
918         *
919         * @param {Object} config The config
920         */
921        self.init = function(config) {
922            config = config || {};
923
924            this.setLocale(config.locale);
925            this.setUrlPrefix(config.urlPrefix);
926            this.setUrlSuffix(config.urlSuffix);
927        };
928
929        /**
930         * Sets the current locale.
931         *
932         * @param {String|Function} locale The locale or a function that returns the locale as a string
933         */
934        self.setLocale = function(locale) {
935            if (!locale) {
936                return;
937            }
938            manualLocale = locale;
939        };
940
941        /**
942         * Returns the current locale based on the priorities.
943         *
944         * @returns {String} The locale
945         */
946        self.getLocale = function() {
947            if (typeof manualLocale === "function") {
948                // execute function first time only and store result in currentLocale
949                manualLocale = manualLocale();
950            }
951            return manualLocale || document.documentElement.lang || self.LOCALE_DEFAULT;
952        };
953
954        /**
955         * Sets the prefix for the URL used to request dictionaries from
956         * the server. The locale and URL suffix will be appended.
957         *
958         * @param {String} prefix The URL prefix
959         */
960        self.setUrlPrefix = function(prefix) {
961            if (!prefix) {
962                return;
963            }
964            urlPrefix = prefix;
965            manualDictionary = true;
966        };
967
968        /**
969         * Sets the suffix for the URL used to request dictionaries from
970         * the server. It will be appended to the URL prefix and locale.
971         *
972         * @param {String} suffix The URL suffix
973         */
974        self.setUrlSuffix = function(suffix) {
975            if (!suffix) {
976                return;
977            }
978            urlSuffix = suffix;
979            manualDictionary = true;
980        };
981
982        /**
983         * Returns the dictionary for the specified locale. This method
984         * will request the dictionary using the URL prefix, the locale,
985         * and the URL suffix. If no locale is specified, the current
986         * locale is used.
987         *
988         * @param {String} locale (optional) The locale
989         * @returns {Object} The dictionary
990         */
991        self.getDictionary = function(locale) {
992            locale = locale || self.getLocale();
993
994            if (!dicts[locale]) {
995                pseudoTranslations = locale.indexOf(self.PSEUDO_LANGUAGE) === 0;
996
997                try {
998                    var xhr = new XMLHttpRequest();
999                    xhr.open("GET", HTTP.externalize(getDictionaryUrl(locale)), false);
1000                    xhr.send();
1001
1002                    dicts[locale] = JSON.parse(xhr.responseText);
1003                } catch (e) {
1004                    // ignored
1005                }
1006                if (!dicts[locale]) {
1007                    dicts[locale] = {};
1008                }
1009            }
1010            return dicts[locale];
1011        };
1012
1013        /**
1014         * Translates the specified text into the current language.
1015         *
1016         * @param {String} text The text to translate
1017         * @param {String[]} snippets The snippets replacing <code>{n}</code> (optional)
1018         * @param {String} note A hint for translators (optional)
1019         * @returns {String} The translated text
1020         */
1021        self.get = function(text, snippets, note) {
1022            var dict;
1023            var newText;
1024            var lookupText;
1025
1026            dict = self.getDictionary();
1027
1028            // note that pseudoTranslations is initialized in the getDictionary() call above
1029            lookupText = pseudoTranslations ? self.PSEUDO_PATTERN_KEY
1030                : note ? text + " ((" + note + "))"
1031                    : text;
1032            if (dict) {
1033                newText = dict[lookupText];
1034            }
1035            if (!newText) {
1036                newText = text;
1037            }
1038            if (pseudoTranslations) {
1039                newText = newText.replace("{string}", text).replace("{comment}", note ? note : "");
1040            }
1041            return patchText(newText, snippets);
1042        };
1043
1044        /**
1045         * Translates the specified text into the current language. Use this
1046         * method to translate String variables, e.g. data from the server.
1047         *
1048         * @param {String} text The text to translate
1049         * @param {String} note A hint for translators (optional)
1050         * @returns {String} The translated text
1051         */
1052        self.getVar = function(text, note) {
1053            if (!text) {
1054                return null;
1055            }
1056            return self.get(text, null, note);
1057        };
1058
1059        /**
1060         * Returns the available languages, including a "title" property with a display name:
1061         * for instance "German" for "de" or "German (Switzerland)" for "de_ch".
1062         *
1063         * @returns {Object} An object with language codes as keys and an object with "title",
1064         *                  "language", "country" and "defaultCountry" members.
1065         */
1066        self.getLanguages = function() {
1067            if (!languages) {
1068                try {
1069                    // use overlay servlet so customers can define /apps/wcm/core/resources/languages
1070                    // TODO: broken!!!
1071                    var url = HTTP.externalize("/libs/wcm/core/resources/languages.overlay.infinity.json");
1072                    var xhr = new XMLHttpRequest();
1073                    xhr.open("GET", url, false);
1074                    xhr.send();
1075
1076                    var json = JSON.parse(xhr.responseText);
1077
1078                    Object.keys(json).forEach(function(prop) {
1079                        var lang = json[prop];
1080                        if (lang.language) {
1081                            lang.title = self.getVar(lang.language);
1082                        }
1083                        if (lang.title && lang.country && lang.country !== "*") {
1084                            lang.title += " (" + self.getVar(lang.country) + ")";
1085                        }
1086                    });
1087                    languages = json;
1088                } catch (e) {
1089                    languages = {};
1090                }
1091            }
1092            return languages;
1093        };
1094
1095        /**
1096         * Parses a language code string such as "de_CH" and returns an object with
1097         * language and country extracted. The delimiter can be "_" or "-".
1098         *
1099         * @param {String} langCode a language code such as "de" or "de_CH" or "de-ch"
1100         * @returns {Object} an object with "code" ("de_CH"), "language" ("de") and "country" ("CH")
1101         *                  (or null if langCode was null)
1102         */
1103        self.parseLocale = function(langCode) {
1104            if (!langCode) {
1105                return null;
1106            }
1107            var pos = langCode.indexOf("_");
1108            if (pos < 0) {
1109                pos = langCode.indexOf("-");
1110            }
1111
1112            var language;
1113            var country;
1114            if (pos < 0) {
1115                language = langCode;
1116                country = null;
1117            } else {
1118                language = langCode.substring(0, pos);
1119                country = langCode.substring(pos + 1);
1120            }
1121            return {
1122                code: langCode,
1123                language: language,
1124                country: country
1125            };
1126        };
1127
1128        return self;
1129    }());
1130}));
1131
1132/*
1133 * ADOBE CONFIDENTIAL
1134 *
1135 * Copyright 2012 Adobe Systems Incorporated
1136 * All Rights Reserved.
1137 *
1138 * NOTICE:  All information contained herein is, and remains
1139 * the property of Adobe Systems Incorporated and its suppliers,
1140 * if any.  The intellectual and technical concepts contained
1141 * herein are proprietary to Adobe Systems Incorporated and its
1142 * suppliers and may be covered by U.S. and Foreign Patents,
1143 * patents in process, and are protected by trade secret or copyright law.
1144 * Dissemination of this information or reproduction of this material
1145 * is strictly forbidden unless prior written permission is obtained
1146 * from Adobe Systems Incorporated.
1147 *
1148 */
1149(function(factory) {
1150    "use strict";
1151
1152    if (typeof module === "object" && module.exports) {
1153        module.exports = factory();
1154    } else {
1155        var g = window.Granite = window.Granite || {};
1156        g.TouchIndicator = factory();
1157    }
1158}(function() {
1159    "use strict";
1160
1161    function createIndicator() {
1162        var el = document.createElement("div");
1163        el.style.visibility = "hidden";
1164        // fixed would be better, but flickers on ipad while scrolling
1165        el.style.position = "absolute";
1166        el.style.width = "30px";
1167        el.style.height = "30px";
1168        el.style.borderRadius = "20px";
1169        el.style.border = "5px solid orange";
1170        el.style.userSelect = "none";
1171        el.style.opacity = "0.5";
1172        el.style.zIndex = "2000";
1173        el.style.pointerEvents = "none";
1174        return el;
1175    }
1176
1177    var used = {};
1178
1179    var unused = [];
1180
1181    /**
1182     * Implements the "Adobe Dynamic Touch Indicator" that tracks touch events and displays a visual indicator for
1183     * screen sharing and presentation purposes.
1184     *
1185     * To enable it, call <code>Granite.TouchIndicator.init()</code> e.g. on document ready:
1186     * <pre><code>
1187     * Granite.$(document).ready(function() {
1188     *     Granite.TouchIndicator.init();
1189     * });
1190     * </code></pre>
1191     *
1192     * AdobePatentID="2631US01"
1193     */
1194    return {
1195        debugWithMouse: false,
1196
1197        init: function() {
1198            var self = this;
1199
1200            var update = function(e) {
1201                self.update(e.touches);
1202                return true;
1203            };
1204            document.addEventListener("touchstart", update);
1205            document.addEventListener("touchmove", update);
1206            document.addEventListener("touchend", update);
1207
1208            if (this.debugWithMouse) {
1209                document.addEventListener("mousemove", function(e) {
1210                    e.identifer = "fake";
1211                    self.update([ e ]);
1212                    return true;
1213                });
1214            }
1215        },
1216
1217        update: function(touches) {
1218            // go over all touch events present in the array
1219            var retained = {};
1220            for (var i = 0; i < touches.length; i++) {
1221                var touch = touches[i];
1222                var id = touch.identifier;
1223
1224                // check if we already have a indicator with the correct id
1225                var indicator = used[id];
1226                if (!indicator) {
1227                    // if not, check if we have an unused one
1228                    indicator = unused.pop();
1229
1230                    // if not, create a new one and append it to the dom
1231                    if (!indicator) {
1232                        indicator = createIndicator();
1233                        document.body.appendChild(indicator);
1234                    }
1235                }
1236
1237                retained[id] = indicator;
1238                indicator.style.left = (touch.pageX - 20) + "px";
1239                indicator.style.top = (touch.pageY - 20) + "px";
1240                indicator.style.visibility = "visible";
1241            }
1242
1243            // now hide all unused ones and stuff them in the unused array
1244            for (id in used) {
1245                if (used.hasOwnProperty(id) && !retained[id]) {
1246                    indicator = used[id];
1247                    indicator.style.visibility = "hidden";
1248                    unused.push(indicator);
1249                }
1250            }
1251            used = retained;
1252        }
1253    };
1254}));
1255
1256/*
1257 * ADOBE CONFIDENTIAL
1258 *
1259 * Copyright 2012 Adobe Systems Incorporated
1260 * All Rights Reserved.
1261 *
1262 * NOTICE:  All information contained herein is, and remains
1263 * the property of Adobe Systems Incorporated and its suppliers,
1264 * if any.  The intellectual and technical concepts contained
1265 * herein are proprietary to Adobe Systems Incorporated and its
1266 * suppliers and may be covered by U.S. and Foreign Patents,
1267 * patents in process, and are protected by trade secret or copyright law.
1268 * Dissemination of this information or reproduction of this material
1269 * is strictly forbidden unless prior written permission is obtained
1270 * from Adobe Systems Incorporated.
1271 *
1272 */
1273(function(factory) {
1274    "use strict";
1275
1276    if (typeof module === "object" && module.exports) {
1277        module.exports = factory();
1278    } else {
1279        var g = window.Granite = window.Granite || {};
1280        g.OptOutUtil = factory();
1281    }
1282}(function($) {
1283    "use strict";
1284
1285    function trim(s) {
1286        if (String.prototype.trim) {
1287            return s.trim();
1288        }
1289        return s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1290    }
1291
1292    /**
1293     * A library to determine whether any opt-out cookie is set and whether a given cookie name is white-listed.
1294     *
1295     * The opt-out and white-list cookie names are determined by a server-side configuration
1296     * (<code>com.adobe.granite.security.commons.OptOutService</code>) and provided to this tool by an optionally
1297     * included component (<code>/libs/granite/security/components/optout</code>) which provides a global JSON object
1298     * named <code>GraniteOptOutConfig</code>.
1299     *
1300     * @static
1301     * @class Granite.OptOutUtil
1302     */
1303    return (function() {
1304        var self = {};
1305
1306        /**
1307         * The names of cookies the presence of which indicates the user has opted out.
1308         * @type String[]
1309         */
1310        var optOutCookieNames = [];
1311
1312        /**
1313         * The names of cookies which may still be set in spite of the user having opted out.
1314         * @type String[]
1315         */
1316        var whitelistedCookieNames = [];
1317
1318        /**
1319         * Initializes this tool with an opt-out configuration.
1320         *
1321         * The following options are supported:
1322         * <ul>
1323         *     <li>cookieNames: an array of cookie names representing opt-out cookies. Defaults to empty.</li>
1324         *     <li>whitelistCookieNames: an array of cookies representing white-listed cookies. Defaults to empty.</li>
1325         * </ul>
1326         *
1327         * @param {Object} config The opt-out configuration.
1328         *
1329         * @example
1330         * {
1331         *     "cookieNames": ["omniture_optout","cq-opt-out"],
1332         *     "whitelistCookieNames": ["someAppCookie", "anotherImportantAppCookie"]
1333         * }
1334         */
1335        self.init = function(config) {
1336            if (config) {
1337                optOutCookieNames = config.cookieNames || [];
1338                whitelistedCookieNames = config.whitelistCookieNames || [];
1339            } else {
1340                optOutCookieNames = [];
1341                whitelistedCookieNames = [];
1342            }
1343        };
1344
1345        /**
1346         * Returns the array of configured cookie names representing opt-out cookies.
1347         *
1348         * @returns {String[]} The cookie names.
1349         */
1350        self.getCookieNames = function() {
1351            return optOutCookieNames;
1352        };
1353
1354        /**
1355         * Returns the array of configured cookie names representing white-listed cookies.
1356         *
1357         * @returns {String[]} The cookie names.
1358         */
1359        self.getWhitelistCookieNames = function() {
1360            return whitelistedCookieNames;
1361        };
1362
1363        /**
1364         * Determines whether the user (browser) has elected to opt-out.
1365         * This is indicated by the presence of one of the cookies retrieved through {@link #getCookieNames()}.
1366         *
1367         * @returns {Boolean} <code>true</code> if an opt-cookie was found in the browser's cookies;
1368         *     <code>false</code> otherwise.
1369         */
1370        self.isOptedOut = function() {
1371            var browserCookies = document.cookie.split(";");
1372            for (var i = 0; i < browserCookies.length; i++) {
1373                var cookie = browserCookies[i];
1374                var cookieName = trim(cookie.split("=")[0]);
1375                if (self.getCookieNames().indexOf(cookieName) >= 0) {
1376                    return true;
1377                }
1378            }
1379            return false;
1380        };
1381
1382        /**
1383         * Determines whether the given <code>cookieName</code> may be used to set a cookie.
1384         * This is the case if either opt-out is inactive (<code>{@link #isOptedOut()} === false</code>) or it is
1385         * active and the give cookie name was found in the white-list ({@link #getWhitelistCookieNames()}).
1386         *
1387         * @param {String} cookieName The name of the cookie to check.
1388         * @returns {Boolean} <code>true</code> if a cookie of this name may be used with respect to the opt-out status;
1389         *     <code>false</code> otherwise.
1390         */
1391        self.maySetCookie = function(cookieName) {
1392            return !(self.isOptedOut() && self.getWhitelistCookieNames().indexOf(cookieName) === -1);
1393        };
1394
1395        return self;
1396    }());
1397}));
1398
1399/*
1400 * ADOBE CONFIDENTIAL
1401 *
1402 * Copyright 2012 Adobe Systems Incorporated
1403 * All Rights Reserved.
1404 *
1405 * NOTICE:  All information contained herein is, and remains
1406 * the property of Adobe Systems Incorporated and its suppliers,
1407 * if any.  The intellectual and technical concepts contained
1408 * herein are proprietary to Adobe Systems Incorporated and its
1409 * suppliers and may be covered by U.S. and Foreign Patents,
1410 * patents in process, and are protected by trade secret or copyright law.
1411 * Dissemination of this information or reproduction of this material
1412 * is strictly forbidden unless prior written permission is obtained
1413 * from Adobe Systems Incorporated.
1414 *
1415 */
1416
1417
1418//------------------------------------------------------------------------------
1419// Initialize the Granite utils library
1420
1421Granite.OptOutUtil.init(window.GraniteOptOutConfig);
1422Granite.HTTP.detectContextPath();
1423
1424/*
1425 * ADOBE CONFIDENTIAL
1426 *
1427 * Copyright 2012 Adobe Systems Incorporated
1428 * All Rights Reserved.
1429 *
1430 * NOTICE:  All information contained herein is, and remains
1431 * the property of Adobe Systems Incorporated and its suppliers,
1432 * if any.  The intellectual and technical concepts contained
1433 * herein are proprietary to Adobe Systems Incorporated and its
1434 * suppliers and may be covered by U.S. and Foreign Patents,
1435 * patents in process, and are protected by trade secret or copyright law.
1436 * Dissemination of this information or reproduction of this material
1437 * is strictly forbidden unless prior written permission is obtained
1438 * from Adobe Systems Incorporated.
1439 *
1440 */
1441/* global G_IS_HOOKED:false */
1442(function($, window) {
1443    "use strict";
1444
1445    var http;
1446
1447    window.Granite = window.Granite || {};
1448    window.Granite.$ = window.Granite.$ || $;
1449
1450    // for deprecated "shared" support (GRANITE-1602)
1451    window._g = window._g || {};
1452    window._g.$ = window._g.$ || $;
1453
1454    http = Granite.HTTP;
1455
1456    // necessary global modifications for ajax calls
1457    $.ajaxSetup({
1458        externalize: true,
1459        encodePath: true,
1460        hook: true,
1461        beforeSend: function(jqXHR, s) {
1462            // s: settings provided by the ajax call or default values
1463            if (typeof G_IS_HOOKED === "undefined" || !G_IS_HOOKED(s.url)) {
1464                if (s.externalize) {
1465                    s.url = http.externalize(s.url);
1466                }
1467                if (s.encodePath) {
1468                    s.url = http.encodePathOfURI(s.url);
1469                }
1470            }
1471            if (s.hook) {
1472                // portlet XHR hook
1473                var hook = http.getXhrHook(s.url, s.type, s.data);
1474                if (hook) {
1475                    s.url = hook.url;
1476                    if (hook.params) {
1477                        if (s.type.toUpperCase() === "GET") {
1478                            s.url += "?" + $.param(hook.params);
1479                        } else {
1480                            s.data = $.param(hook.params);
1481                        }
1482                    }
1483                }
1484            }
1485        },
1486        statusCode: {
1487            403: function(jqXHR) {
1488                if (jqXHR.getResponseHeader("X-Reason") === "Authentication Failed") {
1489                    http.handleLoginRedirect();
1490                }
1491            }
1492        }
1493    });
1494
1495    $.ajaxSettings.traditional = true;
1496}(jQuery, this));
1497
1498/*
1499 * ADOBE CONFIDENTIAL
1500 *
1501 * Copyright 2015 Adobe Systems Incorporated
1502 * All Rights Reserved.
1503 *
1504 * NOTICE:  All information contained herein is, and remains
1505 * the property of Adobe Systems Incorporated and its suppliers,
1506 * if any.  The intellectual and technical concepts contained
1507 * herein are proprietary to Adobe Systems Incorporated and its
1508 * suppliers and may be covered by U.S. and Foreign Patents,
1509 * patents in process, and are protected by trade secret or copyright law.
1510 * Dissemination of this information or reproduction of this material
1511 * is strictly forbidden unless prior written permission is obtained
1512 * from Adobe Systems Incorporated.
1513 *
1514 */
1515(function(factory) {
1516    "use strict";
1517
1518    // GRANITE-22281 Check for multiple initialization
1519    if (window.Granite.csrf) {
1520        return;
1521    }
1522
1523    window.Granite.csrf = factory(window.Granite.HTTP);
1524}(function(http) {
1525    "use strict";
1526
1527    // AdobePatentID="P5296"
1528
1529    function Promise() {
1530        this._handler = [];
1531    }
1532
1533    Promise.prototype = {
1534        then: function(resolveFn, rejectFn) {
1535            this._handler.push({ resolve: resolveFn, reject: rejectFn });
1536        },
1537        resolve: function() {
1538            this._execute("resolve", arguments);
1539        },
1540        reject: function() {
1541            this._execute("reject", arguments);
1542        },
1543        _execute: function(result, args) {
1544            if (this._handler === null) {
1545                throw new Error("Promise already completed.");
1546            }
1547
1548            for (var i = 0, ln = this._handler.length; i < ln; i++) {
1549                this._handler[i][result].apply(window, args);
1550            }
1551
1552            this.then = function(resolveFn, rejectFn) {
1553                (result === "resolve" ? resolveFn : rejectFn).apply(window, args);
1554            };
1555
1556            this._handler = null;
1557        }
1558    };
1559
1560    function verifySameOrigin(url) {
1561        // url could be relative or scheme relative or absolute
1562        // host + port
1563        var host = document.location.host;
1564        var protocol = document.location.protocol;
1565        var relativeOrigin = "//" + host;
1566        var origin = protocol + relativeOrigin;
1567
1568        // Allow absolute or scheme relative URLs to same origin
1569        return (url === origin || url.slice(0, origin.length + 1) === origin + "/") ||
1570                (url === relativeOrigin || url.slice(0, relativeOrigin.length + 1) === relativeOrigin + "/") ||
1571                // or any other URL that isn't scheme relative or absolute i.e relative.
1572                !(/^(\/\/|http:|https:).*/.test(url));
1573    }
1574
1575    var FIELD_NAME = ":cq_csrf_token";
1576    var HEADER_NAME = "CSRF-Token";
1577    var TOKEN_SERVLET = http.externalize("/libs/granite/csrf/token.json");
1578
1579    var promise;
1580    var globalToken;
1581
1582    function logFailRequest(error) {
1583        if (window.console) {
1584            // eslint-disable-next-line no-console
1585            console.warn("CSRF data not available;" +
1586                    "The data may be unavailable by design, such as during non-authenticated requests: " + error);
1587        }
1588    }
1589
1590    function getToken() {
1591        var localPromise = new Promise();
1592        promise = localPromise;
1593
1594        var xhr = new XMLHttpRequest();
1595        xhr.onreadystatechange = function() {
1596            if (xhr.readyState === 4) {
1597                try {
1598                    var data = JSON.parse(xhr.responseText);
1599                    globalToken = data.token;
1600                    localPromise.resolve(globalToken);
1601                } catch (ex) {
1602                    logFailRequest(ex);
1603                    localPromise.reject(xhr.responseText);
1604                }
1605            }
1606        };
1607        xhr.open("GET", TOKEN_SERVLET, true);
1608        xhr.send();
1609
1610        return localPromise;
1611    }
1612
1613    function getTokenSync() {
1614        var xhr = new XMLHttpRequest();
1615        xhr.open("GET", TOKEN_SERVLET, false);
1616        xhr.send();
1617
1618        try {
1619            return globalToken = JSON.parse(xhr.responseText).token;
1620        } catch (ex) {
1621            logFailRequest(ex);
1622        }
1623    }
1624
1625    function clearToken() {
1626        globalToken = undefined;
1627        getToken();
1628    }
1629
1630    function addField(form) {
1631        var action = form.getAttribute("action");
1632        if (form.method.toUpperCase() === "GET" || (action && !verifySameOrigin(action))) {
1633            return;
1634        }
1635
1636        if (!globalToken) {
1637            getTokenSync();
1638        }
1639
1640        if (!globalToken) {
1641            return;
1642        }
1643
1644        var input = form.querySelector('input[name="' + FIELD_NAME + '"]');
1645
1646        if (!input) {
1647            input = document.createElement("input");
1648            input.setAttribute("type", "hidden");
1649            input.setAttribute("name", FIELD_NAME);
1650            form.appendChild(input);
1651        }
1652
1653        input.setAttribute("value", globalToken);
1654    }
1655
1656    function handleForm(document) {
1657        var handler = function(ev) {
1658            var t = ev.target;
1659
1660            if (t.nodeName === "FORM") {
1661                addField(t);
1662            }
1663        };
1664
1665        if (document.addEventListener) {
1666            document.addEventListener("submit", handler, true);
1667        } else if (document.attachEvent) {
1668            document.attachEvent("submit", handler);
1669        }
1670    }
1671
1672    handleForm(document);
1673
1674    var open = XMLHttpRequest.prototype.open;
1675
1676    XMLHttpRequest.prototype.open = function(method, url, async) {
1677        if (method.toLowerCase() !== "get" && verifySameOrigin(url)) {
1678            this._csrf = true;
1679            this._async = async;
1680        }
1681
1682        return open.apply(this, arguments);
1683    };
1684
1685    var send = XMLHttpRequest.prototype.send;
1686
1687    XMLHttpRequest.prototype.send = function() {
1688        if (!this._csrf) {
1689            send.apply(this, arguments);
1690            return;
1691        }
1692
1693        if (globalToken) {
1694            this.setRequestHeader(HEADER_NAME, globalToken);
1695            send.apply(this, arguments);
1696            return;
1697        }
1698
1699        if (this._async === false) {
1700            getTokenSync();
1701
1702            if (globalToken) {
1703                this.setRequestHeader(HEADER_NAME, globalToken);
1704            }
1705
1706            send.apply(this, arguments);
1707            return;
1708        }
1709
1710        var self = this;
1711        var args = Array.prototype.slice.call(arguments);
1712
1713        promise.then(function(token) {
1714            self.setRequestHeader(HEADER_NAME, token);
1715            send.apply(self, args);
1716        }, function() {
1717            send.apply(self, args);
1718        });
1719    };
1720
1721    var submit = HTMLFormElement.prototype.submit;
1722
1723    HTMLFormElement.prototype.submit = function() {
1724        addField(this);
1725        return submit.apply(this, arguments);
1726    };
1727
1728    if (window.Node) {
1729        var ac = Node.prototype.appendChild;
1730
1731        Node.prototype.appendChild = function() {
1732            var result = ac.apply(this, arguments);
1733
1734            if (result.nodeName === "IFRAME") {
1735                try {
1736                    if (result.contentWindow && !result._csrf) {
1737                        result._csrf = true;
1738                        handleForm(result.contentWindow.document);
1739                    }
1740                } catch (ex) {
1741                    if (result.src && result.src.length && verifySameOrigin(result.src)) {
1742                        if (window.console) {
1743                            // eslint-disable-next-line no-console
1744                            console.error("Unable to attach CSRF token to an iframe element on the same origin");
1745                        }
1746                    }
1747
1748                    // Potential error: Access is Denied
1749                    // we can safely ignore CORS security errors here
1750                    // because we do not want to expose the csrf anyways to another domain
1751                }
1752            }
1753
1754            return result;
1755        };
1756    }
1757
1758    // refreshing csrf token periodically
1759    getToken();
1760
1761    setInterval(function() {
1762        getToken();
1763    }, 300000);
1764
1765    return {
1766        initialised: false,
1767        refreshToken: getToken,
1768        _clearToken: clearToken
1769    };
1770}));
1771
1772/*!
1773 * JavaScript Cookie v2.2.0
1774 * https://github.com/js-cookie/js-cookie
1775 *
1776 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
1777 * Released under the MIT license
1778 */
1779;(function (factory) {
1780	var registeredInModuleLoader = false;
1781	if (typeof define === 'function' && define.amd) {
1782		define(factory);
1783		registeredInModuleLoader = true;
1784	}
1785	if (typeof exports === 'object') {
1786		module.exports = factory();
1787		registeredInModuleLoader = true;
1788	}
1789	if (!registeredInModuleLoader) {
1790		var OldCookies = window.Cookies;
1791		var api = window.Cookies = factory();
1792		api.noConflict = function () {
1793			window.Cookies = OldCookies;
1794			return api;
1795		};
1796	}
1797}(function () {
1798	function extend () {
1799		var i = 0;
1800		var result = {};
1801		for (; i < arguments.length; i++) {
1802			var attributes = arguments[ i ];
1803			for (var key in attributes) {
1804				result[key] = attributes[key];
1805			}
1806		}
1807		return result;
1808	}
1809
1810	function init (converter) {
1811		function api (key, value, attributes) {
1812			var result;
1813			if (typeof document === 'undefined') {
1814				return;
1815			}
1816
1817			// Write
1818
1819			if (arguments.length > 1) {
1820				attributes = extend({
1821					path: '/'
1822				}, api.defaults, attributes);
1823
1824				if (typeof attributes.expires === 'number') {
1825					var expires = new Date();
1826					expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
1827					attributes.expires = expires;
1828				}
1829
1830				// We're using "expires" because "max-age" is not supported by IE
1831				attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
1832
1833				try {
1834					result = JSON.stringify(value);
1835					if (/^[\{\[]/.test(result)) {
1836						value = result;
1837					}
1838				} catch (e) {}
1839
1840				if (!converter.write) {
1841					value = encodeURIComponent(String(value))
1842						.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
1843				} else {
1844					value = converter.write(value, key);
1845				}
1846
1847				key = encodeURIComponent(String(key));
1848				key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
1849				key = key.replace(/[\(\)]/g, escape);
1850
1851				var stringifiedAttributes = '';
1852
1853				for (var attributeName in attributes) {
1854					if (!attributes[attributeName]) {
1855						continue;
1856					}
1857					stringifiedAttributes += '; ' + attributeName;
1858					if (attributes[attributeName] === true) {
1859						continue;
1860					}
1861					stringifiedAttributes += '=' + attributes[attributeName];
1862				}
1863				return (document.cookie = key + '=' + value + stringifiedAttributes);
1864			}
1865
1866			// Read
1867
1868			if (!key) {
1869				result = {};
1870			}
1871
1872			// To prevent the for loop in the first place assign an empty array
1873			// in case there are no cookies at all. Also prevents odd result when
1874			// calling "get()"
1875			var cookies = document.cookie ? document.cookie.split('; ') : [];
1876			var rdecode = /(%[0-9A-Z]{2})+/g;
1877			var i = 0;
1878
1879			for (; i < cookies.length; i++) {
1880				var parts = cookies[i].split('=');
1881				var cookie = parts.slice(1).join('=');
1882
1883				if (!this.json && cookie.charAt(0) === '"') {
1884					cookie = cookie.slice(1, -1);
1885				}
1886
1887				try {
1888					var name = parts[0].replace(rdecode, decodeURIComponent);
1889					cookie = converter.read ?
1890						converter.read(cookie, name) : converter(cookie, name) ||
1891						cookie.replace(rdecode, decodeURIComponent);
1892
1893					if (this.json) {
1894						try {
1895							cookie = JSON.parse(cookie);
1896						} catch (e) {}
1897					}
1898
1899					if (key === name) {
1900						result = cookie;
1901						break;
1902					}
1903
1904					if (!key) {
1905						result[name] = cookie;
1906					}
1907				} catch (e) {}
1908			}
1909
1910			return result;
1911		}
1912
1913		api.set = api;
1914		api.get = function (key) {
1915			return api.call(api, key);
1916		};
1917		api.getJSON = function () {
1918			return api.apply({
1919				json: true
1920			}, [].slice.call(arguments));
1921		};
1922		api.defaults = {};
1923
1924		api.remove = function (key, attributes) {
1925			api(key, '', extend(attributes, {
1926				expires: -1
1927			}));
1928		};
1929
1930		api.withConverter = init;
1931
1932		return api;
1933	}
1934
1935	return init(function () {});
1936}));
1937/*!
1938 * Vue.js v2.5.16
1939 * (c) 2014-2018 Evan You
1940 * Released under the MIT License.
1941 */
1942!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";var y=Object.freeze({});function M(e){return null==e}function D(e){return null!=e}function S(e){return!0===e}function T(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function P(e){return null!==e&&"object"==typeof e}var r=Object.prototype.toString;function l(e){return"[object Object]"===r.call(e)}function i(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function t(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function F(e){var t=parseFloat(e);return isNaN(t)?e:t}function s(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var c=s("slot,component",!0),u=s("key,ref,slot,slot-scope,is");function f(e,t){if(e.length){var n=e.indexOf(t);if(-1<n)return e.splice(n,1)}}var n=Object.prototype.hasOwnProperty;function p(e,t){return n.call(e,t)}function e(t){var n=Object.create(null);return function(e){return n[e]||(n[e]=t(e))}}var o=/-(\w)/g,g=e(function(e){return e.replace(o,function(e,t){return t?t.toUpperCase():""})}),d=e(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),a=/\B([A-Z])/g,_=e(function(e){return e.replace(a,"-$1").toLowerCase()});var v=Function.prototype.bind?function(e,t){return e.bind(t)}:function(n,r){function e(e){var t=arguments.length;return t?1<t?n.apply(r,arguments):n.call(r,e):n.call(r)}return e._length=n.length,e};function h(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function m(e,t){for(var n in t)e[n]=t[n];return e}function b(e){for(var t={},n=0;n<e.length;n++)e[n]&&m(t,e[n]);return t}function $(e,t,n){}var O=function(e,t,n){return!1},w=function(e){return e};function C(t,n){if(t===n)return!0;var e=P(t),r=P(n);if(!e||!r)return!e&&!r&&String(t)===String(n);try{var i=Array.isArray(t),o=Array.isArray(n);if(i&&o)return t.length===n.length&&t.every(function(e,t){return C(e,n[t])});if(i||o)return!1;var a=Object.keys(t),s=Object.keys(n);return a.length===s.length&&a.every(function(e){return C(t[e],n[e])})}catch(e){return!1}}function x(e,t){for(var n=0;n<e.length;n++)if(C(e[n],t))return n;return-1}function R(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var E="data-server-rendered",k=["component","directive","filter"],A=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],j={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:O,isReservedAttr:O,isUnknownElement:O,getTagNamespace:$,parsePlatformTagName:w,mustUseProp:O,_lifecycleHooks:A};function N(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var L=/[^\w.$]/;var I,H="__proto__"in{},B="undefined"!=typeof window,U="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,V=U&&WXEnvironment.platform.toLowerCase(),z=B&&window.navigator.userAgent.toLowerCase(),K=z&&/msie|trident/.test(z),J=z&&0<z.indexOf("msie 9.0"),q=z&&0<z.indexOf("edge/"),W=(z&&z.indexOf("android"),z&&/iphone|ipad|ipod|ios/.test(z)||"i
1942os"===V),G=(z&&/chrome\/\d+/.test(z),{}.watch),Z=!1;if(B)try{var X={};Object.defineProperty(X,"passive",{get:function(){Z=!0}}),window.addEventListener("test-passive",null,X)}catch(e){}var Y=function(){return void 0===I&&(I=!B&&!U&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),I},Q=B&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ee(e){return"function"==typeof e&&/native code/.test(e.toString())}var te,ne="undefined"!=typeof Symbol&&ee(Symbol)&&"undefined"!=typeof Reflect&&ee(Reflect.ownKeys);te="undefined"!=typeof Set&&ee(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var re=$,ie=0,oe=function(){this.id=ie++,this.subs=[]};oe.prototype.addSub=function(e){this.subs.push(e)},oe.prototype.removeSub=function(e){f(this.subs,e)},oe.prototype.depend=function(){oe.target&&oe.target.addDep(this)},oe.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},oe.target=null;var ae=[];function se(e){oe.target&&ae.push(oe.target),oe.target=e}function ce(){oe.target=ae.pop()}var le=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},ue={child:{configurable:!0}};ue.child.get=function(){return this.componentInstance},Object.defineProperties(le.prototype,ue);var fe=function(e){void 0===e&&(e="");var t=new le;return t.text=e,t.isComment=!0,t};function pe(e){return new le(void 0,void 0,void 0,String(e))}function de(e){var t=new le(e.tag,e.data,e.children,e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.isCloned=!0,t}var ve=Array.prototype,he=Object.create(ve);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(o){var a=ve[o];N(he,o,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=a.apply(this,e),i=this.__ob__;switch(o){case"push":case"unshift":n=e;break;case"splice":n=e.slice(2)}return n&&i.observeArray(n),i.dep.notify(),r})});var me=Object.getOwnPropertyNames(he),ye=!0;function ge(e){ye=e}var _e=function(e){(this.value=e,this.dep=new oe,this.vmCount=0,N(e,"__ob__",this),Array.isArray(e))?((H?be:$e)(e,he,me),this.observeArray(e)):this.walk(e)};function be(e,t,n){e.__proto__=t}function $e(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];N(e,o,t[o])}}function we(e,t){var n;if(P(e)&&!(e instanceof le))return p(e,"__ob__")&&e.__ob__ instanceof _e?n=e.__ob__:ye&&!Y()&&(Array.isArray(e)||l(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new _e(e)),t&&n&&n.vmCount++,n}function Ce(n,e,r,t,i){var o=new oe,a=Object.getOwnPropertyDescriptor(n,e);if(!a||!1!==a.configurable){var s=a&&a.get;s||2!==arguments.length||(r=n[e]);var c=a&&a.set,l=!i&&we(r);Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(n):r;return oe.target&&(o.depend(),l&&(l.dep.depend(),Array.isArray(e)&&function e(t){for(var n=void 0,r=0,i=t.length;r<i;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(e))),e},set:function(e){var t=s?s.call(n):r;e===t||e!=e&&t!=t||(c?c.call(n,e):r=e,l=!i&&we(e),o.notify())}})}}function xe(e,t,n){if(Array.isArray(e)&&i(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(Ce(r.value,t,n),r.dep.notify(),n):e[t]=n}function ke(e,t){if(Array.isArray(e)&&i(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||p(e,t)&&(delete e[t],n&&n.dep.notify())}}_e.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Ce(e,t[n])},_e.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)we(e[t])};var Ae=j.optionMergeStrategies;function Oe(e,t){if(!t)return e;for(var n,r,i,o=Object.keys(t),a=0;a<o.length;a++)r=e[n=o[a]],i=t[n],p(e,n)?l(r)&&l(i)&&Oe(r,i):xe(e,n,i);return e}function Se(n,r,i){return i?function(){var e="function"==typeof r?r.call(i,i):r,t="function"==typeof n?n.call(i,i):n;return e?Oe(e,t):t}:r?n?function(){return Oe("function"==typeof r?r.call(this,this):r,"function"==typeof n?n.call(this,this):n)}:r:n}function Te(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function Ee(e,t,n,r){var i=Object.create(e||null);return t?m(i,t):i}Ae.data=function(e,t,n){return n?Se(e,t,n):t&&"function"!=typeof t?e:Se(e,t)},A.forEach(function(e){Ae[e]=Te}
vendor: 6,957 bytes, line 1942
1942),k.forEach(function(e){Ae[e+"s"]=Ee}),Ae.watch=function(e,t,n,r){if(e===G&&(e=void 0),t===G&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in m(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Ae.props=Ae.methods=Ae.inject=Ae.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return m(i,e),t&&m(i,t),i},Ae.provide=Se;var je=function(e,t){return void 0===t?e:t};function Ne(n,r,i){"function"==typeof r&&(r=r.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[g(i)]={type:null});else if(l(n))for(var a in n)i=n[a],o[g(a)]=l(i)?i:{type:i};e.props=o}}(r),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(l(n))for(var o in n){var a=n[o];r[o]=l(a)?m({from:o},a):{from:a}}}}(r),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(r);var e=r.extends;if(e&&(n=Ne(n,e,i)),r.mixins)for(var t=0,o=r.mixins.length;t<o;t++)n=Ne(n,r.mixins[t],i);var a,s={};for(a in n)c(a);for(a in r)p(n,a)||c(a);function c(e){var t=Ae[e]||je;s[e]=t(n[e],r[e],i,e)}return s}function Le(e,t,n,r){if("string"==typeof n){var i=e[t];if(p(i,n))return i[n];var o=g(n);if(p(i,o))return i[o];var a=d(o);return p(i,a)?i[a]:i[n]||i[o]||i[a]}}function Ie(e,t,n,r){var i=t[e],o=!p(n,e),a=n[e],s=Pe(Boolean,i.type);if(-1<s)if(o&&!p(i,"default"))a=!1;else if(""===a||a===_(e)){var c=Pe(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!p(t,"default"))return;var r=t.default;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Me(t.type)?r.call(e):r}(r,i,e);var l=ye;ge(!0),we(a),ge(l)}return a}function Me(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function De(e,t){return Me(e)===Me(t)}function Pe(e,t){if(!Array.isArray(t))return De(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(De(t[n],e))return n;return-1}function Fe(e,t,n){if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Re(e,r,"errorCaptured hook")}}Re(e,t,n)}function Re(e,t,n){if(j.errorHandler)try{return j.errorHandler.call(null,e,t,n)}catch(e){He(e,null,"config.errorHandler")}He(e,t,n)}function He(e,t,n){if(!B&&!U||"undefined"==typeof console)throw e;console.error(e)}var Be,Ue,Ve=[],ze=!1;function Ke(){ze=!1;for(var e=Ve.slice(0),t=Ve.length=0;t<e.length;t++)e[t]()}var Je=!1;if("undefined"!=typeof setImmediate&&ee(setImmediate))Ue=function(){setImmediate(Ke)};else if("undefined"==typeof MessageChannel||!ee(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())Ue=function(){setTimeout(Ke,0)};else{var qe=new MessageChannel,We=qe.port2;qe.port1.onmessage=Ke,Ue=function(){We.postMessage(1)}}if("undefined"!=typeof Promise&&ee(Promise)){var Ge=Promise.resolve();Be=function(){Ge.then(Ke),W&&setTimeout($)}}else Be=Ue;function Ze(e,t){var n;if(Ve.push(function(){if(e)try{e.call(t)}catch(e){Fe(e,t,"nextTick")}else n&&n(t)}),ze||(ze=!0,Je?Ue():Be()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}var Xe=new te;function Ye(e){!function e(t,n){var r,i;var o=Array.isArray(t);if(!o&&!P(t)||Object.isFrozen(t)||t instanceof le)return;if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(o)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,Xe),Xe.clear()}var Qe,et=e(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function tt(e){function i(){var e=arguments,t=i.fns;if(!Array.isArray(t))return t.apply(null,arguments);for(var n=t.slice(),r=0;r<n.length;r++)n[r].apply(null,e)}return i.fns=e,i}function nt(e,t,n,r,i){var o,a,s,c;for(o in e)a=e[o],s=t[o],c=et(o),M(a)||(M(s)?(M(a.fns)&&(a=e[o]=tt(a)),n(c.name,a,c.once,c.capture,c.passive,c.params)):a!==s&&(s.fns=a,e[o]=s));for(o in t)M(e[o])&&r((c=et(o)).name,t[o],c.capture)}function rt(e,t,n){var r;e instanceof le&&(e=e.data.hook||(e.data.hook={}));var i=e[t];function o(){n.apply(this,arguments),f(r.fns,o)}M(i)?r=tt([o]):D(i.fns)&&S(i.merged)?(r=i).fns.push(o):r=tt([i,o]),r.merged=!0,e[t]=r}function it(e,t,n,r,i){if(D(t)){if(p(t,n))return e[n]=t[n],i||delete t[n],!0;if(p(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function ot(e){return T(e)?[pe(e)]:Array.isArray(e)?function e(t,n){var r=[];var i,o,a,s;for(i=0;i<t.length;i++)M(o=t[i])||"boolean"==typeof o||(a=r.length-1,s=r[a],Array.isArray(o)?0<o.length&&(at((o=e(o,(n||"")+"_"+i))[0])&&at(s)&&(r[a]=pe(s.text+o[0].text),o.shift()),r.push.apply(r,o)):T(o)?at(s)?r[a]=pe(s.text+o):""!==o&&r.push(pe(o)):at(o)&&at(s)?r[a]=pe(s.text+o.text):(S(t._isVList)&&D(o.tag)&&M(o.key)&&D(n)&&(o.key="__vlist"+n+"_"+i+"__"),r.push(o)));return r}(e):void 0}function at(e){return D(e)&&D(e.text)&&!1===e.isComment}function st(e,t){return(e.__esModule||ne&&"Module"===e[Symbol.toStringTag])&&(e=e.default),P(e)?t.extend(e):e}function ct(e){return e.isComment&&e.asyncFactory}function lt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(D(n)&&(D(n.componentOptions)||ct(n)))return n}}function ut(e,t,n){n?Qe.$once(e,t):Qe.$on(e,t)}function ft(e,t){Qe.$off(e,t)}function pt(e,t,n){Qe=e,nt(t,n||{},ut,ft),Qe=void 0}function dt(e,t){var n={};if(!e)return n;for(var r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var l in n)n[l].every(vt)&&delete n[l];return n}function vt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function ht(e,t){t=t||{};for(var n=0;n<e.length;n++)Array.isArray(e[n])?ht(e[n],t):t[e[n].key]=e[n].fn;return t}var mt=null;function yt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function gt(e,t){if(t){if(e._directInactive=!1,yt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)gt(e.$children[n]);_t(e,"activated")}}function _t(t,n){se();var e=t.$options[n];if(e)for(var r=0,i=e.length;r<i;r++)try{e[r].call(t)}catch(e){Fe(e,t,n+" hook")}t._hasHookEvent&&t.$emit("hook:"+n),ce()}var bt=[],$t=[],wt={},Ct=!1,xt=!1,kt=0;function At(){var e,t;for(xt=!0,bt.sort(function(e,t){return e.id-t.id}),kt=0;kt<bt.length;kt++)t=(e=bt[kt]).id,wt[t]=null,e.run();var n=$t.slice(),r=bt.slice();kt=bt.length=$t.length=0,wt={},Ct=xt=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,gt(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&_t(r,"updated")}}
vendor: 1,897 bytes, line 1942
1942(r),Q&&j.devtools&&Q.emit("flush")}var Ot=0,St=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Ot,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new te,this.newDepIds=new te,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!L.test(e)){var n=e.split(".");return function(e){for(var t=0;t<n.length;t++){if(!e)return;e=e[n[t]]}return e}}}(t),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};St.prototype.get=function(){var e;se(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Fe(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&Ye(e),ce(),this.cleanupDeps()}return e},St.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},St.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},St.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==wt[t]){if(wt[t]=!0,xt){for(var n=bt.length-1;kt<n&&bt[n].id>e.id;)n--;bt.splice(n+1,0,e)}else bt.push(e);Ct||(Ct=!0,Ze(At))}}(this)},St.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||P(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Fe(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},St.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1}
vendor: 9,625 bytes, line 1942
1942,St.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},St.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||f(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Tt={enumerable:!0,configurable:!0,get:$,set:$};function Et(e,t,n){Tt.get=function(){return this[t][n]},Tt.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Tt)}function jt(e){e._watchers=[];var t=e.$options;t.props&&function(n,r){var i=n.$options.propsData||{},o=n._props={},a=n.$options._propKeys=[];n.$parent&&ge(!1);var e=function(e){a.push(e);var t=Ie(e,r,i,n);Ce(o,e,t),e in n||Et(n,"_props",e)};for(var t in r)e(t);ge(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?$:v(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;l(t=e._data="function"==typeof t?function(e,t){se();try{return e.call(t,t)}catch(e){return Fe(e,t,"data()"),{}}finally{ce()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&p(r,o)||(void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&Et(e,"_data",o))}var a;we(t,!0)}(e):we(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=Y();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new St(e,a||$,$,Nt)),i in e||Lt(e,i,o)}}(e,t.computed),t.watch&&t.watch!==G&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Mt(e,n,r[i]);else Mt(e,n,r)}}(e,t.watch)}var Nt={lazy:!0};function Lt(e,t,n){var r=!Y();"function"==typeof n?(Tt.get=r?It(t):n,Tt.set=$):(Tt.get=n.get?r&&!1!==n.cache?It(t):n.get:$,Tt.set=n.set?n.set:$),Object.defineProperty(e,t,Tt)}function It(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),oe.target&&e.depend(),e.value}}function Mt(e,t,n,r){return l(n)&&(n=(r=n).handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Dt(t,e){if(t){for(var n=Object.create(null),r=ne?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):Object.keys(t),i=0;i<r.length;i++){for(var o=r[i],a=t[o].from,s=e;s;){if(s._provided&&p(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var c=t[o].default;n[o]="function"==typeof c?c.call(e):c}}return n}}function Pt(e,t){var n,r,i,o,a;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(P(e))for(o=Object.keys(e),n=new Array(o.length),r=0,i=o.length;r<i;r++)a=o[r],n[r]=t(e[a],a,r);return D(n)&&(n._isVList=!0),n}function Ft(e,t,n,r){var i,o=this.$scopedSlots[e];if(o)n=n||{},r&&(n=m(m({},r),n)),i=o(n)||t;else{var a=this.$slots[e];a&&(a._rendered=!0),i=a||t}var s=n&&n.slot;return s?this.$createElement("template",{slot:s},i):i}function Rt(e){return Le(this.$options,"filters",e)||w}function Ht(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Bt(e,t,n,r,i){var o=j.keyCodes[t]||n;return i&&r&&!j.keyCodes[t]?Ht(i,r):o?Ht(o,e):r?_(r)!==t:void 0}function Ut(n,r,i,o,a){if(i)if(P(i)){var s;Array.isArray(i)&&(i=b(i));var e=function(t){if("class"===t||"style"===t||u(t))s=n;else{var e=n.attrs&&n.attrs.type;s=o||j.mustUseProp(r,e,t)?n.domProps||(n.domProps={}):n.attrs||(n.attrs={})}t in s||(s[t]=i[t],a&&((n.on||(n.on={}))["update:"+t]=function(e){i[t]=e}))};for(var t in i)e(t)}else;return n}function Vt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Kt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function zt(e,t,n){return Kt(e,"__once__"+t+(n?"_"+n:""),!0),e}function Kt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Jt(e[r],t+"_"+r,n);else Jt(e,t,n)}function Jt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function qt(e,t){if(t)if(l(t)){var n=e.on=e.on?m({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function Wt(e){e._o=zt,e._n=F,e._s=t,e._l=Pt,e._t=Ft,e._q=C,e._i=x,e._m=Vt,e._f=Rt,e._k=Bt,e._b=Ut,e._v=pe,e._e=fe,e._u=ht,e._g=qt}function Gt(e,t,n,o,r){var a,s=r.options;p(o,"_uid")?(a=Object.create(o))._original=o:o=(a=o)._original;var i=S(s._compiled),c=!i;this.data=e,this.props=t,this.children=n,this.parent=o,this.listeners=e.on||y,this.injections=Dt(s.inject,o),this.slots=function(){return dt(n,o)},i&&(this.$options=s,this.$slots=this.slots(),this.$scopedSlots=e.scopedSlots||y),s._scopeId?this._c=function(e,t,n,r){var i=rn(a,e,t,n,r,c);return i&&!Array.isArray(i)&&(i.fnScopeId=s._scopeId,i.fnContext=o),i}:this._c=function(e,t,n,r){return rn(a,e,t,n,r,c)}}function Zt(e,t,n,r){var i=de(e);return i.fnContext=n,i.fnOptions=r,t.slot&&((i.data||(i.data={})).slot=t.slot),i}function Xt(e,t){for(var n in t)e[g(n)]=t[n]}Wt(Gt.prototype);var Yt={init:function(e,t,n,r){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var i=e;Yt.prepatch(i,i)}else{(e.componentInstance=function(e,t,n,r){var i={_isComponent:!0,parent:t,_parentVnode:e,_parentElm:n||null,_refElm:r||null},o=e.data.inlineTemplate;D(o)&&(i.render=o.render,i.staticRenderFns=o.staticRenderFns);return new e.componentOptions.Ctor(i)}(e,mt,n,r)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,i){var o=!!(i||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==y);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=i,e.$attrs=r.data.attrs||y,e.$listeners=n||y,t&&e.$options.props){ge(!1);for(var a=e._props,s=e.$options._propKeys||[],c=0;c<s.length;c++){var l=s[c],u=e.$options.props;a[l]=Ie(l,u,t,e)}ge(!0),e.$options.propsData=t}n=n||y;var f=e.$options._parentListeners;e.$options._parentListeners=n,pt(e,n,f),o&&(e.$slots=dt(i,r.context),e.$forceUpdate())}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,_t(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,$t.push(t)):gt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(!(n&&(t._directInactive=!0,yt(t))||t._inactive)){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);_t(t,"deactivated")}}(t,!0):t.$destroy())}},Qt=Object.keys(Yt);function en(e,t,n,r,i){if(!M(e)){var o=n.$options._base;if(P(e)&&(e=o.extend(e)),"function"==typeof e){var a,s,c,l,u,f,p;if(M(e.cid)&&void 0===(e=function(t,n,e){if(S(t.error)&&D(t.errorComp))return t.errorComp;if(D(t.resolved))return t.resolved;if(S(t.loading)&&D(t.loadingComp))return t.loadingComp;if(!D(t.contexts)){var r=t.contexts=[e],i=!0,o=function(){for(var e=0,t=r.length;e<t;e++)r[e].$forceUpdate()},a=R(function(e){t.resolved=st(e,n),i||o()}),s=R(function(e){D(t.errorComp)&&(t.error=!0,o())}),c=t(a,s);return P(c)&&("function"==typeof c.then?M(t.resolved)&&c.then(a,s):D(c.component)&&"function"==typeof c.component.then&&(c.component.then(a,s),D(c.error)&&(t.errorComp=st(c.error,n)),D(c.loading)&&(t.loadingComp=st(c.loading,n),0===c.delay?t.loading=!0:setTimeout(function(){M(t.resolved)&&M(t.error)&&(t.loading=!0,o())},c.delay||200)),D(c.timeout)&&setTimeout(function(){M(t.resolved)&&s(null)},c.timeout))),i=!1,t.loading?t.loadingComp:t.resolved}t.contexts.push(e)}(a=e,o,n)))return s=a,c=t,l=n,u=r,f=i,(p=fe()).asyncFactory=s,p.asyncMeta={data:c,context:l,children:u,tag:f},p;t=t||{},dn(e),D(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.props||(t.props={}))[n]=t.model.value;var i=t.on||(t.on={});D(i[r])?i[r]=[t.model.callback].concat(i[r]):i[r]=t.model.callback}(e.options,t);var d=function(e,t,n){var r=t.options.props;if(!M(r)){var i={},o=e.attrs,a=e.props;if(D(o)||D(a))for(var s in r){var c=_(s);it(i,a,s,c,!0)||it(i,o,s,c,!1)}return i}}(t,e);if(S(e.options.functional))return function(e,t,n,r,i){var o=e.options,a={},s=o.props;if(D(s))for(var c in s)a[c]=Ie(c,s,t||y);else D(n.attrs)&&Xt(a,n.attrs),D(n.props)&&Xt(a,n.props);var l=new Gt(n,a,i,r,e),u=o.render.call(null,l._c,l);if(u instanceof le)return Zt(u,n,l.parent,o);if(Array.isArray(u)){for(var f=ot(u)||[],p=new Array(f.length),d=0;d<f.length;d++)p[d]=Zt(f[d],n,l.parent,o);return p}}(e,d,t,n,r);var v=t.on;if(t.on=t.nativeOn,S(e.options.abstract)){var h=t.slot;t={},h&&(t.slot=h)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Qt.length;n++){var r=Qt[n];t[r]=Yt[r]}}(t);var m=e.options.name||i;return new le("vue-component-"+e.cid+(m?"-"+m:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:d,listeners:v,tag:i,children:r},a)}}}var tn=1,nn=2;function rn(e,t,n,r,i,o){return(Array.isArray(n)||T(n))&&(i=r,r=n,n=void 0),S(o)&&(i=nn),function(e,t,n,r,i){if(D(n)&&D(n.__ob__))return fe();D(n)&&D(n.is)&&(t=n.is);if(!t)return fe();Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);i===nn?r=ot(r):i===tn&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var o,a;if("string"==typeof t){var s;a=e.$vnode&&e.$vnode.ns||j.getTagNamespace(t),o=j.isReservedTag(t)?new le(j.parsePlatformTagName(t),n,r,void 0,void 0,e):D(s=Le(e.$options,"components",t))?en(s,n,e,r,t):new le(t,n,r,void 0,void 0,e)}else o=en(t,n,e,r);return Array.isArray(o)?o:D(o)?(D(a)&&function e(t,n,r){t.ns=n;"foreignObject"===t.tag&&(n=void 0,r=!0);if(D(t.children))for(var i=0,o=t.children.length;i<o;i++){var a=t.children[i];
1942D(a.tag)&&(M(a.ns)||S(r)&&"svg"!==a.tag)&&e(a,n,r)}}(o,a),D(n)&&function(e){P(e.style)&&Ye(e.style);P(e.class)&&Ye(e.class)}(n),o):fe()}(e,t,n,r,i)}var on,an,sn,cn,ln,un,fn,pn=0;function dn(e){var t=e.options;if(e.super){var n=dn(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.extendOptions,i=e.sealedOptions;for(var o in n)n[o]!==i[o]&&(t||(t={}),t[o]=vn(n[o],r[o],i[o]));return t}(e);r&&m(e.extendOptions,r),(t=e.options=Ne(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function vn(e,t,n){if(Array.isArray(e)){var r=[];n=Array.isArray(n)?n:[n],t=Array.isArray(t)?t:[t];for(var i=0;i<e.length;i++)(0<=t.indexOf(e[i])||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function hn(e){this._init(e)}function mn(e){e.cid=0;var a=1;e.extend=function(e){e=e||{};var t=this,n=t.cid,r=e._Ctor||(e._Ctor={});if(r[n])return r[n];var i=e.name||t.options.name,o=function(e){this._init(e)};return((o.prototype=Object.create(t.prototype)).constructor=o).cid=a++,o.options=Ne(t.options,e),o.super=t,o.options.props&&function(e){var t=e.options.props;for(var n in t)Et(e.prototype,"_props",n)}(o),o.options.computed&&function(e){var t=e.options.computed;for(var n in t)Lt(e.prototype,n,t[n])}(o),o.extend=t.extend,o.mixin=t.mixin,o.use=t.use,k.forEach(function(e){o[e]=t[e]}),i&&(o.options.components[i]=o),o.superOptions=t.options,o.extendOptions=e,o.sealedOptions=m({},o.options),r[n]=o}}function yn(e){return e&&(e.Ctor.options.name||e.tag)}function gn(e,t){return Array.isArray(e)?-1<e.indexOf(t):"string"==typeof e?-1<e.split(",").indexOf(t):(n=e,"[object RegExp]"===r.call(n)&&e.test(t));var n}function _n(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=yn(a.componentOptions);s&&!t(s)&&bn(n,o,r,i)}}}function bn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,f(n,t)}hn.prototype._init=function(e){var t,n,r,i,o=this;o._uid=pn++,o._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r,n._parentElm=t._parentElm,n._refElm=t._refElm;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(o,e):o.$options=Ne(dn(o.constructor),e||{},o),function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}((o._renderProxy=o)._self=o),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&pt(e,t)}(o),function(i){i._vnode=null,i._staticTrees=null;var e=i.$options,t=i.$vnode=e._parentVnode,n=t&&t.context;i.$slots=dt(e._renderChildren,n),i.$scopedSlots=y,i._c=function(e,t,n,r){return rn(i,e,t,n,r,!1)},i.$createElement=function(e,t,n,r){return rn(i,e,t,n,r,!0)};var r=t&&t.data;Ce(i,"$attrs",r&&r.attrs||y,null,!0),Ce(i,"$listeners",e._parentListeners||y,null,!0)}(o),_t(o,"beforeCreate"),(n=Dt((t=o).$options.inject,t))&&(ge(!1),Object.keys(n).forEach(function(e){Ce(t,e,n[e])}),ge(!0)),jt(o),(i=(r=o).$options.provide)&&(r._provided="function"==typeof i?i.call(r):i),_t(o,"created"),o.$options.el&&o.$mount(o.$options.el)},on=hn,an={get:function(){return this._data}},sn={get:function(){return this._props}},Object.defineProperty(on.prototype,"$data",an),Object.defineProperty(on.prototype,"$props",sn),on.prototype.$set=xe,on.prototype.$delete=ke,on.prototype.$watch=function(e,t,n){if(l(t))return Mt(this,e,t,n);(n=n||{}).user=!0;var r=new St(this,e,t,n);return n.immediate&&t.call(this,r.value),function(){r.teardown()}},ln=/^hook:/,(cn=hn).prototype.$on=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)this.$on(e[n],t);else(this._events[e]||(this._events[e]=[])).push(t),ln.test(e)&&(this._hasHookEvent=!0);return this},cn.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},cn.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)this.$off(e[r],t);return n}var o=n._events[e];if(!o)return n;if(!t)return n._events[e]=null,n;if(t)for(var a,s=o.length;s--;)if((a=o[s])===t||a.fn===t){o.splice(s,1);break}return n},cn.prototype.$emit=function(t){var n=this,e=n._events[t];if(e){e=1<e.length?h(e):e;
vendor: 29,155 bytes, line 1942
1942for(var r=h(arguments,1),i=0,o=e.length;i<o;i++)try{e[i].apply(n,r)}catch(e){Fe(e,n,'event handler for "'+t+'"')}}return n},(un=hn).prototype._update=function(e,t){var n=this;n._isMounted&&_t(n,"beforeUpdate");var r=n.$el,i=n._vnode,o=mt;(mt=n)._vnode=e,i?n.$el=n.__patch__(i,e):(n.$el=n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentElm=n.$options._refElm=null),mt=o,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},un.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},un.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){_t(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||f(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),_t(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}},Wt((fn=hn).prototype),fn.prototype.$nextTick=function(e){return Ze(e,this)},fn.prototype._render=function(){var t,n=this,e=n.$options,r=e.render,i=e._parentVnode;i&&(n.$scopedSlots=i.data.scopedSlots||y),n.$vnode=i;try{t=r.call(n._renderProxy,n.$createElement)}catch(e){Fe(e,n,"render"),t=n._vnode}return t instanceof le||(t=fe()),t.parent=i,t};var $n,wn,Cn,xn=[String,RegExp,Array],kn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:xn,exclude:xn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)bn(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){_n(e,function(e){return gn(t,e)})}),this.$watch("exclude",function(t){_n(e,function(e){return!gn(t,e)})})},render:function(){var e=this.$slots.default,t=lt(e),n=t&&t.componentOptions;if(n){var r=yn(n),i=this.include,o=this.exclude;if(i&&(!r||!gn(i,r))||o&&r&&gn(o,r))return t;var a=this.cache,s=this.keys,c=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[c]?(t.componentInstance=a[c].componentInstance,f(s,c),s.push(c)):(a[c]=t,s.push(c),this.max&&s.length>parseInt(this.max)&&bn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};$n=hn,Cn={get:function(){return j}},Object.defineProperty($n,"config",Cn),$n.util={warn:re,extend:m,mergeOptions:Ne,defineReactive:Ce},$n.set=xe,$n.delete=ke,$n.nextTick=Ze,$n.options=Object.create(null),k.forEach(function(e){$n.options[e+"s"]=Object.create(null)}),m(($n.options._base=$n).options.components,kn),$n.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1<t.indexOf(e))return this;var n=h(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this},$n.mixin=function(e){return this.options=Ne(this.options,e),this},mn($n),wn=$n,k.forEach(function(n){wn[n]=function(e,t){return t?("component"===n&&l(t)&&(t.name=t.name||e,t=this.options._base.extend(t)),"directive"===n&&"function"==typeof t&&(t={bind:t,update:t}),this.options[n+"s"][e]=t):this.options[n+"s"][e]}}),Object.defineProperty(hn.prototype,"$isServer",{get:Y}),Object.defineProperty(hn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(hn,"FunctionalRenderContext",{value:Gt}),hn.version="2.5.16";var An=s("style,class"),On=s("input,textarea,option,select,progress"),Sn=function(e,t,n){return"value"===n&&On(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Tn=s("contenteditable,draggable,spellcheck"),En=s("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),jn="http://www.w3.org/1999/xlink",Nn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Ln=function(e){return Nn(e)?e.slice(6,e.length):""},In=function(e){return null==e||!1===e};function Mn(e){for(var t=e.data,n=e,r=e;D(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Dn(r.data,t));for(;D(n=n.parent);)n&&n.data&&(t=Dn(t,n.data));return function(e,t){if(D(e)||D(t))return Pn(e,Fn(t));return""}(t.staticClass,t.class)}function Dn(e,t){return{staticClass:Pn(e.staticClass,t.staticClass),class:D(e.class)?[e.class,t.class]:t.class}}function Pn(e,t){return e?t?e+" "+t:e:t||""}function Fn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r<i;r++)D(t=Fn(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):P(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Rn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Hn=s("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Bn=s("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Un=function(e){return Hn(e)||Bn(e)};function Vn(e){return Bn(e)?"svg":"math"===e?"math":void 0}var zn=Object.create(null);var Kn=s("text,number,password,search,email,tel,url");function Jn(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}var qn=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(Rn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Wn={create:function(e,t){Gn(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Gn(e,!0),Gn(t))},destroy:function(e){Gn(e,!0)}};function Gn(e,t){var n=e.data.ref;if(D(n)){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?f(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}var Zn=new le("",{},[]),Xn=["create","activate","update","remove","destroy"];function Yn(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&D(e.data)===D(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=D(n=e.data)&&D(n=n.attrs)&&n.type,i=D(n=t.data)&&D(n=n.attrs)&&n.type;return r===i||Kn(r)&&Kn(i)}(e,t)||S(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&M(t.asyncFactory.error))}function Qn(e,t,n){var r,i,o={};for(r=t;r<=n;++r)D(i=e[r].key)&&(o[i]=r);return o}var er={create:tr,update:tr,destroy:function(e){tr(e,Zn)}};function tr(e,t){(e.data.directives||t.data.directives)&&function(t,n){var e,r,i,o=t===Zn,a=n===Zn,s=rr(t.data.directives,t.context),c=rr(n.data.directives,n.context),l=[],u=[];for(e in c)r=s[e],i=c[e],r?(i.oldValue=r.value,ir(i,"update",n,t),i.def&&i.def.componentUpdated&&u.push(i)):(ir(i,"bind",n,t),i.def&&i.def.inserted&&l.push(i));if(l.length){var f=function(){for(var e=0;e<l.length;e++)ir(l[e],"inserted",n,t)};o?rt(n,"insert",f):f()}u.length&&rt(n,"postpatch",function(){for(var e=0;e<u.length;e++)ir(u[e],"componentUpdated",n,t)});if(!o)for(e in s)c[e]||ir(s[e],"unbind",t,t,a)}(e,t)}var nr=Object.create(null);function rr(e,t){var n,r,i,o=Object.create(null);if(!e)return o;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=nr),(o[(i=r,i.rawName||i.name+"."+Object.keys(i.modifiers||{}).join("."))]=r).def=Le(t.$options,"directives",r.name);return o}function ir(t,n,r,e,i){var o=t.def&&t.def[n];if(o)try{o(r.elm,t,r,e,i)}catch(e){Fe(e,r.context,"directive "+t.name+" "+n+" hook")}}var or=[Wn,er];function ar(e,t){var n=t.componentOptions;if(!(D(n)&&!1===n.Ctor.options.inheritAttrs||M(e.data.attrs)&&M(t.data.attrs))){var r,i,o=t.elm,a=e.data.attrs||{},s=t.data.attrs||{};for(r in D(s.__ob__)&&(s=t.data.attrs=m({},s)),s)i=s[r],a[r]!==i&&sr(o,r,i);for(r in(K||q)&&s.value!==a.value&&sr(o,"value",s.value),a)M(s[r])&&(Nn(r)?o.removeAttributeNS(jn,Ln(r)):Tn(r)||o.removeAttribute(r))}}function sr(e,t,n){-1<e.tagName.indexOf("-")?cr(e,t,n):En(t)?In(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Tn(t)?e.setAttribute(t,In(n)||"false"===n?"false":"true"):Nn(t)?In(n)?e.removeAttributeNS(jn,Ln(t)):e.setAttributeNS(jn,t,n):cr(e,t,n)}function cr(t,e,n){if(In(n))t.removeAttribute(e);else{if(K&&!J&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var lr={create:ar,update:ar};function ur(e,t){var n=t.elm,r=t.data,i=e.data;if(!(M(r.staticClass)&&M(r.class)&&(M(i)||M(i.staticClass)&&M(i.class)))){var o=Mn(t),a=n._transitionClasses;D(a)&&(o=Pn(o,Fn(a))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}var fr,pr,dr,vr,hr,mr,yr={create:ur,update:ur},gr=/[\w).+\-_$\]]/;function _r(e){var t,n,r,i,o,a=!1,s=!1,c=!1,l=!1,u=0,f=0,p=0,d=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(c)96===t&&92!==n&&(c=!1);else if(l)47===t&&92!==n&&(l=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||u||f||p){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:p++;break;case 41:p--;break;case 91:f++;break;case 93:f--;break;case 123:u++;break;case 125:u--}if(47===t){for(var v=r-1,h=void 0;0<=v&&" "===(h=e.charAt(v));v--);h&&gr.test(h)||(l=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r<o.length;r++)i=br(i,o[r]);return i}function br(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),i=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==i?","+i:i)}function $r(e){console.error("[Vue compiler]: "+e)}function wr(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function Cr(e,t,n){(e.props||(e.props=[])).push({name:t,value:n}),e.plain=!1}function xr(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n}),e.plain=!1}function kr(e,t,n){e.attrsMap[t]=n,e.attrsList.push({name:t,value:n})}function Ar(e,t,n,r,i,o){var a;(r=r||y).capture&&(delete r.capture,t="!"+t),r.once&&(delete r.once,t="~"+t),r.passive&&(delete r.passive,t="&"+t),"click"===t&&(r.right?(t="contextmenu",delete r.right):r.middle&&(t="mouseup")),r.native?(delete r.native,a=e.nativeEvents||(e.nativeEvents={})):a=e.events||(e.events={});var s={value:n.trim()};r!==y&&(s.modifiers=r);var c=a[t];Array.isArray(c)?i?c.unshift(s):c.push(s):a[t]=c?i?[s,c]:[c,s]:s,e.plain=!1}function Or(e,t,n){var r=Sr(e,":"+t)||Sr(e,"v-bind:"+t);if(null!=r)return _r(r);if(!1!==n){var i=Sr(e,t);if(null!=i)return JSON.stringify(i)}}function Sr(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function Tr(e,t,n){var r=n||{},i=r.number,o="$$v",a=o;r.trim&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=Er(t,a);e.model={value:"("+t+")",expression:'"'+t+'"',callback:"function ($$v) {"+s+"}"}}function Er(e,t){var n=function(e){if(e=e.trim(),fr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<fr-1)return-1<(vr=e.lastIndexOf("."))?{exp:e.slice(0,vr),key:'"'+e.slice(vr+1)+'"'}:{exp:e,key:null};pr=e,vr=hr=mr=0;for(;!Nr();)Lr(dr=jr())?Mr(dr):91===dr&&Ir(dr);return{exp:e.slice(0,hr),key:e.slice(hr+1,mr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function jr(){return pr.charCodeAt(++vr)}function Nr(){return fr<=vr}function Lr(e){return 34===e||39===e}function Ir(e){var t=1;for(hr=vr;!Nr();)if(Lr(e=jr()))Mr(e);else if(91===e&&t++,93===e&&t--,0===t){mr=vr;break}}function Mr(e){for(var t=e;!Nr()&&(e=jr())!==t;);}var Dr,Pr="__r",Fr="__c";function Rr(e,t,n,r,i){var o,a,s,c,l;t=(o=t)._withTask||(o._withTask=function(){Je=!0;var e=o.apply(null,arguments);return Je=!1,e}),n&&(a=t,s=e,c=r,l=Dr,t=function e(){null!==a.apply(null,arguments)&&Hr(s,e,c,l)}),Dr.addEventListener(e,t,Z?{capture:r,passive:i}:r)}function Hr(e,t,n,r){(r||Dr).removeEventListener(e,t._withTask||t,n)}function Br(e,t){if(!M(e.data.on)||!M(t.data.on)){var n=t.data.on||{},r=e.data.on||{};Dr=t.elm,function(e){if(D(e[Pr])){var t=K?"change":"input";e[t]=[].concat(e[Pr],e[t]||[]),delete e[Pr]}D(e[Fr])&&(e.change=[].concat(e[Fr],e.change||[]),delete e[Fr])}(n),nt(n,r,Rr,Hr,t.context),Dr=void 0}}var Ur={create:Br,update:Br};function Vr(e,t){if(!M(e.data.domProps)||!M(t.data.domProps)){var n,r,i,o,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in D(c.__ob__)&&(c=t.data.domProps=m({},c)),s)M(c[n])&&(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){var l=M(a._value=r)?"":String(r);o=l,(i=a).composing||"OPTION"!==i.tagName&&!function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(i,o)&&!function(e,t){var n=e.value,r=e._vModifiers;if(D(r)){if(r.lazy)return!1;if(r.number)return F(n)!==F(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(i,o)||(a.value=l)}else a[n]=r}}}var zr={create:Vr,update:Vr},Kr=e(function(e){var n={},r=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var t=e.split(r);1<t.length&&(n[t[0].trim()]=t[1].trim())}}),n});function Jr(e){var t=qr(e.style);return e.staticStyle?m(e.staticStyle,t):t}function qr(e){return Array.isArray(e)?b(e):"string"==typeof e?Kr(e):e}var Wr,Gr=/^--/,Zr=/\s*!important$/,Xr=function(e,t,n){if(Gr.test(t))e.style.setProperty(t,n);else if(Zr.test(n))e.style.setProperty(t,n.replace(Zr,""),"important");else{var r=Qr(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},Yr=["Webkit","Moz","ms"],Qr=e(function(e){if(Wr=Wr||document.createElement("div").style,"filter"!==(e=g(e))&&e in Wr)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Yr.length;n++){var r=Yr[n]+t;if(r in Wr)return r}});function ei(e,t){var n=t.data,r=e.data;if(!(M(n.staticStyle)&&M(n.style)&&M(r.staticStyle)&&M(r.style))){var i,o,a=t.elm,s=r.staticStyle,c=r.normalizedStyle||r.style||{},l=s||c,u=qr(t.data.style)||{};t.data.normalizedStyle=D(u.__ob__)?m({},u):u;var f=function(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=Jr(i.data))&&m(r,n);(n=Jr(e.data))&&m(r,n);for(var o=e;o=o.parent;)o.data&&(n=Jr(o.data))&&m(r,n);return r}(t,!0);for(o in l)M(f[o])&&Xr(a,o,"");for(o in f)(i=f[o])!==l[o]&&Xr(a,o,null==i?"":i)}}var ti={create:ei,update:ei};function ni(t,e){if(e&&(e=e.trim()))if(t.classList)-1<e.indexOf(" ")?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ri(t,e){if(e&&(e=e.trim()))if(t.classList)-1<e.indexOf(" ")?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";0<=n.indexOf(r);)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function ii(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&m(t,oi(e.name||"v")),m(t,e),t}return"string"==typeof e?oi(e):void 0}}var oi=e(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),ai=B&&!J,si="transition",ci="animation",li="transition",ui="transitionend",fi="animation",pi="animationend";ai&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(li="WebkitTransition",ui="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(fi="WebkitAnimation",pi="webkitAnimationEnd"));var di=B?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function vi(e){di(function(){di(e)})}function hi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),ni(e,t))}function mi(e,t){e._transitionClasses&&f(e._transitionClasses,t),ri(e,t)}function yi(t,e,n){var r=_i(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===si?ui:pi,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=a&&l()};setTimeout(function(){c<a&&l()},o+1),t.addEventListener(s,u)}var gi=/\b(transform|all)(,|$)/;function _i(e,t){var n,r=window.getComputedStyle(e),i=r[li+"Delay"].split(", "),o=r[li+"Duration"].split(", "),a=bi(i,o),s=r[fi+"Delay"].split(", "),c=r[fi+"Duration"].split(", "),l=bi(s,c),u=0,f=0;return t===si?0<a&&(n=si,u=a,f=o.length):t===ci?0<l&&(n=ci,u=l,f=c.length):f=(n=0<(u=Math.max(a,l))?l<a?si:ci:null)?n===si?o.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:n===si&&gi.test(r[li+"Property"])}}function bi(n,e){for(;n.length<e.length;)n=n.concat(n);return Math.max.apply(null,e.map(function(e,t){return $i(e)+$i(n[t])}))}function $i(e){return 1e3*Number(e.slice(0,-1))}function wi(n,e){var r=n.elm;D(r._leaveCb)&&(r._leaveCb.cancelled=!0,r._leaveCb());var t=ii(n.data.transition);if(!M(t)&&!D(r._enterCb)&&1===r.nodeType){for(var i=t.css,o=t.type,a=t.enterClass,s=t.enterToClass,c=t.enterActiveClass,l=t.appearClass,u=t.appearToClass,f=t.appearActiveClass,p=t.beforeEnter,d=t.enter,v=t.afterEnter,h=t.enterCancelled,m=t.beforeAppear,y=t.appear,g=t.afterAppear,_=t.appearCancelled,b=t.duration,$=mt,w=mt.$vnode;w&&w.parent;)$=(w=w.parent).context;var C=!$._isMounted||!n.isRootInsert;if(!C||y||""===y){var x=C&&l?l:a,k=C&&f?f:c,A=C&&u?u:s,O=C&&m||p,S=C&&"function"==typeof y?y:d,T=C&&g||v,E=C&&_||h,j=F(P(b)?b.enter:b),N=!1!==i&&!J,L=ki(S),I=r._enterCb=R(function(){N&&(mi(r,A),mi(r,k)),I.cancelled?(N&&mi(r,x),E&&E(r)):T&&T(r),r._enterCb=null});n.data.show||rt(n,"insert",function(){var e=r.parentNode,t=e&&e._pending&&e._pending[n.key];t&&t.tag===n.tag&&t.elm._leaveCb&&t.elm._leaveCb(),S&&S(r,I)}),O&&O(r),N&&(hi(r,x),hi(r,k),vi(function(){mi(r,x),I.cancelled||(hi(r,A),L||(xi(j)?setTimeout(I,j):yi(r,o,I)))})),n.data.show&&(e&&e(),S&&S(r,I)),N||L||I()}}}function Ci(e,t){var n=e.elm;D(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=ii(e.data.transition);if(M(r)||1!==n.nodeType)return t();if(!D(n._leaveCb)){var i=r.css,o=r.type,a=r.leaveClass,s=r.leaveToClass,c=r.leaveActiveClass,l=r.beforeLeave,u=r.leave,f=r.afterLeave,p=r.leaveCancelled,d=r.delayLeave,v=r.duration,h=!1!==i&&!J,m=ki(u),y=F(P(v)?v.leave:v),g=n._leaveCb=R(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),h&&(mi(n,s),mi(n,c)),g.cancelled?(h&&mi(n,a),p&&p(n)):(t(),f&&f(n)),n._leaveCb=null});d?d(_):_()}function _(){g.cancelled||(e.data.show||((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),l&&l(n),h&&(hi(n,a),hi(n,c),vi(function(){mi(n,a),g.cancelled||(hi(n,s),m||(xi(y)?setTimeout(g,y):yi(n,o,g)))})),u&&u(n,g),h||m||g())}}function xi(e){return"number"==typeof e&&!isNaN(e)}function ki(e){if(M(e))return!1;var t=e.fns;return D(t)?ki(Array.isArray(t)?t[0]:t):1<(e._length||e.length)}function Ai(e,t){!0!==t.data.show&&wi(t)}var Oi=function(e){var r,t,g={},n=e.modules,_=e.nodeOps;for(r=0;r<Xn.length;++r)for(g[Xn[r]]=[],t=0;t<n.length;++t)D(n[t][Xn[r]])&&g[Xn[r]].push(n[t][Xn[r]]);function o(e){var t=_.parentNode(e);D(t)&&_.removeChild(t,e)}function b(e,t,n,r,i,o,a){if(D(e.elm)&&D(o)&&(e=o[a]=de(e)),e.isRootInsert=!i,!function(e,t,n,r){var i=e.data;if(D(i)){var o=D(e.componentInstance)&&i.keepAlive;if(D(i=i.hook)&&D(i=i.init)&&i(e,!1,n,r),D(e.componentInstance))return d(e,t),S(o)&&function(e,t,n,r){for(var i,o=e;o.componentInstance;)if(o=o.componentInstance._vnode,D(i=o.data)&&D(i=i.transition)){for(i=0;i<g.activate.length;++i)g.activate[i](Zn,o);t.push(o);break}u(n,e.elm,r)}(e,t,n,r),!0}}(e,t,n,r)){var s=e.data,c=e.children,l=e.tag;D(l)?(e.elm=e.ns?_.createElementNS(e.ns,l):_.createElement(l,e),f(e),v(e,c,t),D(s)&&h(e,t)):S(e.isComment)?e.elm=_.createComment(e.text):e.elm=_.createTextNode(e.text),u(n,e.elm,r)}}function d(e,t){D(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,$(e)?(h(e,t),f(e)):(Gn(e),t.push(e))}function u(e,t,n){D(e)&&(D(n)?n.parentNode===e&&_.insertBefore(e,t,n):_.appendChild(e,t))}function v(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)b(t[r],n,e.elm,null,!0,t,r);else T(e.text)&&_.appendChild(e.elm,_.createTextNode(String(e.text)))}function $(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return D(e.tag)}function h(e,t){for(var n=0;n<g.create.length;++n)g.create[n](Zn,e);D(r=e.data.hook)&&(D(r.create)&&r.create(Zn,e),D(r.insert)&&t.push(e))}function f(e){var t;if(D(t=e.fnScopeId))_.setStyleScope(e.elm,t);else for(var n=e;n;)D(t=n.context)&&D(t=t.$options._scopeId)&&_.setStyleScope(e.elm,t),n=n.parent;D(t=mt)&&t!==e.context&&t!==e.fnContext&&D(t=t.$options._scopeId)&&_.setStyleScope(e.elm,t)}function y(e,t,n,r,i,o){for(;r<=i;++r)b(n[r],o,e,t,!1,n,r)}function w(e){var t,n,r=e.data;if(D(r))for(D(t=r.hook)&&D(t=t.destroy)&&t(e),t=0;t<g.destroy.length;++t)g.destroy[t](e);if(D(t=e.children))for(n=0;n<e.children.length;++n)w(e.children[n])}function C(e,t,n,r){for(;n<=r;++n){var i=t[n];D(i)&&(D(i.tag)?(a(i),w(i)):o(i.elm))}}function a(e,t){if(D(t)||D(e.data)){var n,r=g.remove.length+1;for(D(t)?t.listeners+=r:t=function(e,t){function n(){0==--n.listeners&&o(e)}return n.listeners=t,n}(e.elm,r),D(n=e.componentInstance)&&D(n=n._vnode)&&D(n.data)&&a(n,t),n=0;n<g.remove.length;++n)g.remove[n](e,t);D(n=e.data.hook)&&D(n=n.remove)?n(e,t):t()}else o(e.elm)}function x(e,t,n,r){for(var i=n;i<r;i++){var o=t[i];if(D(o)&&Yn(e,o))return i}}function k(e,t,n,r){if(e!==t){var i=t.elm=e.elm;if(S(e.isAsyncPlaceholder))D(t.asyncFactory.resolved)?O(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(S(t.isStatic)&&S(e.isStatic)&&t.key===e.key&&(S(t.isCloned)||S(t.isOnce)))t.componentInstance=e.componentInstance;else{var o,a=t.data;D(a)&&D(o=a.hook)&&D(o=o.prepatch)&&o(e,t);var s=e.children,c=t.children;if(D(a)&&$(t)){for(o=0;o<g.update.length;++o)g.update[o](e,t);D(o=a.hook)&&D(o=o.update)&&o(e,t)}M(t.text)?D(s)&&D(c)?s!==c&&function(e,t,n,r,i){for(var o,a,s,c=0,l=0,u=t.length-1,f=t[0],p=t[u],d=n.length-1,v=n[0],h=n[d],m=!i;c<=u&&l<=d;)M(f)?f=t[++c]:M(p)?p=t[--u]:Yn(f,v)?(k(f,v,r),f=t[++c],v=n[++l]):Yn(p,h)?(k(p,h,r),p=t[--u],h=n[--d]):Yn(f,h)?(k(f,h,r),m&&_.insertBefore(e,f.elm,_.nextSibling(p.elm)),f=t[++c],h=n[--d]):(Yn(p,v)?(k(p,v,r),m&&_.insertBefore(e,p.elm,f.elm),p=t[--u]):(M(o)&&(o=Qn(t,c,u)),M(a=D(v.key)?o[v.key]:x(v,t,c,u))?b(v,r,e,f.elm,!1,n,l):Yn(s=t[a],v)?(k(s,v,r),t[a]=void 0,m&&_.insertBefore(e,s.elm,f.elm)):b(v,r,e,f.elm,!1,n,l)),v=n[++l]);u<c?y(e,M(n[d+1])?null:n[d+1].elm,n,l,d,r):d<l&&C(0,t,c,u)}(i,s,c,n,r):D(c)?(D(e.text)&&_.setTextContent(i,""),y(i,null,c,0,c.length-1,n)):D(s)?C(0,s,0,s.length-1):D(e.text)&&_.setTextContent(i,""):e.text!==t.text&&_.setTextContent(i,t.text),D(a)&&D(o=a.hook)&&D(o=o.postpatch)&&o(e,t)}}}function A(e,t,n){if(S(n)&&D(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var m=s("attrs,class,staticClass,staticStyle,key");function O(e,t,n,r){var i,o=t.tag,a=t.data,s=t.children;if(r=r||a&&a.pre,t.elm=e,S(t.isComment)&&D(t.asyncFactory))return t.isAsyncPlaceholder=!0;if(D(a)&&(D(i=a.hook)&&D(i=i.init)&&i(t,!0),D(i=t.componentInstance)))return d(t,n),!0;if(D(o)){if(D(s))if(e.hasChildNodes())if(D(i=a)&&D(i=i.domProps)&&D(i=i.innerHTML)){if(i!==e.innerHTML)return!1}else{for(var c=!0,l=e.firstChild,u=0;u<s.length;u++){if(!l||!O(l,s[u],n,r)){c=!1;break}l=l.nextSibling}if(!c||l)return!1}else v(t,s,n);if(D(a)){var f=!1;for(var p in a)if(!m(p)){f=!0,h(t,n);break}!f&&a.class&&Ye(a.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,r,i,o){if(!M(t)){var a,s=!1,c=[];if(M(e))s=!0,b(t,c,i,o);else{var l=D(e.nodeType);if(!l&&Yn(e,t))k(e,t,c,r);else{if(l){if(1===e.nodeType&&e.hasAttribute(E)&&(e.removeAttribute(E),n=!0),S(n)&&O(e,t,c))return A(t,c,!0),e;a=e,e=new le(_.tagName(a).toLowerCase(),{},[],void 0,a)}var u=e.elm,f=_.parentNode(u);if(b(t,c,u._leaveCb?null:f,_.nextSibling(u)),D(t.parent))for(var p=t.parent,d=$(t);p;){for(var v=0;v<g.destroy.length;++v)g.destroy[v](p);if(p.elm=t.elm,d){for(var h=0;h<g.create.length;++h)g.create[h](Zn,p);var m=p.data.hook.insert;if(m.merged)for(var y=1;y<m.fns.length;y++)m.fns[y]()}else Gn(p);p=p.parent}D(f)?C(0,[e],0,0):D(e.tag)&&w(e)}}return A(t,c,s),t.elm}D(e)&&w(e)}}({nodeOps:qn,modules:[lr,yr,Ur,zr,ti,B?{create:Ai,activate:Ai,remove:function(e,t){!0!==e.data.show?Ci(e,t):t()}}:{}].concat(or)});J&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Mi(e,"input")});var Si={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?rt(n,"postpatch",function(){Si.componentUpdated(e,t,n)}):Ti(e,t,n.context),e._vOptions=[].map.call(e.options,Ni)):("textarea"===n.tag||Kn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Li),e.addEventListener("compositionend",Ii),e.addEventListener("change",Ii),J&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Ti(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,Ni);if(i.some(function(e,t){return!C(e,r[t])}))(e.multiple?t.value.some(function(e){return ji(e,i)}):t.value!==t.oldValue&&ji(t.value,i))&&Mi(e,"change")}}};function Ti(e,t,n){Ei(e,t,n),(K||q)&&setTimeout(function(){Ei(e,t,n)},0)}function Ei(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=-1<x(r,Ni(a)),a.selected!==o&&(a.selected=o);else if(C(Ni(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function ji(t,e){return e.every(function(e){return!C(e,t)})}function Ni(e){return"_value"in e?e._value:e.value}function Li(e){e.target.composing=!0}function Ii(e){e.target.composing&&(e.target.composing=!1,Mi(e.target,"input"))}function Mi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Di(e){return!e.componentInstance||e.data&&e.data.transition?e:Di(e.componentInstance._vnode)}var Pi={model:Si,show:{bind:function(e,t,n){var r=t.value,i=(n=Di(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,wi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Di(n)).data&&n.data.transition?(n.data.show=!0,r?wi(n,function(){e.style.display=e.__vOriginalDisplay}):Ci(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},Fi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ri(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Ri(lt(t.children)):e}function Hi(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[g(o)]=i[o];return t}function Bi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Ui={name:"transition",props:Fi,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag||ct(e)})).length){var r=this.mode,i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=Ri(i);if(!o)return i;if(this._leaving)return Bi(e,i);var a="__transition-"+this._uid+"-";
1942o.key=null==o.key?o.isComment?a+"comment":a+o.tag:T(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var s,c,l=(o.data||(o.data={})).transition=Hi(this),u=this._vnode,f=Ri(u);if(o.data.directives&&o.data.directives.some(function(e){return"show"===e.name})&&(o.data.show=!0),f&&f.data&&(s=o,(c=f).key!==s.key||c.tag!==s.tag)&&!ct(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var p=f.data.transition=m({},l);if("out-in"===r)return this._leaving=!0,rt(p,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),Bi(e,i);if("in-out"===r){if(ct(o))return u;var d,v=function(){d()};rt(l,"afterEnter",v),rt(l,"enterCancelled",v),rt(p,"delayLeave",function(e){d=e})}}return i}}},Vi=m({tag:String,moveClass:String},Fi);function zi(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Ki(e){e.data.newPos=e.elm.getBoundingClientRect()}function Ji(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete Vi.mode;var qi={Transition:Ui,TransitionGroup:{props:Vi,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Hi(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),((n[c.key]=c).data||(c.data={})).transition=a)}if(r){for(var l=[],u=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?l.push(p):u.push(p)}this.kept=e(t,null,l),this.removed=u}return e(t,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var e=this.prevChildren,r=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,r)&&(e.forEach(zi),e.forEach(Ki),e.forEach(Ji),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var n=e.elm,t=n.style;hi(n,r),t.transform=t.WebkitTransform=t.transitionDuration="",n.addEventListener(ui,n._moveCb=function e(t){t&&!/transform$/.test(t.propertyName)||(n.removeEventListener(ui,e),n._moveCb=null,mi(n,r))})}}))},methods:{hasMove:function(e,t){if(!ai)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){ri(n,e)}),ni(n,t),n.style.display="none",this.$el.appendChild(n);var r=_i(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};hn.config.mustUseProp=Sn,hn.config.isReservedTag=Un,hn.config.isReservedAttr=An,hn.config.getTagNamespace=Vn,hn.config.isUnknownElement=function(e){if(!B)return!0;if(Un(e))return!1;if(e=e.toLowerCase(),null!=zn[e])return zn[e];var t=document.createElement(e);return-1<e.indexOf("-")?zn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:zn[e]=/HTMLUnknownElement/.test(t.toString())},m(hn.options.directives,Pi),m(hn.options.components,qi),hn.prototype.__patch__=B?Oi:$,hn.prototype.$mount=function(e,t){return e=e&&B?Jn(e):void 0,r=e,i=t,(n=this).$el=r,n.$options.render||(n.$options.render=fe),_t(n,"beforeMount"),new St(n,function(){n._update(n._render(),i)},$,null,!0),i=!1,null==n.$vnode&&(n._isMounted=!0,_t(n,"mounted")),n;var n,r,i},B&&setTimeout(function(){j.devtools&&Q&&Q.emit("init",hn)},0);var Wi=/\{\{((?:.|\n)+?)\}\}/g,Gi=/[-.*+?^${}()|[\]\/\\]/g,Zi=e(function(e){var t=e[0].replace(Gi,"\\$&"),n=e[1].replace(Gi,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var Xi={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Sr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Or(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var Yi,Qi={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Sr(e,"style");n&&(e.staticStyle=JSON.stringify(Kr(n)));var r=Or(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},eo=function(e){return(Yi=Yi||document.createElement("div")).innerHTML=e,Yi.textContent},to=s("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),no=s("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ro=s("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),io=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,oo="[a-zA-Z_][\\w\\-\\.]*",ao="((?:"+oo+"\\:)?"+oo+")",so=new RegExp("^<"+ao),co=/^\s*(\/?)>/,lo=new RegExp("^<\\/"+ao+"[^>]*>"),uo=/^<!DOCTYPE [^>]+>/i,fo=/^<!\--/,po=/^<!\[/,vo=!1;"x".replace(/x(.)?/g,function(e,t){vo=""===t});var ho=s("script,style,textarea",!0),mo={},yo={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t"},go=/&(?:lt|gt|quot|amp);/g,_o=/&(?:lt|gt|quot|amp|#10|#9);/g,bo=s("pre,textarea",!0),$o=function(e,t){return e&&bo(e)&&"\n"===t[0]};var wo,Co,xo,ko,Ao,Oo,So,To,Eo=/^@|^v-on:/,jo=/^v-|^@|^:/,No=/([^]*?)\s+(?:in|of)\s+([^]*)/,Lo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Io=/^\(|\)$/g,Mo=/:(.*)$/,Do=/^:|^v-bind:/,Po=/\.[^.]+/g,Fo=e(eo);
vendor: 19,029 bytes, line 1942
1942function Ro(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}(t),parent:n,children:[]}}function Ho(e,p){wo=p.warn||$r,Oo=p.isPreTag||O,So=p.mustUseProp||O,To=p.getTagNamespace||O,xo=wr(p.modules,"transformNode"),ko=wr(p.modules,"preTransformNode"),Ao=wr(p.modules,"postTransformNode"),Co=p.delimiters;var d,v,h=[],i=!1!==p.preserveWhitespace,m=!1,y=!1;function g(e){e.pre&&(m=!1),Oo(e.tag)&&(y=!1);for(var t=0;t<Ao.length;t++)Ao[t](e,p)}return function(i,d){for(var e,v,h=[],m=d.expectHTML,y=d.isUnaryTag||O,g=d.canBeLeftOpenTag||O,a=0;i;){if(e=i,v&&ho(v)){var r=0,o=v.toLowerCase(),t=mo[o]||(mo[o]=new RegExp("([\\s\\S]*?)(</"+o+"[^>]*>)","i")),n=i.replace(t,function(e,t,n){return r=n.length,ho(o)||"noscript"===o||(t=t.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),$o(o,t)&&(t=t.slice(1)),d.chars&&d.chars(t),""});a+=i.length-n.length,i=n,A(o,a-r,a)}else{var s=i.indexOf("<");if(0===s){if(fo.test(i)){var c=i.indexOf("--\x3e");if(0<=c){d.shouldKeepComment&&d.comment(i.substring(4,c)),C(c+3);continue}}if(po.test(i)){var l=i.indexOf("]>");if(0<=l){C(l+2);continue}}var u=i.match(uo);if(u){C(u[0].length);continue}var f=i.match(lo);if(f){var p=a;C(f[0].length),A(f[1],p,a);continue}var _=x();if(_){k(_),$o(v,i)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(0<=s){for($=i.slice(s);!(lo.test($)||so.test($)||fo.test($)||po.test($)||(w=$.indexOf("<",1))<0);)s+=w,$=i.slice(s);b=i.substring(0,s),C(s)}s<0&&(b=i,i=""),d.chars&&b&&d.chars(b)}if(i===e){d.chars&&d.chars(i);break}}function C(e){a+=e,i=i.substring(e)}function x(){var e=i.match(so);if(e){var t,n,r={tagName:e[1],attrs:[],start:a};for(C(e[0].length);!(t=i.match(co))&&(n=i.match(io));)C(n[0].length),r.attrs.push(n);if(t)return r.unarySlash=t[1],C(t[0].length),r.end=a,r}}function k(e){var t=e.tagName,n=e.unarySlash;m&&("p"===v&&ro(t)&&A(v),g(t)&&v===t&&A(t));for(var r,i,o,a=y(t)||!!n,s=e.attrs.length,c=new Array(s),l=0;l<s;l++){var u=e.attrs[l];vo&&-1===u[0].indexOf('""')&&(""===u[3]&&delete u[3],""===u[4]&&delete u[4],""===u[5]&&delete u[5]);var f=u[3]||u[4]||u[5]||"",p="a"===t&&"href"===u[1]?d.shouldDecodeNewlinesForHref:d.shouldDecodeNewlines;c[l]={name:u[1],value:(r=f,i=p,o=i?_o:go,r.replace(o,function(e){return yo[e]}))}}a||(h.push({tag:t,lowerCasedTag:t.toLowerCase(),attrs:c}),v=t),d.start&&d.start(t,c,a,e.start,e.end)}function A(e,t,n){var r,i;if(null==t&&(t=a),null==n&&(n=a),e&&(i=e.toLowerCase()),e)for(r=h.length-1;0<=r&&h[r].lowerCasedTag!==i;r--);else r=0;if(0<=r){for(var o=h.length-1;r<=o;o--)d.end&&d.end(h[o].tag,t,n);h.length=r,v=r&&h[r-1].tag}else"br"===i?d.start&&d.start(e,[],!0,t,n):"p"===i&&(d.start&&d.start(e,[],!1,t,n),d.end&&d.end(e,t,n))}A()}(e,{warn:wo,expectHTML:p.expectHTML,isUnaryTag:p.isUnaryTag,canBeLeftOpenTag:p.canBeLeftOpenTag,shouldDecodeNewlines:p.shouldDecodeNewlines,shouldDecodeNewlinesForHref:p.shouldDecodeNewlinesForHref,shouldKeepComment:p.comments,start:function(e,t,n){var r=v&&v.ns||To(e);K&&"svg"===r&&(t=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Ko.test(r.name)||(r.name=r.name.replace(Jo,""),t.push(r))}return t}(t));var i,o,a,s,c,l=Ro(e,t,v);r&&(l.ns=r),"style"!==(i=l).tag&&("script"!==i.tag||i.attrsMap.type&&"text/javascript"!==i.attrsMap.type)||Y()||(l.forbidden=!0);for(var u=0;u<ko.length;u++)l=ko[u](l,p)||l;if(m||(null!=Sr(o=l,"v-pre")&&(o.pre=!0),l.pre&&(m=!0)),Oo(l.tag)&&(y=!0),m?function(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}(l):l.processed||(Uo(l),function(e){var t=Sr(e,"v-if");if(t)e.if=t,Vo(e,{exp:t,block:e});else{null!=Sr(e,"v-else")&&(e.else=!0);var n=Sr(e,"v-else-if");n&&(e.elseif=n)}}(l),null!=Sr(a=l,"v-once")&&(a.once=!0),Bo(l,p)),d?h.length||d.if&&(l.elseif||l.else)&&Vo(d,{exp:l.elseif,block:l}):d=l,v&&!l.forbidden)if(l.elseif||l.else)s=l,(c=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(v.children))&&c.if&&Vo(c,{exp:s.elseif,block:s});else if(l.slotScope){v.plain=!1;var f=l.slotTarget||'"default"';(v.scopedSlots||(v.scopedSlots={}))[f]=l}else v.children.push(l),l.parent=v;n?g(l):(v=l,h.push(l))},end:function(){var e=h[h.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!y&&e.children.pop(),h.length-=1,v=h[h.length-1],g(e)},chars:function(e){if(v&&(!K||"textarea"!==v.tag||v.attrsMap.placeholder!==e)){var t,n,r=v.children;if(e=y||e.trim()?"script"===(t=v).tag||"style"===t.tag?e:Fo(e):i&&r.length?" ":"")!m&&" "!==e&&(n=function(e,t){var n=t?Zi(t):Wi;if(n.test(e)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){c<(i=r.index)&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var l=_r(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),c=i+r[0].length}return c<e.length&&(s.push(o=e.slice(c)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(e,Co))?r.push({type:2,expression:n.expression,tokens:n.tokens,text:e}):" "===e&&r.length&&" "===r[r.length-1].text||r.push({type:3,text:e})}},comment:function(e){v.children.push({type:3,text:e,isComment:!0})}}),d}function Bo(e,t){var n,r,i,o;(r=Or(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.attrsList.length,(o=Or(i=e,"ref"))&&(i.ref=o,i.refInFor=function(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(i)),function(e){if("slot"===e.tag)e.slotName=Or(e,"name");else{var t;"template"===e.tag?(t=Sr(e,"scope"),e.slotScope=t||Sr(e,"slot-scope")):(t=Sr(e,"slot-scope"))&&(e.slotScope=t);var n=Or(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,"template"===e.tag||e.slotScope||xr(e,"slot",n))}}(e),function(e){var t;(t=Or(e,"is"))&&(e.component=t);null!=Sr(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var a=0;a<xo.length;a++)e=xo[a](e,t)||e;!function(e){var t,n,r,i,o,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=i=c[t].name,o=c[t].value,jo.test(r))if(e.hasBindings=!0,(a=zo(r))&&(r=r.replace(Po,"")),Do.test(r))r=r.replace(Do,""),o=_r(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=g(r))&&(r="innerHTML")),a.camel&&(r=g(r)),a.sync&&Ar(e,"update:"+g(r),Er(o,"$event"))),s||!e.component&&So(e.tag,e.attrsMap.type,r)?Cr(e,r,o):xr(e,r,o);else if(Eo.test(r))r=r.replace(Eo,""),Ar(e,r,o,a,!1);else{var l=(r=r.replace(jo,"")).match(Mo),u=l&&l[1];u&&(r=r.slice(0,-(u.length+1))),p=r,d=i,v=o,h=u,m=a,((f=e).directives||(f.directives=[])).push({name:p,rawName:d,value:v,arg:h,modifiers:m}),f.plain=!1}else xr(e,r,JSON.stringify(o)),!e.component&&"muted"===r&&So(e.tag,e.attrsMap.type,r)&&Cr(e,r,"true");var f,p,d,v,h,m}(e)}function Uo(e){var t;if(t=Sr(e,"v-for")){var n=function(e){var t=e.match(No);if(!t)return;var n={};n.for=t[2].trim();var r=t[1].trim().replace(Io,""),i=r.match(Lo);i?(n.alias=r.replace(Lo,""),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(t);n&&m(e,n)}}function Vo(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function zo(e){var t=e.match(Po);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}var Ko=/^xmlns:NS\d+/,Jo=/^NS\d+:/;function qo(e){return Ro(e.tag,e.attrsList.slice(),e.parent)}var Wo=[Xi,Qi,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Or(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Sr(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Sr(e,"v-else",!0),s=Sr(e,"v-else-if",!0),c=qo(e);Uo(c),kr(c,"type","checkbox"),Bo(c,t),c.processed=!0,c.if="("+n+")==='checkbox'"+o,Vo(c,{exp:c.if,block:c});var l=qo(e);Sr(l,"v-for",!0),kr(l,"type","radio"),Bo(l,t),Vo(c,{exp:"("+n+")==='radio'"+o,block:l});var u=qo(e);return Sr(u,"v-for",!0),kr(u,":type",n),Bo(u,t),Vo(c,{exp:i,block:u}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Go,Zo,Xo,Yo={expectHTML:!0,modules:Wo,directives:{model:function(e,t,n){var r,i,o,a,s,c,l,u,f,p,d,v,h,m,y,g,_=t.value,b=t.modifiers,$=e.tag,w=e.attrsMap.type;if(e.component)return Tr(e,_,b),!1;if("select"===$)h=e,m=_,g=(g='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+((y=b)&&y.number?"_n(val)":"val")+"});")+" "+Er(m,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Ar(h,"change",g,null,!0);else if("input"===$&&"checkbox"===w)c=e,l=_,f=(u=b)&&u.number,p=Or(c,"value")||"null",d=Or(c,"true-value")||"true",v=Or(c,"false-value")||"false",Cr(c,"checked","Array.isArray("+l+")?_i("+l+","+p+")>-1"+("true"===d?":("+l+")":":_q("+l+","+d+")")),Ar(c,"change","var $$a="+l+",$$el=$event.target,$$c=$$el.checked?("+d+"):("+v+");if(Array.isArray($$a)){var $$v="+(f?"_n("+p+")":p)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Er(l,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Er(l,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Er(l,"$$c")+"}",null,!0);else if("input"===$&&"radio"===w)r=e,i=_,a=(o=b)&&o.number,s=Or(r,"value")||"null",Cr(r,"checked","_q("+i+","+(s=a?"_n("+s+")":s)+")"),Ar(r,"change",Er(i,s),null,!0);else if("input"===$||"textarea"===$)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,l=o?"change":"range"===r?Pr:"input",u="$event.target.value";s&&(u="$event.target.value.trim()"),a&&(u="_n("+u+")");var f=Er(t,u);c&&(f="if($event.target.composing)return;"+f),Cr(e,"value","("+t+")"),Ar(e,l,f,null,!0),(s||a)&&Ar(e,"blur","$forceUpdate()")}(e,_,b);else if(!j.isReservedTag($))return Tr(e,_,b),!1;return!0},text:function(e,t){t.value&&Cr(e,"textContent","_s("+t.value+")")},html:function(e,t){t.value&&Cr(e,"innerHTML","_s("+t.value+")")}},isPreTag:function(e){return"pre"===e},isUnaryTag:to,mustUseProp:Sn,canBeLeftOpenTag:no,isReservedTag:Un,getTagNamespace:Vn,staticKeys:(Go=Wo,Go.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(","))},Qo=e(function(e){return s("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))});function ea(e,t){e&&(Zo=Qo(t.staticKeys||""),Xo=t.isReservedTag||O,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||c(e.tag)||!Xo(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(Zo)))}(t);if(1===t.type){if(!Xo(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var i=t.children[n];e(i),i.static||(t.static=!1)}if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++){var s=t.ifConditions[o].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++)e(t.ifConditions[o].block,n)}}(e,!1))}var ta=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,na=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ra={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ia={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},oa=function(e){return"if("+e+")return null;"},aa={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:oa("$event.target !== $event.currentTarget"),ctrl:oa("!$event.ctrlKey"),shift:oa("!$event.shiftKey"),alt:oa("!$event.altKey"),meta:oa("!$event.metaKey"),left:oa("'button' in $event && $event.button !== 0"),middle:oa("'button' in $event && $event.button !== 1"),right:oa("'button' in $event && $event.button !== 2")};function sa(e,t,n){var r=t?"nativeOn:{":"on:{";for(var i in e)r+='"'+i+'":'+ca(i,e[i])+",";return r.slice(0,-1)+"}"}function ca(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return ca(t,e)}).join(",")+"]";var n=na.test(e.value),r=ta.test(e.value);if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(aa[s])o+=aa[s],ra[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=oa(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+="if(!('button' in $event)&&"+a.map(la).join("&&")+")return null;"),o&&(i+=o),"function($event){"+i+(n?"return "+e.value+"($event)":r?"return ("+e.value+")($event)":e.value)+"}"}return n||r?e.value:"function($event){"+e.value+"}"}function la(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=ra[e],r=ia[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var ua={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(t,n){t.wrapData=function(e){return"_b("+e+",'"+t.tag+"',"+n.value+","+(n.modifiers&&n.modifiers.prop?"true":"false")+(n.modifiers&&n.modifiers.sync?",true":"")+")"}},cloak:$},fa=function(e){this.options=e,this.warn=e.warn||$r,this.transforms=wr(e.modules,"transformCode"),this.dataGenFns=wr(e.modules,"genData"),this.directives=m(m({},ua),e.directives);var t=e.isReservedTag||O;this.maybeComponent=function(e){return!t(e.tag)},this.onceId=0,this.staticRenderFns=[]};function pa(e,t){var n=new fa(t);return{render:"with(this){return "+(e?da(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function da(e,t){if(e.staticRoot&&!e.staticProcessed)return va(e,t);if(e.once&&!e.onceProcessed)return ha(e,t);if(e.for&&!e.forProcessed)return f=t,v=(u=e).for,h=u.alias,m=u.iterator1?","+u.iterator1:"",y=u.iterator2?","+u.iterator2:"",u.forProcessed=!0,(d||"_l")+"(("+v+"),function("+h+m+y+"){return "+(p||da)(u,f)+"})";if(e.if&&!e.ifProcessed)return ma(e,t);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=_a(e,t),i="_t("+n+(r?","+r:""),o=e.attrs&&"{"+e.attrs.map(function(e){return g(e.name)+":"+e.value}).join(",")+"}",a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)a=e.component,c=t,l=(s=e).inlineTemplate?null:_a(s,c,!0),n="_c("+a+","+ya(s,c)+(l?","+l:"")+")";else{var r=e.plain?void 0:ya(e,t),i=e.inlineTemplate?null:_a(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return _a(e,t)||"void 0";var a,s,c,l,u,f,p,d,v,h,m,y}function va(e,t){return e.staticProcessed=!0,t.staticRenderFns.push("with(this){return "+da(e,t)+"}"),"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function ha(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return ma(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+da(e,t)+","+t.onceId+++","+n+")":da(e,t)}return va(e,t)}function ma(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+e(t,n,r,i):""+a(o.block);function a(e){return r?r(e,n):e.once?ha(e,n):da(e,n)}}(e.ifConditions.slice(),t,n,r)}function ya(e,t){var n,r,i="{",o=function(e,t){var n=e.directives;if(!n)return;var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var l=t.directives[o.name];l&&(a=!!l(e,o,t.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(e,t);o&&(i+=o+","),e.key&&(i+="key:"+e.key+","),e.ref&&(i+="ref:"+e.ref+","),e.refInFor&&(i+="refInFor:true,"),e.pre&&(i+="pre:true,"),e.component&&(i+='tag:"'+e.tag+'",');for(var a=0;a<t.dataGenFns.length;a++)i+=t.dataGenFns[a](e);if(e.attrs&&(i+="attrs:{"+wa(e.attrs)+"},"),e.props&&(i+="domProps:{"+wa(e.props)+"},"),e.events&&(i+=sa(e.events,!1,t.warn)+","),e.nativeEvents&&(i+=sa(e.nativeEvents,!0,t.warn)+","),e.slotTarget&&!e.slotScope&&(i+="slot:"+e.slotTarget+","),e.scopedSlots&&(i+=(n=e.scopedSlots,r=t,"scopedSlots:_u(["+Object.keys(n).map(function(e){return ga(e,n[e],r)}).join(",")+"]),")),e.model&&(i+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var s=function(e,t){var n=e.children[0];if(1===n.type){var r=pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);s&&(i+=s+",")}return i=i.replace(/,$/,"")+"}",e.wrapData&&(i=e.wrapData(i)),e.wrapListeners&&(i=e.wrapListeners(i)),i}function ga(e,t,n){return t.for&&!t.forProcessed?(r=e,o=n,a=(i=t).for,s=i.alias,c=i.iterator1?","+i.iterator1:"",l=i.iterator2?","+i.iterator2:"",i.forProcessed=!0,"_l(("+a+"),function("+s+c+l+"){return "+ga(r,i,o)+"})"):"{key:"+e+",fn:"+("function("+String(t.slotScope)+"){return "+("template"===t.tag?t.if?t.if+"?"+(_a(t,n)||"undefined")+":undefined":_a(t,n)||"undefined":da(t,n))+"}")+"}";var r,i,o,a,s,c,l}function _a(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag)return(r||da)(a,t);var s=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(ba(i)||i.ifConditions&&i.ifConditions.some(function(e){return ba(e.block)})){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}(o,t.maybeComponent):0,c=i||$a;return"["+o.map(function(e){return c(e,t)}).join(",")+"]"+(s?","+s:"")}}function ba(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function $a(e,t){return 1===e.type?da(e,t):3===e.type&&e.isComment?(r=e,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=e).type?n.expression:Ca(JSON.stringify(n.text)))+")";var n,r}function wa(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+Ca(r.value)+","}return t.slice(0,-1)}function Ca(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");function xa(t,n){try{return new Function(t)}catch(e){return n.push({err:e,code:t}),$}}var ka,Aa,Oa=(ka=function(e,t){var n=Ho(e.trim(),t);!1!==t.optimize&&ea(n,t);var r=pa(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(s){function e(e,t){var n=Object.create(s),r=[],i=[];if(n.warn=function(e,t){(t?i:r).push(e)},t)for(var o in t.modules&&(n.modules=(s.modules||[]).concat(t.modules)),t.directives&&(n.directives=m(Object.create(s.directives||null),t.directives)),t)"modules"!==o&&"directives"!==o&&(n[o]=t[o
1942]);var a=ka(e,n);return a.errors=r,a.tips=i,a}return{compile:e,compileToFunctions:(c=e,l=Object.create(null),function(e,t,n){(t=m({},t)).warn,delete t.warn;var r=t.delimiters?String(t.delimiters)+e:e;if(l[r])return l[r];var i=c(e,t),o={},a=[];return o.render=xa(i.render,a),o.staticRenderFns=i.staticRenderFns.map(function(e){return xa(e,a)}),l[r]=o})};var c,l})(Yo).compileToFunctions;function Sa(e){return(Aa=Aa||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',0<Aa.innerHTML.indexOf("&#10;")}var Ta=!!B&&Sa(!1),Ea=!!B&&Sa(!0),ja=e(function(e){var t=Jn(e);return t&&t.innerHTML}),Na=hn.prototype.$mount;return hn.prototype.$mount=function(e,t){if((e=e&&Jn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ja(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){{if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}}(e));if(r){var i=Oa(r,{shouldDecodeNewlines:Ta,shouldDecodeNewlinesForHref:Ea,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return Na.call(this,e,t)},hn.compile=Oa,hn});
1943var yorn_tealium_accordion_faqAccordion = {
1944
1945    methods: {
1946        fireAccordionClickEvent: function (actionId, contextButtonLabel) {
1947            var layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
1948            utag.link({
1949                "action_id"                 : actionId,
1950                "context_page_name"         : window.pageActionId,
1951                "layout_type"               : layout_type,
1952                "context_component_title"   : "",
1953                "context_button_label"      : contextButtonLabel
1954            });
1955        },
1956
1957        handleAccordionClick: function(actionId, contextButtonLabel){
1958            if (window.utag) {
1959				this.fireAccordionClickEvent(actionId, contextButtonLabel);
1960			} else {
1961				var me = this;
1962                tealiumBus && tealiumBus.$on('utag-loaded', function() {
1963                    me.fireAccordionClickEvent(actionId, contextButtonLabel);
1964                });
1965			}
1966        }
1967    }
1968}
1969var yorn_tealium_button = {
1970
1971    methods: {
1972        fireButtonClickEvent: function (actionId, contextComponentTitle, contextButtonLabel) {
1973            var layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
1974            utag.link({
1975                "action_id"                 : actionId,
1976                "context_page_name"         : window.pageActionId,
1977                "layout_type"               : layout_type,
1978                "context_component_title"   : contextComponentTitle,
1979                "context_button_label"      : contextButtonLabel
1980            });
1981        },
1982
1983        handleButtonClick: function(actionId, contextComponentTitle, contextButtonLabel){
1984            if (window.utag) {
1985				this.fireButtonClickEvent(actionId, contextComponentTitle, contextButtonLabel);
1986			} else {
1987				var me = this;
1988                tealiumBus && tealiumBus.$on('utag-loaded', function() {
1989                    me.fireButtonClickEvent(actionId, contextComponentTitle, contextButtonLabel);
1990                });
1991			}
1992        }
1993    }
1994}
1995var tealium_yorn_carousel = {
1996    methods: {
1997
1998        handleCarouselClick: function (title, label) {
1999            var me = this;
2000            if (window.utag) {
2001                me.fireCarouselLink(title, label);
2002            } else {
2003                tealiumBus && tealiumBus.$on('utag-loaded', function () {
2004                    me.fireCarouselLink(title, label);
2005                })
2006            }
2007        },
2008
2009        fireCarouselLink: function (title, label) {
2010            var layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
2011            utag.link({
2012                "action_id": "Click Event Yorn Dynamic Banner",
2013                "context_page_name":  window.pageActionId,
2014                "layout_type": layout_type,
2015                "context_component_title": title,
2016                "context_button_label": label
2017            });
2018        }
2019    }
2020};
2021var yorn_tealium_hidden_button = {
2022
2023    methods: {
2024        fireHiddenButtonClickEvent: function (actionId, contextComponentTitle, contextButtonLabel) {
2025            var layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
2026            utag.link({
2027                "action_id"                 : actionId,
2028                "context_page_name"         : window.pageActionId,
2029                "layout_type"               : layout_type,
2030                "context_component_title"   : contextComponentTitle,
2031                "context_button_label"      : contextButtonLabel
2032            });
2033        },
2034
2035        handleHiddenButtonClick: function(actionId, contextComponentTitle, contextButtonLabel){
2036            if (window.utag) {
2037				this.firePageView(actionId, contextComponentTitle, contextButtonLabel);
2038			} else {
2039				var me = this;
2040                tealiumBus && tealiumBus.$on('utag-loaded', function() {
2041                    me.firePageView(actionId, contextComponentTitle, contextButtonLabel);
2042                });
2043			}
2044        }
2045    }
2046}
2047var yorn_tealium_page_view_events = {
2048
2049    methods: {
2050        firePageView: function (action_id, partnershipId) {
2051            const layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
2052            if(partnershipId){
2053                utag.view({
2054                    "action_id"             : action_id,
2055                    "context_partner"       : partnershipId,
2056                    "layout_type"	        : layout_type
2057                });
2058            } else {
2059                utag.view({
2060                    "action_id"        : action_id,
2061                    "layout_type"	   : layout_type
2062                });
2063            }
2064
2065        },
2066
2067        handlePageView: function(action_id, partnershipId){
2068            if (window.utag) {
2069				this.firePageView(action_id, partnershipId);
2070			} else {
2071				const me = this;
2072                tealiumBus && tealiumBus.$on('utag-loaded', function() {
2073                    me.firePageView(action_id, partnershipId);
2074                });
2075			}
2076        }
2077    }
2078}
2079var tealium_yorn_planCard = {
2080    methods: {
2081
2082        handlePlanCardClick: function (title, label) {
2083            var me = this;
2084            if (window.utag) {
2085                me.firePlanCardLink(title, label);
2086            } else {
2087                tealiumBus && tealiumBus.$on('utag-loaded', function () {
2088                    me.firePlanCardLink(title, label);
2089                })
2090            }
2091        },
2092
2093        firePlanCardLink: function (title, label) {
2094            var layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
2095            utag.link({
2096                "action_id": "Click Event Yorn Subscribe at Compact Tariff Cards",
2097                "context_page_name":  window.pageActionId,
2098                "layout_type": layout_type,
2099                "context_component_title": title,
2100                "context_button_label": label
2101            });
2102        }
2103    }
2104};
2105var yorn_tealium_partnershipCard = {
2106
2107    methods: {
2108        fireCardClickEvent: function (actionId, contextComponentTitle, contextButtonLabel) {
2109            let layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
2110            utag.link({
2111                "action_id"                 : actionId,
2112                "context_page_name"         : window.pageActionId,
2113                "layout_type"               : layout_type,
2114                "context_component_title"   : contextComponentTitle,
2115                "context_button_label"      : contextButtonLabel
2116            });
2117        },
2118
2119        handleCardClick: function(actionId, contextComponentTitle, contextButtonLabel){
2120            if (window.utag) {
2121				this.fireCardClickEvent(actionId, contextComponentTitle, contextButtonLabel);
2122			} else {
2123				const me = this;
2124                tealiumBus && tealiumBus.$on('utag-loaded', function() {
2125                    me.fireCardClickEvent(actionId, contextComponentTitle, contextButtonLabel);
2126                });
2127			}
2128        }
2129    }
2130}
2131var tealium_yorn_PartnershipHero = {
2132    methods: {
2133
2134        handlePartnershipHeroClick: function (title, label) {
2135            var me = this;
2136            if (window.utag) {
2137                me.firePartnershipHeroLink(title, label);
2138            } else {
2139                tealiumBus && tealiumBus.$on('utag-loaded', function () {
2140                    me.firePartnershipHeroLink(title, label);
2141                })
2142            }
2143        },
2144
2145        firePartnershipHeroLink: function (title, label) {
2146            var layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
2147            utag.link({
2148                "action_id": "Click Event Yorn Static Banner",
2149                "context_page_name":  window.pageActionId,
2150                "layout_type": layout_type,
2151                "context_component_title": title,
2152                "context_button_label": label
2153            });
2154        }
2155    }
2156};
2157var tealium_yorn_whyCard = {
2158    methods: {
2159
2160        handleWhyCardClick: function (title, label) {
2161            var me = this;
2162            if (window.utag) {
2163                me.fireWhyCardLink(title, label);
2164            } else {
2165                tealiumBus && tealiumBus.$on('utag-loaded', function () {
2166                    me.fireWhyCardLink(title, label);
2167                })
2168            }
2169        },
2170
2171        fireWhyCardLink: function (title, label) {
2172            var layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
2173            utag.link({
2174                "action_id": "Click Event Yorn See More at Why Yorn Card",
2175                "context_page_name":  window.pageActionId,
2176                "layout_type": layout_type,
2177                "context_component_title": title,
2178                "context_button_label": label
2179            });
2180        }
2181    }
2182};
2183var tealium_yorn_cludoSearchYorn = {
2184    methods: {
2185
2186            handleCludoSearchYorn: function (actionId, searchTerm, category, label) {
2187            var me = this;
2188            if (window.utag) {
2189                me.fireCludoSearchYorn(actionId, searchTerm, category, label);
2190            } else {
2191                tealiumBus && tealiumBus.$on('utag-loaded', function () {
2192                    me.fireCludoSearchYorn(actionId, searchTerm);
2193                })
2194            }
2195        },
2196
2197        fireCludoSearchYorn: function (actionId, searchTerm, category, label) {
2198            var layout_type = deviceTypeUtils.methods.isYornBurgerVisible() ? 'Mobile' : 'Responsive';
2199            utag.link({
2200                "action_id": actionId,
2201                "context_page_name":  window.pageActionId,
2202                "context_component_title": category,
2203                "context_button_label": label,
2204                "layout_type": layout_type,
2205                "context_search_terms": searchTerm
2206            });
2207        }
2208    }
2209};
2210var yorn_tealium_simpleTabs = {
2211    methods: {
2212        handler: function (fireEvent) {
2213            if (window.utag) {
2214                fireEvent();
2215            } else {
2216                tealiumBus && tealiumBus.$on('utag-loaded', function () {
2217                    fireEvent();
2218                });
2219            }
2220        },
2221
2222        /**
2223         * #1 - Track Action - Handle Show More Packages Button Click
2224         * @param buttonCopy {String}
2225         * @param tabName {String}
2226         * @param userContext {String}
2227         */
2228        handleShowMorePackagesButtonClick: function (buttonCopy, tabName,userContext) {
2229            this.handler(function () {
2230                const webTeam = userContext === 'business' ? 'Business' : 'Web1';
2231                const linkObj = {
2232                    "event": ["event_instance"],
2233                    "event_action": `${webTeam} - showMoreCardsButton - tabName: ${tabName}`,
2234                    "event_label": buttonCopy,
2235                    "event_category": "showMoreCardsButton"
2236                };
2237                utag.link(linkObj);
2238            });
2239        },
2240
2241        /**
2242         * #1 - Track Action - Handle Tab Interaction Click
2243         * @param tabName {String}
2244         */
2245
2246        handleTabInteractionClick: function (tabName){
2247            this.handler(function () {
2248                const linkObj = {
2249                    "event_action": "Event Click Tab Section Interaction",
2250                    "page_name": window.utag.data.page_name || window.pageTitle || "",
2251                    "event_label": tabName || "",
2252                    "event_category": "Tabs"
2253                };
2254                utag.link(linkObj);
2255            });
2256        }
2257    }
2258}
2259/*!
2260 * vue-resource v1.3.4
2261 * https://github.com/pagekit/vue-resource
2262 * Released under the MIT License.
2263 */
2264
2265! function(t, e) {
2266    "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.VueResource = e()
2267}(this, function() {
2268    "use strict";
2269
2270    function t(t) {
2271        this.state = J, this.value = void 0, this.deferred = [];
2272        var e = this;
2273        try {
2274            t(function(t) {
2275                e.resolve(t)
2276            }, function(t) {
2277                e.reject(t)
2278            })
2279        } catch (t) {
2280            e.reject(t)
2281        }
2282    }
2283
2284    function e(t, e) {
2285        t instanceof Promise ? this.promise = t : this.promise = new Promise(t.bind(e)), this.context = e
2286    }
2287
2288    function n(t) {
2289        "undefined" != typeof console && _ && console.warn("[VueResource warn]: " + t)
2290    }
2291
2292    function o(t) {
2293        "undefined" != typeof console && console.error(t)
2294    }
2295
2296    function r(t, e) {
2297        return F(t, e)
2298    }
2299
2300    function i(t) {
2301        return t ? t.replace(/^\s*|\s*$/g, "") : ""
2302    }
2303
2304    function u(t, e) {
2305        return t && void 0 === e ? t.replace(/\s+$/, "") : t && e ? t.replace(new RegExp("[" + e + "]+$"), "") : t
2306    }
2307
2308    function s(t) {
2309        return t ? t.toLowerCase() : ""
2310    }
2311
2312    function a(t) {
2313        return t ? t.toUpperCase() : ""
2314    }
2315
2316    function c(t) {
2317        return "string" == typeof t
2318    }
2319
2320    function f(t) {
2321        return "function" == typeof t
2322    }
2323
2324    function p(t) {
2325        return null !== t && "object" == typeof t
2326    }
2327
2328    function h(t) {
2329        return p(t) && Object.getPrototypeOf(t) == Object.prototype
2330    }
2331
2332    function d(t) {
2333        return "undefined" != typeof Blob && t instanceof Blob
2334    }
2335
2336    function l(t) {
2337        return "undefined" != typeof FormData && t instanceof FormData
2338    }
2339
2340    function m(t, n, o) {
2341        var r = e.resolve(t);
2342        return arguments.length < 2 ? r : r.then(n, o)
2343    }
2344
2345    function y(t, e, n) {
2346        return n = n || {}, f(n) && (n = n.call(e)), b(t.bind({
2347            $vm: e,
2348            $options: n
2349        }), t, {
2350            $options: n
2351        })
2352    }
2353
2354    function v(t, e) {
2355        var n, o;
2356        if (Q(t))
2357            for (n = 0; n < t.length; n++) e.call(t[n], t[n], n);
2358        else if (p(t))
2359            for (o in t) G.call(t, o) && e.call(t[o], t[o], o);
2360        return t
2361    }
2362
2363    function b(t) {
2364        return V.call(arguments, 1).forEach(function(e) {
2365            T(t, e, !0)
2366        }), t
2367    }
2368
2369    function g(t) {
2370        return V.call(arguments, 1).forEach(function(e) {
2371            for (var n in e) void 0 === t[n] && (t[n] = e[n])
2372        }), t
2373    }
2374
2375    function w(t) {
2376        return V.call(arguments, 1).forEach(function(e) {
2377            T(t, e)
2378        }), t
2379    }
2380
2381    function T(t, e, n) {
2382        for (var o in e) n && (h(e[o]) || Q(e[o])) ? (h(e[o]) && !h(t[o]) && (t[o] = {}), Q(e[o]) && !Q(t[o]) && (t[o] = []), T(t[o], e[o], n)) : void 0 !== e[o] && (t[o] = e[o])
2383    }
2384
2385    function x(t, e, n) {
2386        var o = j(t),
2387            r = o.expand(e);
2388        return n && n.push.apply(n, o.vars), r
2389    }
2390
2391    function j(t) {
2392        var e = ["+", "#", ".", "/", ";", "?", "&"],
2393            n = [];
2394        return {
2395            vars: n,
2396            expand: function(o) {
2397                return t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function(t, r, i) {
2398                    if (r) {
2399                        var u = null,
2400                            s = [];
2401                        if (-1 !== e.indexOf(r.charAt(0)) && (u = r.charAt(0), r = r.substr(1)), r.split(/,/g).forEach(function(t) {
2402                                var e = /([^:\*]*)(?::(\d+)|(\*))?/.exec(t);
2403                                s.push.apply(s, E(o, u, e[1], e[2] || e[3])), n.push(e[1])
2404                            }), u && "+" !== u) {
2405                            var a = ",";
2406                            return "?" === u ? a = "&" : "#" !== u && (a = u), (0 !== s.length ? u : "") + s.join(a)
2407                        }
2408                        return s.join(",")
2409                    }
2410                    return $(i)
2411                })
2412            }
2413        }
2414    }
2415
2416    function E(t, e, n, o) {
2417        var r = t[n],
2418            i = [];
2419        if (O(r) && "" !== r)
2420            if ("string" == typeof r || "number" == typeof r || "boolean" == typeof r) r = r.toString(), o && "*" !== o && (r = r.substring(0, parseInt(o, 10))), i.push(C(e, r, P(e) ? n : null));
2421            else if ("*" === o) Array.isArray(r) ? r.filter(O).forEach(function(t) {
2422            i.push(C(e, t, P(e) ? n : null))
2423        }) : Object.keys(r).forEach(function(t) {
2424            O(r[t]) && i.push(C(e, r[t], t))
2425        });
2426        else {
2427            var u = [];
2428            Array.isArray(r) ? r.filter(O).forEach(function(t) {
2429                u.push(C(e, t))
2430            }) : Object.keys(r).forEach(function(t) {
2431                O(r[t]) && (u.push(encodeURIComponent(t)), u.push(C(e, r[t].toString())))
2432            }), P(e) ? i.push(encodeURIComponent(n) + "=" + u.join(",")) : 0 !== u.length && i.push(u.join(","))
2433        } else ";" === e ? i.push(encodeURIComponent(n)) : "" !== r || "&" !== e && "?" !== e ? "" === r && i.push("") : i.push(encodeURIComponent(n) + "=");
2434        return i
2435    }
2436
2437    function O(t) {
2438        return void 0 !== t && null !== t
2439    }
2440
2441    function P(t) {
2442        return ";" === t || "&" === t || "?" === t
2443    }
2444
2445    function C(t, e, n) {
2446        return e = "+" === t || "#" === t ? $(e) : encodeURIComponent(e), n ? encodeURIComponent(n) + "=" + e : e
2447    }
2448
2449    function $(t) {
2450        return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(t) {
2451            return /%[0-9A-Fa-f]/.test(t) || (t = encodeURI(t)), t
2452        }).join("")
2453    }
2454
2455    function U(t, e) {
2456        var n, o = this || {},
2457            r = t;
2458        return c(t) && (r = {
2459            url: t,
2460            params: e
2461        }), r = b({}
2461, U.options, o.$options, r), U.transforms.forEach(function(t) {
2462            c(t) && (t = U.transform[t]), f(t) && (n = R(t, n, o.$vm))
2463        }), n(r)
2464    }
2465
2466    function R(t, e, n) {
2467        return function(o) {
2468            return t.call(n, o, e)
2469        }
2470    }
2471
2472    function A(t, e, n) {
2473        var o, r = Q(e),
2474            i = h(e);
2475        v(e, function(e, u) {
2476            o = p(e) || Q(e), n && (u = n + "[" + (i || o ? u : "") + "]"), !n && r ? t.add(e.name, e.value) : o ? A(t, e, u) : t.add(u, e)
2477        })
2478    }
2479
2480    function S(t) {
2481        var e = t.match(/^\[|^\{(?!\{)/),
2482            n = {
2483                "[": /]$/,
2484                "{": /}$/
2485            };
2486        return e && n[e[0]].test(t)
2487    }
2488
2489    function k(t, e) {
2490        e((t.client || (z ? ht : dt))(t))
2491    }
2492
2493    function I(t, e) {
2494        return Object.keys(t).reduce(function(t, n) {
2495            return s(e) === s(n) ? n : t
2496        }, null)
2497    }
2498
2499    function q(t) {
2500        if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t)) throw new TypeError("Invalid character in header field name");
2501        return i(t)
2502    }
2503
2504    function H(t) {
2505        return new e(function(e) {
2506            var n = new FileReader;
2507            n.readAsText(t), n.onload = function() {
2508                e(n.result)
2509            }
2510        })
2511    }
2512
2513    function L(t) {
2514        return 0 === t.type.indexOf("text") || -1 !== t.type.indexOf("json")
2515    }
2516
2517    function B(t) {
2518        var n = this || {},
2519            r = lt(n.$vm);
2520        return g(t || {}, n.$options, B.options), B.interceptors.forEach(function(t) {
2521            c(t) && (t = B.interceptor[t]), f(t) && r.use(t)
2522        }), r(new vt(t)).then(function(t) {
2523            return t.ok ? t : e.reject(t)
2524        }, function(t) {
2525            return t instanceof Error && o(t), e.reject(t)
2526        })
2527    }
2528
2529    function M(t, e, n, o) {
2530        var r = this || {},
2531            i = {};
2532        return n = Y({}, M.actions, n), v(n, function(n, u) {
2533            n = b({
2534                url: t,
2535                params: Y({}, e)
2536            }, o, n), i[u] = function() {
2537                return (r.$http || B)(N(n, arguments))
2538            }
2539        }), i
2540    }
2541
2542    function N(t, e) {
2543        var n, o = Y({}, t),
2544            r = {};
2545        switch (e.length) {
2546            case 2:
2547                r = e[0], n = e[1];
2548                break;
2549            case 1:
2550                /^(POST|PUT|PATCH)$/i.test(o.method) ? n = e[0] : r = e[0];
2551                break;
2552            case 0:
2553                break;
2554            default:
2555                throw "Expected up to 2 arguments [params, body], got " + e.length + " arguments"
2556        }
2557        return o.body = n, o.params = Y({}, o.params, r), o
2558    }
2559
2560    function D(t) {
2561        D.installed || (K(t), t.url = U, t.http = B, t.resource = M, t.Promise = e, Object.defineProperties(t.prototype, {
2562            $url: {
2563                get: function() {
2564                    return y(t.url, this, this.$options.url)
2565                }
2566            },
2567            $http: {
2568                get: function() {
2569                    return y(t.http, this, this.$options.http)
2570                }
2571            },
2572            $resource: {
2573                get: function() {
2574                    return t.resource.bind(this)
2575                }
2576            },
2577            $promise: {
2578                get: function() {
2579                    var e = this;
2580                    return function(n) {
2581                        return new t.Promise(n, e)
2582                    }
2583                }
2584            }
2585        }))
2586    }
2587    var J = 2;
2588    t.reject = function(e) {
2589        return new t(function(t, n) {
2590            n(e)
2591        })
2592    }, t.resolve = function(e) {
2593        return new t(function(t, n) {
2594            t(e)
2595        })
2596    }, t.all = function(e) {
2597        return new t(function(n, o) {
2598            var r = 0,
2599                i = [];
2600            0 === e.length && n(i);
2601            for (var u = 0; u < e.length; u += 1) t.resolve(e[u]).then(function(t) {
2602                return function(o) {
2603                    i[t] = o, (r += 1) === e.length && n(i)
2604                }
2605            }(u), o)
2606        })
2607    }, t.race = function(e) {
2608        return new t(function(n, o) {
2609            for (var r = 0; r < e.length; r += 1) t.resolve(e[r]).then(n, o)
2610        })
2611    };
2612    var W = t.prototype;
2613    W.resolve = function(t) {
2614        var e = this;
2615        if (e.state === J) {
2616            if (t === e) throw new TypeError("Promise settled with itself.");
2617            var n = !1;
2618            try {
2619                var o = t && t.then;
2620                if (null !== t && "object" == typeof t && "function" == typeof o) return void o.
2620call(t, function(t) {
2621                    n || e.resolve(t), n = !0
2622                }, function(t) {
2623                    n || e.reject(t), n = !0
2624                })
2625            } catch (t) {
2626                return void(n || e.reject(t))
2627            }
2628            e.state = 0, e.value = t, e.notify()
2629        }
2630    }, W.reject = function(t) {
2631        var e = this;
2632        if (e.state === J) {
2633            if (t === e) throw new TypeError("Promise settled with itself.");
2634            e.state = 1, e.value = t, e.notify()
2635        }
2636    }, W.notify = function() {
2637        var t = this;
2638        r(function() {
2639            if (t.state !== J)
2640                for (; t.deferred.length;) {
2641                    var e = t.deferred.shift(),
2642                        n = e[0],
2643                        o = e[1],
2644                        r = e[2],
2645                        i = e[3];
2646                    try {
2647                        0 === t.state ? r("function" == typeof n ? n.call(void 0, t.value) : t.value) : 1 === t.state && ("function" == typeof o ? r(o.call(void 0, t.value)) : i(t.value))
2648                    } catch (t) {
2649                        i(t)
2650                    }
2651                }
2652        })
2653    }, W.then = function(e, n) {
2654        var o = this;
2655        return new t(function(t, r) {
2656            o.deferred.push([e, n, t, r]), o.notify()
2657        })
2658    }, W.catch = function(t) {
2659        return this.then(void 0, t)
2660    }, "undefined" == typeof Promise && (window.Promise = t), e.all = function(t, n) {
2661        return new e(Promise.all(t), n)
2662    }, e.resolve = function(t, n) {
2663        return new e(Promise.resolve(t), n)
2664    }, e.reject = function(t, n) {
2665        return new e(Promise.reject(t), n)
2666    }, e.race = function(t, n) {
2667        return new e(Promise.race(t), n)
2668    };
2669    var X = e.prototype;
2670    X.bind = function(t) {
2671        return this.context = t, this
2672    }, X.then = function(t, n) {
2673        return t && t.bind && this.context && (t = t.bind(this.context)), n && n.bind && this.context && (n = n.bind(this.context)), new e(this.promise.then(t, n), this.context)
2674    }, X.catch = function(t) {
2675        return t && t.bind && this.context && (t = t.bind(this.context)), new e(this.promise.catch(t), this.context)
2676    }, X.finally = function(t) {
2677        return this.then(function(e) {
2678            return t.call(this), e
2679        }, function(e) {
2680            return t.call(this), Promise.reject(e)
2681        })
2682    };
2683    var F, G = {}.hasOwnProperty,
2684        V = [].slice,
2685        _ = !1,
2686        z = "undefined" != typeof window,
2687        K = function(t) {
2688            var e = t.config,
2689                n = t.nextTick;
2690            F = n, _ = e.debug || !e.silent
2691        },
2692        Q = Array.isArray,
2693        Y = Object.assign || w,
2694        Z = function(t, e) {
2695            var n = e(t);
2696            return c(t.root) && !/^(https?:)?\//.test(n) && (n = u(t.root, "/") + "/" + n), n
2697        },
2698        tt = function(t, e) {
2699            var n = Object.keys(U.options.params),
2700                o = {},
2701                r = e(t);
2702            return v(t.params, function(t, e) {
2703                -1 === n.indexOf(e) && (o[e] = t)
2704            }), (o = U.params(o)) && (r += (-1 == r.indexOf("?") ? "?" : "&") + o), r
2705        },
2706        et = function(t) {
2707            var e = [],
2708                n = x(t.url, t.params, e);
2709            return e.forEach(function(e) {
2710                delete t.params[e]
2711            }), n
2712        };
2713    U.options = {
2714        url: "",
2715        root: null,
2716        params: {}
2717    }, U.transform = {
2718        template: et,
2719        query: tt,
2720        root: Z
2721    }, U.transforms = ["template", "query", "root"], U.params = function(t) {
2722        var e = [],
2723            n = encodeURIComponent;
2724        return e.add = function(t, e) {
2725            f(e) && (e = e()), null === e && (e = ""), this.push(n(t) + "=" + n(e))
2726        }, A(e, t), e.join("&").replace(/%20/g, "+")
2727    }, U.parse = function(t) {
2728        var e = document.createElement("a");
2729        return document.documentMode && (e.href = t, t = e.href), e.href = t, {
2730            href: e.href,
2731            protocol: e.protocol ? e.protocol.replace(/:$/, "") : "",
2732            port: e.port,
2733            host: e.host,
2734            hostname: e.hostname,
2735            pathname: "/" === e.pathname.charAt(0) ? e.pathname : "/" + e.pathname,
2736            search: e.search ? e.search.replace(/^\?/, "") : "",
2737            hash: e.hash ? e.hash.replace(/^#/, "") : ""
2738        }
2739    };
2740    var nt = function(t) {
2741            return new e(function(e) {
2742                var n = new XDomainRequest,
2743                    o = function(o) {
2744                        var r = o.type,
2745                            i = 0;
2746                        "load" === r ? i = 200 : "error" === r && (i = 500), e(t.respondWith(n.responseText, {
2747                            status: i
2748                        }))
2749                    };
2750                t.abort = function() {
2751                    return n.abort()
2752                }, n.open(t.method, t.getUrl()), t.timeout && (n.timeout = t.timeout), n.onload = o, n.onabort = o, n.onerror = o, n.ontimeout = o, n.onprogress = function() {}, n.send(t.getBody())
2753            })
2754        },
2755        ot = z && "withCredentials" in new XMLHttpRequest,
2756        rt = function(t, e) {
2757            if (z) {
2758                var n = U.parse(location.href),
2759                    o = U.parse(t.getUrl());
2760                o.protocol === n.protocol && o.host === n.host || (t.crossOrigin = !0, t.emulateHTTP = !1, ot || (t.client = nt))
2761            }
2762            e()
2763        },
2764        it = function(t, e) {
2765            l(t.body) ? t.headers.delete("Content-Type") : p(t.body) && t.emulateJSON && (t.body = U.params(t.body), t.headers.set("Content-Type", "application/x-www-form-urlencoded")), e()
2766        },
2767        ut = function(t, e) {
2768            var n = t.headers.get("Content-Type") || "";
2769            p(t.body) && 0 === n.indexOf("application/json") && (t.body = JSON.stringify(t.body)), e(function(t) {
2770                return t.bodyText ? m(t.text(), function(e) {
2771                    if (0 === (n = t.headers.get("Content-Type") || "").indexOf("application/json") || S(e)) try {
2772                        t.body = JSON.parse(e)
2773                    } catch (e) {
2774                        t.body = null
2775                    } else t.body = e;
2776                    return t
2777                }) : t
2778            })
2779        },
2780        st = function(t) {
2781            return new e(function(e) {
2782                var n, o, r = t.jsonp || "callback",
2783                    i = t.jsonpCallback || "_jsonp" + Math.random().toString(36).substr(2),
2784                    u = null;
2785                n = function(n) {
2786                    var r = n.type,
2787                        s = 0;
2788                    "load" === r && null !== u ? s = 200 : "error" === r && (s = 500), s && window[i] && (delete window[i], document.body.removeChild(o)), e(t.respondWith(u, {
2789                        status: s
2790                    }))
2791                }, window[i] = function(t) {
2792                    u = JSON.stringify(t)
2793                }, t.abort = function() {
2794                    n({
2795                        type: "abort"
2796                    })
2797                }, t.params[r] = i, t.timeout && setTimeout(t.abort, t.timeout), (o = document.createElement("script")).src = t.getUrl(), o.type = "text/javascript", o.async = !0, o.onload = n, o.onerror = n, document.body.appendChild(o)
2798            })
2799        },
2800        at = function(t, e) {
2801            "JSONP" == t.method && (t.client = st), e()
2802        },
2803        ct = function(t, e) {
2804            f(t.before) && t.before.call(this, t), e()
2805        },
2806        ft = function(t, e) {
2807            t.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(t.method) && (t.headers.set("X-HTTP-Method-Override", t.method), t.method = "POST"), e()
2808        },
2809        pt = function(t, e) {
2810            v(Y({}, B.headers.common, t.crossOrigin ? {} : B.headers.custom, B.headers[s(t.method)]), function(e, n) {
2811                t.headers.has(n) || t.headers.set(n, e)
2812            }), e()
2813        },
2814        ht = function(t) {
2815            return new e(function(e) {
2816                var n = new XMLHttpRequest,
2817                    o = function(o) {
2818                        var r = t.respondWith("response" in n ? n.response : n.responseText, {
2819                            status: 1223 === n.status ? 204 : n.status,
2820                            statusText: 1223 === n.status ? "No Content" : i(n.statusText)
2821                        });
2822                        v(i(n.getAllResponseHeaders()).split("\n"), function(t) {
2823                            r.headers.append(t.slice(0, t.indexOf(":")), t.slice(t.indexOf(":") + 1))
2824                        }), e(r)
2825                    };
2826                t.abort = function() {
2827                    return n.abort()
2828                }, t.progress && ("GET" === t.method ? n.addEventListener("progress", t.progress) : /^(POST|PUT)$/i.test(t.method) && n.upload.addEventListener("progress", t.progress)), n.open(t.method, t.getUrl(), !0), t.timeout && (n.timeout = t.timeout), t.responseType && "responseType" in n && (n.responseType = t.responseType), (t.withCredentials || t.credentials) && (n.withCredentials = !0), t.crossOrigin || t.headers.set("X-Requested-With", "XMLHttpRequest"), t.headers.forEac
2828h(function(t, e) {
2829                    n.setRequestHeader(e, t)
2830                }), n.onload = o, n.onabort = o, n.onerror = o, n.ontimeout = o, n.send(t.getBody())
2831            })
2832        },
2833        dt = function(t) {
2834            var n = require("got");
2835            return new e(function(e) {
2836                var o, r = t.getUrl(),
2837                    u = t.getBody(),
2838                    s = t.method,
2839                    a = {};
2840                t.headers.forEach(function(t, e) {
2841                    a[e] = t
2842                }), n(r, {
2843                    body: u,
2844                    method: s,
2845                    headers: a
2846                }).then(o = function(n) {
2847                    var o = t.respondWith(n.body, {
2848                        status: n.statusCode,
2849                        statusText: i(n.statusMessage)
2850                    });
2851                    v(n.headers, function(t, e) {
2852                        o.headers.set(e, t)
2853                    }), e(o)
2854                }, function(t) {
2855                    return o(t.response)
2856                })
2857            })
2858        },
2859        lt = function(t) {
2860            function o(o) {
2861                return new e(function(e, s) {
2862                    function a() {
2863                        f(r = i.pop()) ? r.call(t, o, c) : (n("Invalid interceptor of type " + typeof r + ", must be a function"), c())
2864                    }
2865
2866                    function c(n) {
2867                        if (f(n)) u.unshift(n);
2868                        else if (p(n)) return u.forEach(function(e) {
2869                            n = m(n, function(n) {
2870                                return e.call(t, n) || n
2871                            }, s)
2872                        }), void m(n, e, s);
2873                        a()
2874                    }
2875                    a()
2876                }, t)
2877            }
2878            var r, i = [k],
2879                u = [];
2880            return p(t) || (t = null), o.use = function(t) {
2881                i.push(t)
2882            }, o
2883        },
2884        mt = function(t) {
2885            var e = this;
2886            this.map = {}, v(t, function(t, n) {
2887                return e.append(n, t)
2888            })
2889        };
2890    mt.prototype.has = function(t) {
2891        return null !== I(this.map, t)
2892    }, mt.prototype.get = function(t) {
2893        var e = this.map[I(this.map, t)];
2894        return e ? e.join() : null
2895    }, mt.prototype.getAll = function(t) {
2896        return this.map[I(this.map, t)] || []
2897    }, mt.prototype.set = function(t, e) {
2898        this.map[q(I(this.map, t) || t)] = [i(e)]
2899    }, mt.prototype.append = function(t, e) {
2900        var n = this.map[I(this.map, t)];
2901        n ? n.push(i(e)) : this.set(t, e)
2902    }, mt.prototype.delete = function(t) {
2903        delete this.map[I(this.map, t)]
2904    }, mt.prototype.deleteAll = function() {
2905        this.map = {}
2906    }, mt.prototype.forEach = function(t, e) {
2907        var n = this;
2908        v(this.map, function(o, r) {
2909            v(o, function(o) {
2910                return t.call(e, o, r, n)
2911            })
2912        })
2913    };
2914    var yt = function(t, e) {
2915        var n = e.url,
2916            o = e.headers,
2917            r = e.status,
2918            i = e.statusText;
2919        this.url = n, this.ok = r >= 200 && r < 300, this.status = r || 0, this.statusText = i || "", this.headers = new mt(o), this.body = t, c(t) ? this.bodyText = t : d(t) && (this.bodyBlob = t, L(t) && (this.bodyText = H(t)))
2920    };
2921    yt.prototype.blob = function() {
2922        return m(this.bodyBlob)
2923    }, yt.prototype.text = function() {
2924        return m(this.bodyText)
2925    }, yt.prototype.json = function() {
2926        return m(this.text(), function(t) {
2927            return JSON.parse(t)
2928        })
2929    }, Object.defineProperty(yt.prototype, "data", {
2930        get: function() {
2931            return this.body
2932        },
2933        set: function(t) {
2934            this.body = t
2935        }
2936    });
2937    var vt = function(t) {
2938        this.body = null, this.params = {}, Y(this, t, {
2939            method: a(t.method || "GET")
2940        }), this.headers instanceof mt || (this.headers = new mt(this.headers))
2941    };
2942    vt.prototype.getUrl = function() {
2943        return U(this)
2944    }, vt.prototype.getBody = function() {
2945        return this.body
2946    }, vt.prototype.respondWith = function(t, e) {
2947        return new yt(t, Y(e || {}, {
2948            url: this.getUrl()
2949        }))
2950    };
2951    var bt = {
2952            Accept: "application/json, text/plain, */*"
2953        },
2954        gt = {
2955            "Content-Type": "application/json;charset=utf-8"
2956        };
2957    return B.options = {}, B.headers = {
2958        put: gt,
2959        post: gt,
2960        patch: gt,
2961        delete: gt,
2962        common: bt,
2963        custom: {}
2964    }, B.interceptor = {
2965        before: ct,
2966        method: ft,
2967        jsonp: at,
2968        json: ut,
2969        form: it,
2970        header: pt,
2971        cors: rt
2972    }, B.interceptors = ["before", "method", "jsonp", "json", "form", "header", "cors"], ["get", "delete", "head", "jsonp"].forEach(function(t) {
2973        B[t] = function(e, n) {
2974            return this(Y(n || {}, {
2975                url: e,
2976                method: t
2977            }))
2978        }
2979    }), ["post", "put", "patch"].forEach(function(t) {
2980        B[t] = function(e, n, o) {
2981            return this(Y(o || {}, {
2982                url: e,
2983                method: t,
2984                body: n
2985            }))
2986        }
2987    }), M.actions = {
2988        get: {
2989            method: "GET"
2990        },
2991        save: {
2992            method: "POST"
2993        },
2994        query: {
2995            method: "GET"
2996        },
2997        update: {
2998            method: "PUT"
2999        },
3000        remove: {
3001            method: "DELETE"
3002        },
3003        delete: {
3004            method: "DELETE"
3005        }
3006    }
3006, "undefined" != typeof window && window.Vue && window.Vue.use(D), D
3007});
3008(function (global, factory) {
3009	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3010	typeof define === 'function' && define.amd ? define(['exports'], factory) :
3011	(factory((global.VueMask = {})));
3012}(this, (function (exports) { 'use strict';
3013
3014function format (data, mask) {
3015  if (!mask) return data;
3016
3017  var maskStartRegExp = /^([^#ANX]+)/;
3018
3019  if (data.length == 1 && maskStartRegExp.test(mask)) {
3020    data = maskStartRegExp.exec(mask)[0] + data;
3021  }
3022
3023  var text = '';
3024
3025  var cOffset = 0;
3026
3027  for (var i = 0; i < mask.length; i++) {
3028    var m = mask.charAt(i);
3029    switch (m) {
3030      case '#':
3031        break;
3032      case 'A':
3033        break;
3034      case '?':
3035        break;
3036      case 'N':
3037        break;
3038      case 'X':
3039        break;
3040      default:
3041        data = data.replace(m, '');
3042    }
3043  }
3044  for (var _i = 0, x = 1; x && _i < mask.length; ++_i) {
3045    var c = data.charAt(_i - cOffset);
3046    var _m = mask.charAt(_i);
3047
3048    switch (_m) {
3049      case '#':
3050        if (/\d/.test(c)) {
3051          text += c;
3052        } else {
3053          x = 0;
3054        }break;
3055      case 'A':
3056        if (/[a-z]/i.test(c)) {
3057          text += c;
3058        } else {
3059          x = 0;
3060        }break;
3061      case 'N':
3062        if (/[a-z0-9]/i.test(c)) {
3063          text += c;
3064        } else {
3065          x = 0;
3066        }break;
3067
3068      case '?':
3069        cOffset++;break;
3070      case 'X':
3071        text += c;break;
3072      default:
3073        text += _m;
3074
3075        if (c && c !== _m) {
3076          data = ' ' + data;
3077        }
3078
3079        break;
3080    }
3081  }
3082  return text;
3083}
3084
3085var trigger = function trigger(el, type) {
3086  var e = document.createEvent('HTMLEvents');
3087  e.initEvent(type, true, true);
3088  el.dispatchEvent(e);
3089};
3090
3091function getNonMaskIndex(mask) {
3092    var indexes = [];
3093    for (var i = 0; i < mask.length; i++) {
3094        var m = mask.charAt(i);
3095        switch (m) {
3096          case '#':
3097            break;
3098          case 'A':
3099            break;
3100          case '?':
3101            break;
3102          case 'N':
3103            break;
3104          case 'X':
3105            break;
3106          default:
3107            indexes.push(i);
3108        }
3109      }
3110    return indexes;
3111}
3112
3113
3114function updateValue(el) {
3115  var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3116  var value = el.value,
3117      _el$dataset = el.dataset,
3118      _el$dataset$previousV = _el$dataset.previousValue,
3119      previousValue = _el$dataset$previousV === undefined ? "" : _el$dataset$previousV,
3120      lastPos = el.selectionStart,
3121      mask = _el$dataset.mask,
3122      nonMaskIndex = getNonMaskIndex(mask),
3123      deleted = value.length < previousValue.length;
3124
3125  if (force || value && value !== previousValue && value.length > previousValue.length && (lastPos === value.length ||  value.length > mask.length) || deleted && lastPos !== value.length && nonMaskIndex.indexOf(lastPos) !== -1) {
3126    el.value = format(value, mask);
3127    trigger(el, 'input');
3128  }
3129
3130  el.dataset.previousValue = value;
3131}
3132
3133function updateMask(el, mask) {
3134  el.dataset.mask = mask;
3135}
3136
3137var VueMaskDirective = {
3138  bind: function bind(el, _ref) {
3139    var value = _ref.value;
3140
3141    updateMask(el, value);
3142    updateValue(el);
3143  },
3144  componentUpdated: function componentUpdated(el, _ref2) {
3145    var value = _ref2.value,
3146        oldValue = _ref2.oldValue;
3147
3148
3149    var isMaskChanged = value !== oldValue;
3150
3151    if (isMaskChanged) {
3152      updateMask(el, value);
3153    }
3154
3155    updateValue(el, isMaskChanged);
3156  }
3157};
3158
3159var VueMaskPlugin = function VueMaskPlugin(Vue) {
3160  Vue.directive('mask', VueMaskDirective);
3161};
3162
3163exports.default = VueMaskPlugin;
3164exports.VueMaskPlugin = VueMaskPlugin;
3165exports.VueMaskDirective = VueMaskDirective;
3166
3167Object.defineProperty(exports, '__esModule', { value: true });
3168
3169})));
3170Vue.directive('mask', VueMask.VueMaskDirective);
3171/* global $, window, Granite, localStorage , XMLHttpRequest, Uint8Array, navigator, document, setTimeout, defaultMime, btoa*/
3172
3173Vue.directive('scroll', {
3174    inserted: function (el, binding) {
3175        var f = function (evt) {
3176            if (binding.value(evt, el)) {
3177                window.removeEventListener('scroll', f)
3178            }
3179        };
3180        window.addEventListener('scroll', f);
3181    }
3182});
3183
3184Vue.directive('mouse-enter', {
3185    inserted: function (el, binding) {
3186        var f = function (evt) {
3187            if (binding.value(evt, el)) {
3188                el.removeEventListener('mouseenter', f)
3189            }
3190        };
3191        el.addEventListener('mouseenter', f);
3192    }
3193});
3194
3195Vue.directive('mouse-leave', {
3196    inserted: function (el, binding) {
3197        var f = function (evt) {
3198            if (binding.value(evt, el)) {
3199                el.removeEventListener('mouseleave', f)
3200            }
3201        };
3202        el.addEventListener('mouseleave', f);
3203    }
3204});
3205
3206Vue.directive('click-outside', {
3207    bind: function(el, binding, vnode) {
3208        this.Event = function(event) {
3209            if (!(el === event.target || el.contains(event.target))) {
3210                vnode.context[binding.expression](event);
3211            }
3212        };
3213        window.addEventListener('click', this.Event);
3214    },
3215    unbind: function(el) {
3216        window.removeEventListener('click', this.Event);
3217    }
3218});
3219
3220Vue.directive('link-hover', {
3221    componentUpdated: function(el) {
3222       $(el).find("a").addClass("link link--body");
3223    }
3224});
3225
3226var catalogTypeUtils = {
3227    data: function () {
3228        return {
3229            CATALOG: {
3230                SMARTPHONE: 'SmartPhone',
3231                ACCESSORY: 'Accessory',
3232                ROUTER: 'Router',
3233                TABLET: 'Tablet',
3234                HOTSPOT: 'Hotspot',
3235                SIM_CARD: 'SIM Card',
3236                PACK: 'Pack',
3237                MOBILE_BROADBAND: 'Mobile Broadband',
3238                IOT: 'IoT'
3239            },
3240            CATEGORY: {
3241                PROTECTION: 'CAPAS',
3242                CHARGER: 'CABOS E CARREGADORES',
3243                SOUND: 'SOM',
3244                PHOTO: 'FOTOGRAFIA',
3245                MEMORY: 'CARTÕES DE MEMÓRIA',
3246                GAMING: 'GAMING',
3247                ADAPTERS: 'ADAPTADORES',
3248                WEARABLES: 'WEARABLES',
3249                PROTECTION_GLASS: 'VIDROS TEMPERADOS',
3250                SMART_LIGHTING: 'LÂMPADAS INTELIGENTES',
3251                CONNECTIVITY: 'TOMADAS E ADAPTADORES',
3252                TV: 'ACESSÓRIOS PARA TV',
3253                LANDLINE: 'TELEFONES FIXOS',
3254                OTHERS: 'OUTROS'
3255            },
3256            SVG: {
3257                ECO_RATING: {
3258                A: `<svg class="productComp__ecoLabelIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="40px" height="auto" viewBox="0 0 438 240" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">
3259                        <g><path style="opacity:0.943" fill="#232221" d="M 0.5,-0.5 C 109.833,-0.5 219.167,-0.5 328.5,-0.5C 365.23,38.8928 401.564,78.5594 437.5,118.5C 437.5,118.833 437.5,119.167 437.5,119.5C 401.652,159.8 365.319,199.8 328.5,239.5C 219.167,239.5 109.833,239.5 0.5,239.5C 0.5,238.833 0.166667,238.5 -0.5,238.5C -0.5,159.167 -0.5,79.8333 -0.5,0.5C 0.166667,0.5 0.5,0.166667 0.5,-0.5 Z"/></g>
3260                        <g><path style="opacity:1" fill="#9d9c9c" d="M 92.5,2.5 C 92.5,2.83333 92.5,3.16667 92.5,3.5C 62.8333,3.5 33.1667,3.5 3.5,3.5C 3.5,80.8333 3.5,158.167 3.5,235.5C 33.1667,235.5 62.8333,235.5 92.5,235.5C 93.8333,235.5 95.1667,235.5 96.5,235.5C 65.3378,236.498 34.0044,236.832 2.5,236.5C 2.5,158.5 2.5,80.5 2.5,2.5C 32.5,2.5 62.5,2.5 92.5,2.5 Z"/></g>
3261                        <g><path style="opacity:1" fill="#fdfdfd" d="M 92.5,3.5 C 92.5,80.8333 92.5,158.167 92.5,235.5C 62.8333,235.5 33.1667,235.5 3.5,235.5C 3.5,158.167 3.5,80.8333 3.5,3.5C 33.1667,3.5 62.8333,3.5 92.5,3.5 Z"/></g>
3262                        <g><path style="opacity:1" fill="#01a551" d="M 92.5,2.5 C 170.503,2.16669 248.503,2.50002 326.5,3.5C 362.202,41.867 397.535,80.5337 432.5,119.5C 397.719,158.45 362.386,196.95 326.5,235C 249.834,235.5 173.167,235.667 96.5,235.5C 95.1667,235.5 93.8333,235.5 92.5,235.5C 92.5,158.167 92.5,80.8333 92.5,3.5C 92.5,3.16667 92.5,2.83333 92.5,2.5 Z"/></g>
3263                        <g><path style="opacity:1" fill="#272022" d="M 42.5,18.5 C 47.1785,18.3342 51.8452,18.5008 56.5,19C 57,19.5 57.5,20 58,20.5C 64.6381,38.7458 70.6381,57.0791 76,75.5C 72.2564,76.626 68.423,76.7927 64.5,76C 63.2741,72.1567 61.9408,68.3234 60.5,64.5C 52.8333,63.1667 45.1667,63.1667 37.5,64.5C 36.0592,68.3234 34.7259,72.1567 33.5,76C 29.8484,76.4986 26.1817,76.6653 22.5,76.5C 28.1828,56.7835 34.8495,37.4501 42.5,18.5 Z"/></g>
3264                        <g><path style="opacity:1" fill="#f2f2f2" d="M 56.5,52.5 C 51.5,53.8333 46.5,53.8333 41.5,52.5C 43.4936,44.6855 45.9936,37.0189 49,29.5C 52.0064,37.0189 54.5064,44.6855 56.5,52.5 Z"/></g>
3265                        <g><path style="opacity:1" fill="#908d8e" d="M 41.5,52.5 C 46.5,53.8333 51.5,53.8333 56.5,52.5C 57.0431,52.56 57.3764,52.8933 57.5,53.5C 51.8333,54.8333 46.1667,54.8333 40.5,53.5C 40.6236,52.8933 40.9569,52.56 41.5,52.5 Z"/></g>
3266                        <g><path style="opacity:1" fill="#0f1711" d="M 197.5,62.5 C 205.507,62.3336 213.507,62.5003 221.5,63C 222.931,63.4652 224.097,64.2986 225,65.5C 236.865,101.427 248.531,137.427 260,173.5C 260.896,176.025 260.396,178.192 258.5,180C 251.5,180.667 244.5,180.667 237.5,180C 233.818,172.125 230.818,163.959 228.5,155.5C 215.5,154.167 202.5,154.167 189.5,155.5C 187.179,162.448 185.013,169.448 183,176.5C 182.535,177.931 181.701,179.097 180.5,180C 174.5,180.667 168.5,180.667 162.5,180C 160.632,179.101 159.632,177.601 159.5,175.5C 170.768,140.197 181.934,104.864 193,69.5C 194.012,66.7982 195.512,64.4649 197.5,62.5 Z"/></g>
3267                        <g><path style="opacity:1" fill="#fafafa" d="M 198.5,64.5 C 205.841,64.3337 213.174,64.5003 220.5,65C 221.416,65.3742 222.25,65.8742 223,66.5C 234.531,101.427 245.865,136.427 257,171.5C 257.497,173.81 257.663,176.143 257.5,178.5C 251.158,178.666 244.825,178.5 238.5,178C 235.138,169.72 232.472,161.22 230.5,152.5C 216.151,152.167 201.818,152.501 187.5,153.5C 184.999,161.506 182.499,169.506 180,177.5C 174.259,178.475 168.425,178.808 162.5,178.5C 162.387,173.67 163.22,169.003 165,164.5C 175.333,132.5 185.667,100.5 196,68.5C 196.662,67.0161 197.496,65.6828 198.5,64.5 Z"/></g>
3268                        <g><path style="opacity:1" fill="#171918" d="M 224.5,133.5 C 214.219,135.476 203.552,136.143 192.5,135.5C 197.534,117.701 203.034,100.035 209,82.5C 214.326,99.4731 219.492,116.473 224.5,133.5 Z"/></g>
3269                        <g><path style="opacity:1" fill="#1d1b02" d="M 47.5,90.5 C 49.1992,90.3398 50.8659,90.5065 52.5,91C 58.2941,96.1174 63.2941,101.784 67.5,108C 66.8413,112.082 64.508,113.416 60.5,112C 58.6667,110.167 56.8333,108.333 55,106.5C 54.6667,119.833 54.3333,133.167 54,146.5C 51.679,149.917 49.0124,150.25 46,147.5C 45.6667,133.833 45.3333,120.167 45,106.5C 42.8567,109.325 40.19,111.325 37,112.5C 32.9177,111.841 31.5844,109.508 33,105.5C 38.0365,100.631 42.8698,95.6313 47.5,90.5 Z"/></g>
3270                        <g><path style="opacity:1" fill="#00a04e" d="M 221.5,131.5 C 213.231,133.47 204.565,134.136 195.5,133.5C 199.514,118.962 204.014,104.629 209,90.5C 213.477,104.095 217.643,117.761 221.5,131.5 Z"/></g>
3271                        <g><path style="opacity:1" fill="#003f1e" d="M 221.5,131.5 C 222.404,132.209 222.737,133.209 222.5,134.5C 213.318,134.827 204.318,134.493 195.5,133.5C 204.565,134.136 213.231,133.47 221.5,131.5 Z"/></g>
3272                        <g><path style="opacity:1" fill="#606060" d="M 224.5,133.5 C 225.404,134.209 225.737,135.209 225.5,136.5C 214.321,136.828 203.321,136.495 192.5,135.5C 203.552,136.143 214.219,135.476 224.5,133.5 Z"/></g>
3273                        <g>
3273<path style="opacity:1" fill="#070707" d="M 61.5,210.5 C 62.4861,206.03 62.8195,201.363 62.5,196.5C 58.8333,196.5 55.1667,196.5 51.5,196.5C 50.2138,193.665 50.2138,190.832 51.5,188C 58.4143,187.189 65.2476,187.355 72,188.5C 72.6667,198.167 72.6667,207.833 72,217.5C 59.0178,223.779 46.6845,222.779 35,214.5C 25.8846,200.888 25.2179,186.888 33,172.5C 41.4554,162.926 51.9554,159.759 64.5,163C 72.1955,164.662 74.5289,169.162 71.5,176.5C 49.2549,166.034 38.4216,173.034 39,197.5C 42.0555,209.446 49.5555,213.78 61.5,210.5 Z"/></g>
3274                        <g><path style="opacity:1" fill="#929292" d="M 51.5,196.5 C 55.1667,196.5 58.8333,196.5 62.5,196.5C 62.8195,201.363 62.4861,206.03 61.5,210.5C 61.5,206.167 61.5,201.833 61.5,197.5C 57.9581,197.813 54.6248,197.479 51.5,196.5 Z"/></g>
3275                    <script xmlns=""/></svg>`,
3276                B: `<svg class="productComp__ecoLabelIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="40px" height="auto" viewBox="0 0 438 240" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">
3277                        <g><path style="opacity:0.944" fill="#252522" d="M 0.5,-0.5 C 110.167,-0.5 219.833,-0.5 329.5,-0.5C 365.506,39.1724 401.506,78.8391 437.5,118.5C 437.5,118.833 437.5,119.167 437.5,119.5C 401.221,159.451 364.888,199.451 328.5,239.5C 219.167,239.5 109.833,239.5 0.5,239.5C 0.5,238.833 0.166667,238.5 -0.5,238.5C -0.5,159.167 -0.5,79.8333 -0.5,0.5C 0.166667,0.5 0.5,0.166667 0.5,-0.5 Z"/></g>
3278                        <g><path style="opacity:1" fill="#9b9a9a" d="M 92.5,3.5 C 62.8333,3.5 33.1667,3.5 3.5,3.5C 3.5,80.8333 3.5,158.167 3.5,235.5C 33.1667,235.5 62.8333,235.5 92.5,235.5C 62.6713,236.498 32.6713,236.831 2.5,236.5C 2.5,158.5 2.5,80.5 2.5,2.5C 32.6713,2.16857 62.6713,2.5019 92.5,3.5 Z"/></g>
3279                        <g><path style="opacity:1" fill="#fdfdfd" d="M 92.5,3.5 C 92.5,80.8333 92.5,158.167 92.5,235.5C 62.8333,235.5 33.1667,235.5 3.5,235.5C 3.5,158.167 3.5,80.8333 3.5,3.5C 33.1667,3.5 62.8333,3.5 92.5,3.5 Z"/></g>
3280                        <g><path style="opacity:1" fill="#50b748" d="M 92.5,3.5 C 170.834,3.33334 249.167,3.5 327.5,4C 362.685,42.3504 397.685,80.8504 432.5,119.5C 397.719,158.45 362.386,196.95 326.5,235C 248.501,235.5 170.501,235.667 92.5,235.5C 92.5,158.167 92.5,80.8333 92.5,3.5 Z"/></g>
3281                        <g><path style="opacity:1" fill="#272022" d="M 42.5,17.5 C 46.8461,17.3343 51.1794,17.501 55.5,18C 56.3333,18.8333 57.1667,19.6667 58,20.5C 64.6307,38.7239 70.6307,57.0572 76,75.5C 72.2564,76.626 68.423,76.7927 64.5,76C 63.2741,72.1567 61.9408,68.3234 60.5,64.5C 52.8333,63.1667 45.1667,63.1667 37.5,64.5C 36.0592,68.3234 34.7259,72.1567 33.5,76C 29.8484,76.4986 26.1817,76.6653 22.5,76.5C 28.3853,56.5099 35.052,36.8432 42.5,17.5 Z"/></g>
3282                        <g><path style="opacity:1" fill="#f3f3f3" d="M 56.5,52.5 C 51.5,53.8333 46.5,53.8333 41.5,52.5C 43.4936,44.6855 45.9936,37.0189 49,29.5C 52.0064,37.0189 54.5064,44.6855 56.5,52.5 Z"/></g>
3283                        <g><path style="opacity:1" fill="#908d8e" d="M 41.5,52.5 C 46.5,53.8333 51.5,53.8333 56.5,52.5C 57.0431,52.56 57.3764,52.8933 57.5,53.5C 51.8333,54.8333 46.1667,54.8333 40.5,53.5C 40.6236,52.8933 40.9569,52.56 41.5,52.5 Z"/></g>
3284                        <g><path style="opacity:1" fill="#1d1b03" d="M 45.5,146.5 C 45.6666,133.163 45.4999,119.829 45,106.5C 44.2828,107.044 43.7828,107.711 43.5,108.5C 42.0384,109.458 40.7051,110.624 39.5,112C 33.3333,113.833 31.1667,111.667 33,105.5C 38.1174,99.7059 43.7841,94.7059 50,90.5C 56.2159,94.7059 61.8826,99.7059 67,105.5C 68.1667,111 66,113.167 60.5,112C 58.6667,110.167 56.8333,108.333 55,106.5C 54.6667,120.167 54.3333,133.833 54,147.5C 50.7417,150.346 47.9083,150.013 45.5,146.5 Z"/></g>
3285                        <g><path style="opacity:1" fill="#c6c6bf" d="M 45.5,146.5 C 44.8333,133.833 44.1667,121.167 43.5,108.5C 43.7828,107.711 44.2828,107.044 45,106.5C 45.4999,119.829 45.6666,133.163 45.5,146.5 Z"/></g>
3286                        <g><path style="opacity:1" fill="#131812" d="M 179.5,64.5 C 193.541,64.1344 207.541,64.6344 221.5,66C 243.138,70.664 251.304,83.8306 246,105.5C 243.906,111.051 240.406,115.384 235.5,118.5C 247.405,123.8
328611 253.405,132.978 253.5,146C 254.064,162.734 246.564,173.901 231,179.5C 227.25,180.708 223.416,181.542 219.5,182C 205.833,182.667 192.167,182.667 178.5,182C 177.667,181.167 176.833,180.333 176,179.5C 174.346,142.918 174.013,106.251 175,69.5C 176.366,67.6383 177.866,65.9717 179.5,64.5 Z"/></g>
3287                        <g><path style="opacity:1" fill="#fafafa" d="M 179.5,67.5 C 194.877,67.101 210.21,67.601 225.5,69C 241.311,74.1069 247.811,84.9402 245,101.5C 242.659,109.841 237.493,115.674 229.5,119C 248.503,125.166 255.336,137.999 250,157.5C 245.945,169.214 237.779,176.381 225.5,179C 210.199,180.525 194.866,180.859 179.5,180C 179,179.5 178.5,179 178,178.5C 176.347,142.585 176.013,106.585 177,70.5C 178.045,69.6266 178.878,68.6266 179.5,67.5 Z"/></g>
3288                        <g><path style="opacity:1" fill="#0a0c0a" d="M 215.5,130.5 C 225.412,131.578 230.745,137.078 231.5,147C 231.812,155.691 227.812,161.358 219.5,164C 211.841,164.5 204.174,164.666 196.5,164.5C 196.5,153.167 196.5,141.833 196.5,130.5C 202.833,130.5 209.167,130.5 215.5,130.5 Z"/></g>
3289                        <g><path style="opacity:1" fill="#383838" d="M 215.5,130.5 C 209.167,130.5 202.833,130.5 196.5,130.5C 196.5,141.833 196.5,153.167 196.5,164.5C 195.505,153.012 195.172,141.345 195.5,129.5C 202.354,129.176 209.021,129.509 215.5,130.5 Z"/></g>
3290                        <g><path style="opacity:1" fill="#181a17" d="M 195.5,82.5 C 202.896,82.1997 210.229,82.6997 217.5,84C 226.536,89.7907 228.703,97.6241 224,107.5C 222.167,109.333 220.333,111.167 218.5,113C 210.905,114.356 203.238,114.856 195.5,114.5C 195.5,103.833 195.5,93.1667 195.5,82.5 Z"/></g>
3291                        <g><path style="opacity:1" fill="#4fb647" d="M 213.5,85.5 C 217.912,86.0701 221.078,88.4034 223,92.5C 223.726,97.2387 223.393,101.905 222,106.5C 220.039,109.135 217.539,110.969 214.5,112C 209.177,112.499 203.844,112.666 198.5,112.5C 198.5,103.5 198.5,94.5 198.5,85.5C 203.5,85.5 208.5,85.5 213.5,85.5 Z"/></g>
3292                        <g><path style="opacity:1" fill="#224e1e" d="M 213.5,85.5 C 208.5,85.5 203.5,85.5 198.5,85.5C 198.5,94.5 198.5,103.5 198.5,112.5C 197.506,103.348 197.173,94.015 197.5,84.5C 203.026,84.1786 208.36,84.5119 213.5,85.5 Z"/></g>
3293                        <g><path style="opacity:1" fill="#245320" d="M 215.5,132.5 C 209.833,132.5 204.167,132.5 198.5,132.5C 198.5,142.5 198.5,152.5 198.5,162.5C 197.506,152.347 197.172,142.014 197.5,131.5C 203.69,131.177 209.69,131.51 215.5,132.5 Z"/></g>
3294                        <g><path style="opacity:1" fill="#4fb547" d="M 215.5,132.5 C 224.276,133.611 228.942,138.611 229.5,147.5C 229.413,155.083 225.746,159.916 218.5,162C 211.842,162.5 205.175,162.666 198.5,162.5C 198.5,152.5 198.5,142.5 198.5,132.5C 204.167,132.5 209.833,132.5 215.5,132.5 Z"/></g>
3295                        <g><path style="opacity:1" fill="#070707" d="M 61.5,210.5 C 62.4861,206.03 62.8195,201.363 62.5,196.5C 58.8333,196.5 55.1667,196.5 51.5,196.5C 50.2138,193.665 50.2138,190.832 51.5,188C 58.4143,187.189 65.2476,187.355 72,188.5C 72.6667,198.167 72.6667,207.833 72,217.5C 59.0178,223.779 46.6845,222.779 35,214.5C 25.8846,200.888 25.2179,186.888 33,172.5C 41.4554,162.926 51.9554,159.759 64.5,163C 72.1955,164.662 74.5289,169.162 71.5,176.5C 49.2549,166.034 38.4216,173.034 39,197.5C 42.0555,209.446 49.5555,213.78 61.5,210.5 Z"/></g>
3296                        <g><path style="opacity:1" fill="#929292" d="M 51.5,196.5 C 55.1667,196.5 58.8333,196.5 62.5,196.5C 62.8195,201.363 62.4861,206.03 61.5,210.5C 61.5,206.167 61.5,201.833 61.5,197.5C 57.9581,197.813 54.6248,197.479 51.5,196.5 Z"/></g>
3297                    <script xmlns=""/></svg>`,
3298                C: `<svg class="productComp__ecoLabelIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="40px" height="auto" viewBox="0 0 438 240" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">
3299                        <g><path style="opacity:0.938" fill="#262220" d="M 0.5,-0.5 C 110.167,-0.5 219.833,-0.5 329.5,-0.5C 365.528,39.1925 401.528,78.8591 437.5,118.5C 437.5,118.833 437.5,119.167 437.5,119.5C 401.221,159.451 364.888,199.451 328.5,239.5C 219.167,239.5 109.833,239.5 0.5,239.5C 0.5,238.833 0.166667,238.5 -0.5,238.5C -0.5,159.167 -0.5,79.8333 -0.5,0.5C 0.166667,0.5 0.5,0.166667 0.5,-0.5 Z"/></g>
3300                        <g><path style="opacity:1" fill="#989797" d="M 92.5,3.5 C 62.8333,3.5 33.1667,3.5 3.5,3.5C 3.5,80.8333 3.5,158.167 3.5,235.5C 33.1667,235.5 62.8333,235.5 92.5,235.5C 92.5,235.833 92.5,236.167 92.5,236.5C 62.5,236.5 32.5,236.5 2.5,236.5C 2.5,158.5 2.5,80.5 2.5,2.5C 32.6713,2.16857 62.6713,2.5019 92.5,3.5 Z"/></g>
3301                        <g><path style="opacity:1" fill="#fdfdfd" d="M 92.5,3.5 C 92.5,80.8333 92.5,158.167 92.5,235.5C 62.8333,235.5 33.1667,235.5 3.5,235.5C 3.5,158.167 3.5,80.8333 3.5,3.5C 33.1667,3.5 62.8333,3.5 92.5,3.5 Z"/></g>
3302                        <g><path style="opacity:1" fill="#bed630" d="M 92.5,3.5 C 170.834,3.33334 249.167,3.5 327.5,4C 362.685,42.3504 397.685,80.8504 432.5,119.5C 397.535,158.466 362.202,197.133 326.5,235.5C 248.503,236.5 170.503,236.833 92.5,236.5C 92.5,236.167 92.5,235.833 92.5,235.5C 92.5,158.167 92.5,80.8333 92.5,3.5 Z"/></g>
3303                        <g><path style="opacity:1" fill="#272022" d="M 42.5,17.5 C 46.8461,17.3343 51.1794,17.501 55.5,18C 56.3333,18.8333 57.1667,19.6667 58,20.5C 64.6307,38.7239 70.6307,57.0572 76,75.5C 72.2564,76.626 68.423,76.7927 64.5,76C 63.2741,72.1567 61.9408,68.3234 60.5,64.5C 52.8333,63.1667 45.1667,63.1667 37.5,64.5C 36.0592,68.3234 34.7259,72.1567 33.5,76C 29.8484,76.4986 26.1817,76.6653 22.5,76.5C 28.3853,56.5099 35.052,36.8432 42.5,17.5 Z"/></g>
3304                        <g><path style="opacity:1" fill="#f3f3f3" d="M 56.5,52.5 C 51.5,53.8333 46.5,53.8333 41.5,52.5C 43.4936,44.6855 45.9936,37.0189 49,29.5C 52.0064,37.0189 54.5064,44.6855 56.5,52.5 Z"/></g>
3305                        <g><path style="opacity:1" fill="#908d8e" d="M 41.5,52.5 C 46.5,53.8333 51.5,53.8333 56.5,52.5C 57.0431,52.56 57.3764,52.8933 57.5,53.5C 51.8333,54.8333 46.1667,54.8333 40.5,53.5C 40.6236,52.8933 40.9569,52.56 41.5,52.5 Z"/></g>
3306                        <g><path style="opacity:1" fill="#1d1c03" d="M 45.5,146.5 C 45.6666,133.163 45.4999,119.829 45,106.5C 44.2828,107.044 43.7828,107.711 43.5,108.5C 42.0384,109.458 40.7051,110.624 39.5,112C 33.3333,113.833 31.1667,111.667 33,105.5C 38.1174,99.7059 43.7841,94.7059 50,9
33060.5C 56.2159,94.7059 61.8826,99.7059 67,105.5C 68.1667,111 66,113.167 60.5,112C 58.6667,110.167 56.8333,108.333 55,106.5C 54.6667,120.167 54.3333,133.833 54,147.5C 50.7417,150.346 47.9083,150.013 45.5,146.5 Z"/></g>
3307                        <g><path style="opacity:1" fill="#171712" d="M 210.5,63.5 C 222.897,61.9287 234.564,64.0954 245.5,70C 247,71.5 248.5,73 250,74.5C 250.667,80.5 250.667,86.5 250,92.5C 249.051,95.1997 247.217,96.033 244.5,95C 234.662,85.3871 223.329,83.0538 210.5,88C 203.11,93.2643 198.61,100.431 197,109.5C 193.924,124.898 195.924,139.565 203,153.5C 211.903,162.817 222.403,164.984 234.5,160C 238.165,158.503 241.498,156.503 244.5,154C 247.025,153.104 249.192,153.604 251,155.5C 255.189,168.288 251.022,176.788 238.5,181C 217.416,188.875 198.916,185.042 183,169.5C 176.25,159.921 172.25,149.255 171,137.5C 167.675,115.804 172.342,96.1372 185,78.5C 192.273,71.2849 200.773,66.2849 210.5,63.5 Z"/></g>
3308                        <g><path style="opacity:1" fill="#fafafa" d="M 213.5,65.5 C 224.474,64.6607 234.808,66.8273 244.5,72C 245.667,73.1667 246.833,74.3333 248,75.5C 248.667,80.5 248.667,85.5 248,90.5C 247.612,91.428 246.945,92.0946 246,92.5C 241.758,89.6267 237.258,87.1267 232.5,85C 212.225,80.2284 199.725,88.0617 195,108.5C 191.893,124.547 193.893,139.88 201,154.5C 210.616,164.908 222.116,167.408 235.5,162C 239.593,160.206 243.426,158.039 247,155.5C 252.876,166.891 249.71,174.724 237.5,179C 198.657,188.497 177.157,173.33 173,133.5C 171.157,116.888 174.157,101.221 182,86.5C 189.746,75.2345 200.246,68.2345 213.5,65.5 Z"/></g>
3309                        <g><path style="opacity:1" fill="#c5c5be" d="M 45.5,146.5 C 44.8333,133.833 44.1667,121.167 43.5,108.5C 43.7828,107.711 44.2828,107.044 45,106.5C 45.4999,119.829 45.6666,133.163 45.5,146.5 Z"/></g>
3310                        <g><path style="opacity:1" fill="#070707" d="M 61.5,210.5 C 62.4861,206.03 62.8195,201.363 62.5,196.5C 58.8333,196.5 55.1667,196.5 51.5,196.5C 50.2138,193.665 50.2138,190.832 51.5,188C 58.4143,187.189 65.2476,187.355 72,188.5C 72.6667,198.167 72.6667,207.833 72,217.5C 59.0178,223.779 46.6845,222.779 35,214.5C 25.8846,200.888 25.2179,186.888 33,172.5C 41.4554,162.926 51.9554,159.759 64.5,163C 72.1955,164.662 74.5289,169.162 71.5,176.5C 49.2549,166.034 38.4216,173.034 39,197.5C 42.0555,209.446 49.5555,213.78 61.5,210.5 Z"/></g>
3311                        <g><path style="opacity:1" fill="#929292" d="M 51.5,196.5 C 55.1667,196.5 58.8333,196.5 62.5,196.5C 62.8195,201.363 62.4861,206.03 61.5,210.5C 61.5,206.167 61.5,201.833 61.5,197.5C 57.9581,197.813 54.6248,197.479 51.5,196.5 Z"/></g>
3312                    <script xmlns=""/></svg>`,
3313                D: `<svg class="productComp__ecoLabelIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="40px" height="auto" viewBox="0 0 438 240" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">
3314                        <g><path style="opacity:0.944" fill="#24201f" d="M 0.5,-0.5 C 110.167,-0.5 219.833,-0.5 329.5,-0.5C 365.506,39.1724 401.506,78.8391 437.5,118.5C 437.5,118.833 437.5,119.167 437.5,119.5C 401.221,159.451 364.888,199.451 328.5,239.5C 219.167,239.5 109.833,239.5 0.5,239.5C 0.5,238.833 0.166667,238.5 -0.5,238.5C -0.5,159.167 -0.5,79.8333 -0.5,0.5C 0.166667,0.5 0.5,0.166667 0.5,-0.5 Z"/></g>
3315                        <g><path style="opacity:1" fill="#918965" d="M 326.5,3.5 C 248.5,3.5 170.5,3.5 92.5,3.5C 62.8333,3.5 33.1667,3.5 3.5,3.5C 3.5,80.8333 3.5,158.167 3.5,235.5C 33.1667,235.5 62.8333,235.5 92.5,235.5C 170.5,235.5 248.5,235.5 326.5,235.5C 218.668,236.499 110.668,236.833 2.5,236.5C 2.5,158.5 2.5,80.5 2.5,2.5C 110.668,2.16718 218.668,2.50052 326.5,3.5 Z"/></g>
3316                        <g><path style="opacity:1" fill="#fdfdfd" d="M 92.5,3.5 C 92.5,80.8333 92.5,158.167 92.5,235.5C 62.8333,235.5 33.1667,235.5 3.5,235.5C 3.5,158.167 3.5,80.8333 3.5,3.5C 33.1667,3.5 62.8333,3.5 92.5,3.5 Z"/></g>
3317                        <g><path style="opacity:1" fill="#fef101" d="M 92.5,3.5 C 170.5,3.5 248.5,3.5 326.5,3.5C 362.152,41.8211 397.485,80.4877 432.5,119.5C 397.513,158.486 362.18,197.153 326.5,235.5C 248.5,235.5 170.5,235.5 92.5,235.5C 92.5,158.167 92.5,80.8333 92.5,3.5 Z"/></g>
3318                        <g><path style="opacity:1" fill="#272022" d="M 42.5,17.5 C 46.8461,17.3343 51.1794,17.501 55.5,18C 56.3333,18.8333 57.1667,19.6667 58,20.5C 64.6307,38.7239 70.6307,57.0572 76,75.5C 72.2564,76.626 68.423,76.7927 64.5,76C 63.2741,72.1567 61.9408,68.3234 60.5,64.5C 52.8333,63.1667 45.1667,63.1667 37.5,64.5C 36.0592,68.3234 34.7259,72.1567 33.5,76C 29.8484,76.4986 26.1817,76.6653 22.5,76.5C 28.3853,56.5099 35.052,36.8432 42.5,17.5 Z"/></g>
3319                        <g><path style="opacity:1" fill="#f3f3f3" d="M 56.5,52.5 C 51.5,53.8333 46.5,53.8333 41.5,52.5C 43.4936,44.6855 45.9936,37.0189 49,29.5C 52.0064,37.0189 54.5064,44.6855 56.5,52.5 Z"/></g>
3320                        <g><path style="opacity:1" fill="#908d8e" d="M 41.5,52.5 C 46.5,53.8333 51.5,53.8333 56.5,52.5C 57.0431,52.56 57.3764,52.8933 57.5,53.5C 51.8333,54.8333 46.1667,54.8333 40.5,53.5C 40.6236,52.8933 40.9569,52.56 41.5,52.5 Z"/></g>
3321                        <g><path style="opacity:1" fill="#13120d" d="M 182.5,65.5 C 196.504,65.3334 210.504,65.5001 224.5,66C 252.017,69.8528 266.85,85.6861 269,113.5C 270.914,130.443 267.914,146.443 260,161.5C 251.523,173.29 240.023,180.123 225.5,182C 211.167,182.667 196.833,182.667 182.5,182C 181.667,181.167 180.833,180.333 180,179.5C 178.353,142.893 178.019,106.227 179,69.5C 180.376,68.2949 181.542,66.9616 182.5,65.5 Z"/></g>
3322                        <g><path style="opacity:1" fill="#fafafa" d="M 183.5,67.5 C 196.837,67.3334 210.171,67.5001 223.5,68C 249.754,71.255 264.254,86.0883 267,112.5C 269.01,130.79 265.343,147.79 256,163.5C 247.436,173.362 236.603,178.862 223.5,180C 210.167,180.667 196.833,180.667 183.5,180C 183,179.5 182.5,179 182,178.5C 180.347,142.585 180.013,106.585 181,70.5C 182.045,69.6266 182.878,68.6266 183.5,67.5 Z"/></g>
3323                        <g><path style="opacity:1" fill="#a6a6a6" d="M 200.5,83.5 C 200.5,110.167 200.5,136.833 200.5,163.5C 206.167,163.5 211.833,163.5 217.5,163.5C 211.69,164.49 205.69,164.823 199.5,164.5C 199.169,137.328 199.502,110.328 200.5,83.5 Z"/></g>
3324                        <g><path style="opacity:1" fill="#121009" d="M 200.5,83.5 C 207.175,83.3337 213.842,83.5004 220.5,84C 234.333,87.1667 242.833,95.6667 246,109.5C 246.667,118.167 246.667,126.833 246,135.5C 243.841,152.494 234.341,161.827 217.5,163.5C 211.833,163.5 206.167,163.5 200.5,163.5C 200.5,136.833 200.5,110.167 200.5,83.5 Z"/></g>
3325                        <g><path style="opacity:1" fill="#fdf000" d="M 202.5,85.5 C 230.079,82.2542 244.079,94.4208 244.5,122C 246.161,151.839 232.161,165.006 202.5,161.5C 202.5,136.167 202.5,
3325110.833 202.5,85.5 Z"/></g>
3326                        <g><path style="opacity:1" fill="#1d1b03" d="M 47.5,90.5 C 49.1992,90.3398 50.8659,90.5065 52.5,91C 58.2941,96.1174 63.2941,101.784 67.5,108C 66.8413,112.082 64.508,113.416 60.5,112C 58.6667,110.167 56.8333,108.333 55,106.5C 54.6667,120.167 54.3333,133.833 54,147.5C 51.3333,150.167 48.6667,150.167 46,147.5C 45.6667,133.833 45.3333,120.167 45,106.5C 42.8012,109.552 39.9678,111.552 36.5,112.5C 33.5,112.833 32.1667,111.5 32.5,108.5C 32.6667,107.5 32.8333,106.5 33,105.5C 38.0365,100.631 42.8698,95.6313 47.5,90.5 Z"/></g>
3327                        <g><path style="opacity:1" fill="#070707" d="M 61.5,210.5 C 62.4861,206.03 62.8195,201.363 62.5,196.5C 58.8333,196.5 55.1667,196.5 51.5,196.5C 50.2138,193.665 50.2138,190.832 51.5,188C 58.4143,187.189 65.2476,187.355 72,188.5C 72.6667,198.167 72.6667,207.833 72,217.5C 59.0178,223.779 46.6845,222.779 35,214.5C 25.8846,200.888 25.2179,186.888 33,172.5C 41.4554,162.926 51.9554,159.759 64.5,163C 72.1955,164.662 74.5289,169.162 71.5,176.5C 49.2549,166.034 38.4216,173.034 39,197.5C 42.0555,209.446 49.5555,213.78 61.5,210.5 Z"/></g>
3328                        <g><path style="opacity:1" fill="#929292" d="M 51.5,196.5 C 55.1667,196.5 58.8333,196.5 62.5,196.5C 62.8195,201.363 62.4861,206.03 61.5,210.5C 61.5,206.167 61.5,201.833 61.5,197.5C 57.9581,197.813 54.6248,197.479 51.5,196.5 Z"/></g>
3329                    <script xmlns=""/></svg>`,
3330                E: `<svg class="productComp__ecoLabelIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="40px" height="auto" viewBox="0 0 438 240" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">
3331                        <g><path style="opacity:0.938" fill="#242020" d="M 0.5,-0.5 C 110.167,-0.5 219.833,-0.5 329.5,-0.5C 365.528,39.1925 401.528,78.8591 437.5,118.5C 437.5,118.833 437.5,119.167 437.5,119.5C 401.221,159.451 364.888,199.451 328.5,239.5C 219.167,239.5 109.833,239.5 0.5,239.5C 0.5,238.833 0.166667,238.5 -0.5,238.5C -0.5,159.167 -0.5,79.8333 -0.5,0.5C 0.166667,0.5 0.5,0.166667 0.5,-0.5 Z"/></g>
3332                        <g><path style="opacity:1" fill="#938165" d="M 326.5,3.5 C 248.5,3.5 170.5,3.5 92.5,3.5C 62.8333,3.5 33.1667,3.5 3.5,3.5C 3.5,80.8333 3.5,158.167 3.5,235.5C 33.1667,235.5 62.8333,235.5 92.5,235.5C 170.5,235.5 248.5,235.5 326.5,235.5C 218.668,236.499 110.668,236.833 2.5,236.5C 2.5,158.5 2.5,80.5 2.5,2.5C 110.668,2.16718 218.668,2.50052 326.5,3.5 Z"/></g>
3333                        <g><path style="opacity:1" fill="#fdfdfd" d="M 92.5,3.5 C 92.5,80.8333 92.5,158.167 92.5,235.5C 62.8333,235.5 33.1667,235.5 3.5,235.5C 3.5,158.167 3.5,80.8333 3.5,3.5C 33.1667,3.5 62.8333,3.5 92.5,3.5 Z"/></g>
3334                        <g><path style="opacity:1" fill="#fcb813" d="M 92.5,3.5 C 170.5,3.5 248.5,3.5 326.5,3.5C 362.152,41.8211 397.485,80.4877 432.5,119.5C 397.513,158.486 362.18,197.153 326.5,235.5C 248.5,235.5 170.5,235.5 92.5,235.5C 92.5,158.167 92.5,80.8333 92.5,3.5 Z"/></g>
3335                        <g><path style="opacity:1" fill="#272022" d="M 42.5,17.5 C 46.8461,17.3343 51.1794,17.501 55.5,18C 56.3333,18.8333 57.1667,19.6667 58,20.5C 64.6307,38.7239 70.6307,57.0572 76,75.5C 72.2564,76.626 68.423,76.7927 64.5,76C 63.2741,72.1567 61.9408,68.3234 60.5,64.5C 52.8333,63.1667 45.1667,63.1667 37.5,64.5C 36.0592,68.3234 34.7259,72.1567 33.5,76C 29.8484,76.4986 26.1817,76.6653 22.5,76.5C 28.3853,56.5099 35.052,36.8432 42.5,17.5 Z"/></g>
3336                        <g><path style="opacity:1" fill="#f3f3f3" d="M 56.5,52.5 C 51.5,53.8333 46.5,53.8333 41.5,52.5C 43.4936,44.6855 45.9936,37.0189 49,29.5C 52.0064,37.0189 54.5064,44.6855 56.5,52.5 Z"/></g>
3337                        <g><path style="opacity:1" fill="#908d8e" d="M 41.5,52.5 C 46.5,53.8333 51.5,53.8333 56.5,52.5C 57.0431,52.56 57.3764,52.8933 57.5,53.5C 51.8333,54.8333 46.1667,54.8333 40.5,53.5C 40.6236,52.8933 40.9569,52.56 41.5,52.5 Z"/></g>
3338                        <g><path style="opacity:1" fill="#0f0d0b" d="M 249.5,82.5 C 236.5,82.5 223.5,82.5 210.5,82.5C 210.5,91.5 210.5,100.5 210.5,109.5C 221.5,109.5 232.5,109.5 243.5,109.5C 244.79,110.058 245.623,111.058 246,112.5C 246.667,116.833 246.667,12
33381.167 246,125.5C 245.623,126.942 244.79,127.942 243.5,128.5C 232.5,128.5 221.5,128.5 210.5,128.5C 210.172,139.014 210.506,149.347 211.5,159.5C 224.504,159.333 237.504,159.5 250.5,160C 251.126,160.75 251.626,161.584 252,162.5C 252.974,168.187 252.474,173.687 250.5,179C 230.5,179.667 210.5,179.667 190.5,179C 190,178.5 189.5,178 189,177.5C 187.346,140.585 187.013,103.585 188,66.5C 189.167,65.3333 190.333,64.1667 191.5,63C 210.833,62.3333 230.167,62.3333 249.5,63C 251.941,65.6532 252.941,68.8199 252.5,72.5C 252.92,76.3741 251.92,79.7074 249.5,82.5 Z"/></g>
3339                        <g><path style="opacity:1" fill="#fdfdfd" d="M 248.5,80.5 C 235.167,80.5 221.833,80.5 208.5,80.5C 208.5,90.8333 208.5,101.167 208.5,111.5C 219.833,111.5 231.167,111.5 242.5,111.5C 244.033,113.634 244.7,116.134 244.5,119C 244.7,121.866 244.033,124.366 242.5,126.5C 231.167,126.5 219.833,126.5 208.5,126.5C 208.172,138.345 208.505,150.012 209.5,161.5C 223.247,160.862 236.747,161.529 250,163.5C 250.772,167.89 250.606,172.223 249.5,176.5C 229.935,177.825 210.435,177.825 191,176.5C 189.347,140.251 189.013,103.918 190,67.5C 190.833,66.6667 191.667,65.8333 192.5,65C 211.167,64.3333 229.833,64.3333 248.5,65C 249.81,70.1662 249.81,75.3329 248.5,80.5 Z"/></g>
3340                        <g><path style="opacity:1" fill="#1d1b03" d="M 45.5,146.5 C 45.6666,133.163 45.4999,119.829 45,106.5C 44.2828,107.044 43.7828,107.711 43.5,108.5C 42.0384,109.458 40.7051,110.624 39.5,112C 33.3333,113.833 31.1667,111.667 33,105.5C 38.1174,99.7059 43.7841,94.7059 50,90.5C 56.2159,94.7059 61.8826,99.7059 67,105.5C 68.1667,111 66,113.167 60.5,112C 58.6667,110.167 56.8333,108.333 55,106.5C 54.6667,120.167 54.3333,133.833 54,147.5C 50.7417,150.346 47.9083,150.013 45.5,146.5 Z"/></g>
3341                        <g><path style="opacity:1" fill="#c6c6bf" d="M 45.5,146.5 C 44.8333,133.833 44.1667,121.167 43.5,108.5C 43.7828,107.711 44.2828,107.044 45,106.5C 45.4999,119.829 45.6666,133.163 45.5,146.5 Z"/></g>
3342                        <g><path style="opacity:1" fill="#7e5c09" d="M 249.5,82.5 C 237.011,83.4954 224.344,83.8287 211.5,83.5C 211.5,91.8333 211.5,100.167 211.5,108.5C 222.346,108.172 233.013,108.506 243.5,109.5C 232.5,109.5 221.5,109.5 210.5,109.5C 210.5,100.5 210.5,91.5 210.5,82.5C 223.5,82.5 236.5,82.5 249.5,82.5 Z"/></g>
3343                        <g><path style="opacity:1" fill="#3a3a3a" d="M 248.5,80.5 C 235.677,81.4955 222.677,81.8288 209.5,81.5C 209.5,91.1667 209.5,100.833 209.5,110.5C 220.679,110.172 231.679,110.505 242.5,111.5C 231.167,111.5 219.833,111.5 208.5,111.5C 208.5,101.167 208.5,90.8333 208.5,80.5C 221.833,80.5 235.167,80.5 248.5,80.5 Z"/></g>
3344                        <g><path style="opacity:1" fill="#3a3a3a" d="M 242.5,126.5 C 231.679,127.495 220.679,127.828 209.5,127.5C 209.5,138.833 209.5,150.167 209.5,161.5C 208.505,150.012 208.172,138.345 208.5,126.5C 219.833,126.5 231.167,126.5 242.5,126.5 Z"/></g>
3345                        <g><path style="opacity:1" fill="#83600a" d="M 243.5,128.5 C 233.013,129.494 222.346,129.828 211.5,129.5C 211.5,139.5 211.5,149.5 211.5,159.5C 210.506,149.347 210.172,139.014 210.5,128.5C 221.5,128.5 232.5,128.5 243.5,128.5 Z"/></g>
3346                        <g><path style="opacity:1" fill="#070707" d="M 61.5,210.5 C 62.4861,206.03 62.8195,201.363 62.5,196.5C 58.8333,196.5 55.1667,196.5 51.5,196.5C 50.2138,193.665 50.2138,190.832 51.5,188C 58.4143,187.189 65.2476,187.355 72,188.5C 72.6667,198.167 72.6667,207.833 72,217.5C 59.0178,223.779 46.6845,222.779 35,214.5C 25.8846,200.888 25.2179,186.888 33,172.5C 41.4554,162.926 51.9554,159.759 64.5,163C 72.1955,164.662 74.5289,169.162 71.5,176.5C 49.2549,166.034 38.4216,173.034 39,197.5C 42.0555,209.446 49.5555,213.78 61.5,210.5 Z"/></g>
3347                        <g><path style="opacity:1" fill="#929292" d="M 51.5,196.5 C 55.1667,196.5 58.8333,196.5 62.5,196.5C 62.8195,201.363 62.4861,206.03 61.5,210.5C 61.5,206.167 61.5,201.833 61.5,197.5C 57.9581,197.813 54.6248,197.479 51.5,196.5 Z"/></g>
3348                    <script xmlns=""/></svg>`,
3349                F: `<svg class="productComp__ecoLabelIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="40px" height="auto" viewB
3349ox="0 0 438 240" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">
3350                        <g><path style="opacity:0.944" fill="#2d2220" d="M 0.5,-0.5 C 110.167,-0.5 219.833,-0.5 329.5,-0.5C 365.506,39.1724 401.506,78.8391 437.5,118.5C 437.5,118.833 437.5,119.167 437.5,119.5C 401.221,159.451 364.888,199.451 328.5,239.5C 219.167,239.5 109.833,239.5 0.5,239.5C 0.5,238.833 0.166667,238.5 -0.5,238.5C -0.5,159.167 -0.5,79.8333 -0.5,0.5C 0.166667,0.5 0.5,0.166667 0.5,-0.5 Z"/></g>
3351                        <g><path style="opacity:1" fill="#9b9a9a" d="M 92.5,3.5 C 62.8333,3.5 33.1667,3.5 3.5,3.5C 3.5,80.8333 3.5,158.167 3.5,235.5C 33.1667,235.5 62.8333,235.5 92.5,235.5C 62.6713,236.498 32.6713,236.831 2.5,236.5C 2.5,158.5 2.5,80.5 2.5,2.5C 32.6713,2.16857 62.6713,2.5019 92.5,3.5 Z"/></g>
3352                        <g><path style="opacity:1" fill="#fdfdfd" d="M 92.5,3.5 C 92.5,80.8333 92.5,158.167 92.5,235.5C 62.8333,235.5 33.1667,235.5 3.5,235.5C 3.5,158.167 3.5,80.8333 3.5,3.5C 33.1667,3.5 62.8333,3.5 92.5,3.5 Z"/></g>
3353                        <g><path style="opacity:1" fill="#f27021" d="M 92.5,3.5 C 170.834,3.33334 249.167,3.5 327.5,4C 362.685,42.3504 397.685,80.8504 432.5,119.5C 397.719,158.45 362.386,196.95 326.5,235C 248.501,235.5 170.501,235.667 92.5,235.5C 92.5,158.167 92.5,80.8333 92.5,3.5 Z"/></g>
3354                        <g><path style="opacity:1" fill="#272022" d="M 42.5,17.5 C 46.8461,17.3343 51.1794,17.501 55.5,18C 56.3333,18.8333 57.1667,19.6667 58,20.5C 64.6307,38.7239 70.6307,57.0572 76,75.5C 72.2564,76.626 68.423,76.7927 64.5,76C 63.2741,72.1567 61.9408,68.3234 60.5,64.5C 52.8333,63.1667 45.1667,63.1667 37.5,64.5C 36.0592,68.3234 34.7259,72.1567 33.5,76C 29.8484,76.4986 26.1817,76.6653 22.5,76.5C 28.3853,56.5099 35.052,36.8432 42.5,17.5 Z"/></g>
3355                        <g><path style="opacity:1" fill="#f3f3f3" d="M 56.5,52.5 C 51.5,53.8333 46.5,53.8333 41.5,52.5C 43.4936,44.6855 45.9936,37.0189 49,29.5C 52.0064,37.0189 54.5064,44.6855 56.5,52.5 Z"/></g>
3356                        <g><path style="opacity:1" fill="#908d8e" d="M 41.5,52.5 C 46.5,53.8333 51.5,53.8333 56.5,52.5C 57.0431,52.56 57.3764,52.8933 57.5,53.5C 51.8333,54.8333 46.1667,54.8333 40.5,53.5C 40.6236,52.8933 40.9569,52.56 41.5,52.5 Z"/></g>
3357                        <g><path style="opacity:1" fill="#161312" d="M 252.5,81.5 C 240.833,81.5 229.167,81.5 217.5,81.5C 217.173,91.3478 217.506,101.014 218.5,110.5C 229.552,110.189 240.552,110.522 251.5,111.5C 252.192,112.025 252.692,112.692 253,113.5C 253.667,118.5 253.667,123.5 253,128.5C 252.623,129.942 251.79,130.942 250.5,131.5C 239.5,131.5 228.5,131.5 217.5,131.5C 217.5,146.167 217.5,160.833 217.5,175.5C 216.319,177.067 214.653,177.901 212.5,178C 210,178.167 207.5,178.333 205,178.5C 201.431,178.714 198.098,178.047 195,176.5C 194.333,139.167 194.333,101.833 195,64.5C 195.5,62.6667 196.667,61.5 198.5,61C 216.833,60.3333 235.167,60.3333 253.5,61C 254,61.5 254.5,62 255,62.5C 255.667,68.1667 255.667,73.8333 255,79.5C 254.292,80.3805 253.458,81.0472 252.5,81.5 Z"/></g>
3358                        <g><path style="opacity:1" fill="#fdfdfd" d="M 252.5,79.5 C 240.167,79.5 227.833,79.5 215.5,79.5C 215.5,90.8333 215.5,102.167 215.5,113.5C 227.167,113.5 238.833,113.5 250.5,113.5C 251.829,118.47 251.829,123.47 250.5,128.5C 238.852,129.499 227.186,129.832 215.5,129.5C 215.833,144.848 215.499,160.181 214.5,175.5C 208.833,176.833 203.167,176.833 197.5,175.5C 196.173,138.463 196.173,101.463 197.5,64.5C 198.025,63.8076 198.692,63.3076 199.5,63C 217.167,62.3333 234.833,62.3333 252.5,63C 253.811,68.4996 253.811,73.9996 252.5,79.5 Z"/></g>
3359                        <g><path style="opacity:1" fill="#3d3d3d" d="M 252.5,79.5 C 240.678,80.4951 228.678,80.8284 216.5,80.5C 216.5,91.1667 216.5,101.833 216.5,112.5C 228.012,112.172 239.346,112.505 250.5,113.5C 238.833,113.5 227.167,113.5 215.5,113.5C 215.5,102.167 215.5,90.8333 215.5,79.5C 227.833,79.5 240.167,79.5 252.5,79.5 Z"/></g>
3360                        <g><path style="opacity:1" fill="#733a18" d="M 252.5,81.5 C 241.346,82.4948 230.012,82.8281 218.5,82.5C 218.5,91.8333 218.5,101.167 218.5,110.5C 217.506,101.014 217.173,91.3478 217.5,81.5C 229.167,81.5 240.833,81.5 252.5,81.5 Z"/></g>
3361                        <g><path style="opacity:1" fill="#1e1d06" d="M 46.5,90.5 C 48.5273,90.3379 50.5273,90.5045 52.5,91C 58.2941,96.1174 63.2941,101.784 67.5,108C 66.8413,112.082 64.508,113.416 60.5,112C 58.6667,110.167 56.8333,108.333 55,106.5C 54.6667,119.833 54.3333,133.167 54,146.5C 51.679,149.917 49.0124,150.25 46,147.5C 45.6667,133.833 45.3333,120.167 45,106.5C 42.8345,109.507 40.0011,111.507 36.5,112.5C 32.2221,110.661 31.3887,107.661 34,103.5C 38.3978,99.2713 42.5644,94.9379 46.5,90.5 Z"/></g>
3362                        <g><path style="opacity:1" fill="#863e12" d="M 250.5,131.5 C 240.013,132.494 229.346,132.828 218.5,132.5C 218.829,147.01 218.496,161.343 217.5,175.5C 217.5,160.833 217.5,146.167 217.5,131.5C 228.5,131.5 239.5,131.5 250.5,131.5 Z"/></g>
3363                        <g>
3363<path style="opacity:1" fill="#070707" d="M 61.5,210.5 C 62.4861,206.03 62.8195,201.363 62.5,196.5C 58.8333,196.5 55.1667,196.5 51.5,196.5C 50.2138,193.665 50.2138,190.832 51.5,188C 58.4143,187.189 65.2476,187.355 72,188.5C 72.6667,198.167 72.6667,207.833 72,217.5C 59.0178,223.779 46.6845,222.779 35,214.5C 25.8846,200.888 25.2179,186.888 33,172.5C 41.4554,162.926 51.9554,159.759 64.5,163C 72.1955,164.662 74.5289,169.162 71.5,176.5C 49.2549,166.034 38.4216,173.034 39,197.5C 42.0555,209.446 49.5555,213.78 61.5,210.5 Z"/></g>
3364                        <g><path style="opacity:1" fill="#929292" d="M 51.5,196.5 C 55.1667,196.5 58.8333,196.5 62.5,196.5C 62.8195,201.363 62.4861,206.03 61.5,210.5C 61.5,206.167 61.5,201.833 61.5,197.5C 57.9581,197.813 54.6248,197.479 51.5,196.5 Z"/></g>
3365                    <script xmlns=""/></svg>`,
3366                G: `<svg class="productComp__ecoLabelIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="40px" height="auto" viewBox="0 0 438 240" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">
3367                        <g><path style="opacity:0.944" fill="#281f20" d="M 0.5,-0.5 C 110.167,-0.5 219.833,-0.5 329.5,-0.5C 365.506,39.1724 401.506,78.8391 437.5,118.5C 437.5,118.833 437.5,119.167 437.5,119.5C 401.221,159.451 364.888,199.451 328.5,239.5C 219.167,239.5 109.833,239.5 0.5,239.5C 0.5,238.833 0.166667,238.5 -0.5,238.5C -0.5,159.167 -0.5,79.8333 -0.5,0.5C 0.166667,0.5 0.5,0.166667 0.5,-0.5 Z"/></g>
3368                        <g><path style="opacity:1" fill="#9b9a9a" d="M 92.5,3.5 C 62.8333,3.5 33.1667,3.5 3.5,3.5C 3.5,80.8333 3.5,158.167 3.5,235.5C 33.1667,235.5 62.8333,235.5 92.5,235.5C 92.5,235.833 92.5,236.167 92.5,236.5C 62.5,236.5 32.5,236.5 2.5,236.5C 2.5,158.5 2.5,80.5 2.5,2.5C 32.6713,2.16857 62.6713,2.5019 92.5,3.5 Z"/></g>
3369                        <g><path style="opacity:1" fill="#fdfdfd" d="M 92.5,3.5 C 92.5,80.8333 92.5,158.167 92.5,235.5C 62.8333,235.5 33.1667,235.5 3.5,235.5C 3.5,158.167 3.5,80.8333 3.5,3.5C 33.1667,3.5 62.8333,3.5 92.5,3.5 Z"/></g>
3370                        <g><path style="opacity:1" fill="#ec1b23" d="M 93.5,3.5 C 171.503,3.16669 249.503,3.50002 327.5,4.5C 362.869,42.5338 397.869,80.8671 432.5,119.5C 397.513,158.486 362.18,197.153 326.5,235.5C 248.833,235.5 171.167,235.5 93.5,235.5C 93.5,158.167 93.5,80.8333 93.5,3.5 Z"/></g>
3371                        <g><path style="opacity:1" fill="#272022" d="M 42.5,18.5 C 47.1785,18.3342 51.8452,18.5008 56.5,19C 57,19.5 57.5,20 58,20.5C 64.6381,38.7458 70.6381,57.0791 76,75.5C 72.2564,76.626 68.423,76.7927 64.5,76C 63.2741,72.1567 61.9408,68.3234 60.5,64.5C 52.8333,63.1667 45.1667,63.1667 37.5,64.5C 36.0592,68.3234 34.7259,72.1567 33.5,76C 29.8484,76.4986 26.1817,76.6653 22.5,76.5C 28.1828,56.7835 34.8495,37.4501 42.5,18.5 Z"/></g>
3372                        <g><path style="opacity:1" fill="#f2f2f2" d="M 56.5,52.5 C 51.5,53.8333 46.5,53.8333 41.5,52.5C 43.4936,44.6855 45.9936,37.0189 49,29.5C 52.0064,37.0189 54.5064,44.6855 56.5,52.5 Z"/></g>
3373                        <g><path style="opacity:1" fill="#908d8e" d="M 41.5,52.5 C 46.5,53.8333 51.5,53.8333 56.5,52.5C 57.0431,52.56 57.3764,52.8933 57.5,53.5C 51.8333,54.8333 46.1667,54.8333 40.5,53.5C 40.6236,52.8933 40.9569,52.56 41.5,52.5 Z"/></g>
3374                        <g><path style="opacity:1" fill="#1e1d06" d="M 45.5,145.5 C 45.8325,132.483 45.4991,119.483 44.5,106.5C 43.8933,106.624 43.56,106.957 43.5,107.5C 40.8831,112.25 37.3831,113.25 33,110.5C 32.3333,108.833 32.3333,107.167 33,105.5C 37.7207,99.1112 43.3873,93.7779 50,89.5C 56.9105,94.7412 62.7438,100.908 67.5,108C 67.166,110.853 65.4993,112.353 62.5,112.5C 59.5935,111.103 57.0935,109.103 55,106.5C 54.6667,119.833 54.3333,133.167 54,146.5C 50.5724,150.516 47.739,150.183 45.5,145.5 Z"/></g>
3375                        <g><path style="opacity:1" fill="#c4c4bc" d="M 43.5,107.5 C 43.56,106.957 43.8933,106.624 44.5,106.5C 45.4991,119.483 45.8325,132.483 45.5,145.5C 44.8333,132.833 44.1667,120.167 43.5,107.5 Z"/></g>
3376                        <g><path style="opacity:1" fill="#201616" d="M 233.5,159.5 C 234.493,151.35 234.826,143.017 234.5,134.5C 227.833,134.5 221.167,134.5 214.5,134.5C 213.542,134.047 212.708,133.381 212,132.5C 210.607,127.9
337605 210.274,123.239 211,118.5C 211.465,117.069 212.299,115.903 213.5,115C 226.833,114.333 240.167,114.333 253.5,115C 255.726,116.227 257.226,118.061 258,120.5C 258.667,137.5 258.667,154.5 258,171.5C 257.55,173.519 256.717,175.352 255.5,177C 234.262,186.505 212.929,186.838 191.5,178C 172.561,164.955 163.561,146.789 164.5,123.5C 164.29,101.422 172.956,83.9217 190.5,71C 196.117,67.6831 202.117,65.3497 208.5,64C 224.331,61.5571 239.331,63.8904 253.5,71C 257.302,74.0637 258.969,78.0637 258.5,83C 258.733,87.0724 257.733,90.7391 255.5,94C 254.5,94.6667 253.5,94.6667 252.5,94C 240.657,86.0539 227.657,83.0539 213.5,85C 201.837,89.3303 194.337,97.497 191,109.5C 187.503,124.359 189.503,138.359 197,151.5C 207.337,162.937 219.504,165.604 233.5,159.5 Z"/></g>
3377                        <g><path style="opacity:1" fill="#fbfbfb" d="M 209.5,65.5 C 223.293,64.2301 236.626,66.0635 249.5,71C 251.609,72.1411 253.442,73.6411 255,75.5C 255.499,80.8229 255.666,86.1563 255.5,91.5C 248.112,88.2007 240.446,85.3673 232.5,83C 209.165,79.2496 194.332,88.7496 188,111.5C 186.171,124.678 187.837,137.344 193,149.5C 203.791,164.876 217.957,168.876 235.5,161.5C 236.498,151.856 236.832,142.19 236.5,132.5C 229.159,132.666 221.826,132.5 214.5,132C 213.531,127.263 213.197,122.43 213.5,117.5C 226.837,117.333 240.171,117.5 253.5,118C 254,118.5 254.5,119 255,119.5C 255.667,137.5 255.667,155.5 255,173.5C 253.992,175.259 252.492,176.426 250.5,177C 231.759,184.165 213.093,184.165 194.5,177C 178.943,168.427 170.11,155.26 168,137.5C 163.234,112.685 170.068,91.8516 188.5,75C 195.095,70.698 202.095,67.5314 209.5,65.5 Z"/></g>
3378                        <g><path style="opacity:1" fill="#8c1015" d="M 214.5,134.5 C 221.167,134.5 227.833,134.5 234.5,134.5C 234.826,143.017 234.493,151.35 233.5,159.5C 233.5,151.5 233.5,143.5 233.5,135.5C 226.978,135.823 220.645,135.49 214.5,134.5 Z"/></g>
3379                        <g><path style="opacity:1" fill="#070707" d="M 61.5,210.5 C 62.4861,206.03 62.8195,201.363 62.5,196.5C 58.8333,196.5 55.1667,196.5 51.5,196.5C 50.2138,193.665 50.2138,190.832 51.5,188C 58.4143,187.189 65.2476,187.355 72,188.5C 72.6667,198.167 72.6667,207.833 72,217.5C 59.0178,223.779 46.6845,222.779 35,214.5C 25.8846,200.888 25.2179,186.888 33,172.5C 41.4554,162.926 51.9554,159.759 64.5,163C 72.1955,164.662 74.5289,169.162 71.5,176.5C 49.2549,166.034 38.4216,173.034 39,197.5C 42.0555,209.446 49.5555,213.78 61.5,210.5 Z"/></g>
3380                        <g><path style="opacity:1" fill="#929292" d="M 51.5,196.5 C 55.1667,196.5 58.8333,196.5 62.5,196.5C 62.8195,201.363 62.4861,206.03 61.5,210.5C 61.5,206.167 61.5,201.833 61.5,197.5C 57.9581,197.813 54.6248,197.479 51.5,196.5 Z"/></g>
3381                        <g><path style="opacity:0.792" fill="#a3393c" d="M 92.5,3.5 C 92.8333,3.5 93.1667,3.5 93.5,3.5C 93.5,80.8333 93.5,158.167 93.5,235.5C 171.167,235.5 248.833,235.5 326.5,235.5C 248.668,236.499 170.668,236.833 92.5,236.5C 92.5,236.167 92.5,235.833 92.5,235.5C 92.5,158.167 92.5,80.8333 92.5,3.5 Z"/></g>
3382                    <script xmlns=""/></svg>`,
3383                    DEFAULT:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="40px" height="auto" viewBox="0 0 438 240" id="ecoRatingDefault">
3384                                <g><path fill="none" d="M 0.5,-0.5 C 110.167,-0.5 219.833,-0.5 329.5,-0.5C 365.506,39.1724 401.506,78.8391 437.5,118.5C 437.5,118.833 437.5,119.167 437.5,119.5C 401.221,159.451 364.888,199.451 328.5,239.5C 219.167,239.5 109.833,239.5 0.5,239.5C 0.5,238.833 0.166667,238.5 -0.5,238.5C -0.5,159.167 -0.5,79.8333 -0.5,0.5C 0.166667,0.5 0.5,0.166667 0.5,-0.5 Z"/></g>
3385                                <g><path fill="none" d="M 92.5,3.5 C 62.8333,3.5 33.1667,3.5 3.5,3.5C 3.5,80.8333 3.5,158.167 3.5,235.5C 33.1667,235.5 62.8333,235.5 92.5,235.5C 92.5,235.833 92.5,236.167 92.5,236.5C 62.5,236.5 32.5,236.5 2.5,236.5C 2.5,158.5 2.5,80.5 2.5,2.5C 32.6713,2.16857 62.6713,2.5019 92.5,3.5 Z"/></g>
3386                                <g><path fill="none" d="M 92.5,3.5 C 92.5,80.8333 92.5,158.167 92.5,235.5C 62.8333,235.5 33.1667,235.5 3.5,235.5C 3.5,158.167 3.5,80.8333 3.5,3.5C 33.1667,3.5 62.8333,3.5 92.5,3.5 Z"/></g>
3387                                <g><path fill="none" d="M 93.5,3.5 C 171.503,3.16669 249.503,3.50002 327.5,4.5C 362.869,42.5338 397.869,80.8671 432.5,119.5C 397.513,158.486 362.18,197.153 326.5,235.5C 248.833,235.5 171.167,235.5 93.5,235.5C 93.5,158.167 93.5,80.8333 93.5,3.5 Z"/></g>
3388                                <g><path fill="none" d="M 42.5,18.5 C 47.1785,18.3342 51.8452,18.5008 56.5,19C 57,19.5 57.5,20 58,20.5C 64.6381,38.7458 70.6381,57.0791 76,75.5C 72.2564,76.626 68.423,76.7927 64.5,76C 63.2741,72.1567 61.9408,68.3234 60.5,64.5C 52.8333,63.1667 45.1667,63.1667 37.5,64.5C 36.0592,68.3234 34.7259,72.1567 33.5,76C 29.8484,76.4986 26.1817,76.6653 22.5,76.5C 28.1828,56.7835 34.8495,37.4501 42.5,18.5 Z"/></g>
3389                                <g><path fill="none" d="M 56.5,52.5 C 51.5,53.8333 46.5,53.8333 41.5,52.5C 43.4936,44.6855 45.9936,37.0189 49,29.5C 52.0064,37.0189 54.5064,44.6855 56.5,52.5 Z"/></g>
3390                                <g><path fill="none" d="M 41.5,52.5 C 46.5,53.8333 51.5,53.8333 56.5,52.5C 57.0431,52.56 57.3764,52.8933 57.5,53.5C 51.8333,54.8333 46.1667,54.8333 40.5,53.5C 40.6236,52.8933 40.9569,52.56 41.5,52.5 Z"/></g>
3391                                <g><path fill="none" d="M 45.5,145.5 C 45.8325,132.483 45.4991,119.483 44.5,106.5C 43.8933,106.624 43.56,106.957 43.5,107.5C 40.8831,112.25 37.3831,113.25 33,110.5C 32.3333,108.833 32.3333,107.167 33,105.5C 37.7207,99.1112 43.3873,93.7779 50,89.5C 56.9105,94.7412 62.7438,100.908 67.5,108C 67.166,110.853 65.4993,112.353 62.5,112.5C 59.5935,111.103 57.0935,109.103 55,106.5C 54.6667,119.833 54.3333,133.167 54,146.5C 50.5724,150.516 47.739,150.183 45.5,145.5 Z"/></g>
3392                                <g><path fill="none" d="M 43.5,107.5 C 43.56,106.957 43.8933,106.624 44.5,106.5C 45.4991,119.483 45.8325,132.483 45.5,145.5C 44.8333,132.833 44.1667,120.167 43.5,107.5 Z"/></g>
3393                                <g><path fill="none" d="M 233.5,159.5 C 234.493,151.35 234.826,143.017 234.5,134.5C 227.833,134.5 221.167,134.5 214.5,134.5C 213.542,134.047 212.708,133.381 212,132.5C 210.607,127.9
339305 210.274,123.239 211,118.5C 211.465,117.069 212.299,115.903 213.5,115C 226.833,114.333 240.167,114.333 253.5,115C 255.726,116.227 257.226,118.061 258,120.5C 258.667,137.5 258.667,154.5 258,171.5C 257.55,173.519 256.717,175.352 255.5,177C 234.262,186.505 212.929,186.838 191.5,178C 172.561,164.955 163.561,146.789 164.5,123.5C 164.29,101.422 172.956,83.9217 190.5,71C 196.117,67.6831 202.117,65.3497 208.5,64C 224.331,61.5571 239.331,63.8904 253.5,71C 257.302,74.0637 258.969,78.0637 258.5,83C 258.733,87.0724 257.733,90.7391 255.5,94C 254.5,94.6667 253.5,94.6667 252.5,94C 240.657,86.0539 227.657,83.0539 213.5,85C 201.837,89.3303 194.337,97.497 191,109.5C 187.503,124.359 189.503,138.359 197,151.5C 207.337,162.937 219.504,165.604 233.5,159.5 Z"/></g>
3394                                <g><path fill="none" d="M 209.5,65.5 C 223.293,64.2301 236.626,66.0635 249.5,71C 251.609,72.1411 253.442,73.6411 255,75.5C 255.499,80.8229 255.666,86.1563 255.5,91.5C 248.112,88.2007 240.446,85.3673 232.5,83C 209.165,79.2496 194.332,88.7496 188,111.5C 186.171,124.678 187.837,137.344 193,149.5C 203.791,164.876 217.957,168.876 235.5,161.5C 236.498,151.856 236.832,142.19 236.5,132.5C 229.159,132.666 221.826,132.5 214.5,132C 213.531,127.263 213.197,122.43 213.5,117.5C 226.837,117.333 240.171,117.5 253.5,118C 254,118.5 254.5,119 255,119.5C 255.667,137.5 255.667,155.5 255,173.5C 253.992,175.259 252.492,176.426 250.5,177C 231.759,184.165 213.093,184.165 194.5,177C 178.943,168.427 170.11,155.26 168,137.5C 163.234,112.685 170.068,91.8516 188.5,75C 195.095,70.698 202.095,67.5314 209.5,65.5 Z"/></g>
3395                                <g><path fill="none" d="M 214.5,134.5 C 221.167,134.5 227.833,134.5 234.5,134.5C 234.826,143.017 234.493,151.35 233.5,159.5C 233.5,151.5 233.5,143.5 233.5,135.5C 226.978,135.823 220.645,135.49 214.5,134.5 Z"/></g>
3396                                <g><path fill="none" d="M 61.5,210.5 C 62.4861,206.03 62.8195,201.363 62.5,196.5C 58.8333,196.5 55.1667,196.5 51.5,196.5C 50.2138,193.665 50.2138,190.832 51.5,188C 58.4143,187.189 65.2476,187.355 72,188.5C 72.6667,198.167 72.6667,207.833 72,217.5C 59.0178,223.779 46.6845,222.779 35,214.5C 25.8846,200.888 25.2179,186.888 33,172.5C 41.4554,162.926 51.9554,159.759 64.5,163C 72.1955,164.662 74.5289,169.162 71.5,176.5C 49.2549,166.034 38.4216,173.034 39,197.5C 42.0555,209.446 49.5555,213.78 61.5,210.5 Z"/></g>
3397                                <g><path fill="none" d="M 51.5,196.5 C 55.1667,196.5 58.8333,196.5 62.5,196.5C 62.8195,201.363 62.4861,206.03 61.5,210.5C 61.5,206.167 61.5,201.833 61.5,197.5C 57.9581,197.813 54.6248,197.479 51.5,196.5 Z"/></g>
3398                                <g><path fill="none" d="M 92.5,3.5 C 92.8333,3.5 93.1667,3.5 93.5,3.5C 93.5,80.8333 93.5,158.167 93.5,235.5C 171.167,235.5 248.833,235.5 326.5,235.5C 248.668,236.499 170.668,236.833 92.5,236.5C 92.5,236.167 92.5,235.833 92.5,235.5C 92.5,158.167 92.5,80.8333 92.5,3.5 Z"/></g>
3399                            <script xmlns=""/></svg>`
3400                },
3401            }
3402        }
3403    },
3404    methods: {
3405        isSmartphone: function (type) {
3406            return type === this.CATALOG.SMARTPHONE;
3407        },
3408        isSmartphonePack: function (product) {
3409            if (product.productType === this.CATALOG.PACK && product.variants && product.variants.length > 0 && product.variants[0].packProducts) {
3410                var main = product.variants[0].packProducts[0];
3411                return main.productType === this.CATALOG.SMARTPHONE;
3412            }
3413            return false;
3414        },
3415        isAccessory: function (type) {
3416            return type === this.CATALOG.ACCESSORY;
3417        },
3418        isWearable: function (product) {
3419            return product?.category?.toLowerCase() === this.CATEGORY.WEARABLES.toLowerCase();
3420        },
3421        isSimCard: function (type) {
3422            return type === this.CATALOG.SIM_CARD;
3423        },
3424        isPack: function (type) {
3425            return type === this.CATALOG.PACK;
3426        },
3427        isHotspot: function (type) {
3428            return type === this.CATALOG.HOTSPOT;
3429        },
3430        isHotspotPack: function (product) {
3431            if (product.productType === this.CATALOG.PACK && product.variants && product.variants.length > 0 && product.packProducts) {
3432                var main = product.packProducts[0];
3433                return main.productType === this.CATALOG.HOTSPOT;
3434            }
3435            return false;
3436        },
3437        isTablet: function (type) {
3438            return this.CATALOG.TABLET?.toLowerCase() === type?.toLowerCase();
3439        },
3440
3441        isTabletType: function (type) {
3442            return this.CATALOG.TABLET?.toLowerCase() === type?.toLowerCase();
3443        },
3444
3445        isRouter: function (type) {
3446            return this.CATALOG.ROUTER === type;
3447        },
3448        isMobileInternet: function (type) {
3449            return this.isRouter(type) || this.isTabletType(type) || this.isHotspot(type);
3450        },
3451        isMobileBroadband: function (type) {
3452            return this.CATALOG.MOBILE_BROADBAND === type;
3453        },
3454        isMobileInternetPack: function (product) {
3455            if (product.productType === this.CATALOG.PACK && product.variants && product.variants.length > 0 && product.variants[0].packProducts) {
3456                var main = product.variants[0].packProducts[0];
3457                return [this.CATALOG.HOTSPOT, this.CATALOG.ROUTER, this.CATALOG.TABLET].includes(main.productType);
3458            }
3459            return false;
3460        },
3461        isIoT: function (type) {
3462            return this.CATALOG.IOT === type;
3463        },
3464        isInsuranceItem: function(){
3465            return this.cartItems?.find?.(item => (item["@type"] || item.type) === "InsuranceItem");
3466        },
3467        isTradeInItem: function(){
3468            return this.cartItems?.find?.(item => (item["@type"] || item.type) === "TradeInItem");
3469        },
3470        getEcoRatingSVG: function(char){
3471            switch(char.toLocaleLowerCase()){
3472                case "a":
3473                    return this.SVG.ECO_RATING.A;
3474                case "b":
3475                    return this.SVG.ECO_RATING.B;
3476                case "c":
3477                    return this.SVG.ECO_RATING.C;
3478                case "d":
3479                    return this.SVG.ECO_RATING.D;
3480                case "e":
3481                    return this.SVG.ECO_RATING.E;
3482                case "f":
3483                    return this.SVG.ECO_RATING.F;
3484                case "g":
3485                    return this.SVG.ECO_RATING.G;
3486                default:
3487                    return this.SVG.ECO_RATING.DEFAULT;
3488            }
3489        },
3490        
3491        handlerGetProductEcoRatingByProduct: function(productsChar){
3492            let ecoRatingValue = "";
3493            let ecoRatingSVG = ""
3494            for (const item of productsChar) {
3495                const parsed = JSON.parse(item);
3496
3497                const ecoRatingSection = parsed.find(section => section.code === "eficiencia-energetica");
3498
3499                if (ecoRatingSection) {
3500                    const ecoRating = ecoRatingSection.child.find(child => child.code === "Classe Energética");
3501                    if (ecoRating) {
3502                        ecoRatingValue = ecoRating.value;
3503                        ecoRatingSVG = this.getEcoRatingSVG(ecoRatingValue);
3504                        break; 
3505                    }
3506                } else {
3507                    ecoRatingSVG = this.getEcoRatingSVG("default");
3508                }
3509            }
3510
3511            return ecoRatingSVG;
3512        },
3513
3514        handlerGetMainProductsChar: function(product){
3515            const productVariants = product.variants;
3516            const mainProducts = [];
3517            productVariants.forEach(variant => {
3518                mainProducts.push(variant.variants.find(_variant => _variant.id === variant.mainProductId))
3519            })
3520            const mainProductsChar = mainProducts.map(product => product.characteristics);
3521            return mainProductsChar;
3522        },
3523
3524        handlerHasEcoRating: function(product){
3525            let productChar = "";
3526            let hasEcoRatingChar = "";
3527            const isPack = product.productType === this.CATALOG.PACK;
3528            if(isPack){
3529               productChar = this.handlerGetMainProductsChar(product);
3530            } else {
3531                productChar = product.variants.map(item => item.characteristics);
3532            }
3533
3534            if(productChar){
3535                hasEcoRatingChar = productChar.some(char => {
3536                    const parsedChar = JSON.parse(char);
3537                    return parsedChar.some(_char => _char.code === "eficiencia-energetica");
3538                })
3539            }
3540
3541            return hasEcoRatingChar;
3542        },
3543
3544        handlerGetEcoRating: function(product){
3545            let productChar = "";
3546            let ecoRatingSVG = ""
3547            const isPack = product.productType === this.CATALOG.PACK;
3548            if(isPack){
3549               productChar = this.handlerGetMainProductsChar(product);
3550            } else {
3551                productChar = product.variants.map(item => item.characteristics);
3552            }
3553            if(productChar){
3554                ecoRatingSVG = this.handlerGetProductEcoRatingByProduct(productChar);
3555            }
3556
3557            return ecoRatingSVG;
3558        },
3559
3560        getEcoRatingChar: function(product){
3561            let productChar = "";
3562            const isPack = product.productType === this.CATALOG.PACK;
3563            if(isPack){
3564               productChar = this.handlerGetMainProductsChar(product);
3565            } else {
3566                productChar = product.variants.map(item => item.characteristics);
3567            }
3568            for (const item of productChar) {
3569                const parsed = JSON.parse(item);
3570
3571                const ecoRatingSection = parsed.find(section => section.code === "eficiencia-energetica");
3572
3573                if (ecoRatingSection) {
3574                    return ecoRatingSection;
3575                } 
3576            }
3577
3578        }
3579    }
3580};
3581
3582var productsUtils = {
3583    data: function () {
3584        return {
3585            EXTRACT: {
3586                DEFAULT: "default",
3587                PVP: "pvp",
3588                CV: "cv",
3589                FIRST: "first",
3590                ID: 'id'
3591            },
3592            MINIMUM_MEMORIES: 1,
3593            showStoreOverlay: false,
3594            CONSTANTS: {
3595                MB: 'MB',
3596                GB: 'GB',
3597                TB: 'TB',
3598                EMPTY: '',
3599                PACK: 'Pack',
3600                VARIANT: 'variant',
3601                STORE_ID_COOKIE: 'selectedStore',
3602                WITHOUT_VAT: 'WithoutVAT',
3603                DASH: '–',
3604                STORE: 'loja/',
3605                SIM_CARD: "SIM Card",
3606                MAILING: "Mailing",
3607                CV: "CV",
3608                PVP: "PVP",
3609                PT: "PT",
3610                CV_POINTS_LABEL: "Pontos Clube Viva",
3611                PVP_LABEL: "Preço Online",
3612                PT_LABEL: "Prestações",
3613                PRICE: "price",
3614                PAYMENT_TYPE: "paymentType",
3615                CV_POINTS: "cvPoints",
3616                NAME: "name",
3617                i18n_FILTERS_TITLE_PREFIX: "eshop.vf_catalogFilters.title.",
3618            },
3619            REGEX_LETTERS: /[a-z]+|[^a-z]+/gi
3620        }
3621    },
3622    methods: {
3623        openStoresOverlay: function (name) {
3624            var storesOverlayName = this.CONSTANTS?.STORES_OVERLAY || 'storesOverlay';
3625            if (name === storesOverlayName) {
3626                this.showStoreOverlay = true;
3627                document.body.style.overflow = 'hidden';
3628                if (typeof this.handleShowEshopStores === 'function') {
3629                    this.handleShowEshopStores();
3630                }
3631            }
3632        },
3633
3634        closeStoresOverlay: function () {
3635            this.showStoreOverlay = false;
3636            $('html, body').css('overflowY', '');
3637        },
3638
3639        checkIfFreePrice: function (value, type) {
3640            var me = this;
3641            if (value === 0 && me.isSimCard(type)) {
3642                return me.i18nUtils().getProperty('eshop.vf_priceSummary.free');
3643            }
3644            else {
3645                return me.currencyUtils().formatEuroBalance(value);
3646            }
3647        },
3648
3649        checkIfFreeDeliveryMethod: function(value) {
3650            var me = this;
3651            if (value === "0,00") {
3652                return me.i18nUtils().getProperty('eshop.vf_priceSummary.freeDelivery');
3653            }
3654            else {
3655                return me.currencyUtils().formatEuroBalance(value);
3656            }
3657        },
3658
3659        checkIfPvpFreePrice: function(selected) {
3660            return this.variantHasPVP(selected) && !selected.priceCondition.PVP[0].price;
3661        },
3662
3663        formatPriceBasedOnPriceType: function(value, priceType, businessContext, type) {
3664            if(value && priceType) {
3665                if(businessContext) {
3666                    return this.checkIfFreePrice(value[priceType+this.CONSTANTS.WITHOUT_VAT], type);
3667                } else {
3668                    return this.checkIfFreePrice(value[priceType], type);
3669                }
3670            }
3671            return this.CONSTANTS.DASH;
3672        },
3673
3674        selectVariants: function (productsArray, checkIfInComparator) {
3675            var me = this;
3676            if (Array.isArray(productsArray)) {
3677                productsArray.forEach(function (product) {
3678                    me.selectProductVariant(product, checkIfInComparator);
3679                }, me);
3680            }
3681        },
3682
3683        selectProductVariant: function (product, checkIfInComparator) {
3684            var me = this;
3685            var selectedPVP = {},
3686                selectedCV = {};
3687            if (product.defaultVariant) {
3688                selectedPVP = me.extractVariant(product, me.EXTRACT.DEFAULT, product.defaultVariant);
3689                selectedCV = me.extractVariant(product, me.EXTRACT.DEFAULT, product.defaultVariant);
3690            } else {
3691                selectedPVP = me.extractVariant(product, me.EXTRACT.PVP);
3692                selectedCV = me.extractVariant(product, me.EXTRACT.CV);
3693            }
3694
3695            if (product.choosenInCollection !== undefined) {
3696                if(product.choosenInCollection.selectedPVP) {
3697                    selectedPVP = me.extractVariant(product, me.EXTRACT.ID, product.choosenInCollection.id);
3698                } else {
3699                    selectedCV = me.extractVariant(product, me.EXTRACT.ID, product.choosenInCollection.id);
3700                }
3701            }
3702
3703            product.selectedPVP = selectedPVP;
3704            product.selectedCV = selectedCV;
3705
3706            if (checkIfInComparator) {
3707                product.isInComparator = checkIfInComparator(product);
3708            }
3709        },
3710
3711        extractVariant: function (product, type, code) {
3712            var me = this,
3713                selected = {},
3714                variants = [],
3715                selectedVariant,
3716                selectedColorCode,
3717                selectedVariantStorage;
3718
3719            switch (type) {
3720                            case me.EXTRACT.ID:
3721                                variants = product.variants;
3722                                variants.forEach(function (variant) {
3723                                    if (variant.id && code && variant.id === code) {
3724                                        selected = variant;
3725                                    }
3726                                });
3727                                break;
3728                            case me.EXTRACT.DEFAULT:
3729                                variants = product.variants;
3730                                variants.forEach(function (variant) {
3731                                    if (variant.refSap && code && variant.refSap === code) {
3732                                        selected = variant;
3733                                    }
3734                                });
3735                                selected = Object.keys(selected).length !== 0 ? selected : product.variants[0];
3736                                break;
3737                            case me.EXTRACT.PVP:
3738                                variants = product.variants;
3739                                variants.forEac
3739h(function (variant) {
3740                                    if(product.productType !== "Pack"){
3741                                        variantColorCode =  variant.colorCode
3742                                        productVariantStorage = variant.storage
3743                                    } else {
3744                                        variantColorCode = variant.packProducts && variant.packProducts.length !== 0 ? variant.packProducts[0].colorCode : variant.colorCode;
3745                                        productVariantStorage = variant.packProducts && variant.packProducts.length !== 0 ? variant.packProducts[0].storage : variant.storage;
3746                                    }
3747                                    if(Object.keys(selected).length !== 0){
3748                                        if(product.productType !== "Pack"){
3749                                            selectedColorCode = selected.colorCode;
3750                                            selectedVariantStorage = selected.storage;
3751                                        } else {
3752                                            selectedColorCode = selected.packProducts && selected.packProducts.length !== 0 ? selected.packProducts[0].colorCode : selected.colorCode;
3753                                            selectedVariantStorage = selected.packProducts && selected.packProducts.length !== 0 ? selected.packProducts[0].storage : selected.storage;
3754                                        }
3755                                    }
3756                                    if(Object.keys(selected).length !== 0 && variantColorCode === selectedColorCode) {
3757                                        var variantStorage = productVariantStorage.match(/[a-z]+|[^a-z]+/gi);
3758                                        var selectedStorage = selectedVariantStorage.match(/[a-z]+|[^a-z]+/gi);
3759                                        if (variantStorage.length !== 0 && selectedStorage.length !== 0 && Number.parseInt(variantStorage[0]?.trim()) < Number.parseInt(selectedStorage[0]?.trim())) {
3760                                            if(variantStorage[1].trim() === selectedStorage[1].trim()) {
3761                                                selectedVariant = variant;
3762                                            } else if (variantStorage[1]?.trim() === "GB") {
3763                                                selectedVariant = variant;
3764                                            }
3765                                        }
3766                                    } else {
3767                                        variantHSL = colorUtils.methods.hexToHSL(variantColorCode);
3768                                        variantSelected = Object.keys(selected).length !== 0  ? colorUtils.methods.hexToHSL(selectedColorCode) : {h:0,s:50,l:50};
3769                                        if(variantHSL.s < 10) {
3770                                            if(variantHSL.l > 85 && variantSelected.l >= 15 && variantSelected.l < variantHSL.l) {
3771                                                selectedVariant = variant;
3772                                            }
3773                                            if(variantHSL.l < 15 && variantSelected.l > variantHSL.l) {
3774                                                selectedVariant = variant;
3775                                            }
3776                                        }
3777                                    }
3778                                    selected = selectedVariant || product.variants[0];
3779                                });
3780                                break;
3781                            case me.EXTRACT.CV:
3782                                variants = product.variants;
3783                                variants.forEach(function (variant) {
3784                                    if (me.variantHasCV(variant)) {
3785                                        if(product.productType !== "Pack"){
3786                                            variantColorCode =  variant.colorCode
3787                                            productVariantStorage = variant.storage
3788                                        } else {
3789                                            variantColorCode = variant.packProducts && variant.packProducts.length !== 0 ? variant.packProducts[0].colorCode : variant.colorCode;
3790                                            productVariantStorage = variant.packProducts && variant.packProducts.length !== 0 ? variant.packProducts[0].storage : variant.storage;
3791                                        }
3792                                        if(Object.keys(selected).length !== 0){
3793                                            if(product.productType !== "Pack"){
3794                                                selectedColorCode = selected.colorCode;
3795                                                selectedVariantStorage = selected.storage;
3796                                            } else {
3797                                                selectedColorCode = selected.packProducts && selected.packProducts.length !== 0 ? selected.packProducts[0].colorCode : selected.colorCode;
3798                                                selectedVariantStorage = selected.packProducts && selected.packProducts.length !== 0 ? selected.packProducts[0].storage : selected.storage;
3799                                            }
3800                                        }
3801                                        if(Object.keys(selected).length !== 0 && variantColorCode === selectedColorCode) {
3802                                            var variantStorage = productVariantStorage.match(/[a-z]+|[^a-z]+/gi);
3803                                            var selectedStorage = productVariantStorage.match(/[a-z]+|[^a-z]+/gi);
3804                                            if(variantStorage.length !== 0 && selectedStorage.length !== 0 && variantStorage[1].trim() === selectedStorage[1].trim()) {
3805                                                if (Number.parseInt(variantStorage[0].trim()) < Number.parseInt(selectedStorage[0].trim())) {
3806                                                    selectedVariant = variant;
3807                                                }
3808                                            } else if (variantStorage[1].trim() === "GB") {
3809                                                    selectedVariant = variant;
3810                                            }
3811                                        } else {
3812                                            variantHSL = colorUtils.methods.hexToHSL(variantColorCode);
3813                                            variantSelected = Object.keys(selected).length !== 0  ? colorUtils.methods.hexToHSL(variantColorCode) : {h:0,s:50,l:50};
3814                                            if(variantHSL.s < 10) {
3815                                                if(variantHSL.l > 85 && variantSelected.l >= 15 && variantSelected.l < variantHSL.l) {
3816                                                    variant.priceCondition.CV.forEach(function (condition) {
3817                                                        selectedVariant = variant;
3818                                                    });
3819                                                }
3820                                                if(variantHSL.l < 15 && product.selectedCV && variantSelected.l > variantHSL.l) {
3821                                                    variant.priceCondition.CV.forEach(function (condition) {
3822                                                        selectedVariant = variant;
3823                                                    });
3824                                                }
3825                                            }
3826                                        }
3827                                    }
3828                                    selected = selectedVariant || product.variants[0];
3829                                });
3830                                break;
3831                            case me.EXTRACT.FIRST:
3832                            default:
3833                                if (product.variants && product.variants.length > 0) {
3834                                    selected = product.variants[0];
3835                                }
3836                                break;
3837                        }
3838            return selected;
3839        },
3840
3841        findPackVariantByPackId: function (products, urlParams) {
3842            for (const element of products.variants) {
3843                if (element.id === urlParams.pack) {
3844                    return element;
3845                }
3846            }
3847        },
3848
3849        findVariantByColorAndStorage: function (products, urlParams) {
3850            for (const element of products.variants) {
3851                if ((element.color && urlParams.color && element.color.toLowerCase() === urlParams.color.toLowerCase()) &&
3852                    (element.storage && urlParams.storage && (this.removeMemoryUnits(element.storage.toLowerCase()) === (urlParams.storage).toLowerCase()))) {
3853                    return element;
3854                } else if ((element.color && urlParams.color && element.color.toLowerCase() === urlParams.color.toLowerCase()) &&
3855                    (!urlParams.storage)) {
3856                    return element;
3857                } else if ((element.storage && urlParams.storage && (this.removeMemoryUnits(element.storage.toLowerCase()) === (urlParams.storage).toLowerCase())) &&
3858                    (!urlParams.color)) {
3859                    return element;
3860                }
3861            }
3862        },
3863
3864        updateSelectedPack: function (ref, products, selected, urlParams) {
3865            var me = this;
3866            if (!ref) {
3867                selected = me.findPackVariantByPackId(products, urlParams);
3868                if (!selected) {
3869                    if (products.defaultVariant) {
3870                        selected = me.extractVariant(products, me.EXTRACT.DEFAULT, products.defaultVariant);
3871                    } else {
3872                        selected = me.extractVariant(products, me.EXTRACT.FIRST, products.defaultVariant);
3873                    }
3874                }
3875                return selected;
3876            }
3877
3878            if (Array.isArray(ref)) {
3879                if (selected.packProducts[0].storage) {
3880                    for (const element of ref) {
3881                        if (selected.packProducts[0].storage === element.storage) {
3882                            selected = me.updateSelectedPack(element, products, selected);
3883                            return selected;
3884                        }
3885                    }
3886                }
3887                selected = me.updateSelectedPack(ref[0], products, selected);
3888                return selected;
3889            }
3890
3891            products.variants.forEach(function (variant) {
3892                if (variant.id && variant.id === ref.id) {
3893                    if (variant.galeryImages && variant.galeryImages.length > 6) {
3894                        variant.galeryImages.splice(6, variant.galeryImages.length - 6);
3895                    }
3896                    selected = variant;
3897                }
3898            }, me);
3899            return selected;
3900        },
3901
3902        updateSelectedNonPack: function (ref, products, selected, urlParams) {
3903            var me = this;
3904            if (!ref) {
3905                selected = me.findVariantByColorAndStorage(products, urlParams);
3906                if (!selected) {
3907                    if (products.defaultVariant) {
3908                        selected = me.extractVariant(products, me.EXTRACT.DEFAULT, products.defaultVariant);
3909                    } else {
3910                        selected = me.extractVariant(products, me.EXTRACT.FIRST, products.defaultVariant);
3911                    }
3912                }
3913                return selected;
3914            }
3915
3916            if (Array.isArray(ref)) {
3917                if (selected.storage) {
3918                    for (const element of ref) {
3919                        if (selected.storage === element.storage) {
3920                            selected = me.updateSelectedNonPack(element, products, selected);
3921                            return selected;
3922                        }
3923                    }
3924                }
3925                selected = me.updateSelectedNonPack(ref[0], products, selected);
3926                return selected;
3927            }
3928
3929            products.variants.forEach(function (variant) {
3930                if (variant.id && variant.id === ref.id) {
3931                    if (variant.storage && variant.storage === ref.storage || !variant.storage) {
3932                        if (variant.galeryImages && variant.galeryImages.length > 6) {
3933                            variant.galeryImages.splice(6, variant.galeryImages.length - 6);
3934                        }
3935                        selected = variant;
3936                        return;
3937                    }
3938                }
3939            }, me);
3940            return selected;
3941        },
3942
3943        updateSelected: function (ref, products, selected, urlParams) {
3944            var me = this,
3945                sel = selected;
3946            if (products.productType === me.CONSTANTS.PACK) {
3947                sel = me.updateSelectedPack(ref, products, selected, urlParams);
3948            } else {
3949                sel = me.updateSelectedNonPack(ref, products, selected, urlParams);
3950            }
3951            sel.availability = sel.stock != 0;
3952            return sel;
3953        },
3954
3955        getUrlParams: function (selected) {
3956            var urlParams = {};
3957            if (selected.productType !== this.CONSTANTS.PACK) {
3958                urlParams.color = selected.color.toLowerCase();
3959                urlParams.storage = this.removeMemoryUnits(selected.storage.toLowerCase());
3960            } else {
3961                urlParams.pack = selected.id.toLowerCase();
3962            }
3963            urlParams.paymentType = selected.pricecond;
3964            return urlParams;
3965        },
3966
3967        removeMemoryUnits: function (storage) {
3968            var regexStorage = storage.match(this.REGEX_LETTERS);
3969            if (regexStorage && regexStorage.length > 0) {
3970                return regexStorage[0].trim();
3971            }
3972            return storage;
3973        },
3974
3975        getColorsAndMemoriesFromProduct: function (product) {
3976            var colorsMemories = [],
3977                me = this;
3978            if (product) {
3979                var variants = product.variants;
3980                if (variants && variants.length > 0) {
3981                    variants.forEach(function (variant) {
3982                        var exists = false;
3983                        if (colorsMemories && colorsMemories.length > 0) {
3984                            colorsMemories.forEach(function (colorMemoryAux) {
3985                                if (colorMemoryAux.name.toLocaleLowerCase() === variant.color.toLocaleLowerCase()) {
3986                                    colorMemoryAux.option.push({
3987                                        id: variant.id,
3988                                        storage: variant.storage,
3989                                        stock: variant.stock
3990                                    });
3991                                    exists = true;
3992                                }
3993                            });
3994                        }
3995                        if (!exists) {
3996                            colorsMemories.push(me.addColorAndMemory(variant));
3997                        }
3998                    });
3999                }
4000            }
4001            return colorsMemories;
4002        },
4003
4004        getStoragesFromProduct: function (product) {
4005            var colorsMemories = [],
4006                me = this;
4007            if (product) {
4008                var variants = product.variants;
4009                if (variants && variants.length > 0) {
4010                    variants.forEach(function (variant) {
4011                        var exists = false;
4012                        if (colorsMemories && colorsMemories.length > 0) {
4013                            colorsMemories.forEach(function (colorMemoryAux) {
4014                                if (colorMemoryAux.storage === variant.storage) {
4015                                    colorMemoryAux.option.push({
4016                                        id: variant.id,
4017                                        storage: variant.storage,
4018                                        stock: variant.stock
4019                                    });
4020                                    exists = true;
4021                                }
4022                            });
4023                        }
4024                        if (!exists) {
4025                            colorsMemories.push(me.addColorAndMemory(variant));
4026                        }
4027                    });
4028                }
4029            }
4030            return colorsMemories;
4031        },
4032
4033        getColorsAndMemoriesFromPack: function (product) {
4034            var colorsMemories = [],
4035                me = this;
4036            if (product) {
4037                var variants = product.variants;
4038                if (variants && variants.length > 0) {
4039                    variants.forEach(function (variant) {
4040                        var exists = false,
4041                            firstProductId = variant.mainProductId,
4042                            firstProduct = variant.packProducts.find(prod => prod.id === firstProductId);
4043                        if (colorsMemories && colorsMemories.length > 0) {
4044                            colorsMemories.forEach(function (colorMemoryAux) {
4045                                if (colorMemoryAux.name.toLocaleLowerCase() === firstProduct.color.toLocaleLowerCase()) {
4046                                    colorMemoryAux.option.push({
4047                                        id: variant.id,
4048                                        storage: firstProduct.storage,
4049                                        stock: variant.stock
4050                                    });
4051                                    exists = true;
4052                                }
4053                            });
4054                        }
4055                        if (!exists) {
4056                            colorsMemories.push(me.addColorAndMemory(variant));
4057                        }
4058                    });
4059                }
4060            }
4061            return colorsMemories;
4062        },
4063
4064        getStoragesFromPack: function (product) {
4065            var colorsMemories = [],
4066                me = this;
4067            if (product) {
4068                var variants = product.variants;
4069                if (variants && variants.length > 0) {
4070                    variants.forEach(function (variant) {
4071                        var exists = false,
4072                            firstProductId = variant.mainProductId,
4073                            firstProduct = variant.packProducts.find(prod => prod.id === firstProductId);
4074                        if (colorsMemories && colorsMemories.length > 0) {
4075                            colorsMemories.forEach(function (colorMemoryAux) {
4076                                if (colorMemoryAux.storage === firstProduct.storage ) {
4077                                    colorMemoryAux.option.push({
4078                                        id: variant.id,
4079                                        storage: firstProduct.storage,
4080                                        stock: variant.stock
4081                                    });
4082                                    exists = true;
4083                                }
4084                            });
4085                        }
4086                        if (!exists) {
4087                            colorsMemories.push(me.addColorAndMemory(variant));
4088                        }
4089                    });
4090                }
4091            }
4092            return colorsMemories;
4093        },
4094
4095        addColorAndMemory: function (variant) {
4096            var variantValue = variant.productType === this.CONSTANTS.PACK ? variant.packProducts[0] : variant;
4097            return {
4098
4099                name: variantValue.color,
4100                code: variantValue.colorCode ? variantValue.colorCode : variantValue.color.toLowerCase(),
4101                storage: variantValue.storage,
4102                option: [{
4103                    id: variant.id,
4104                    storage: variantValue.storage,
4105                    stock: variant.stock
4106                }]
4107            };
4108        },
4109
4110        colorOptionsFn: function (selected, products) {
4111            var colors = [];
4112            if (!selected?.storage) {
4113                return;
4114            }
4115            if (!products?.variants) {
4116                return;
4117            }
4118
4119            products.variants.forEach(function (colorVariant) {
4120
4121                if (colorVariant.variants?.length) {
4122                    var color = {
4123                        name: colorVariant.color,
4124                        code: colorVariant.colorCode ? colorVariant.colorCode : colorVariant.color.toLowerCase(),
4125                        option: []
4126                    };
4127                    colorVariant.variants.forEach(function (storageVariant) {
4128                        color.option.push({
4129                            id: storageVariant.id,
4130                            storage: storageVariant.storage
4131                        });
4132                    });
4133                    colors.push(color);
4134                }
4135            });
4136            return colors;
4137        },
4138
4139        storageOptionsFn: function (selected, products) {
4140            var storages = [];
4141            var variants = products.variants;
4142            for (const element of variants) {
4143                if (selected && selected.color === element.color) {
4144                    var storage = "",
4145                        unit = "";
4146                    if (element.storage) {
4147                        if (element.storage.search(this.CONSTANTS.GB) !== -1) {
4148                            storage = element.storage.replace(this.CONSTANTS.GB, this.CONSTANTS.EMPTY);
4149                            unit = this.CONSTANTS.GB;
4150                        } else if (element.storage.search(this.CONSTANTS.MB) !== -1) {
4151                            storage = element.storage.replace(this.CONSTANTS.MB, this.CONSTANTS.EMPTY);
4152                            unit = this.CONSTANTS.MB;
4153                        } else if (element.storage.search(this.CONSTANTS.TB) !== -1) {
4154                            storage = element.storage.replace(this.CONSTANTS.TB, this.CONSTANTS.EMPTY);
4155                            unit = this.CONSTANTS.TB;
4156                        }
4157                    }
4158                    storages.push({
4159                        storage: element.storage,
4160                        value: storage,
4161                        id: element.id,
4162                        stock: element.stock,
4163                        unit: unit,
4164                        isPreSale: element.preSales
4165                    });
4166                }
4167            }
4168            return storages;
4169        },
4170
4171        storageOptionsPack: function (selected, products) {
4172            var storages = [],
4173                alreadyFound = [],
4174                variants = products.variants,
4175                selectedMainProdId = selected.mainProductId
4176                selectedMainProd = selected.packProducts.find(prod => prod.id === selectedMainProdId);
4177
4178            for (const element of variants) {
4179                var variantMainProdId = element.mainProductId,
4180                    variantMainProd = element.packProducts.find(prod => prod.id === variantMainProdId);
4181                if (selected && selectedMainProd.color === variantMainProd.color) {
4182                    var storage = "",
4183                        unit = "";
4184                    if (variantMainProd.storage) {
4185                        if (variantMainProd.storage.search(this.CONSTANTS.GB !== -1)) {
4186                            storage = variantMainProd.storage.replace(this.CONSTANTS.GB, this.CONSTANTS.EMPTY);
4187                            unit = this.CONSTANTS.GB;
4188                        } else if (variantMainProd.storage.search(this.CONSTANTS.MB !== -1)) {
4189                            storage = variantMainProd.storage.replace(this.CONSTANTS.MB, this.CONSTANTS.EMPTY);
4190                            unit = this.CONSTANTS.MB;
4191                        } else if (variantMainProd.storage.search(this.CONSTANTS.TB !== -1)) {
4192                            storage = variantMainProd.storage.replace(this.CONSTANTS.TB, this.CONSTANTS.EMPTY);
4193                            unit = this.CONSTANTS.TB;
4194                        }
4195                    }
4196                    var found = false;
4197                    if (alreadyFound.includes(storage)) {
4198                        found = true;
4199                    } else {
4200                        alreadyFound.push(storage);
4201                    }
4202                    if (!found) {
4203                        storages.push({
4204                            storage: variantMainProd.storage,
4205                            value: storage,
4206                            id: element.id,
4207                            stock: element.stock,
4208                            unit: unit
4209                        });
4210                    }
4211                }
4212            }
4213            return storages;
4214        },
4215
4216        packProductsForSelected: function (selected, products) {
4217            var packProducts = [],
4218                packProductsNoStock = [],
4219                alreadySelected = false,
4220                variants = products.variants;
4221
4222            for (const element of variants) {
4223                    _hasStockAvailable = (element.stock !== "0");
4224                if (selected && selected.packProducts[0].storage === element.packProducts[0].storage &&
4225                    selected.packProducts[0].color === element.packProducts[0].color) {
4226                    var _products = [];
4227                    for (var j = 1; j < element.packProducts.length; j++) {
4228                        var product = {};
4229                        product.color = element.packProducts[j].color;
4230                        product.colorCode = element.packProducts[j].colorCode;
4231                        product.storage = element.packProducts[j].storage;
4232                        product.name = element.packProducts[j].brand + ' ' + element.packProducts[j].model;
4233                        _products.push(product);
4234                    }
4235
4236                    if(_hasStockAvailable) {
4237                        packProducts.push({
4238                            id: element.id,
4239                                          selected: false,
4240                            hasStockAvailable: _hasStockAvailable,
4241                            products: _products
4242                        });
4243                    } else {
4244                        packProductsNoStock.push({
4245                            id: element.id,
4246                                          selected: false,
4247                            hasStockAvailable: _hasStockAvailable,
4248                            products: _products
4249                        });
4250                    }
4251                }
4252            }
4253            for (var i = 0; i < packProducts.length; i++) {
4254                if(packProducts[i].id === selected.id) {
4255                    packProducts[i].selected = true;
4256                    alreadySelected = true;
4257                    break;
4258                }
4259            }
4260            if(!alreadySelected && packProducts.length > 0) {
4261               packProducts[0].selected = true;
4262           }
4263            return packProducts.concat(packProductsNoStock);
4264        },
4265
4266        showMemories: function (products, colors) {
4267            var memoryOptions = [],
4268            productType ='',
4269            forceMemoryPresentation = products.forceMemoryPresentation;
4270
4271            if(this.CATALOG.PACK === products.productType) {
4272                productType = products.variants[0].packProducts[0].productType;
4273            } else {
4274                productType = products.productType;
4275            }
4276
4277            if (colors) {
4278                colors.forEach(function (color) {
4279                    if (color.option) {
4280                        color.option.forEach(function (colorOption) {
4281                            if (colorOption.storage) {
4282                                memoryOptions.push(colorOption.storage);
4283                            }
4284                        });
4285                    }
4286                });
4287            }
4288
4289            memoryOptions = memoryOptions.filter(function (item, pos) {
4290                return memoryOptions.indexOf(item) === pos;
4291            });
4292
4293            if (!this.isSmartphone(productType) && !this.isTabletType(productType)) {
4294                return false;
4295            } else if (((this.isSmartphone(productType) || this.isTabletType(productType) )&& !forceMemoryPresentation) &&
4296                this.MINIMUM_MEMORIES > memoryOptions.length) {
4297                return false;
4298            }
4299            return true;
4300        },
4301
4302        variantHasPrice: function (variant) {
4303            return (variant.priceCondition !== null && variant.priceCondition !== undefined);
4304        },
4305
4306        variantHasPVP: function (variant) {
4307            return (this.variantHasPrice(variant) && variant.priceCondition.PVP && variant.priceCondition.PVP.length > 0)
4308        },
4309
4310        variantHasCV: function (variant) {
4311            return (this.variantHasPrice(variant) && variant.priceCondition.CV && variant.priceCondition.CV.length > 0)
4312        },
4313
4314        variantHasPT: function (variant) {
4315            return (this.variantHasPrice(variant) && variant.priceCondition.PT && variant.priceCondition.PT.length > 0)
4316        },
4317
4318        getStoreId: function () {
4319            var me = this,
4320                cookie = Cookies.get(me.CONSTANTS.STORE_ID_COOKIE);
4321            return cookie !== undefined && cookie ? cookie : "";
4322        },
4323
4324        setStoreCookie: function (selectedStore) {
4325            var me = this,
4326                hostname = document.location.hostname,
4327                uri = location.pathname.split(me.CONSTANTS.STORE)[0].concat(me.CONSTANTS.STORE);
4328            if (hostname.includes('.')) {
4329                hostname = hostname.substr(hostname.indexOf('.'), hostname.length);
4330            }
4331            Cookies.set(me.CONSTANTS.STORE_ID_COOKIE, selectedStore, { domain: hostname, path: uri});
4332        },
4333
4334        removeStoreCookie: function () {
4335            var me = this,
4336                hostname = document.location.hostname,
4337                uri = location.pathname.split(me.CONSTANTS.STORE)[0].concat(me.CONSTANTS.STORE);
4338            if (hostname.includes('.')) {
4339                hostname = hostname.substr(hostname.indexOf('.'), hostname.length);
4340            }
4341            Cookies.remove(me.CONSTANTS.STORE_ID_COOKIE, { domain: hostname, path: uri});
4342        },
4343
4344        storeWatcher: function (store, stateToWatch, callback) {
4345            store.watch(
4346                function(state) {
4347                    return store.getters[stateToWatch];
4348                },
4349                function(newValue, oldValue) {
4350                    callback(newValue);
4351                }
4352            );
4353        },
4354        sortByKey: function(array, key) {
4355            return array.sort(function(a, b) {
4356                var x = Number.parseInt(a[key]), y = Number.parseInt(b[key]);
4357                return ((x < y) ? -1 : ((x > y) ? 1 : 0));
4358            });
4359        },
4360
4361        sortByStorages: function(array) {
4362            const mbArr = [];
4363            const gbArr = [];
4364            const tbArr = [];
4365
4366            array.forEach(item => {
4367                if(item.storage.includes(this.CONSTANTS.MB)){
4368                    mbArr.push(item);
4369                } else if(item.storage.includes(this.CONSTANTS.GB)){
4370                    gbArr.push(item);
4371                } else {
4372                    tbArr.push(item);
4373                }
4374            })
4375            this.sortStorages(mbArr);
4376            this.sortStorages(gbArr);
4377            this.sortStorages(tbArr);
4378            
4379            return [...mbArr, ...gbArr, ...tbArr];
4380        },
4381
4382        sortStorages: function(array){
4383            if(array.length >= 2){
4384               array.sort((a, b) => {
4385                    storageA = a.storage.slice(0, - 3)
4386                    storageb = b.storage.slice(0, - 3)
4387                    if (Number(storageA) > Number(storageb))
4388                        return 1
4389                    else
4390                        return -1
4391                });   
4392                
4393
4394                return array;
4395            }
4396        },
4397        
4398        displayBadge: function (badge) {
4399            var me = this;
4400
4401            var dateNow = Date.now();
4402            var dateEnd = new Date(badge.badgeDateTo).getTime();
4403            var dateBegin = new Date(badge.badgeDateFrom).getTime();
4404
4405            if (me.isBusinessContext) {
4406                return !!(((dateNow > dateBegin && dateNow < dateEnd) || (!dateEnd && !dateBegin) ||
4407                    (!dateEnd && dateNow > dateBegin) || (!dateBegin && dateNow < dateEnd)) && badge.badgeLabelBusiness);
4408            } else if (((dateNow > dateBegin && dateNow < dateEnd) || (!dateEnd && !dateBegin) ||
4409                    (!dateEnd && dateNow > dateBegin) || (!dateBegin && dateNow < dateEnd)) && badge.badgeLabel) {
4410                    return true;
4411                } else {
4412                    return false;
4413                }
4414        },
4415
4416        getNumberOfBadges(relatedProductsDetails) {
4417            var maxNBadges = 0,
4418                me = this;
4419            relatedProductsDetails.forEach(function(product) {
4420                var selectedCv = product.selectedCV,
4421                    selectedPvp = product.selectedPVP,
4422                    badgeCount = 0;
4423
4424                selectedCv.badges.forEach( badge => {
4425                    if(me.displayBadge(badge)) {
4426                        badgeCount++;
4427                    }
4428                })
4429                if(badgeCount > maxNBadges) {
4430                    maxNBadges = badgeCount;
4431                }
4432
4433                badgeCount = 0;
4434                
4435                selectedPvp.badges.forEach( badge => {
4436                    if(me.displayBadge(badge)) {
4437                        badgeCount++;
4438                    }
4439                })
4440                if(badgeCount > maxNBadges) {
4441                    maxNBadges = badgeCount;
4442                }
4443            });
4444            return maxNBadges;
4445        },
4446
4447       checkIsVirtualProduct(product){
4448            var isVirtualProduct = false;
4449            //this is a temporary solution
4450            //in the future, the new productCatalog will return a property for this
4451            switch(product?.productType){
4452                        case this.CONSTANTS.SIM_CARD:
4453                            isVirtualProduct = product.simType === this.CONSTANTS.MAILING;
4454                            break;
4455                        //add other productType in case there is a virtual product with a different product type
4456                        default:
4457                            break;
4458                    }
4459            return isVirtualProduct;
4460       },
4461        getFiltersValue: function (filtersValue, rangeFilters, loyaltyFilter, isBusiness = false) {
4462        var filtersValueArray = [];
4463        for (const element of Object.keys(filtersValue)) {
4464            var key = element;
4465            var values = filtersValue[key]?.values;
4466            var list = "";
4467            var j;
4468            if(values?.length){
4469                switch (key) {
4470                    case this.CONSTANTS.PAYMENT_TYPE:
4471                        if (this.CONSTANTS.CV === values) {
4472                            list = this.CONSTANTS.CV_POINTS_LABEL;
4473                        } else if (this.CONSTANTS.PVP === values) {
4474                            list = this.CONSTANTS.PVP_LABEL;
4475                        } else if (this.CONSTANTS.PT === values) {
4476                            list = this.CONSTANTS.PT_LABEL;
4477                        }
4478                        break;
4479                    case this.CONSTANTS.PRICE:
4480                        if(values.toString() !== this.getPriceMinMax(rangeFilters, isBusiness)){
4481                            for (j = 0; j < values.length; j++) {
4482                                    list = list + "€" + (values[j]);
4483                                    if (j !== values.length - 1) {
4484                                        list = list + " - ";
4485                                    }
4486                            }
4487                        }
4488                        break;
4489                    case this.CONSTANTS.CV_POINTS:
4490                        if(values.toString() !== this.getLoyaltyMinMax(loyaltyFilter)){
4491                            for (j = 0; j < values.length; j++) {
4492                                    list = list + values[j];
4493                                    if (j !== values.length - 1) {
4494                                        list = list + " - ";
4495                                    }
4496                            }
4497                            list = `${list} Pontos`;
4498                        }
4499                        break;
4500                    case this.CONSTANTS.NAME:
4501                        break;
4502                    default:
4503                        for (j = 0; j < values.length; j++) {
4504                                if(values[j]){
4505                                    filtersValueArray.push(values[j]);
4506                                }
4507                        }
4508                        break;
4509                }
4510                if(list){
4511                    filtersValueArray.push(list);
4512                }
4513            }
4514        }
4515        return filtersValueArray;
4516        },
4517        getPriceMinMax: function(rangeFilters, isBusiness) {
4518            var priceMinMaxArr = [];
4519            if(rangeFilters){
4520                if(isBusiness){
4521                    priceMinMaxArr.push(rangeFilters[0]?.filter_values?.LOW_WITHOUT_VAT?.LOWERPVP, rangeFilters[0]?.filter_values?.HIGH_WITHOUT_VAT?.HIGHERPVP);
4522                } else {
4523                    priceMinMaxArr.push(rangeFilters[0]?.filter_values?.LOW?.LOWERPVP, rangeFilters[0]?.filter_values?.HIGH?.HIGHERPVP);
4524                }
4525            }
4526            return priceMinMaxArr.toString();
4527        },
4528
4529        getLoyaltyMinMax: function(loyaltyFilter) {
4530            var loyaltyMinMaxArr = [];
4531            if(loyaltyFilter){
4532                loyaltyMinMaxArr.push(loyaltyFilter[0]?.filter_values?.LOW?.LOWERCV, loyaltyFilter[0]?.filter_values?.HIGH?.HIGHERCV);
4533            }
4534            return loyaltyMinMaxArr.toString();
4535        },
4536
4537        getFiltersType: function (filtersType) {
4538            var me = this;
4539            var keys = Object.keys(filtersType);
4540
4541            for (var i = 0; i < keys.length; i++) {
4542                keys[i] = me
4543                    .i18nUtils()
4544                    .getProperty(
4545                        me.CONSTANTS.i18n_FILTERS_TITLE_PREFIX + keys[i]
4546                    );
4547            }
4548
4549            return keys;
4550        },
4551        productHasDiscount: function(selected) {
4552            if(!selected.hasOwnProperty("priceCondition")) {
4553                return false;
4554            }
4555
4556            var hasPvpDiscount = false;
4557            var validForStartDate = selected?.validForStartDate;
4558            var validForEndDate = selected?.validForEndDate;
4559
4560            // The product has discount if the strikedPrice is lower than the price
4561            var pvp = selected?.priceCondition?.PVP[0];
4562            if (pvp.hasOwnProperty("price") && pvp.hasOwnProperty("strikedPrice") && pvp.price < pvp.strikedPrice) {
4563                hasPvpDiscount = true;
4564            }
4565
4566            // Only returns true if has discount and both start and end dates exist
4567            return !!(hasPvpDiscount && validForStartDate != null && validForEndDate != null);
4568        },
4569
4570        getMaxTradeInBonusValue: function (list) {
4571            if (list.length > 0) {
4572                const nonGenericList = list.filter(item => !item.name.startsWith("GENERIC_BONUS"));
4573                const relevantList = nonGenericList.length > 0 ? nonGenericList : list;
4574
4575                const maxBonus = relevantList.reduce((max, item) => {
4576                    return Number.parseFloat(item.bonus) > Number.parseFloat(max.bonus) ? item : max;
4577                }).bonus;
4578
4579                if (Number.parseFloat(maxBonus) === 0) {
4580                    return null;
4581                }
4582
4583                return this.formatBonus(maxBonus);
4584            }
4585
4586            return null;
4587        },
4588
4589        formatBonus: function(bonus) {
4590            const number = Number.parseFloat(bonus);
4591            if (Number.isInteger(number)) {
4592                return number.toString();
4593            } else {
4594                return number.toFixed(2).replace('.', ',');
4595            }
4596        }
4597    }
4598};
4599
4600var checkoutUtils = {
4601    data: function () {
4602        return {
4603            CONSTANTS: {
4604                BAD_REQUEST_HTTP_CODE: '400',
4605                CHECKOUT_ERROR_MESSAGE_BASELINE: 'eshop.vf_checkout.error.message.',
4606                INVALID_BASKET_ERROR_REFERENCE: 'E0015',
4607                REGISTER_ORDER_GENERIC_TRACKING_ERROR: 'Error while register order'
4608            },
4609            errorsCV: ['E0016', 'E0017', 'E0018', 'E0019', 'E0020', 'E0021', 'E0022', 'E0023', 'E0024', 'E0053', 'E0056', 'E0062', 'E0063', 'E0064', 'E0065', 'E0066', 'E0067', 'E0068', 'E0071']
4610        };
4611    },
4612
4613    methods: {
4614        getErrorMessagesByCheckoutErrorCode: function(checkoutErrorResponseDTO, genericErrorMessage) {
4615            var me = this, messageToShow = '', showGenericError = true, isToScroll = false, messagesKeys = '';
4616            if (checkoutErrorResponseDTO.details && checkoutErrorResponseDTO.details.length > 0) {
4617                var errorDetails = checkoutErrorResponseDTO.details;
4618                for (const element of errorDetails) {
4619                    if(me.i18nUtils().getProperty(me.CONSTANTS.CHECKOUT_ERROR_MESSAGE_BASELINE + element.reference) && !me.stringUtils().include(messageToShow, me.
4619i18nUtils().getProperty(me.CONSTANTS.CHECKOUT_ERROR_MESSAGE_BASELINE + element.reference))) {
4620                        var messageKeyAndValue = me.i18nUtils().getKeyAndValue(me.CONSTANTS.CHECKOUT_ERROR_MESSAGE_BASELINE + element.reference);
4621                        messageToShow = messageToShow + messageKeyAndValue.value + "<br>";
4622                        messagesKeys = messagesKeys + messageKeyAndValue.key + ",";
4623                        me.errorsCV.forEach(function(item) {
4624                            if(item === element.reference) {
4625                                isToScroll = true;
4626                            }
4627                        });
4628                        showGenericError = false;
4629                        if(element.reference === me.CONSTANTS.INVALID_BASKET_ERROR_REFERENCE) {
4630                            var messageKeyAndValue = me.i18nUtils().getKeyAndValue(me.CONSTANTS.CHECKOUT_ERROR_MESSAGE_BASELINE + element.reference);
4631                            messageToShow = messageKeyAndValue.value;
4632                            messagesKeys = messageKeyAndValue.key;
4633                            break;
4634                        }
4635                    }
4636                }
4637            } else {
4638                showGenericError = false;
4639                var messageKeyAndValue = me.i18nUtils().getKeyAndValue(me.CONSTANTS.CHECKOUT_ERROR_MESSAGE_BASELINE + checkoutErrorResponseDTO.errorCode);
4640                messageToShow = messageKeyAndValue.value;
4641                messagesKeys = messageKeyAndValue.key;
4642                me.errorsCV.forEach(function(item) {
4643                    if(item === checkoutErrorResponseDTO.errorCode) {
4644                        isToScroll = true;
4645                    }
4646                });
4647            }
4648            return showGenericError ? {message: genericErrorMessage.value, isToScroll: false, messageID: genericErrorMessage.key} : {message: messageToShow, isToScroll: isToScroll, messageID: messagesKeys};
4649        },
4650
4651        getErrorMessagesByJourneyServiceErrorCode: function(finalizeCheckoutErrorResponseDTO, genericErrorMessage){
4652            const me = this;
4653            const messageKeyAndValue = me.i18nUtils().getKeyAndValue(me.CONSTANTS.CHECKOUT_ERROR_MESSAGE_BASELINE + finalizeCheckoutErrorResponseDTO.code);
4654            if(messageKeyAndValue){
4655                const {value, key} = messageKeyAndValue;
4656                return {message: value, messageID: key};
4657            }
4658            return {message: genericErrorMessage.value, messageID: genericErrorMessage.key};
4659        },
4660        checkoutErrorsMapping: function (response, genericErrorMessage) {
4661            var me = this;
4662            if (response?.body?.checkoutErrorResponseDTO && response.body.checkoutErrorResponseDTO.statusCode === me.CONSTANTS.BAD_REQUEST_HTTP_CODE) {
4663                var  object = me.getErrorMessagesByCheckoutErrorCode(response.body.checkoutErrorResponseDTO, genericErrorMessage);
4664                me.formatErrorMessageToToasterWithTealiumTracking(object.message, object.messageID);
4665                return object.isToScroll;
4666            } else {
4667                me.formatErrorMessageToToasterWithTealiumTracking(genericErrorMessage.value, genericErrorMessage.key);
4668            }
4669            return false;
4670        },
4671
4672        journeyServiceErrorsMapping: function (response, genericErrorMessage){
4673            const me = this;
4674            if(response?.body?.finalizeCheckoutErrorResponseDTO?.status === me.CONSTANTS.BAD_REQUEST_HTTP_CODE){
4675                const object = me.getErrorMessagesByJourneyServiceErrorCode(response.body.finalizeCheckoutErrorResponseDTO, genericErrorMessage);
4676                me.formatErrorMessageToToasterWithTealiumTracking(object.message, object.messageID);
4677            } else {
4678                me.formatErrorMessageToToasterWithTealiumTracking(genericErrorMessage.value, me.CONSTANTS.REGISTER_ORDER_GENERIC_TRACKING_ERROR);
4679            }
4680        }
4681    }
4682};
4683
4684var colorUtils = {
4685    methods: {
4686        hexToRGB: function(hex) {
4687            var rgb;
4688            hex = hex.trim();
4689            if(hex.length === 7 || (hex.length === 6 && !hex.includes("#"))) {
4690                rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
4691            }
4692            if(hex.length === 4 || (hex.length === 3 && !hex.includes("#"))) {
4693                rgb = /^#?([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})$/i.exec(hex)
4694            }
4695            return rgb ? {
4696                r: Number.parseInt(rgb[1], 16),
4697                g: Number.parseInt(rgb[2], 16),
4698                b: Number.parseInt(rgb[3], 16)
4699            } : {r: 191, g: 64, b: 64}
4700        },
4701
4702        hexToHSL: function(hex) {
4703            var hsl = {h:0,s:50,l:50}
4704            if(hex) {
4705                var rgb = this.hexToRGB(hex);
4706
4707                var  r = rgb.r / 255,
4708                g = rgb.g / 255,
4709                b = rgb.b / 255;
4710
4711                var cmin = Math.min(r,g,b),
4712                cmax = Math.max(r,g,b),
4713                delta = cmax - cmin,
4714                h = 0,
4715                s = 0,
4716                l = 0;
4717
4718                if (delta == 0) {
4719                    h = 0;
4720                } else if (cmax == r) {
4721                    h = ((g - b) / delta) % 6;
4722                } else if (cmax == g) {
4723                    h = (b - r) / delta + 2;
4724                } else {
4725                    h = (r - g) / delta + 4;
4726                }
4727
4728                hsl.h = Math.round(h * 60);
4729
4730                if (hsl.h < 0) {
4731                    hsl.h += 360;
4732                }
4733
4734                l = (cmax + cmin) / 2;
4735
4736                s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
4737
4738                hsl.s = +(s * 100).toFixed(1);
4739                hsl.l = +(l * 100).toFixed(1);
4740            }
4741            return hsl
4742        }
4743    }
4744};
4745
4746var accountAndServiceUtils = {
4747    data: function () {
4748        return {
4749            constants: {
4750                ACCOUNT: 'ACCOUNT',
4751                GSM: 'GSM',
4752                BLM: 'BLM',
4753                FTTH: 'FTTH',
4754                ADSL: 'ADSL'
4755            }
4756        };
4757    },
4758    methods: {
4759        hasSelectableProfile: function(profile) {
4760            return profile === this.constants.GSM || profile === this.constants.BLM || profile === this.constants.FTTH || profile === this.constants.ADSL;
4761        },
4762        isAccount: function(profile) {
4763            return profile === this.constants.ACCOUNT;
4764        }
4765    }
4766};
4767
4768var countries = {
4769    methods: {
4770        loadCountryOptions: function() {
4771            return [
4772                {
4773                 "text": "Afghanistan",
4774                 "value": "AF"
4775                },
4776                {
4777                 "text": "Åland Islands",
4778                 "value": "AX"
4779                },
4780                {
4781                 "text": "Albania",
4782                 "value": "AL"
4783                },
4784                {
4785                 "text": "Algeria",
4786                 "value": "DZ"
4787                },
4788                {
4789                 "text": "American Samoa",
4790                 "value": "AS"
4791                },
4792                {
4793                 "text": "American Minor Outlying Islands",
4794                 "value": "UM"
4795                },
4796                {
4797                 "text": "American Virgin Islands",
4798                 "value": "VI"
4799                },
4800                {
4801                 "text": "Andorra",
4802                 "value": "AD"
4803                },
4804                {
4805                 "text": "Angola",
4806                 "value": "AO"
4807                },
4808                {
4809                 "text": "Anguilla",
4810                 "value": "AI"
4811                },
4812                {
4813                 "text": "Antarctica",
4814                 "value": "AQ"
4815                },
4816                {
4817                 "text": "Antigua and Barbuda",
4818                 "value": "AG"
4819                },
4820                {
4821                 "text": "Argentina",
4822                 "value": "AR"
4823                },
4824                {
4825                 "text": "Armenia",
4826                 "value": "AM"
4827                },
4828                {
4829                 "text": "Aruba",
4830                 "value": "AW"
4831                },
4832                {
4833                 "text": "Australia",
4834                 "value": "AU"
4835                },
4836                {
4837                 "text": "Austria",
4838                 "value": "AT"
4839                },
4840                {
4841                 "text": "Azerbaijan",
4842                 "value": "AZ"
4843                },
4844                {
4845                 "text": "Bahamas",
4846                 "value": "BS"
4847                },
4848                {
4849                 "text": "Bahrain",
4850                 "value": "BH"
4851                },
4852                {
4853                 "text": "Bangladesh",
4854                 "value": "BD"
4855                },
4856                {
4857                 "text": "Barbados",
4858                 "value": "BB"
4859                },
4860                {
4861                 "text": "Belarus",
4862                 "value": "BY"
4863                },
4864                {
4865                 "text": "Belgium",
4866                 "value": "BE"
4867                },
4868                {
4869                 "text": "Belize",
4870                 "value": "BZ"
4871                },
4872                {
4873                 "text": "Benin",
4874                 "value": "BJ"
4875                },
4876                {
4877                 "text": "Bermuda",
4878                 "value": "BM"
4879                },
4880                {
4881                 "text": "Bhutan",
4882                 "value": "BT"
4883                },
4884                {
4885                 "text": "Bolivia",
4886                 "value": "BO"
4887                },
4888                {
4889                 "text": "Bosnia and Herzegovina",
4890                 "value": "BA"
4891                },
4892                {
4893                 "text": "Botswana",
4894                 "value": "BW"
4895                },
4896                {
4897                 "text": "Bouvet Islands",
4898                 "value": "BV"
4899                },
4900                {
4901                 "text": "Brazil",
4902                 "value": "BR"
4903                },
4904                {
4905                 "text": "British Indian Ocean Territory",
4906                 "value": "IO"
4907                },
4908                {
4909                 "text": "British Virgin Islands",
4910                 "value": "VG"
4911                },
4912                {
4913                 "text": "Brunei Darussalam",
4914                 "value": "BN"
4915                },
4916                {
4917                 "text": "Bulgaria",
4918                 "value": "BG"
4919                },
4920                {
4921                 "text": "Burkina Faso",
4922                 "value": "BF"
4923                },
4924                {
4925                 "text": "Burma",
4926                 "value": "MM"
4927                },
4928                {
4929                 "text": "Burundi",
4930                 "value": "BI"
4931                },
4932                {
4933                 "text": "Cambodia",
4934                 "value": "KH"
4935                },
4936                {
4937                 "text": "Cameroon",
4938                 "value": "CM"
4939                },
4940                {
4941                 "text": "Canada",
4942                 "value": "CA"
4943                },
4944                {
4945                 "text": "Cape Verde",
4946                 "value": "CV"
4947                },
4948                {
4949                 "text": "Cayman Islands",
4950                 "value": "KY"
4951                },
4952                {
4953                 "text": "Central African Republic",
4954                 "value": "CF"
4955                },
4956                {
4957                 "text": "Chad",
4958                 "value": "TD"
4959                },
4960                {
4961                 "text": "Chile",
4962                 "value": "CL"
4963                },
4964                {
4965                 "text": "China",
4966                 "value": "CN"
4967                },
4968                {
4969                 "text": "Christmas Island",
4970                 "value": "CX"
4971                },
4972                {
4973                 "text": "Coconut Islands",
4974                 "value": "CC"
4975                },
4976                {
4977                 "text": "Colombia",
4978                 "value": "CO"
4979                },
4980                {
4981                 "text": "Comoros",
4982                 "value": "KM"
4983                },
4984                {
4985                 "text": "Cook Islands",
4986                 "value": "CK"
4987                },
4988                {
4989                 "text": "Costa Rica",
4990                 "value": "CR"
4991                },
4992                {
4993                 "text": "Côte d'Ivoire",
4994                 "value": "CI"
4995                },
4996                {
4997                 "text": "Croatia",
4998                 "value": "HR"
4999                },
5000                {
5001                 "text": "Cuba",
5002                 "value": "CU"
5003                },
5004                {
5005                 "text": "Curaçao",
5006                 "value": "CW"
5007                },
5008                {
5009                 "text": "Cyprus",
5010                 "value": "CY"
5011                },
5012                {
5013                 "text": "Czech Republic",
5014                 "value": "CZ"
5015                },
5016                {
5017                 "text": "Democratic Republic of the Congo",
5018                 "value": "CD"
5019                },
5020                {
5021                 "text": "Denmark",
5022                 "value": "DK"
5023                },
5024                {
5025                 "text": "Djibouti",
5026                 "value": "DJ"
5027                },
5028                {
5029                 "text": "Dominica",
5030                 "value": "DM"
5031                },
5032                {
5033                 "text": "Dominican Republic",
5034                 "value": "DO"
5035                },
5036                {
5037                 "text": "East Timor",
5038                 "value": "TL"
5039                },
5040                {
5041                 "text": "East Timor (deprecated)",
5042                 "value": "TP"
5043                },
5044                {
5045                 "text": "Ecuador",
5046                 "value": "EC"
5047                },
5048                {
5049                 "text": "Egypt",
5050                 "value": "EG"
5051                },
5052                {
5053                 "text": "El Salvador",
5054                 "value": "SV"
5055                },
5056                {
5057                 "text": "Equatorial Guinea",
5058                 "value": "GQ"
5059                },
5060                {
5061                 "text": "Eritrea",
5062                 "value": "ER"
5063                },
5064                {
5065                 "text": "Estonia",
5066                 "value": "EE"
5067                },
5068                {
5069                 "text": "Ethiopia",
5070                 "value": "ET"
5071                },
5072                {
5073                 "text": "Falkland Islands",
5074                 "value": "FK"
5075                },
5076                {
5077                 "text": "Faroe Islands",
5078                 "value": "FO"
5079                },
5080                {
5081                 "text": "Fiji",
5082                 "value": "FJ"
5083                },
5084                {
5085                 "text": "Finland",
5086                 "value": "FI"
5087                },
5088                {
5089                 "text": "France",
5090                 "value": "FR"
5091                },
5092                {
5093                 "text": "French Guyana",
5094                 "value": "GF"
5095                },
5096                {
5097                 "text": "French Polynesia",
5098                 "value": "PF"
5099                },
5100                {
5101                 "text": "French Southern and Antarctic Lands",
5102                 "value": "TF"
5103                },
5104                {
5105                 "text": "Gabon",
5106                 "value": "GA"
5107                },
5108                {
5109                 "text": "Gambia",
5110                 "value": "GM"
5111                },
5112                {
5113                 "text": "Georgia",
5114                 "value": "GE"
5115                },
5116                {
5117                 "text": "Germany",
5118                 "value": "DE"
5119                },
5120                {
5121                 "text": "Ghana",
5122                 "value": "GH"
5123                },
5124                {
5125                 "text": "Gibraltar",
5126                 "value": "GI"
5127                },
5128                {
5129                 "text": "Greece",
5130                 "value": "GR"
5131                },
5132                {
5133                 "text": "Greenland",
5134                 "value": "GL"
5135                },
5136                {
5137                 "text": "Grenada",
5138                 "value": "GD"
5139                },
5140                {
5141                 "text": "Guadeloupe",
5142                 "value": "GP"
5143                },
5144                {
5145                 "text": "Guam",
5146                 "value": "GU"
5147                },
5148                {
5149                 "text": "Guatemala",
5150                 "value": "GT"
5151                },
5152                {
5153                 "text": "Guernsey (Channel Islands)",
5154                 "value": "GG"
5155                },
5156                {
5157                 "text": "Guinea",
5158                 "value": "GN"
5159                },
5160                {
5161                 "text": "Guinea-Bissau",
5162                 "value": "GW"
5163                },
5164                {
5165                 "text": "Guyana",
5166                 "value": "GY"
5167                },
5168                {
5169                 "text": "Haiti",
5170                 "value": "HT"
5171                },
5172                {
5173                 "text": "Heard and McDonald Islands",
5174                 "value": "HM"
5175                },
5176                {
5177                 "text": "Honduras",
5178                 "value": "HN"
5179                },
5180                {
5181                 "text": "Hong Kong",
5182                 "value": "HK"
5183                },
5184                {
5185                 "text": "Hungary",
5186                 "value": "HU"
5187                },
5188                {
5189                 "text": "Iceland",
5190                 "value": "IS"
5191                },
5192                {
5193                 "text": "India",
5194                 "value": "IN"
5195                },
5196                {
5197                 "text": "Indonesia",
5198                 "value": "ID"
5199                },
5200                {
5201                 "text": "Iran",
5202                 "value": "IR"
5203                },
5204                {
5205                 "text": "Iraq",
5206                 "value": "IQ"
5207                },
5208                {
5209                 "text": "Ireland",
5210                 "value": "IE"
5211                },
5212                {
5213                 "text": "Isle of Man",
5214                 "value": "IM"
5215                },
5216                {
5217                 "text": "Israel",
5218                 "value": "IL"
5219                },
5220                {
5221                 "text": "Italy",
5222                 "value": "IT"
5223                },
5224                {
5225                 "text": "Jamaica",
5226                 "value": "JM"
5227                },
5228                {
5229                 "text": "Japan",
5230                 "value": "JP"
5231                },
5232                {
5233                 "text": "Jersey",
5234                 "value": "JE"
5235                },
5236                {
5237                 "text": "Jordan",
5238                 "value": "JO"
5239                },
5240                {
5241                 "text": "Kazakhstan",
5242                 "value": "KZ"
5243                },
5244                {
5245                 "text": "Kenya",
5246                 "value": "KE"
5247                },
5248                {
5249                 "text": "Kiribati",
5250                 "value": "KI"
5251                },
5252                {
5253                 "text": "Kuwait",
5254                 "value": "KW"
5255                },
5256                {
5257                 "text": "Kyrgyzstan",
5258                 "value": "KG"
5259                },
5260                {
5261                 "text": "Laos",
5262                 "value": "LA"
5263                },
5264                {
5265                 "text": "Latvia",
5266                 "value": "LV"
5267                },
5268                {
5269                 "text": "Lebanon",
5270                 "value": "LB"
5271                },
5272                {
5273                 "text": "Lesotho",
5274                 "value": "LS"
5275                },
5276                {
5277                 "text": "Liberia",
5278                 "value": "LR"
5279                },
5280                {
5281                 "text": "Libya",
5282                 "value": "LY"
5283                },
5284                {
5285                 "text": "Liechtenstein",
5286                 "value": "LI"
5287                },
5288                {
5289                 "text": "Lithuania",
5290                 "value": "LT"
5291                },
5292                {
5293                 "text": "Luxembourg",
5294                 "value": "LU"
5295                },
5296                {
5297                 "text": "Macau",
5298                 "value": "MO"
5299                },
5300                {
5301                 "text": "Macedonia",
5302                 "value": "MK"
5303                },
5304                {
5305                 "text": "Madagascar",
5306                 "value": "MG"
5307                },
5308                {
5309                 "text": "Malawi",
5310                 "value": "MW"
5311                },
5312                {
5313                 "text": "Malaysia",
5314                 "value": "MY"
5315                },
5316                {
5317                 "text": "Maldives",
5318                 "value": "MV"
5319                },
5320                {
5321                 "text": "Mali",
5322                 "value": "ML"
5323                },
5324                {
5325                 "text": "Malta",
5326                 "value": "MT"
5327                },
5328                {
5329                 "text": "Marshall Islands",
5330                 "value": "MH"
5331                },
5332                {
5333                 "text": "Martinique",
5334                 "value": "MQ"
5335                },
5336                {
5337                 "text": "Mauritania",
5338                 "value": "MR"
5339                },
5340                {
5341                 "text": "Mauritius",
5342                 "value": "MU"
5343                },
5344                {
5345                 "text": "Mayotte",
5346                 "value": "YT"
5347                },
5348                {
5349                 "text": "Mexico",
5350                 "value": "MX"
5351                },
5352                {
5353                 "text": "Micronesia",
5354                 "value": "FM"
5355                },
5356                {
5357                 "text": "Moldova",
5358                 "value": "MD"
5359                },
5360                {
5361                 "text": "Monaco",
5362                 "value": "MC"
5363                },
5364                {
5365                 "text": "Mongolia",
5366                 "value": "MN"
5367                },
5368                {
5369                 "text": "Montenegro",
5370                 "value": "ME"
5371                },
5372                {
5373                 "text": "Montserrat",
5374                 "value": "MS"
5375                },
5376                {
5377                 "text": "Morocco",
5378                 "value": "MA"
5379                },
5380                {
5381                 "text": "Mozambique",
5382                 "valu
5382e": "MZ"
5383                },
5384                {
5385                 "text": "Namibia",
5386                 "value": "NA"
5387                },
5388                {
5389                 "text": "Nauru",
5390                 "value": "NR"
5391                },
5392                {
5393                 "text": "Nepal",
5394                 "value": "NP"
5395                },
5396                {
5397                 "text": "Netherlands",
5398                 "value": "NL"
5399                },
5400                {
5401                 "text": "New Caledonia",
5402                 "value": "NC"
5403                },
5404                {
5405                 "text": "New Zealand",
5406                 "value": "NZ"
5407                },
5408                {
5409                 "text": "Nicaragua",
5410                 "value": "NI"
5411                },
5412                {
5413                 "text": "Niger",
5414                 "value": "NE"
5415                },
5416                {
5417                 "text": "Nigeria",
5418                 "value": "NG"
5419                },
5420                {
5421                 "text": "Niue",
5422                 "value": "NU"
5423                },
5424                {
5425                 "text": "Norfolk Islands",
5426                 "value": "NF"
5427                },
5428                {
5429                 "text": "North Korea",
5430                 "value": "KP"
5431                },
5432                {
5433                 "text": "North Mariana Islands",
5434                 "value": "MP"
5435                },
5436                {
5437                 "text": "Norway",
5438                 "value": "NO"
5439                },
5440                {
5441                 "text": "Oman",
5442                 "value": "OM"
5443                },
5444                {
5445                 "text": "Pakistan",
5446                 "value": "PK"
5447                },
5448                {
5449                 "text": "Palau",
5450                 "value": "PW"
5451                },
5452                {
5453                 "text": "Palestine",
5454                 "value": "PS"
5455                },
5456                {
5457                 "text": "Panama",
5458                 "value": "PA"
5459                },
5460                {
5461                 "text": "Papua New Guinea",
5462                 "value": "PG"
5463                },
5464                {
5465                 "text": "Paraguay",
5466                 "value": "PY"
5467                },
5468                {
5469                 "text": "Peru",
5470                 "value": "PE"
5471                },
5472                {
5473                 "text": "Philippines",
5474                 "value": "PH"
5475                },
5476                {
5477                 "text": "Pitcairn Islands",
5478                 "value": "PN"
5479                },
5480                {
5481                 "text": "Poland",
5482                 "value": "PL"
5483                },
5484                {
5485                 "text": "Portugal",
5486                 "value": "PT"
5487                },
5488                {
5489                 "text": "Puerto Rico",
5490                 "value": "PR"
5491                },
5492                {
5493                 "text": "Qatar",
5494                 "value": "QA"
5495                },
5496                {
5497                 "text": "Republic of the Congo",
5498                 "value": "CG"
5499                },
5500                {
5501                 "text": "Reunion",
5502                 "value": "RE"
5503                },
5504                {
5505                 "text": "Romania",
5506                 "value": "RO"
5507                },
5508                {
5509                 "text": "Russian Federation",
5510                 "value": "RU"
5511                },
5512                {
5513                 "text": "Rwanda",
5514                 "value": "RW"
5515                },
5516                {
5517                 "text": "Saba",
5518                 "value": "BQ"
5519                },
5520                {
5521                 "text": "Saint Helena",
5522                 "value": "SH"
5523                },
5524                {
5525                 "text": "Saint Kitts and Nevis",
5526                 "value": "KN"
5527                },
5528                {
5529                 "text": "Samoa",
5530                 "value": "WS"
5531                },
5532                {
5533                 "text": "San Marino",
5534                 "value": "SM"
5535                },
5536                {
5537                 "text": "Sao Tome and Principe",
5538                 "value": "ST"
5539                },
5540                {
5541                 "text": "Saudi Arabia",
5542                 "value": "SA"
5543                },
5544                {
5545                 "text": "Senegal",
5546                 "value": "SN"
5547                },
5548                {
5549                 "text": "Serbia",
5550                 "value": "RS"
5551                },
5552                {
5553                 "text": "Serbia and Montenegro",
5554                 "value": "CS"
5555                },
5556                {
5557                 "text": "Seychelles",
5558                 "value": "SC"
5559                },
5560                {
5561                 "text": "Sierra Leone",
5562                 "value": "SL"
5563                },
5564                {
5565                 "text": "Singapore",
5566                 "value": "SG"
5567                },
5568                {
5569                 "text": "Sint Maarten (Dutch part)",
5570                 "value": "SX"
5571                },
5572                {
5573                 "text": "Slovakia",
5574                 "value": "SK"
5575                },
5576                {
5577                 "text": "Slovenia",
5578                 "value": "SI"
5579                },
5580                {
5581                 "text": "Solomon Islands",
5582                 "value": "SB"
5583                },
5584                {
5585                 "text": "Somalia",
5586                 "value": "SO"
5587                },
5588                {
5589                 "text": "South Africa",
5590                 "value": "ZA"
5591                },
5592                {
5593                 "text": "South Georgia and the Southern Sandwich Islands",
5594                 "value": "GS"
5595                },
5596                {
5597                 "text": "South Korea",
5598                 "value": "KR"
5599                },
5600                {
5601                 "text": "South Sudan",
5602                 "value": "SS"
5603                },
5604                {
5605                 "text": "Spain",
5606                 "value": "ES"
5607                },
5608                {
5609                 "text": "Sri Lanka",
5610                 "value": "LK"
5611                },
5612                {
5613                 "text": "St. Lucia",
5614                 "value": "LC"
5615                },
5616                {
5617                 "text": "Saint Martin (French part)",
5618                 "value": "MF"
5619                },
5620                {
5621                 "text": "St. Pierre and Miquelon",
5622                 "value": "PM"
5623                },
5624                {
5625                 "text": "St. Vincent and the Grenadines",
5626                 "value": "VC"
5627                },
5628                {
5629                 "text": "Sudan",
5630                 "value": "SD"
5631                },
5632                {
5633                 "text": "Suriname",
5634                 "value": "SR"
5635                },
5636                {
5637                 "text": "Svalbard",
5638                 "value": "SJ"
5639                },
5640                {
5641                 "text": "Swaziland",
5642                 "value": "SZ"
5643                },
5644                {
5645                 "text": "Sweden",
5646                 "value": "SE"
5647                },
5648                {
5649                 "text": "Switzerland",
5650                 "value": "CH"
5651                },
5652                {
5653                 "text": "Syria",
5654                 "value": "SY"
5655                },
5656                {
5657                 "text": "Taiwan",
5658                 "value": "TW"
5659                },
5660                {
5661                 "text": "Tajikistan",
5662                 "value": "TJ"
5663                },
5664                {
5665                 "text": "Tanzania",
5666                 "value": "TZ"
5667                },
5668                {
5669                 "text": "Thailand",
5670                 "value": "TH"
5671                },
5672                {
5673                 "text": "Togo",
5674                 "value": "TG"
5675                },
5676                {
5677                 "text": "Tokelau Islands",
5678                 "value": "TK"
5679                },
5680                {
5681                 "text": "Tonga",
5682                 "value": "TO"
5683                },
5684                {
5685                 "text": "Trinidad and Tobago",
5686                 "value": "TT"
5687                },
5688                {
5689                 "text": "Tunisia",
5690                 "value": "TN"
5691                },
5692                {
5693                 "text": "Turkey",
5694                 "value": "TR"
5695                },
5696                {
5697                 "text": "Turkmenistan",
5698                 "value": "TM"
5699                },
5700                {
5701                 "text": "Turks and Caicos Islands",
5702                 "value": "TC"
5703                },
5704                {
5705                 "text": "Tuvalu",
5706                 "value": "TV"
5707                },
5708                {
5709                 "text": "Uganda",
5710                 "value": "UG"
5711                },
5712                {
5713                 "text": "Ukraine",
5714                 "value": "UA"
5715                },
5716                {
5717                 "text": "United Arab Emirates",
5718                 "value": "AE"
5719                },
5720                {
5721                 "text": "United Kingdom",
5722                 "value": "GB"
5723                },
5724                {
5725                 "text": "Uruguay",
5726                 "value": "UY"
5727                },
5728                {
5729                 "text": "USA",
5730                 "value": "US"
5731                },
5732                {
5733                 "text": "Uzbekistan",
5734                 "value": "UZ"
5735                },
5736                {
5737                 "text": "Vanuatu",
5738                 "value": "VU"
5739                },
5740                {
5741                 "text": "Vatican City",
5742                 "value": "VA"
5743                },
5744                {
5745                 "text": "Venezuela",
5746                 "value": "VE"
5747                },
5748                {
5749                 "text": "Vietnam",
5750                 "value": "VN"
5751                },
5752                {
5753                 "text": "Wallis and Futuna Islands",
5754                 "value": "WF"
5755                },
5756                {
5757                 "text": "West Sahara",
5758                 "value": "EH"
5759                },
5760                {
5761                 "text": "Yemen",
5762                 "value": "YE"
5763                },
5764                {
5765                 "text": "Zambia",
5766                 "value": "ZM"
5767                },
5768                {
5769                 "text": "Zimbabwe",
5770                 "value": "ZW"
5771                }
5772            ]
5773        }
5774    }
5775}
5776/* global $, window, Granite, localStorage , XMLHttpRequest, Uint8Array, navigator, document, setTimeout, defaultMime, btoa*/
5777
5778//Set this variables to success request url and fail success url
5779var SFUrl = {
5780    sru: '',
5781    fru: ''
5782};
5783
5784var homepageBus = new Vue({
5785    data: function () {
5786        return {
5787            loadings: [],
5788            requests: []
5789        }
5790    },
5791    watch: {
5792        loadings: function () {
5793            this.$emit('loadingsChange', this.loadings);
5794        }
5795    }
5796});
5797
5798var ToasterEventBus = new Vue();
5799
5800var bindingTabsEventBus = new Vue();
5801
5802var BackToTopEventBus = new Vue();
5803
5804var PegaCampaignsEventBus = new Vue({
5805    data: function () {
5806        return {
5807            _hasNoCampaigns: false,
5808        };
5809    },
5810    methods : {
5811        setHasNoCampaigns: function (value){
5812            this._hasNoCampaigns = value;
5813            this.$emit("hasNoCampaignsUpdated", this._hasNoCampaigns);
5814        },
5815        getHasNoCampaigns: function (value) {
5816            return this._hasNoCampaigns;
5817        }
5818    }
5819});
5820
5821var AuthMethodEventBus = new Vue({
5822    data: function () {
5823        return {
5824            _authMethodOtp: false,
5825            _hideSettings: false,
5826        };
5827    },
5828    methods: {
5829        setAuthMethodOtp: function (value) {
5830            this._authMethodOtp = value;
5831            this.$emit("authMethodUpdated", this._authMethodOtp);
5832        },
5833        setHideSettings: function (value) {
5834            this._hideSettings = value;
5835            this.$emit("hideSettingsUpdated", this._hideSettings);
5836        },
5837        getAuthMethodOtp: function () {
5838            return this._authMethodOtp;
5839        },
5840        getHideSettings: function () {
5841            return this._hideSettings;
5842        }
5843    }
5844});
5845
5846var UserPhotoBus = new Vue();
5847
5848var NavigationInBus = new Vue({
5849    data:{
5850        CLICK_LOGIN: 'CLICK_LOGIN',
5851        CLICK_ACCOUNT: 'CLICK_ACCOUNT'
5852    }
5853});
5854
5855var ChangeServiceBus = new Vue();
5856
5857var SessionBus = new Vue({
5858    data: function () {
5859        return {
5860            loggedIn: false,
5861            error: false
5862        };
5863    },
5864    methods: {
5865        changeSessionLoggedIn: function (status) {
5866            this.loggedIn = status;
5867            this.$emit('sessionChange', status);
5868        },
5869        alreadyHasContext: function (status) {
5870            this.$emit('alreadyHasContext', status);
5871        },
5872        sessionErrorHandler: function (status) {
5873            this.error = status;
5874            this.$emit('sessionErrorHandler', status);
5875        }
5876    }
5877});
5878
5879var ThrottleBus = new Vue();
5880
5881var requestHandler = {
5882    data: function () {
5883        return {
5884            customParams: {},
5885            reCaptchaToken: '',
5886            recaptchaVersion:''
5887        };
5888    },
5889    methods: {
5890
5891        loginRequest: function (input, successCB, errorCB, scope) {
5892                this.request('login', 'handler', input, successCB, errorCB, scope);
5893        },
5894
5895        loginSecondLevelRequest: function (input, successCB, errorCB, scope) {
5896            this.request('login', 'secondLevelLogin', input, successCB, errorCB, scope);
5897        },
5898
5899        getFavoriteGet: function (input, successCB, errorCB, scope, hostname) {
5900            this.requestGet('myvdf/user', 'getFavorite', input, successCB, errorCB, scope);
5901        },
5902
5903        myVdfGet: function (plugin, method, input, successCB, errorCB, scope) {
5904            this.requestGet('myvdf/' + plugin, method, input, successCB, errorCB, scope);
5905        },
5906
5907        sitesGet: function (plugin, method, input, successCB, errorCB, scope) {
5908            this.requestGet('sites/' + plugin, method, input, successCB, errorCB, scope);
5909        },
5910
5911        helpGet: function (plugin, method, input, successCB, errorCB, scope) {
5912            this.requestGet('help/' + plugin, method, input, successCB, errorCB, scope);
5913        },
5914
5915        eshopGet: function (plugin, method, input, successCB, errorCB, scope) {
5916            this.requestGet('eshop/' + plugin, method, input, successCB, errorCB, scope);
5917        },
5918
5919        fisGet: function (plugin, method, input, successCB, errorCB, scope) {
5920            this.requestGet('fis/' + plugin, method, input, successCB, errorCB, scope);
5921        },
5922
5923        whiteGet: function (plugin, method, input, successCB, errorCB, scope) {
5924            this.requestGet('white/' + plugin, method, input, successCB, errorCB, scope);
5925        },
5926
5927        requestGet: function (plugin, method, input, successCB, errorCB, scope) {
5928
5929            input.vf_timestamp = new Date().getTime(); //prevent GET requests caching on internet explorer, irrelevant for server
5930            
5931            var me = plugin === "login" && (method === "isLogged" || method === "checkSSOFlag" ) ? scope : this,
5932                host = "",
5933                params = this.getAsUriParameters(input);
5934
5935            if (window.hostnameForExtSystems) {
5936                host = window.hostnameForExtSystems + '/bin/mvc.do/' + plugin + '/' + method;
5937                Vue.http.interceptors.push(function (request, next) {
5938                    request.credentials = true;
5939                    next();
5940                });
5941            } else {
5942                host = window.location.protocol + '//' + window.location.host + '/bin/mvc.do/' + plugin + (method != null && method !== undefined ? '/' + method : "");
5943            }
5944
5945            var headers = {
5946                'Content-Type': 'application/json;charset=utf-8',
5947                'Process-Id': plugin
5948            };
5949
5950            if (this.reCaptchaToken) {
5951                headers['X-Recaptcha-Token'] = this.reCaptchaToken;
5952            }
5953
5954            if (this.recaptchaVersion) {
5955                headers['X-Recaptcha-Version'] = this.recaptchaVersion;
5956            }
5957            setTimeout(function () {
5958                me.$http.get(host + '?' + params, {
5959                    headers: headers
5960                }).then(function (response) {
5961                    successCB.call(scope, response);
5962                }, function (jqXHR, status) {
5963
5964                    //Fix -- Only for first access from partners via SSO
5965                    if (window.hostnameForExtSystems && jqXHR.status === 0 && jqXHR.body === "" && !jqXHR.ok) {
5966                        jqXHR.status = 200;
5967                        jqXHR.statusText = 'OK';
5968                        jqXHR.body = true;
5969                        jqXHR.bodyText = 'true';
5970                        jqXHR.ok = true;
5971                        successCB.call(scope, jqXHR);
5972                    } else {
5973
5974                        if (jqXHR.status === 307 || (me.isIE() && jqXHR.status === 0)) {
5975                            if (window.location.origin === "https://my.vodafone.pt") {
5976                                window.location.href = "https://my.vodafone.pt/main.html";
5977                            } else if (window.location.origin === "https://my.vodafone.pt:449") {
5978                                window.location.href = "https://my.vodafone.pt:449/main.html";
5979                            }
5980                        }
5981                        errorCB.call(scope, jqXHR, status);
5982                    }
5983                });
5984            }, 1);
5985        },
5986
5987        myVdfPost: function (plugin, method, input, successCB, errorCB, scope) {
5988            this.requestPost('myvdf/' + plugin, method, input, successCB, errorCB, scope);
5989        },
5990
5991        sitesPost: function (plugin, method, input, successCB, errorCB, scope) {
5992            this.requestPost('sites/' + plugin, method, input, successCB, errorCB, scope);
5993        },
5994
5995        tealiumPost: function (plugin, method, input, successCB, errorCB, scope) {
5996            this.requestPost(plugin, method, input, successCB, errorCB, scope);
5997        },
5998
5999        eshopPost: function (plugin, method, input, successCB, errorCB, scope) {
6000            this.requestPost('eshop/' + plugin, method, input, successCB, errorCB, scope);
6001        },
6002
6003        helpPost: function (plugin, method, input, successCB, errorCB, scope) {
6004            this.requestPost('help/' + plugin, method, input, successCB, errorCB, scope);
6005        },
6006
6007        fisPost: function (plugin, method, input, successCB, errorCB, scope) {
6008            this.requestPost('fis/' + plugin, method, input, successCB, errorCB, scope);
6009        },
6010
6011        whitePost: function (plugin, method, input, successCB, errorCB, scope) {
6012            this.requestPost('white/' + plugin, method, input, successCB, errorCB, scope);
6013        },
6014
6015        requestPost: function (plugin, method, input, successCB, errorCB, scope) {
6016            this.request(plugin, method, input, successCB, errorCB, scope);
6017        },
6018        request: function (plugin, method, input, successCB, errorCB, scope) {
6019
6020            var me = this,
6021                host = "";
6022
6023            if (window.hostnameForExtSystems) {
6024                host = window.hostnameForExtSystems + '/bin/mvc.do/' + plugin + '/' + method;
6025                Vue.http.interceptors.push(function (request, next) {
6026                    request.credentials = true;
6027                    next();
6028                });
6029            } else {
6030                host = window.location.protocol + '//' + window.location.host + '/bin/mv
6030c.do/' + plugin + '/' + method;
6031            }
6032
6033            var headers = {
6034                'Process-Id': plugin
6035            };
6036
6037            if (input) {
6038                if (this.reCaptchaToken) {
6039                    input['rcToken'] = this.reCaptchaToken;
6040                }
6041
6042                if (this.recaptchaVersion) {
6043                    input['rcVersion'] = this.recaptchaVersion;
6044                }
6045            }
6046
6047            if (this.includeDigestHeader(plugin + '/' + method)) {
6048                headers['Digest'] = securityUtils.methods.getHash(JSON.stringify(input));
6049            }
6050
6051            me.$http.post(host, JSON.stringify(input), {
6052                headers: headers,
6053                params: this.customParams
6054            }).then(function (response) {
6055                successCB.call(scope, response);
6056            }, function (jqXHR, status) {
6057
6058                if (jqXHR.status === 307 || (me.isIE() && jqXHR.status === 0)) {
6059                    if (window.location.origin === "https://my.vodafone.pt") {
6060                        window.location.href = "https://my.vodafone.pt/main.html";
6061                    } else if (window.location.origin === "https://my.vodafone.pt:449") {
6062                        window.location.href = "https://my.vodafone.pt:449/main.html";
6063                    }
6064                }
6065
6066
6067                errorCB.call(scope, jqXHR, status);
6068            });
6069        },
6070        myVdfUploadFile: function (plugin, method, fileOrFormData, successCB, errorCB, scope) {
6071            this.uploadFile('myvdf/' + plugin, method, fileOrFormData, successCB, errorCB, scope);
6072        },
6073        includeDigestHeader: function (methodPath) {
6074            return [
6075                'sites/subscriptionForm/jobSeekersSubscription',
6076                'sites/subscriptionForm/portabilitySubscription',
6077                'sites/subscriptionForm/docsReturnSubscription',
6078                'sites/subscriptionForm/portabilityTLMKSubscription',
6079                'sites/subscriptionForm/bundlePortabilitySubscription',
6080                'sites/subscriptionForm/e2eSubscription',
6081                'sites/subscriptionForm/e2eCbuBundleSubscription',
6082                'sites/journeyE2E/e2eVbuBundleSubscription',
6083                'sites/subscriptionForm/cbuRedSubscription',
6084                'sites/subscriptionForm/redActivationPortInSubscription',
6085                'sites/subscriptionForm/redDocsReturnSubscription',
6086                'white/subscription/create',
6087                'white/subscription/create/subscription'
6088            ].includes(methodPath);
6089        },
6090
6091        sitesUploadFile: function (plugin, method, file, successCB, errorCB, scope) {
6092            this.uploadFile('sites/' + plugin, method, file, successCB, errorCB, scope);
6093        },
6094
6095        sitesPostForm: function (plugin, method, input, successCB, errorCB, scope) {
6096            this.generalPostFormImpl('sites/' + plugin, method, input, successCB, errorCB, scope);
6097        },
6098
6099        helpPostForm: function (plugin, method, input, successCB, errorCB, scope) {
6100            this.generalPostFormImpl('help/' + plugin, method, input, successCB, errorCB, scope);
6101        },
6102
6103        whitePostForm: function (plugin, method, input, successCB, errorCB, scope) {
6104            this.generalPostFormImpl('white/' + plugin, method, input, successCB, errorCB, scope);
6105        },
6106
6107        /** SIMILAR TO uploadFile BUT CAPABLE TO SEND MORE INFORMATION WITH FormData ALREADY READY **/
6108        generalPostFormImpl: function (plugin, method, input, successCB, errorCB, scope) {
6109
6110            var me = this,
6111                host = window.location.protocol + '//' + window.location.host + '/bin/mvc.do/' + plugin + '/' + method;
6112
6113            if (input && input instanceof FormData) {
6114                if (this.reCaptchaToken) {
6115                    input.append("rcToken", this.reCaptchaToken);
6116                }
6117
6118                if (this.recaptchaVersion) {
6119                    input.append("rcVersion", this.recaptchaVersion);
6120                }
6121            }
6122
6123            me.$http.post(host, input).then(function (response) {
6124                successCB.call(scope, response);
6125            }, function (jqXHR, status) {
6126                errorCB.call(scope, jqXHR, status);
6127            });
6128        },
6129
6130        uploadFile: function (plugin, method, fileOrFormData, successCB, errorCB, scope) {
6131
6132            var me = this,
6133                host = window.location.protocol + '//' + window.location.host + '/bin/mv
6133c.do/' + plugin + '/' + method,
6134                data = new FormData();
6135            let header = undefined;
6136            if(fileOrFormData instanceof FormData){
6137                data = fileOrFormData;
6138                header = {headers:{'Content-Type':'multipart/form-data'}};
6139            }else{
6140                data.append("file", fileOrFormData);
6141            }
6142
6143            me.$http.post(host, data,header).then(function (response) {
6144                successCB.call(scope, response);
6145            }, function (jqXHR, status) {
6146
6147                if (jqXHR.status === 307 || (me.isIE() && jqXHR.status === 0)) {
6148                    if (window.location.origin === "https://my.vodafone.pt") {
6149                        window.location.href = "https://my.vodafone.pt/main.html";
6150                    } else if (window.location.origin === "https://my.vodafone.pt:449") {
6151                        window.location.href = "https://my.vodafone.pt:449/main.html";
6152                    }
6153                }
6154
6155                errorCB.call(scope, jqXHR, status);
6156            });
6157        },
6158
6159        getAsUriParameters: function (data) {
6160            var url = '';
6161            for (var prop in data) {
6162                if (Array.isArray(data[prop])) {
6163                    var arrayData = data[prop];
6164
6165                    for (var item in arrayData) {
6166                        url += encodeURIComponent(prop) + '=' +
6167                            encodeURIComponent(arrayData[item]) + '&';
6168                    }
6169
6170
6171                } else {
6172                    url += encodeURIComponent(prop) + '=' +
6173                        encodeURIComponent(data[prop]) + '&';
6174                }
6175
6176            }
6177            return url.substring(0, url.length - 1);
6178        },
6179
6180        myVdfDownloadFile: function (plugin, method, input, fileName, fileType, successCB, errorCB, scope) {
6181            this.downloadFile('myvdf/' + plugin, method, input, fileName, fileType, successCB, errorCB, scope);
6182        },
6183
6184        sitesDownloadFile: function (plugin, method, input, fileName, fileType, successCB, errorCB, scope) {
6185            this.downloadFile('sites/' + plugin, method, input, fileName, fileType, successCB, errorCB, scope);
6186        },
6187
6188        sitesPostDownloadFile: function (plugin, method, input, fileName, fileType, successCB, errorCB, scope) {
6189            this.downloadPostFile('sites/' + plugin, method, input, fileName, fileType, successCB, errorCB, scope);
6190        },
6191
6192        downloadPostFile: function (plugin, method, input, fileName, fileType, successCB, errorCB, scope) {
6193            var xhr = new XMLHttpRequest(),
6194                host = window.location.protocol + '//' + window.location.host + '/bin/mvc.do/' + plugin + '/' + method;
6195            xhr.open('POST', host, true);
6196            xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
6197
6198            return this.downloadFile(plugin, method, input, fileName, fileType, successCB, errorCB, scope, xhr);
6199        },
6200
6201        downloadGetFile: function (plugin, method, input, fileName, fileType, successCB, errorCB, scope) {
6202            var xhr = new XMLHttpRequest(),
6203                params = this.getAsUriParameters(input),
6204                host = window.location.protocol + '//' + window.location.host + '/bin/mvc.do/' + plugin + '/' + method + '?' + params;
6205
6206            xhr.open('GET', host, true);
6207
6208            this.downloadFile(plugin, method, input, fileName, fileType, successCB, errorCB, scope, xhr);
6209        },
6210
6211        downloadFile: function (plugin, method, input, fileName, fileType, successCB, errorCB, scope, xhr) {
6212            var me = this, extraValidationSafari = true;
6213
6214            if (input.validation !== undefined) {
6215                extraValidationSafari = input.validation;
6216                delete input.validation;
6217            }
6218            if (input) {
6219                if (this.reCaptchaToken) {
6220                    input['rcToken'] = this.reCaptchaToken;
6221                }
6222
6223                if (this.recaptchaVersion) {
6224                    input['rcVersion'] = this.recaptchaVersion;
6225                }
6226            }
6227            if (!xhr) {
6228                xhr = new XMLHttpRequest();
6229                var params = this.getAsUriParameters(input),
6230                    host = window.location.protocol + '//' + window.location.host + '/bin/mv
6230c.do/' + plugin + '/' + method + '?' + params;
6231                xhr.open('GET', host, true);
6232            }
6233
6234            if (this.isIE() || this.isEdge()) {
6235                xhr.responseType = 'blob';
6236
6237                xhr.onload = function (e) {
6238                    if (this.status === 200) {
6239                        if (this.response && this.response.size !== 0) {
6240                            var blob = new Blob([this.response]);
6241                            window.navigator.msSaveBlob(blob, fileName + '.' + fileType);
6242                            successCB.call(scope);
6243                        } else {
6244                            errorCB.call(scope, 204);
6245                        }
6246                    } else {
6247                        errorCB.call(scope, this.status);
6248                    }
6249                };
6250            } else if (this.isBrowserSafari() && extraValidationSafari) {
6251                xhr.responseType = 'arraybuffer';
6252
6253                xhr.onload = function (e) {
6254                    if (this.status === 200) {
6255                        if (this.response && this.response.size !== 0) {
6256                            var responseArray = new Uint8Array(this.response);
6257                            me.saveFileSafari(responseArray, fileType, fileName);
6258                            successCB.call(scope);
6259                        } else {
6260                            errorCB.call(scope, 204);
6261                        }
6262                    } else {
6263                        errorCB.call(scope, this.status);
6264                    }
6265                };
6266            } else {
6267                xhr.responseType = 'blob';
6268
6269                xhr.onload = function (e) {
6270                    if (this.status === 200) {
6271                        if (this.response && this.response.size !== 0) {
6272                            var blob = this.response;
6273                            me.saveFile(window.URL.createObjectURL(blob), true, fileName, fileType);
6274                            successCB.call(scope);
6275                        } else {
6276                            errorCB.call(scope, 204);
6277                        }
6278                    } else {
6279                        errorCB.call(scope, this.status);
6280                    }
6281                };
6282            }
6283            //If the request method is GET or HEAD, the body parameter is ignored and the request body is set to null.
6284            xhr.send(JSON.stringify(input));
6285            return xhr;
6286        },
6287        isBrowserSafari: function () {
6288            return /(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent);
6289        },
6290        isIE: function () {
6291            return !!navigator.userAgent.match(/Trident/g) || !!navigator.userAgent.match(/MSIE/g);
6292        },
6293        isEdge: function () {
6294            return navigator.userAgent.indexOf("Edge") > -1;
6295        },
6296        saveFile: function (url, winMode, fileName, fileType) {
6297
6298            var anchor = document.createElement('a'),
6299                name = fileName + '.' + fileType;
6300            if ('download' in anchor) { //html5 A[download]
6301                anchor.href = url;
6302                anchor.setAttribute('download', name);
6303                anchor.className = 'download-js-link';
6304                anchor.innerHTML = 'downloading...';
6305                anchor.style.display = 'none';
6306                document.body.appendChild(anchor);
6307                setTimeout(function () {
6308                    anchor.click();
6309                    document.body.removeChild(anchor);
6310                    if (winMode === true) {
6311                        setTimeout(function () {
6312                            window.URL.revokeObjectURL(anchor.href);
6313                        }, 250);
6314                    }
6315                }, 66);
6316                return true;
6317            }
6318
6319            //do iframe dataURL download (old ch+FF):
6320            var f = document.createElement('iframe');
6321            document.body.appendChild(f);
6322
6323            // force a mime that will download:
6324            if (!winMode) {
6325                url = 'data:' + url.replace(/^data:([\w\/\-\+]+)/, defaultMime);
6326            }
6327
6328            f.src = url;
6329            setTimeout(function () {
6330                document.body.removeChild(f);
6331            }, 333);
6332        },
6333        Uint8ToString: function (u8a) {
6334            var CHUNK_SZ = 0x8000;
6335            var c = [];
6336            for (var i = 0; i < u8a.length; i += CHUNK_SZ) {
6337                c.push(String.fromCharCode.apply(null, u8a.subarray(i, i + CHUNK_SZ)));
6338            }
6339            return c.join('');
6340        },
6341        saveFileSafari: function (data, fileType, fileName) {
6342            try {
6343                var b64encoded = btoa(this.Uint8ToString(data)),
6344                    dataType = '';
6345
6346                switch (fileType) {
6347                    case 'text/xml':
6348                        dataType = 'application/xml';
6349                        break;
6350                    case 'txt':
6351                        dataType = 'text/plain';
6352                        break;
6353                    case 'pdf':
6354                        dataType = 'application/pdf';
6355                        break;
6356                    case 'xls':
6357                        dataType = 'application/xls';
6358                        break;
6359                    case 'csv':
6360                        dataType = 'text/csv';
6361                        break;
6362                    case 'zip':
6363                        dataType = 'application/octet-stream';
6364                        break;
6365                    default:
6366                        dataType = fileType;
6367                        break;
6368                }
6369
6370                var base64 = 'data:' + dataType + ';base64,' + b64encoded,
6371                    uri = encodeURI(base64),
6372                    anchor = document.createElement('a');
6373
6374                document.body.appendChild(anchor);
6375                anchor.href = uri;
6376                anchor.download = fileName + '.' + fileType;
6377                anchor.click();
6378                document.body.removeChild(anchor);
6379            } catch (e) {
6380                //alert(e.message);
6381            }
6382        }
6383    }
6384};
6385
6386var requestValidations = {
6387
6388    methods: {
6389
6390        requestValidator: function () {
6391            return {
6392                validateStatusCode: function (response) {
6393                    //HTTP2.0 - remove response.statusText
6394                    return response && response.status === 200 || false;
6395                    //return response && response.status === 200 && response.statusText === 'OK' || false;
6396                },
6397                validateNoErrors: function (response) {
6398                    return response && response.body && (response.body.status === undefined || response.body.status !== 'ERROR') || false;
6399                },
6400                validateStatusCodeAndErrors: function (response) {
6401                    return this.validateStatusCode(response) && this.validateNoErrors(response);
6402                }
6403            };
6404        }
6405    }
6406};
6407
6408var securityUtils = {
6409    methods: {
6410        /** Provide a value and it will return the hash of the value **/
6411        getHash: function (valueTobeHashed) {
6412            return CryptoJS.SHA512(valueTobeHashed).toString();
6413        },
6414
6415        compareHash: function (content, contentHashed) {
6416            var newHash = this.getHash(content);
6417            return newHash != null && newHash === contentHashed;
6418        }
6419    }
6420};
6421
6422var scriptUtils = {
6423    methods: {
6424        loadScript: function (url, isCss, callback) {
6425            var script;
6426            var ts = new Date().getTime(); //prevent GET requests caching on internet explorer
6427            if (isCss) {
6428                script = document.createElement('link');
6429                script.type = 'text/css';
6430                script.rel = 'stylesheet';
6431                script.href = url + '?ts=' + ts;
6432            } else {
6433                script = document.createElement('script');
6434                script.type = 'text/javascript';
6435                script.src = url + '?ts=' + ts;
6436            }
6437
6438            if (script.readyState) { //IE
6439                script.onreadystatechange = function () {
6440                    if (script.readyState == "loaded" ||
6441                        script.readyState == "complete") {
6442                        script.onreadystatechange = null;
6443                        callback();
6444                    }
6445                };
6446            } else { //Others
6447                script.onload = function () {
6448                    callback();
6449                };
6450            }
6451            document.getElementsByTagName("head")[0].appendChild(script);
6452        }
6453    }
6454};
6455
6456var utils = {
6457
6458    methods: {
6459        throttleUtils: function () {
6460            return {
6461                initializeThrottles: function () {
6462                    if (typeof (window.throttleInfo) == "undefined") {
6463
6464                        var jsonRequest = $.getJSON("/content/dam/digital-commons/settings/t.json");
6465
6466                        jsonRequest.complete(function (data) {
6467                            if (data.responseJSON) {
6468                                window.throttleInfo = data.responseJSON;
6469                                ThrottleBus.$emit('tjson-loaded');
6470                            }
6471                        });
6472                    }
6473                },
6474                validateThrottle: function (throttle) {
6475                    var me = this,
6476                        throttles = window.throttleInfo;
6477
6478                    if (typeof (window.throttleInfo) !== "undefined") {
6479
6480                        var thashConv = btoa(throttle);
6481                        thashConv = [thashConv.slice(0, thashConv.length - 2), String.fromCharCode(throttle.length + 64), thashConv.slice(thashConv.length - 2)].join('');
6482
6483                        if (window.throttleInfo[thashConv] !== undefined) {
6484
6485                            if (window.throttleInfo[thashConv].s === 1) {
6486                                return true;
6487                            } else if (window.throttleInfo[thashConv].th !== undefined && localStorage.getItem('tthash') !== null && localStorage.getItem('tthash') !== undefined) {
6488                                if (localStorage.getItem('tthash').indexOf(window.throttleInfo[thashConv].th) !== -1) {
6489                                    return true;
6490                                }
6491                            }
6492                        }
6493                    }
6494                    return false;
6495                },
6496                validateThrottlePromise: function (throttle) {
6497                    var me = this;
6498                    return new Promise(function (resolve, reject) {
6499                        if (typeof (window.throttleInfo) == "undefined") {
6500
6501                            var jsonRequest = $.getJSON("/content/dam/digital-commons/settings/t.json");
6502
6503                            jsonRequest.complete(function (data) {
6504                                if (data.responseJSON) {
6505                                    window.throttleInfo = data.responseJSON;
6506                                    resolve(me.validateThrottle(throttle));
6507                                }
6508                            });
6509                        } else {
6510                            resolve(me.validateThrottle(throttle));
6511                        }
6512                    });
6513                }
6514            }
6515        },
6516
6517        sessionUtils: function () {
6518            return {
6519                isLoggedIn: function () {
6520                    if (SessionBus.loggedIn) {
6521                        utag_data.visitor_login_status = "Logged In";
6522                    } else {
6523                        utag_data.visitor_login_status = "Logged out";
6524                    }
6525                }
6526            };
6527        },
6528
6529        nifUtils: function () {
6530            return {
6531                validateNif: function (contribuinte) {
6532
6533                    if (
6534                        contribuinte.substr(0, 1) !== '1' && // pessoa singular
6535                        contribuinte.substr(0, 1) !== '2' && // pessoa singular
6536                        contribuinte.substr(0, 1) !== '3' && // pessoa singular
6537                        contribuinte.substr(0, 2) !== '45' && // pessoa singular não residente
6538                        contribuinte.substr(0, 1) !== '5' && // pessoa colectiva
6539                        contribuinte.substr(0, 1) !== '6' && // administração pública
6540                        contribuinte.substr(0, 2) !== '70' && // herança indivisa
6541                        contribuinte.substr(0, 2) !== '71' && // pessoa colectiva não residente
6542                        contribuinte.substr(0, 2) !== '72' && // fundos de investimento
6543                        contribuinte.substr(0, 2) !== '77' && // atribuição oficiosa
6544                        contribuinte.substr(0, 2) !== '79' && // regime excepcional
6545                        contribuinte.substr(0, 1) !== '8' && // empresário em nome individual (extinto)
6546                        contribuinte.substr(0, 2) !== '90' && // condominios e sociedades irregulares
6547                        contribuinte.substr(0, 2) !== '91' && // condominios e sociedades irregulares
6548                        contribuinte.substr(0, 2) !== '98' && // não residentes
6549                        contribuinte.substr(0, 2) !== '99' // sociedades civis
6550
6551                    ) {
6552                        return false;
6553                    }
6554                    var check1 = contribuinte.substr(0, 1) * 9;
6555                    var check2 = contribuinte.substr(1, 1) * 8;
6556                    var check3 = contribuinte.substr(2, 1) * 7;
6557                    var check4 = contribuinte.substr(3, 1) * 6;
6558                    var check5 = contribuinte.substr(4, 1) * 5;
6559                    var check6 = contribuinte.substr(5, 1) * 4;
6560                    var check7 = contribuinte.substr(6, 1) * 3;
6561                    var check8 = contribuinte.substr(7, 1) * 2;
6562
6563                    var total = check1 + check2 + check3 + check4 + check5 + check6 + check7 + check8;
6564                    var divisao = total / 11;
6565                    var modulo11 = total - parseInt(divisao) * 11;
6566                    var comparador;
6567                    if (modulo11 === 1 || modulo11 === 0) {
6568                        comparador = 0;
6569                    } else {
6570                        comparador = 11 - modulo11;
6571                    }
6572
6573                    var ultimoDigito = contribuinte.substr(8, 1) * 1;
6574                    if (ultimoDigito != comparador) {
6575                        return false;
6576                    }
6577
6578                    if (contribuinte.length < 9) {
6579                        return false;
6580                    }
6581                    return true;
6582                }
6583            };
6584        },
6585        currencyUtils: function () {
6586            return {
6587                formatBalance: function (balance) {
6588                    return '€' + (balance / 100.0).toFixed(2).replace('.', ',');
6589                },
6590                formatBalanceWithoutCurrency: function (balance) {
6591                    return (balance / 100.0).toFixed(2).replace('.', ',');
6592                },
6593                formatBalanceNoCents: function (balance) {
6594                    return '€' + (balance / 1.0).toFixed(2).replace('.', ',');
6595                },
6596                formatBalanceNoCurrencyNoCents: function (balance) {
6597                    return (balance / 100.0).toFixed(0).replace('.', ',');
6598                },
6599                formatBalanceRightNoCents: function (balance) {
6600                    return (balance / 100.0).toFixed(2).replace('.', ',') + '€';
6601                },
6602                formatEuroBalance: function (balance) {
6603                    return '€' + parseFloat(balance).toFixed(2).replace('.', ',');
6604                },
6605                formatEuroBalanceNoCurrencyNoCents: function (balance) {
6606                    return parseFloat(balance).toFixed(0).replace('.', ',');
6607                },
6608                eurosToCents: function (balance) {
6609                    balance = balance.includes('€') ? balance.replace('€', '').trim() : balance;
6610                    balance = balance.includes(',') ? balance.replace(',', '.') : balance;
6611                    return parseFloat(balance) * 100;
6612                }
6613            };
6614        },
6615
6616        ccUtils: function () {
6617            return {
6618                validateCC: function (documentNumber) {
6619                    var sum = 0,
6620                        secondDigit = false;
6621
6622                    if (documentNumber.length !== 12) {
6623                        if (documentNumber.length === 9) {
6624                            return this.validateNIC(documentNumber);
6625                        }
6626                        return false;
6627                    }
6628                    for (var i = documentNumber.length - 1; i > -1; i--) {
6629                        var arrayOfCharacters = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
6630                            value = arrayOfCharacters.indexOf(documentNumber[i].toUpperCase());
6631
6632                        if (secondDigit) {
6633                            value *= 2;
6634                            if (value > 9) {
6635                                value -= 9;
6636                            }
6637                        }
6638                        sum += value;
6639                        secondDigit = !secondDigit;
6640                    }
6641                    return (sum % 10) === 0;
6642                },
6643                validateNIC: function (documentNumber) {
6644                    var sumBI = 0,
6645                        multiplier = 1;
6646
6647                    for (var i = documentNumber.length - 1; i > -1; i--) {
6648                        sumBI += documentNumber[i] * multiplier;
6649                        multiplier++;
6650                    }
6651                    return ((sumBI % 11) === 0 || ((sumBI % 11) === 1 && parseInt(documentNumber[documentNumber.length - 1]) === 0));
6652                }
6653            }
6654        },
6655        cvpUtils: function () {
6656            return {
6657                validateCvp: function (cvp) {
6658                    if (cvp.length < 12) {
6659                        return false;
6660                    }
6661                    if (cvp.substring(0,2) === '00') {
6662                        return false;
6663                    }
6664
6665                    var sum = 0,
6666                        baseCharCode = 55,
6667                        compareCharCode = 57;
6668
6669                    for (var i = 0; i < 12; i++) {
6670                        var digitCharCode = cvp.charCodeAt(i),
6671                            valueToAdd = 0;
6672                        if (digitCharCode > compareCharCode) {
6673                            valueToAdd = digitCharCode - baseCharCode;
6674                        } else {
6675                            valueToAdd = parseInt(cvp.charAt(i));
6676                        }
6677                        if (i % 2 == 0) {
6678                            sum += (valueToAdd * 2);
6679                        } else {
6680                            sum += valueToAdd;
6681                        }
6682                    }
6683                    var val = String(sum);
6684                    return val.charAt(val.length - 1) == '0';
6685                }
6686            }
6687        },
6688        dateUtils: function () {
6689            return {
6690                currentDate: function () {
6691                    return new Date();
6692                },
6693                currentDateTime: function () {
6694                    return new Date().getTime();
6695                },
6696                formatDate: function (date) {
6697                    var m_names = ['month_short_january',
6698                            'month_short_february',
6699                            'month_short_march',
6700                            'month_short_april',
6701                            'month_short_may',
6702                            'month_short_june',
6703                            'month_short_july',
6704                            'month_short_august',
6705                            'month_short_september',
6706                            'month_short_october',
6707                            'month_short_november',
6708                            'month_short_december'
6709                        ],
6710                        d = new Date(date);
6711
6712                    return d.getDate() + ' ' + utils.methods.i18nUtils().getProperty(m_names[d.getMonth()]) + ' ' + d.getFullYear();
6713                },
6714                formatDateWith_: function (date) {
6715                    var d = new Date(date),
6716                        day, month;
6717
6718                    if (d.getDate() < 10) {
6719                        day = '0' + d.getDate();
6720                    } else {
6721                        day = d.getDate();
6722                    }
6723
6724                    if (d.getMonth() < 10) {
6725                        month = '0' + d.getMonth();
6726                    } else {
6727                        month = d.getMonth();
6728                    }
6729
6730                    return day + '_' + month + '_' + d.getFullYear();
6731                },
6732                formatDateWithDash: function (date) {
6733
6734                    var d = new Date(date),
6735                        day, month;
6736
6737                    if (d.getDate() < 10) {
6738                        day = '0' + d.getDate();
6739                    } else {
6740                        day = d.getDate();
6741                    }
6742
6743                    if (d.getUTCDate() < 10) {
6744                        month = '0' + d.getUTCDate();
6745                    } else {
6746                        month = d.getUTCDate();
6747                    }
6748
6749                    return day + '-' + month + '-' + d.getFullYear();
6750                },
6751                formatDateObjectWithDash: function (date) {
6752
6753                    if (date.day < 10) {
6754                        day = '0' + date.day;
6755                    } else {
6756                        day = date.day;
6757                    }
6758
6759                    if (date.month < 10) {
6760                        month = '0' + date.month;
6761                    } else {
6762                        month = date.month;
6763                    }
6764
6765                    return day + '-' + month + '-' + date.year;
6766                },
6767                longMonth: function (date) {
6768                    var i18nMonths = ['month_long_january',
6769                            'month_long_february',
6770                            'month_long_march',
6771                            'month_long_april',
6772                            'month_long_may',
6773                            'month_long_june',
6774                            'month_long_july',
6775                            'month_long_august',
6776                            'month_long_september',
6777                            'month_long_october',
6778                            'month_long_november',
6779                            'month_long_december'
6780                        ],
6781                        d = new Date(date);
6782
6783                    return utils.methods.i18nUtils().getProperty(i18nMonths[d.getMonth()]);
6784                },
6785                parseSecondsToTimeFormat: function (time) {
6786                    var timeInt = parseInt(time),
6787                        minutes = Math.floor(timeInt / 60),
6788                        seconds = timeInt - minutes * 60;
6789
6790                    if (minutes < 10) {
6791                        minutes = '0' + minutes;
6792                    }
6793                    if (seconds < 10) {
6794                        seconds = '0' + seconds;
6795                    }
6796                    return minutes + ':' + seconds;
6797                },
6798                formatDateWithoutTimeZone: function (dateStr) {
6799
6800                    if (dateStr.indexOf('Z') != -1) {
6801                        dateStr = dateStr.substring(0, dateStr.indexOf('Z'));
6802                    }
6803
6804                    if (dateStr.indexOf('z') != -1) {
6805                        dateStr = dateStr.substring(0, dateStr.indexOf('z'));
6806                    }
6807
6808                    if (dateStr.indexOf('+') != -1) {
6809                        dateStr = dateStr.substring(0, dateStr.indexOf('+'));
6810                    }
6811
6812                    return dateStr;
6813                },
6814                /**
6815                 Date and Time Patterns:
6816                 yy = 2-digit year; yyyy = full year
6817                 M = digit month; MM = 2-digit month; MMM = short month name; MMMM = full month name
6818                 d = digit day; dd = 2-digit day
6819                 h = hours am/pm; hh = 2-digit hours am/pm; H = hours; HH = 2-digit hours
6820                 m = minutes; mm = 2-digit minutes
6821                 s = seconds; ss = 2-digit seconds
6822                 */
6823                formatDateWithPattern: function (date, patternStr) {
6824                    if (!patternStr || !date || !(date instanceof Date)) {
6825                        return null;
6826                    }
6827
6828                    var twoDigitPad = function (num) {
6829                        return num < 10 ? "0" + num : num;
6830                    };
6831
6832                    var dateValues = {
6833                        d: date.getDate(),
6834                        H: date.getHours(),
6835                        m: date.getMinutes(),
6836                        s: date.getSeconds(),
6837                        h: date.getHours() % 12,
6838                        hh: twoDigitPad(date.getHours() % 12),
6839                        HH: twoDigitPad(date.getHours()),
6840                        mm: twoDigitPad(date.getMinutes()),
6841                        ss: twoDigitPad(date.getSeconds()),
6842                        dd: twoDigitPad(date.getDate()),
6843                        M: date.getMonth() + 1,
6844                        MM: twoDigitPad(date.getMonth() + 1),
6845                        MMMM: this.longMonth(date),
6846                        MMM: this.longMonth(date).substr(0, 3),
6847                        yyyy: date.getFullYear(),
6848                        yy: date.getFullYear().toString().substr(2, 2)
6849                    };
6850
6851                    return patternStr.replace(/(y+|M+|d+|H+|h+|m+|s+)/g, function (pattern) {
6852                        return dateValues[pattern];
6853                    });
6854                },
6855                parseStrToDate: function (dateStr) {
6856                    var spDate = dateStr.split('/');
6857                    return new Date(spDate[2] + '-' + spDate[1] + '-' + spDate[0]);
6858                },
6859                isValidDate: function (strDate) {
6860                    //Expected date format str DD/MM/YYYY
6861                    var spDate = strDate.split('/');
6862                    if (strDate.length < 10 || spDate.length != 3) {
6863                        return false;
6864                    }
6865
6866                    var d = new Date(spDate[2] + '-' + spDate[1] + '-' + spDate[0]);
6867                    if (!(d && (d.getUTCFullYear() === Number(spDate[2]) && (d.getUTCMonth() + 1) === Number(spDate[1]) && d.getUTCDate() === Number(spDate[0])))) {
6868                        return false;
6869                    }
6870
6871                    var currentDate = new Date();
6872                    if ((d.getTime() > currentDate.getTime()) || (currentDate.getUTCFullYear() - d.getUTCFullYear() > 150)) {
6873                        return false;
6874                    }
6875
6876                    return true;
6877                },
6878                birthDateValidation: function (dateStr, minAge, maxAge) {
6879                    var checkDate = this.parseStrToDate(dateStr),
6880                        currentDate = new Date(),
6881                        minAgeDate = new Date();
6882
6883                    checkDate.setHours(0);
6884                    checkDate.setMinutes(0);
6885                    checkDate.setSeconds(0);
6886
6887                    minAgeDate.setFullYear(currentDate.getFullYear() - (parseInt(minAge) !== NaN ? parseInt(minAge) : 18));
6888                    minAgeDate.setHours(23);
6889                    minAgeDate.setMinutes(59);
6890                    minAgeDate.setSeconds(59);
6891
6892                    if (maxAge != null) {
6893                        var maxAgeDate = new Date();
6894                        maxAgeDate.setFullYear(currentDate.getFullYear() - (maxAge + 1));
6895                        maxAgeDate.setHours(0);
6896                        maxAgeDate.setMinutes(0);
6897                        maxAgeDate.setSeconds(0);
6898                        return maxAgeDate <= checkDate && checkDate <= minAgeDate;
6899                    }
6900
6901                    return checkDate <= minAgeDate;
6902                },
6903                isUnderAge: function (dtDOB) {
6904                    var dtCurrent = new Date();
6905                    if (dtCurrent.getFullYear() - dtDOB.getFullYear() < 18) {
6906                        return true;
6907                    }
6908
6909                    if (dtCurrent.getFullYear() - dtDOB.getFullYear() == 18) {
6910                        if (dtCurrent.getMonth() < dtDOB.getMonth()) {
6911                            return true;
6912                        }
6913                        if (dtCurrent.getMonth() == dtDOB.getMonth()) {
6914                            if (dtCurrent.getDate() < dtDOB.getDate()) {
6915                                return true;
6916                            }
6917                        }
6918                    }
6919                    return false;
6920                },
6921                beginToday: function () {
6922                    let d = new Date();
6923                    d.setHours(0, 0, 0, 0);
6924                    return d;
6925                },
6926                endOfDay: function (date) {
6927                    if (date instanceof Date) {
6928                        date.setHours(23, 59, 59, 0);
6929                    }
6930                    return date;
6931                },
6932                addDays: function(days){
6933                    let d = this.beginToday();
6934                    d.setDate(d.getDate() + days);
6935                    return d;
6936                },
6937            };
6938        },
6939
6940        stringUtils: function () {
6941            return {
6942                addLeadingZero: function (value, length) {
6943                    if (value !== null && length !== null)
6944                        return ("0" + value).slice(length);
6945                    else
6946                        return null;
6947                },
6948
6949                lowerCase: function (str) {
6950                    return str.toLowerCase();
6951                },
6952                upperCase: function (str) {
6953                    return str.toUpperCase();
6954                },
6955                convertToPascalCase: function (str) {
6956                    return str.replace(/(\w)(\w*)/g,
6957                        function (g0, g1, g2) {
6958                            return g1.toUpperCase() + g2.toLowerCase();
6959                        });
6960                },
6961                toTitleCase: function (str) {
6962                  return str.replace(
6963                    /\w\S*/g,
6964                    function(txt) {
6965                      return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
6966                    }
6967                  );
6968                },
6969                parse: function (str) {
6970                    var args = [].slice.call(arguments, 1),
6971                        i = 0;
6972
6973                    return str.replace(/%%s/g, function () {
6974                        return args[i++];
6975                    });
6976                },
6977                emptyIfUndefined: function (value) {
6978                    return value == undefined ? "" : value;
6979                },
6980                stringToBoolean: function (valueStr) {
6981
6982                    if (!valueStr) {
6983                        return false;
6984                    }
6985
6986                    if (typeof valueStr === "boolean") {
6987                        return valueStr;
6988                    }
6989
6990                    switch (valueStr.toLowerCase().trim()) {
6991                        case "true":
6992                        case "yes":
6993                        case "1":
6994                            return true;
6995                        case "false":
6996                        case "no":
6997                        case "0":
6998                        case null:
6999                            return false;
7000                        default:
7001                            return Boolean(valueStr);
7002                    }
7003                },
7004                include: function (container, value) {
7005                    var returnValue = false;
7006                    var pos = container.indexOf(value);
7007                    if (pos >= 0) {
7008                        returnValue = true;
7009                    }
7010                    return returnValue;
7011                },
7012                startsWith: function (baseString, searchString, position) {
7013                    position = position || 0;
7014                    return baseString.indexOf(searchString, position) === position;
7015                },
7016                hashCode: function (s) {
7017                    try {
7018                        var h = 0, l = s.length, i = 0;
7019                        if (l > 0)
7020                            while (i < l)
7021                                h = (h << 5) - h + s.charCodeAt(i++) | 0;
7022                    } catch (e) {
7023                    }
7024                    return h;
7025                },
7026                hashCodeObj: function (obj) {
7027                    try {
7028                        var hc = 0;
7029                        var chars = JSON.stringify(obj).replace(/\{|\"|\}|\:|,/g, '');
7030                        var len = chars.length;
7031                        for (var i = 0; i < len; i++) {
7032                            hc += (chars.charCodeAt(i) * 7);
7033                        }
7034                    } catch (e) {
7035                    }
7036                    return hc;
7037                },
7038                trimDuplicatedSpace: function (value) {
7039                    return value.replace(/^\s+|\s+$/gm, '').replace(/\s+/g, ' ');
7040                }
7041            };
7042        },
7043
7044        nameUtils: function () {
7045            return {
7046                getFirstName: function (name) {
7047                    var arrayOfNames = name.trim().split(' ');
7048                    return arrayOfNames[0];
7049                }
7050            };
7051        },
7052
7053        domUtils: function () {
7054            return {
7055                removeClass: function (elId, cssClass) {
7056                    $('#' + elId).removeClass(cssClass);
7057                },
7058                scrollToTop: function () {
7059                    window.scrollTo(0, 0);
7060                },
7061                scrollToElement: function (id) {
7062                    if (document && document.getElementById(id)) {
7063                        var headerHeight = 0;
7064                        if (document.getElementsByClassName('header')[0] !== undefined && document.getElementsByClassName('header')[0].children[2] !== undefined) {
7065                            headerHeight = document.getElementsByClassName('header')[0].children[2].getBoundingClientRect().height;
7066                        }
7067
7068                        $([document.documentElement, document.body]).animate({
7069                            scrollTop: (($('#' + id).offset().top) - headerHeight)
7070                        }, {
7071                            duration: 900,
7072                            queue: false
7073                        });
7074                    }
7075                },
7076                getElementPaddingTop: function (el) {
7077                    var paddingTop = window.getComputedStyle(el, null).getPropertyValue('padding-top') || 0;
7078                    return parseInt(paddingTop.replace('px', ''));
7079                },
7080                changeLabelStyle: function (el, binding) {
7081                    if (el.value || el === document.activeElement) {
7082                        Array.prototype.forEach.call(el.parentNode.childNodes, function (item) {
7083                            if (item.tagName === 'LABEL') {
7084                                item.className = binding.value.labelClassFocus;
7085                                if (binding.value.labelStyleFocus) {
7086                                    item.style = binding.value.labelStyleFocus;
7087                                }
7088                            }
7089                        });
7090                    } else {
7091                        Array.prototype.forEach.call(el.parentNode.childNodes, function (item) {
7092                            if (item.tagName === 'LABEL') {
7093                                item.className = binding.value.labelClass;
7094                                if (binding.value.labelStyle) {
7095                                    item.style = binding.value.labelStyle;
7096                                }
7097                            }
7098                        });
7099                    }
7100                },
7101                equalHeights: function (cb) {
7102                    var parentNode = document.getElementsByClassName('equalrows');
7103                    if (parentNode.length) {
7104                        var parentProps, childNodes;
7105                        var tallest = 0;
7106
7107                        for (var i = 0; i < parentNode.length; i++) {
7108                            parentProps = parentNode[i].getAttribute("data-equal").split(';');
7109
7110                            // Iterate through child nodes (even if there are multiple selectors)
7111                            for (var j = 0; j < parentProps.length; j++) {
7112                                childNodes = [].slice.call(parentNode[i].querySelectorAll(parentProps[j]));
7113
7114                                tallest = 0;
7115
7116                                // Return the tallest element height
7117                                for (var x = 0; x < childNodes.length; x++) {
7118                                    if (parentNode[i].id != "carousel")
7119                                        childNodes[x].style.height = ''; // Reset style
7120                                    var el = childNodes[x];
7121                                    var eleHeight = el.offsetHeight;
7122                                    tallest = (eleHeight > tallest ? eleHeight : tallest);
7123                                }
7124
7125                                // Apply to all, inside that parent node
7126                                for (var x = 0; x < childNodes.length; x++) {
7127                                    if (tallest !== 0)
7128                                        childNodes[x].style.height = tallest + "px";
7129                                }
7130                            }
7131                        }
7132                    }
7133                    if (cb) {
7134                        cb();
7135                    }
7136                },
7137                checkScriptExistence: function (script1, callback) {
7138                    var scripts = document.getElementsByTagName('script'),
7139                        exists = false,
7140                        i = 0;
7141
7142                    while (!exists && i < scripts.length) {
7143                        exists = scripts[i].getAttribute('src') === script1;
7144                        i++;
7145                    }
7146
7147                    if (!exists) {
7148                        var varScript = document.createElement('script');
7149                        varScript.type = 'text/javascript';
7150                        varScript.src = script1;
7151                        varScript.async = true;
7152                        varScript.defer = true;
7153                        if (typeof callback == "function") {
7154                            varScript.onload = callback;
7155                        }
7156                        document.head.appendChild(varScript);
7157                    } else if (typeof callback == "function") {
7158                        callback();
7159                    }
7160                },
7161                preventDefault: function(e) {
7162                    e.preventDefault();
7163                },
7164
7165                disableScroll: function () {
7166                    $('html, body').css('overflowY', 'hidden');
7167                    $('html, body').css('position', 'fixed');
7168                },
7169
7170                enableScroll: function () {
7171                    $('html, body').css('overflowY', '');
7172                    $('html, body').css('position', '');
7173                },
7174                waitForFunction: function(functionName, timeout) {
7175                    var _timeout = (typeof timeout !== 'undefined') ? timeout : 2000;
7176
7177                    return new Promise(function(resolve, reject) {
7178                        var start = Date.now();
7179
7180                        var interval = setInterval(function() {
7181                            var parts = functionName.split('.');
7182                            var obj = window;
7183
7184                            for (var i = 0; i < parts.length; i++) {
7185                                if (obj === undefined || obj === null) {
7186                                    obj = undefined;
7187                                    break;
7188                                }
7189                                obj = obj[parts[i]];
7190                            }
7191
7192                            var fn = obj;
7193
7194                            if (typeof fn === 'function') {
7195                                clearInterval(interval);
7196                                resolve(fn);
7197                            } else if (Date.now() - start > _timeout) {
7198                                clearInterval(interval);
7199                                reject(new Error("Function " + functionName + " not found"));
7200                            }
7201                        }, 200);
7202                    });
7203                },
7204            };
7205        },
7206        i18nUtils: function () {
7207            var me = this;
7208            return {
7209                getDictionary: function () {
7210                    var language = 'pt-pt';
7211                    if (window.location.pathname.indexOf('/en/') > -1) { //Para incluir novos idiomas, será necessário validar no pathname de acordo com a estrutura das páginas Vodafone
7212                        language = 'en-en';
7213                    }
7214                    return Granite.I18n.getDictionary(language);
7215                },
7216
7217                getProperty: function (key) {
7218
7219                    if (!key) {
7220                        return '';
7221                    }
7222
7223                    var i18nDictionary = this.getDictionary();
7224
7225                    var keyFiltered,
7226                        results,
7227                        regex = new RegExp('\\b' + key + '\\b');
7228
7229
7230                    results = i18nDictionary[key];
7231
7232                    if (typeof results !== 'undefined') {
7233                        results = results.trim();
7234                    }
7235
7236                    if (results || results === '') {
7237                        return results;
7238                    }
7239
7240                    keyFiltered = me.filters().filterObjKey(i18nDictionary, regex);
7241
7242                    if (keyFiltered) {
7243
7244                        results = i18nDictionary[keyFiltered];
7245
7246                        if (results) {
7247                            return results;
7248                        }
7249                    }
7250
7251                    results = key;
7252
7253                    return results;
7254                },
7255
7256                getKeyAndValue: function (key) {
7257
7258                    var results = {key: '', value: ''};
7259
7260                    if (!key) {
7261                        return results;
7262                    }
7263
7264                    var i18nDictionary = this.getDictionary();
7265                    var keyFiltered,
7266                        regex = new RegExp('\\b' + key + '\\b');
7267
7268                    results.key = key;
7269                    results.value = i18nDictionary[key];
7270
7271                    if (typeof results.value !== 'undefined') {
7272                        results.value = results.value.trim();
7273                    }
7274
7275                    if (results.value || results.value === '') {
7276                        return results;
7277                    }
7278
7279                    keyFiltered = me.filters().filterObjKey(i18nDictionary, regex);
7280
7281                    if (keyFiltered) {
7282
7283                        results.value = i18nDictionary[keyFiltered];
7284
7285                        if (results.value) {
7286                            return results;
7287                        }
7288                    }
7289                    results.value = key;
7290                    return results;
7291                },
7292                checkLanguage: function () {
7293                    var language = 'pt';
7294                    if (window.location.pathname.indexOf('/en/') > -1) {
7295                        language = 'en';
7296                    }
7297                    return language;
7298                }
7299            };
7300        },
7301
7302        contextUtils: function () {
7303            return {
7304                getActiveSegments: function () {
7305
7306                    var resolvedSegments = ContextHub.SegmentEngine.SegmentManager.getResolvedSegments(),
7307                        activeSegments = [];
7308
7309                    for (var i in resolvedSegments) {
7310                        activeSegments.push(resolvedSegments[i].name);
7311                    }
7312
7313                    return activeSegments;
7314                },
7315                updateStore: function (s, d) {
7316                    var store = ContextHub.getStore(s);
7317                    store.update(d);
7318                },
7319                updateCtxData: function (data) {
7320                    var store = ContextHub.getStore('profilectx');
7321                    if (store) store.update(data);
7322                },
7323                updateCtxUser: function (data) {
7324                    var store = ContextHub.getStore('profilectx');
7325                    store.updateUser(data);
7326                },
7327                udpateCtxCtx: function (data) {
7328                    var store = ContextHub.getStore('profilectx');
7329                    store.updateContext(data);
7330                },
7331                updateUserType: function (data) {
7332                    var store = ContextHub.getStore('profilectx');
7333                    store.setItem('/user/businessType', data);
7334                },
7335                updateListener: function (handler) {
7336                    ContextHub.eventing.on(ContextHub.Constants.EVENT_STORE_UPDATED, handler);
7337                },
7338                fillAux: function (item, asset, resp) {
7339                    var aux = {};
7340                    if (Object.keys(asset).length === 0 && asset.constructor === Object) {
7341                        aux = item;
7342                    } else {
7343                        aux = asset;
7344                    }
7345
7346                    if (item.hasOwnProperty('delegator')) {
7347                        aux.delegator = item.delegator;
7348                    }
7349
7350                    aux.accountId = resp.accountId;
7351                    aux.addedMonths = resp.addedMonths;
7352                    aux.motherAccount = resp.motherAccount;
7353                    aux.hasPaymentResponsability = resp.hasPaymentResponsability;
7354                    aux.customerType = resp.customerType;
7355                    aux.singleService = resp.singleService;
7356                    aux.pricingPlanPI = resp.pricingPlanPI;
7357                    aux.pricingPlanName = resp.pricingPlanName;
7358                    aux.hasSharedBundle = resp.hasSharedBundle;
7359                    aux.consolidatedAccount = resp.consolidatedAccount;
7360                    aux.isMotherAccount = resp.isMotherAccount;
7361                    if (resp.serviceType) {
7362                        aux.profile = resp.serviceType;
7363                    }
7364                    return aux;
7365                }
7366            };
7367        },
7368
7369        arrayUtils: function () {
7370            return {
7371                isArrayDefined: function (arr) {
7372                    return (arr && Object.keys(arr).length > 0);
7373                }
7374            };
7375        },
7376
7377        filters: function () {
7378            return {
7379                filterObjKey: function (obj, filter) {
7380                    var key, keys = [];
7381                    for (key in obj) {
7382                        if (obj.hasOwnProperty(key) && filter.test(key)) {
7383                            keys.push(key);
7384                        }
7385                    }
7386                    return keys;
7387                }
7388            };
7389        },
7390
7391        cloneObj: function (obj) {
7392            var copy;
7393
7394            // Handle the 3 simple types, and null or undefined
7395            if (null === obj || "object" !== typeof obj) return obj;
7396
7397            // Handle Date
7398            if (obj instanceof Date) {
7399                copy = new Date();
7400                copy.setTime(obj.getTime());
7401                return copy;
7402            }
7403
7404            // Handle Array
7405            if (obj instanceof Array) {
7406                copy = [];
7407                for (var i = 0, len = obj.length; i < len; i++) {
7408                    copy[i] = this.cloneObj(obj[i]);
7409                }
7410                return copy;
7411            }
7412
7413            // Handle Object
7414            if (obj instanceof Object) {
7415                copy = {};
7416                for (var attr in obj) {
7417                    if (obj.hasOwnProperty(attr)) copy[attr] = this.cloneObj(obj[attr]);
7418                }
7419                return copy;
7420            }
7421
7422            throw new Error("Unable to copy obj! Its type isn't supported.");
7423        },
7424
7425        isEquivalent: function (a, b) {
7426            // Create arrays of property names
7427            var aProps = Object.getOwnPropertyNames(a);
7428            var bProps = Object.getOwnPropertyNames(b);
7429
7430            // If number of properties is different,
7431            // objects are not equivalent
7432            if (aProps.length != bProps.length) {
7433                return false;
7434            }
7435
7436            for (var i = 0; i < aProps.length; i++) {
7437                var propName = aProps[i];
7438
7439                // If values of same property are not equal,
7440                // objects are not equivalent
7441                if (propName !== '__ob__') {
7442                    if (a[propName] !== b[propName]) {
7443                        return false;
7444                    }
7445                }
7446
7447            }
7448
7449            // If we made it this far, objects
7450            // are considered equivalent
7451            return true;
7452        },
7453        setRendition: function(path, rendition) {
7454            return path.includes('/default-assets/') ? path : path + rendition;
7455        },
7456        mergeObjects: function (obj1, obj2) {
7457            return $.extend(true, {}, obj1, obj2);
7458        },
7459        /**
7460         * Set data into databinding local storage object.
7461         * @param {object} scope
7462         * @param {string} property
7463         * @param {object} data
7464         */
7465        setBindingLocalStorageData: function(scope, property, data) {
7466            try {
7467                var key = scope.queryParams.id + ".store";
7468                var store = this.getBindingLocalStorageData(scope)
7469                store[property] = data;
7470                localStorage.setItem(key, JSON.stringify(store));
7471            } catch (error) {
7472                console.error("Erro ao editar o localStorage:", error);
7473            }
7474        },
7475        /**
7476         * Get data from databinding local storage object.
7477         * @param {object} scope
7478         * @param {string} id
7479         * @param {string} property
7480         * @param {object} data
7481         */
7482        getBindingLocalStorageData: function(scope, id) {
7483            try {
7484                var key = id || scope.queryParams.id + ".store";
7485                return JSON.parse(localStorage.getItem(key)) || {};
7486            } catch (error) {
7487                console.error("Erro ao obter o sessionStorage:", error);
7488            }
7489        }
7490    }
7491};
7492
7493var urlUtils = {
7494    methods: {
7495        getParameterByName: function (name, url, acceptPlusSign) {
7496            if (!url) url = window.location.href;
7497            name = name.replace(/[\[\]]/g, "\\$&");
7498            var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
7499                results = regex.exec(url);
7500            if (!results) return null;
7501            if (!results[2]) return '';
7502            return decodeURIComponent(!acceptPlusSign ? results[2].replace(/\+/g, " ") : results[2]);
7503        },
7504
7505        saveUrlParameterByName: function (targetObj, paramKey, url) {
7506            var paramValue = this.getParameterByName(paramKey, url);
7507            if (paramValue) {
7508                targetObj[paramKey] = paramValue;
7509            }
7510            return targetObj;
7511        },
7512
7513        updateUrlParameters: function (urlParams) {
7514            var path = window.location.pathname;
7515            var path = window.location.pathname,
7516                hash = window.location.hash;
7517            var urlParamsUpdated = '';
7518            var paramsKeys = Object.keys(urlParams);
7519            for (var i = 0; i < paramsKeys.length; i++) {
7520                urlParamsUpdated = this.appendUrlParameter(urlParamsUpdated, paramsKeys[i], urlParams[paramsKeys[i]]);
7521            }
7522
7523            history.replaceState({}, document.title, path + urlParamsUpdated + hash);
7524
7525            // Set SFUrl for eShop and Help & Support - stay in the same Page after Login
7526            if ((this.isEshop() || this.isHelpAndSupport()) && SFUrl) {
7527                SFUrl.sru = window.location.href;
7528            }
7529        },
7530
7531        appendUrlParameter: function (urlParamsUpdated, key, value) {
7532            if (key && value) {
7533                if (urlParamsUpdated === '') {
7534                    urlParamsUpdated = '?';
7535                } else {
7536                    urlParamsUpdated = urlParamsUpdated + '&';
7537                }
7538                urlParamsUpdated = urlParamsUpdated + key + '=' + value;
7539            }
7540            return urlParamsUpdated;
7541        },
7542
7543        isEnvironment: function (host) {
7544            var hostname = window.location.hostname;
7545            return (hostname.includes(host));
7546        },
7547
7548        getDomain: function () {
7549            var hostname = document.location.hostname;
7550            if (hostname.indexOf('.') != -1) {
7551                hostname = hostname.substr(hostname.indexOf('.'), hostname.length);
7552            }
7553            return hostname;
7554        },
7555        isEshop: function () {
7556            var regex = (/digital-sites\/pt\/loja[^s]*/);
7557            return typeof propertiesPath !== 'undefined' && regex.test(propertiesPath);
7558        },
7559        isHelpAndSupport: function () {
7560            var regex = (/digitalhelp\/*/);
7561            return typeof propertiesPath !== 'undefined' && regex.test(propertiesPath);
7562        },
7563        isWhite: function () {
7564            var regex = (/digital-white\/*/);
7565            return typeof propertiesPath !== 'undefined' && regex.test(propertiesPath);
7566        },
7567        isDigitalSites: function () {
7568            var regex = (/digital-*/);
7569            return typeof propertiesPath !== 'undefined' && regex.test(propertiesPath);
7570        },
7571        removeObjectParams: function (params) {
7572            if (!params) return;
7573            let me = this;
7574            newUrl = window.location.href;
7575            Object.keys(params).forEach(function (key) {
7576                newUrl = me.removeParam(key, newUrl);
7577            });
7578            window.history.replaceState(null, null, newUrl);
7579        },
7580        removeParam: function (key, sourceURL) {
7581            if (!key || !sourceURL) return;
7582            var rtn = sourceURL.split("?")[0],
7583                param,
7584                params_arr = [],
7585                queryString = (sourceURL.indexOf("?") !== -1) ? sourceURL.split("?")[1] : "";
7586            if (queryString !== "") {
7587                params_arr = queryString.split("&");
7588                for (var i = params_arr.length - 1; i >= 0; i -= 1) {
7589                    param = params_arr[i].split("=")[0];
7590                    if (param === key) {
7591                        params_arr.splice(i, 1);
7592                    }
7593                }
7594                if (params_arr.length > 0) {
7595                    rtn = rtn + "?" + params_arr.join("&");
7596                }
7597            }
7598            return rtn;
7599        },
7600        objectFromParams: function (objModel) {
7601            try {
7602                let result = {};
7603                params = window.location.search.replace("?", "");
7604                params = params.split("&");
7605                params.forEach(function (it) {
7606                    let keyValue = it.split("=");
7607                    let key = keyValue[0];
7608                    if (!objModel || objModel.hasOwnProperty(key)) {
7609                        result[key] = decodeURIComponent(keyValue[1]);
7610                    }
7611                });
7612                return result;
7613            } catch (e) {
7614            }
7615        },
7616        buildUrlWithParamsString: function (url, paramsStr, selector) {
7617            var extension = '.html',
7618                questionMark = '?',
7619                amperSand = '&',
7620                auxSelector = selector ? selector : '';
7621
7622            if (typeof (paramsStr) !== 'string') {
7623                paramsStr = '';
7624            }
7625
7626            var newUrl = url.indexOf(extension) > -1 ? url.substring(0, url.indexOf(extension)) : url,
7627                urlParams = url.indexOf(questionMark) > -1 ? url.substring(url.indexOf(questionMark), url.length) : '';
7628
7629            urlParams += paramsStr.length > 0 ? (urlParams.length > 1 ? amperSand : questionMark) + paramsStr : paramsStr;
7630            newUrl += auxSelector + extension + (urlParams !== questionMark ? urlParams : '');
7631
7632            return newUrl;
7633        },
7634        getUrlSelector: function (regex, indexOfChar) {
7635            /** Filter selector by regex
7636             * indexOfChar - To retrieve specific char of selector
7637             * **/
7638            var selectorWithResult;
7639            window.location.pathname.split('.').forEach(function (part) {
7640                if (regex && regex.test(part)) {
7641                    selectorWithResult = !indexOfChar ? part : part.split('')[indexOfChar];
7642                }
7643            });
7644            return selectorWithResult;
7645        },
7646        getQueryParam: function (key, url) {
7647            if(!url){
7648                url = window.location.href;
7649            }
7650            var updatedUrl = new URL(url);
7651            return updatedUrl.searchParams.get(key);
7652        }
7653    }
7654};
7655
7656var PartnersBus = new Vue({
7657    mixins: [requestHandler, utils, requestValidations, urlUtils],
7658    data: function () {
7659        return {
7660            limitNumber: 6,
7661            portfolio: {
7662                totalPortfolio: 0,
7663                portfolioItems: []
7664            },
7665            portfolioPending: {
7666                portfolioPendingItems: []
7667            },
7668            limitedItems: [],
7669            activePortfolioItem: 0,
7670            activePortfolioAsset: null,
7671            activePortfolio: false,
7672            portfolioMobileExists: false,
7673            portfolioDesktopToMobile: false,
7674            searchInput: '',
7675            validInput: false,
7676            onlyNumbers: false,
7677            withoutResults: false,
7678            hasAssets: [],
7679            assets: [],
7680            openSearchClick: false,
7681            constants: {
7682                ASSETS: 'assets',
7683                CHANGE_SELECTED_ITEM: "changeSelectedItem",
7684                DELEGATOR_ID: 'delegatorId',
7685                DELEGATOR: 'delegator',
7686                INSIDE_ACCOUNT: 'insideAccount',
7687                BUSINESS: 'BUSINESS',
7688                ACCOUNT: 'ACCOUNT',
7689                ADDRESS: 'address',
7690                SINAL_MAX_NAME: 'sinal_max_friendly_name',
7691                FIXED_SERVICE_NAME: 'fixed_service_friendly_name',
7692                BUNDLE_NAME: 'blm_friendly_name',
7693                ACCOUNT_NAME: 'account_friendly_name',
7694                MOBILE_SERVICE_NAME: 'mobile_service_friendly_name',
7695                MOBILE_MY_SERVICE_LABEL: 'mobile_my_services_label',
7696                SERVICE_DELEGATOR: 'service_delegator',
7697                ACCOUNT_DELEGATOR: 'account_delegator',
7698                CHILD_ACCOUNT: 'childAccount',
7699                PENDING_STATUS: 'PENDING'
7700            },
7701        }
7702    },
7703    created: function () {
7704        window.addEventListener('beforeunload', this.leaving);
7705    },
7706    methods: {
7707        getContext: function (returnOnlyPortfolio, successCb, errorCb) {
7708            if (this.portfolio && this.portfolio.portfolioItems) {
7709                this.portfolio.portfolioItems = [];
7710            }
7711            if (Cookies.get('assets')) {
7712                this.hasAssets = JSON.parse(Cookies.get('assets'));
7713                Cookies.remove('assets', {domain: this.getDomain()});
7714            } else {
7715                this.hasAssets = this.assets;
7716            }
7717            this.myVdfGet('user', 'getPortfolio', {}, function (response) {
7718                if (this.requestValidator().validateStatusCodeAndErrors(response)) {
7719                    var portfolioItems = response.body.portfolioTreeDTO;
7720                    if (portfolioItems.length > 0) {
7721                        for (var i = 0; i < portfolioItems.length; i++) {
7722                            if (portfolioItems[i].status === this.constants.PENDING_STATUS) {
7723                                this.portfolioPending.portfolioPendingItems.push(portfolioItems[i]);
7724                            } else {
7725                                this.portfolio.portfolioItems.push(portfolioItems[i]);
7726                                this.portfolio.totalPortfolio++;
7727                            }
7728                        }
7729                    }
7730                    this.arrangePortfolio(returnOnlyPortfolio, successCb, errorCb);
7731                }
7732            }, function () {
7733                if (returnOnlyPortfolio && errorCb) {
7734                    errorCb();
7735                } else {
7736                    return false;
7737                }
7738                SessionBus.sessionErrorHandler(false);
7739            }, this);
7740        },
7741
7742        arrangePortfolio: function (returnOnlyPortfolio, successCb, errorCb) {
7743            var childAccount;
7744            var selectFirst = false;
7745            if (localStorage.getItem(this.constants.CHILD_ACCOUNT) !== null) {
7746                childAccount = JSON.parse(localStorage.getItem(this.constants.CHILD_ACCOUNT));
7747            } else {
7748                try {
7749                    selectFirst = (this.portfolio.portfolioItems.filter(function (item) {
7750                        return item.isSelected
7751                    }).length === 0);
7752                } catch (e) {
7753                    selectFirst = false;
7754                }
7755            }
7756            for (var i = 0; i < this.portfolio.portfolioItems.length; i++) {
7757                if (this.portfolio.portfolioItems[i].friendlyName.toLowerCase() === this.constants.MOBILE_MY_SERVICE_LABEL ||
7758                    this.portfolio.portfolioItems[i].friendlyName.toLowerCase() === this.constants.MOBILE_SERVICE_NAME ||
7759                    this.portfolio.portfolioItems[i].friendlyName.toLowerCase() === this.constants.ACCOUNT_NAME ||
7760                    this.portfolio.portfolioItems[i].friendlyName.toLowerCase() === this.constants.BUNDLE_NAME ||
7761                    this.portfolio.portfolioItems[i].friendlyName.toLowerCase() === this.constants.FIXED_SERVICE_NAME ||
7762                    this.portfolio.portfolioItems[i].friendlyName.toLowerCase() === this.constants.SINAL_MAX_NAME) {
7763                    this.portfolio.portfolioItems[i].friendlyName = this.i18nUtils().getProperty(this.portfolio.portfolioItems[i].friendlyName.toLowerCase());
7764                }
7765
7766                if (selectFirst || this.portfolio.portfolioItems[i].isSelected || childAccount !== undefined && this.portfolio.portfolioItems[i].assetName === childAccount.motherAccount) {
7767                    selectFirst = false;
7768                    this.portfolio.portfolioItems[i].isSelected = true;
7769                    if (this.hasAssets.length > 0 && this.portfolio.portfolioItems[i].profile === this.constants.ACCOUNT) {
7770                        this.portfolio.portfolioItems[i].assets = this.hasAssets;
7771
7772                        if (!this.portfolio.portfolioItems[i].open) {
7773                            this.portfolio.portfolioItems[i].open = true;
7774                            this.$forceUpdate();
7775                        }
7776
7777                        var selectedAsset = {};
7778                        for (var k = 0; k < this.hasAssets.length; k++) {
7779                            if (this.hasAssets[k].isSelected) {
7780                                selectedAsset = this.hasAssets[k];
7781                            }
7782                        }
7783
7784                        this.selectItemAssetFromPortfolio(i, this.portfolio.portfolioItems[i], selectedAsset, returnOnl
7784yPortfolio, successCb, errorCb);
7785                    } else {
7786                        this.activePortfolioItem = i;
7787                        this.selectedItemInPortfolio(i, this.portfolio.portfolioItems, this.portfolio.portfolioItems[i], {}, false, false, null, returnOnlyPortfolio, successCb, errorCb);
7788                        if (this.portfolio.portfolioItems[i].profile === this.constants.ACCOUNT) {
7789                            this.portfolio.portfolioItems[i].open = false;
7790                            this.portfolio.portfolioItems[i].assets = [];
7791                        }
7792
7793                        this.portfolio.portfolioItems[i].size = 0;
7794                    }
7795                } else {
7796                    if (this.portfolio.portfolioItems[i].profile === this.constants.ACCOUNT) {
7797                        this.portfolio.portfolioItems[i].open = false;
7798                        this.portfolio.portfolioItems[i].assets = [];
7799                    }
7800
7801                    this.portfolio.portfolioItems[i].size = 0;
7802                }
7803
7804                this.portfolio.portfolioItems[i].photo = '';
7805
7806                if (this.portfolio.portfolioItems[i].hasOwnProperty(this.constants.ADDRESS)) {
7807                    this.portfolio.portfolioItems[i].fullName = this.portfolio.portfolioItems[i].assetName + ' - ' + this.portfolio.portfolioItems[i].address;
7808                } else {
7809                    this.portfolio.portfolioItems[i].fullName = this.portfolio.portfolioItems[i].assetName;
7810                }
7811
7812                if (this.portfolio.portfolioItems[i].hasOwnProperty(this.constants.DELEGATOR_ID) && this.portfolio.portfolioItems[i].delegatorId !== '') {
7813                    if (this.portfolio.portfolioItems[i].profile === this.constants.ACCOUNT) {
7814                        this.portfolio.portfolioItems[i].delegator = this.i18nUtils().getProperty(this.constants.ACCOUNT_DELEGATOR);
7815                    } else {
7816                        this.portfolio.portfolioItems[i].delegator = this.i18nUtils().getProperty(this.constants.SERVICE_DELEGATOR);
7817                    }
7818                }
7819            }
7820
7821            if (this.portfolioPending.portfolioPendingItems.length > 0) {
7822                for (var i = 0; i < this.portfolioPending.portfolioPendingItems.length; i++) {
7823                    if (this.portfolioPending.portfolioPendingItems[i].friendlyName.toLowerCase() === this.constants.MOBILE_MY_SERVICE_LABEL ||
7824                        this.portfolioPending.portfolioPendingItems[i].friendlyName.toLowerCase() === this.constants.MOBILE_SERVICE_NAME ||
7825                        this.portfolioPending.portfolioPendingItems[i].friendlyName.toLowerCase() === this.constants.ACCOUNT_NAME ||
7826                        this.portfolioPending.portfolioPendingItems[i].friendlyName.toLowerCase() === this.constants.BUNDLE_NAME ||
7827                        this.portfolioPending.portfolioPendingItems[i].friendlyName.toLowerCase() === this.constants.FIXED_SERVICE_NAME ||
7828                        this.portfolioPending.portfolioPendingItems[i].friendlyName.toLowerCase() === this.constants.SINAL_MAX_NAME) {
7829                        this.portfolioPending.portfolioPendingItems[i].friendlyName = this.i18nUtils().getProperty(this.portfolioPending.portfolioPendingItems[i].friendlyName.toLowerCase());
7830                    }
7831
7832                    if (this.portfolioPending.portfolioPendingItems[i].hasOwnProperty(this.constants.ADDRESS)) {
7833                        this.portfolioPending.portfolioPendingItems[i].fullName = this.portfolioPending.portfolioPendingItems[i].assetName + ' - ' + this.portfolioPending.portfolioPendingItems[i].address;
7834                    } else {
7835                        this.portfolioPending.portfolioPendingItems[i].fullName = this.portfolioPending.portfolioPendingItems[i].assetName;
7836                    }
7837                }
7838            }
7839            if(this.portfolio.portfolioItems.length === 0){
7840                SessionBus.alreadyHasContext(false);
7841            }
7842        },
7843
7844        selectedItemInPortfolio: function (i, portfolioItems, item, asset, account, fromPortfolioClick, accountId, returnOnl
7844yPortfolio, successCb, errorCb) {
7845            if (returnOnlyPortfolio) {
7846                this.setAssets();
7847                var selected = portfolioItems[i];
7848                portfolioItems.splice(i, 1);
7849                portfolioItems.unshift(selected);
7850                successCb(portfolioItems);
7851            } else {
7852                var request = {},
7853                    renderLocationPath = '',
7854                    imageToReplacePath = '';
7855
7856                if (Object.keys(asset).length === 0 && asset.constructor === Object) {
7857                    request = {
7858                        id: item.id,
7859                        isBackOffice: false,
7860                        inAccount: account,
7861                        isAccount: item.profile === this.constants.ACCOUNT ? true : false,
7862                        assetName: item.assetName,
7863                        motherAccount: accountId,
7864                        profile: item.profile,
7865                        status: item.status,
7866                        insideAccount: item.insideAccount
7867                    };
7868                } else {
7869                    request = {
7870                        id: asset.id,
7871                        isBackOffice: false,
7872                        inAccount: account,
7873                        isAccount: asset.profile === this.constants.ACCOUNT ? true : false,
7874                        assetName: asset.assetName,
7875                        motherAccount: accountId,
7876                        profile: asset.profile,
7877                        status: asset.status,
7878                        insideAccount: asset.insideAccount
7879                    };
7880                }
7881                this.myVdfPost('portfolio', 'selectPortfolioItem', request, function (response) {
7882                    this.afterLoginTealiumExecutor();
7883
7884                    if (this.requestValidator().validateStatusCodeAndErrors(response)) {
7885                        var resp = response.body,
7886                            aux = {};
7887
7888                        aux = this.contextUtils().fillAux(item, asset, resp);
7889                        aux.isChooserBilling = resp.isChooserBilling;
7890
7891                        let selectedItemMyStore = aux;
7892                        selectedItemMyStore.permissions = response.body.permissions;
7893                        myStore.dispatch(this.constants.CHANGE_SELECTED_ITEM, selectedItemMyStore);
7894
7895                        var multiBusiness = resp.customerType === this.constants.BUSINESS && aux.profile !== this.constants.ACCOUNT && !resp.singleService;
7896
7897                        this.contextUtils().updateCtxData({
7898                            user: {
7899                                firstName: resp.userFirstName,
7900                                lastName: resp.userLastName,
7901                                businessType: resp.customerType,
7902                                gender: resp.userGender,
7903                                age: resp.userAge
7904                            },
7905                            context: {
7906                                item: aux.assetName,
7907                                parent: aux.accountId,
7908                                pricingPlanPI: aux.pricingPlanPI,
7909                                pricingPlanName: aux.pricingPlanName !== undefined ? aux.pricingPlanName.toUpperCase() : '',
7910                                serviceType: aux.profile,
7911                                identified: resp.isIdentified,
7912                                insideAccount: aux.hasOwnProperty(this.constants.INSIDE_ACCOUNT) && aux.insideAccount ? true : false,
7913                                isPrePaid: resp.isPrePaid,
7914                                status: aux.status,
7915                                isDelegator: item.hasOwnProperty(this.constants.DELEGATOR) ? true : false,
7916                                singleService: aux.singleService,
7917                                consolidatedAccount: aux.consolidatedAccount,
7918                                hasPaymentResponsability: aux.hasPaymentResponsability,
7919                                multiBusiness: multiBusiness,
7920                                isMotherAccount: aux.isMotherAccount,
7921                                isDelegated: aux.hasOwnProperty(this.constants.DELEGATOR_ID) && aux.delegatorId != '' ? true : false
7922                            }
7923                        });
7924                        this.setAssets();
7925                        var selected = portfolioItems[i];
7926                        portfolioItems.splice(i, 1);
7927                        portfolioItems.unshift(selected);
7928                        if (successCb) {
7929                            successCb();
7930                        } else {
7931                            SessionBus.alreadyHasContext(true);
7932                        }
7933                    }
7934                }, function () {
7935                    myStore.dispatch(this.constants.CHANGE_SELECTED_ITEM, {});
7936                    if (errorCb) {
7937                        errorCb();
7938                    } else {
7939                        SessionBus.alreadyHasContext(false);
7940                        return false;
7941                    }
7942                    SessionBus.sessionErrorHandler(false);
7943                }, this);
7944            }
7945        },
7946
7947        selectItemAssetFromPortfolio: function (i, item, asset, returnOnlyPortfolio, successCb, errorCb) {
7948            var previousPortfolioAsset = this.activePortfolioAsset;
7949            this.activePortfolioItem = this.findItemPosition('id', item.id);
7950            this.activePortfolioAsset = this.findAssetPosition(this.activePortfolioItem, asset.id);
7951
7952            if (typeof portfolioMobile !== 'undefined') {
7953                portfolioMobile.$data.activePortfolioItem = this.activePortfolioItem;
7954                portfolioMobile.$data.activePortfolioAsset = this.activePortfolioAsset;
7955            }
7956
7957            this.changeSelectedItemInPortfolio(this.activePortfolioItem, this.activePortfolioAsset);
7958
7959            this.portfolio.portfolioItems[this.activePortfolioItem].assets[this.activePortfolioAsset].insideAccount = true;
7960
7961            this.selectedItemInPortfolio(i, this.portfolio.portfolioItems, this.portfolio.portfolioItems[this.activePortfolioItem], this.portfolio.portfolioItems[this.activePortfolioItem].assets[this.activePortfolioAsset], true, true, this.portfolio.portfolioItems[this.activePortfolioItem].id, returnOnl
7961yPortfolio, successCb, errorCb);
7962        },
7963
7964        // -----------------------------------------
7965        // --------- TEST TELIUM TRACKING VIAA  -----
7966        // -----------------------------------------
7967
7968        afterLoginTealiumExecutor: function() {
7969            window.history.replaceState(null, null, window.location.pathname);
7970            localStorage.setItem('firstTimeMenuPopUp', 'true');
7971            this.tealium_visitor_tracking_method(true, false);
7972        },
7973        tealium_visitor_tracking_method: function(afterLogin, changeSelectedAsset) {
7974            if (afterLogin === true) {
7975                this.getDataToTealiumVisitorTrackingAfterLogin();
7976            } else if (changeSelectedAsset) {
7977                this.getDataToTealiumVisitorTrackingChangedSelectedItem(changeSelectedAsset.assetName, changeSelectedAsset.profile, changeSelectedAsset.isPrePaid);
7978            }
7979        },
7980        getDataToTealiumVisitorTrackingAfterLogin: function() {
7981            let request = {};
7982            let me = this;
7983
7984            this.myVdfGet('tealium', 'getVisitorTracking', request, function(response) {
7985
7986                if (this.requestValidator().validateStatusCodeAndErrors(response)) {
7987                    if (response.body) {
7988                        me.callbackVisitorTrackingAfterLogin(response.body);
7989                    }
7990                } else {
7991                    return false;
7992                }
7993            }, function() {
7994                return false;
7995            }, this);
7996        },
7997        getDataToTealiumVisitorTrackingChangedSelectedItem: function(assetName, profile, isPrePaid) {
7998            let request = {
7999                assetName: assetName,
8000                profile: profile,
8001                prePaid: isPrePaid
8002            };
8003            let me = this;
8004
8005            this.myVdfGet('tealium', 'getDataChangeSelectedItem', request, function(response) {
8006                if (this.requestValidator().validateStatusCodeAndErrors(response)) {
8007                    me.callbackVisitorTrackingChangedSelectedItem(response.body);
8008                } else {
8009                    return false;
8010                }
8011            }, function() {
8012                SessionBus.sessionErrorHandler(false);
8013                return false;
8014            }, this);
8015        },
8016        callbackVisitorTrackingAfterLogin: function(data) {
8017            let active_asset = "";
8018            let primary_asset = "";
8019            var portfolio_list = [];
8020            if (data.assetsVisitorTrackingDTO) {
8021                if (data.assetsVisitorTrackingDTO.length > 0) {
8022                    for (let i = 0; i < data.assetsVisitorTrackingDTO.length; i++) {
8023                        if (data.assetsVisitorTrackingDTO[i].isSelected === true) {
8024                            active_asset = data.assetsVisitorTrackingDTO[i];
8025                            active_asset.profile = this.mapProfileToTealiumVisitorTracking(active_asset.profile);
8026                        }
8027                        if (data.assetsVisitorTrackingDTO[i].isFavorite === true) {
8028                            primary_asset = data.assetsVisitorTrackingDTO[i];
8029                            primary_asset.profile = this.mapProfileToTealiumVisitorTracking(primary_asset.profile);
8030                        }
8031                         if (!data.assetsVisitorTrackingDTO[i].isSelected && !data.assetsVisitorTrackingDTO[i].isFavorite) {
8032                                portfolio_list.push(data.assetsVisitorTrackingDTO[i])
8033                         }
8034                    }
8035                    tealium_visitor_tracking.methods.handleGetPortfolioOnSuccessLogin(active_asset, primary_asset, portfolio_list, data.portfolioSize);
8036                }
8037            }
8038        },
8039        callbackVisitorTrackingChangedSelectedItem: function(active_asset) {
8040            active_asset.profile = this.mapProfileToTealiumVisitorTracking(active_asset.profile);
8041            tealium_visitor_tracking.methods.handleChangeSelectedAsset(active_asset);
8042        },
8043        mapProfileToTealiumVisitorTracking: function(profile) {
8044            switch (profile) {
8045                case 'ACCOUNT':
8046                    return 'Account';
8047                case 'GSM':
8048                    return 'MSISDN';
8049                case 'BLM':
8050                    return 'BroadBand';
8051                case 'FTTH':
8052                case 'ADSL':
8053                    return 'Fixed Service';
8054                case 'FEMTOCELL':
8055                    return 'Signal Max';
8056                default:
8057                    return profile;
8058            }
8059        },
8060
8061        // -----------------------------------------
8062        // ------------------ END ------------------
8063        // -----------------------------------------
8064
8065        findItemPosition: function (attr, itemId) {
8066            for (var i = 0; i < this.portfolio.portfolioItems.length; i++) {
8067                if (this.portfolio.portfolioItems[i][attr] === itemId) {
8068                    return i;
8069                }
8070            }
8071        },
8072
8073        findAssetPosition: function (itemIndex, assetId) {
8074            for (var j = 0; j < this.portfolio.portfolioItems[itemIndex].assets.length; j++) {
8075                if (this.portfolio.portfolioItems[itemIndex].assets[j].id === assetId) {
8076                    return j;
8077                }
8078            }
8079        },
8080        changeSelectedItemInPortfolio: function (item, asset) {
8081            for (var i = 0; i < this.portfolio.portfolioItems.length; i++) {
8082                this.portfolio.portfolioItems[i].isSelected = false;
8083                if (this.portfolio.portfolioItems[i].hasOwnProperty(this.constants.ASSETS)) {
8084                    for (var j = 0; j < this.portfolio.portfolioItems[i].assets.length; j++) {
8085                        this.portfolio.portfolioItems[i].assets[j].isSelected = false;
8086                    }
8087                }
8088            }
8089
8090            if (asset === null || typeof asset === 'undefined') {
8091                this.portfolio.portfolioItems[item].isSelected = true;
8092            } else {
8093                this.portfolio.portfolioItems[item].assets[asset].isSelected = true;
8094            }
8095        },
8096        leaving: function (e) {
8097            var assets = [];
8098            var selectedContextItem = '';
8099            if (typeof ContextHub !== 'undefined' && ContextHub.getItem) {
8100                var profileCtx = ContextHub.getItem('/store/profilectx');
8101                if (profileCtx && profileCtx.context && profileCtx.context.item) {
8102                    selectedContextItem = profileCtx.context.item;
8103                }
8104            }
8105            if (this.activePortfolioAsset !== null && this.portfolio.portfolioItems[this.activePortfolioItem].assets && this.portfolio.portfolioItems[this.activePortfolioItem].assets.length > 0) {
8106                for (var i = 0; i < this.portfolio.portfolioItems[this.activePortfolioItem].assets.length; i++) {
8107                    delete this.portfolio.portfolioItems[this.activePortfolioItem].assets[i].motherAccountPortfolioItem;
8108                    if (selectedContextItem === this.portfolio.portfolioItems[this.activePortfolioItem].assets[i].assetName) {
8109                        assets.push(this.portfolio.portfolioItems[this.activePortfolioItem].assets[i]);
8110                    }
8111                }
8112                Cookies.set('assets', JSON.stringify(assets), {domain: this.getDomain()});
8113            } else if (this.assets.length > 0) {
8114                for (var i = 0; i < this.assets.length; i++) {
8115                    delete this.assets[i].motherAccountPortfolioItem;
8116                    if (selectedContextItem === this.assets[i].assetName) {
8117                        assets.push(this.assets[i]);
8118                    }
8119                }
8120                Cookies.set('assets', JSON.stringify(assets), {domain: this.getDomain()});
8121            }
8122        },
8123        setAssets: function () {
8124            if (this.activePortfolioAsset !== null && this.portfolio.portfolioItems[this.activePortfolioItem].assets) {
8125                this.assets = this.portfolio.portfolioItems[this.activePortfolioItem].assets;
8126            }
8127        }
8128    }
8129});
8130
8131var validations = {
8132    data: function () {
8133        return {
8134            nameRegex: (/^([A-Za-zÀ-Üà-ü´\'-]{2,})\s+([A-Za-zÀ-Üà-ü´\'-]{2,})([A-Za-zÀ-Üà-ü\s´\'-]*)$/),
8135            foreignNameRegex: (/^([A-Za-zÀ-Üà-ü´\'-_]{2,})\s+([A-Za-zÀ-Üà-ü´\'-_]{1,})([A-Za-zÀ-Üà-ü\s´\'-_]*)$/),
8136            emailRegex: (/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),
8137            addressRegex: (/^[\wÀ-Üà-ü\s_ºª!°«»'´°:.,*~+|()#\/\\\-]+$/),
8138            dotMatrixRegex: (/^[A-Za-z0-9\'\s\.áàãâäéèêëíìîïóòõôöúùûüçñÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÖÔÚÙÛÜÇѺª,/\/-]+$/),
8139            numberRegex: (/^(9[1,2,3,6][0-9]{7})$/),
8140            combinedNumberRegex:(/^(49\d{10}|9[1,2,3,6]\d{7})$/),
8141            fixedNumberRegex: (/^([2,3][0-9]{8})$/),
8142            internationalNumberRegex: (/^([0-9]{3,13})$/),
8143            operatorRegex: (/^[A-Za-z\s]+$/),
8144            cp4Regex: (/^([0-9]{4})$/),
8145            cp3Regex: (/^([0-9]{3})$/),
8146            cpRegex: (/^([0-9]{4}[-][0-9]{3})$/),
8147            cvpRegex: (/^([0-9]{7}[0-9A-Za-z]{4}[0-9])$/),
8148            onlyNumbers: (/^[0-9]+$/),
8149            noSpaces: (/^\S*$/),
8150            twoWordsMin: (/^(\w.+\s).+$/),
8151            ptNumber: (/^[9]\d{8}$/),
8152            lettersSpacesAccents: (/^[ a-zA-ZÀ-ÿ\u00f1\u00d1]*$/),
8153            account: (/^[3]\d{8}$/),
8154            domainRegex:(/^[a-zA-Z0-9]{1,64}$/),
8155            transferKeyRegex: (/^[\S+]{5,64}$/),
8156            voucherRegex: (/^\s*[a-zA-Z0-9\s]{3,12}\s*$/),
8157            voucherSFIDRegex: (/^\s*[a-zA-Z0-9\s_]{3,17}\s*$/),
8158            SFIDRegex: (/^\d{8}$/),
8159            nameTwoWordsMinRegex: (/^([a-zA-ZÀ-ÿ\u00f1\u00d1]+)\s+([a-zA-ZÀ-ÿ\u00f1\u00d1]+).*$/),
8160            CCRegex: (/^\d{8}$/),
8161            passaportRegex: (/^[A-Z]\d{6}$/),
8162        }
8163    },
8164
8165    methods: {
8166        nameValidation: function (name) {
8167            return this.nameRegex.test(name);
8168        },
8169        foreignNameValidation: function (name) {
8170            return this.foreignNameRegex.test(name);
8171        },
8172        phoneNumberValidation: function (phoneNumber) {
8173            return this.numberRegex.test(phoneNumber);
8174        },
8175        accountNumberValidation: function (number) {
8176            return this.account.test(number);
8177        },
8178        alphaValidation: function (number) {
8179            return this.lettersSpacesAccents.test(number);
8180        },
8181        internationalPhoneNumberValidation: function (phoneNumber) {
8182            return this.internationalNumberRegex.test(phoneNumber);
8183        },
8184        emailValidation: function (email) {
8185            return this.emailRegex.test(email);
8186        },
8187        addressValidation: function (address) {
8188            return address !== null && this.addressRegex.test(this.stringUtils().trimDuplicatedSpace(address));
8189        },
8190        dotMatrixValidation: function (dotMatrix) {
8191            return dotMatrix !== null && this.dotMatrixRegex.test(this.stringUtils().trimDuplicatedSpace(dotMatrix));
8192        },
8193        fixedNumberValidation: function (fixedNumber) {
8194            return this.fixedNumberRegex.test(fixedNumber);
8195        },
8196        otherProviderValidation: function (otherProvider) {
8197            return otherProvider !== null && this.operatorRegex.test(this.stringUtils().trimDuplicatedSpace(otherProvider));
8198        },
8199        cp4Validation: function (cp4) {
8200            return this.cp4Regex.test(cp4);
8201        },
8202        cp3Validation: function (cp3) {
8203            return this.cp3Regex.test(cp3);
8204        },
8205        cp7Validation: function (cp7) {
8206            return this.cpRegex.test(cp7);
8207        },
8208        cvpFormatValidation: function (cvp) {
8209            return this.cvpRegex.test(cvp);
8210        },
8211        cvpOperatorValidation: function (cvp, operator) {
8212            var cvpInitialDigits = cvp.substring(0, 2);
8213            switch (operator.toUpperCase()) {
8214                case 'MEO':
8215                    return cvpInitialDigits === '20';
8216                case 'NOWO':
8217                    return cvpInitialDigits === '80';
8218                case 'NOS':
8219                    return cvpInitialDigits === '10';
8220                case 'DIGI':
8221                    return cvpInitialDigits === '25';
8222                default:
8223                    return true;
8224            }
8225        },
8226        cvpNifValidation: function (cvp, nif) {
8227            if (cvp.length === 12 && nif.length === 9) {
8228                var cvpComparator = cvp.substring(7, 11);
8229                var nifComparator = nif.substring(5, 9);
8230                return !!('AAAA' === cvpComparator || cvpComparator === nifComparator);
8231            }
8232        },
8233        getCvpProvider: function (cvp) {
8234            var cvpInitialDigits = cvp.substring(0, 2);
8235            switch (cvpInitialDigits) {
8236                case '20':
8237                    return 'MEO';
8238                case '80':
8239                    return 'NOWO';
8240                case '10':
8241                    return 'NOS';
8242                case '25':
8243                    return 'DIGI';
8244                default:
8245                    return 'other';
8246            }
8247        },
8248        domainValidation: function (domain) {
8249            return this.domainRegex.test(domain);
8250        },
8251        transferKeyValidation: function (transferKey) {
8252            return this.transferKeyRegex.test(transferKey);
8253        },
8254        isEmpty: function (value) {
8255            return value === '';
8256        },
8257        voucherValidation: function (voucher) {
8258            return this.voucherRegex.test(voucher);
8259        },
8260        voucherSFIDValidation: function (voucher) {
8261            return this.voucherSFIDRegex.test(voucher);
8262        },
8263        sfidValidation: function (voucher) {
8264            return this.SFIDRegex.test(voucher);
8265        },
8266        number9and12DigitsValidation: function (number) {
8267            return this.combinedNumberRegex.test(number);
8268        },
8269        documentValidation: function (documentNumber) {
8270            let ccValidation = this.CCRegex.test(documentNumber);
8271            let passportValidation = this.passaportRegex.test(documentNumber);
8272
8273            return ccValidation || passportValidation;
8274        },
8275    }
8276};
8277
8278
8279var navigation = {
8280
8281    methods: {
8282
8283        getAnalyticsPage: function () {
8284            return this.getPageName();
8285        },
8286
8287        getAnalyticsSection: function (section) {
8288            if (section !== undefined) {
8289                return section;
8290            } else {
8291                return this.getPageName();
8292            }
8293        },
8294
8295        getPageName: function () {
8296            var pathName = window.location.pathname,
8297                clearPathName = pathName.slice(1, pathName.length);
8298            return clearPathName;
8299        },
8300        getShortPageName: function () {
8301            var name = this.getCurrentPage();
8302            try {
8303                return name.split(".")[0];
8304            } catch (e) {
8305                return name;
8306            }
8307        },
8308        updateNavigation: function () {
8309            if (localStorage.getItem('navigationHistory') !== null) {
8310                var pageName = this.getPageName();
8311                this.selectInNavigationHistory(pageName);
8312            }
8313        },
8314
8315        initializeNavigation: function (initialPage) {
8316            localStorage.setItem('navigationHistory', JSON.stringify([]));
8317
8318            if (initialPage !== undefined && typeof initialPage === 'string') {
8319                var navigationH = JSON.parse(localStorage.getItem('navigationHistory'));
8320
8321                navigationH.push(initialPage);
8322                localStorage.setItem('navigationHistory', JSON.stringify(navigationH));
8323            }
8324        },
8325
8326        selectInNavigationHistory: function (page) {
8327            var navigationH = JSON.parse(localStorage.getItem('navigationHistory'));
8328
8329            if (navigationH !== undefined && page !== undefined && typeof page === 'string') {
8330                var pageIndexInNav = navigationH.indexOf(page);
8331
8332                if (pageIndexInNav > -1) {
8333                    navigationH = navigationH.slice(0, pageIndexInNav + 1);
8334                } else {
8335                    navigationH.push(page);
8336                }
8337
8338                localStorage.setItem('navigationHistory', JSON.stringify(navigationH));
8339            }
8340        },
8341
8342        addToNavigationHistory: function (page) {
8343            var navigationH = JSON.parse(localStorage.getItem('navigationHistory'));
8344
8345            if (navigationH !== undefined && page !== undefined && typeof page === 'string') {
8346                navigationH.push(page);
8347                localStorage.setItem('navigationHistory', JSON.stringify(navigationH));
8348            }
8349        },
8350
8351        getNavigationHistory: function () {
8352            return JSON.parse(localStorage.getItem('navigationHistory'));
8353        },
8354
8355        getLastPage: function () {
8356            var navigationH = JSON.parse(localStorage.getItem('navigationHistory'));
8357
8358            if (navigationH !== undefined && navigationH.length >= 2) {
8359                return navigationH[navigationH.length - 2];
8360            }
8361        },
8362
8363
8364        getCurrentPage: function () {
8365            var navigationH = JSON.parse(localStorage.getItem('navigationHistory'));
8366
8367            if (navigationH === undefined || navigationH === null) {
8368                this.initializeNavigation('home.html');
8369                navigationH = JSON.parse(localStorage.getItem('navigationHistory'));
8370            }
8371
8372            if (navigationH !== undefined && navigationH !== null && navigationH.length >= 1) {
8373                return navigationH[navigationH.length - 1];
8374            }
8375        },
8376
8377        redirectPage: function (nextPage, previousPage) {
8378            var originPage = previousPage !== undefined ? previousPage : this.getCurrentPage();
8379            var redirectPage = window.location.pathname.replace(originPage, nextPage + '.html');
8380
8381            window.location.pathname = redirectPage;
8382        },
8383        redirectPageWithParams: function (page, params) {
8384            params = params ? requestHandler.methods.getAsUriParameters(params) : undefined;
8385            window.location.href = window.location.origin + "/" + window.location.pathname.replace(window.location.pathname, page + (params ? '?' + params:''));
8386        },
8387        redirectToMyVdfPage: function (nextPage, previousPage) {
8388            if(nextPage.includes(".html")){
8389                window.location.href = window.location.origin + window.location.pathname.replace(window.location.pathname, nextPage);
8390            }else{
8391                window.location.href = window.location.origin + "/" + window.location.pathname.replace(window.location.pathname, nextPage + '.html');
8392            }
8393        },
8394        redirectAfterLogin: function () {
8395            window.location.href = window.location.origin + "/" + window.location.pathname.replace(window.location.pathname, 'home.html?loginSuccess=true');
8396        },
8397        redirectToMyVdfReportsPage: function (reportsPage) {
8398            window.location.href = window.location.origin + "/" + window.location.pathname.replace(window.location.pathname, 'relatorios/consulta-relatorios.html?rp=' + reportsPage);
8399        },
8400        isLoggedIn: function () {
8401            requestHandler.methods.requestGet("login", "isLogged", {},
8402                function (response) {
8403                    if (requestValidations.methods.requestValidator().validateStatusCode(response)) {
8404                        utag_data.visitor_login_status = response.body ? "Logged In" : "Logged out";
8405                    } else {
8406                        utag_data.visitor_login_status = "Logged out";
8407                    }
8408                },
8409                function () {
8410                    utag_data.visitor_login_status = "Logged out";
8411                }, new Vue());
8412        }
8413    }
8414};
8415String.prototype.format = function () {
8416    var args = arguments;
8417    return this.replace(/{(\d+)}/g, function (match, number) {
8418        return typeof args[number] != 'undefined' ? args[number] : match;
8419    });
8420};
8421window.onload = this.navigation.methods.updateNavigation();
8422
8423if (typeof (tealiumBus) == "undefined") {
8424    var tealiumBus = new Vue();
8425}
8426
8427if (typeof (utag_data) == "undefined") {
8428    var utag_data = {
8429        page_name: this.navigation.methods.getAnalyticsPage(),
8430        page_section: this.navigation.methods.getAnalyticsSection()
8431    };
8432}
8433
8434var loadingAnimations = {
8435
8436    methods: {
8437        /*
8438        --------------------------  props  --------------------------
8439        -------------------------------------------------------------
8440        -   renderLocation - string - div name for render element   -
8441        -   path - string - relative svg location                   -
8442        -   defaultColor - boolean - must have if don't have path   -
8443        -   style - string - style inline to apply                  -
8444        -   cssClass - string - css class name to apply             -
8445        -   withMask - boolean - by default true                    -
8446        -------------------------------------------------------------
8447        */
8448        loadGeneralAnimation: function (props) {
8449            if (myStore && myStore.getters.hasErrorLoadingPortfolio) {
8450                return;
8451            }
8452
8453            if (!document.getElementById(props.renderLocation + '-animation')) {
8454                if (!props.hasOwnProperty('path')) {
8455                    if (props.hasOwnProperty('defaultColor')) {
8456                        props.path = props.defaultColor ? '/content/dam/digital-commons/vodafone-spinner.json' : '/content/dam/digital-commons/vodafone-spinner-white.json';
8457                    } else {
8458                        return;
8459                    }
8460                }
8461
8462                if (props.hasOwnProperty('withMask')) {
8463                    if (props.withMask) {
8464                        this.addMask();
8465                    }
8466                } else {
8467                    this.addMask();
8468                }
8469
8470                if (document.getElementById(props.renderLocation)) {
8471                    document.getElementById(props.renderLocation).insertAdjacentHTML('beforeend', '<div id="' + props.renderLocation + '-animation" style="' + props.style + '" class="' + props.cssClass + '"></div>');
8472
8473                    bodymovin.loadAnimation({
8474                        container: document.getElementById(props.renderLocation + '-animation'),
8475                        path: props.path,
8476                        renderer: 'svg',
8477                        loop: true,
8478                        autoplay: true
8479                    });
8480                }
8481            }
8482        },
8483
8484        /*
8485        --------------------------  props  --------------------------
8486        -------------------------------------------------------------
8487        -   imageToReplace - string - div name for replace          -
8488        -------------------------------------------------------------
8489        */
8490        loadAnimationReplaceImage: function (props) {
8491            if (!document.getElementById(props.renderLocation + '-animation')) {
8492                if (!props.hasOwnProperty('path')) {
8493                    if (props.hasOwnProperty('defaultColor')) {
8494                        props.path = props.defaultColor ? '/content/dam/digital-commons/vodafone-spinner.json' : '/content/dam/digital-commons/vodafone-spinner-white.json';
8495                    } else {
8496                        return;
8497                    }
8498                }
8499
8500                if (props.hasOwnProperty('withMask')) {
8501                    if (props.withMask) {
8502                        this.addMask();
8503                    }
8504                } else {
8505                    this.addMask();
8506                }
8507
8508                if(document.getElementById(props.imageToReplace)){
8509                    document.getElementById(props.imageToReplace).style.display = 'none';
8510                }
8511
8512                if (document.getElementById(props.renderLocation)) {
8513                    document.getElementById(props.renderLocation).insertAdjacentHTML('beforeend', '<div id="' + props.renderLocation + '-animation" style="' + props.style + '" class="' + props.cssClass + '"></div>');
8514
8515                    bodymovin.loadAnimation({
8516                        container: document.getElementById(props.renderLocation + '-animation'),
8517                        path: props.path,
8518                        renderer: 'svg',
8519                        loop: true,
8520                        autoplay: true
8521                    });
8522                }
8523            }
8524        },
8525
8526        removeAnimation: function (renderLocation) {
8527            if (document.getElementById(renderLocation + '-animation')) {
8528                document.getElementById(renderLocation + '-animation').remove();
8529                if(document.getElementById('sidebar--content--xp')){
8530                    document.getElementById('sidebar--content--xp').style.display = 'block';
8531                }
8532            }
8533            if (document.getElementById('mask')) {
8534                this.removeMask();
8535            }
8536        },
8537
8538        removeAnimationReplaceImage: function (renderLocation, imageToReplace, displayMode, stopDisplay) {
8539            if (document.getElementById(renderLocation + '-animation')) {
8540                document.getElementById(renderLocation + '-animation').remove();
8541
8542                if (document.getElementById('mask')) {
8543                    this.removeMask();
8544                }
8545
8546                if (stopDisplay != null) {
8547                    document.getElementById(imageToReplace).style.display = stopDisplay != null ? stopDisplay : 'inline';
8548                } else {
8549                    document.getElementById(imageToReplace).style.display = displayMode != null ? displayMode : 'block';
8550                }
8551
8552
8553            }
8554        },
8555
8556        addMask: function () {
8557            if (document.getElementById('mask')) {
8558                document.getElementById('mask').classList.add('mask');
8559            }
8560        },
8561
8562        removeMask: function () {
8563            if (document.getElementById('mask')) {
8564                $('#mask').removeClass('mask').addClass('atf_mask_ended').removeClass('atf_mask_ended');
8565
8566            }
8567        }
8568    }
8569};
8570
8571var deviceTypeUtils = {
8572    methods: {
8573        isMobile: function () {
8574            if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|iOSMCareApp/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test((navigator.userAgent || navigator.vendor || window.opera).substr(0, 4))) {
8575                return true;
8576            }
8577            return false;
8578        },
8579        deviceType: function () {
8580            var screenWidth = $(window).width();
8581            if (screenWidth <= 639) {
8582                return 'phone';
8583            } else if (screenWidth > 639 && screenWidth <= 970) {
8584                return 'tablet';
8585            } else {
8586                return 'desktop';
8587            }
8588        },
8589        isDesktop: function () {
8590            return this.deviceType() === 'desktop';
8591        },
8592        isTablet: function () {
8593            return this.deviceType() === 'tablet';
8594        },
8595        isTabletOrDesktop: function () {
8596            return this.isTablet() || this.isDesktop();
8597        },
8598        isFirefox: function () {
8599            return navigator.userAgent.indexOf("Firefox") > 0;
8600        },
8601        isIE: function () {
8602            return (navigator.userAgent.indexOf("MSIE") != -1) || (!!document.documentMode == true);
8603        },
8604        isMSEdge: function () {
8605            return navigator.userAgent.indexOf("Edg") != -1;
8606        },
8607        isLandscape: function () {
8608            return (window.orientation === 90 || window.orientation === -90);
8609        },
8610        isFirefoxMobile: function () {
8611            return navigator.userAgent.indexOf('FxiOS') > -1 || (navigator.userAgent.indexOf('Firefox') > -1 && navigator.userAgent.indexOf('Android') > -1);
8612        },
8613        isBurgerVisible: function () {
8614            return $('div > [data-layout-type]').is(":visible");
8615        },
8616        isYornBurgerVisible: function () {
8617            return jQuery('[data-context="header-burger-menu"]:visible').length > 0;
8618        }
8619    }
8620};
8621
8622var comparatorUtils = {
8623    methods: {
8624        isProductInComparator: function (id) {
8625            if (Cookies.get('productsInComparator') && JSON.parse(Cookies.get('productsInComparator')) &&
8626                JSON.parse(Cookies.get('productsInComparator'))[id]) {
8627                return true;
8628            }
8629            return false;
8630        }
8631    }
8632};
8633
8634var scrollUtils = {
8635    methods: {
8636        goToPointer: function (pointer) {
8637            $('body,html').animate({
8638                scrollTop: pointer
8639            }, 900);
8640        }
8641    }
8642};
8643
8644var yornSearchUtils = {
8645    data: function () {
8646        return {
8647            engineId: "11968",
8648            customerId: "1977",
8649            cludoUrl: "https://api-eu1.cludo.com/api/v3/"
8650        }
8651    },
8652    computed: {
8653        baseUrl: function () {
8654            return this.cludoUrl.concat(this.customerId).concat("/" + this.engineId);
8655        }
8656    },
8657    methods: {
8658        searchRequestYorn: function (searchParams) {
8659            var sort = {"sort": {"Date_date": "desc"}};
8660            var me = this;
8661            var url = this.baseUrl.concat("/search");
8662            var xmlhttp = this.buildAuthorizationHeaders('POST', url);
8663            var body = {
8664                "query": searchParams.searchTerm || '*',
8665                "sort": {
8666                    "Date_date": "desc"
8667                },
8668                "responseType": "JsonObject",
8669                "perPage": searchParams.perPage,
8670                "page": searchParams.page || 1
8671            };
8672            xmlhttp.onreadystatechange = function () {
8673                if (this.readyState == 4 && this.status == 200) {
8674                    me.buildResultYorn(JSON.parse(this.responseText));
8675                }
8676            };
8677            xmlhttp.send(JSON.stringify(body));
8678        },
8679        buildResultYorn: function (response) {
8680            var results = {totalMatches: response.TotalDocument};
8681            var questions = [];
8682            var pages = [];
8683
8684            for (var i = 0; i < response.TypedDocuments.length; i++) {
8685                var typedDocument = response.TypedDocuments[i];
8686                switch (typedDocument.Fields.Category.Value) {
8687                    case "Yorn":
8688                        pages.push(typedDocument);
8689                        break;
8690                    case "Perguntas Frequentes":
8691                        questions.push(typedDocument);
8692                        break;
8693                }
8694            }
8695            results.questions = questions;
8696            results.pages = pages;
8697            results.queryId = response.QueryId;
8698            this.handleSearchResultYorn(results);
8699        },
8700        autoCompleteRequestYorn: function (text) {
8701            var me = this;
8702            var url = this.baseUrl.concat("/autocomplete");
8703            var xmlhttp = this.buildAuthorizationHeaders('POST', url);
8704            var body = {
8705                "query": text || '*',
8706                "filters": {
8707                    "Category": ["Perguntas Frequentes"]
8708                },
8709                "responseType": "JsonObject",
8710                "results": 10
8711            };
8712            xmlhttp.onreadystatechange = function () {
8713                if (this.readyState == 4 && this.status == 200) {
8714                    me.handleAutoCompleteResultYorn(JSON.parse(this.responseText));
8715                }
8716            };
8717            xmlhttp.send(JSON.stringify(body));
8718        },
8719        queryLogYorn: function (queryLogParams) {
8720            var me = this;
8721            var url = this.baseUrl.concat("/search/pushstat/querylog");
8722            var xmlhttp = this.buildAuthorizationHeaders('POST', url);
8723
8724            //rc + sw mandatory
8725            var body = {
8726                'sz': window.innerWidth + 'x' + window.innerWidth,
8727                'ua': window.navigator.userAgent,
8728                'refurl': window.location.href,
8729                'refpt': window.pageTitle,
8730                'sw': queryLogParams.searchTerm,
8731                'rc': queryLogParams.totalMatches,
8732                'pn': 1,
8733                'rt': queryLogParams.responseTime,
8734                'dt': queryLogParams.deviceType === "phone" ? "mobile" : queryLogParams.deviceType,
8735                'brl': navigator.language,
8736                'hn': window.location.hostname,
8737                'enid': this.engineId,
8738                'ban': 0
8739            };
8740            xmlhttp.send(JSON.stringify(body));
8741        },
8742        clickLogYorn: function (clickLogParams) {
8743            var me = this;
8744            var url = this.baseUrl.concat("/search/pushstat/clicklog");
8745            var xmlhttp = this.buildAuthorizationHeaders('POST', url);
8746
8747            var body = {
8748                'ls':'searchresult',
8749                'sz': window.innerWidth + 'x' + window.innerWidth,
8750                'ua': window.navigator.userAgent,
8751                'refurl': window.location.href,
8752                'refpt': window.pageTitle,
8753                'sw': clickLogParams.searchTerm,
8754                'rc': clickLogParams.totalMatches,
8755                'pn': 1,
8756                'hn': window.location.hostname,
8757                'clurl': clickLogParams.url,
8758                'cli': clickLogParams.index,
8759                'title': clickLogParams.title,
8760                'qid': clickLogParams.cludoQID,
8761                'dt': clickLogParams.deviceType === "phone" ? "mobile" : clickLogParams.deviceType,
8762                'brl': navigator.language,
8763                'enid': this.engineId,
8764                'ban': 0
8765            };
8766
8767            xmlhttp.send(JSON.stringify(body));
8768        },
8769        getPublicSettings: function () {
8770            var me = this;
8771            var url = this.baseUrl.concat("/websites/publicsettings");
8772            var xmlhttp = this.buildAuthorizationHeaders('GET', url);
8773
8774            xmlhttp.onreadystatechange = function () {
8775                if (this.readyState == 4 && this.status == 200) {
8776                    me.saveQuicklinks(JSON.parse(this.responseText));
8777                }
8778            };
8779
8780            xmlhttp.send();
8781        },
8782        buildAuthorizationHeaders: function (method, url) {
8783            var xmlhttp = new XMLHttpRequest();
8784            xmlhttp.open(method, url);
8785            var b64auth = btoa("1977:" + this.engineId + ":SearchKey");
8786            xmlhttp.setRequestHeader("authorization", "SiteKey " + b64auth);
8787            xmlhttp.setRequestHeader("content-type", "application/json; charset=utf-8");
8788            return xmlhttp;
8789        },
8790    }
8791};
8792
8793var searchUtils = {
8794    data: function () {
8795        return {
8796            totalResults: 0
8797        }
8798    },
8799    methods: {
8800        /*
8801        --------------------------  searchParams  --------------------------
8802        -------------------------------------------------------------
8803        -   searchTerm = The text you want to search for.
8804        -   perPage = Amount of search results in the response. Use together with page to batch the results.
8805        -   page = The page index of search results to return. Use together with perPage to batch the results.
8806        -   period = The startDate and endDate for the search scope
8807        -------------------------------------------------------------
8808        */
8809        searchRequest: function (searchParams) {
8810            var engineId = searchParams.engineId ? searchParams.engineId : "10757";
8811            var me = this;
8812            searchParams.page = (searchParams.page) ? searchParams.page : 1;
8813            var url = "https://api-eu1.cludo.com/api/v3/1977/".concat(engineId).concat("/search");
8814            var xmlhttp = this.buildAuthorizationHeaders('POST', url, engineId);
8815            var body = {
8816                "query": searchParams.searchTerm ? searchParams.searchTerm : '*',
8817                "operator": "or",
8818                "filters": {
8819                    "date": ["Date_date", searchParams.period ? searchParams.period.startDate : '', searchParams.period ? searchParams.period.endDate : '']
8820                },
8821                "sort": {
8822                    "Date_date": "desc"
8823                },
8824                "responseType": "JsonObject",
8825                "perPage": searchParams.perPage,
8826                "page": searchParams.page
8827            };
8828            xmlhttp.onreadystatechange = function () {
8829                if (this.readyState == 4 && this.status == 200) {
8830                    me.buildResult(JSON.parse(this.responseText), searchParams.returnArray, me);
8831                } else if (this.readyState == 4) {
8832                    me.result('error');
8833                }
8834            };
8835            xmlhttp.send(JSON.stringify(body));
8836        },
8837        totalResultsRequest: function (engineNr) {
8838            var engineId = engineNr ? engineNr : "10757";
8839            var me = this;
8840            var url = "https://api-eu1.cludo.com/api/v3/1977/".concat(engineId).concat("/search");
8841            var xmlhttp = this.buildAuthorizationHeaders('POST', url, engineId );
8842            var body = {
8843                "query": '*',
8844                "operator": "or",
8845                "filters": {},
8846                "responseType": "JsonObject",
8847                "perPage": 1,
8848                "page": 1
8849            };
8850            xmlhttp.onreadystatechange = function () {
8851                if (this.readyState == 4 && this.status == 200) {
8852                    me.setTotalResults(JSON.parse(this.responseText).TotalDocument);
8853                } else if (this.readyState == 4) {
8854                    me.setTotalResults(0);
8855                }
8856            };
8857            xmlhttp.send(JSON.stringify(body));
8858        },
8859        autoCompleteRequest: function (text, engineNr) {
8860            var engineId = engineNr ? engineNr : "10757";
8861            var me = this;
8862            var url = "https://api-eu1.cludo.com/api/v3/1977/".concat(engineId).concat("/autocomplete?text=").concat(text);
8863            var xmlhttp = this.buildAuthorizationHeaders('GET', url, engineId, text);
8864            xmlhttp.onreadystatechange = function () {
8865                if (this.readyState == 4 && this.status == 200) {
8866                    me.autoCompleteResult(JSON.parse(this.responseText));
8867                } else if (this.readyState == 4) {
8868                    me.autoCompleteResult([]);
8869                }
8870            };
8871            xmlhttp.send();
8872        },
8873        buildResult: function (response) {
8874            var res = [];
8875            var docs = [];
8876            if (!this.isEmpty(response)) {
8877                docs = response.TypedDocuments;
8878                this.totalResults = response.TotalDocument;
8879                if (docs && docs.length > 0) {
8880                    for (var i = 0; i < docs.length; i++) {
8881                        if (docs[i].FieldNames && docs[i].FieldNames.length > 0 && docs[i].Fields) {
8882                            var fields = [];
8883                            for (var j = 0; j < docs[i].FieldNames.length; j++) {
8884                                fields.push(docs[i].FieldNames[j]);
8885                            }
8886                            if (fields.length > 0) {
8887                                var obj = {};
8888                                for (var j = 0; j < fields.length; j++) {
8889                                    obj[fields[j].toLowerCase()] = docs[i].Fields[fields[j]].Value;
8890                                    obj.selected = false;
8891                                }
8892                                if (!this.isEmpty(obj)) {
8893                                    res.push(obj);
8894                                }
8895                            }
8896                        }
8897                    }
8898                }
8899                this.result(res);
8900            }
8901        },
8902        buildAuthorizationHeaders: function (method, url, engineId) {
8903            var xmlhttp = new XMLHttpRequest();
8904            xmlhttp.open(method, url);
8905            var b64auth = btoa("1977:" + engineId + ":SearchKey");
8906            xmlhttp.setRequestHeader("authorization", "SiteKey " + b64auth);
8907            xmlhttp.setRequestHeader("content-type", "application/json; charset=utf-8");
8908            return xmlhttp;
8909        },
8910        isEmpty: function (obj) {
8911            for (var key in obj) {
8912                if (obj.hasOwnProperty(key)) {
8913                    return false;
8914                }
8915            }
8916            return true;
8917        }
8918    }
8919};
8920
8921var arrayFindIE = {
8922    mounted: function () {
8923        // https://tc39.github.io/ecma262/#sec-array.prototype.find
8924        if (!Array.prototype.find) {
8925            Object.defineProperty(Array.prototype, 'find', {
8926                value: function (predicate) {
8927                    // 1. Let O be ? ToObject(this value).
8928                    if (this == null) {
8929                        throw new TypeError('"this" is null or not defined');
8930                    }
8931
8932                    var o = Object(this);
8933
8934                    // 2. Let len be ? ToLength(? Get(O, "length")).
8935                    var len = o.length >>> 0;
8936
8937                    // 3. If IsCallable(predicate) is false, throw a TypeError exception.
8938                    if (typeof predicate !== 'function') {
8939                        throw new TypeError('predicate must be a function');
8940                    }
8941
8942                    // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
8943                    var thisArg = arguments[1];
8944
8945                    // 5. Let k be 0.
8946                    var k = 0;
8947
8948                    // 6. Repeat, while k < len
8949                    while (k < len) {
8950                        // a. Let Pk be ! ToString(k).
8951                        // b. Let kValue be ? Get(O, Pk).
8952                        // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
8953                        // d. Isf testResult is true, return kValue.
8954                        var kValue = o[k];
8955                        if (predicate.call(thisArg, kValue, k, o)) {
8956                            return kValue;
8957                        }
8958                        // e. Increase k by 1.
8959                        k++;
8960                    }
8961
8962                    // 7. Return undefined.
8963                    return undefined;
8964                },
8965                configurable: true,
8966                writable: true
8967            });
8968        }
8969    }
8970};
8971
8972var basketUtils = {
8973    mixins: [loadingAnimations, urlUtils],
8974    data: function () {
8975        return {
8976            CONSTANTS: {
8977                BASKET: 'basket/basket',
8978                BASKET_MODULE_SET: 'basket/set',
8979                BASKET_MODULE_UPDATED: 'basket/basketUpdated',
8980                BASKET_ID_COOKIE: 'omni_basket_id',
8981                BASKET_SESSION_ID: 'eshop_session_id',
8982                EUR: 'EUR',
8983                POINTS: 'POINTS',
8984                BASKET_CONTROLLER: 'basket',
8985                BASKET_GET_METHOD: '',
8986                BASKET_ADD_ITEM_METHOD: 'add',
8987                BASKET_ADD_ITEM_SKY_METHOD: 'addToSky',
8988                BASKET_ADD_ITEMS_METHOD: 'addMultiple',
8989                BASKET_REMOVE_ITEM_METHOD: 'removeItem',
8990                BASKET_UPDATE_ITEM_METHOD: 'updateItem',
8991                BASKET_UPDATE_FREE_SIM_METHOD: 'updateFreeSim',
8992                BASKET_CHOOSE_BASKET_METHOD: 'chooseBasket',
8993                MONETARY_AMOUNT: 'MONETARY_AMOUNT',
8994                MAX_CART_ITEM: 'MAX_CART_ITEM',
8995                MAX_NUMBER_ITEM: 'MAX_NUMBER_ITEM',
8996                MAX_ESIM_REACHED: 'MAX_ESIM_REACHED',
8997                PRICE_ZERO_NOT_ALLOWED: 'PRICE_ZERO_NOT_ALLOWED',
8998                INVALID_PRICE: 'INVALID_PRICE',
8999                MAX_NUMBER_TYPE_ITEM: 'MAX_NUMBER_TYPE_ITEM',
9000                MAX_NUMBER_ACCESSORY: 'MAX_NUMBER_ACCESSORY',
9001                ESIM_IN_CART: 'ESIM_IN_CART',
9002                DIFFERENT_ESIMS_IN_CART: 'DIFFERENT_ESIMS_IN_CART',
9003                MAX_INSURANCE_ITEM: 'MAX_INSURANCE_ITEM',
9004                MAX_INSURANCE_RELATIONS: 'MAX_INSURANCE_RELATIONS',
9005                INSURANCE_PRODUCT_QUANTITY: 'INSURANCE_PRODUCT_QUANTITY',
9006                MAX_TRADE_IN_ITEM: 'MAX_TRADE_IN_ITEM',
9007                INVALID_TRADE_IN_RELATIONSHIP: 'INVALID_TRADE_IN_RELATIONSHIP',
9008                MAX_TRADE_IN_RELATIONS: 'MAX_TRADE_IN_RELATIONS',
9009                TRADE_IN_PRODUCT_QUANTITY: 'TRADE_IN_PRODUCT_QUANTITY',
9010                CV: 'cv',
9011                BASKET_NOT_FOUND: 'BASKET_NOT_FOUND',
9012                CHECKOUT_ID_COOKIE: 'omni_checkout_id',
9013                REPLACE_DISCOUNT: '$value',
9014                EMPTY_STRING: '',
9015                DISCOUNT: 'DISCOUNT',
9016                LOGOUT_COOKIE_ID: 'LOGOUT',
9017                LOGIN_CONTROLLER: 'login',
9018                LOGIN_IS_LOGGED_METHOD: 'isLogged',
9019                HAS_CONTEXT: 'alreadyHasContext',
9020                PACK: 'Pack',
9021                BASKET_LOADING: 'basket-loading'
9022            },
9023            TWENTY_FOUR_HOURS: 24 * 60 * 60 * 1000,
9024            EIGHT_HOURS: 8 * 60 * 60 * 1000
9025        };
9026    },
9027
9028    methods: {
9029        loadBasket: function (cb) {
9030            var me = this,
9031                successFn = function (response) {
9032                    if (response.body) {
9033                        var hasLoadedBasket = false;
9034                        var loadBasketWhenReady = function () {
9035                            if (hasLoadedBasket) {
9036                                return;
9037                            }
9038                            hasLoadedBasket = true;
9039                            me.loadBasketCont(cb);
9040                        };
9041
9042                        SessionBus.$once(me.CONSTANTS.HAS_CONTEXT, function () {
9043                            loadBasketWhenReady();
9044                        });
9045
9046                        setTimeout(function () {
9047                            loadBasketWhenReady();
9048                        }, 1500);
9049                    } else {
9050                        me.loadBasketCont(cb);
9051                    }
9052                },
9053                errorFn = function (error) {
9054                    me.loadBasketCont(cb);
9055                };
9056            me.requestGet(me.CONSTANTS.LOGIN_CONTROLLER, me.CONSTANTS.LOGIN_IS_LOGGED_METHOD, {}, successFn, errorFn, me);
9057        },
9058
9059        loadBasketCont: function (cb) {
9060            var me = this,
9061                successFn = function (response) {
9062                    if (me.requestValidator().validateStatusCodeAndErrors(response) && response.body && Array.isArray(response.body)) {
9063                        if (!response.body.length) {
9064                            if (cb) {
9065                                cb();
9066                            }
9067                        } else if (response.body.length > 1) {
9068                            chooseBasket.$data.data = response.body;
9069                            chooseBasket.$data.visible = true;
9070                            if (cb) {
9071                                cb();
9072                            }
9073                        } else if (response.body.length) {
9074                            var basket = response.body[0];
9075                            if(basket.statusDetails && basket.statusDetails.statusCode === "BASKET_NOT_FOUND"){
9076                                error = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.basketNotFound');
9077                                toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(error.value, error.key);
9078                            } else {
9079                                basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, basket);
9080                                if(basket.validationResults && basket.validationResults.length > 0){
9081                                    basket.validationResults.forEach(function (result) {
9082                                        if(result.valid && result.code === 'TRADE_IN_PRICE_CHANGED'){
9083                                            toasterable.methods.emitToasterEvent('show-warning', me.i18nUtils().getProperty("eshop.vf_basket.tradeIn.priceChange"))
9084                                        }
9085                                    });
9086                                }
9087                            }
9088                            if (cb) {
9089                                cb();
9090                            }
9091                        }
9092                        loadingAnimations.methods.removeAnimation(me.CONSTANTS.BASKET_LOADING);
9093        
9094                        if (typeof header !== 'undefined' && header.$data) {
9095                            header.$data.showBasketIcon = true;
9096                        }
9097                    } else {
9098                        errorFn(response);
9099                    }
9100                },
9101                errorFn = function (data) {
9102                    me.basketErrorsHandling(data, me.CONSTANTS.BASKET_GET_METHOD);
9103                    if (cb) {
9104                        cb();
9105                    }
9106                    loadingAnimations.methods.removeAnimation(me.CONSTANTS.BASKET_LOADING);
9107        
9108                    if (typeof header !== 'undefined' && header.$data) {
9109                        header.$data.showBasketIcon = true;
9110                    }
9111                };
9112        
9113            if (typeof header !== 'undefined' && header.$data) {
9114                header.$data.showBasketIcon = false;
9115            }
9116        
9117            me.$nextTick(function () {
9118                loadingAnimations.methods.loadGeneralAnimation({
9119                    renderLocation: me.CONSTANTS.BASKET_LOADING,
9120                    path: '/content/dam/digital-commons/red_30px_stroke_15.json',
9121                    style: 'height: 30px; width: 30px',
9122                    withMask: false
9123                });
9124                me.eshopGet(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_GET_METHOD, {}, successFn, errorFn, me);
9125            });
9126        },
9127
9128        addItemToBasket: function (sapRef, productOfferingPrice, productOfferingId, cb, addSource) {
9129            var me = this,
9130                request = {
9131                    quantity: "1",
9132                    sapRef: sapRef,
9133                    productOfferingPriceList: productOfferingPrice,
9134                    productOffering: productOfferingId,
9135                    productType: me.selected.productType,
9136                    priceType: me.selected.pricecond
9137                },
9138                successFn = function (response) {
9139                    if (me.requestValidator().validateStatusCodeAndErrors(response)) {
9140                        if (response.body.validationResults && response.body.validationResults.length > 0) {
9141                            var falseResult = response.body.validationResults.some(el => el.valid === false);
9142                            if(falseResult){
9143                                var valResults = me.cloneObj(response.body.validationResults);
9144                                var message = me.defineOrderMessage(valResults);
9145                                toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(message.value, message.key);
9146                            } else {
9147                                var source = addSource ? addSource : '';
9148                                basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9149                            }
9150                        } else {
9151                            var source = addSource ? addSource : '';
9152                            basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9153                        }
9154                        me.setOriginCookie();
9155                        if (cb) {
9156                            cb(response);
9157                        }
9158                    } else {
9159                        errorFn(response);
9160                    }
9161                },
9162                errorFn = function (data) {
9163                    me.basketErrorsHandling(data, me.CONSTANTS.BASKET_ADD_ITEM_METHOD);
9164                    if (cb) {
9165                        cb(data);
9166                    }
9167                };
9168            me.eshopPost(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_ADD_ITEM_METHOD, request, successFn, errorFn, me);
9169        },
9170
9171        addRelatedProductToBasket: function(productOfferingId, productRelationship, relationType, cb, addSource) {
9172            var me = this,
9173                relatedProductEndpointId = relationType === 'INSURANCE' ? 'addInsuranceToBasket' : (relationType === 'TRADE_IN' ? 'addTradeInToBasket' : 'addRelatedProductToBasket'),
9174                request = {
9175                    quantity: "1",
9176                    productOffering: productOfferingId,
9177                    productRelationship: productRelationship,
9178                    relationType: relationType
9179                },
9180                successFn = function (response) {
9181                    if (me.requestValidator().validateStatusCodeAndErrors(response)) {
9182                        if (response.body.validationResults && response.body.validationResults.length > 0) {
9183                            var falseResult = response.body.validationResults.some(el => el.valid === false);
9184                            if(falseResult){
9185                                var valResults = me.cloneObj(response.body.validationResults);
9186                                var message = me.defineOrderMessage(valResults);
9187                                toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(message.value, message.key);
9188                            } else {
9189                                var source = addSource ? addSource : '';
9190                                basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9191                            }
9192                        } else {
9193                            var source = addSource ? addSource : '';
9194                            basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9195                        }
9196                        me.setOriginCookie();
9197                        if (cb) {
9198                            cb(response);
9199                        }
9200                    } else {
9201                        errorFn(response);
9202                    }
9203                },
9204                errorFn = function (data) {
9205                    me.basketErrorsHandling(data, relatedProductEndpointId);
9206                    if (cb) {
9207                        cb(data);
9208                    }
9209                };
9210            me.eshopPost(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_ADD_ITEM_METHOD, request, successFn, errorFn, me);
9211        },
9212
9213        addItemToBasketFromComparatorToaster: function (sapRef, productOffer
9213ingPrice, productOfferingId, cb, addSource, selected) {
9214            var me = this,
9215                comparatorEndpointId = 'addItemToBasketFromComparator',
9216                request = {
9217                    quantity: "1",
9218                    sapRef: sapRef,
9219                    productOfferingPriceList: productOfferingPrice,
9220                    productOffering: productOfferingId,
9221                    productType: selected.productType,
9222                    priceType: selected.pricecond
9223                },
9224                successFn = function (response) {
9225                    if (me.requestValidator().validateStatusCodeAndErrors(response)) {
9226                        if (response.body.validationResults && response.body.validationResults.length > 0) {
9227                            var falseResult = response.body.validationResults.some(el => el.valid === false);
9228                            if(falseResult){
9229                                var valResults = me.cloneObj(response.body.validationResults);
9230                                var message = me.defineOrderMessage(valResults);
9231                                toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(message.value, message.key);
9232                            } else {
9233                                var source = addSource ? addSource : '';
9234                                basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9235                            }
9236                        } else {
9237                            var source = addSource ? addSource : '';
9238                            basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9239                        }
9240                        me.setOriginCookie();
9241                        if (cb) {
9242                            cb(response);
9243                        }
9244                    } else {
9245                        errorFn(response);
9246                    }
9247                },
9248                errorFn = function (data) {
9249                    me.basketErrorsHandling(data, comparatorEndpointId);
9250                    if (cb) {
9251                        cb(data);
9252                    }
9253                };
9254            me.eshopPost(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_ADD_ITEM_METHOD, request, successFn, errorFn, me);
9255        },
9256
9257        addItemsToBasket: function (request, cb, addSource) {
9258            var me = this,
9259                successFn = function (response) {
9260                    if (me.requestValidator().validateStatusCodeAndErrors(response)) {
9261                        if (response.body.validationResults && response.body.validationResults.length > 0) {
9262                            var falseResult = response.body.validationResults.some(el => el.valid === false);
9263                            if(falseResult){
9264                                var valResults = me.cloneObj(response.body.validationResults);
9265                                var message = me.defineOrderMessage(valResults);
9266                                toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(message.value, message.key);
9267                            } else {
9268                                var source = addSource ? addSource : '';
9269                                basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9270                            }
9271                        } else {
9272                            var source = addSource ? addSource : '';
9273                            basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9274                        }
9275                        me.setOriginCookie();
9276                        if (cb) {
9277                            cb(response);
9278                        }
9279                    } else {
9280                        errorFn(response);
9281                    }
9282                },
9283                errorFn = function (data) {
9284                    me.basketErrorsHandling(data, me.CONSTANTS.BASKET_ADD_ITEMS_METHOD);
9285                    if (cb) {
9286                        cb(data);
9287                    }
9288                };
9289            me.eshopPost(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_ADD_ITEMS_METHOD, request, successFn, errorFn, me);
9290        },
9291
9292         addItemToSkyBasket: function (request, cb, addSource) {
9293            var me = this,
9294                successFn = function (response) {
9295                    if (me.requestValidator().validateStatusCodeAndErrors(response)) {
9296                        if (response.body.validationResults && response.body.validationResults.length > 0) {
9297                            var falseResult = response.body.validationResults.some(el => el.valid === false);
9298                            if(falseResult){
9299                                var valResults = me.cloneObj(response.body.validationResults);
9300                                var message = me.defineOrderMessage(valResults);
9301                                toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(message.value, message.key);
9302                            } else {
9303                                var source = addSource ? addSource : '';
9304                                basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9305                            }
9306                        } else {
9307                            var source = addSource ? addSource : '';
9308                            basketStore.commit(me.CONSTANTS.BASKET_MODULE_UPDATED, {basket: response.body, source: source});
9309                        }
9310                        me.setOriginCookie();
9311                        if (cb) {
9312                            cb(response);
9313                        }
9314                    } else {
9315                        errorFn(response);
9316                    }
9317                },
9318                errorFn = function (data) {
9319                    me.basketErrorsHandling(data, me.CONSTANTS.BASKET_ADD_ITEM_SKY_METHOD);
9320                    if (cb) {
9321                        cb(data);
9322                    }
9323                };
9324            me.eshopPost(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_ADD_ITEM_SKY_METHOD, request, successFn, errorFn, me);
9325        },
9326
9327        removeItemFromBasket: function (cartItemId, cb) {
9328            var me = this,
9329                request = {
9330                    cartItemId: cartItemId
9331                },
9332                successFn = function (response) {
9333                    if (me.requestValidator().validateStatusCodeAndErrors(response)) {
9334
9335                        var responseData = response.body;
9336
9337                        /* The data regarding insurance and tradeIn previous saved in storage is used to populate the
9338                         new object. This is important to guarantee that the products in the cart maintain the associated
9339                         tradeIn and Insurance data without the need for a new third party request.
9340                        */
9341                        responseData = me.addPreviousInsuranceTradeInData(responseData);
9342
9343                        basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, responseData);
9344                        if (cb) {
9345                            cb();
9346                        }
9347                    } else {
9348                        errorFn(response);
9349                    }
9350                },
9351                errorFn = function (data) {
9352                    me.basketErrorsHandling(data, me.CONSTANTS.BASKET_REMOVE_ITEM_METHOD);
9353                    if (cb) {
9354                        cb();
9355                    }
9356                };
9357            me.eshopPost(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_REMOVE_ITEM_METHOD, request, successFn, errorFn, me);
9358        },
9359
9360        updateBasket: function (cartItem, operation, cb) {
9361            var me = this,
9362                item = me.cloneObj(cartItem),
9363                quantity = operation === 'REMOVE' ? cartItem.quantity - 1 : cartItem.quantity + 1;
9364
9365            //REMOVE UNNECESSARY ELEMENTS TO PREVENT BIG POST
9366            delete item.eshopProductDTO;
9367
9368            var request = {
9369                    quantity: quantity,
9370                    cartItem: item
9371                },
9372                successFn = function (response) {
9373                    if (me.requestValidator().validateStatusCodeAndErrors(response)) {
9374                        if (response.body.validationResults && response.body.validationResults.length > 0) {
9375                            var falseResult = response.body.validationResults.some(el => el.valid === false);
9376                            if(falseResult){
9377                                var message = me.defineOrderMessage(response.body.validationResults);
9378                                toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(message.value, message.key);
9379                            } else {
9380                                basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, response.body);
9381                            }
9382                        } else {
9383                            basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, response.body);
9384                        }
9385                        if (cb) {
9386                            cb(response);
9387                        }
9388                    } else {
9389                        errorFn(response);
9390                    }
9391                },
9392                errorFn = function (data) {
9393                    me.basketErrorsHandling(data, me.CONSTANTS.BASKET_UPDATE_ITEM_METHOD);
9394                    if (cb) {
9395                        cb(data);
9396                    }
9397                };
9398            me.eshopPost(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_UPDATE_ITEM_METHOD, request, successFn, errorFn, me);
9399        },
9400
9401        updateFreeSim: function (cartItem, productType, priceType, cb) {
9402            var me = this,
9403                item = me.cloneObj(cartItem);
9404
9405            //REMOVE UNNECESSARY ELEMENTS TO PREVENT BIG POST
9406            delete item.eshopProductDTO;
9407
9408            var request = {
9409                    cartItem: item,
9410                    productType: productType,
9411                    priceType: priceType
9412                },
9413                successFn = function (response) {
9414                    if (me.requestValidator().validateStatusCodeAndErrors(response)) {
9415                        if (response.body.validationResults && response.body.validationResults.length > 0) {
9416                            var falseResult = response.body.validationResults.some(el => el.valid === false);
9417                            if(falseResult){
9418                                var message = me.defineOrderMessage(response.body.validationResults);
9419                                toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(message.value, message.key);
9420                            } else {
9421                                basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, response.body);
9422                            }
9423                        } else {
9424                            basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, response.body);
9425                        }
9426                        if (cb) {
9427                            cb();
9428                        }
9429                    } else {
9430                        errorFn(response);
9431                    }
9432                },
9433                errorFn = function (data) {
9434                    me.basketErrorsHandling(data, me.CONSTANTS.BASKET_UPDATE_FREE_SIM_METHOD);
9435                    if (cb) {
9436                        cb();
9437                    }
9438                };
9439            me.eshopPost(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_UPDATE_FREE_SIM_METHOD, request, successFn, errorFn, me);
9440        },
9441
9442        basketErrorsHandling: function (data, endpointId) {
9443            var me = this, error,
9444                trackingKey = 'eshop.' + (endpointId || 'basket') + '.genericError';
9445            if (me.isEshop()) {
9446                if (data && data.body && data.body.statusDetails && data.body.statusDetails.statusCode === me.CONSTANTS.BASKET_NOT_FOUND) {
9447                    var hostname = document.location.hostname;
9448                    if (hostname.indexOf('.') != -1) {
9449                        hostname = hostname.substr(hostname.indexOf('.'), hostname.length);
9450                    }
9451                    Cookies.remove(me.CONSTANTS.BASKET_ID_COOKIE, { domain: hostname });
9452                    Cookies.remove(me.CONSTANTS.CHECKOUT_ID_COOKIE, { domain: hostname });
9453                    basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, {});
9454                    error = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.basketNotFound');
9455                    toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(error.value, error.key);
9456                } else {
9457                    error = me.i18nUtils().getKeyAndValue('eshop.label.error.default');
9458                    toasterUtils.methods.formatErrorMessageToToasterWithTealiumTracking(error.value, trackingKey);
9459                }
9460            }
9461        },
9462
9463        getItemEURValue: function (cartItem) {
9464            var me = this,
9465                eur = 0;
9466            if (cartItem && cartItem.totalItemPrice && cartItem.totalItemPrice.length > 0) {
9467                cartItem.totalItemPrice.forEach(function (itemPrice) {
9468                    if (itemPrice && itemPrice.unitOfMeasure && itemPrice.price.taxIncludedAmount && me.CONSTANTS.EUR === itemPrice.price.taxIncludedAmount.unit) {
9469                        if (itemPrice.price && itemPrice.price.taxIncludedAmount && itemPrice.price.taxIncludedAmount.value) {
9470                            eur += itemPrice.price.taxIncludedAmount.value;
9471                        }
9472                    }
9473                });
9474            }
9475            return eur;
9476        },
9477
9478        getItemDutyFreeEURValue: function (cartItem) {
9479            var me = this,
9480                eur = 0;
9481            if (cartItem && cartItem.totalItemPrice && cartItem.totalItemPrice.length > 0) {
9482                cartItem.totalItemPrice.forEach(function (itemPrice) {
9483                    if (itemPrice && itemPrice.unitOfMeasure && itemPrice.price.dutyFreeAmou
9483nt && me.CONSTANTS.EUR === itemPrice.price.dutyFreeAmount.unit) {
9484                        if (itemPrice.price && itemPrice.price.dutyFreeAmount && itemPrice.price.dutyFreeAmount.value) {
9485                            eur += itemPrice.price.dutyFreeAmount.value;
9486                        }
9487                    }
9488                });
9489            }
9490            return eur;
9491        },
9492
9493
9494        getItemEURValueBasedOnSiteContext: function (cartItem, isBusinessContext) {
9495            var me = this;
9496            if (isBusinessContext) {
9497                return me.getItemDutyFreeEURValue(cartItem);
9498            } else {
9499                return me.getItemEURValue(cartItem);
9500            }
9501        },
9502
9503        getItemPOINTSValue: function (cartItem) {
9504            var me = this,
9505                points = 0;
9506            if (cartItem && cartItem.totalItemPrice && cartItem.totalItemPrice.length > 0) {
9507                cartItem.totalItemPrice.forEach(function (itemPrice) {
9508                    if (itemPrice && itemPrice.unitOfMeasure && me.CONSTANTS.POINTS === itemPrice.price.dutyFreeAmount.unit) {
9509                        if (itemPrice.price && itemPrice.price.dutyFreeAmount && itemPrice.price.dutyFreeAmount.value) {
9510                            points += itemPrice.price.dutyFreeAmount.value;
9511                        }
9512                    }
9513                });
9514            }
9515            return points;
9516        },
9517
9518        getItemDiscountValue: function (cartItem) {
9519            var me = this,
9520                discount = 0;
9521
9522            if (cartItem && cartItem.discountValue !== undefined && cartItem.discountValue !== null && cartItem.discountValue !== '') {
9523                discount = parseFloat(cartItem.discountValue);
9524                return isNaN(discount) ? 0 : discount;
9525            }
9526            
9527            return discount;
9528        },
9529
9530        getItemDiscountPercentage: function (cartItem) {
9531            var me = this,
9532                percentage = 0,
9533                discountValue,
9534                itemPrice,
9535                originalPrice;
9536
9537            if (
9538                cartItem &&
9539                cartItem.discountValue !== undefined &&
9540                cartItem.discountValue !== null &&
9541                cartItem.discountValue !== '' &&
9542                cartItem.price !== undefined &&
9543                cartItem.price !== null &&
9544                cartItem.price !== ''
9545            ) {
9546                discountValue = parseFloat(cartItem.discountValue);
9547                itemPrice = parseFloat(cartItem.price);
9548
9549                if (!isNaN(discountValue) && !isNaN(itemPrice) && itemPrice > 0) {
9550                    originalPrice = itemPrice + discountValue;
9551
9552                    percentage = (discountValue / originalPrice) * 100;
9553
9554                    return Math.round(percentage * 100) / 100;
9555                }
9556            }
9557
9558            return isNaN(percentage) ? 0 : Math.round(percentage * 100) / 100;
9559        },
9560
9561        translateErrorCode: function (validationResults) {
9562            var me = this, messageToShow = [], messageKeys = [], keyAndValue;
9563            validationResults.forEach(function (validationResult) {
9564                switch (validationResult.code) {
9565                    case (me.CONSTANTS.MONETARY_AMOUNT):
9566                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.monetaryAmount');
9567                        break;
9568                    case (me.CONSTANTS.MAX_CART_ITEM):
9569                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxCartItem');
9570                        break;
9571                    case (me.CONSTANTS.MAX_NUMBER_ITEM):
9572                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxNumberItem');
9573                        break;
9574                    case (me.CONSTANTS.PRICE_ZERO_NOT_ALLOWED):
9575                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.priceZeroNotAllowed');
9576                        break;
9577                    case (me.CONSTANTS.INVALID_PRICE):
9578                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.invalidPrice');
9579                        break;
9580                    case (me.CONSTANTS.MAX_NUMBER_TYPE_ITEM):
9581                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxNumerTypeItem');
9582                        break;
9583                    case (me.CONSTANTS.MAX_ESIM_REACHED):
9584                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxEsimReached');
9585                        break;
9586                    case (me.CONSTANTS.MAX_NUMBER_ACCESSORY):
9587                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxNumberAccessory');
9588                        break;
9589                    case (me.CONSTANTS.ESIM_IN_CART):
9590                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.eSimInCart');
9591                        break;
9592                    case (me.CONSTANTS.DIFFERENT_ESIMS_IN_CART):
9593                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.differentEsimsInCart');
9594                        break;
9595                    case (me.CONSTANTS.MAX_INSURANCE_ITEM):
9596                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxInsuranceItem');
9597                        break;
9598                    case (me.CONSTANTS.MAX_INSURANCE_RELATIONS):
9599                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxInsuranceRelations');
9600                        break;
9601                    case (me.CONSTANTS.INSURANCE_PRODUCT_QUANTITY):
9602                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.insuranceProductQuantity');
9603                        break;
9604                    case (me.CONSTANTS.MAX_TRADE_IN_ITEM):
9605                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxTradeInItem');
9606                        break;
9607                    case (me.CONSTANTS.INVALID_TRADE_IN_RELATIONSHIP):
9608                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.invalidTradeInRelationship');
9609                        break;
9610                    case (me.CONSTANTS.MAX_TRADE_IN_RELATIONS):
9611                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.maxTradeInRelations');
9612                        break;
9613                    case (me.CONSTANTS.TRADE_IN_PRODUCT_QUANTITY):
9614                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.vf_checkout.label.error.tradeInProductQuantity');
9615                        break;
9616                    default:
9617                        keyAndValue = me.i18nUtils().getKeyAndValue('eshop.label.error.default');
9618                }
9619                messageToShow.push(keyAndValue.value);
9620                messageKeys.push(keyAndValue.key);
9621            });
9622            keyAndValue.value = messageToShow.join("<br>");
9623            keyAndValue.key = messageKeys.join(",");
9624            return keyAndValue;
9625        },
9626
9627        defineOrderMessage: function (validationResults) {
9628            var me = this;
9629
9630            for (var i = 0; i < validationResults.length; i++) {
9631                if (me.CONSTANTS.MAX_NUMBER_TYPE_ITEM === validationResults[i].code) {
9632                    return me.translateErrorCode(validationResults.splice(i, 1));
9633                }
9634            }
9635
9636            for (var j = 0; j < validationResults.length; j++) {
9637                if (me.CONSTANTS.INVALID_PRICE === validationResults[j].code) {
9638                    return me.translateErrorCode(validationResults.splice(j, 1));
9639                }
9640            }
9641
9642            for (var z = 0; z < validationResults.length; z++) {
9643                if (me.CONSTANTS.PRICE_ZERO_NOT_ALLOWED === validationResults[z].code) {
9644                    return me.translateErrorCode(validationResults.splice(z, 1));
9645                }
9646            }
9647
9648            return me.translateErrorCode(validationResults);
9649        },
9650
9651        getCartTotalEURValueBasedOnSiteContext: function (cartTotalPrice, isBusinessContext) {
9652            var me = this;
9653            if (isBusinessContext) {
9654                return me.getCartTotalDutyFreeEURValue(cartTotalPrice);
9655            } else {
9656                return me.getCartTotalEURValue(cartTotalPrice);
9657            }
9658        },
9659
9660        getCartTotalEURValue: function (cartTotalPrice) {
9661            var me = this,
9662                eur = 0;
9663            if (cartTotalPrice && cartTotalPrice.length > 0) {
9664                cartTotalPrice.forEach(function (cartTotal) {
9665                    if (cartTotal && cartTotal.price && cartTotal.price.taxIncludedAmount && me.CONSTANTS.EUR === cartTotal.price.taxIncludedAmount.unit && cartTotal.priceType === "ONETIME") {
9666                            eur += cartTotal.price.taxIncludedAmount.value;
9667                    }
9668                });
9669            }
9670            return eur;
9671        },
9672
9673        getCartTotalDutyFreeEURValue: function (cartTotalPrice) {
9674            var me = this,
9675                eur = 0;
9676            if (cartTotalPrice && cartTotalPrice.length > 0) {
9677                cartTotalPrice.forEach(function (cartTotal) {
9678                    if (cartTotal && cartTotal.price && cartTotal.price.dutyFreeAmou
9678nt && me.CONSTANTS.EUR === cartTotal.price.dutyFreeAmount.unit && cartTotal.priceType === "ONETIME") {
9679                        eur += cartTotal.price.dutyFreeAmount.value;
9680                    }
9681                });
9682            }
9683            return eur;
9684        },
9685
9686        getCartTotalPOINTSValue: function (cartTotalPrice) {
9687            var me = this,
9688                points = 0;
9689            if (cartTotalPrice && cartTotalPrice.length > 0) {
9690                cartTotalPrice.forEach(function (cartTotal) {
9691                    if (cartTotal && cartTotal.price && cartTotal.price.dutyFreeAmount && me.CONSTANTS.POINTS === cartTotal.price.dutyFreeAmount.unit && cartTotal.priceType === "ONETIME") {
9692                        points += cartTotal.price.dutyFreeAmount.value;
9693                    }
9694                });
9695            }
9696            return points;
9697        },
9698
9699        formatPrice: function (value) {
9700            return this.currencyUtils().formatEuroBalance(value);
9701        },
9702
9703        getAccessoryDiscount: function (item) {
9704            var percentage = null;
9705            if (this.isAccessory(item.eshopProductDTO.productType)) {
9706                item.itemPrice.forEach(function (itemPrice) {
9707                    if (itemPrice.priceAlterations && itemPrice.priceAlterations.length > 0) {
9708                        itemPrice.priceAlterations.forEach(function (priceAlterations) {
9709                            if (priceAlterations.price && priceAlterations.price.percentage) {
9710                                percentage = priceAlterations.price.percentage;
9711                            }
9712                        });
9713                    }
9714                });
9715            }
9716            return percentage;
9717        },
9718
9719        showAccessoryDiscount: function (item) {
9720            return this.getAccessoryDiscount(item) !== null;
9721        },
9722
9723        accessoryDiscountLabel: function (item, label) {
9724            return this.showAccessoryDiscount(item) ? label.replace(this.CONSTANTS.REPLACE_DISCOUNT, this.getAccessoryDiscount(item)) : this.CONSTANTS.EMPTY_STRING;
9725        },
9726
9727        isCVItem: function (cartItem) {
9728            var isCV = false;
9729            if (cartItem && cartItem.totalItemPrice && cartItem.totalItemPrice.length > 0) {
9730                cartItem.totalItemPrice.forEach(function (itemPrice) {
9731                    if (itemPrice && itemPrice.unitOfMeasure && ("CV2" === itemPrice.unitOfMeasure || "CV1" === itemPrice.unitOfMeasure || "POINTS" === itemPrice.unitOfMeasure)) {
9732                        isCV = true;
9733                    }
9734                });
9735            }
9736            return isCV;
9737        },
9738
9739        getPriceConditionDetails: function (priceCondition, ids) {
9740            var result = undefined;
9741            if (priceCondition && ids) {
9742                Object.keys(priceCondition).forEach(function (key) {
9743                    priceCondition[key].forEach(function (obj) {
9744                        obj.productOfferingPriceId.forEach(function (id) {
9745                            if (ids.includes(id)) {
9746                                result = obj;
9747                            }
9748                        });
9749                    });
9750                });
9751            }
9752            return result;
9753        },
9754
9755        getBasketCount: function (basket) {
9756            var counter = 0;
9757            if (basket && basket.cartItems && basket.cartItems.length > 0) {
9758                basket.cartItems.forEach(function (item) {
9759                    if (item && item.quantity) {
9760                        counter += parseInt(item.quantity);
9761                    }
9762                });
9763            }
9764            return parseInt(counter);
9765        },
9766
9767        setLogoutCookie: function () {
9768            var me = this,
9769                hostname = document.location.hostname;
9770            if (hostname.indexOf('.') != -1) {
9771                hostname = hostname.substr(hostname.indexOf('.'), hostname.length);
9772            }
9773            Cookies.set(me.CONSTANTS.LOGOUT_COOKIE_ID, true, {domain: hostname, expires: 365 * 20});
9774        },
9775
9776        removeBasketAndLogoutCookies: function () {
9777            var me = this,
9778                hostname = document.location.hostname;
9779            if (hostname.indexOf('.') != -1) {
9780                hostname = hostname.substr(hostname.indexOf('.'), hostname.length);
9781            }
9782            Cookies.remove(me.CONSTANTS.BASKET_ID_COOKIE, {domain: hostname});
9783            if (typeof basketStore !== 'undefined') {
9784                basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, {});
9785            }
9786            Cookies.remove(me.CONSTANTS.LOGOUT_COOKIE_ID, {domain: hostname});
9787        },
9788
9789        isPackItem: function (cartItem) {
9790            if (cartItem && cartItem.eshopProductDTO && cartItem.eshopProductDTO.productType) {
9791                return cartItem.eshopProductDTO.productType === this.CONSTANTS.PACK;
9792            }
9793            return false;
9794        },
9795
9796        chooseBasket: function (basketId, cb) {
9797            var me = this,
9798                request = {
9799                    basketId: basketId
9800                },
9801                successFn = function (response) {
9802                    if (me.requestValidator().validateStatusCodeAndErrors(response) && response.body && Array.isArray(response.body)) {
9803                        if (response.body.length) {
9804                            var basket = response.body[0];
9805                            basketStore.commit(me.CONSTANTS.BASKET_MODULE_SET, basket);
9806                            if (cb) {
9807                                cb();
9808                            }
9809                        } else {
9810                            errorFn(response);
9811                        }
9812                    } else {
9813                        errorFn(response);
9814                    }
9815                },
9816                errorFn = function (error) {
9817                    me.basketErrorsHandling(error, me.CONSTANTS.BASKET_CHOOSE_BASKET_METHOD);
9818                    if (cb) {
9819                        cb();
9820                    }
9821                };
9822            me.eshopGet(me.CONSTANTS.BASKET_CONTROLLER, me.CONSTANTS.BASKET_CHOOSE_BASKET_METHOD, request, successFn, errorFn, me);
9823        },
9824        basketNotification: function(){
9825            if(basketStore.state.basket.basket.cartItems && basketStore.state.basket.basket.cartItems !== 0){
9826                if(SessionBus.loggedIn){
9827                    if(localStorage.notification !== undefined){
9828                        if(new Date() - new Date(localStorage.notification) >= this.TWENTY_FOUR_HOURS){
9829                            localStorage.setItem("notification",new Date().toISOString());
9830                            return true;
9831                        }
9832                        else{
9833                            return false;
9834                        }
9835                    }else{
9836                        var date = new Date(basketStore.state.basket.basket.validFor.start);
9837                        if((new Date() - new Date(date)) >= this.TWENTY_FOUR_HOURS){
9838                            localStorage.setItem("notification",new Date().toISOString());
9839                            return true;
9840                        }
9841                        else{
9842                            localStorage.setItem("notification",date.toISOString());
9843                            return false;
9844                        }
9845                    }
9846                }
9847                else{
9848                    if(localStorage.notification !== undefined){
9849                        if((new Date() - new Date(localStorage.notification)) >= this.EIGHT_HOURS){
9850                            localStorage.setItem("notification",new Date().toISOString());
9851                            return true;
9852                        }
9853                        else{
9854                            return false;
9855                        }
9856                    }else{
9857                        var date = new Date(basketStore.state.basket.basket.validFor.start);
9858                        if((new Date() - new Date(date)) >= this.EIGHT_HOURS){
9859                            localStorage.setItem("notification",new Date().toISOString());
9860                            return true;
9861                        }
9862                        else{
9863                            localStorage.setItem("notification",date.toISOString());
9864                            return false;
9865                        }
9866                    }
9867                }
9868            }
9869            return false;
9870        },
9871        isTravellers: function (cartItems) {
9872            var isTravellersChecked = false;
9873                for (let i = 0; i < cartItems.length; i++) {
9874                    for (let j = 0; j < cartItems[i].productOffering.category.length; j++) {
9875                        if(cartItems[i].productOffering.category[j].id === 'principal_b2c_cart_travellers'){
9876                            isTravellersChecked = true;
9877                            break
9878                        }
9879                    }
9880                }
9881            return isTravellersChecked;
9882        },
9883
9884        isPreSales: function(cartItems) {
9885            return cartItems.some(function(item) {
9886                var product = item && item.product;
9887                var characteristics = product && product.characteristics;
9888                if (!Array.isArray(characteristics)) return false;
9889
9890                return characteristics.some(function(char) {
9891                    return char.name === "pre_sales" && char.value === "true";
9892                });
9893            });
9894        },
9895
9896        setOriginCookie: function() {
9897            var d = new Date();
9898            d.setTime(d.getTime() + 3600000);
9899            var expires = d.toUTCString();
9900            document.cookie = "origin_url=" + window.location.href + ";expires=" + expires + ";path=/";
9901        },
9902
9903        addPreviousInsuranceTradeInData: function (newBasket) {
9904
9905            try {
9906                var me = this;
9907
9908                // Retrieve previous basket from store (before it gets overwritten)
9909                var previousBasket = basketStore.getters[me.CONSTANTS.BASKET];
9910
9911                // If no previous basket or no cart items, return new basket as-is
9912                if (!previousBasket || !previousBasket.cartItems) {
9913                    return newBasket;
9914                }
9915
9916                // Create a map of previous cart items indexed by their id for fast lookup
9917                var previousItemsMap = {};
9918                previousBasket.cartItems.forEach(function (item) {
9919                    previousItemsMap[item.id] = item;
9920                });
9921
9922                // Ensure new basket has cart items to process
9923                if (newBasket && newBasket.cartItems) {
9924
9925                    newBasket.cartItems.forEach(function (item) {
9926
9927                        // Find matching item in previous basket
9928                        var previousItem = previousItemsMap[item.id];
9929
9930                        if (previousItem) {
9931
9932                            // Preserve insuranceDTO if it existed before
9933                            if (previousItem.insuranceDTO) {
9934                                item.insuranceDTO = previousItem.insuranceDTO;
9935                            }
9936
9937                            // Preserve tradeInInfo if it existed before
9938                            if (previousItem.tradeInInfo) {
9939                                // Assign a shallow copy to avoid unintended mutations
9940                                item.tradeInInfo = previousItem.tradeInInfo.slice();
9941                            }
9942                        }
9943                    });
9944                }
9945
9946                return newBasket;
9947
9948            } catch (e) {
9949                // Log error and fallback to returning new basket without enrichment
9950                console.error("Error merging previous insurance and trade-in data:", e);
9951                return newBasket;
9952            }
9953        }
9954    }
9955};
9956
9957var captchaProvider = {
9958
9959    mixins: [urlUtils, requestHandler],
9960    data: function () {
9961        return {
9962            providerType: "A"
9963        }
9964    },
9965    created: function () {
9966        let partnerVDFKey = Cookies.get('partnerVDFKey');
9967        let partnerVDFSecret = Cookies.get('partnerVDFSecret');
9968        let me = this;
9969        if (partnerVDFKey && partnerVDFSecret) {
9970            this.requestGet("captcha", "partner", {
9971                    "partnerVDFKey": partnerVDFKey,
9972                    "partnerVDFSecret": partnerVDFSecret
9973                }, function (response) {
9974                    if (requestValidations.methods.requestValidator().validateStatusCode(response)) {
9975                        if (response.body) {
9976                            me.providerType = 'B';
9977                        }
9978                    }
9979                },
9980                function () {
9981                }, this);
9982        }
9983    },
9984    methods: {
9985        performCaptcha: function (e) {
9986            captchaJs.addId(this.captchaId);
9987            if (e != undefined)
9988                e.preventDefault();
9989            if (this.providerType !== "A") {
9990                return this.captchaCallback();
9991            }
9992            grecaptcha.reset(0);
9993            grecaptcha.execute();
9994        },
9995        hasCookie: function () {
9996            return Cookies.get('partnerVDFKey') !== undefined && Cookies.get('partnerVDFSecret') !== undefined;
9997        }
9998    }
9999};
10000
10001var toasterable = {
10002    data: function () {
10003        return {
10004            toasterTimeout: 5000
10005        }
10006    },
10007    methods: {
10008        emitToasterEvent: function (type, msg) {
10009            let obj = {title: this.getTitle(type), message: msg};
10010            ToasterEventBus.$emit(type, obj, this.toasterTimeout);
10011        },
10012        getTitle: function (type) {
10013            if (type === 'show-success') {
10014                return 'Sucesso';
10015            } else if (type === 'show-error') {
10016                return 'Lamentamos';
10017            } else {
10018                return 'Informação';
10019            }
10020        }
10021    }
10022};
10023
10024var smapi = {
10025    methods: {
10026        startRouteTimer: function (timerID) {
10027            if (typeof window.submitter === 'object') {
10028                window.submitter.startRouteTimer(timerID, timerID + ' - ' + window.location.origin + window.location.pathname);
10029            }
10030        },
10031        stopRouteTimer: function (timerID) {
10032            if (typeof window.submitter === 'object') {
10033                window.submitter.stopRouteTimer(timerID);
10034            }
10035        }
10036    }
10037};
10038
10039var toasterUtils = {
10040    methods: {
10041        formatErrorMessageToToasterWithTealiumTracking: function (message, code) {
10042            var me = this;
10043            tealium_eshop.methods.handleEshopError(message, code);
10044            me.formatErrorMessageToToaster(message);
10045        },
10046        formatErrorMessageToToaster: function (value) {
10047            var me = this, toasterMessage = {};
10048            toasterMessage["title"] = utils.methods.i18nUtils().getProperty('eshop.vf_genericToaster.title.error');
10049            toasterMessage["message"] = value;
10050            ToasterEventBus.$emit('show-error', toasterMessage);
10051        },
10052        formatSuccessMessageToToaster: function (value) {
10053            var me = this, toasterMessage = {};
10054            toasterMessage["title"] = utils.methods.i18nUtils().getProperty('eshop.vf_genericToaster.title.success');
10055            toasterMessage["message"] = value;
10056            ToasterEventBus.$emit('show-success', toasterMessage);
10057        }
10058    }
10059};
10060
10061var htmlUtils = {
10062    methods: {
10063        decodeHtml: function (html) {
10064            return html.replaceAll('&quota', '"');
10065        }
10066    }
10067};
10068
10069var globalFunctions = {
10070  methods: {
10071    sendInfo: function (callback) {
10072      window.sendInfo = function(info) {
10073        callback(info)
10074      }
10075    }
10076  }
10077};
10078
10079var processStringCommons = {
10080    anonymizeValue: function (value) {
10081        var anonymize = value.substring(2, value.length - 2);
10082        anonymize.split('').forEach(function (char) {
10083            anonymize = anonymize.replace(char, '*');
10084        });
10085        return value.substring(0, 2) + anonymize + value.substring(value.length - 2, value.length);
10086    },
10087    removeHTMLTags: function(string) {
10088        let tmp = document.createElement("div");
10089        tmp.innerHTML = string;
10090        return tmp.innerText;
10091    },
10092    removeSpecificHTMLTagContent: function(string, tag) {
10093        let tmp = document.createElement("div");
10094        tmp.innerHTML = string;
10095        let elements = tmp.getElementsByTagName(tag);
10096        while (elements[0]) elements[0].parentNode.removeChild(elements[0]);
10097        return tmp.innerHTML;
10098    },
10099    buildEnumeratorQuote: function(array, separator, condition, finalizer, blackl
10099ist) {
10100        separator = separator || ",";
10101        condition = condition || "e";
10102        finalizer = finalizer || "";
10103        blacklist = blacklist || [null, undefined, ""];
10104        array = array.filter(item => !blacklist.includes(item));
10105        let quote = "";
10106        let case1 = array.length-2;
10107        let case2 = array.length-1;
10108        array.forEach(function(item, index) {
10109            switch (index){
10110                case case1 : { quote += item + " " + condition + " "; break; }
10111                case case2 : { quote += item + finalizer + " "; break; }
10112                default: { quote += item + separator + " "; break; }
10113            }
10114        });
10115        return quote;
10116    },
10117    replaceRefi18n: function(label, ref, value) {
10118        if(label){
10119            return label.replace(ref, value);
10120        }
10121    },
10122    capitalizeQuote: function(value, type) {
10123        type = type || "first";
10124        let quote = "";
10125        let slice = value.split(" ");
10126        switch (type) {
10127            case 'first': { quote = value.charAt(0).toUpperCase() + value.slice(1); break; };
10128            case 'all': { slice.forEach(function(item) { quote = quote + item.charAt(0).toUpperCase() + item.slice(1) + " "}); break; };
10129            default: { quote = value; break; };
10130        }
10131        return quote;
10132    },
10133    extractNumberFromString: function(string) {
10134        if (!string) return null;
10135        let match = string.match(/\d+/);
10136        if (match) { 
10137            return parseInt(match[0], 10);
10138        }
10139        return null;
10140    }
10141};
10142
10143var ssoUtils = {
10144    methods:{
10145     checkSSO: function(scope) {
10146        successFn = function (response) {
10147            if (requestValidations.methods.requestValidator().validateStatusCode(response)) 
10148            {
10149                sessionStorage.setItem('SSOData', 
10150                JSON.stringify({
10151                    flagSSO: response.body.flagSSO,
10152                    urlSSO: response.body.endpoint,
10153                    registerSSO: response.body.urlRegisterSso,
10154                    logoutSSO: response.body.urlLogoutSso
10155                }));
10156            }
10157        },
10158        errorFn = function () {
10159            sessionStorage.setItem('SSOData', 
10160            JSON.stringify({
10161                flagSSO: false,
10162            }));
10163        };
10164        requestHandler.methods.requestGet("login", "checkSSOFlag", {}, successFn, errorFn, scope);
10165     },
10166
10167     loginSSO: function (url, pathName) {
10168        window.location.href = url + "&state=" + pathName;
10169     },
10170
10171     //Used for register and logout SSO
10172     alternateSSO: function (url) {
10173        window.location.href = url;
10174     }
10175}
10176};
10177var getInfoFromCards = new Vue({
10178    methods:  {
10179        callOverlay: function (idCard, openDialogFunc) {
10180            this.$emit('callOverlay', idCard, openDialogFunc);
10181        },
10182        loadCardsWithPromoCode: function (promoCode) {
10183            this.$emit('loadCardsWithPromoCode', promoCode);
10184        }
10185    }
10186})
10187/**
10188    This mixin allow components to be on top in IE.
10189    Overlay and toaster bugs will be resolved if just this mixins is added.
10190**/
10191var ieTopable = {
10192    mixins:[requestHandler],
10193    mounted: function(){
10194        if(this.isIE()){
10195            //CSS problem in IE :(
10196            try{
10197                let footer = document.getElementsByTagName('footer')[0];
10198                footer.appendChild(this.$el);
10199            }catch(e){}
10200        }
10201    },
10202}
10203Vue.filter('currency', function (value) {
10204    if (typeof value !== "number") {
10205        return value;
10206    }
10207    var formatter = new Intl.NumberFormat('pt-PT', {
10208        style: 'currency',
10209        currency: 'EUR',
10210        minimumFractionDigits: 2
10211    });
10212    return formatter.format(value);
10213});
10214
10215Vue.filter('currencyNumber', function (value, minFractionDigits, maxFractionDigits) {
10216    if (typeof value !== "number") {
10217        return value;
10218    }
10219    var formatter = new Intl.NumberFormat('pt-PT', {
10220        style: 'decimal',
10221        minimumFractionDigits: minFractionDigits,
10222        maximumFractionDigits: maxFractionDigits
10223    });
10224    return formatter.format(value);
10225});
10226
10227var PLACEHOLDER_REGEXP = /\{([0-9a-zA-Z]+)\}/g;
10228
10229Vue.filter("format", function () {
10230    if (arguments.length === 0) {
10231        return "";
10232    } else if (arguments.length === 1) {
10233        return arguments[0];
10234    } else {
10235        var args = arguments;
10236        var message = args[0] ? args[0] : "";
10237        return message.replace(PLACEHOLDER_REGEXP, function (match, placeholder, index) {
10238            if (message[index - 1] === "{" && message[index + match.length] === "}") {
10239                return placeholder; // deal with the escaped brackets
10240            } else {
10241                var i = parseInt(placeholder);
10242                var result = args[i + 1];
10243                if (result === null || result === undefined) {
10244                    return "";
10245                } else {
10246                    return result;
10247                }
10248            }
10249        });
10250    }
10251});
10252Array.intersection = function(a,b,field){
10253    if(!a || !b) return [];
10254    if(field){
10255        let result = [];
10256        a.forEach(function(obj){
10257            return b.forEach(function(obj2){
10258                if(obj[field] == obj2[field]){
10259                    result.push(obj);
10260                }
10261            });
10262        });
10263        return result;
10264    }
10265    return a.filter(function(n) {
10266               return b.indexOf(n) !== -1;
10267    });
10268};
10269
10270String.prototype.replaceAll = function(search, replacement) {
10271    let target = this;
10272    return target.split(search).join(replacement);
10273};
10274(typeof navigator !== "undefined") && (function(root, factory) {
10275    if (typeof define === "function" && define.amd) {
10276        define(function() {
10277            return factory(root);
10278        });
10279    } else if (typeof module === "object" && module.exports) {
10280        module.exports = factory(root);
10281    } else {
10282        root.lottie = factory(root);
10283        root.bodymovin = root.lottie;
10284    }
10285}((window || {}), function(window) {
10286	"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={}
10286,bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,blitter=10,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"],i=e.length;for(t=0;t<i;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===typeof t&&t.length){var e,i=createSizedArray(t.length),r=t.length;for(e=0;e<r;e+=1)i[e]=Math.abs(t[e]);return i}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin=t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="visible",t.style.transformStyle=t.style.webkitTransformStyle=t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,i,r){this.type=t,this.currentTime=e,this.totalTime=i,this.direction=r<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,i,r){this.type=t,this.currentLoop=i,this.totalLoops=e,this.direction=r<0?-1:1}function BMSegmentStartEvent(t,e,i){this.type=t,this.firstFrame=e,this.totalFrames=i}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e,this.currentTime=currentTime}roundValues(!1);var createElementID=(G=0,function(){return"__lottie_element_"+ ++G}),G;function HSVtoRGB(t,e,i){var r,s,a,n,o,h,l,p;switch(h=i*(1-e),l=i*(1-(o=6*t-(n=Math.floor(6*t)))*e),p=i*(1-(1-o)*e),n%6){case 0:r=i,s=p,a=h;break;case 1:r=l,s=i,a=h;break;case 2:r=h,s=i,a=p;break;case 3:r=h,s=l,a=i;break;case 4:r=p,s=h,a=i;break;case 5:r=i,s=h,a=l}return[r,s,a]}function RGBtoHSV(t,e,i){var r,s=Math.max(t,e,i),a=Math.min(t,e,i),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:r=0;break;case t:r=e-i+n*(e<i?6:0),r/=6*n;break;case e:r=i-t+2*n,r/=6*n;break;case i:r=t-e+4*n,r/=6*n}return[r,o,h]}function addSaturationToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[1]+=e,1<i[1]?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[2]+=e,1<i[2]?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,1<i[0]?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[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 i=this._cbs[t].length,r=0;r<i;r++)this._cbs[t][r](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var i=0,r=this._cbs[t].length;i<r;)this._cbs[t][i]===e&&(this._cbs[t].splice(i,1),i-=1,r-=1),i+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var createTypedArray="function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):void 0}:function(t,e){var i,r=0,s=[];switch(t){case"int16":case"uint8c":i=1;break;default:i=1.1}for(r=0;r<e;r+=1)s.push(i);return s};function createSizedArray(t){return Array.apply(null,{length:t})}function createNS(t){return document.createElementNS(svgNS,t)}function createTag(t){return document.createElement(t)}function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};
vendor: 6,241 bytes, line 10286
10286var getBlendMode=(Pa={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return Pa[t]||""}),Pa,Matrix=function(){var s=Math.cos,a=Math.sin,n=Math.tan,r=Math.round;function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function e(t){if(0===t)return this;var e=s(t),i=a(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}function i(t){if(0===t)return this;var e=s(t),i=a(t);return this._t(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1)}function o(t){if(0===t)return this;var e=s(t),i=a(t);return this._t(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1)}function h(t){if(0===t)return this;var e=s(t),i=a(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}function l(t,e){return this._t(1,e,t,1,0,0)}function p(t,e){return this.shear(n(t),n(e))}function m(t,e){var i=s(e),r=a(e);return this._t(i,r,0,0,-r,i,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(t),1,0,0,0,0,1,0,0,0,0,1)._t(i,-r,0,0,r,i,0,0,0,0,1,0,0,0,0,1)}function f(t,e,i){return i||0===i||(i=1),1===t&&1===e&&1===i?this:this._t(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1)}function c(t,e,i,r,s,a,n,o,h,l,p,m,f,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=i,this.props[3]=r,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=m,this.props[12]=f,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function d(t,e,i){return i=i||0,0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}function u(t,e,i,r,s,a,n,o,h,l,p,m,f,c,d,u){var y=this.props;if(1===t&&0===e&&0===i&&0===r&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return y[12]=y[12]*t+y[15]*f,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]=y[15]*u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],E=y[3],x=y[4],P=y[5],S=y[6],_=y[7],A=y[8],C=y[9],T=y[10],k=y[11],M=y[12],D=y[13],F=y[14],w=y[15];return y[0]=g*t+v*s+b*h+E*f,y[1]=g*e+v*a+b*l+E*c,y[2]=g*i+v*n+b*p+E*d,y[3]=g*r+v*o+b*m+E*u,y[4]=x*t+P*s+S*h+_*f,y[5]=x*e+P*a+S*l+_*c,y[6]=x*i+P*n+S*p+_*d,y[7]=x*r+P*o+S*m+_*u,y[8]=A*t+C*s+T*h+k*f,y[9]=A*e+C*a+T*l+k*c,y[10]=A*i+C*n+T*p+k*d,y[11]=A*r+C*o+T*m+k*u,y[12]=M*t+D*s+F*h+w*f,y[13]=M*e+D*a+F*l+w*c,y[14]=M*i+D*n+F*p+w*d,y[15]=M*r+D*o+F*m+w*u,this._identityCalculated=!1,this}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function g(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function E(t,e,i){return{x:t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}}function x(t,e,i){return t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12]}function P(t,e,i){return t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13]}function S(t,e,i){return t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}function _(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,i=-this.props[1]/t,r=-this.props[4]/t,s=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=i,o.props[4]=r,o.props[5]=s,o.props[12]=a,o.props[13]=n,o}function A(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function C(t){var e,i=t.length,r=[];for(e=0;e<i;e+=1)r[e]=A(t[e]);return r}function T(t,e,i){var r=createTypedArray("float32",6);if(this.isIdentity())r[0]=t[0],r[1]=t[1],r[2]=e[0],r[3]=e[1],r[4]=i[0],r[5]=i[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];r[0]=t[0]*s+t[1]*n+h,r[1]=t[0]*a+t[1]*o+l,r[2]=e[0]*s+e[1]*n+h,r[3]=e[0]*a+e[1]*o+l,r[4]=i[0]*s+i[1]*n+h,r[5]=i[0]*a+i[1]*o+l}return r}function k(t,e,i){return this.isIdentity()?[t,e,i]:[t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]]}function M(t,e){if(this.isIdentity())return t+","+e;var i=this.props;return Math.round(100*(t*i[0]+e*i[4]+i[12]))/100+","+Math.round(100*(t*i[1]+e*i[5]+i[13]))/100}function D(){for(var t=0,e=this.props,i="matrix3d(";t<16;)i+=r(1e4*e[t])/1e4,i+=15===t?")":",",t+=1;return i}function F(t){return t<1e-6&&0<t||-1e-6<t&&t<0?r(1e4*t)/1e4:t}function w(){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=t,this.rotate=e,this.rotateX=i,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=m,this.shear=l,this.scale=f,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=E,this.applyToX=x,this.applyToY=P,this.applyToZ=S,this.applyToPointArray=k,this.applyToTriplePoints=T,this.applyToPointStringified=M,this.toCSS=D,this.to2dCSS=w,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=C,this.inversePoint=A,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();!function(o,h){var l,p=this,m=256,f=6,c="random",d=h.pow(m,f),u=h.pow(2,52),y=2*u,g=m-1;function v(t){var e,i=t.length,n=this,r=0,s=n.i=n.j=0,a=n.S=[];for(i||(t=[i++]);r<m;)a[r]=r++;for(r=0;r<m;r++)a[r]=a[s=g&s+t[r%i]+(e=a[r])],a[s]=e;n.g=function(t){for(var e,i=0,r=n.i,s=n.j,a=n.S;t--;
vendor: 4,722 bytes, line 10286
10286)e=a[r=g&r+1],i=i*m+a[g&(a[r]=a[s=g&s+e])+(a[s]=e)];return n.i=r,n.j=s,i}}function b(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function E(t,e){for(var i,r=t+"",s=0;s<r.length;)e[g&s]=g&(i^=19*e[g&s])+r.charCodeAt(s++);return x(e)}function x(t){return String.fromCharCode.apply(0,t)}h["seed"+c]=function(t,e,i){var r=[],s=E(function t(e,i){var r,s=[],a=typeof e;if(i&&"object"==a)for(r in e)try{s.push(t(e[r],i-1))}catch(t){}return s.length?s:"string"==a?e:e+"\0"}((e=!0===e?{entropy:!0}:e||{}).entropy?[t,x(o)]:null===t?function(){try{if(l)return x(l.randomBytes(m));var t=new Uint8Array(m);return(p.crypto||p.msCrypto).getRandomValues(t),x(t)}catch(t){var e=p.navigator,i=e&&e.plugins;return[+new Date,p,i,p.screen,x(o)]}}():t,3),r),a=new v(r),n=function(){for(var t=a.g(f),e=d,i=0;t<u;)t=(t+i)*m,e*=m,i=a.g(1);for(;y<=t;)t/=2,e/=2,i>>>=1;return(t+i)/e};return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,E(x(a.S),o),(e.pass||i||function(t,e,i,r){return r&&(r.S&&b(r,a),t.state=function(){return b(a,{})}),i?(h[c]=t,e):t})(n,s,"global"in e?e.global:this==h,e.state)},E(h.random(),o)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,e,i,r,s){var a=s||("bez_"+t+"_"+e+"_"+i+"_"+r).replace(/\./g,"p");if(o[a])return o[a];var n=new h([t,e,i,r]);return o[a]=n}},o={};var l=11,p=1/(l-1),e="function"==typeof Float32Array;function r(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function a(t){return 3*t}function m(t,e,i){return((r(e,i)*t+s(e,i))*t+a(e))*t}function f(t,e,i){return 3*r(e,i)*t*t+2*s(e,i)*t+a(e)}function h(t){this._p=t,this._mSampleValues=e?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],i=this._p[1],r=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===i&&r===s?t:0===t?0:1===t?1:m(this._getTForX(t),i,s)},_precompute:function(){var t=this._p[0],e=this._p[1],i=this._p[2],r=this._p[3];this._precomputed=!0,t===e&&i===r||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;i<l;++i)this._mSampleValues[i]=m(i*p,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],r=this._mSampleValues,s=0,a=1,n=l-1;a!==n&&r[a]<=t;++a)s+=p;var o=s+(t-r[--a])/(r[a+1]-r[a])*p,h=f(o,e,i);return.001<=h?function(t,e,i,r){for(var s=0;s<4;++s){var a=f(e,i,r);if(0===a)return e;e-=(m(e,i,r)-t)/a}return e}(t,o,e,i):0===h?o:function(t,e,i,r,s){for(var a,n,o=0;0<(a=m(n=e+(i-e)/2,r,s)-t)?i=n:e=n,1e-7<Math.abs(a)&&++o<10;);return n}(t,s,s+p,e,i)}},t}();function extendPrototype(t,e){var i,r,s=t.length;for(i=0;i<s;i+=1)for(var a in r=t[i].prototype)r.hasOwnProperty(a)&&(e.prototype[a]=r[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}function bezFunction(){Math;function y(t,e,i,r,s,a){var n=t*r+e*s+i*a-s*r-a*t-i*e;return-.001<n&&n<.001}var p=function(t,e,i,r){var s,a,n,o,h,l,p=defaultCurveSegments,m=0,f=[],c=[],d=bezier_length_pool.newElement();for(n=i.length,s=0;s<p;s+=1){for(h=s/(p-1),a=l=0;a<n;a+=1)o=bm_pow(1-h,3)*t[a]+3*bm_pow(1-h,2)*h*i[a]+3*(1-h)*bm_pow(h,2)*r[a]+bm_pow(h,3)*e[a],f[a]=o,null!==c[a]&&(l+=bm_pow(f[a]-c[a],2)),c[a]=f[a];l&&(m+=l=bm_sqrt(l)),d.percents[s]=h,d.lengths[s]=m}return d.addedLength=m,d};function g(t){this.segmentLength=0,this.points=new Array(t)}function v(t,e){this.partialLength=t,this.point=e}var b,t=(b={},function(t,e,i,r){var s=(t[0]+"_"+t[1]+"_"+e[0]+"_"+e[1]+"_"+i[0]+"_"+i[1]+"_"+r[0]+"_"+r[1]).replace(/\./g,"p");if(!b[s]){var a,n,o,h,l,p,m,f=defaultCurveSegments,c=0,d=null;2===t.length&&(t[0]!=e[0]||t[1]!=e[1])&&y(t[0],t[1],e[0],e[1],t[0]+i[0],t[1]+i[1])&&y(t[0],t[1],e[0],e[1],e[0]+r[0],e[1]+r[1])&&(f=2);var u=new g(f);for(o=i.length,a=0;a<f;a+=1){for(m=createSizedArray(o),l=a/(f-1),n=p=0;n<o;n+=1)h=bm_pow(1-l,3)*t[n]+3*bm_pow(1-l,2)*l*(t[n]+i[n])+3*(1-l)*bm_pow(l,2)*(e[n]+r[n])+bm_pow(l,3)*e[n],m[n]=h,null!==d&&(p+=bm_pow(m[n]-d[n],2));c+=p=bm_sqrt(p),u.points[a]=new v(p,m),d=m}u.segmentLength=c,b[s]=u}return b[s]});function M(t,e){var i=e.percents,r=e.lengths,s=i.length,a=bm_floor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===r[a])return i[a];for(var h=r[a]>n?-1:1,l=!0;l;)if(r[a]<=n&&r[a+1]>n?(o=(n-r[a])/(r[a+1]-r[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}var D=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segments_length_pool.newElement(),r=t.c,s=t.v,a=t.o,n=t.i,o=t._length,h=i.lengths,l=0;for(e=0;e<o-1;e+=1)h[e]=p(s[e],s[e+1],a[e],n[e+1]),l+=h[e].addedLength;return r&&o&&(h[e]=p(s[e],s[0],a[e],n[0]),l+=h[e].addedLength),i.totalLength=l,i}
10286,getNewSegment:function(t,e,i,r,s,a,n){var o,h=M(s=s<0?0:1<s?1:s,n),l=M(a=1<a?1:a,n),p=t.length,m=1-h,f=1-l,c=m*m*m,d=h*m*m*3,u=h*h*m*3,y=h*h*h,g=m*m*f,v=h*m*f+m*h*f+m*m*l,b=h*h*f+m*h*l+h*m*l,E=h*h*l,x=m*f*f,P=h*f*f+m*l*f+m*f*l,S=h*l*f+m*l*l+h*f*l,_=h*l*l,A=f*f*f,C=l*f*f+f*l*f+f*f*l,T=l*l*f+f*l*l+l*f*l,k=l*l*l;for(o=0;o<p;o+=1)D[4*o]=Math.round(1e3*(c*t[o]+d*i[o]+u*r[o]+y*e[o]))/1e3,D[4*o+1]=Math.round(1e3*(g*t[o]+v*i[o]+b*r[o]+E*e[o]))/1e3,D[4*o+2]=Math.round(1e3*(x*t[o]+P*i[o]+S*r[o]+_*e[o]))/1e3,D[4*o+3]=Math.round(1e3*(A*t[o]+C*i[o]+T*r[o]+k*e[o]))/1e3;return D},getPointInSegment:function(t,e,i,r,s,a){var n=M(s,a),o=1-n;return[Math.round(1e3*(o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*i[0]+(n*n*o+o*n*n+n*o*n)*r[0]+n*n*n*e[0]))/1e3,Math.round(1e3*(o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*i[1]+(n*n*o+o*n*n+n*o*n)*r[1]+n*n*n*e[1]))/1e3]},buildBezierData:t,pointOnLine2D:y,pointOnLine3D:function(t,e,i,r,s,a,n,o,h){if(0===i&&0===a&&0===h)return y(t,e,r,s,n,o);var l,p=Math.sqrt(Math.pow(r-t,2)+Math.pow(s-e,2)+Math.pow(a-i,2)),m=Math.sqrt(Math.pow(n-t,2)+Math.pow(o-e,2)+Math.pow(h-i,2)),f=Math.sqrt(Math.pow(n-r,2)+Math.pow(o-s,2)+Math.pow(h-a,2));return-1e-4<(l=m<p?f<p?p-m-f:f-m-p:m<f?f-m-p:m-p-f)&&l<1e-4}}}!function(){for(var a=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,e){var i=(new Date).getTime(),r=Math.max(0,16-(i-a)),s=setTimeout(function(){t(i+r)},r);return a=i+r,s}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction();function dataFunctionManager(){function m(t,e,i){var r,s,a,n,o,h,l=t.length;for(s=0;s<l;s+=1)if("ks"in(r=t[s])&&!r.completed){if(r.completed=!0,r.tt&&(t[s-1].td=r.tt),[],-1,r.hasMask){var p=r.masksProperties;for(n=p.length,a=0;a<n;a+=1)if(p[a].pt.k.i)d(p[a].pt.k);else for(h=p[a].pt.k.length,o=0;o<h;o+=1)p[a].pt.k[o].s&&d(p[a].pt.k[o].s[0]),p[a].pt.k[o].e&&d(p[a].pt.k[o].e[0])}0===r.ty?(r.layers=f(r.refId,e),m(r.layers,e,i)):4===r.ty?c(r.shapes):5==r.ty&&u(r,i)}}function f(t,e){for(var i=0,r=e.length;i<r;){if(e[i].id===t)return e[i].layers.__used?JSON.parse(JSON.stringify(e[i].layers)):(e[i].layers.__used=!0,e[i].layers);i+=1}}function c(t){var e,i,r;for(e=t.length-1;0<=e;e-=1)if("sh"==t[e].ty){if(t[e].ks.k.i)d(t[e].ks.k);else for(r=t[e].ks.k.length,i=0;i<r;i+=1)t[e].ks.k[i].s&&d(t[e].ks.k[i].s[0]),t[e].ks.k[i].e&&d(t[e].ks.k[i].e[0]);!0}else"gr"==t[e].ty&&c(t[e].it)}function d(t){var e,i=t.i.length;for(e=0;e<i;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function o(t,e){var i=e?e.split("."):[100,100,100];return t[0]>i[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&void 0))}var h,i=function(){var r=[4,4,14];function s(t){var e,i,r,s=t.length;for(e=0;e<s;e+=1)5===t[e].ty&&(i=t[e],void 0,r=i.t.d,i.t.d={k:[{s:r,t:0}]})}return function(t){if(o(r,t.v)&&(s(t.layers),t.assets)){var e,i=t.assets.length;for(e=0;e<i;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),r=(h=[4,7,99],function(t){if(t.chars&&!o(h,t.v)){var e,i,r,s,a,n=t.chars.length;for(e=0;e<n;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(r=(a=t.chars[e].data.shapes[0].it).length,i=0;i<r;i+=1)(s=a[i].ks.k).__converted||(d(a[i].ks.k),s.__converted=!0)}}),s=function(){var r=[4,1,9];function a(t){var e,i,r,s=t.length;for(e=0;e<s;e+=1)if("gr"===t[e].ty)a(t[e].it);else if("fl"===t[e].ty||"st"===t[e].ty)if(t[e].c.k&&t[e].c.k[0].i)for(r=t[e].c.k.length,i=0;i<r;i+=1)t[e].c.k[i].s&&(t[e].c.k[i].s[0]/=255,t[e].c.k[i].s[1]/=255,t[e].c.k[i].s[2]/=255,t[e].c.k[i].s[3]/=255),t[e].c.k[i].e&&(t[e].c.k[i].e[0]/=255,t[e].c.k[i].e[1]/=255,t[e].c.k[i].e[2]/=255,t[e].c.k[i].e[3]/=255);else t[e].c.k[0]/=255,t[e].c.k[1]/=255,t[e].c.k[2]/=255,t[e].c.k[3]/=255}function s(t){var e,i=t.length;for(e=0;e<i;e+=1)4===t[e].ty&&a(t[e].shapes)}return function(t){if(o(r,t.v)&&(s(t.layers),t.assets)){var e,i=t.assets.length;for(e=0;e<i;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}(),a=function(){var r=[4,4,18];function l(t){var e,i,r;for(e=t.length-1;0<=e;e-=1)if("sh"==t[e].ty){if(t[e].ks.k.i)t[e].ks.k.c=t[e].closed;else for(r=t[e].ks.k.length,i=0;i<r;i+=1)t[e].ks.k[i].s&&(t[e].ks.k[i].s[0].c=t[e].closed),t[e].ks.k[i].e&&(t[e].ks.k[i].e[0].c=t[e].closed);!0}else"gr"==t[e].ty&&l(t[e].it)}function s(t){var e,i,r,s,a,n,o=t.length;for(i=0;i<o;i+=1){if((e=t[i]).hasMask){var h=e.masksProperties;for(s=h.length,r=0;r<s;r+=1)if(h[r].pt.k.i)h[r].pt.k.c=h[r].cl;else for(n=h[r].pt.k.length,a=0;a<n;a+=1)h[r].pt.k[a].s&&(h[r].pt.k[a].s[0].c=h[r].cl),h[r].pt.k[a].e&&(h[r].pt.k[a].e[0].c=h[r].cl)}4===e.ty&&l(e.shapes)}}return function(t){if(o(r,t.v)&&(s(t.layers),t.assets)){var e,i=t.assets.length;for(e=0;e<i;e+=1)t.assets[e].layers&&s(t.assets[e].layers)}}}();function u(t,e){0!==t.t.a.length||"m"in t.t.p||(t.singleShape=!0)}var t={completeData:function(t,e){t.__complete||(s(t),i(t),r(t),a(t),m(t.layers,t.assets,e),t.__complete=!0)}};return t.checkColors=s,t.checkChars=r,t.checkShapes=a,t.completeLayers=m,t}var dataManager=dataFunctionManager(),FontManager=function(){var a={w:0,size:0,shapes:[]},t=[];function u(t,e){var i=createTag("span");i.style.fontFamily=e;var r=createTag("span");r.innerText="giItT1WQy@!-/#",i.style.position="absolute",i.style.left="-10000px",i.style.top="-10000px",i.style.fontSize="300
10286px",i.style.fontVariant="normal",i.style.fontStyle="normal",i.style.fontWeight="normal",i.style.letterSpacing="0",i.appendChild(r),document.body.appendChild(i);var s=r.offsetWidth;return r.style.fontFamily=function(t){var e,i=t.split(","),r=i.length,s=[];for(e=0;e<r;e+=1)"sans-serif"!==i[e]&&"monospace"!==i[e]&&s.push(i[e]);return s.join(",")}(t)+", "+e,{node:r,w:s,parent:i}}t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var e=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return e.getCombinedCharacterCodes=function(){return t},e.prototype={addChars:function(t){if(t){this.chars||(this.chars=[]);var e,i,r,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(i=0,r=!1;i<a;)this.chars[i].style===t[e].style&&this.chars[i].fFamily===t[e].fFamily&&this.chars[i].ch===t[e].ch&&(r=!0),i+=1;r||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var i,r,s,a,n=t.list,o=n.length,h=o;for(i=0;i<o;i+=1){var l,p,m=!0;if(n[i].loaded=!1,n[i].monoCase=u(n[i].fFamily,"monospace"),n[i].sansCase=u(n[i].fFamily,"sans-serif"),n[i].fPath){if("p"===n[i].fOrigin||3===n[i].origin){if(0<(l=document.querySelectorAll('style[f-forigin="p"][f-family="'+n[i].fFamily+'"], style[f-origin="3"][f-family="'+n[i].fFamily+'"]')).length&&(m=!1),m){var f=createTag("style");f.setAttribute("f-forigin",n[i].fOrigin),f.setAttribute("f-origin",n[i].origin),f.setAttribute("f-family",n[i].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+n[i].fFamily+"; font-style: normal; src: url('"+n[i].fPath+"');}",e.appendChild(f)}}else if("g"===n[i].fOrigin||1===n[i].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),p=0;p<l.length;p++)-1!==l[p].href.indexOf(n[i].fPath)&&(m=!1);if(m){var c=createTag("link");c.setAttribute("f-forigin",n[i].fOrigin),c.setAttribute("f-origin",n[i].origin),c.type="text/css",c.rel="stylesheet",c.href=n[i].fPath,document.body.appendChild(c)}}else if("t"===n[i].fOrigin||2===n[i].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),p=0;p<l.length;p++)n[i].fPath===l[p].src&&(m=!1);if(m){var d=createTag("link");d.setAttribute("f-forigin",n[i].fOrigin),d.setAttribute("f-origin",n[i].origin),d.setAttribute("rel","stylesheet"),d.setAttribute("href",n[i].fPath),e.appendChild(d)}}}else n[i].loaded=!0,h-=1;n[i].helper=(r=e,s=n[i],a=void 0,(a=createNS("text")).style.fontSize="100px",a.setAttribute("font-family",s.fFamily),a.setAttribute("font-style",s.fStyle),a.setAttribute("font-weight",s.fWeight),a.textContent="1",s.fClass?(a.style.fontFamily="inherit",a.setAttribute("class",s.fClass)):a.style.fontFamily=s.fFamily,r.appendChild(a),createTag("canvas").getContext("2d").font=s.fWeight+" "+s.fStyle+" 100px "+s.fFamily,a),n[i].cache={},this.fonts.push(n[i])}0===h?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,e,i){for(var r=0,s=this.chars.length;r<s;){if(this.chars[r].ch===t&&this.chars[r].style===e&&this.chars[r].fFamily===i)return this.chars[r];r+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,i)),a},getFontByName:function(t){for(var e=0,i=this.fonts.length;e<i;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,i){var r=this.getFontByName(e),s=t.charCodeAt(0);if(!r.cache[s+1]){var a=r.helper;if(" "===t){a.textContent="|"+t+"|";var n=a.getComputedTextLength();a.textContent="||";var o=a.getComputedTextLength();r.cache[s+1]=(n-o)/100}else a.textContent=t,r.cache[s+1]=a.getComputedTextLength()/100}return r.cache[s+1]*i},checkLoadedFonts:function(){var t,e,i,r=this.fonts.length,s=r;for(t=0;t<r;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,e.offsetWidth!==i?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,e.offsetWidth!==i&&(s-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},e}(),PropertyFactory=function(){var m=initialDefaultFrame,s=Math.abs;function f(t,e){var i,r=this.offsetTime;"multidimensional"===this.propType&&(i=createTypedArray("float32",this.pv.length));
vendor: 4,644 bytes, line 10286
10286for(var s,a,n,o,h,l,p,m,f=e.lastIndex,c=f,d=this.keyframes.length-1,u=!0;u;){if(s=this.keyframes[c],a=this.keyframes[c+1],c===d-1&&t>=a.t-r){s.h&&(s=a),f=0;break}if(a.t-r>t){f=c;break}c<d-1?c+=1:(f=0,u=!1)}var y,g,v,b,E,x,P,S,_,A,C=a.t-r,T=s.t-r;if(s.to){s.bezierData||(s.bezierData=bez.buildBezierData(s.s,a.s||s.e,s.to,s.ti));var k=s.bezierData;if(C<=t||t<T){var M=C<=t?k.points.length-1:0;for(o=k.points[M].point.length,n=0;n<o;n+=1)i[n]=k.points[M].point[n]}else{s.__fnct?m=s.__fnct:(m=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,s.__fnct=m),h=m((t-T)/(C-T));var D,F=k.segmentLength*h,w=e.lastFrame<t&&e._lastKeyframeIndex===c?e._lastAddedLength:0;for(p=e.lastFrame<t&&e._lastKeyframeIndex===c?e._lastPoint:0,u=!0,l=k.points.length;u;){if(w+=k.points[p].partialLength,0===F||0===h||p===k.points.length-1){for(o=k.points[p].point.length,n=0;n<o;n+=1)i[n]=k.points[p].point[n];break}if(w<=F&&F<w+k.points[p+1].partialLength){for(D=(F-w)/k.points[p+1].partialLength,o=k.points[p].point.length,n=0;n<o;n+=1)i[n]=k.points[p].point[n]+(k.points[p+1].point[n]-k.points[p].point[n])*D;break}p<l-1?p+=1:u=!1}e._lastPoint=p,e._lastAddedLength=w-k.points[p].partialLength,e._lastKeyframeIndex=c}}else{var I,V,B,R,L;if(d=s.s.length,y=a.s||s.e,this.sh&&1!==s.h)if(C<=t)i[0]=y[0],i[1]=y[1],i[2]=y[2];else if(t<=T)i[0]=s.s[0],i[1]=s.s[1],i[2]=s.s[2];else{var G=N(s.s),z=N(y);g=i,v=function(t,e,i){var r,s,a,n,o,h=[],l=t[0],p=t[1],m=t[2],f=t[3],c=e[0],d=e[1],u=e[2],y=e[3];(s=l*c+p*d+m*u+f*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y);o=1e-6<1-s?(r=Math.acos(s),a=Math.sin(r),n=Math.sin((1-i)*r)/a,Math.sin(i*r)/a):(n=1-i,i);return h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*m+o*u,h[3]=n*f+o*y,h}(G,z,(t-T)/(C-T)),b=v[0],E=v[1],x=v[2],P=v[3],S=Math.atan2(2*E*P-2*b*x,1-2*E*E-2*x*x),_=Math.asin(2*b*E+2*x*P),A=Math.atan2(2*b*P-2*E*x,1-2*b*b-2*x*x),g[0]=S/degToRads,g[1]=_/degToRads,g[2]=A/degToRads}else for(c=0;c<d;c+=1)1!==s.h&&(h=C<=t?1:t<T?0:(s.o.x.constructor===Array?(s.__fnct||(s.__fnct=[]),s.__fnct[c]?m=s.__fnct[c]:(I=void 0===s.o.x[c]?s.o.x[0]:s.o.x[c],V=void 0===s.o.y[c]?s.o.y[0]:s.o.y[c],B=void 0===s.i.x[c]?s.i.x[0]:s.i.x[c],R=void 0===s.i.y[c]?s.i.y[0]:s.i.y[c],m=BezierFactory.getBezierEasing(I,V,B,R).get,s.__fnct[c]=m)):s.__fnct?m=s.__fnct:(I=s.o.x,V=s.o.y,B=s.i.x,R=s.i.y,m=BezierFactory.getBezierEasing(I,V,B,R).get,s.__fnct=m),m((t-T)/(C-T)))),y=a.s||s.e,L=1===s.h?s.s[c]:s.s[c]+(y[c]-s.s[c])*h,"multidimensional"===this.propType?i[c]=L:i=L}return e.lastIndex=f,i}function N(t){var e=t[0]*degToRads,i=t[1]*degToRads,r=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(i/2),n=Math.cos(r/2),o=Math.sin(e/2),h=Math.sin(i/2),l=Math.sin(r/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function c(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==m&&(this._caching.lastFrame>=i&&i<=t||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(t,this._caching);this.pv=r}return this._caching.lastFrame=t,this.pv}function d(t){var e;if("unidimensional"===this.propType)e=t*this.mult,1e-5<s(this.v-e)&&(this.v=e,this._mdf=!0);else for(var i=0,r=this.v.length;i<r;)e=t[i]*this.mult,1e-5<s(this.v[i]-e)&&(this.v[i]=e,this._mdf=!0),i+=1}function u(){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,i=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)i=this.effectsSequence[t](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function y(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function n(t,e,i,r){this.propType="unidimensional",this.mult=i||1,this.data=e,this.v=i?e.k*i:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=r,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.addEffect=y}function o(t,e,i,r){this.propType="multidimensional",this.mult=i||1,this.data=e,this._mdf=!1,this.elem=t,this.container=r,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var s,a=e.k.length;this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a);createTypedArray("float32",a);for(this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=u,this.setVValue=d,this.addEffect=y}
vendor: 4,499 bytes, line 10286
10286function h(t,e,i,r){this.propType="unidimensional",this.keyframes=e.k,this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:m,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=i||1,this.elem=t,this.container=r,this.comp=t.comp,this.v=m,this.pv=m,this._isFirstFrame=!0,this.getValue=u,this.setVValue=d,this.interpolateValue=f,this.effectsSequence=[c.bind(this)],this.addEffect=y}function l(t,e,i,r){this.propType="multidimensional";var s,a,n,o,h,l=e.k.length;for(s=0;s<l-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(a=e.k[s].s,n=e.k[s+1].s,o=e.k[s].to,h=e.k[s].ti,(2===a.length&&(a[0]!==n[0]||a[1]!==n[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||3===a.length&&(a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(e.k[s].to=null,e.k[s].ti=null),a[0]===n[0]&&a[1]===n[1]&&0===o[0]&&0===o[1]&&0===h[0]&&0===h[1]&&(2===a.length||a[2]===n[2]&&0===o[2]&&0===h[2])&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[c.bind(this)],this.data=e,this.keyframes=e.k,this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=t,this.container=r,this.comp=t.comp,this.getValue=u,this.setVValue=d,this.interpolateValue=f,this.frameId=-1;var p=e.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=m,this.pv[s]=m;this._caching={lastFrame:m,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=y}return{getProp:function(t,e,i,r,s){var a;if(e.k.length)if("number"==typeof e.k[0])a=new o(t,e,r,s);else switch(i){case 0:a=new h(t,e,r,s);break;case 1:a=new l(t,e,r,s)}else a=new n(t,e,r,s);return a.effectsSequence.length&&s.addDynamicProperty(a),a}}}(),TransformPropertyFactory=function(){var n=[0,0];function r(t,e,i){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(i||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var r,s=e.or.k.length;for(r=0;r<s;r+=1)e.or.k[r].to=e.or.k[r].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return r.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.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.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.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.autoOr
vendor: 3,414 bytes, line 10286
10286iented){var e,i,r=this.elem.globalData.frameRate;if(this.p&&this.p.keyframes&&this.p.getValueAtTime)i=this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(e=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/r,0),this.p.getValueAtTime(this.p.keyframes[0].t/r,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(e=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(e=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){e=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(e[0]=s.getValueAtTime((s.keyframes[0].t+.01)/r,0),e[1]=a.getValueAtTime((a.keyframes[0].t+.01)/r,0),i[0]=s.getValueAtTime(s.keyframes[0].t/r,0),i[1]=a.getValueAtTime(a.keyframes[0].t/r,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(e[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/r,0),e[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/r,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/r,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/r,0)):(e=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/r,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/r,a.offsetTime))}else e=i=n;this.v.rotate(-Math.atan2(e[1]-i[1],e[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],r),r.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},r.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,e,i){return new r(t,e,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 i=0;i<e;)this.v[i]=point_pool.newElement(),this.o[i]=point_pool.newElement(),this.i[i]=point_pool.newElement(),i+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;
vendor: 6,192 bytes, line 10286
10286)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,i,r,s){var a;switch(this._length=Math.max(this._length,r+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o}(!a[r]||a[r]&&!s)&&(a[r]=point_pool.newElement()),a[r][0]=t,a[r][1]=e},ShapePath.prototype.setTripleAt=function(t,e,i,r,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,r,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,i=this.o,r=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],r[0][0],r[0][1],i[0][0],i[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a<o;a+=1)t.setTripleAt(e[n][0],e[n][1],r[n][0],r[n][1],i[n][0],i[n][1],a,!1),n-=1;return t};var ShapePropertyFactory=function(){var s=-999999;function t(t,e,i){var r,s,a,n,o,h,l,p,m,f=i.lastIndex,c=this.keyframes;if(t<c[0].t-this.offsetTime)r=c[0].s[0],a=!0,f=0;else if(t>=c[c.length-1].t-this.offsetTime)r=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y=f,g=c.length-1,v=!0;v&&(d=c[y],!((u=c[y+1]).t-this.offsetTime>t));)y<g-1?y+=1:v=!1;if(f=y,!(a=1===d.h)){if(t>=u.t-this.offsetTime)p=1;else if(t<d.t-this.offsetTime)p=0;else{var b;d.__fnct?b=d.__fnct:(b=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,d.__fnct=b),p=b((t-(d.t-this.offsetTime))/(u.t-this.offsetTime-(d.t-this.offsetTime)))}s=u.s?u.s[0]:d.e[0]}r=d.s[0]}for(h=e._length,l=r.i[0].length,i.lastIndex=f,n=0;n<h;n+=1)for(o=0;o<l;o+=1)m=a?r.i[n][o]:r.i[n][o]+(s.i[n][o]-r.i[n][o])*p,e.i[n][o]=m,m=a?r.o[n][o]:r.o[n][o]+(s.o[n][o]-r.o[n][o])*p,e.o[n][o]=m,m=a?r.v[n][o]:r.v[n][o]+(s.v[n][o]-r.v[n][o])*p,e.v[n][o]=m}function a(){this.paths=this.localShapeCollection}function e(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var i,r=t._length;for(i=0;i<r;i+=1)if(t.v[i][0]!==e.v[i][0]||t.v[i][1]!==e.v[i][1]||t.o[i][0]!==e.o[i][0]||t.o[i][1]!==e.o[i][1]||t.i[i][0]!==e.i[i][0]||t.i[i][1]!==e.i[i][1])return!1;return!0})(this.v,t)||(this.v=shape_pool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function i(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{this.lock=!0,this._mdf=!1;var t,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k,i=this.effectsSequence.length;for(t=0;t<i;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function n(t,e,i){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var r=3===i?e.pt.k:e.ks.k;this.v=shape_pool.clone(r),this.pv=shape_pool.clone(this.v),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function r(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function o(t,e,i){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===i?e.pt.k:e.ks.k,this.k=!0,this.kf=!0;var r=this.keyframes[0].s[0].i.length;this.keyframes[0].s[0].i[0].length;this.v=shape_pool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,r),this.pv=shape_pool.clone(this.v),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=a,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[function(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;return r!==s&&(r<e&&t<e||i<r&&i<t)||(this._caching.lastIndex=r<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}.bind(this)]}n.prototype.interpolateShape=t,n.prototype.getValue=i,n.prototype.setVValue=e,n.prototype.addEffect=r,o.prototype.getValue=i,o.prototype.interpolateShape=t,o.prototype.setVValue=e,o.prototype.addEffect=r;var h=function(){var n=roundCorner;function t(t,e){this.v=shape_pool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,r=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-r,a.v[1][0]=s?t+i:t-i,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+r,a.v[3][0]=s?t-i:t+i,a.v[3][1]=e,a.i[0][0]=s?t-i*n:t+i*n,a.i[0][1]=e-r,a.i[1][0]=s?t+i:t-i,a.i[1][1]=e-r*n,a.i[2][0]=s?t+i*n:t-i*n,a.i[2][1]=e+r,a.i[3][0]=s?t-i:t+i,a.i[3][1]=e+r*n,a.o[0][0]=s?t+i*n:t-i*n,a.o[0][1]=e-r,a.o[1][0]=s?t+i:t-i,a.o[1][1]=e+r*n,a.o[2][0]=s?t-i*n:t+i*n,a.o[2][1]=e+r,a.o[3][0]=s?t-i:t+i,a.o[3][1]=e-r*n}},extendPrototype([DynamicPropertyContainer],t),t}(),l=function(){function t(t,e){this.v=shape_pool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=Pro
vendor: 2,522 bytes, line 10286
10286pertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,i,r,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,m=2*Math.PI*o/(2*s),f=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(t=this.v._length=0;t<s;t+=1){i=n?l:p,r=n?m:f;var u=(e=n?o:h)*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*r*i*d,y-v*r*i*d,u+g*r*i*d,y+v*r*i*d,t,!0),n=!n,c+=a*d}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),i=2*Math.PI/e,r=this.or.v,s=this.os.v,a=2*Math.PI*r/(4*e),n=-Math.PI/2,o=3===this.data.d?-1:1;for(n+=this.r.v,t=this.v._length=0;t<e;t+=1){var h=r*Math.cos(n),l=r*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),m=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-m*a*s*o,h+p*a*s*o,l+m*a*s*o,t,!0),n+=i*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),p=function(){function t(t,e){this.v=shape_pool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,r=this.s.v[1]/2,s=bm_min(i,r,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+i,e-r+s,t+i,e-r+s,t+i,e-r+a,0,!0),this.v.setTripleAt(t+i,e+r-s,t+i,e+r-a,t+i,e+r-s,
vendor: 4,262 bytes, line 10286
102861,!0),0!==s?(this.v.setTripleAt(t+i-s,e+r,t+i-s,e+r,t+i-a,e+r,2,!0),this.v.setTripleAt(t-i+s,e+r,t-i+a,e+r,t-i+s,e+r,3,!0),this.v.setTripleAt(t-i,e+r-s,t-i,e+r-s,t-i,e+r-a,4,!0),this.v.setTripleAt(t-i,e-r+s,t-i,e-r+a,t-i,e-r+s,5,!0),this.v.setTripleAt(t-i+s,e-r,t-i+s,e-r,t-i+a,e-r,6,!0),this.v.setTripleAt(t+i-s,e-r,t+i-a,e-r,t+i-s,e-r,7,!0)):(this.v.setTripleAt(t-i,e+r,t-i+a,e+r,t-i,e+r,2),this.v.setTripleAt(t-i,e-r,t-i,e-r+a,t-i,e-r,3))):(this.v.setTripleAt(t+i,e-r+s,t+i,e-r+a,t+i,e-r+s,0,!0),0!==s?(this.v.setTripleAt(t+i-s,e-r,t+i-s,e-r,t+i-a,e-r,1,!0),this.v.setTripleAt(t-i+s,e-r,t-i+a,e-r,t-i+s,e-r,2,!0),this.v.setTripleAt(t-i,e-r+s,t-i,e-r+s,t-i,e-r+a,3,!0),this.v.setTripleAt(t-i,e+r-s,t-i,e+r-a,t-i,e+r-s,4,!0),this.v.setTripleAt(t-i+s,e+r,t-i+s,e+r,t-i+a,e+r,5,!0),this.v.setTripleAt(t+i-s,e+r,t+i-a,e+r,t+i-s,e+r,6,!0),this.v.setTripleAt(t+i,e+r-s,t+i,e+r-s,t+i,e+r-a,7,!0)):(this.v.setTripleAt(t-i,e-r,t-i+a,e-r,t-i,e-r,1,!0),this.v.setTripleAt(t-i,e+r,t-i,e+r-a,t-i,e+r,2,!0),this.v.setTripleAt(t+i,e+r,t+i-a,e+r,t+i,e+r,3,!0)))},getValue:function(t){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],t),t}();var m={getShapeProp:function(t,e,i){var r;return 3===i||4===i?r=(3===i?e.pt:e.ks).k.length?new o(t,e,i):new n(t,e,i):5===i?r=new p(t,e):6===i?r=new h(t,e):7===i&&(r=new l(t,e)),r.k&&t.addDynamicProperty(r),r},getConstructorFunction:function(){return n},getKeyframedConstructorFunction:function(){return o}};return m}(),ShapeModifiers=(fs={},gs={},fs.registerModifier=function(t,e){gs[t]||(gs[t]=e)},fs.getModifier=function(t,e,i){return new gs[t](e,i)},fs),fs,gs;function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function PuckerAndBloatModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}function DashProperty(t,e,i,r){this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(r);var s,a,n=e.length||0;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function GradientProperty(t,e,i){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var r=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",r),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=r,this.initDynamicPropertyContainer(i),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollection_pool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]}
vendor: 6,130 bytes, line 10286
10286,TrimModifier.prototype.calculateShapeEdges=function(t,e,i,r,s){var a=[];e<=1?a.push({s:t,e:e}):1<=t?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1){var p,m;if((o=a[n]).e*s<r||o.s*s>r+i);else p=o.s*s<=r?0:(o.s*s-r)/i,m=o.e*s>=r+i?1:(o.e*s-r)/i,h.push([p,m])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e<i;e+=1)segments_length_pool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,i,r;if(this._mdf||t){var s=this.o.v%360/360;if(s<0&&(s+=1),e=(1<this.s.v?1:this.s.v<0?0:this.s.v)+s,(i=(1<this.e.v?1:this.e.v<0?0:this.e.v)+s)<e){var a=e;e=i,i=a}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var n,o,h,l,p,m,f=this.shapes.length,c=0;if(i===e)for(n=0;n<f;n+=1)this.shapes[n].localShapeCollection.releaseShapes(),this.shapes[n].shape._mdf=!0,this.shapes[n].shape.paths=this.shapes[n].localShapeCollection,this._mdf&&(this.shapes[n].pathsData.length=0);else if(1===i&&0===e||0===i&&1===e){if(this._mdf)for(n=0;n<f;n+=1)this.shapes[n].pathsData.length=0,this.shapes[n].shape._mdf=!0}else{var d,u,y=[];for(n=0;n<f;n+=1)if((d=this.shapes[n]).shape._mdf||this._mdf||t||2===this.m){if(h=(r=d.shape.paths)._length,m=0,!d.shape._mdf&&d.pathsData.length)m=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(r.shapes[o]),l.push(p),m+=p.totalLength;d.totalShapeLength=m,d.pathsData=l}c+=m,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=i,E=0;for(n=f-1;0<=n;n-=1)if((d=this.shapes[n]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&1<f?(g=this.calculateShapeEdges(e,i,d.totalShapeLength,E,c),E+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):1<=v?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var x=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(1<y.length)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var P=x.pop();this.addPaths(x,u),x=this.addShapes(d,y[1],P)}else this.addPaths(x,u),x=this.addShapes(d,y[1]);this.addPaths(x,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)e.addShape(t[i])},TrimModifier.prototype.addSegment=function(t,e,i,r,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(i[0],i[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(r[0],r[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,i,r){e.setXYAt(t[1],t[5],"o",i),e.setXYAt(t[2],t[6],"i",i+1),r&&e.setXYAt(t[0],t[4],"v",i),e.setXYAt(t[3],t[7],"v",i+1)},TrimModifier.prototype.addShapes=function(t,e,i){var r,s,a,n,o,h,l,p,m=t.pathsData,f=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(p=i?(o=i._length,i._length):(i=shape_pool.newElement(),o=0),u.push(i),r=0;r<c;r+=1){for(h=m[r].lengths,i.c=f[r].c,a=f[r].c?h.length:h.length+1,s=1;s<a;s+=1)if(d+(n=h[s-1]).addedLength<e.s)d+=n.addedLength,i.c=!1;else{if(d>e.e){i.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[r].v[s-1],f[r].o[s-1],f[r].i[s],f[r].v[s],i,o,y),y=!1):(l=bez.getNewSegment(f[r].v[s-1],f[r].v[s],f[r].o[s-1],f[r].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1),d+=n.addedLength,o+=1}if(f[r].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[r].v[s-1],f[r].o[s-1],f[r].i[0],f[r].v[0],i,o,y),y=!1):(l=bez.getNewSegment(f[r].v[s-1],f[r].v[0],f[r].o[s-1],f[r].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1)}else i.c=!1;d+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),d>e.e)break;r<c-1&&(i=shape_pool.newElement(),y=!0,u.push(i),o=0)}return u},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var i=shape_pool.newElement();i.c=t.c;var r,s,a,n,o,h,l,p,m,f,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,m=u=s[1]-(s[1]-o[1])*l,f=p-(p-s[0])*roundCorner,c=m-(m-s[1])*roundCorner,i.setTripleAt(p,m,f,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],l=(h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=f=s[0]+(o[0]-s[0])*l,m=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=m-(m-s[1])*roundCorner,i.setTripleAt(p,m,f,c,d,u,g)):i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g):i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1;return i},RoundCornersModifier.prototype.processShapes=function(t){var e,i,r,s,a,n,o=this.shapes.length,h=this.rd.v;if(0!==h)for(i=0;i<o;i+=1){if((a=this.shapes[i]).shape.paths,n=a.localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,r=0;r<s;r+=1)n.addShape(this.processPath(e[r],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var i=e/100,r=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)r[0]+=t.v[a][0],r[1]+=t.v[a][1];r[0]/=s,r[1]/=s;
vendor: 7,038 bytes, line 10286
10286var n,o,h,l,p,m,f=shape_pool.newElement();for(f.c=t.c,a=0;a<s;a+=1)n=t.v[a][0]+(r[0]-t.v[a][0])*i,o=t.v[a][1]+(r[1]-t.v[a][1])*i,h=t.o[a][0]+(r[0]-t.o[a][0])*-i,l=t.o[a][1]+(r[1]-t.o[a][1])*-i,p=t.i[a][0]+(r[0]-t.i[a][0])*-i,m=t.i[a][1]+(r[1]-t.i[a][1])*-i,f.setTripleAt(n,o,h,l,p,m,a);return f},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,i,r,s,a,n,o=this.shapes.length,h=this.amount.v;if(0!==h)for(i=0;i<o;i+=1){if((a=this.shapes[i]).shape.paths,n=a.localShapeCollection,a.shape._mdf||this._mdf||t)for(n.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,r=0;r<s;r+=1)n.addShape(this.processPath(e[r],h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,i,r,s,a){var n=a?-1:1,o=r.s.v[0]+(1-r.s.v[0])*(1-s),h=r.s.v[1]+(1-r.s.v[1])*(1-s);t.translate(r.p.v[0]*n*s,r.p.v[1]*n*s,r.p.v[2]),e.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),e.rotate(-r.r.v*n*s),e.translate(r.a.v[0],r.a.v[1],r.a.v[2]),i.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),i.scale(a?1/o:o,a?1/h:h),i.translate(r.a.v[0],r.a.v[1],r.a.v[2])},RepeaterModifier.prototype.init=function(t,e,i,r){this.elem=t,this.arr=e,this.pos=i,this.elemsData=r,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[i]);for(;0<i;)i-=1,this._elements.unshift(e[i]),1;this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){t.length;var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)t[i]._render=e,"gr"===t[i].ty&&this.changeGroupRender(t[i].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,i,r,s,a;if(this._mdf||t){var n,o=Math.ceil(this.c.v);if(this._groups.length<o){for(;this._groups.length<o;){var h={it:this.cloneElements(this._elements),ty:"gr"};h.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,h),this._groups.splice(0,0,h),this._currentCopies+=1}this.elem.reloadShapes()}for(r=a=0;r<=this._groups.length-1;r+=1)n=a<o,this._groups[r]._render=n,this.changeGroupRender(this._groups[r].it,n),a+=1;this._currentCopies=o;var l=this.o.v,p=l%1,m=0<l?Math.floor(l):Math.ceil(l),f=(this.tr.v.props,this.pMatrix.props),c=this.rMatrix.props,d=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var u,y,g=0;if(0<l){for(;g<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),g+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),g+=p)}else if(l<0){for(;m<g;)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(r=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(y=(i=(e=this.elemsData[r].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)*(r/(this._currentCopies-1)),0!==g){for((0!==r&&1===s||r!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),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(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]),u=0;u<y;u+=1)i[u]=this.matrix.props[u];this.matrix.reset()}else for(this.matrix.reset(),u=0;u<y;u+=1)i[u]=this.matrix.props[u];g+=1,a-=1,r+=s}}else for(a=this._currentCopies,r=0,s=1;a;)i=(e=this.elemsData[r].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,r+=s},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shape_pool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,i=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<i;e+=1)"o"!=this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),GradientProperty.prototype.comparePoints=function(t,e){for(var i=0,r=this.o.length/2;i<r;){if(.01<Math.abs(t[4*i]-t[4*e+2*i]))return!1;i+=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<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,i,r,s=4*this.data.p;for(e=0;e<s;e+=1)i=e%4==0?100:255,r=Math.round(this.prop.v[e]*i),this.c[e]!==r&&(this.c[e]=r,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)i=e%2==0?100:1,r=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==r&&(this.o[e-4*this.data.p]=r,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);
10286var buildShapeString=function(t,e,i,r){if(0===e)return"";var s,a=t.o,n=t.i,o=t.v,h=" M"+r.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<e;s+=1)h+=" C"+r.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+r.applyToPointStringified(n[s][0],n[s][1])+" "+r.applyToPointStringified(o[s][0],o[s][1]);return i&&e&&(h+=" C"+r.applyToPointStringified(a[s-1][0],a[s-1][1])+" "+r.applyToPointStringified(n[0][0],n[0][1])+" "+r.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,i=this.audios.length;for(e=0;e<i;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(t){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ImagePreloader=function(){var s=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(t,e,i){var r="";if(t.e)r=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),r=e+s}else r=i,r+=t.u?t.u:"",r+=t.p;return r}function t(t){this._imageLoaded=e.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.loadedAssets=0,this.imagesLoadedCb=null,this.images=[]}return t.prototype={loadAssets:function(t,e){this.imagesLoadedCb=e;var i,r=t.length;for(i=0;i<r;i+=1)t[i].layers||(this.totalImages+=1,this.images.push(this._createImageData(t[i])))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loaded:function(){return this.totalImages===this.loadedAssets},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getImage:function(t){for(var e=0,i=this.images.length;e<i;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}},createImgData:function(t){var e=a(t,this.assetsPath,this.path),i=createTag("img");i.crossOrigin="anonymous",i.addEventListener("load",this._imageLoaded,!1),i.addEventListener("error",function(){r.img=s,this._imageLoaded()}.bind(this),!1),i.src=e;var r={img:i,assetData:t};return r},createImageData:function(t){var e=a(t,this.assetsPath,this.path),i=createNS("image");i.addEventListener("load",this._imageLoaded,!1),i.addEventListener("error",function(){r.img=s,this._imageLoaded()}.bind(this),!1),i.setAttributeNS("http://www.w3.org/1999/xlink","href",e);var r={img:i,assetData:t};return r},imageLoaded:e,setCacheType:function(t){this._createImageData="svg"===t?this.createImageData.bind(this):this.createImgData.bind(this)}},t}(),featureSupport=(ux={maskType:!0},(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(ux.maskType=!1),ux),ux,filtersFactory=(vx={},vx.createFilter=function(t){var e=createNS("filter");return e.setAttribute("id",t),e.setAttribute("filterUnits","objectBoundingBox"),e.setAttribute("x","0%"),e.setAttribute("y","0%"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e},vx.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t},vx),vx,assetLoader=function(){function a(t){return t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):void 0}
vendor: 4,216 bytes, line 10286
10286return{load:function(t,e,i){var r,s=new XMLHttpRequest;s.open("GET",t,!0);try{s.responseType="json"}catch(t){}s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)r=a(s),e(r);else try{r=a(s),e(r)}catch(t){i&&i(t)}}}}}();function TextAnimatorProperty(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function TextAnimatorDataProperty(t,e,i){var r={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,i):r,rx:a.rx?s(t,a.rx,0,degToRads,i):r,ry:a.ry?s(t,a.ry,0,degToRads,i):r,sk:a.sk?s(t,a.sk,0,degToRads,i):r,sa:a.sa?s(t,a.sa,0,degToRads,i):r,s:a.s?s(t,a.s,1,.01,i):r,a:a.a?s(t,a.a,1,0,i):r,o:a.o?s(t,a.o,0,.01,i):r,p:a.p?s(t,a.p,1,0,i):r,sw:a.sw?s(t,a.sw,0,0,i):r,sc:a.sc?s(t,a.sc,1,0,i):r,fc:a.fc?s(t,a.fc,1,0,i):r,fh:a.fh?s(t,a.fh,0,0,i):r,fs:a.fs?s(t,a.fs,0,.01,i):r,fb:a.fb?s(t,a.fb,0,.01,i):r,t:a.t?s(t,a.t,0,0,i):r},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function LetterProps(t,e,i,r,s,a){this.o=t,this.sw=e,this.sc=i,this.fc=r,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!r,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,r=PropertyFactory.getProp;for(t=0;t<i;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={f:r(this._elem,this._textData.p.f,0,0,this),l:r(this._elem,this._textData.p.l,0,0,this),r:this._textData.p.r,m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=r(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var i,r,s,a,n,o,h,l,p,m,f,c,d,u,y,g,v,b,E,x=this._moreOptions.alignment.v,P=this._animatorsData,S=this._textData,_=this.mHelper,A=this._renderType,C=this.renderedLetters.length,T=(this.data,t.l);if(this._hasMaskedPath){if(E=this._pathData.m,!this._pathData.n||this._pathData._mdf){var k,M=E.v;for(this._pathData.r&&(M=M.reverse()),n={tLength:0,segments:[]},a=M._length-1,s=g=0;s<a;s+=1)k=bez.buildBezierData(M.v[s],M.v[s+1],[M.o[s][0]-M.v[s][0],M.o[s][1]-M.v[s][1]],[M.i[s+1][0]-M.v[s+1][0],M.i[s+1][1]-M.v[s+1][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength;s=a,E.v.c&&(k=bez.buildBezierData(M.v[s],M.v[0],[M.o[s][0]-M.v[s][0],M.o[s][1]-M.v[s][1]],[M.i[0][0]-M.v[0][0],M.i[0][1]-M.v[0][1]]),n.tLength+=k.segmentLength,n.segments.push(k),g+=k.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,m=1,p=!(l=f=0),u=n.segments,o<0&&E.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),m=(d=u[f=u.length-1].points).length-1;o<0;)o+=d[m].partialLength,(m-=1)<0&&(m=(d=u[f-=1].points).length-1);c=(d=u[f].points)[m-1],y=(h=d[m]).partialLength}a=T.length,r=i=0;var D,F,w,I,V=1.2*t.finalSize*.714,B=!0;w=P.length;var R,L,G,z,N,O,H,j,q,W,Y,X,K,$=-1,Z=o,J=f,U=m,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var it=0,rt=0,st=2===t.j?-.5:-1,at=0,nt=!0;for(s=0;s<a;s+=1)if(T[s].n){for(it&&(it+=rt);at<s;)T[at].animatorJustifyOffset=it,at+=1;nt=!(it=0)}else{for(F=0;F<w;
vendor: 5,324 bytes, line 10286
10286F+=1)(D=P[F].a).t.propType&&(nt&&2===t.j&&(rt+=D.t.v*st),(R=P[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?it+=D.t.v*R[0]*st:it+=D.t.v*R*st);nt=!1}for(it&&(it+=rt);at<s;)T[at].animatorJustifyOffset=it,at+=1}for(s=0;s<a;s+=1){if(_.reset(),N=1,T[s].n)i=0,r+=t.yOffset,r+=B?1:0,o=Z,B=!1,0,this._hasMaskedPath&&(m=U,c=(d=u[f=J].points)[m-1],y=(h=d[m]).partialLength,l=0),K=W=X=tt="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==T[s].line){switch(t.j){case 1:o+=g-t.lineWidths[T[s].line];break;case 2:o+=(g-t.lineWidths[T[s].line])/2}Q=T[s].line}$!==T[s].ind&&(T[$]&&(o+=T[$].extra),o+=T[s].an/2,$=T[s].ind),o+=x[0]*T[s].an/200;var ot=0;for(F=0;F<w;F+=1)(D=P[F].a).p.propType&&((R=P[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?ot+=D.p.v[0]*R[0]:ot+=D.p.v[0]*R),D.a.propType&&((R=P[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?ot+=D.a.v[0]*R[0]:ot+=D.a.v[0]*R);for(p=!0;p;)o+ot<=l+y||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,_.translate(-x[0]*T[s].an/200,-x[1]*V/100),p=!1):d&&(l+=h.partialLength,(m+=1)>=d.length&&(m=0,d=u[f+=1]?u[f].points:E.v.c?u[f=m=0].points:(l-=h.partialLength,null)),d&&(c=h,y=(h=d[m]).partialLength));L=T[s].an/2-T[s].add,_.translate(-L,0,0)}else L=T[s].an/2-T[s].add,_.translate(-L,0,0),_.translate(-x[0]*T[s].an/200,-x[1]*V/100,0);for(T[s].l/2,F=0;F<w;F+=1)(D=P[F].a).t.propType&&(R=P[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),0===i&&0===t.j||(this._hasMaskedPath?R.length?o+=D.t.v*R[0]:o+=D.t.v*R:R.length?i+=D.t.v*R[0]:i+=D.t.v*R));for(T[s].l/2,t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(O=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(j=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<w;F+=1)(D=P[F].a).a.propType&&((R=P[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?_.translate(-D.a.v[0]*R[0],-D.a.v[1]*R[1],D.a.v[2]*R[2]):_.translate(-D.a.v[0]*R,-D.a.v[1]*R,D.a.v[2]*R));for(F=0;F<w;F+=1)(D=P[F].a).s.propType&&((R=P[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars)).length?_.scale(1+(D.s.v[0]-1)*R[0],1+(D.s.v[1]-1)*R[1],1):_.scale(1+(D.s.v[0]-1)*R,1+(D.s.v[1]-1)*R,1));for(F=0;F<w;F+=1){if(D=P[F].a,R=P[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),D.sk.propType&&(R.length?_.skewFromAxis(-D.sk.v*R[0],D.sa.v*R[1]):_.skewFromAxis(-D.sk.v*R,D.sa.v*R)),D.r.propType&&(R.length?_.rotateZ(-D.r.v*R[2]):_.rotateZ(-D.r.v*R)),D.ry.propType&&(R.length?_.rotateY(D.ry.v*R[1]):_.rotateY(D.ry.v*R)),D.rx.propType&&(R.length?_.rotateX(D.rx.v*R[0]):_.rotateX(D.rx.v*R)),D.o.propType&&(R.length?N+=(D.o.v*R[0]-N)*R[0]:N+=(D.o.v*R-N)*R),t.strokeWidthAnim&&D.sw.propType&&(R.length?H+=D.sw.v*R[0]:H+=D.sw.v*R),t.strokeColorAnim&&D.sc.propType)for(q=0;q<3;q+=1)R.length?O[q]=O[q]+(D.sc.v[q]-O[q])*R[0]:O[q]=O[q]+(D.sc.v[q]-O[q])*R;if(t.fillColorAnim&&t.fc){if(D.fc.propType)for(q=0;q<3;q+=1)R.length?j[q]=j[q]+(D.fc.v[q]-j[q])*R[0]:j[q]=j[q]+(D.fc.v[q]-j[q])*R;D.fh.propType&&(j=R.length?addHueToRGB(j,D.fh.v*R[0]):addHueToRGB(j,D.fh.v*R)),D.fs.propType&&(j=R.length?addSaturationToRGB(j,D.fs.v*R[0]):addSaturationToRGB(j,D.fs.v*R)),D.fb.propType&&(j=R.length?addBrightnessToRGB(j,D.fb.v*R[0]):addBrightnessToRGB(j,D.fb.v*R))}}for(F=0;F<w;F+=1)(D=P[F].a).p.propType&&(R=P[F].s.getMult(T[s].anIndexes[F],S.a[F].s.totalChars),this._hasMaskedPath?R.length?_.translate(0,D.p.v[1]*R[0],-D.p.v[2]*R[1]):_.translate(0,D.p.v[1]*R,-D.p.v[2]*R):R.length?_.translate(D.p.v[0]*R[0],D.p.v[1]*R[1],-D.p.v[2]*R[2]):_.translate(D.p.v[0]*R,D.p.v[1]*R,-D.p.v[2]*R));if(t.strokeWidthAnim&&(W=H<0?0:H),t.strokeColorAnim&&(Y="rgb("+Math.round(255*O[0])+","+Math.round(255*O[1])+","+Math.round(255*O[2])+")"),t.fillColorAnim&&t.fc&&(X="rgb("+Math.round(255*j[0])+","+Math.round(255*j[1])+","+Math.round(255*j[2])+")"),this._hasMaskedPath){if(_.translate(0,-t.ls),_.translate(0,x[1]*V/100+r,0),S.p.p){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var ht=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(ht+=180),_.rotate(-ht*Math.PI/180)}_.translate(G,z,0),o-=x[0]*T[s].an/200,T[s+1]&&$!==T[s+1].ind&&(o+=T[s].an/2,o+=t.tr/1e3*t.finalSize)}else{switch(_.translate(i,r,0),t.ps&&_.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:_.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line]),0,0);break;case 2:_.translate(T[s].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[s].line])/2,0,0)}_.translate(0,-t.ls),_.translate(L,0,0),_.translate(x[0]*T[s].an/200,x[1]*V/100,0),i+=T[s].l+t.tr/1e3*t.finalSize}"html"===A?tt=_.toCSS():"svg"===A?tt=_.to2dCSS():et=[_.props[0],_.props[1],_.props[2],_.props[3],_.props[4],_.props[5],_.props[6],_.props[7],_.props[8],_.props[9],_.props[10],_.props[11],_.props[12],_.props[13],_.props[14],_.props[15]],K=N}this.lettersChangedFlag=C<=s?(I=new LetterProps(K,W,Y,X,tt,et),this.renderedLetters.push(I),C+=1,!0):(I=this.renderedLetters[s]).update(K,W,Y,X,tt,et)||this.lettersChangedFlag}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),LetterProps.prototype.update=function(t,e,
10286i,r,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1;var n=this._mdf.p=!1;return this.o!==t&&(this.o=t,n=this._mdf.o=!0),this.sw!==e&&(this.sw=e,n=this._mdf.sw=!0),this.sc!==i&&(this.sc=i,n=this._mdf.sc=!0),this.fc!==r&&(this.fc=r,n=this._mdf.fc=!0),this.m!==s&&(this.m=s,n=this._mdf.m=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,n=this._mdf.p=!0),n},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=1<this.data.d.k.length,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,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{this.lock=!0,this._mdf=!1;var r,s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(r=0;r<s;r+=1)a=i!==this.keysIndex?this.effectsSequence[r](a,a.t):this.effectsSequence[r](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.pv=this.v=this.currentData,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,i=0,r=t.length;i<=r-1&&(t[i].s,!(i===r-1||t[i+1].t>e));)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,i=FontManager.getCombinedCharacterCodes(),r=[],s=0,a=t.length;s<a;)e=t.charCodeAt(s),-1!==i.indexOf(e)?r[r.length-1]+=t.charAt(s):55296<=e&&e<=56319&&56320<=(e=t.charCodeAt(s+1))&&e<=57343?(r.push(t.substr(s,2)),++s):r.push(t.charAt(s)),s+=1;return r},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,i,r,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],m=0,f=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),E=0,x=b.fStyle?b.fStyle.split(" "):[],P="normal",S="normal";for(i=x.length,e=0;e<i;e+=1)switch(x[e].toLowerCase()){case"italic":S="italic";break;case"bold":P="700";break;case"black":P="900";break;case"medium":P="500";break;case"regular":case"normal":P="400";break;case"light":case"thin":P="200"}t.fWeight=b.fWeight||P,t.fStyle=S,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var _,A=t.tr/1e3*t.finalSize;if(t.sz)for(var C,T,k=!0,M=t.sz[0],D=t.sz[1];k;){g=C=0,i=(T=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var F=-1;for(e=0;e<i;e+=1)_=T[e].charCodeAt(0),r=!1," "===T[e]?F=e:13!==_&&3!==_||(r=!(g=0),C+=t.finalLineHeight||1.2*t.finalSize),M<g+(E=h.chars?(o=h.getCharData(T[e],b.fStyle,b.fFamily),r?0:o.w*t.finalSize/100):h.measureText(T[e],t.f,t.finalSize))&&" "!==T[e]?(-1===F?i+=1:e=F,C+=t.finalLineHeight||1.2*t.finalSize,T.splice(e,F===e?1:0,"\r"),F=-1,g=0):(g+=E,g+=A);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&D<C?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=T,i=t.finalText.length,k=!1)}g=-A;var w,I=E=0;for(e=0;e<i;e+=1)if(r=!1,13===(_=(w=t.finalText[e]).charCodeAt(0))||3===_?(I=0,y.push(g),v=v<g?g:v,g=-2*A,r=!(s=""),u+=1):s=w,E=h.chars?(o=h.getCharData(w,b.fStyle,h.getFontByName(t.f).fFamily),r?0:o.w*t.finalSize/100):h.measureText(s,t.f,t.finalSize)," "===w?I+=E+A:(g+=E+A+I,I=0),p.push({l:E,an:E,add:c,n:r,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==f){if(c+=E,""===s||" "===s||e===i-1){for(""!==s&&" "!==s||(c-=E);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=E,d+=1;m+=1,c=0}}else if(3==f){if(c+=E,""===s||e===i-1){for(""===s&&(c-=E);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=E,d+=1;c=0,m+=1}}else p[m].ind=m,p[m].extra=0,m+=1;if(t.l=p,v=v<g?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 V,B,R=l.a;n=R.length;var L,G,z=[];for(a=0;a<n;a+=1){for((V=R[a]).a.sc&&(t.strokeColorAnim=!0),V.a.sw&&(t.strokeWidthAnim=!0),(V.a.fc||V.a.fh||V.a.fs||V.a.fb)&&(t.fillColorAnim=!0),G=0,L=V.s.b,e=0;e<i;e+=1)(B=p[e]).anIndexes[a]=G,(1==L&&""!==B.val||2==L&&""!==B.val&&" "!==B.val||3==L&&(B.n||" "==B.val||e==i-1)||4==L&&(B.n||e==i-1))&&(1===V.s.rn&&z.push(G),G+=1);l.a[a].s.totalChars=G;var N,O=-1;if(1===V.s.rn)for(e=0;e<i;e+=1)O!=(B=p[e]).anIndexes[a]&&(O=B.anIndexes[a],N=z.splice(Math.floor(Math.random()*z.length),1)[0]),B.anIndexes[a]=N}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var i=this.copyData({},this.data.d.k[e].s);i=this.copyData(i,t),this.data.d.k[e].s=i,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var c=Math.max,d=Math.min,u=Math.floor;function r(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return r.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,i=0,r=1,s=1;0<this.ne.v?e=this.ne.v/100:i=-this.ne.v/100,0<this.xe.v?r=1-this.xe.v/100:s=1+this.xe.v/100;
10286var a=BezierFactory.getBezierEasing(e,i,r,s).get,n=0,o=this.finalS,h=this.finalE,l=this.data.sh;if(2===l)n=a(n=h===o?h<=t?1:0:c(0,d(.5/(h-o)+(t-o)/(h-o),1)));else if(3===l)n=a(n=h===o?h<=t?0:1:1-c(0,d(.5/(h-o)+(t-o)/(h-o),1)));else if(4===l)h===o?n=0:(n=c(0,d(.5/(h-o)+(t-o)/(h-o),1)))<.5?n*=2:n=1-2*(n-.5),n=a(n);else if(5===l){if(h===o)n=0;else{var p=h-o,m=-p/2+(t=d(c(0,t+.5-o),h-o)),f=p/2;n=Math.sqrt(1-m*m/(f*f))}n=a(n)}else n=6===l?a(n=h===o?0:(t=d(c(0,t+.5-o),h-o),(1+Math.cos(Math.PI+2*Math.PI*t/(h-o)))/2)):(t>=u(o)&&(n=c(0,d(t-o<0?d(h,1)-(o-t):h-t,1))),a(n));return n*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,i=this.o.v/e,r=this.s.v/e+i,s=this.e.v/e+i;if(s<r){var a=r;r=s,s=a}this.finalS=r,this.finalE=s}},extendPrototype([DynamicPropertyContainer],r),{getTextSelectorProp:function(t,e,i){return new r(t,e,i)}}}(),pool_factory=function(t,e,i,r){var s=0,a=t,n=createSizedArray(a);function o(){return s?n[s-=1]:e()}return{newElement:o,release:function(t){s===a&&(n=pooling.double(n),a*=2),i&&i(t),n[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=(MB=pool_factory(4,function(){return new ShapePath},function(t){var e,i=t._length;for(e=0;e<i;e+=1)point_pool.release(t.v[e]),point_pool.release(t.i[e]),point_pool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),MB.clone=function(t){var e,i=MB.newElement(),r=void 0===t._length?t.v.length:t._length;for(i.setLength(r),i.c=t.c,e=0;e<r;e+=1)i.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return i},MB),MB,shapeCollection_pool=(VB={newShapeCollection:function(){var t;t=WB?YB[WB-=1]:new ShapeCollection;return t},release:function(t){var e,i=t._length;for(e=0;e<i;e+=1)shape_pool.release(t.shapes[e]);t._length=0,WB===XB&&(YB=pooling.double(YB),XB*=2);YB[WB]=t,WB+=1}},WB=0,XB=4,YB=createSizedArray(XB),VB),VB,WB,XB,YB,segments_length_pool=pool_factory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,i=t.lengths.length;for(e=0;e<i;e+=1)bezier_length_pool.release(t.lengths[e]);t.lengths.length=0}),bezier_length_pool=pool_factory(8,function(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}});function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i="";if(e&&e.title){var r=createNS("title"),s=createElementID();r.setAttribute("id",s),r.textContent=e.title,this.svgElement.appendChild(r),i+=s}if(e&&e.description){var a=createNS("desc"),n=createElementID();a.setAttribute("id",n),a.textContent=e.description,this.svgElement.appendChild(a),i+=" "+n}i&&this.svgElement.setAttribute("aria-labelledby",i);var o=createNS("defs");this.svgElement.appendChild(o);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!e||!1!==e.hideOnTransparent,viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=ne
vendor: 4,349 bytes, line 10286
10286w Matrix,this.completeLayers=!1,this.rendererType="canvas"}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!e||!1!==e.hideOnTransparent,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function MaskElement(t,e,i){this.data=t,this.element=e,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r,s=this.globalData.defs,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath="";var n,o,h,l,p,m,f,c=this.masksProperties,d=0,u=[],y=createElementID(),g="clipPath",v="clip-path";for(r=0;r<a;r++)if(("a"!==c[r].mode&&"n"!==c[r].mode||c[r].inv||100!==c[r].o.k||c[r].o.x)&&(v=g="mask"),"s"!=c[r].mode&&"i"!=c[r].mode||0!==d?l=null:((l=createNS("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w||0),l.setAttribute("height",this.element.comp.data.h||0),u.push(l)),n=createNS("path"),"n"!=c[r].mode){var b;if(d+=1,n.setAttribute("fill","s"===c[r].mode?"#000000":"#ffffff"),n.setAttribute("clip-rule","nonzero"),0!==c[r].x.k?(v=g="mask",f=PropertyFactory.getProp(this.element,c[r].x,0,null,this.element),b=createElementID(),(p=createNS("filter")).setAttribute("id",b),(m=createNS("feMorphology")).setAttribute("operator","erode"),m.setAttribute("in","SourceGraphic"),m.setAttribute("radius","0"),p.appendChild(m),s.appendChild(p),n.setAttribute("stroke","s"===c[r].mode?"#000000":"#ffffff")):f=m=null,this.storedData[r]={elem:n,x:f,expan:m,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"==c[r].mode){h=u.length;var E=createNS("g");for(o=0;o<h;o+=1)E.appendChild(u[o]);var x=createNS("mask");x.setAttribute("mask-type","alpha"),x.setAttribute("id",y+"_"+d),x.appendChild(n),s.appendChild(x),E.setAttribute("mask","url("+locationHref+"#"+y+"_"+d+")"),u.length=0,u.push(E)}else u.push(n);c[r].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[r]={elem:n,lastPath:"",op:PropertyFactory.getProp(this.element,c[r].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[r],3),invRect:l},this.viewData[r].prop.k||this.drawPath(c[r],this.viewData[r].prop.v,this.viewData[r])}else this.viewData[r]={op:PropertyFactory.getProp(this.element,c[r].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[r],3),elem:n,lastPath:""},s.appendChild(n);for(this.maskElement=createNS(g),a=u.length,r=0;r<a;r+=1)this.maskElement.appendChild(u[r]);0<d&&(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,i){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=i,this.lvl=e,this._isAnimated=!!i.k;for(var r=0,s=t.length;r<s;){if(t[r].mProps.dynamicProperties.length){this._isAnimated=!0;break}r+=1}}function SVGTransformData(t,e,i){this.transform={mProps:t,op:e,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}function SVGStrokeStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}
vendor: 4,527 bytes, line 10286
10286function SVGFillStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=i}function SVGGradientFillStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,i)}function SVGGradientStrokeStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,i),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}BaseRenderer.prototype.checkLayers=function(t){var e,i,r=this.layers.length;for(this.completeLayers=!0,e=r-1;0<=e;e--)this.elements[e]||(i=this.layers[e]).ip-i.st<=t-this.layers[e].st&&i.op-i.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 6:return this.createAudio(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.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){this.completeLayers=!1;var e,i,r=t.length,s=this.layers.length;for(e=0;e<r;e+=1)for(i=0;i<s;){if(this.layers[i].id==t[e].id){this.layers[i]=t[e];break}i+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,i){for(var r=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(r[a]&&!0!==r[a]?(i.push(r[a]),r[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,i):t.setHierarchy(i)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length;for(e=0;e<i;e+=1)if(t[e].xt){var r=this.createComp(t[e]);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,
102860,0)"),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var i=createNS("clipPath"),r=createNS("rect");r.setAttribute("width",t.w),r.setAttribute("height",t.h),r.setAttribute("x",0),r.setAttribute("y",0);var s=createElementID();i.setAttribute("id",s),i.appendChild(r),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(i),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!=this.layers[t].ty){e[t]=!0;var i=this.createItem(this.layers[t]);e[t]=i,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?i.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(i)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,i=this.elements.length;e<i;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var e,i=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=i-1;0<=e;e--)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<i;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){for(var r,s=0;s<e;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(r=this.elements[s].getBaseElement()),s+=1;r?this.layerElement.insertBefore(i,r):this.layerElement.appendChild(i)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseRenderer],CanvasRenderer),CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRenderer.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var i=this.contextData.cTr.props;this.canvasContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRenderer.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRenderer.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore(
10286)},CanvasRenderer.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i,r=this.contextData.saved[this.contextData.cArrPos];for(i=0;i<16;i+=1)r[i]=e[i];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRenderer.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,i=this.contextData.saved[this.contextData.cArrPos],r=this.contextData.cTr.props;for(e=0;e<16;e+=1)r[e]=i[e];this.canvasContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),i=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=i,this.globalData.currentGlobalAlpha!==i&&(this.canvasContext.globalAlpha=i,this.globalData.currentGlobalAlpha=i)}else this.canvasContext.restore()},CanvasRenderer.prototype.configAnimation=function(t){this.animationItem.wrapper?(this.animationItem.container=createTag("canvas"),this.animationItem.container.style.width="100%",this.animationItem.container.style.height="100%",this.animationItem.container.style.transformOrigin=this.animationItem.container.style.mozTransformOrigin=this.animationItem.container.style.webkitTransformOrigin=this.animationItem.container.style["-webkit-transform"]="0px 0px 0px",this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)):this.canvasContext=this.renderConfig.context,this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,(this.globalData.renderer=this).globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRenderer.prototype.updateContainerSize=function(){var t,e,i,r;if(this.reset(),this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);i=t/e,r=this.transformCanvas.w/this.transformCanvas.h,this.transformCanvas.sy=i<r&&"meet"===a||r<i&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(r<i&&"meet"===a||i<r&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(r<i&&"meet"===a||i<r&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(i<r&&"meet"===a||r<i&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(i<r&&"meet"===a||r<i&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"==this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.t
vendor: 9,464 bytes, line 10286
10286y=0;this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRenderer.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i,r=this.layers.length;for(this.completeLayers||this.checkLayers(t),i=0;i<r;i++)(this.completeLayers||this.elements[i])&&this.elements[i].prepareFrame(t-this.layers[i].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),i=r-1;0<=i;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!=this.layers[t].ty){var i=this.createItem(this.layers[t],this,this.globalData);(e[t]=i).initExpressions()}},CanvasRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([BaseRenderer],HybridRenderer),HybridRenderer.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},HybridRenderer.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){var r=this.layers[e];if(r.ddd&&this.supports3d)this.addTo3dContainer(i,e);else if(this.threeDElements)this.addTo3dContainer(i,e);else{for(var s,a,n=0;n<e;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n],s=(this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement())||s),n+=1;s?r.ddd&&this.supports3d||this.layerElement.insertBefore(i,s):r.ddd&&this.supports3d||this.layerElement.appendChild(i)}}},HybridRenderer.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRenderer.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextElement(t,this.globalData,this)},HybridRenderer.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRenderer.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},HybridRenderer.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRenderer.prototype.createNull=SVGRenderer.prototype.createNull,HybridRenderer.prototype.getThreeDContainerByPos=function(t){for(var e=0,i=this.threeDElements.length;e<i;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}},HybridRenderer.prototype.createThreeDContainer=function(t,e){var i=createTag("div");styleDiv(i);var r=createTag("div");styleDiv(r),"3d"===e&&(i.style.width=this.globalData.compSize.w+"px",i.style.height=this.globalData.compSize.h+"px",i.style.transformOrigin=i.style.mozTransformOrigin=i.style.webkitTransformOrigin="50% 50%",r.style.transform=r.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"),i.appendChild(r);var s={container:r,perspectiveElem:i,startPos:t,endPos:t,type:e};return this.threeDElements.push(s),s},HybridRenderer.prototype.build3dContainers=function(){var t,e,i=this.layers.length,r="";for(t=0;t<i;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?"3d"!==r&&(r="3d",e=this.createThreeDContainer(t,"3d")):"2d"!==r&&(r="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t);for(t=(i=this.threeDElements.length)-1;0<=t;t--)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRenderer.prototype.addTo3dContainer=function(t,e){for(var i=0,r=this.threeDElements.length;i<r;){if(e<=this.threeDElements[i].endPos){for(var s,a=this.threeDElements[i].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a].getBaseElement()),a+=1;s?this.threeDElements[i].container.insertBefore(t,s):this.threeDElements[i].container.appendChild(t);break}i+=1}},HybridRenderer.prototype.configAnimation=function(t){var e=createTag("div"),i=this.animationItem.wrapper;e.style.width=t.w+"px",e.style.height=t.h+"px",styleDiv(this.resizerElem=e),e.style.transformStyle=e.style.webkitTransformStyle=e.style.mozTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),i.appendChild(e),e.style.overflow="hidden";var r=createNS("svg");r.setAttribute("width","1"),r.setAttribute("height","1"),styleDiv(r),this.resizerElem.appendChild(r);var s=createNS("defs");r.appendChild(s),this.data=t,this.setupGlobalData(t,r),this.globalData.defs=s,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRenderer.prototype.updateContainerSize=function(){var t,e,i,r,s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight;r=s/a<this.globalData.compSize.w/this.globalData.compSize.h?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,i=0,(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,i=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,0),this.resizerElem.style.transform=this.resizerElem.style.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+i+","+r+",0,1)"},HybridRenderer.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRenderer.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRenderer.prototype.show=function(){this.resizerElem.style.display="block"},HybridRenderer.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,r=this.threeDElements.length;for(t=0;t<r;t+=1)this.threeDElements[t].perspectiveElem.style.perspective=this.threeDElements[t].perspectiveElem.style.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(i,2))+"px"}},HybridRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length,r=createTag("div");for(e=0;e<i;e+=1)if(t[e].xt){var s=this.createComp(t[e],r,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,i=this.element.finalTransform.mat,r=this.masksProperties.length;for(e=0;e<r;e++)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",i.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "}
vendor: 5,307 bytes, line 10286
10286,MaskElement.prototype.drawPath=function(t,e,i){var r,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,r=1;r<s;r+=1)a+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[r][0]+","+e.i[r][1]+" "+e.v[r][0]+","+e.v[r][1];if(e.c&&1<s&&(a+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==a){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute("d",n)),i.lastPath=a}},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 i,r=this.dynamicProperties.length;for(i=0;i<r;i+=1)(e||this._isParent&&"transform"===this.dynamicProperties[i].propType)&&(this.dynamicProperties[i].getValue(),this.dynamicProperties[i]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i<r;){if(this.hierarchy[i].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}i+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),i=0;i<r;i+=1)t=this.hierarchy[i].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var i=!0,r=this.comp;i;)r.finalTransform?(r.data.hasMask&&e.splice(0,0,r.finalTransform),r=r.comp):i=!1;var s,a,n=e.length;for(s=0;s<n;s+=1)a=e[s].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!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;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,
vendor: 4,117 bytes, line 10286
10286i){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,e),this.setGradientOpacity(e,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var i=createElementID(),r=createNS(1===e.t?"linearGradient":"radialGradient");r.setAttribute("id",i),r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),r.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+locationHref+"#"+i+")"),this.gf=r,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var i,r,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o=createElementID(),h=createElementID();a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(r=4*t.g.p;r<s;r+=2)(i=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(i),p.push(i);n.setAttribute("gf"===t.ty?"fill":"stroke","url("+locationHref+"#"+o+")"),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var SVGElementsRenderer=function(){var y=new Matrix,g=new Matrix;function e(t,e,i){(i||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(i||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(t,e,i){var r,s,a,n,o,h,l,p,m,f,c,d=e.styles.length,u=e.lvl;for(h=0;h<d;h+=1){if(n=e.sh._mdf||i,e.styles[h].lvl<u){for(p=g.reset(),f=u-e.styles[h].lvl,c=e.transformers.length-1;!n&&0<f;)n=e.transformers[c].mProps._mdf||n,f--,c--;if(n)for(f=u-e.styles[h].lvl,c=e.transformers.length-1;0<f;)m=e.transformers[c].mProps.v.props,p.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),f--,c--}else p=y;if(s=(l=e.sh.paths)._length,n){for(a="",r=0;r<s;r+=1)(o=l.shapes[r])&&o._length&&(a+=buildShapeString(o,o._length,o.c,p));e.caches[h]=a}else a=e.caches[h];e.styles[h].d+=!0===t.hd?"":a,e.styles[h]._mdf=n||e.styles[h]._mdf}}function r(t,e,i){var r=e.style;(e.c._mdf||i)&&r.pElem.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o._mdf||i)&&r.pElem.setAttribute("fill-opacity",e.o.v)}function s(t,e,i){a(t,e,i),n(t,e,i)}function a(t,e,i){var r,s,a,n,o,h=e.gf,l=e.g._hasOpacity,p=e.s.v,m=e.e.v;if(e.o._mdf||i){var f="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(f,e.o.v)}if(e.s._mdf||i){var c=1===t.t?"x1":"cx",d="x1"===c?"y1":"cy";h.setAttribute(c,p[0]),h.setAttribute(d,p[1]),l&&!e.g._collapsable&&(e.of.setAttribute(c,p[0]),e.of.setAttribute(d,p[1]))}if(e.g._cmdf||i){r=e.cst;var u=e.g.c;for(a=r.length,s=0;s<a;s+=1)(n=r[s]).setAttribute("offset",u[4*s]+"%"),n.setAttribute("stop-color","rgb("+u[4*s+1]+","+u[4*s+2]+","+u[4*s+3]+")")}if(l&&(e.g._omdf||i)){var y=e.g.o;for(a=(r=e.g._collapsable?e.cst:e.ost).length,s=0;s<a;s+=1)n=r[s],e.g._collapsable||n.setAttribute("offset",y[2*s]+"%"),n.setAttribute("stop-opacity",y[2*s+1])}if(1===t.t)(e.e._mdf||i)&&(h.setAttribute("x2",m[0]),h.setAttribute("y2",m[1]),l&&!e.g._collapsable&&(e.of.setAttribute("x2",m[0]),e.of.setAttribute("y2",m[1])));else if((e.s._mdf||e.e._mdf||i)&&(o=Math.sqrt(Math.pow(p[0]-m[0],2)+Math.pow(p[1]-m[1],2)),h.setAttribute("r",o),l&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||i){o||(o=Math.sqrt(Math.pow(p[0]-m[0],2)+Math.pow(p[1]-m[1],2)));
10286var g=Math.atan2(m[1]-p[1],m[0]-p[0]),v=o*(1<=e.h.v?.99:e.h.v<=-1?-.99:e.h.v),b=Math.cos(g+e.a.v)*v+p[0],E=Math.sin(g+e.a.v)*v+p[1];h.setAttribute("fx",b),h.setAttribute("fy",E),l&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",E))}}function n(t,e,i){var r=e.style,s=e.d;s&&(s._mdf||i)&&s.dashStr&&(r.pElem.setAttribute("stroke-dasharray",s.dashStr),r.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||i)&&r.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||i)&&r.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(r.pElem.setAttribute("stroke-width",e.w.v),r.msElem&&r.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){t.ty;switch(t.ty){case"fl":return r;case"gf":return a;case"gs":return s;case"st":return n;case"sh":case"el":case"rc":case"sr":return i;case"tr":return e}}}}();function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVShapeData(t,e,i,r){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s=4;"rc"==e.ty?s=5:"el"==e.ty?s=6:"sr"==e.ty&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var a,n,o=i.length;for(a=0;a<o;a+=1)i[a].closed||(n={transforms:r.addTransformSequence(i[a].transforms),trNodes:[]},this.styledShapes.push(n),i[a].elements.push(n))}function BaseElement(){}function NullElement(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initFrame(),this.initTransform(t,e,i),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ISolidElement(t,e,i){this.initElement(t,e,i)}function AudioElement(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,i),this._isPlaying=!1,this._canPlay=!1;var r=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(r),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGCompElement(t,e,i){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGTextElement(t,e,i){this.textSpans=[],this.renderType="svg",this.initElement(t,e,i)}function SVGShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function SVGTintFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");if(i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i),(i=createNS("feColorMatrix")).setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result","f2"),t.appendChild(i),this.matrixFilter=i,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var r,s=createNS("feMerge");t.appendChild(s),(r=createNS("feMergeNode")).setAttribute("in","SourceGraphic"),s.appendChild(r),(r=createNS("feMergeNode")).setAttribute("in","f2"),s.appendChild(r)}}function SVGFillFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(i),this.matrixFilter=i}function SVGGaussianBlurEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var i=createNS("feGaussianBlur");t.appendChild(i),this.feGaussianBlur=i}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i);var r=createNS("feComponentTransfer");r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),this.matrixFilter=r;var s=createNS("feFuncR");s.setAttribute("type","table"),r.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),r.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),r.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var i=this.filterManager.effectElements,r=createNS("feComponentTransfer");(i[10].p.k||0!==i[10].p.v||i[11].p.k||1!==i[11].p.v||i[12].p.k||1!==i[12].p.v||i[13].p.k||0!==i[13].p.v||i[14].p.k||1!==i[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",r)),(i[17].p.k||0!==i[17].p.v||i[18].p.k||1!==i[18].p.v||i[19].p.k||1!==i[19].p.v||i[20].p.k||0!==i[20].p.v||i[21].p.k||1!==i[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",r)),(i[24].p.k||0!==i[24].p.v||i[25].p.k||1!==i[25].p.v||i[26].p.k||1!==i[26].p.v||i[27].p.k||0!==i[27].p.v||i[28].p.k||1!==i[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",r)),(i[31].p.k||0!==i[31].p.v||i[32].p.k||1!==i[32].p.v||i[33].p.k||1!==i[33].p.v||i[34].p.k||0!==i[34].p.v||i[35].p.k||1!==i[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",r)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),r=createNS("feComponentTransfer")),(i[3].p.k||0!==i[3].p.v||i[4].p.k||1!==i[4].p.v||i[5].p.k||1!==i[5
10286].p.v||i[6].p.k||0!==i[6].p.v||i[7].p.k||1!==i[7].p.v)&&(r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),this.feFuncRComposed=this.createFeFunc("feFuncR",r),this.feFuncGComposed=this.createFeFunc("feFuncG",r),this.feFuncBComposed=this.createFeFunc("feFuncB",r))}function SVGDropShadowEffect(t,e){var i=e.container.globalData.renderConfig.filterSize;t.setAttribute("x",i.x),t.setAttribute("y",i.y),t.setAttribute("width",i.width),t.setAttribute("height",i.height),this.filterManager=e;var r=createNS("feGaussianBlur");r.setAttribute("in","SourceAlpha"),r.setAttribute("result","drop_shadow_1"),r.setAttribute("stdDeviation","0"),this.feGaussianBlur=r,t.appendChild(r);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 a=createNS("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var n=createNS("feComposite");n.setAttribute("in","drop_shadow_3"),n.setAttribute("in2","drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result","drop_shadow_4"),t.appendChild(n);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)}ShapeTransformManager.prototype={addTransformSequence:function(t){var e,i=t.length,r="_";for(e=0;e<i;e+=1)r+=t[e].transform.key+"_";var s=this.sequences[r];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[r]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var i,r=0,s=t.transforms.length,a=e;r<s&&!e;){if(t.transforms[r].transform.mProps._mdf){a=!0;break}r+=1}if(a)for(t.finalTransform.reset(),r=s-1;0<=r;r-=1)i=t.transforms[r].transform.mProps.v.props,t.finalTransform.transform(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]);t._mdf=a},processSequences:function(t){var e,i=this.sequenceList.length;for(e=0;e<i;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return"_"+this.transform_key_count++}},CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,i){this.globalData=e,this.comp=i,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,i,r=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),r=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(i=createNS("g")).appendChild(this.layerElement),r=i,s.appendChild(i),i.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=createElementID(),e=filtersFactory.createFilter(t);var o=createNS("feComponentTransfer");o.setAttribute("in","SourceGraphic"),e.appendChild(o);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData.defs.appendChild(e);var l=createNS("rect");l.setAttribute("width",this.comp.data.w),l.setAttribute("height",this.comp.data.h),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("op
10286acity","0"),n.setAttribute("filter","url("+locationHref+"#"+t+")"),n.appendChild(l),n.appendChild(this.layerElement),r=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),i=createNS("g"),n.appendChild(l),i.appendChild(this.layerElement),r=i,n.appendChild(i)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),r=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var p=createNS("clipPath"),m=createNS("path");m.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var f=createElementID();if(p.setAttribute("id",f),p.appendChild(m),this.globalData.defs.appendChild(p),this.checkMasks()){var c=createNS("g");c.setAttribute("clip-path","url("+locationHref+"#"+f+")"),c.appendChild(this.layerElement),this.transformedElement=c,r?r.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+f+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,i=this.shapeModifiers.length;for(e=0;e<i;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;0<=t;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,i=0,r=e.length;i<r;){if(e[i].elem===t)return e[i].pos;i+=1}return 0},addProcessedElement:function(t,e){for(var i=this.processedElements,r=i.length;r;)if(i[r-=1].elem===t)return void(i[r].pos=e);i.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},ITextElement.prototype.initElement=function(t,e,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,i),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var i,r,s=e.length,a="";for(i=0;i<s;i+=1)r=e[i].ks.k,a+=buildShapeString(r,r.i.length,!0,t);return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,
vendor: 5,295 bytes, line 10286
10286i,r,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i])/2,0,0)}e.translate(r,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var i,r=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=r-1;0<=i;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||.1<Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek()))&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},extendPrototype([SVGRenderer,ICompElement,SVGBaseElement],SVGCompElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextElement),SVGTextElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextElement.prototype.buildTextContents=function(t){for(var e=0,i=t.length,r=[],s="";e<i;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(r.push(s),s=""):s+=t[e],e+=1;return r.push(s),r},SVGTextElement.prototype.buildNewText=function(){var t,e,i=this.textProperty.currentData;this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var r=this.globalData.fontManager.getFontByName(i.f);
vendor: 4,704 bytes, line 10286
10286if(r.fClass)this.layerElement.setAttribute("class",r.fClass);else{this.layerElement.setAttribute("font-family",r.fFamily);var s=i.fWeight,a=i.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",i.t);var n,o=i.l||[],h=!!this.globalData.fontManager.chars;e=o.length;var l,p=this.mHelper,m="",f=this.data.singleShape,c=0,d=0,u=!0,y=i.tr/1e3*i.finalSize;if(!f||h||i.sz){var g,v,b=this.textSpans.length;for(t=0;t<e;t+=1)h&&f&&0!==t||(n=t<b?this.textSpans[t]:createNS(h?"path":"text"),b<=t&&(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=n,this.layerElement.appendChild(n)),n.style.display="inherit"),p.reset(),p.scale(i.finalSize/100,i.finalSize/100),f&&(o[t].n&&(c=-y,d+=i.yOffset,d+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(i,p,o[t].line,c,d),c+=o[t].l||0,c+=y),h?(l=(g=(v=this.globalData.fontManager.getCharData(i.finalText[t],r.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily))&&v.data||{}).shapes?g.shapes[0].it:[],f?m+=this.createPathShape(p,l):n.setAttribute("d",this.createPathShape(p,l))):(f&&n.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));f&&n&&n.setAttribute("d",m)}else{var E=this.textContainer,x="start";switch(i.j){case 1:x="end";break;case 2:x="middle"}E.setAttribute("text-anchor",x),E.setAttribute("letter-spacing",y);var P=this.buildTextContents(i.finalText);for(e=P.length,d=i.ps?i.ps[1]+i.ascent:0,t=0;t<e;t+=1)(n=this.textSpans[t]||createNS("tspan")).textContent=P[t],n.setAttribute("x",0),n.setAttribute("y",d),n.style.display="inherit",E.appendChild(n),this.textSpans[t]=n,d+=i.finalLineHeight;this.layerElement.appendChild(E)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0},SVGTextElement.prototype.sourceRectAtTime=function(t){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextElement.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var i,r,s=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(i=s[t],r=this.textSpans[t],i._mdf.m&&r.setAttribute("transform",i.m),i._mdf.o&&r.setAttribute("opacity",i.o),i._mdf.sw&&r.setAttribute("stroke-width",i.sw),i._mdf.sc&&r.setAttribute("stroke",i.sc),i._mdf.fc&&r.setAttribute("fill",i.fc))}},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,i,r,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(i=0;i<a;i+=1){for(r=this.stylesList[i],o=!1,t=n.length=0;t<s;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(r)&&(n.push(e),o=e._isAnimated||o);1<n.length&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var i,r=new SVGStyleData(t,e),s=r.pElem;if("st"===t.ty)i=new SVGStrokeStyleData(this,t,r);else if("fl"===t.ty)i=new SVGFillStyleData(this,t,r);else if("gf"===t.ty||"gs"===t.ty){i=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,r),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),s.setAttribute("mask","url("+locationHref+"#"+i.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(s.setAttribute("stroke-linecap",this.lcEnum[t.lc]||"round"),s.setAttribute("stroke-linejoin",this.ljEnum[t.lj]||"round"),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendM
10286ode(t.bm)),this.stylesList.push(r),this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var i=TransformPropertyFactory.getTransformProperty(this,t,this),r=new SVGTransformData(i,i.o,e);return this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createShapeElement=function(t,e,i){var r=4;"rc"===t.ty?r=5:"el"===t.ty?r=6:"sr"===t.ty&&(r=7);var s=new SVGShapeData(e,i,ShapePropertyFactory.getShapeProp(this,t,r,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var i=0,r=this.animatedContents.length;i<r;){if(this.animatedContents[i].element===e)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,i=t.styles,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||i.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,i,r,s,a,n){var o,h,l,p,m,f,c=[].concat(a),d=t.length-1,u=[],y=[];for(o=d;0<=o;o-=1){if((f=this.searchProcessedElement(t[o]))?e[o]=i[f-1]:t[o]._render=n,"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&&r.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"==t[o].ty){if(f)for(l=e[o].it.length,h=0;h<l;h+=1)e[o].prevViewData[h]=e[o].it[h];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,s+1,c,n),t[o]._render&&r.appendChild(e[o].gr)}else"tr"==t[o].ty?(f||(e[o]=this.createTransformElement(t[o],r)),p=e[o].transform,c.push(p)):"sh"==t[o].ty||"rc"==t[o].ty||"el"==t[o].ty||"sr"==t[o].ty?(f||(e[o]=this.createShapeElement(t[o],c,s)),this.setElementStyles(e[o])):"tm"==t[o
vendor: 5,036 bytes, line 10286
10286].ty||"rd"==t[o].ty||"ms"==t[o].ty||"pb"==t[o].ty?(f?(m=e[o]).closed=!1:((m=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=m,this.shapeModifiers.push(m)),y.push(m)):"rp"==t[o].ty&&(f?(m=e[o]).closed=!0:(m=ShapeModifiers.getModifier(t[o].ty),(e[o]=m).init(this,t,o,e),this.shapeModifiers.push(m),n=!1),y.push(m));this.addProcessedElement(t[o],o+1)}for(d=u.length,o=0;o<d;o+=1)u[o].closed=!0;for(d=y.length,o=0;o<d;o+=1)y[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,i=this.animatedContents.length;for(t=0;t<i;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",i[0]-e[0]+" 0 0 0 "+e[0]+" "+(i[1]-e[1])+" 0 0 0 "+e[1]+" "+(i[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=3==i?0:e,s=2==i?0:e;this.feGaussianBlur.setAttribute("stdDeviation",r+" "+s);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}},SVGStrokeEffect.prototype.initialize=function(){var t,e,i,r,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(r=this.elem.maskManager.masksProperties.length,i=0):r=(i=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);i<r;i+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:i});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n=createElementID();a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+locationHref+"#"+n+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){this.initialized||this.initialize();var e,i,r,s=this.paths.length;for(e=0;e<s;e+=1)if(-1!==this.paths[e].m&&(i=this.elem.maskManager.viewData[this.paths[e].m],r=this.paths[e].p,(t||this.filterManager._mdf||i.prop._mdf)&&r.setAttribute("d",i.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||i.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100,o=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100,h=r.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),m=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100,f=Math.floor(p/m);for(l=0;l<f;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100;r.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("op
10286acity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bm_floor(255*c[0])+","+bm_floor(255*c[1])+","+bm_floor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v,s=r[0]+" "+i[0]+" "+e[0],a=r[1]+" "+i[1]+" "+e[1],n=r[2]+" "+i[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var i=createNS(t);return i.setAttribute("type","table"),e.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(t,e,i,r,s){for(var a,n,o=0,h=Math.min(t,e),l=Math.max(t,e),p=Array.call(null,{length:256}),m=0,f=s-r,c=e-t;o<=256;)n=(a=o/256)<=h?c<0?s:r:l<=a?c<0?r:s:r+f*Math.pow((a-t)/c,1/i),p[m++]=n,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[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 i=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=i*Math.cos(r),a=i*Math.sin(r);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,(this.elem=i).matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function SVGEffects(t){var e,i,r=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s),n=0;for(this.filters=[],e=0;e<r;e+=1)i=null,20===t.data.ef[e].ty?(n+=1,i=new SVGTintFilter(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(n+=1,i=new SVGFillFilter(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?i=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(n+=1,i=new SVGTritoneFilter(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(n+=1,i=new SVGProLevelsFilter(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(n+=1,i=new SVGDropShadowEffect(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty?i=new SVGMatte3Effect(a,t.effectsManager.effectElements[e],t):29===t.data.ef[e].ty&&(n+=1,i=new SVGGaussianBlurEffect(a,t.effectsManager.effectElements[e])),i&&this.filters.push(i);n&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+locationHref+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function CVContextData(){this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;var t;for(this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function CVBaseElement(){}function CVImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getImage(this.assetData),this.initElement(t,e,i)}function CVCompElement(t,e,i){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CVMaskElement(t,e){this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i,r=this.masksProperties.length,s=!1;for(i=0;i<r;i++)"n"!==this.masksProperties[i].mode&&(s=!0),this.viewData[i]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3);(this.hasMasks=s)&&this.element.addRenderableComponent(this)}function CVShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,i)}function CVSolidElement(t,e,i){this.initElement(t,e,i)}function CVTextElement(t,e,i){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,i)}function CVEffects(){}function HBaseElement(t,e,i){}function HSolidElement(t,e,i){this.initElement(t,e,i)}function HCompElement(t,e,i){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,i)}function HImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i)}function HCameraElement(t,e,i){this.initFrame(),this.initBaseData(t,e,
vendor: 5,031 bytes, line 10286
10286i),this.initHierarchy();var r=PropertyFactory.getProp;if(this.pe=r(this,t.pe,0,0,this),t.ks.p.s?(this.px=r(this,t.ks.p.x,1,0,this),this.py=r(this,t.ks.p.y,1,0,this),this.pz=r(this,t.ks.p.z,1,0,this)):this.p=r(this,t.ks.p,1,0,this),t.ks.a&&(this.a=r(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=r(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=r(this,t.ks.rx,0,degToRads,this),this.ry=r(this,t.ks.ry,0,degToRads,this),this.rz=r(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HEffects(){}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,i=_svgMatteSymbols.length;e<i;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var i=t.layerElement.parentNode;if(i){for(var r,s=i.children,a=0,n=s.length;a<n&&s[a]!==t.layerElement;)a+=1;a<=n-2&&(r=s[a+1]);var o=createNS("use");o.setAttribute("href","#"+e),r?i.insertBefore(o,r):i.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var i=createElementID(),r=createNS("mask");r.setAttribute("id",e.layerId),r.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(r);var a=createNS("symbol");a.setAttribute("id",i),this.replaceInParent(e,i),a.appendChild(e.layerElement),s.appendChild(a);var n=createNS("use");n.setAttribute("href","#"+i),r.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,i=0,r=e.length;i<r;)e[i]&&e[i].data.ind===t&&this.setElementAsMask(this.elem,e[i]),i+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGEffects.prototype.renderFrame=function(t){var e,i=this.filters.length;for(e=0;e<i;e+=1)this.filters[e].renderFrame(t)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var i=0;for(i=this._length;i<t;i+=1)this.saved[i]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,i,r=t.getContext("2d"),s=this.img.width,a=this.img.height,n=s/a,o=this.assetData.w/this.assetData.h,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o<n&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?e=(i=a)*o:i=(e=s)/o,r.drawImage(this.img,(s-e)/2,(a-i)/2,e,i,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(t){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([CanvasRenderer,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;
vendor: 4,256 bytes, line 10286
10286for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;0<=t;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;0<=t;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,i,r,s=this.element.finalTransform.mat,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),t=0;t<n;t++)if("n"!==this.masksProperties[t].mode){this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),r=this.viewData[t].v,e=s.applyToPointArray(r.v[0][0],r.v[0][1],0),a.moveTo(e[0],e[1]);var o,h=r._length;for(o=1;o<h;o++)i=s.applyToTriplePoints(r.o[o-1],r.i[o],r.v[o]),a.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5]);i=s.applyToTriplePoints(r.o[o-1],r.i[0],r.v[0]),a.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var i={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},r={};if("fl"==t.ty||"st"==t.ty?(r.c=PropertyFactory.getProp(this,t.c,1,255,this),r.c.k||(i.co="rgb("+bm_floor(r.c.v[0])+","+bm_floor(r.c.v[1])+","+bm_floor(r.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(r.s=PropertyFactory.getProp(this,t.s,1,null,this),r.e=PropertyFactory.getProp(this,t.e,1,null,this),r.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),r.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),r.g=new GradientProperty(this,t.g,this)),r.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"==t.ty||"gs"==t.ty){if(i.lc=this.lcEnum[t.lc]||"round",i.lj=this.ljEnum[t.lj]||"round",1==t.lj&&(i.ml=t.ml),r.w=PropertyFactory.getProp(this,t.w,0,null,this),r.w.k||(i.wi=r.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);r.d=s,r.d.k||(i.da=r.d.dashArray,i.do=r.d.dashoffset[0])}}else i.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(i),r.style=i,r},CVShapeElement.prototype.createGroupElement=function(t){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,i=t.length;for(e=0;e<i;
10286e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,i,r,s){var a,n,o,h,l,p,m=t.length-1,f=[],c=[],d=[].concat(s);for(a=m;0<=a;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=i[h-1]:t[a]._shouldRender=r,"fl"==t[a].ty||"st"==t[a].ty||"gf"==t[a].ty||"gs"==t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),f.push(e[a].style);else if("gr"==t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,r,d)}else"tr"==t[a].ty?(h||(p=this.createTransformElement(t[a]),e[a]=p),d.push(e[a]),this.addTransformToStyleList(e[a])):"sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty||"sr"==t[a].ty?h||(e[a]=this.createShapeElement(t[a])):"tm"==t[a].ty||"rd"==t[a].ty||"pb"==t[a].ty?(h?(l=e[a]).closed=!1:((l=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=l,this.shapeModifiers.push(l)),c.push(l)):"rp"==t[a].ty&&(h?(l=e[a]).closed=!0:(l=ShapeModifiers.getModifier(t[a].ty),(e[a]=l).init(this,t,a,e),this.shapeModifiers.push(l),r=!1),c.push(l));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(f),m=c.length,a=0;a<m;a+=1)c[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,i,r,s,a,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,m=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(("st"!==(o=(h=this.stylesList[t]).type)&&"gs"!==o||0!==h.wi)&&h.data._shouldRender&&0!==h.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),a=h.elements,"st"===o||"gs"===o?(m.strokeStyle="st"===o?h.co:h.grd,m.lineWidth=h.wi,m.lineCap=h.lc,m.lineJoin=h.lj,m.miterLimit=h.ml||0):m.fillStyle="fl"===o?h.co:h.grd,p.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&m.beginPath(),p.ctxTransform(h.preTransforms.finalTransform.props),i=a.length,e=0;e<i;e+=1){for("st"!==o&&"gs"!==o||(m.beginPath(),h.da&&(m.setLineDash(h.da),m.lineDashOffset=h.do)),s=(n=a[e].trNodes).length,r=0;r<s;r+=1)"m"==n[r].t?m.moveTo(n[r].p[0],n[r].p[1]):"c"==n[r].t?m.bezierCurveTo(n[r].pts[0],n[r].pts[1],n[r].pts[2],n[r].pts[3],n[r].pts[4],n[r].pts[5]):m.closePath();"st"!==o&&"gs"!==o||(m.stroke(),h.da&&m.setLineDash(this.dashResetter))}
vendor: 11,345 bytes, line 10286
10286"st"!==o&&"gs"!==o&&m.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,i,r){var s,a;for(a=t,s=e.length-1;0<=s;s-=1)"tr"==e[s].ty?(a=i[s].transform,this.renderShapeTransform(t,a)):"sh"==e[s].ty||"el"==e[s].ty||"rc"==e[s].ty||"sr"==e[s].ty?this.renderPath(e[s],i[s]):"fl"==e[s].ty?this.renderFill(e[s],i[s],a):"st"==e[s].ty?this.renderStroke(e[s],i[s],a):"gf"==e[s].ty||"gs"==e[s].ty?this.renderGradientFill(e[s],i[s],a):"gr"==e[s].ty?this.renderShape(a,e[s].it,i[s].it):e[s].ty;r&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var i,r,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s<o;s+=1){var l=n.shapes[s];if(l&&l.v){for(r=l._length,i=1;i<r;i+=1)1===i&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),a.push({t:"c",pts:h.applyToTriplePoints(l.o[i-1],l.i[i],l.v[i])});1===r&&a.push({t:"m",p:h.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&r&&(a.push({t:"c",pts:h.applyToTriplePoints(l.o[i-1],l.i[0],l.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var i,r=e.styledShapes.length;for(i=0;i<r;i+=1)this.renderStyledShape(e.styledShapes[i],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,i){var r=e.style;(e.c._mdf||this._isFirstFrame)&&(r.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o._mdf||i._opMdf||this._isFirstFrame)&&(r.coOp=e.o.v*i.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,i){var r=e.style;if(!r.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var s=this.globalData.canvasContext,a=e.s.v,n=e.e.v;if(1===t.t)f=s.createLinearGradient(a[0],a[1],n[0],n[1]);else var o=Math.sqrt(Math.pow(a[0]-n[0],2)+Math.pow(a[1]-n[1],2)),h=Math.atan2(n[1]-a[1],n[0]-a[0]),l=o*(1<=e.h.v?.99:e.h.v<=-1?-.99:e.h.v),p=Math.cos(h+e.a.v)*l+a[0],m=Math.sin(h+e.a.v)*l+a[1],f=s.createRadialGradient(p,m,0,a[0],a[1],o);var c,d=t.g.p,u=e.g.c,y=1;for(c=0;c<d;c+=1)e.g._hasOpacity&&e.g._collapsable&&(y=e.g.o[2*c+1]),f.addColorStop(u[4*c]/100,"rgba("+u[4*c+1]+","+u[4*c+2]+","+u[4*c+3]+","+y+")");r.grd=f}r.coOp=e.o.v*i.opacity},CVShapeElement.prototype.renderStroke=function(t,e,i){var r=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(r.da=s.dashArray,r.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(r.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o._mdf||i._opMdf||this._isFirstFrame)&&(r.coOp=e.o.v*i.opacity),(e.w._mdf||this._isFirstFrame)&&(r.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var i=!1;t.sc&&(i=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var r,s,a=this.globalData.fontManager.getFontByName(t.f),n=t.l,o=this.mHelper;this.stroke=i,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,s=t.finalText.length;var h,l,p,m,f,c,d,u,y,g,v=this.data.singleShape,b=t.tr/1e3*t.finalSize,E=0,x=0,P=!0,S=0;for(r=0;r<s;r+=1){for(l=(h=this.globalData.fontManager.getCharData(t.finalText[r],a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&h.data||{},o.reset(),v&&n[r].n&&(E=-b,x+=t.yOffset,x+=P?1:0,P=!1),d=(f=l.shapes?l.shapes[0].it:[]).length,o.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,o,n[r].line,E,x),y=createSizedArray(d),c=0;c<d;c+=1){for(m=f[c].ks.k.i.length,u=f[c].ks.k,g=[],p=1;p<m;p+=1)1==p&&g.push(o.applyToX(u.v[0][0],u.v[0][1],0),o.applyToY(u.v[0][0],u.v[0][1],0)),g.push(o.applyToX(u.o[p-1][0],u.o[p-1][1],0),o.applyToY(u.o[p-1][0],u.o[p-1][1],0),o.applyToX(u.i[p][0],u.i[p][1],0),o.applyToY(u.i[p][0],u.i[p][1],0),o.applyToX(u.v[p][0],u.v[p][1],0),o.applyToY(u.v[p][0],u.v[p][1],0));g.push(o.applyToX(u.o[p-1][0],u.o[p-1][1],0),o.applyToY(u.o[p-1][0],u.o[p-1][1],0),o.applyToX(u.i[0][0],u.i[0][1],0),o.applyToY(u.i[0][0],u.i[0][1],0),o.applyToX(u.v[0][0],u.v[0][1],0),o.applyToY(u.v[0][0],u.v[0][1],0)),y[c]=g}v&&(E+=n[r].l,E+=b),this.textSpans[S]?this.textSpans[S].elem=y:this.textSpans[S]={elem:y},S+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,i,r,s,a,n=this.canvasContext;this.finalTransform.mat.props;n.font=this.values.fValue,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,h=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var p,m,f=null,c=null,d=null;for(t=0;t<e;t+=1)if(!l[t].n){if((o=h[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?f!==o.fc&&(f=o.fc,n.fillStyle=o.fc):f!==this.values.fill&&(f=this.values.fill,n.fillStyle=this.values.fill),r=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),i=0;i<r;i+=1)for(a=(m=p[i]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?d!==o.sw&&(d=o.sw,n.lineWidth=o.sw):d!==this.values.sWidth&&(d=this.values.sWidth,n.lineWidth=this.values.sWidth),o&&o.sc?c!==o.sc&&(c=o.sc,n.strokeStyle=o.sc):c!==this.values.stroke&&(c=this.values.stroke,n.strokeStyle=this.values.stroke),r=(p=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),i=0;i<r;i+=1)for(a=(m=p[i]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),s=2;s<a;s+=6)this.globalData.canvasContext.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},CVEffects.prototype.renderFrame=function(){},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&(this.transformedElement.style.transform=this.transformedElement.style.webkitTransform=this.finalTransform.mat.toCSS()),this.finalTransform._opMdf&&(this.transformedElement.style.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=HybridRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([HybridRenderer,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var i,r=0;r<e;)this.elements[r]&&this.elements[r].getBaseElement&&(i=this.elements[r].getBaseElement()),r+=1;i?this.layerElement.insertBefore(t,i):this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)e=t[i].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var i,r,s,a,n,o=t.sh.v,h=t.transformers,l=o._length;if(!(l<=1)){for(i=0;i<l-1;i+=1)r=this.getTransformedPoint(h,o.v[i]),s=this.getTransformedPoint(h,o.o[i]),a=this.getTransformedPoint(h,o.i[i+1]),n=this.getTransformedPoint(h,o.v[i+1]),this.checkBounds(r,s,a,n,e);o.c&&(r=this.getTransformedPoint(h,o.v[i]),s=this.getTransformedPoint(h,o.o[i]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(r,s,a,n,e))}}
vendor: 4,873 bytes, line 10286
10286,HShapeElement.prototype.checkBounds=function(t,e,i,r,s){this.getBoundsOfCurve(t,e,i,r);var a=this.shapeBoundingBox;s.x=bm_min(a.left,s.x),s.xMax=bm_max(a.right,s.xMax),s.y=bm_min(a.top,s.y),s.yMax=bm_max(a.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,i,r){for(var s,a,n,o,h,l,p,m=[[t[0],r[0]],[t[1],r[1]]],f=0;f<2;++f)if(a=6*t[f]-12*e[f]+6*i[f],s=-3*t[f]+9*e[f]-9*i[f]+3*r[f],n=3*e[f]-3*t[f],a|=0,n|=0,0!==(s|=0))(h=a*a-4*n*s)<0||(0<(l=(-a+bm_sqrt(h))/(2*s))&&l<1&&m[f].push(this.calculateF(l,t,e,i,r,f)),0<(p=(-a-bm_sqrt(h))/(2*s))&&p<1&&m[f].push(this.calculateF(p,t,e,i,r,f)));else{if(0===a)continue;0<(o=-n/a)&&o<1&&m[f].push(this.calculateF(o,t,e,i,r,f))}this.shapeBoundingBox.left=bm_min.apply(null,m[0]),this.shapeBoundingBox.top=bm_min.apply(null,m[1]),this.shapeBoundingBox.right=bm_max.apply(null,m[0]),this.shapeBoundingBox.bottom=bm_max.apply(null,m[1])},HShapeElement.prototype.calculateF=function(t,e,i,r,s,a){return bm_pow(1-t,3)*e[a]+3*bm_pow(1-t,2)*t*i[a]+3*(1-t)*bm_pow(t,2)*r[a]+bm_pow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)t[i]&&t[i].sh?this.calculateShapeBoundingBox(t[i],e):t[i]&&t[i].it&&this.calculateBoundingBox(t[i].it,e)},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var i=!1;this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),i=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),i=!0),(i||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y)&&(this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.shapeCont.style.transform=this.shapeCont.style.webkitTransform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style;e.color=e.fill=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)",t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,r,s=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",s.fClass)this.innerElem.className=s.fClass;else{e.fontFamily=s.fFamily;var a=t.fWeight,n=t.fStyle;e.fontStyle=n,e.fontWeight=a}var o,h,l,p=t.l;r=p.length;var m,f=this.mHelper,c="",d=0;for(i=0;i<r;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[d]?o=this.textPaths[d]:((o=createNS("path")).setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[d]?l=(h=this.textSpans[d]).children[0]:((h=createTag("div")).style.lineHeight=0,(l=createNS("svg")).appendChild(o),styleDiv(h)))):this.isMasked?o=this.textPaths[d]?this.textPaths[d]:createNS("text"):this.textSpans[d]?(h=this.textSpans[d],o=this.textPaths[d]):(styleDiv(h=createTag("span")),styleDiv(o=createTag("span")),h.appendChild(o)),this.globalData.fontManager.chars){var u,y=this.globalData.fontManager.getCharData(t.finalText[i],s.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(u=y?y.data:null,f.reset(),u&&u.shapes&&(m=u.shapes[0].it,f.scale(t.finalSize/100,t.finalSize/100),c=this.createPathShape(f,m),o.setAttribute("d",c)),this.isMasked)this.innerElem.appendChild(o);else{if(this.innerElem.appendChild(h),u&&u.shapes){document.body.appendChild(l);var g=l.getBBox();
10286l.setAttribute("width",g.width+2),l.setAttribute("height",g.height+2),l.setAttribute("viewBox",g.x-1+" "+(g.y-1)+" "+(g.width+2)+" "+(g.height+2)),l.style.transform=l.style.webkitTransform="translate("+(g.x-1)+"px,"+(g.y-1)+"px)",p[i].yOffset=g.y-1}else l.setAttribute("width",1),l.setAttribute("height",1);h.appendChild(l)}}else o.textContent=p[i].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked?this.innerElem.appendChild(o):(this.innerElem.appendChild(h),o.style.transform=o.style.webkitTransform="translate3d(0,"+-t.finalSize/1.2+"px,0)");this.isMasked?this.textSpans[d]=o:this.textSpans[d]=h,this.textSpans[d].style.display="block",this.textPaths[d]=o,d+=1}for(;d<this.textSpans.length;)this.textSpans[d].style.display="none",d+=1},HTextElement.prototype.renderInnerContent=function(){if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;this.isMasked&&this.finalTransform._matMdf&&(this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this.svgElement.style.transform=this.svgElement.style.webkitTransform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)")}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var t,e,i,r,s,a=0,n=this.textAnimator.renderedLetters,o=this.textProperty.currentData.l;for(e=o.length,t=0;t<e;t+=1)o[t].n?a+=1:(r=this.textSpans[t],s=this.textPaths[t],i=n[a],a+=1,i._mdf.m&&(this.isMasked?r.setAttribute("transform",i.m):r.style.transform=r.style.webkitTransform=i.m),r.style.opacity=i.o,i.sw&&i._mdf.sw&&s.setAttribute("stroke-width",i.sw),i.sc&&i._mdf.sc&&s.setAttribute("stroke",i.sc),i.fc&&i._mdf.fc&&(s.setAttribute("fill",i.fc),s.style.color=i.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var h=this.innerElem.getBBox();this.currentBBox.w!==h.width&&(this.currentBBox.w=h.width,this.svgElement.setAttribute("width",h.width)),this.currentBBox.h!==h.height&&(this.currentBBox.h=h.height,this.svgElement.setAttribute("height",h.height));this.currentBBox.w===h.width+2&&this.currentBBox.h===h.height+2&&this.currentBBox.x===h.x-1&&this.currentBBox.y===h.y-1||(this.currentBBox.w=h.width+2,this.currentBBox.h=h.height+2,this.currentBBox.x=h.x-1,this.currentBBox.y=h.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.svgElement.style.transform=this.svgElement.style.webkitTransform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,i=this.comp.threeDElements.length;for(t=0;t<i;t+=1)"3d"===(e=this.comp.threeDElements[t]).type&&(e.perspectiveElem.style.perspective=e.perspectiveElem.style.webkitPerspective=this.pe.v+"px",e.container.style.transformOrigin=e.container.style.mozTransformOrigin=e.container.style.webkitTransformOrigin="0px 0px 0px",e.perspectiveElem.style.transform=e.perspectiveElem.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)")},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,i=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)i=this.hierarchy[t].finalTransform.mProp._mdf||i;if(i||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;0<=t;t-=1){var r=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var m;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)"3d"===(m=this.comp.threeDElements[t]).type&&(p&&(m.container.style.transform=m.container.style.webkitTransform=this.mat.toCSS()),this.pe._mdf&&(m.perspectiveElem.style.perspective=m.perspectiveElem.style.webkitPerspective=this.pe.v+"px"));this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},HEffects.prototype.renderFrame=function(){};var animationManager=function(){var t={},s=[],r=0,a=0,n=0,o=!0,h=!1;function i(t){for(var e=0,i=t.target;e<a;)s[e].animation===i&&(s.splice(e,1),e-=1,a-=1,i.isPaused||m()),e+=1}function l(t,e){if(!t)return null;for(var i=0;i<a;){if(s[i].elem==t&&null!==s[i].elem)return s[i].animation;i+=1}var r=new AnimationItem;return f(r,t),r.setData(t,e),r}function p(){n+=1,d()}function m(){n-=1}function f(t,e){t.addEventListener("destroy",i),t.addEventListener("_active",p),t.addEventListener("_idle",m),s.push({elem:e,animation:t}),a+=1}function c(t){var e,i=t-r;for(e=0;e<a;e+=1)s[e].animation.advanceTime(i);r=t,n&&!h?window.requestAnimationFrame(c):o=!0}function e(t){r=t,window.requestAnimationFrame(c)}function d(){!h&&n&&o&&(window.requestAnimationFrame(e),o=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return f(e,null),e.setParams(t),e},t.setSpeed=function(t,e){var i;for(i=0;i<a;i+=1)s[i].animation.setSpeed(t,e)},t.setDirection=function(t,e){var i;for(i=0;i<a;i+=1)s[i].animation.setDirection(t,e)},t.play=function(t){var e;
10286for(e=0;e<a;e+=1)s[e].animation.play(t)},t.pause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.pause(t)},t.stop=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.stop(t)},t.togglePause=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.togglePause(t)},t.searchAnimations=function(t,e,i){var r,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=s.length;for(r=0;r<a;r+=1)i&&s[r].setAttribute("data-bm-type",i),l(s[r],t);if(e&&0===a){i||(i="svg");var n=document.getElementsByTagName("body")[0];n.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",i),n.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<a;t+=1)s[t].animation.resize()},t.goToAndStop=function(t,e,i){var r;for(r=0;r<a;r+=1)s[r].animation.goToAndStop(t,e,i)},t.destroy=function(t){var e;for(e=a-1;0<=e;e-=1)s[e].animation.destroy(t)},t.freeze=function(){h=!0},t.unfreeze=function(){h=!1,d()},t.setVolume=function(t,e){var i;for(i=0;i<a;i+=1)s[i].animation.setVolume(t,e)},t.mute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.mute(t)},t.unmute=function(t){var e;for(e=0;e<a;e+=1)s[e].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,e=s.length,i=[];for(t=0;t<e;t+=1)i.push(s[t].animation);return i},t}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=subframeEnabled,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e=t.animType?t.animType:t.renderer?t.renderer:"svg";switch(e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!t.hasOwnProperty("autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.configAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),assetLoader.load(t.path,this.configAnimation.bind(this),function(){this.trigger("data_failed")}.bind(this)))},AnimationItem.prototype.setData=function(t,e){var i={wrapper:t,animationData:e?"object"==typeof e?e:JSON.parse(e):null},r=t.attributes;i.path=r.getNamedItem("data-animation-path")?r.getNamedItem("data-animation-path").value:r.getNamedItem("data-bm-path")?r.getNamedItem("data-bm-path").value:r.getNamedItem("bm-path")?r.getNamedItem("bm-path").value:"",i.animType=r.getNamedItem("data-anim-type")?r.getNamedItem("data-anim-type").value:r.getNamedItem("data-bm-type")?r.getNamedItem("data-bm-type").value:r.getNamedItem("bm-type")?r.getNamedItem("bm-type").value:r.getNamedItem("data-bm-renderer")?r.getNamedItem("data-bm-renderer").value:r.getNamedItem("bm-renderer")?r.getNamedItem("bm-renderer").value:"canvas";var s=r.getNamedItem("data-anim-loop")?r.getNamedItem("data-anim-loop").value:r.getNamedItem("data-bm-loop")?r.getNamedItem("data-bm-loop").value:r.getNamedItem("bm-loop")?r.getNamedItem("bm-loop").value:"";""===s||(i.loop="false"!==s&&("true"===s||parseInt(s)));
vendor: 9,127 bytes, line 10286
10286var a=r.getNamedItem("data-anim-autoplay")?r.getNamedItem("data-anim-autoplay").value:r.getNamedItem("data-bm-autoplay")?r.getNamedItem("data-bm-autoplay").value:!r.getNamedItem("bm-autoplay")||r.getNamedItem("bm-autoplay").value;i.autoplay="false"!==a,i.name=r.getNamedItem("data-name")?r.getNamedItem("data-name").value:r.getNamedItem("data-bm-name")?r.getNamedItem("data-bm-name").value:r.getNamedItem("bm-name")?r.getNamedItem("bm-name").value:"","false"===(r.getNamedItem("data-anim-prerender")?r.getNamedItem("data-anim-prerender").value:r.getNamedItem("data-bm-prerender")?r.getNamedItem("data-bm-prerender").value:r.getNamedItem("bm-prerender")?r.getNamedItem("bm-prerender").value:"")&&(i.prerender=!1),this.setParams(i)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,r=this.animationData.layers,s=r.length,a=t.layers,n=a.length;for(i=0;i<n;i+=1)for(e=0;e<s;){if(r[e].id==a[i].id){r[e]=a[i];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),expressionsPlugin&&expressionsPlugin.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,assetLoader.load(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){this.isLoaded||!this.renderer.globalData.fontManager.isLoaded||!this.imagePreloader.loaded()&&"canvas"===this.renderer.rendererType||(this.isLoaded=!0,dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.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.audioController.resume(),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"),this.audioController.pause())},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,i){i&&this.name!=i||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())},AnimationItem.prototype.goToAndPlay=function(t,e,i){this.goToAndStop(t,e,i),this.play()},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,i=!1;e>=this.totalFrames-1&&0<this.frameModifier?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)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(0<this.frameModifier&&(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 i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?i=t:this.currentRawFrame+this.firstFrame>e&&(i=e-t)),this.firstFrame=t,this.timeCompleted=this.totalFrames=e-t,-1!==i&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var i,r=t.length;for(i=0;i<r;i+=1)this.segments.push(t[i])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=this.onLoopComplete=this.onComplete=this.onSegmentStart=this.onDestroy=null,this.renderer=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var i=t.p;-1!==i.indexOf("images/")&&(i=i.split("/")[1]),e=this.assetsPath+i}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,i=this.assets.length;e<i;
10286){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var Expressions=(fY={},fY.initExpressions=function(t){var e=0,i=[];function r(){var t,e=i.length;for(t=0;t<e;t+=1)i[t].release();i.length=0}t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&r()},t.renderer.globalData.registerExpressionProperty=function(t){-1===i.indexOf(t)&&i.push(t)}},fY),fY;expressionsPlugin=Expressions;var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var i,r=t.length,s=[];for(i=0;i<r;i+=1)s[i]=-t[i];return s}return t.propType?t.v:void 0}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var i=typeof t,r=typeof e;if("string"===i||"string"===r)return t+e;if(isNumerable(i,t)&&isNumerable(r,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(r,e))return(t=t.slice(0))[0]=t[0]+e,t;if(isNumerable(i,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}var add=sum;function sub(t,e){var i=typeof t,r=typeof e;if(isNumerable(i,t)&&isNumerable(r,e))return"string"===i&&(t=parseInt(t)),"string"===r&&(e=parseInt(e)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(r,e))return(t=t.slice(0))[0]=t[0]-e,t;if(isNumerable(i,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var i,r,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,i=createTypedArray("float32",s),r=0;r<s;r+=1)i[r]=t[r]*e;return i}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,i=createTypedArray("float32",s),r=0;r<s;r+=1)i[r]=t*e[r];return i}return 0}function div(t,e){var i,r,s,a=typeof t,n=typeof e;if(isNumerable(a,t)&&isNumerable(n,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(s=t.length,i=createTypedArray("float32",s),r=0;r<s;r+=1)i[r]=t[r]/e;return i}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(s=e.length,i=createTypedArray("float32",s),r=0;r<s;r+=1)i[r]=t/e[r];return i}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t)),"string"==typeof e&&(e=parseInt(e)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;
vendor: 15,993 bytes, line 10286
10286function clamp(t,e,i){if(i<e){var r=i;i=e,e=r}return Math.min(Math.max(t,e),i)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var i,r=Math.min(t.length,e.length),s=0;for(i=0;i<r;i+=1)s+=Math.pow(e[i]-t[i],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,i,r=t[0],s=t[1],a=t[2],n=Math.max(r,s,a),o=Math.min(r,s,a),h=(n+o)/2;if(n==o)e=i=0;else{var l=n-o;switch(i=.5<h?l/(2-n-o):l/(n+o),n){case r:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-r)/l+2;break;case a:e=(r-s)/l+4}e/=6}return[e,i,h,t[3]]}function hue2rgb(t,e,i){return i<0&&(i+=1),1<i&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function hslToRgb(t){var e,i,r,s=t[0],a=t[1],n=t[2];if(0===a)e=i=r=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),i=hue2rgb(h,o,s),r=hue2rgb(h,o,s-1/3)}return[e,i,r,t[3]]}function linear(t,e,i,r,s){if(void 0!==r&&void 0!==s||(r=e,s=i,e=0,i=1),i<e){var a=i;i=e,e=a}if(t<=e)return r;if(i<=t)return s;var n=i===e?0:(t-e)/(i-e);if(!r.length)return r+(s-r)*n;var o,h=r.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=r[o]+(s[o]-r[o])*n;return l}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var i,r=e.length;t||(t=createTypedArray("float32",r));var s=createTypedArray("float32",r),a=BMMath.random();for(i=0;i<r;i+=1)s[i]=t[i]+a*(e[i]-t[i]);return s}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,i,r){var s,a=t.length,n=shape_pool.newElement();n.setPathData(!!r,a);var o,h,l=[0,0];for(s=0;s<a;s+=1)o=e&&e[s]?e[s]:l,h=i&&i[s]?i[s]:l,n.setTripleAt(t[s][0],t[s][1],h[0]+t[s][0],h[1]+t[s][1],o[0]+t[s][0],o[1]+t[s][1],s,!0);return n}function initiateExpression(elem,data,property){var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,__expression_functions=[],scoped_bm_rt;if(data.xf){var i,len=data.xf.length;for(i=0;i<len;i+=1)__expression_functions[i]=eval("(function(){ return "+data.xf[i]+"}())")}var expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var i,r,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);var n=Math.floor(5*time);for(r=i=0;i<n;){for(r=0;r<s;r+=1)a[r]+=-e+2*e*BMMath.random();i+=1}var o=5*time,h=o-Math.floor(o),l=createTypedArray("float32",s);if(1<s){for(r=0;r<s;r+=1)l[r]=this.pv[r]+a[r]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var i=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],r=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads;return[-Math.atan2(i[1],i[2])/degToRads,r,0]}function easeOut(t,e,i,r,s){return applyEase(easeOutBez,t,e,i,r,s)}function easeIn(t,e,i,r,s){return applyEase(easeInBez,t,e,i,r,s)}function ease(t,e,i,r,s){return applyEase(easeInOutBez,t,e,i,r,s)}function applyEase(t,e,i,r,s,a){void 0===s?(s=i,a=r):e=(e-i)/(r-i);var n=t(e=1<e?1:e<0?0:e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;o<h;o+=1)l[o]=(a[o]-s[o])*n+s[o];return l}return(a-s)*n+s}function nearestKey(t){var e,i,r,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(i=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)i=1,r=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){i=e+1,r=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){r=t-data.k[e].t>data.k[e+1].t-t?(i=e+2,data.k[e+1].t):(i=e+1,data.k[e].t);break}}-1===i&&(i=e+1,r=data.k[e].t)}else r=i=0;var a={};return a.index=i,a.time=r/elem.comp.globalData.frameRate,a}function key(t){var e,i,r;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=data.k[t].hasOwnProperty("s")?data.k[t].s:data.k[t-1].e;for(r=s.length,i=0;i<r;i+=1)e[i]=s[i],e.value[i]=s[i];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,_needsRandom&&seedRandom(randSeed),this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),($bm_transform=transform)&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,"shape"===scoped_bm_rt.propType&&(scoped_bm_rt=scoped_bm_rt.v),scoped_bm_rt)}return executeExpression}return ob.initiateExpression=initiateExpression,ob}(),expressionHelpers={searchExpressions:function(t,e,i){e.x&&(i.k=!0,i.x=!0,i.initiateExpression=ExpressionManager.initiateExpression,i.effectsSequence.push(i.initiateExpression(t,e,i).bind(i)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),i=this.getValueAtTime(t+-.01),r=0;if(e.length){var s;for(s=0;s<e.length;s+=1)r+=Math.pow(i[s]-e[s],2);r=100*Math.sqrt(r)}else r=0;return r},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,i,r=this.getValueAtTime(t),s=this.getValueAtTime(t+-.001);if(r.length)for(e=createTypedArray("float32",r.length),i=0;i<r.length;i+=1)e[i]=(s[i]-r[i])/-.001;else e=(s-r)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};!function(){function o(t,e,i){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var r,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[l.length-1].t;if(h<=p)return this.pv;if(i?s=p-(r=e?Math.abs(p-elem.comp.globalData.frameRate*e):Math.max(0,p-this.elem.data.ip)):((!e||e>l.length-1)&&(e=l.length-1),r=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/r)%2!=0)return this.getValueAtTime((r-(h-s)%r+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%r+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/r);if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;a<n;a+=1)o[a]=(f[a]-m[a])*d+c[a];return o}return(f-m)*d+c}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*((h-p)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-p)/.001*(u-y)}}return this.getValueAtTime(((h-s)%r+s)/this.comp.globalData.frameRate,0)}function h(t,e,i){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var r,s,a,n,o,h=this.comp.renderedFrame,l=this.keyframes,p=l[0].t;if(p<=h)return this.pv;if(i?s=p+(r=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),r=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/r)%2==0)return this.getValueAtTime(((p-h)%r+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((r-(p-h)%r+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/r)+1;if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;a<n;a+=1)o[a]=c[a]-(f[a]-m[a])*d;return o}return c-(f-m)*d}if("continue"===t){var u=this.getValueAtTime(p/this.comp.globalData.frameRate,0),y=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,a=0;a<n;a+=1)o[a]=u[a]+(u[a]-y[a])*(p-h)/.001;return o}return u+(u-y)*(p-h)/.001}}return this.getValueAtTime((r-(p-h)%r+p)/this.comp.globalData.frameRate,0)}function l(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var i,r,s=this.comp.renderedFrame/this.comp.globalData.frameRate,a=s-t,n=1<e?(s+t-a)/(e-1):1,o=0,h=0;for(i=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(r=this.getValueAtTime(a+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)i[h]+=r[h];else i+=r;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)i[h]/=e;else i/=e;return i}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,i){var r=s(t,e,i);return r.dynamicProperties.length?r.getValueAtTime=function(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var i=this.a.getValueAtTime(t);e.translate(-i[0]*this.a.mult,-i[1]*this.a.mult,i[2]*this.a.mult)}if(this.appliedTransformations<2){var r=this.s.getValueAtTime(t);e.scale(r[0]*this.s.mult,r[1]*this.s.mult,r[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-s*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var n=this.r.getValueAtTime(t);e.rotate(-n*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),h=this.ry.getValueAtTime(t),l=this.rx.getValueAtTime(t),p=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(h*this.ry.mult).rotateX(l*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var m=this.px.getValueAtTime(t),f=this.py.getValueAtTime(t);if(this.data.p.z){var c=this.pz.getValueAtTime(t);e.translate(m*this.px.mult,f*this.py.mult,-c*this.pz.mult)}else e.translate(m*this.px.mult,f*this.py.mult,0)}else{var d=this.p.getValueAtTime(t);e.translate(d[0]*this.p.mult,d[1]*this.p.mult,-d[2]*this.p.mult)}return e}.bind(r):r.getValueAtTime=function(t){return this.v.clone(new Matrix)}.bind(r),r.setGroupProperty=expressionHelpers.setGroupProperty,r};var p=PropertyFactory.getProp;PropertyFactory.getProp=function(t,e,i,r,s){var a=p(t,e,i,r,s);a.kf?a.getValueAtTime=expressionHelpers.getValueAtTime.bind(a):a.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a.loopOut=o,a.loopIn=h,a.smooth=l,a.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(a),a.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(a),a.numKeys=1===e.a?e.k.length:0,a.propertyIndex=e.ix;var n=0;return 0!==i&&(n=createTypedArray("float32",1===e.a?e.k[0].s.length:e.k.length)),a._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:n},expressionHelpers.searchExpressions(t,e,a),a.k&&s.addDynamicProperty(a),a};var t=ShapePropertyFactory.getConstructorFunction(),e=ShapePropertyFactory.getKeyframedConstructorFunction();function i(){}i.prototype={vertices:function(t,e){this.k&&this.getValue();var i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var r,s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)o[r]="i"===t||"o"===t?[a[r][0]-n[r][0],a[r][1]-n[r][1]]:[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(i));for(var r,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,m=i.c&&o===h-1?0:o+1,f=(n-l)/a[o].addedLength;r=bez.getPointInSegment(i.v[p],i.v[m],i.o[p],i.i[m],f,a[o]);break}l+=a[o].addedLength,o+=1}return r||(r=i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]]),r},vectorOnPath:function(t,e,i){t=1==t?this.v.c?0:.999:t;var r=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-r[0],n=s[1]-r[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===i?[a/o,n/o]:[-n/o,a/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([i],t),extendPrototype([i],e),e.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.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},e.prototype.initiateExpression=ExpressionManager.initiateExpression;var n=ShapePropertyFactory.getShapeProp;
10286ShapePropertyFactory.getShapeProp=function(t,e,i,r,s){var a=n(t,e,i,r,s);return a.propertyIndex=e.ix,a.lock=!1,3===i?expressionHelpers.searchExpressions(t,e.pt,a):4===i&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}(),TextProperty.prototype.getExpressionValue=function(t,e){var i=this.calculateExpression(e);if(t.t===i)return t;var r={};return this.copyData(r,t),r.t=i.toString(),r.__complete=!1,r},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){if(this.data.d.x)return this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0};var ShapePathInterface=function(t,e,i){var r=e.sh;function s(t){if("Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t)return s.path}var a=propertyGroupFactory(s,i);return r.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return r.k&&r.getValue(),r}},shape:{get:function(){return r.k&&r.getValue(),r}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:i}}),s},propertyGroupFactory=function(e,i){return function(t){return(t=void 0===t?1:t)<=0?e:i(t-1)}},PropertyInterface=function(t,e){var i={_name:t};return function(t){return(t=void 0===t?1:t)<=0?i:e(--t)}},ShapeExpressionInterface=function(){function n(t,e,i){var r,s=[],a=t?t.length:0;for(r=0;r<a;r+=1)"gr"==t[r].ty?s.push(o(t[r],e[r],i)):"fl"==t[r].ty?s.push(h(t[r],e[r],i)):"st"==t[r].ty?s.push(l(t[r],e[r],i)):"tm"==t[r].ty?s.push(p(t[r],e[r],i)):"tr"==t[r].ty||("el"==t[r].ty?s.push(f(t[r],e[r],i)):"sr"==t[r].ty?s.push(c(t[r],e[r],i)):"sh"==t[r].ty?s.push(ShapePathInterface(t[r],e[r],i)):"rc"==t[r].ty?s.push(d(t[r],e[r],i)):"rd"==t[r].ty?s.push(u(t[r],e[r],i)):"rp"==t[r].ty&&s.push(y(t[r],e[r],i)));return s}function o(t,e,i){var r=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return r.content;default:return r.transform}};r.propertyGroup=propertyGroupFactory(r,i);var s=function(t,e,i){var r,s=function(t){for(var e=0,i=r.length;e<i;){if(r[e]._name===t||r[e].mn===t||r[e].propertyIndex===t||r[e].ix===t||r[e].ind===t)return r[e];e+=1}if("number"==typeof t)return r[t-1]};s.propertyGroup=propertyGroupFactory(s,i),r=n(t.it,e.it,s.propertyGroup),s.numProperties=r.length;var a=m(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=t.cix,s._name=t.nm,s}(t,e,r.propertyGroup),a=m(t.it[t.it.length-1],e.it[e.it.length-1],r.propertyGroup);return r.content=s,r.transform=a,Object.defineProperty(r,"_name",{get:function(){return t.nm}}),r.numProperties=t.np,r.propertyIndex=t.ix,r.nm=t.nm,r.mn=t.mn,r}function h(t,e,i){function r(t){return"Color"===t||"color"===t?r.color:"Opacity"===t||"opacity"===t?r.opacity:void 0}return Object.defineProperties(r,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",i)),e.o.setGroupProperty(PropertyInterface("Opacity",i)),r}function l(t,e,i){var r=propertyGroupFactory(l,i),s=propertyGroupFactory(h,r);var a,n,o=t.d?t.d.length:0,h={};for(a=0;a<o;a+=1)n=a,Object.defineProperty(h,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)}),e.d.dataProps[a].p.setGroupProperty(s);function l(t){return"Color"===t||"color"===t?l.color:"Opacity"===t||"opacity"===t?l.opacity:"Stroke Width"===t||"stroke width"===t?l.strokeWidth:void 0}return Object.defineProperties(l,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),e.w.setGroupProperty(PropertyInterface("Stroke Width",r)),l}function p(e,t,i){function r(t){return t===e.e.ix||"End"===t||"end"===t?r.end:t===e.s.ix?r.start:t===e.o.ix?r.offset:void 0}
vendor: 4,306 bytes, line 10286
10286var s=propertyGroupFactory(r,i);return r.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),r.propertyIndex=e.ix,r.propertyGroup=i,Object.defineProperties(r,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),r.mn=e.mn,r}function m(e,t,i){function r(t){return e.a.ix===t||"Anchor Point"===t?r.anchorPoint:e.o.ix===t||"Opacity"===t?r.opacity:e.p.ix===t||"Position"===t?r.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?r.rotation:e.s.ix===t||"Scale"===t?r.scale:e.sk&&e.sk.ix===t||"Skew"===t?r.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?r.skewAxis:void 0}var s=propertyGroupFactory(r,i);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(r,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),r.ty="tr",r.mn=e.mn,r.propertyGroup=i,r}function f(e,t,i){function r(t){return e.p.ix===t?r.position:e.s.ix===t?r.size:void 0}var s=propertyGroupFactory(r,i);r.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(r,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),r.mn=e.mn,r}function c(e,t,i){function r(t){return e.p.ix===t?r.position:e.r.ix===t?r.rotation:e.pt.ix===t?r.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?r.outerRadius:e.os.ix===t?r.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?r.innerRoundness:void 0:r.innerRadius}var s=propertyGroupFactory(r,i),a="tm"===t.sh.ty?t.sh.prop:t.sh;return r.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",s)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),a.pt.setGroupProperty(PropertyInterface("Points",s)),a.p.setGroupProperty(PropertyInterface("Position",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(r,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),r.mn=e.mn,r}function d(e,t,i){function r(t){return e.p.ix===t?r.position:e.r.ix===t?r.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?r.size:void 0}var s=propertyGroupFactory(r,i),a="tm"===t.sh.ty?t.sh.prop:t.sh;return r.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",s)),a.s.setGroupProperty(PropertyInterface("Size",s)),a.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(r,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),r.mn=e.mn,r}function u(e,t,i){function r(t){if(e.r.ix===t||"Round Corners 1"===t)return r.radiu
10286s}var s=propertyGroupFactory(r,i),a=t;return r.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(r,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),r.mn=e.mn,r}function y(e,t,i){function r(t){return e.c.ix===t||"Copies"===t?r.copies:e.o.ix===t||"Offset"===t?r.offset:void 0}var s=propertyGroupFactory(r,i),a=t;return r.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",s)),a.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(r,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),r.mn=e.mn,r}return function(t,e,r){var s;function i(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?r:s[t-1];for(var e=0,i=s.length;e<i;){if(s[e]._name===t)return s[e];e+=1}}return i.propertyGroup=propertyGroupFactory(i,function(){return r}),s=n(t,e,i.propertyGroup),i.numProperties=s.length,i._name="Contents",i}}(),TextExpressionInterface=function(e){var i;function r(t){switch(t){case"ADBE Text Document":return r.sourceText}}return Object.defineProperty(r,"sourceText",{get:function(){e.textProperty.getValue();var t=e.textProperty.currentData.t;return void 0!==t&&(e.textProperty.currentData.t=void 0,(i=new String(t)).value=t||new String(t)),i}}),r},LayerExpressionInterface=function(){function s(t){var e=new Matrix;void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e);return e}function a(t,e){var i=this.getMatrix(e);return i.props[12]=i.props[13]=i.props[14]=0,this.applyPoint(i,t)}function n(t,e){var i=this.getMatrix(e);return this.applyPoint(i,t)}function o(t,e){var i=this.getMatrix(e);return i.props[12]=i.props[13]=i.props[14]=0,this.invertPoint(i,t)}function h(t,e){var i=this.getMatrix(e);return this.invertPoint(i,t)}function l(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,r=this._elem.hierarchy.length;for(i=0;i<r;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function p(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,r=this._elem.hierarchy.length;for(i=0;i<r;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function m(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var i,r=this._elem.hierarchy.length;for(i=0;i<r;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function f(){return[1,1,1,1]}return function(e){var i;function r(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return r.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return i;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return r.effect;case"ADBE Text Properties":return r.textInterface}}r.getMatrix=s,r.invertPoint=p,r.applyPoint=l,r.toWorld=n,r.toWorldVec=a,r.fromWorld=h,r.fromWorldVec=o,r.toComp=n,r.fromComp=m,r.sampleImage=f,r.sourceRectAtTime=e.sourceRectAtTime.bind(e);var t=getDescriptor(i=TransformExpressionInterface((r._elem=e).finalTransform.mProp),"anchorPoint");return Object.defineProperties(r,{hasParent:{get:function(){return e.hierarchy.length}},parent:{get:function(){return e.hierarchy[0].layerInterface}},rotation:getDescriptor(i,"rotation"),scale:getDescriptor(i,"scale"),position:getDescriptor(i,"position"),opacity:getDescriptor(i,"opacity"),anchorPoint:t,anchor_point:t,transform:{get:function(){return i}},active:{get:function(){return e.isInRange}}}),r.startTime=e.data.st,r.index=e.data.ind,r.source=e.data.refId,r.height=0===e.data.ty?e.data.h:100,r.width=0===e.data.ty?e.data.w:100,r.inPoint=e.data.ip/e.comp.globalData.frameRate,r.outPoint=e.data.op/e.comp.globalData.frameRate,r._name=e.data.nm,r.registerMaskInterface=function(t){r.mask=new MaskManagerInterface(t,e)},r.registerEffectsInterface=function(t){r.effect=t},r}}(),CompExpressionInterface=function(r){function t(t){for(var e=0,i=r.layers.length;e<i;){if(r.layers[e].nm===t||r.layers[e].ind===t)return r.elements[e].layerInterface;e+=1}return null}return Object.defineProperty(t,"_name",{value:r.data.nm}),(t.layer=t).pixelAspect=1,t.height=r.data.h||r.globalData.compSize.h,t.width=r.data.w||r.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/r.globalData.frameRate,t.displayStartTime=0,t.numLayers=r.layers.length,t},TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity}}if(Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p)var i=ExpressionPropertyInterface(t.p);else{var r,s=ExpressionPropertyInterface(t.px),a=ExpressionPropertyInterface(t.py);t.pz&&(r=ExpressionPropertyInterface(t.pz))}return Object.defineProperty(e,"position",{get:function(){return t.p?i():[s(),a(),r?r():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(t){for(var e=0,i=this.compositions.length;e<i;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),EffectsExpressionInterface=function(){function l(s,t,e,i){function r(t){for(var e=s.ef,i=0,r=e.length;i<r;){if(t===e[i].nm||t===e[i].mn||t===e[i].ix)return 5===e[i].ty?o[i]:o[i]();i+=1}throw new Error}var a,n=propertyGroupFactory(r,e),o=[],h=s.ef.length;for(a=0;a<h;a+=1)5===s.ef[a].ty?o.push(l(s.ef[a],t.effectElements[a],t.effectElements[a].propertyGroup,i)):o.push(p(t.effectElements[a],s.ef[a].ty,i,n));
10286return"ADBE Color Control"===s.mn&&Object.defineProperty(r,"color",{get:function(){return o[0]()}}),Object.defineProperties(r,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:n}}),r.active=r.enabled=0!==s.en,r}function p(t,e,i,r){var s=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",r)),function(){return 10===e?i.comp.compInterface(t.p.v):s()}}return{createEffectsInterface:function(t,e){if(t.effectsManager){var i,r=[],s=t.data.ef,a=t.effectsManager.effectElements.length;for(i=0;i<a;i+=1)r.push(l(s[i],t.effectsManager.effectElements[i],e,t));var n=t.data.ef||[],o=function(t){for(i=0,a=n.length;i<a;){if(t===n[i].nm||t===n[i].mn||t===n[i].ix)return r[i];i+=1}};return Object.defineProperty(o,"numProperties",{get:function(){return n.length}}),o}}}}(),MaskManagerInterface=function(){function a(t,e){this._mask=t,this._data=e}Object.defineProperty(a.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(a.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});return function(e,t){var i,r=createSizedArray(e.viewData.length),s=e.viewData.length;for(i=0;i<s;i+=1)r[i]=new a(e.viewData[i],e.masksProperties[i]);return function(t){for(i=0;i<s;){if(e.masksProperties[i].nm===t)return r[i];i+=1}}}}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},n={pv:[0,0,0],v:[0,0,0],mult:1};function o(r,s,a){Object.defineProperty(r,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),r.numKeys=s.keyframes?s.keyframes.length:0,r.key=function(t){if(r.numKeys){var e="";e="s"in s.keyframes[t-1]?s.keyframes[t-1].s:"e"in s.keyframes[t-2]?s.keyframes[t-2].e:s.keyframes[t-2].s;var i="unidimensional"===a?new Number(e):Object.assign({},e);return i.time=s.keyframes[t-1].t/s.elem.comp.globalData.frameRate,i.value="unidimensional"===a?e[0]:e,i}return 0},r.valueAtTime=s.getValueAtTime,r.speedAtTime=s.getSpeedAtTime,r.velocityAtTime=s.getVelocityAtTime,r.propertyGroup=s.propertyGroup}function e(){return s}return function(t){return t?"unidimensional"===t.propType?function(t){t&&"pv"in t||(t=s);var e=1/t.mult,i=t.pv*e,r=new Number(i);return r.value=i,o(r,t,"unidimensional"),function(){return t.k&&t.getValue(),i=t.v*e,r.value!==i&&((r=new Number(i)).value=i,o(r,t,"unidimensional")),r}}(t):function(e){e&&"pv"in e||(e=n);var i=1/e.mult,r=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",r),a=createTypedArray("float32",r);return s.value=a,o(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<r;t+=1)s[t]=a[t]=e.v[t]*i;return s}}(t):e}}(),t7,u7;function SliderEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function AngleEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function ColorEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,1,0,i)}function PointEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,1,0,i)}function LayerIndexEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function MaskIndexEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function CheckboxEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var i=t.ef||[];this.effectElements=[];var r,s,a=i.length;for(r=0;r<a;r++)s=new GroupEffect(i[r],e),this.effectElements.push(s)}function GroupEffect(t,e){this.init(t,e)}t7=function(){function i(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(t,e){this.pv=1,this.comp=t.comp,this.elem=t,this.mult=.01,this.propType="textSelector",this.textTotal=e.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=ExpressionManager.initiateExpression.bind(this)(t,e,this),this.getMult=i,this.getVelocityAtTime=expressionHelpers.getVelocityAtTime,this.kf?this.getValueAtTime=expressionHelpers.getValueAtTime.bind(this):this.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(this),this.setGroupProperty=expressionHelpers.setGroupProperty}}(),u7=TextSelectorProp.getTextSelectorProp,TextSelectorProp.getTextSelectorProp=function(t,e,
10286i){return 1===e.t?new t7(t,e,i):u7(t,e,i)},extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,r,s=this.data.ef.length,a=this.data.ef;for(i=0;i<s;i+=1){switch(r=null,a[i].ty){case 0:r=new SliderEffect(a[i],e,this);break;case 1:r=new AngleEffect(a[i],e,this);break;case 2:r=new ColorEffect(a[i],e,this);break;case 3:r=new PointEffect(a[i],e,this);break;case 4:case 7:r=new CheckboxEffect(a[i],e,this);break;case 10:r=new LayerIndexEffect(a[i],e,this);break;case 11:r=new MaskIndexEffect(a[i],e,this);break;case 5:r=new EffectsManager(a[i],e,this);break;default:r=new NoValueEffect(a[i],e,this)}r&&this.effectElements.push(r)}};var lottie={},_isFrozen=!1;function setLocationHref(t){locationHref=t}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){subframeEnabled=t}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&1<t&&(defaultCurveSegments=t);roundValues(!(50<=defaultCurveSegments))}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("&"),i=0;i<e.length;i++){var r=e[i].split("=");if(decodeURIComponent(r[0])==t)return decodeURIComponent(r[1])}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocationHref,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.__getFactory=getFactory,lottie.version="5.7.4";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""},queryString=myScript.src.replace(/^[^\?]+\??/,"");renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);
10287return lottie;
10288}));
10289!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.IMask=e()}(this,function(){"use strict";var t=function(t){if(null==t)throw TypeError("Can't call method on  "+t);return t},e={}.hasOwnProperty,n=function(t,n){return e.call(t,n)},u={}.toString,i=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==function(t){return u.call(t).slice(8,-1)}(t)?t.split(""):Object(t)},r=function(e){return i(t(e))},a=Math.ceil,s=Math.floor,o=function(t){return isNaN(t=+t)?0:(t>0?s:a)(t)},l=Math.min,h=function(t){return t>0?l(o(t),9007199254740991):0},c=Math.max,f=Math.min;function p(t,e){return t(e={exports:{}},e.exports),e.exports}var d,v,k=p(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),g=k["__core-js_shared__"]||(k["__core-js_shared__"]={}),y=0,_=Math.random(),m=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++y+_).toString(36))},A=g[d="keys"]||(g[d]={}),C=(v=!1,function(t,e,n){var u,i=r(t),a=h(i.length),s=function(t,e){return(t=o(t))<0?c(t+e,0):f(t,e)}(n,a);if(v&&e!=e){for(;a>s;)if((u=i[s++])!=u)return!0}else for(;a>s;s++)if((v||s in i)&&i[s]===e)return v||s||0;return!v&&-1}
10289),E=function(t){return A[t]||(A[t]=m(t))}("IE_PROTO"),F="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),b=Object.keys||function(t){return function(t,e){var u,i=r(t),a=0,s=[];for(u in i)u!=E&&n(i,u)&&s.push(u);for(;e.length>a;)n(i,u=e[a++])&&(~C(s,u)||s.push(u));return s}(t,F)},B=p(function(t){var e=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=e)}),D=(B.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),S=function(t){if(!D(t))throw TypeError(t+" is not an object!");return t},T=function(t){try{return!!t()}catch(t){return!0}},w=!T(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),x=k.document,P=D(x)&&D(x.createElement),M=!w&&!T(function(){return 7!=Object.defineProperty((t="div",P?x.createElement(t):{}),"a",{get:function(){return 7}}).a;var t}),O=Object.defineProperty,I={f:w?Object.defineProperty:function(t,e,n){if(S(t),e=function(t,e){if(!D(t))return t;var n,u;if(e&&"function"==typeof(n=t.toString)&&!D(u=n.call(t)))return u;if("function"==typeof(n=t.valueOf)&&!D(u=n.call(t)))return u;if(!e&&"function"==typeof(n=t.toString)&&!D(u=n.call(t)))return u;throw TypeError("Can't convert object to primitive value")}(e,!0),S(n),M)try{return O(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},R=w?function(t,e,n){return I.f(t,e,function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}(1,n))}:function(t,e,n){return t[e]=n,t},V=p(function(t){var e=m("src"),u=Function.toString,i=(""+u).split("toString");B.inspectSource=function(t){return u.call(t)},(t.exports=function(t,u,r,a){var s="function"==typeof r;s&&(n(r,"name")||R(r,"name",u)),t[u]!==r&&(s&&(n(r,e)||R(r,e,t[u]?""+t[u]:i.join(String(u)))),t===k?t[u]=r:a?t[u]?t[u]=r:R(t,u,r):(delete t[u],R(t,u,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[e]||u.call(this)})}),j=function(t,e,n){if(function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!")}(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,u){return t.call(e,n,u)};case 3:return function(n,u,i){return t.call(e,n,u,i)}}return function(){return t.apply(e,arguments)}},N=function(t,e,n){var u,i,r,a,s=t&N.F,o=t&N.G,l=t&N.S,h=t&N.P,c=t&N.B,f=o?k:l?k[e]||(k[e]={}):(k[e]||{}).prototype,p=o?B:B[e]||(B[e]={}),d=p.prototype||(p.prototype={});for(u in o&&(n=e),n)r=((i=!s&&f&&void 0!==f[u])?f:n)[u],a=c&&i?j(r,k):h&&"function"==typeof r?j(Function.call,r):r,f&&V(f,u,r,t&N.U),p[u]!=r&&R(p,u,a),h&&d[u]!=r&&(d[u]=r)};k.core=B,N.F=1,N.G=2,N.S=4,N.P=8,N.B=16,N.W=32,N.U=64,N.R=128;var L,H,G,U,z=N;L="keys",H=function(){return function(e){return b(function(e){return Object(t(e))}(e))}},G=(B.Object||{})[L]||Object[L],(U={})[L]=H(G),z(z.S+z.F*T(function(){G(1)}),"Object",U);B.Object.keys;var Y=function(e){var n=String(t(this)),u="",i=o(e);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(n+=n))1&i&&(u+=n);return u};z(z.P,"String",{repeat:Y});B.String.repeat;var Z=function(e,n,u,i){var r=String(t(e)),a=r.length,s=void 0===u?" ":String(u),o=h(n);if(o<=a||""==s)return r;var l=o-a,c=Y.call(s,Math.ceil(l/s.length));return c.length>l&&(c=c.slice(0,l)),i?c+r:r+c},$=k.navigator,K=$&&$.userAgent||"";z(z.P+z.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(K),"String",{padStart:function(t){return Z(this,t,arguments.length>1?arguments[1]:void 0,!0)}});B.String.padStart;z(z.P+z.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(K),"String",{padEnd:function(t){return Z(this,t,arguments.length>1?arguments[1]:void 0,!1)}});B.String.padEnd;function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t,e){for(var n=0;n<e.length;n++){var u=e[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,u.key,u)}}function Q(t,e,n){return e&&J(t.prototype,e),n&&J(t,n),t}function X(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tt(){return(tt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(t[u]=n[u])}return t}).apply(this,arguments)}function et(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},u=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(u=u.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),u.forEach(function(e){X(t,e,n[e])})}return t}function nt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&it(t,e)}function ut(t){return(ut=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function it(t,e){return(it=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function rt(t,e){if(null==t)return{};var n,u,i=function(t,e){if(null==t)return{};var n,u,i={},r=Object.keys(t);for(u=0;
10289u<r.length;u++)n=r[u],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(u=0;u<r.length;u++)n=r[u],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function at(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function st(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ut(t)););return t}function ot(t,e,n){return(ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var u=st(t,e);if(u){var i=Object.getOwnPropertyDescriptor(u,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function lt(t,e,n,u){return(lt="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,u){var i,r=st(t,e);if(r){if((i=Object.getOwnPropertyDescriptor(r,e)).set)return i.set.call(u,n),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(u,e)){if(!i.writable)return!1;i.value=n,Object.defineProperty(u,e,i)}else X(u,e,n);return!0})(t,e,n,u)}function ht(t,e,n,u,i){if(!lt(t,e,n,u||t)&&i)throw new Error("failed to set property");return n}function ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],u=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(u=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);u=!0);}catch(t){i=!0,r=t}finally{try{u||null==s.return||s.return()}finally{if(i)throw r}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ft={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function pt(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var dt="undefined"!=typeof window&&window||"undefined"!=typeof global&&global.global===global&&global||"undefined"!=typeof self&&self.self===self&&self||{},vt=function(){function t(e,n,u,i){for(q(this,t),this.value=e,this.cursorPos=n,this.oldValue=u,this.oldSelection=i;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}return Q(t,[{key:"startChangePos",get:function(){return Math.min(this.cursorPos,this.oldSelection.start)}},{key:"insertedCount",get:function(){return this.cursorPos-this.startChangePos}},{key:"inserted",get:function(){return this.value.substr(this.startChangePos,this.insertedCount)}},{key:"removedCount",get:function(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}},{key:"removed",get:function(){return this.oldValue.substr(this.startChangePos,this.removedCount)}},{key:"head",get:function(){return this.value.substring(0,this.startChangePos)}},{key:"tail",get:function(){return this.value.substring(this.startChangePos+this.insertedCount)}},{key:"removeDirection",get:function(){return!this.removedCount||this.insertedCount?ft.NONE:this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos?ft.RIGHT:ft.LEFT}}]),t}(),kt=function(){function t(e){q(this,t),tt(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}return Q(t,[{key:"aggregate",value:function(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}},{key:"offset",get:function(){return this.tailShift+this.inserted.length}}]),t}(),gt=function(){function t(e){q(this,t),this._value="",this._update(e),this.isInitialized=!0}return Q(t,[{key:"updateOptions",value:function(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}},{key:"_update",value:function(t){tt(this,t)}},{key:"reset",value:function(){this._value=""}},{key:"resolve",value:function(t){return this.reset(),this.append(t,{input:!0},{value:""}),this.doCommit(),this.value}},{key:"nearestInputPos",value:function(t,e){return t}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(t,e)}},{key:"extractTail",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return{value:this.extractInput(t,e)}}},{key:"_storeBeforeTailState",value:function(){this._beforeTailState=this.state}},{key:"_restoreBeforeTailState",value:function(){this.state=this._beforeTailState}},{key:"_resetBeforeTailState",value:function(){this._beforeTailState=null}},{key:"appendTail",value:function(t){return this.append(t?t.value:"",{tail:!0})}},{key:"_appendCharRaw",value:function(t){return this._value+=t,new kt({inserted:t,rawInserted:t})}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!(t=this.doPrepare(t,e)))return new kt;var u=this.state,i=this._appendCharRaw(t,e);if(i.inserted){var r=!1!==this.doValidate(e);if(r&&null!=n){this._storeBeforeTailState();var a=this.appendTail(n);(r=a.rawInserted===n.value)&&a.inserted&&this._restoreBeforeTailState()}r||(i.rawInserted=i.inserted="",this.state=u)}return i}},{key:"append",value:function(t,e,n){this.value.length;for(var u=new kt,i=0;i<t.length;++i)u.aggregate(this._appendChar(t[i],e,n));return null!=n&&(this._storeBeforeTailState(),u.tailShift+=this.appendTail(n).tailShift),u}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this._value=this.value.slice(0,t)+this.value.slice(e),new kt}},{key:"withValueRefresh",value:function(t){if(this._refreshing||!this.isInitialized)return t();this._refreshing=!0;var e=this.unmaskedValue,n=this.value,u=t();return this.resolve(n)!==n&&(this.unmaskedValue=e),delete this._refreshing,u}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.prepare?this.prepare(t,this,e):t}},{key:"doValidate",value:function(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}},{key:"doCommit",value:function(){this.commit&&this.commit(this.value,this)}},{key:"splice",value:function(t,e,n,u){var i=t+e,r=this.extractTail(i),a=this.nearestInputPos(t,u);return new kt({tailShift:a-t}).aggregate(this.remove(a)).aggregate(this.append(n,{input:!0},r))}},{key:"state",get:function(){return{_value:this.value}}
10289,set:function(t){this._value=t._value}},{key:"value",get:function(){return this._value},set:function(t){this.resolve(t)}},{key:"unmaskedValue",get:function(){return this.value},set:function(t){this.reset(),this.append(t,{},{value:""}),this.doCommit()}},{key:"typedValue",get:function(){return this.unmaskedValue},set:function(t){this.unmaskedValue=t}},{key:"rawInputValue",get:function(){return this.extractInput(0,this.value.length,{raw:!0})},set:function(t){this.reset(),this.append(t,{raw:!0},{value:""}),this.doCommit()}},{key:"isComplete",get:function(){return!0}}]),t}();function yt(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?dt.IMask.MaskedRegExp:"string"==typeof(e=t)||e instanceof String?dt.IMask.MaskedPattern:t instanceof Date||t===Date?dt.IMask.MaskedDate:t instanceof Number||"number"==typeof t||t===Number?dt.IMask.MaskedNumber:Array.isArray(t)||t===Array?dt.IMask.MaskedDynamic:t.prototype instanceof dt.IMask.Masked?t:t instanceof Function?dt.IMask.MaskedFunction:(console.warn("Mask not found for mask",t),dt.IMask.Masked);var e}function _t(t){var e=(t=et({},t)).mask;return e instanceof dt.IMask.Masked?e:new(yt(e))(t)}var mt={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
10289D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},At=function(){function t(e){q(this,t);var n=e.mask,u=rt(e,["mask"]);this.masked=_t({mask:n}),tt(this,u)}return Q(t,[{key:"reset",value:function(){this._isFilled=!1,this.masked.reset()}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return 0===t&&e>=1?(this._isFilled=!1,this.masked.remove(t,e)):new kt}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._isFilled)return new kt;var n=this.masked.state,u=this.masked._appendChar(t,e);return u.inserted&&!1===this.doValidate(e)&&(u.inserted=u.rawInserted="",this.masked.state=n),u.inserted||this.isOptional||this.lazy||e.input||(u.inserted=this.placeholderChar),u.skip=!u.inserted&&!this.isOptional,this._isFilled=Boolean(u.inserted),u}},{key:"_appendPlaceholder",value:function(){var t=new kt;return this._isFilled||this.isOptional?t:(this._isFilled=!0,t.inserted=this.placeholderChar,t)}},{key:"extractTail",value:function(){var t;return(t=this.masked).extractTail.apply(t,arguments)}},{key:"appendTail",value:function(){var t;return(t=this.masked).appendTail.apply(t,arguments)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(t,e,n)}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft.NONE,n=this.value.length,u=Math.min(Math.max(t,0),n);switch(e){case ft.LEFT:case ft.FORCE_LEFT:return this.isComplete?u:0;case ft.RIGHT:case ft.FORCE_RIGHT:return this.isComplete?u:n;case ft.NONE:default:return u}}},{key:"doValidate",value:function(){var t,e;return(t=this.masked).doValidate.apply(t,arguments)&&(!this.parent||(e=this.parent).doValidate.apply(e,arguments))}},{key:"doCommit",value:function(){this.masked.doCommit()}},{key:"value",get:function(){return this.masked.value||(this._isFilled&&!this.isOptional?this.placeholderChar:"")}},{key:"unmaskedValue",get:function(){return this.masked.unmaskedValue}},{key:"isComplete",get:function(){return Boolean(this.masked.value)||this.isOptional}},{key:"state",get:function(){return{masked:this.masked.state,_isFilled:this._isFilled}},set:function(t){this.masked.state=t.masked,this._isFilled=t._isFilled}}]),t}(),Ct=function(){function t(e){q(this,t),tt(this,e),this._value=""}return Q(t,[{key:"reset",value:function(){this._isRawInput=!1,this._value=""}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new kt}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft.NONE,n=this._value.length;switch(e){case ft.LEFT:case ft.FORCE_LEFT:return 0;case ft.NONE:case ft.RIGHT:case ft.FORCE_RIGHT:default:return n}}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).raw&&this._isRawInput&&this._value.slice(t,e)||""}},{key:"_appendChar",value:function(t,e){var n=new kt;if(this._value)return n;var u=this.char===t[0]&&(this.isUnmasking||e.input||e.raw)&&!e.tail;return u&&(n.rawInserted=this.char),this._value=n.inserted=this.char,this._isRawInput=u&&(e.raw||e.input),n}},{key:"_appendPlaceholder",value:function(){var t=new kt;return this._value?t:(this._value=t.inserted=this.char,t)}},{key:"extractTail",value:function(){arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return{value:""}}},{key:"appendTail",value:function(t){return this._appendChar(t?t.value:"",{tail:!0})}},{key:"doCommit",value:function(){}},{key:"value",get:function(){return this._value}},{key:"unmaskedValue",get:function(){return this.isUnmasking?this.value:""}},{key:"isComplete",get:function(){return!0}},{key:"state",get:function(){return{_value:this._value,_isRawInput:this._isRawInput}},set:function(t){tt(this,t)}}]),t}(),Et=function(){function t(e){q(this,t),this.chunks=e}return Q(t,[{key:"value",get:function(){return this.chunks.map(function(t){return t.value}).join("")}}]),t}(),Ft=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return q(this,e),t.definitions=tt({},mt,t.definitions),at(this,ut(e).call(this,et({},e.DEFAULTS,t)))}return nt(e,gt),Q(e,[{key:"_update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.definitions=tt({},this.definitions,t.definitions),ot(ut(e.prototype),"_update",this).call(this,t),this._rebuildMask()}},{key:"_rebuildMask",value:function(){var t=this,n=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};var u=this.mask;if(u&&n)for(var i=!1,r=!1,a=0;a<u.length;++a){if(this.blocks)if("continue"===function(){var e=u.slice(a),n=Object.keys(t.blocks).filter(function(t){return 0===e.indexOf(t)});n.sort(function(t,e){return e.length-t.length});var i=n[0];if(i){var r=_t(et({parent:t,lazy:t.lazy,placeholderChar:t.placeholderChar},t.blocks[i]));return r&&(t._blocks.push(r),t._maskedBlocks[i]||(t._maskedBlocks[i]=[]),t._maskedBlocks[i].push(t._blocks.length-1)),a+=i.length-1,"continue"}}())continue;var s=u[a],o=s in n;
10289if(s!==e.STOP_CHAR)if("{"!==s&&"}"!==s)if("["!==s&&"]"!==s){if(s===e.ESCAPE_CHAR){if(!(s=u[++a]))break;o=!1}var l=void 0;l=o?new At({parent:this,lazy:this.lazy,placeholderChar:this.placeholderChar,mask:n[s],isOptional:r}):new Ct({char:s,isUnmasking:i}),this._blocks.push(l)}else r=!r;else i=!i;else this._stops.push(this._blocks.length)}}},{key:"_storeBeforeTailState",value:function(){this._blocks.forEach(function(t){"function"==typeof t._storeBeforeTailState&&t._storeBeforeTailState()}),ot(ut(e.prototype),"_storeBeforeTailState",this).call(this)}},{key:"_restoreBeforeTailState",value:function(){this._blocks.forEach(function(t){"function"==typeof t._restoreBeforeTailState&&t._restoreBeforeTailState()}),ot(ut(e.prototype),"_restoreBeforeTailState",this).call(this)}},{key:"_resetBeforeTailState",value:function(){this._blocks.forEach(function(t){"function"==typeof t._resetBeforeTailState&&t._resetBeforeTailState()}),ot(ut(e.prototype),"_resetBeforeTailState",this).call(this)}},{key:"reset",value:function(){ot(ut(e.prototype),"reset",this).call(this),this._blocks.forEach(function(t){return t.reset()})}},{key:"doCommit",value:function(){this._blocks.forEach(function(t){return t.doCommit()}),ot(ut(e.prototype),"doCommit",this).call(this)}},{key:"appendTail",value:function(t){var n=new kt;return t&&n.aggregate(t instanceof Et?this._appendTailChunks(t.chunks):ot(ut(e.prototype),"appendTail",this).call(this,t)),n.aggregate(this._appendPlaceholder())}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._mapPosToBlock(this.value.length),u=new kt;if(!n)return u;for(var i=n.index;;++i){var r=this._blocks[i];if(!r)break;var a=r._appendChar(t,e),s=a.skip;if(u.aggregate(a),s||a.rawInserted)break}return u}},{key:"_appendTailChunks",value:function(t){for(var e=new kt,n=0;n<t.length&&!e.skip;++n){var u=t[n],i=this._mapPosToBlock(this.value.length),r=u instanceof Et&&null!=u.index&&(!i||i.index<=u.index)&&this._blocks[u.index];if(r){e.aggregate(this._appendPlaceholder(u.index));var a=r.appendTail(u);a.skip=!1,e.aggregate(a),this._value+=a.inserted;var s=u.value.slice(a.rawInserted.length);s&&e.aggregate(this.append(s,{tail:!0}))}else{var o=u,l=o.stop,h=o.value;null!=l&&this._stops.indexOf(l)>=0&&e.aggregate(this._appendPlaceholder(l)),e.aggregate(this.append(h,{tail:!0}))}}return e}},{key:"extractTail",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return new Et(this._extractTailChunks(t,e))}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t===e)return"";var u="";return this._forEachBlocksInRange(t,e,function(t,e,i,r){u+=t.extractInput(i,r,n)}),u}},{key:"_extractTailChunks",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;if(e===n)return[];var u,i=[];return this._forEachBlocksInRange(e,n,function(e,n,r,a){for(var s,o=e.extractTail(r,a),l=0;l<t._stops.length;++l){var h=t._stops[l];if(!(h<=n))break;s=h}if(o instanceof Et){if(null==s){for(var c=o.chunks.length,f=0;f<o.chunks.length;++f)if(null!=o.chunks[f].stop){c=f;break}o.chunks.splice(0,c).filter(function(t){return t.value}).forEach(function(t){u?u.value+=t.value:u={value:t.value}})}o.chunks.length&&(u&&i.push(u),o.index=s,i.push(o),u=null)}else{if(null!=s)u&&i.push(u),o.stop=s;else if(u)return void(u.value+=o.value);u=o}}),u&&u.value&&i.push(u),i}},{key:"_appendPlaceholder",value:function(t){var e=this,n=new kt;if(this.lazy&&null==t)return n;var u=this._mapPosToBlock(this.value.length);if(!u)return n;var i=u.index,r=null!=t?t:this._blocks.length;return this._blocks.slice(i,r).forEach(function(t){if("function"==typeof t._appendPlaceholder){var u=null!=t._blocks?[t._blocks.length]:[],i=t._appendPlaceholder.apply(t,u);e._value+=i.inserted,n.aggregate(i)}}),n}},{key:"_mapPosToBlock",value:function(t){for(var e="",n=0;n<this._blocks.length;++n){var u=this._blocks[n],i=e.length;if(t<=(e+=u.value).length)return{index:n,offset:t-i}}}},{key:"_blockStartPos",value:function(t){return this._blocks.slice(0,t).reduce(function(t,e){return t+e.value.length},0)}}
10289,{key:"_forEachBlocksInRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2?arguments[2]:void 0,u=this._mapPosToBlock(t);if(u){var i=this._mapPosToBlock(e),r=i&&u.index===i.index,a=u.offset,s=i&&r?i.offset:void 0;if(n(this._blocks[u.index],u.index,a,s),i&&!r){for(var o=u.index+1;o<i.index;++o)n(this._blocks[o],o);n(this._blocks[i.index],i.index,0,i.offset)}}}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,u=ot(ut(e.prototype),"remove",this).call(this,t,n);return this._forEachBlocksInRange(t,n,function(t,e,n,i){u.aggregate(t.remove(n,i))}),u}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft.NONE,n=this._mapPosToBlock(t)||{index:0,offset:0},u=n.offset,i=n.index,r=this._blocks[i];if(!r)return t;var a=u;0!==a&&a<r.value.length&&(a=r.nearestInputPos(u,function(t){switch(t){case ft.LEFT:return ft.FORCE_LEFT;case ft.RIGHT:return ft.FORCE_RIGHT;default:return t}}(e)));var s=a===r.value.length;if(!(0===a)&&!s)return this._blockStartPos(i)+a;var o=s?i+1:i;if(e===ft.NONE){if(o>0){var l=o-1,h=this._blocks[l],c=h.nearestInputPos(0,ft.NONE);if(!h.value.length||c!==h.value.length)return this._blockStartPos(o)}for(var f=o;f<this._blocks.length;++f){var p=this._blocks[f],d=p.nearestInputPos(0,ft.NONE);if(d!==p.value.length)return this._blockStartPos(f)+d}return this.value.length}if(e===ft.LEFT||e===ft.FORCE_LEFT){for(var v,k=o;k<this._blocks.length;++k)if(this._blocks[k].value){v=k;break}if(null!=v){var g=this._blocks[v],y=g.nearestInputPos(0,ft.RIGHT);if(0===y&&g.unmaskedValue.length)return this._blockStartPos(v)+y}for(var _,m=-1,A=o-1;A>=0;--A){var C=this._blocks[A],E=C.nearestInputPos(C.value.length,ft.FORCE_LEFT);if(null!=_||C.value&&0===E||(_=A),0!==E){if(E!==C.value.length)return this._blockStartPos(A)+E;m=A;break}}if(e===ft.LEFT)for(var F=m+1;F<=Math.min(o,this._blocks.length-1);++F){var b=this._blocks[F],B=b.nearestInputPos(0,ft.NONE),D=this._blockStartPos(F)+B;if((!b.value.length&&D===this.value.length||B!==b.value.length)&&D<=t)return D}if(m>=0)return this._blockStartPos(m)+this._blocks[m].value.length;if(e===ft.FORCE_LEFT||this.lazy&&!this.extractInput()&&!function(t){if(!t)return!1;var e=t.value;return!e||t.nearestInputPos(0,ft.NONE)!==e.length}(this._blocks[o]))return 0;if(null!=_)return this._blockStartPos(_);for(var S=o;S<this._blocks.length;++S){var T=this._blocks[S],w=T.nearestInputPos(0,ft.NONE);if(!T.value.length||w!==T.value.length)return this._blockStartPos(S)+w}return 0}if(e===ft.RIGHT||e===ft.FORCE_RIGHT){for(var x,P,M=o;M<this._blocks.length;++M){var O=this._blocks[M],I=O.nearestInputPos(0,ft.NONE);if(I!==O.value.length){P=this._blockStartPos(M)+I,x=M;break}}if(null!=x&&null!=P){for(var R=x;R<this._blocks.length;++R){var V=this._blocks[R],j=V.nearestInputPos(0,ft.FORCE_RIGHT);if(j!==V.value.length)return this._blockStartPos(R)+j}return e===ft.FORCE_RIGHT?this.value.length:P}for(var N=Math.min(o,this._blocks.length-1);N>=0;--N){var L=this._blocks[N],H=L.nearestInputPos(L.value.length,ft.LEFT);if(0!==H){var G=this._blockStartPos(N)+H;if(G>=t)return G;break}}}return t}},{key:"maskedBlock",value:function(t){return this.maskedBlocks(t)[0]}},{key:"maskedBlocks",value:function(t){var e=this,n=this._maskedBlocks[t];return n?n.map(function(t){return e._blocks[t]}):[]}},{key:"state",get:function(){return et({},ot(ut(e.prototype),"state",this),{_blocks:this._blocks.map(function(t){return t.state})})},set:function(t){var n=t._blocks,u=rt(t,["_blocks"]);this._blocks.forEach(function(t,e){return t.state=n[e]}),ht(ut(e.prototype),"state",u,this,!0)}},{key:"isComplete",get:function(){return this._blocks.every(function(t){return t.isComplete})}},{key:"unmaskedValue",get:function(){return this._blocks.reduce(function(t,e){return t+e.unmaskedValue},"")},set:function(t){ht(ut(e.prototype),"unmaskedValue",t,this,!0)}},{key:"value",get:function(){return this._blocks.reduce(function(t,e){return t+e.value},"")},set:function(t){ht(ut(e.prototype),"value",t,this,!0)}}]),e}();Ft.DEFAULTS={lazy:!0,placeholderChar:"_"},Ft.STOP_CHAR="`",Ft.ESCAPE_CHAR="\\",Ft.InputDefinition=At,Ft.FixedDefinition=Ct;var bt=function(t){function e(){return q(this,e),at(this,ut(e).apply(this,arguments))}return nt(e,Ft),Q(e,[{key:"_update",value:function(t){t=et({to:this.to||0,from:this.from||0},t);var n=String(t.to).length;null!=t.maxLength&&(n=Math.max(n,t.maxLength)),t.maxLength=n;for(var u=String(t.to).padStart(n,"0"),i=String(t.from).padStart(n,"0"),r=0;r<u.length&&u[r]===i[r];)++r;t.mask=u.slice(0,r).replace(/0/g,"\\0")+"0".repeat(n-r),ot(ut(e.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){var t,n=this.value,u="",i="",r=ct(n.match(/^(\D*)(\d*)(\D*)/)||[],3),a=r[1],s=r[2];if(s&&(u="0".repeat(a.length)+s,i="9".repeat(a.length)+s),-1===n.search(/[^0]/)&&n.length<=this._matchFrom)return!0;u=u.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9");for(var o=arguments.length,l=new Array(o),h=0;h<o;h++)l[h]=arguments[h];return this.from<=Number(i)&&Number(u)<=this.to&&(t=ot(ut(e.prototype),"doValidate",this)).call.apply(t,[this].concat(l))}},{key:"_matchFrom",get:function(){return this.maxLength-String(this.from).length}},{key:"isComplete",get:function(){return ot(ut(e.prototype),"isComplete",this)&&Boolean(this.value)}}]),e}(),Bt=function(t){function e(t){return q(this,e),at(this,ut(e).call(this,et({},e.DEFAULTS,t)))}return nt(e,Ft),Q(e,[{key:"_update",value:function(t){t.mask===Date&&delete t.mask,t.pattern&&(t.mask=t.pattern,delete t.pattern);var n=t.blocks;t.blocks=tt({},e.GET_DEFAULT_BLOCKS()),t.min&&(t.blocks.Y.from=t.min.getFullYear()),t.max&&(t.blocks.Y.to=t.max.getFullYear()),t.min&&t.max&&t.blocks.Y.from===t.blocks.Y.to&&(t.blocks.m.from=t.min.getMonth()+1,t.blocks.m.to=t.max.getMonth()+1,t.blocks.m.from===t.blocks.m.to&&(t.blocks.d.from=t.min.getDate(),t.blocks.d.to=t.max.getDate())),tt(t.blocks,n),ot(ut(e.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,n=this.date,u=arguments.length,i=new Array(u),r=0;r<u;r++)i[r]=arguments[r];return(t=ot(ut(e.prototype),"doValidate",this)).call.apply(t,[this].concat(i))&&(!this.isComplete||this.isDateExist(this.value)&&null!=n&&(null==this.min||this.min<=n)&&(null==this.max||n<=this.max))}},{key:"isDateExist",value:function(t){return this.format(this.parse(t))===t}},{key:"date",get:function(){return this.isComplete?this.parse(this.value):null},set:function(t){this.value=this.format(t)}},{key:"typedValue",get:function(){return this.date},set:function(t){this.date=t}}]),e}();Bt.DEFAULTS={pattern:"d{.}`m{.}`Y",format:function(t){return[String(t.getDate()).padStart(2,"0"),Str
10289ing(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join(".")},parse:function(t){var e=ct(t.split("."),3),n=e[0],u=e[1],i=e[2];return new Date(i,u-1,n)}},Bt.GET_DEFAULT_BLOCKS=function(){return{d:{mask:bt,from:1,to:31,maxLength:2},m:{mask:bt,from:1,to:12,maxLength:2},Y:{mask:bt,from:1900,to:9999}}};var Dt=function(){function t(){q(this,t)}return Q(t,[{key:"select",value:function(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch(t){}}},{key:"_unsafeSelect",value:function(t,e){}},{key:"bindEvents",value:function(t){}},{key:"unbindEvents",value:function(){}},{key:"selectionStart",get:function(){var t;try{t=this._unsafeSelectionStart}catch(t){}return null!=t?t:this.value.length}},{key:"selectionEnd",get:function(){var t;try{t=this._unsafeSelectionEnd}catch(t){}return null!=t?t:this.value.length}},{key:"isActive",get:function(){return!1}}]),t}(),St=function(t){function e(t){var n;return q(this,e),(n=at(this,ut(e).call(this))).input=t,n._handlers={},n}return nt(e,Dt),Q(e,[{key:"_unsafeSelect",value:function(t,e){this.input.setSelectionRange(t,e)}},{key:"bindEvents",value:function(t){var n=this;Object.keys(t).forEach(function(u){return n._toggleEventHandler(e.EVENTS_MAP[u],t[u])})}},{key:"unbindEvents",value:function(){var t=this;Object.keys(this._handlers).forEach(function(e){return t._toggleEventHandler(e)})}},{key:"_toggleEventHandler",value:function(t,e){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),e&&(this.input.addEventListener(t,e),this._handlers[t]=e)}},{key:"isActive",get:function(){return this.input===document.activeElement}},{key:"_unsafeSelectionStart",get:function(){return this.input.selectionStart}},{key:"_unsafeSelectionEnd",get:function(){return this.input.selectionEnd}},{key:"value",get:function(){return this.input.value},set:function(t){this.input.value=t}}]),e}();St.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"change"};var Tt=function(){function t(e,n){q(this,t),this.el=e instanceof Dt?e:new St(e),this.masked=_t(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}return Q(t,[{key:"_bindEvents",value:function(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this.alignCursorFriendly,focus:this.alignCursorFriendly,commit:this._onChange})}},{key:"_unbindEvents",value:function(){this.el.unbindEvents()}},{key:"_fireEvent",value:function(t){var e=this._listeners[t];e&&e.forEach(function(t){return t()})}},{key:"_saveSelection",value:function(){this.value!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}},{key:"updateValue",value:function(){this.masked.value=this.el.value,this._value=this.masked.value}},{key:"updateControl",value:function(){var t=this.masked.unmaskedValue,e=this.masked.value,n=this.unmaskedValue!==t||this.value!==e;this._unmaskedValue=t,this._value=e,this.el.value!==e&&(this.el.value=e),n&&this._fireChangeEvents()}},{key:"updateOptions",value:function(t){if(!function t(e,n){if(n===e)return!0;var u,i=Array.isArray(n),r=Array.isArray(e);if(i&&r){if(n.length!=e.length)return!1;for(u=0;u<n.length;u++)if(!t(n[u],e[u]))return!1;return!0}if(i!=r)return!1;if(n&&e&&"object"===W(n)&&"object"===W(e)){var a=n instanceof Date,s=e instanceof Date;if(a&&s)return n.getTime()==e.getTime();if(a!=s)return!1;var o=n instanceof RegExp,l=e instanceof RegExp;if(o&&l)return n.toString()==e.toString();if(o!=l)return!1;var h=Object.keys(n);for(u=0;u<h.length;u++)if(!Object.prototype.hasOwnProperty.call(e,h[u]))return!1;for(u=0;u<h.length;u++)if(!t(e[h[u]],n[h[u]]))return!1;return!0}return!1}(this.masked,t)){var e=t.mask,n=rt(t,["mask"]);this.mask=e,this.masked.updateOptions(n),this.updateControl()}}},{key:"updateCursor",value:function(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}},{key:"_delayUpdateCursor",value:function(t){var e=this;
10289this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(function(){e.el&&(e.cursorPos=e._changingCursorPos,e._abortUpdateCursor())},10)}},{key:"_fireChangeEvents",value:function(){this._fireEvent("accept"),this.masked.isComplete&&this._fireEvent("complete")}},{key:"_abortUpdateCursor",value:function(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}},{key:"alignCursor",value:function(){this.cursorPos=this.masked.nearestInputPos(this.cursorPos,ft.LEFT)}},{key:"alignCursorFriendly",value:function(){this.selectionStart===this.cursorPos&&this.alignCursor()}},{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(this._listeners[t]){if(e){var n=this._listeners[t].indexOf(e);return n>=0&&this._listeners[t].splice(n,1),this}delete this._listeners[t]}}},{key:"_onInput",value:function(){if(this._abortUpdateCursor(),!this._selection)return this.updateValue();var t=new vt(this.el.value,this.cursorPos,this.value,this._selection),e=this.masked.rawInputValue,n=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection).offset,u=e===this.masked.rawInputValue?t.removeDirection:ft.NONE,i=this.masked.nearestInputPos(t.startChangePos+n,u);this.updateControl(),this.updateCursor(i)}},{key:"_onChange",value:function(){this.value!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl()}},{key:"_onDrop",value:function(t){t.preventDefault(),t.stopPropagation()}},{key:"destroy",value:function(){this._unbindEvents(),this._listeners.length=0,delete this.el}},{key:"mask",get:function(){return this.masked.mask},set:function(t){if(!(null==t||t===this.masked.mask||t===Date&&this.masked instanceof Bt))if(this.masked.constructor!==yt(t)){var e=_t({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}else this.masked.updateOptions({mask:t})}},{key:"value",get:function(){return this._value},set:function(t){this.masked.value=t,this.updateControl(),this.alignCursor()}},{key:"unmaskedValue",get:function(){return this._unmaskedValue},set:function(t){this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor()}},{key:"typedValue",get:function(){return this.masked.typedValue},set:function(t){this.masked.typedValue=t,this.updateControl(),this.alignCursor()}},{key:"selectionStart",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}},{key:"cursorPos",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd},set:function(t){this.el.isActive&&(this.el.select(t,t),this._saveSelection())}}]),t}(),wt=function(t){function e(){return q(this,e),at(this,ut(e).apply(this,arguments))}return nt(e,Ft),Q(e,[{key:"_update",value:function(t){t.enum&&(t.mask="*".repeat(t.enum[0].length)),ot(ut(e.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,n=this,u=arguments.length,i=new Array(u),r=0;r<u;r++)i[r]=arguments[r];return this.enum.some(function(t){return t.indexOf(n.unmaskedValue)>=0})&&(t=ot(ut(e.prototype),"doValidate",this)).call.apply(t,[this].concat(i))}}]),e}(),xt=function(t){function e(t){return q(this,e),at(this,ut(e).call(this,et({},e.DEFAULTS,t)))}return nt(e,gt),Q(e,[{key:"_update",value:function(t){ot(ut(e.prototype),"_update",this).call(this,t),this._updateRegExps()}},{key:"_updateRegExps",value:function(){var t="",e="";this.allowNegative?(t+="([+|\\-]?|([+|\\-]?(0|([1-9]+\\d*))))",e+="[+|\\-]?"):t+="(0|([1-9]+\\d*))",e+="\\d*";var n=(this.scale?"("+pt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExpInput=new RegExp("^"+t+n),this._numberRegExp=new RegExp("^"+e+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(pt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(pt(this.thousandsSeparator),"g")}},{key:"extractTail",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,u=ot(ut(e.prototype),"extractTail",this).call(this,t,n);return et({},u,{value:this._removeThousandsSeparators(u.value)})}},{key:"_removeThousandsSeparators",value:function(t){return t.replace(this._thousandsSeparatorRegExp,"")}},{key:"_insertThousandsSeparators",value:function(t){var e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}},{key:"doPrepare",value:function(t){for(var n,u=arguments.length,i=new Array(u>1?u-1:0),r=1;r<u;r++)i[r-1]=arguments[r];return(n=ot(ut(e.prototype),"doPrepare",this)).call.apply(n,[this,this._removeThousandsSeparators(t.replace(this._mapToRadixRegExp,this.radix))].concat(i))}},{key:"_separatorsCount",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._value,e=this._removeThousandsSeparators(t).length,n=e,u=0;u<=n;++u)this._value[u]===this.thousandsSeparator&&++n;return n-e}},{key:"extractInput",value:function(){for(var t,n=arguments.length,u=new Array(n),i=0;i<n;i++)u[i]=arguments[i];return this._removeThousandsSeparators((t=ot(ut(e.prototype),"extractInput",this)).call.apply(t,[this].concat(u)))}},{key:"_appendCharRaw",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.thousandsSeparator)return ot(ut(e.prototype),"_appendCharRaw",this).call(this,t,n);var u=this._separatorsCount(n.tail&&this._beforeTailState?this._beforeTailState._value:this._value);this._value=this._removeThousandsSeparators(this.value);var i=ot(ut(e.prototype),"_appendCharRaw",this).call(this,t,n);this._value=this._insertThousandsSeparators(this._value);var r=this._separatorsCount(n.tail&&this._beforeTailState?this._beforeTailState._value:this._value);return i.tailShift+=r-u,i}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=this.value.slice(0,t),u=this.value.slice(e),i=this._separatorsCount(n);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+u));var r=this._separatorsCount(n);return new kt({tailShift:r-i})}},{key:"nearestInputPos",value:function(t,e){if(!e||e===ft.LEFT)return t;var n=function(t,e){return e===ft.LEFT&&--t,t}(t,e);return this.value[n]===this.thousandsSeparator&&(t=function(t,e){switch(e){case ft.LEFT:case ft.FORCE_LEFT:return--t;case ft.RIGHT:case ft.FORCE_RIGHT:return++t;default:return t}}(t,e)),t}},{key:"doValidate",value:function(t){var n=(t.input?this._numberRegExpInput:this._numberRegExp).test(this._removeThousandsSeparators(this.value));if(n){var u=this.number;n=n&&!isNaN(u)&&(null==this.min||this.min>=0||this.min<=this.number)&&(null==this.max||this.max<=0||this.number<=this.max)}return n&&ot(ut(e.prototype),"doValidate",this).call(this,t)}},{key:"doCommit",value:function(){var t=this.number,n=t;null!=this.min&&(n=Math.max(n,this.min)),null!=this.max&&(n=Math.min(n,this.max)),n!==t&&(this.unmaskedValue=String(n));var u=this.value;this.normalizeZeros&&(u=this._normalizeZeros(u)),this.padFractionalZeros&&(u=this._padFractionalZeros(u)),this._value=this._insertThousandsSeparators(u),ot(ut(e.prototype),"doCommit",this).call(this)}},{key:"_normalizeZeros",value:function(t){var e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,function(t,e,n,u){return e+u}),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}},{key:"_padFractionalZeros",value:function(t){if(!t)return t;var e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}},{key:"unmaskedValue",get:function(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,".")},set:function(t){ht(ut(e.prototype),"unmaskedValue",t.replace(".",this.radix),this,!0)}},{key:"number",get:function(){return Number(this.unmaskedValue)},set:function(t){this.unmaskedValue=String(t)}},{key:"typedValue",get:function(){return this.number},set:function(t){this.number=t}},{key:"allowNegative",get:function(){return this.signed||null!=this.min&&this.min<0||null!=this.max&&this.max<0}}]),e}();xt.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:["."],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1};var Pt=function(t){function e(){return q(this,e),at(this,ut(e).apply(this,arguments))}return nt(e,gt),Q(e,[{key:"_update",value:function(t){t.mask&&(t.validate=function(e){return e.search(t.mask)>=0}),ot(ut(e.prototype),"_update",this).call(this,t)}}]),e}(),Mt=function(t){function e(){return q(this,e),at(this,ut(e).apply(this,arguments))}return nt(e,gt),Q(e,[{key:"_update",value:function(t){t.mask&&(t.validate=t.mask),ot(ut(e.prototype),"_update",this).call(this,t)}}]),e}(),Ot=function(t){function e(t){var n;return q(this,e),(n=at(this,ut(e).call(this,et({}
10289,e.DEFAULTS,t)))).currentMask=null,n}return nt(e,gt),Q(e,[{key:"_update",value:function(t){ot(ut(e.prototype),"_update",this).call(this,t),"mask"in t&&(this.compiledMasks=Array.isArray(t.mask)?t.mask.map(function(t){return _t(t)}):[])}},{key:"_appendCharRaw",value:function(){var t,e=this._applyDispatch.apply(this,arguments);this.currentMask&&e.aggregate((t=this.currentMask)._appendChar.apply(t,arguments));return e}},{key:"_applyDispatch",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.tail&&this._beforeTailState?this._beforeTailState._value:this.value,u=this.rawInputValue,i=e.tail&&this._beforeTailState?this._beforeTailState._rawInputValue:u,r=u.slice(i.length),a=this.currentMask,s=new kt,o=a&&a.state,l=a&&a._beforeTailState;if(this.currentMask=this.doDispatch(t,e),this.currentMask)if(this.currentMask!==a){this.currentMask.reset();var h=this.currentMask.append(i,{raw:!0});s.tailShift=h.inserted.length-n.length,r&&(s.tailShift+=this.currentMask.append(r,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=o,this.currentMask._beforeTailState=l;return s}},{key:"doDispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatch(t,this,e)}},{key:"doValidate",value:function(){for(var t,n,u=arguments.length,i=new Array(u),r=0;r<u;r++)i[r]=arguments[r];return(t=ot(ut(e.prototype),"doValidate",this)).call.apply(t,[this].concat(i))&&(!this.currentMask||(n=this.currentMask).doValidate.apply(n,i))}},{key:"reset",value:function(){this.currentMask&&this.currentMask.reset(),this.compiledMasks.forEach(function(t){return t.reset()})}},{key:"remove",value:function(){var t,e=new kt;this.currentMask&&e.aggregate((t=this.currentMask).remove.apply(t,arguments)).aggregate(this._applyDispatch());return e}},{key:"extractInput",value:function(){var t;return this.currentMask?(t=this.currentMask).extractInput.apply(t,arguments):""}},{key:"extractTail",value:function(){for(var t,n,u=arguments.length,i=new Array(u),r=0;r<u;r++)i[r]=arguments[r];return this.currentMask?(t=this.currentMask).extractTail.apply(t,i):(n=ot(ut(e.prototype),"extractTail",this)).call.apply(n,[this].concat(i))}},{key:"doCommit",value:function(){this.currentMask&&this.currentMask.doCommit(),ot(ut(e.prototype),"doCommit",this).call(this)}},{key:"nearestInputPos",value:function(){for(var t,n,u=arguments.length,i=new Array(u),r=0;r<u;r++)i[r]=arguments[r];return this.currentMask?(t=this.currentMask).nearestInputPos.apply(t,i):(n=ot(ut(e.prototype),"nearestInputPos",this)).call.apply(n,[this].concat(i))}},{key:"value",get:function(){return this.currentMask?this.currentMask.value:""},set:function(t){ht(ut(e.prototype),"value",t,this,!0)}},{key:"unmaskedValue",get:function(){return this.currentMask?this.currentMask.unmaskedValue:""},set:function(t){ht(ut(e.prototype),"unmaskedValue",t,this,!0)}},{key:"typedValue",get:function(){return this.currentMask?this.currentMask.typedValue:""},set:function(t){var e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}},{key:"isComplete",get:function(){return!!this.currentMask&&this.currentMask.isComplete}},{key:"state",get:function(){return et({},ot(ut(e.prototype),"state",this),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(function(t){return t.state}),currentMaskRef:this.currentMask,currentMask:this.currentMask&&this.currentMask.state})},set:function(t){var n=t.compiledMasks,u=t.currentMaskRef,i=t.currentMask,r=rt(t,["compiledMasks","currentMaskRef","currentMask"]);this.compiledMasks.forEach(function(t,e){return t.state=n[e]}),null!=u&&(this.currentMask=u,this.currentMask.state=i),ht(ut(e.prototype),"state",r,this,!0)}}]),e}();function It(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Tt(t,e)}return Ot.DEFAULTS={dispatch:function(t,e,n){if(e.compiledMasks.length){var u=e.rawInputValue,i=e.compiledMasks.map(function(e,i){return e.rawInputValue=u,e.append(t,n),{weight:e.rawInputValue.length,index:i}});return i.sort(function(t,e){return e.weight-t.weight}),e.compiledMasks[i[0].index]}}}
10289,It.InputMask=Tt,It.Masked=gt,It.MaskedPattern=Ft,It.MaskedEnum=wt,It.MaskedRange=bt,It.MaskedNumber=xt,It.MaskedDate=Bt,It.MaskedRegExp=Pt,It.MaskedFunction=Mt,It.MaskedDynamic=Ot,It.createMask=_t,It.MaskElement=Dt,It.HTMLMaskElement=St,dt.IMask=It,It});
10290
10291(function (global, factory) {
10292  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('imask')) :
10293  typeof define === 'function' && define.amd ? define(['exports', 'imask'], factory) :
10294  (factory((global.VueIMask = {}),global.IMask));
10295}(this, (function (exports,IMask) { 'use strict';
10296
10297  IMask = IMask && IMask.hasOwnProperty('default') ? IMask['default'] : IMask;
10298
10299  function _defineProperty(obj, key, value) {
10300    if (key in obj) {
10301      Object.defineProperty(obj, key, {
10302        value: value,
10303        enumerable: true,
10304        configurable: true,
10305        writable: true
10306      });
10307    } else {
10308      obj[key] = value;
10309    }
10310
10311    return obj;
10312  }
10313
10314  function _objectSpread(target) {
10315    for (var i = 1; i < arguments.length; i++) {
10316      var source = arguments[i] != null ? arguments[i] : {};
10317      var ownKeys = Object.keys(source);
10318
10319      if (typeof Object.getOwnPropertySymbols === 'function') {
10320        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
10321          return Object.getOwnPropertyDescriptor(source, sym).enumerable;
10322        }));
10323      }
10324
10325      ownKeys.forEach(function (key) {
10326        _defineProperty(target, key, source[key]);
10327      });
10328    }
10329
10330    return target;
10331  }
10332
10333  var IMaskComponent = {
10334    name: 'imask-input',
10335    render: function render(createElement) {
10336      var _this = this;
10337
10338      var props = {
10339        domProps: {
10340          value: this.maskRef ? this.maskRef.value : this.value
10341        },
10342        on: _objectSpread({}, this.$listeners)
10343      }; // if there is no mask use default input event
10344
10345      if (!this.$props.mask) {
10346        props.on.input = function (event) {
10347          return _this.$emit('input', event.target.value);
10348        };
10349      } else {
10350        delete props.on.input;
10351      }
10352
10353      return createElement('input', props);
10354    },
10355    mounted: function mounted() {
10356      if (!this.$props.mask) return;
10357
10358      this._initMask();
10359    },
10360    destroyed: function destroyed() {
10361      this._destroyMask();
10362    },
10363    computed: {
10364      maskOptions: function maskOptions() {
10365        return this._extractOptionsFromProps(this.$props);
10366      }
10367    },
10368    watch: {
10369      '$props': {
10370        handler: function handler(props) {
10371          var maskOptions = this.maskOptions;
10372
10373          if (maskOptions.mask) {
10374            if (this.maskRef) {
10375              this.maskRef.updateOptions(maskOptions);
10376
10377              if ('value' in props && (props.value !== this._maskValue() || // handle cases like Number('') === 0,
10378              // for details see https://github.com/uNmAnNeR/imaskjs/issues/134
10379              typeof props.value !== 'string' && this.maskRef.value === '')) {
10380                this._updateValue();
10381              }
10382            } else {
10383              this._initMask(maskOptions);
10384
10385              if (props.value !== this._maskValue()) this._onAccept();
10386            }
10387          } else {
10388            this._destroyMask();
10389
10390            if ('value' in props) this.$el.value = props.value;
10391          }
10392        },
10393        deep: true
10394      }
10395    },
10396    methods: {
10397      _extractOptionsFromProps: function _extractOptionsFromProps(props) {
10398        props = _objectSpread({}, props); // keep only defined props
10399
10400        Object.keys(props).filter(function (prop) {
10401          return props[prop] === undefined;
10402        }
10402).forEach(function (undefinedProp) {
10403          delete props[undefinedProp];
10404        });
10405        delete props.value;
10406        delete props.unmask;
10407        return props;
10408      },
10409      _maskValue: function _maskValue() {
10410        if (this.unmask === 'typed') return this.maskRef.typedValue;
10411        if (this.unmask) return this.maskRef.unmaskedValue;
10412        return this.maskRef.value;
10413      },
10414      _updateValue: function _updateValue() {
10415        var value = this.value == null ? '' : this.value;
10416        if (this.unmask === 'typed') this.maskRef.typedValue = value;else if (this.unmask) this.maskRef.unmaskedValue = value;else this.maskRef.value = value;
10417      },
10418      _onAccept: function _onAccept() {
10419        var val = this._maskValue();
10420
10421        this.$emit('input', val);
10422        this.$emit('accept', val);
10423      },
10424      _onComplete: function _onComplete() {
10425        this.$emit('complete', this._maskValue());
10426      },
10427      _initMask: function _initMask() {
10428        var maskOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.maskOptions;
10429        this.maskRef = new IMask(this.$el, maskOptions).on('accept', this._onAccept.bind(this)).on('complete', this._onComplete.bind(this));
10430
10431        this._updateValue();
10432      },
10433      _destroyMask: function _destroyMask() {
10434        if (this.maskRef) {
10435          this.maskRef.destroy();
10436          delete this.maskRef;
10437        }
10438      }
10439    },
10440    props: {
10441      // common
10442      mask: {},
10443      value: {},
10444      unmask: {
10445        validator: function validator(value) {
10446          return value === 'typed' || typeof value === 'boolean';
10447        }
10448      },
10449      prepare: Function,
10450      validate: Function,
10451      commit: Function,
10452      // pattern
10453      placeholderChar: String,
10454      lazy: Boolean,
10455      definitions: Object,
10456      blocks: Object,
10457      // date
10458      pattern: String,
10459      format: Function,
10460      parse: Function,
10461      // number
10462      radix: String,
10463      thousandsSeparator: String,
10464      mapToRadix: Array,
10465      scale: Number,
10466      signed: Boolean,
10467      normalizeZeros: Boolean,
10468      padFractionalZeros: Boolean,
10469      min: [Number, Date],
10470      max: [Number, Date],
10471      // dynamic
10472      dispatch: Function
10473    }
10474  };
10475
10476  var IMaskDirective = {
10477    name: 'imask',
10478    bind: function bind(el, _ref) {
10479      var options = _ref.value;
10480      if (!options) return;
10481      initMask(el, options);
10482    },
10483    update: function update(el, _ref2) {
10484      var options = _ref2.value;
10485
10486      if (options) {
10487        if (el.maskRef) el.maskRef.updateOptions(options);else initMask(el, options);
10488      } else {
10489        destroyMask(el);
10490      }
10491    },
10492    unbind: function unbind(el) {
10493      destroyMask(el);
10494    }
10495  };
10496
10497  function fireEvent(el, eventName, data) {
10498    var e = document.createEvent('CustomEvent');
10499    e.initCustomEvent(eventName, true, true, data);
10500    el.dispatchEvent(e);
10501  }
10502
10503  function initMask(el, opts) {
10504    el.maskRef = new IMask(el, opts).on('accept', function () {
10505      fireEvent(el, 'accept', el.maskRef);
10506    }).on('complete', function () {
10507      fireEvent(el, 'complete', el.maskRef);
10508    });
10509  }
10510
10511  function destroyMask(el) {
10512    if (el.maskRef) {
10513      el.maskRef.destroy();
10514      delete el.maskRef;
10515    }
10516  }
10517
10518  exports.IMaskComponent = IMaskComponent;
10519  exports.IMaskDirective = IMaskDirective;
10520
10521  Object.defineProperty(exports, '__esModule', { value: true });
10522
10523})));
10524Vue.component('imask-input', VueIMask.IMaskComponent);
10525Vue.directive('imask', VueIMask.IMaskDirective);
10526!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vuex=e()}(this,function(){"use strict";var t=function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}},e="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function n(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function o(t,e){if(!t)throw new Error("[vuex] "+e)}var r=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},i={namespaced:{configurable:!0}};i.namespaced.get=function(){return!!this._rawModule.namespaced},r.prototype.addChild=function(t,e){this._children[t]=e},r.prototype.removeChild=function(t){delete this._children[t]},r.prototype.getChild=function(t){return this._children[t]},r.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},r.prototype.forEachChild=function(t){n(this._children,t)},r.prototype.forEachGetter=function(t){this._rawModule.getters&&n(this._rawModule.getters,t)},r.prototype.forEachAction=function(t){this._rawModule.actions&&n(this._rawModule.actions,t)},r.prototype.forEachMutation=function(t){this._rawModule.mutations&&n(this._rawModule.mutations,t)}
10526,Object.defineProperties(r.prototype,i);var s=function(t){this.register([],t,!1)};s.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},s.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},s.prototype.update=function(t){!function t(e,n,o){f(e,o);n.update(o);if(o.modules)for(var r in o.modules){if(!n.getChild(r))return void console.warn("[vuex] trying to add a new module '"+r+"' on hot reloading, manual reload is needed");t(e.concat(r),n.getChild(r),o.modules[r])}}([],this.root,t)},s.prototype.register=function(t,e,o){var i=this;void 0===o&&(o=!0),f(t,e);var s=new r(e,o);0===t.length?this.root=s:this.get(t.slice(0,-1)).addChild(t[t.length-1],s);e.modules&&n(e.modules,function(e,n){i.register(t.concat(n),e,o)})},s.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var a,u={assert:function(t){return"function"==typeof t},expected:"function"},c={getters:u,mutations:u,actions:{assert:function(t){return"function"==typeof t||"object"==typeof t&&"function"==typeof t.handler},expected:'function or object with "handler" function'}};function f(t,e){Object.keys(c).forEach(function(r){if(e[r]){var i=c[r];n(e[r],function(e,n){o(i.assert(e),function(t,e,n,o,r){var i=e+" should be "+r+' but "'+e+"."+n+'"';t.length>0&&(i+=' in module "'+t.join(".")+'"');return i+=" is "+JSON.stringify(o)+"."}(t,r,n,e,i.expected))})}})}var l=function t(n){var r=this;void 0===n&&(n={}),!a&&"undefined"!=typeof window&&window.Vue&&_(window.Vue),o(a,"must call Vue.use(Vuex) before creating a store instance."),o("undefined"!=typeof Promise,"vuex requires a Promise polyfill in this browser."),o(this instanceof t,"Store must be called with the new operator.");var i=n.plugins;void 0===i&&(i=[]);var u=n.strict;void 0===u&&(u=!1);var c=n.state;void 0===c&&(c={}),"function"==typeof c&&(c=c()||{}),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new s(n),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new a;var f,l=this,p=this.dispatch,h=this.commit;this.dispatch=function(t,e){return p.call(l,t,e)},this.commit=function(t,e,n){return h.call(l,t,e,n)},this.strict=u,v(this,c,[],this._modules.root),m(this,c),i.forEach(function(t){return t(r)}),a.config.devtools&&(f=this,e&&(f._devtoolHook=e,e.emit("vuex:init",f),e.on("vuex:travel-to-state",function(t){f.replaceState(t)}),f.subscribe(function(t,n){e.emit("vuex:mutation",t,n)})))},p={state:{configurable:!0}};function h(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function d(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;v(t,n,[],t._modules.root,!0),m(t,n,e)}function m(t,e,r){var i=t._vm;t.getters={};var s={};n(t._wrappedGetters,function(e,n){s[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var u,c=a.config.silent;a.config.silent=!0,t._vm=new a({data:{$$state:e},computed:s}),a.config.silent=c,t.strict&&(u=t)._vm.$watch(function(){return this._data.$$state},function(){o(u._committing,"Do not mutate vuex store state outside mutation handlers.")},{deep:!0,sync:!0}),i&&(r&&t._withCommit(function(){i._data.$$state=null}),a.nextTick(function(){return i.$destroy()}))}function v(t,e,n,o,r){var i=!n.length,s=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[s]=o),!i&&!r){var u=y(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit(function(){a.set(u,c,o.state)})}var f,l,p,h,d,m=o.context=(f=t,p=n,d={dispatch:(h=""===(l=s))?f.dispatch:function(t,e,n){var o=g(t,e,n),r=o.payload,i=o.options,s=o.type;if(i&&i.root||(s=l+s,f._actions[s]))return f.dispatch(s,r);console.error("[vuex] unknown local action type: "+o.type+", global type: "+s)},commit:h?f.commit:function(t,e,n){var o=g(t,e,n),r=o.payload,i=o.options,s=o.type;i&&i.root||(s=l+s,f._mutations[s])?f.commit(s,r,i):console.error("[vuex] unknown local mutation type: "+o.type+", global type: "+s)}},Object.defineProperties(d,{getters:{get:h?function(){return f.getters}:function(){return t=f,n={}
10526,o=(e=l).length,Object.keys(t.getters).forEach(function(r){if(r.slice(0,o)===e){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return t.getters[r]},enumerable:!0})}}),n;var t,e,n,o}},state:{get:function(){return y(f.state,p)}}}),d);o.forEachMutation(function(e,n){var o,r,i,a;r=s+n,i=e,a=m,((o=t)._mutations[r]||(o._mutations[r]=[])).push(function(t){i.call(o,a.state,t)})}),o.forEachAction(function(e,n){var o,r,i,a,u=e.root?n:s+n,c=e.handler||e;r=u,i=c,a=m,((o=t)._actions[r]||(o._actions[r]=[])).push(function(t,e){var n,r=i.call(o,{dispatch:a.dispatch,commit:a.commit,getters:a.getters,state:a.state,rootGetters:o.getters,rootState:o.state},t,e);return(n=r)&&"function"==typeof n.then||(r=Promise.resolve(r)),o._devtoolHook?r.catch(function(t){throw o._devtoolHook.emit("vuex:error",t),t}):r})}),o.forEachGetter(function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return void console.error("[vuex] duplicate getter key: "+e);t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,s+n,e,m)}),o.forEachChild(function(o,i){v(t,e,n.concat(i),o,r)})}function y(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function g(t,e,n){var r;return null!==(r=t)&&"object"==typeof r&&t.type&&(n=e,e=t,t=t.type),o("string"==typeof t,"Expects string as the type, but found "+typeof t+"."),{type:t,payload:e,options:n}}function _(e){a&&e===a?console.error("[vuex] already installed. Vue.use(Vuex) should be called only once."):t(a=e)}p.state.get=function(){return this._vm._data.$$state},p.state.set=function(t){o(!1,"Use store.replaceState() to explicit replace store state.")},l.prototype.commit=function(t,e,n){var o=this,r=g(t,e,n),i=r.type,s=r.payload,a=r.options,u={type:i,payload:s},c=this._mutations[i];c?(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(u,o.state)}),a&&a.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")):console.error("[vuex] unknown mutation type: "+i)},l.prototype.dispatch=function(t,e){var n=this,o=g(t,e),r=o.type,i=o.payload,s={type:r,payload:i},a=this._actions[r];if(a)return this._actionSubscribers.forEach(function(t){return t(s,n.state)}),a.length>1?Promise.all(a.map(function(t){return t(i)})):a[0](i);console.error("[vuex] unknown action type: "+r)},l.prototype.subscribe=function(t){return h(t,this._subscribers)},l.prototype.subscribeAction=function(t){return h(t,this._actionSubscribers)},l.prototype.watch=function(t,e,n){var r=this;return o("function"==typeof t,"store.watch only accepts a function."),this._watcherVM.$watch(function(){return t(r.state,r.getters)},e,n)},l.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},l.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),o(Array.isArray(t),"module path must be a string or an Array."),o(t.length>0,"cannot register the root module by using registerModule."),this._modules.register(t,e),v(this,this.state,t,this._modules.get(t),n.preserveState),m(this,this.state)},l.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),o(Array.isArray(t),"module path must be a string or an Array."),this._modules.unregister(t),this._withCommit(function(){var n=y(e.state,t.slice(0,-1));a.delete(n,t[t.length-1])}),d(this)},l.prototype.hotUpdate=function(t){this._modules.update(t),d(this,!0)},l.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(l.prototype,p);var b=O(function(t,e){var n={};return M(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=j(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof r?r.call(this,e,n):e[r]},n[o].vuex=!0}),n}),w=O(function(t,e){var n={};return M(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var i=j(this.$store,"mapMutations",t);if(!i)return;o=i.context.commit}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}}),n}),x=O(function(t,e){var n={};return M(e).forEach(function(e){var o=e.key,r=e.val;r=t+r,n[o]=function(){if(!t||j(this.$store,"mapGetters",t)){if(r in this.$store.getters)return this.$store.getters[r];console.error("[vuex] unknown getter: "+r)}},n[o].vuex=!0}),n}),$=O(function(t,e){var n={};return M(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var i=j(this.$store,"mapActions",t);if(!i)return;o=i.context.dispatch}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}}),n});function M(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function O(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function j(t,e,n){var o=t._modulesNamespaceMap[n];return o||console.error("[vuex] module namespace not found in "+e+"(): "+n),o}return{Store:l,install:_,version:"3.0.1",mapState:b,mapMutations:w,mapGetters:x,mapActions:$,createNamespacedHelpers:function(t){return{mapState:b.bind(null,t),mapGetters:x.bind(null,t),mapMutations:w.bind(null,t),mapActions:$.bind(null,t)}}}});
10527function MyObject(options) {
10528  for (var field in options) {
10529    this[field] = options[field];
10530  }
10531}
10532var ProfileType = {
10533    GSM : 'GSM',
10534    BLM : 'BLM',
10535    FFTH: 'FFTH',
10536    ASDL: 'ASDL',
10537    ACCOUNT : 'ACCOUNT',
10538};
10539var CustomerType = {
10540    CONSUMER: 'CONSUMER',
10541    BUSINESS: 'BUSINESS'
10542};
10543function SelectedItem(){
10544    let me = this;
10545    MyObject.apply(this,arguments);
10546    this.isDelegated = function(){
10547        return me.hasOwnProperty('delegator');
10548    };
10549    this.isService = function(){
10550        return !me.profile || (me.profile != ProfileType.ACCOUNT);
10551    };
10552
10553    this.isServiceDelegated = function(){
10554        return me.isDelegated() && me.isService();
10555    };
10556    this.getPermissions = function(){
10557        return this.permissions || [];
10558    };
10559    this.canSeeInvoices = function(){
10560        return me.isService() || me.hasPaymentResponsability ||
10561        me.canSeePayments();
10562    };
10563    this.canSeePayments = function(){
10564        return !this.isService() && this.hasPaymentResponsability ||
10565            this.singleService ||
10566            this.consolidateAccount ||
10567            this.isConsumer();
10568
10569    };
10570    this.canSeeExtracts = function(){
10571        return me.isService() || (!me.isService() && !me.hasPaymentResponsability) ;
10572    };
10573
10574    this.getProfile = function(){
10575        return this.profile;
10576    };
10577
10578    this.getType = function(){
10579        return this.customerType;
10580    };
10581
10582    this.isConsumer = function(){
10583        return this.customerType == CustomerType.CONSUMER;
10584    };
10585
10586    this.isRoot = function(){
10587        var me = this;
10588        return portfolioDesktop.portfolio.portfolioItems.filter(function(item){ return item.assetName == me.assetName}).length > 0
10589    };
10590
10591    this.isPosBusiness = function(){
10592        return !(this.isPrePaid) && !this.isConsumer() && this.isService();
10593    };
10594
10595    this.isPosConsumer = function(){
10596        return !(this.isPrePaid) && (this.isConsumer() && this.isService());
10597    };
10598    this.hasAmountDue = function(){
10599        return this.amountDue != 'NO_PAYMENTS' && this.amountDue != null;
10600    };
10601    this.isPostPaidConsumer = function(){
10602        return !(this.isPrePaid) && this.isConsumer();
10603    };
10604    this.isAccountBusiness = function(){
10605        return !this.isService() && !this.isConsumer();
10606    };
10607    this.profileNamed = function(){
10608
10609        let a = me.isConsumer() ? 'CON':'EMP'
10610        let b = me.isPrePaid ? 'PRE' : 'POS';
10611        let c = me.isService() ? me.profile
10612                    : (me.isConsumer() || me.hasPaymentResponsability) ? 'ACC'
10613                    : me.isMotherAccount ? 'ACCM'
10614                    : 'ACCF';
10615        let named = a + '-' + b + '-' + c
10616        if(!me.isService() && !me.isConsumer()) {
10617            named += "-" + (me.hasPaymentResponsability ? 'CRP' : 'SRP');
10618        }
10619
10620        // EMP-POS-GSM-CHBL same view that EMP-POS-GSM changing EC for FP
10621       
10622        if(me.isChooserBilling && !(me.isPrePaid) &&   !me.isConsumer() && (me.profile == ProfileType.GSM)){
10623        named = 'EMP-POS-GSM-CHBL';
10624        }
10625        
10626        return named;
10627    }
10628
10629}
10630
10631/* global $, window, Granite, localStorage , XMLHttpRequest, Uint8Array, navigator, document, setTimeout, defaultMime, btoa*/
10632
10633const myStore = new Vuex.Store({
10634  state: {
10635      selectedItem: new SelectedItem(),
10636      delegations: [],
10637      errorPortfolio: false,
10638      smartSize:0
10639  },
10640  mutations: {
10641    changeSelectedItem: function(state,selectedItem) {
10642      // mutate state
10643      state.selectedItem = selectedItem;
10644    },
10645    itemError: function(state,error) {
10646        state.selectedItem.error = error;
10647    },
10648    hasItemError : function(state){
10649       state.selectedItem.error = true;
10650    },
10651    setErrorPortfolio: function(state,b){
10652        state.errorPortfolio = b;
10653    },
10654    setAmountDue: function(state,amountDue){
10655        state.selectedItem.amountDue = amountDue;
10656    },
10657    setSmartSize: function(state,size){
10658        state.smartSize = size;
10659    }
10660  },
10661  actions: {
10662    changeSelectedItem: function(context,selectedItem) {
10663        context.commit('changeSelectedItem',new SelectedItem(selectedItem));
10664        context.commit('itemError',false);
10665    },
10666    setErrorPortfolio: function(context){
10667        context.commit("setErrorPortfolio",true);
10668    },
10669    removeErrorPortfolio: function(context){
10670        context.commit("setErrorPortfolio",false);
10671    },
10672    setAmountDue: function(context,amountDue){
10673        context.getters.selectedItem.amountDue = amountDue;
10674        context.commit("changeSelectedItem",new SelectedItem(context.getters.selectedItem));
10675    },
10676    setSmartSize: function(context,size){
10677        context.commit("setSmartSize",size);
10678    }
10679
10680  },
10681  getters:{
10682    selectedItem: function(state) {
10683        return state.selectedItem;
10684    },
10685    isDelegated: function(state) {
10686        return state.selectedItem.isDelegated();
10687    },
10688    isService: function(state) {
10689        return state.selectedItem.isService();
10690    },
10691    hasErrorLoadingPortfolio: function(state){
10692        return state.errorPortfolio;
10693    },
10694    smartSize: function(state){
10695        return state.smartSize;
10696    }
10697  }
10698});
10699
10700var PermissionBus = new Vue ({
10701    mixins: [requestHandler, requestValidations, utils, loadingAnimations],
10702    methods : {
10703        hasPermission : function (permissions) {
10704            for(var i in permissions){
10705                if(myStore.state.selectedItem.getPermissions().indexOf(permissions[i]) > -1){
10706                    return true;
10707                }
10708            }
10709            return false;
10710        },
10711        error : function () {
10712            if( !myStore.state.selectedItem.hasOwnProperty('delegator')){
10713                return;
10714            }
10715            if(document.getElementById('sidebar--content--loading')) {
10716                this.removeAnimation('sidebar--content--loading');
10717            }
10718
10719            myStore.commit("hasItemError");
10720        },
10721        hasError : function () {
10722            return myStore.state.selectedItem.error;
10723        }
10724    }
10725});
10726
10727var div_authorizable = Vue.component('authorizable', {
10728    template: '<span v-if="isAuthorizable"><slot></slot></span>',
10729    props: {
10730        authList: Array,
10731        andCondition: {
10732            default: true,
10733            type: Boolean
10734        }
10735
10736    },
10737    data: function(){
10738        return {
10739
10740        }
10741    },
10742    created: function(){
10743        if(!this.authList){
10744            this.authList = [];
10745        }
10746        this.authList.push('NA');
10747    },
10748    computed: {
10749        isAuthorizable:function(){
10750            for(var i in this.authList){
10751                if(myStore.state.selectedItem.getPermissions().indexOf(this.authList[i]) > -1){
10752                    return true && this.andCondition;
10753                }
10754            }
10755            return false;
10756        }
10757    },
10758    methods: {
10759    }
10760});
10761
10762addBeforeUnloadBehaviour = function(vueObject, handler){
10763    if (vueObject.isIE() || vueObject.isBrowserSafari()) {
10764        try{
10765            window.addEventListener('beforeunload', handler());
10766        }catch(e){
10767            window.addEventListener('beforeunload', handler);
10768        }
10769    } else {
10770        window.addEventListener('beforeunload', handler);
10771    }
10772};
10773
10774removeBeforeUnloadBehaviour = function(vueObject, handler){
10775    if (vueObject.isIE() || vueObject.isBrowserSafari()) {
10776        try{
10777            window.removeEventListener('beforeunload', handler());
10778        }catch(e){
10779            window.removeEventListener('beforeunload', handler);
10780        }
10781    } else {
10782        window.removeEventListener('beforeunload', handler);
10783    }
10784};
10785
10786addBeforeUnloadBehaviourInvoiceDetail = function(vueObject, handler){
10787    if (vueObject.isIE() || vueObject.isBrowserSafari()) {
10788        try{
10789            window.addEventListener('beforeunload', handler);
10790        }catch(e){
10791            window.addEventListener('beforeunload', handler);
10792        }
10793    } else {
10794        window.addEventListener('beforeunload', handler);
10795    }
10796};
10797
10798removeBeforeUnloadBehaviourInvoiceDetail = function(vueObject, handler){
10799    if (vueObject.isIE() || vueObject.isBrowserSafari()) {
10800        try{
10801            window.removeEventListener('beforeunload', handler);
10802        }catch(e){
10803            window.removeEventListener('beforeunload', handler);
10804        }
10805    } else {
10806        window.removeEventListener('beforeunload', handler);
10807    }
10808};
10809
10810var ReportsPermissions = new Vue({
10811    data: function() {
10812        return{
10813            selectedItem: {}
10814        }
10815    },
10816    created: function(){
10817        this.selectedItem = myStore.getters.selectedItem;
10818    },
10819
10820
10821    computed: {
10822        'displayCommunications': function() {
10823            //const item = this.selectedItem;
10824            /* visível para todos os tipos de serviços GSM e todos os tipos de contas */
10825            return this.isGSM(myStore.getters.selectedItem) || this.isAccount(myStore.getters.selectedItem);
10826        },
10827        'displayCurrentCharges': function() {
10828            /* visível para uniserviço pós-pago GSM, multisserviços GSM e todos os tipos de contas */
10829            return (this.isGSM(myStore.getters.selectedItem) &&
10830                !this.isPrepaid(myStore.getters.selectedItem))
10831                || this.isAccount(myStore.getters.selectedItem);
10832        },
10833        'displayCostCenter': function() {
10834            /* visível para todos os tipos de contas */
10835            return this.isAccount(myStore.getters.selectedItem);
10836        },
10837
10838        'displayLastDownloads': function() {
10839            /* visível para todos os tipos de serviços GSM e todos os tipos de contas */
10840            return this.isGSM(myStore.getters.selectedItem) || this.isAccount(myStore.getters.selectedItem);
10841        },
10842        'displayCurrentAccountExtract': function() {
10843            /*  visível para uniserviço pós-pag GSM, multisserviços GSM do segmento consumo e todos os tipos de contas. */
10844            const gsm = this.isGSM(myStore.getters.selectedItem);
10845            const uniPosPaid = gsm && !this.isMultiService(myStore.getters.selectedItem) && !this.isPrepaid(myStore.getters.selectedItem);
10846            const multiGSM = gsm && this.isMultiService(myStore.getters.selectedItem) && this.isConsumer(myStore.getters.selectedItem);
10847            const account = this.isAccount(myStore.getters.selectedItem);
10848
10849            return account || multiGSM || uniPosPaid;
10850        },
10851        'displayEnterpriseAccount': function() {
10852            return this.isAccount(myStore.getters.selectedItem) && !this.isConsumer(myStore.getters.selectedItem);
10853        },
10854        'displayInvoiceSummary': function(){
10855            // visivel para conta empresarial e servico pós pago empresarial
10856            const isEntreprise = !this.isConsumer(myStore.getters.selectedItem);
10857            return (!this.isPrepaid(myStore.getters.selectedItem) && isEntreprise) || (this.isAccount(myStore.getters.selectedItem) && isEntreprise);
10858        },
10859        'isOnlyOne' : function() {
10860            return (this.displayCommunications  + this.displayCurrentCharges + this.displayCostCenter  + this.displayCurrentAccountExtract + this.displayEnterpriseAccount + this.displayInvoiceSummary) <= 1;
10861        }
10862    },
10863       methods: {
10864            isPrepaid: function(item) {
10865                return myStore.getters.selectedItem.isPrePaid;
10866            },
10867
10868            isGSM: function(item) {
10869                return item.profile === 'GSM' || item.profile === 'BLM' ;
10870            },
10871            isAccount: function(item) {
10872                return item.profile === 'ACCOUNT';
10873            },
10874
10875            isMultiService: function(item) {
10876                return !item.singleService;
10877            },
10878
10879            isConsumer: function(item) {
10880                return item.customerType === 'CONSUMER';
10881            }
10882        }
10883
10884});
10885
10886
10887var delegationRouter = new Vue({
10888    mixins: [navigation],
10889    data: function() { 
10890        return {
10891            map: {
10892            'faturacao.html' : {account:'pagamentos-movimentos',service:'extratos-consumos'}
10893            },
10894            paymentsPages: ['pagamentos-movimentos']
10895        }
10896    },
10897    methods: {
10898        applyRule: function(){
10899           var item = (myStore.getters.selectedItem);
10900           if(item.isDelegated()){
10901               var currentPage = this.getCurrentPage();
10902               var exist = this.map[currentPage];
10903               if(exist){
10904                    this.redirectPage(item.isService() ? exist.service : exist.account);
10905                    return true;
10906               }
10907               var shortName = this.getShortPageName();
10908
10909               if(shortName.indexOf("extratos-consumos") > -1 &&  (!(item.getPermissions().indexOf('IN') > -1) || !item.canSeeExtracts()) ){
10910                    this.redirectPage('home');
10911                    return true;
10912               }
10913           }
10914
10915           return false;
10916        }
10917    }
10918
10919 });
10920var portfolioMixin = {
10921    mixins: [navigation],
10922    methods: {
10923        delegatedRule: function(){
10924            var item = (myStore.getters.selectedItem);
10925            if(item.isDelegated()){
10926                currentPage = this.getCurrentPage();
10927                return true && (
10928                    //List of pages allowed for delegated
10929                    this.getCurrentPage().indexOf('pagamentos-movimentos.html') > -1 ||
10930                    this.getCurrentPage().indexOf('faturacao/pagamentos.html') > -1 ||
10931                    this.getCurrentPage().indexOf('contratos.html') > -1 ||
10932                    this.getCurrentPage().indexOf('utilizacao-atual.html') > -1 ||
10933                    this.getCurrentPage().indexOf('faturacao/resumo.html') > -1 ||
10934                    this.getCurrentPage().indexOf('faturas-delegadas.html') > -1 ||
10935                    this.getCurrentPage().indexOf('faturas-delegadas/detalhe.html') > -1 ||
10936                    this.getCurrentPage().indexOf('faturas-delegadas/fatura-eletronica.html') > -1 ||
10937                    this.getCurrentPage().indexOf('faturas-delegadas/alerta-sms.html') > -1 ||
10938                    this.getCurrentPage().indexOf('faturacao/debito-direto.html') > -1 ||
10939                    this.getCurrentPage().indexOf('consulta-pedidos-delegados.html') > -1 ||
10940                    this.getCurrentPage().indexOf('relatorios') > -1 ||
10941                    this.getCurrentPage().indexOf('gestao-delegadas.html') > -1 ||
10942                    this.getCurrentPage().indexOf('consulta-pedidos.html') > -1 ||
10943                    this.getCurrentPage().indexOf('gestao-pedidos.html') > -1 ||
10944                    this.getCurrentPage().indexOf('gestao-pedidos/formularios.html') > -1 ||
10945                    this.getCurrentPage().indexOf('controlo-custos.html') > -1 ||
10946                    this.getCurrentPage().indexOf('gestao-patrocinios.html') > -1 ||
10947                    this.getCurrentPage().indexOf('gestao-patrocinios/detalhe.html') > -1 ||
10948                    this.getCurrentPage().indexOf('gestao-patrocinios/comunicacoes.html') > -1 ||
10949                    this.getCurrentPage().indexOf('creditos-automaticos.html') > -1 ||
10950                    this.getCurrentPage().indexOf('creditos-automaticos/conta.html') > -1 ||
10951                    this.getCurrentPage().indexOf('creditos-automaticos/conta/criar.html') > -1 ||
10952                    this.getCurrentPage().indexOf('selecao-custos.html') > -1 ||
10953                    this.getCurrentPage().indexOf('selecao-custos/conta.html') > -1 ||
10954                    this.getCurrentPage().indexOf('selecao-custos/conta/desativar-plafond.html') > -1 ||
10955                    this.getCurrentPage().indexOf('selecao-custos/conta/atribuir-plafond.html') > -1
10956                );
10957            }
10958            return item.isDelegated();
10959        },
10960        isUnavailable: function(status) {
10961            const unavailableStates = ['NO_ACCESS',
10962                'INACTIVE',
10963                'DEACTIVATED',
10964                'TERMINATED'];
10965            return unavailableStates.indexOf(status) >= 0;
10966        },
10967        changeSelectedItemInOtherComponents: function(item, fromPortfolioClick) {
10968            //ATTENTION THIS REDIRECT LOGIC SHOULD BE REVISITED WHEN PAGE BUSINESS CASES ARE ALL WELL DEFINED
10969            if(delegationRouter.applyRule()){
10970                return;
10971            }
10972            var isDelegated = this.delegatedRule();
10973            if (this.getCurrentPage() === 'extratos-consumos.html' || this.getCurrentPage() === 'extratos-consumos/detalhe.html') {
10974                if (this.getCurrentPage() === 'extratos-consumos.html' && !(item.customerType === 'BUSINESS' && !(item.isMotherAccount || (item.profile === 'ACCOUNT' && item.hasPaymentResponsability) || (item.singleService && item.hasPaymentResponsability)))) {
10975                    this.redirectPage('home');
10976                } else if (this.getCurrentPage() === 'extratos-consumos/detalhe.html') {
10977                    if (this.getCurrentPage() === this.getLastPage()) {
10978                        if (localStorage.getItem('invoiceDate')) {
10979                            PortfolioEventBus.$emit('selected-item', item);
10980                        } else {
10981                            this.redirectPage('extratos-consumos');
10982                        }
10983                    } else {
10984                        if (!localStorage.getItem('invoiceDate')) {
10985                            this.redirectPage('extratos-consumos');
10986                        } else {
10987                            PortfolioEventBus.$emit('selected-item', item);
10988                        }
10989                    }
10990                } else {
10991                    PortfolioEventBus.$emit('selected-item', item);
10992                }
10993            } else if (this.shouldRedirectToHomePage(item)) {
10994                this.redirectPage('home');
10995            } else if (this.getCurrentPage() !== 'home.html' &&
10996                item.consolidatedAccount &&
10997                !item.hasPaymentResponsability &&
10998                this.getCurrentPage() !== 'servicos-empresariais.html' &&
10999                this.getCurrentPage() !== 'gestao-acessos.html' &&
11000                this.getCurrentPage() !== 'gerir-delegacoes.html' &&
11001                this.getCurrentPage() !== 'editar-delegacao.html' &&
11002                //This line was added because it was not possible verify the whole logic behind this behaviour.
11003                this.getCurrentPage() !== 'separacao-encargos-delegados.html' &&
11004                this.getCurrentPage() !== 'criar-delegacao.html' && // PORQUE NECESSARIO || AQUI ?????? TODO
11005                this.getCurrentPage() !== 'home.html' &&
11006                (this.getCurrentPage() !== 'extratos-delegados.html' && this.getCurrentPage() !== 'faturas-delegadas.html' && this.getCurrentPage() !== 'contratos.html' && this.getCurrentPage() !== 'utilizacao-atual.html') &&
11007                item.hasOwnProperty('delegator') &&
11008                !isDelegated ) {
11009
11010                this.redirectPage('home');
11011            } else if ((this.getCurrentPage() ===  'saldo-movimentos.html' || this.getCurrentPage() === 'saldo-movimentos/detalhe.html') && !item.isPrePaid) {
11012                if (!item.profile || (item.profile != ProfileType.ACCOUNT)) {
11013                    if (item.customerType == CustomerType.CONSUMER) {
11014                        this.redirectPage('faturacao');
11015                    } else if (item.customerType === 'BUSINESS') {
11016                        this.redirectPage('extratos-consumos');
11017                    }
11018                } else {
11019                    if ((item.isMotherAccount && item.hasPaymentResponsability) || (item.customerType === 'BUSINESS' && !item.isMotherAccount && item.hasPaymentResponsability) || item.customerType == CustomerType.CONSUMER) {
11020                        this.redirectPage('faturacao');
11021                    } else if (item.customerType === 'BUSINESS' && !item.isMotherAccount && !item.consolidatedAccount && !item.hasPaymentResponsability) {
11022                        this.redirectPage('extratos-consumos');
11023                    } else if (item.isMotherAccount && !item.hasPaymentResponsability) {
11024                        this.redirectPage('home');
11025                    }
11026                }
11027            } else if (this.getCurrentPage() === 'servicos-empresariais.html' && item.customerType !== 'BUSINESS') {
11028                this.redirectPage('home');
11029            } else if (this.getCurrentPage() !== 'home.html' && this.isUnavailable(item.status)) {
11030                this.redirectPage('home');
11031            } else if (this.getCurrentPage() === 'produtos-servicos.html' && item.profile !== 'GSM' && item.profile !== 'ACCOUNT' && item.profile !== 'BLM') {
11032                this.redirectPage('home');
11033            } else if (this.getCurrentPage() === 'tarifarios-servicos/servicos.html' && item.profile !== 'GSM') {
11034                this.redirectPage('home');
11035            } else if (this.getCurrentPage() === 'tarifarios-servicos/aditivos.html' && (item.profile === 'FTTH' || item.profile === 'ADSL' || item.profile === 'FEMTOCELL')) {
11036                this.redirectPage('home');
11037            } else if (this.getCurrentPage() === 'tarifarios-servicos/tarifarios.html' && (item.profile === 'FTTH' || item.profile === 'ADSL' || item.profile === 'FEMTOCELL')) {
11038                this.redirectPage('home');
11039            } else if ((this.getCurrentPage() === 'gerir-delegacoes.html' || this.getCurrentPage() === 'gestao-acessos.html') && ((item.customerType !== 'BUSINESS' || item.profile !== 'ACCOUNT') )) {
11040                this.redirectPage('home');
11041            } else if ((item.profile === 'FEMTOCELL' || item.profile === 'ADSL' || item.profile === 'FTTH') && this.getCurrentPage().includes('faturacao')) {
11042                this.redirectPage('home');
11043            } else if (item.isPrePaid) {
11044                if (item.profile === 'GSM' || item.profile === 'BLM') {
11045                    if (this.getCurrentPage() === 'faturacao.html' || this.getCurrentPage() === 'faturas-delegadas.html') {
11046                        this.redirectPage('saldo-movimentos');
11047                    } else if ((this.getCurrentPage() === 'faturacao/detalhe.html' || this.getCurrentPage() === 'faturas-delegadas/detalhe.html' ) || this.getCurrentPage() === 'saldo-movimentos/detalhe.html' && fromPortfolioClick) {
11048                        this.redirectPage('saldo-movimentos');
11049                    } else if ((this.getCurrentPage() === 'faturacao/fatura-eletronica.html' || this.getCurrentPage() === 'faturas-delegadas/fatura-eletronica.html' ) && fromPortfolioClick) {
11050                        this.redirectPage('saldo-movimentos');
11051                    } else if (this.getCurrentPage() === 'faturacao/debito-direto.html') {
11052                        this.redirectPage('saldo-movimentos');
11053                    }else if (this.getCurrentPage() === 'faturacao/resumo.html') {
11054                        this.redirectPage('saldo-movimentos');
11055                    } else {
11056                        PortfolioEventBus.$emit('selected-item', item);
11057                    }
11058                } else {
11059                    PortfolioEventBus.$emit('selected-item', item);
11060                }
11061            } else {
11062                if (this.getCurrentPage() === 'saldo-movimentos.html') {
11063                    this.redirectPage('faturacao');
11064                } else if (this.getCurrentPage() === 'faturacao/fatura-eletronica.html' && fromPortfolioClick && !(item.isChooserBilling && item.insideAccount) ) {
11065                    this.redirectPage('faturacao');
11066                } else if (this.getCurrentPage() === 'faturas-delegadas/fatura-eletronica.html' && fromPortfolioClick) {
11067                    this.redirectPage('faturas-delegadas');
11068                } else if (this.getCurrentPage() === this.getLastPage()) {
11069                    if (this.getCurrentPage() === 'faturacao/detalhe.html' && localStorage.getItem('invoiceDate')) {
11070                        PortfolioEventBus.$emit('selected-item', item);
11071                    } else {
11072                        this.redirectPage(this.getLastPage());
11073                    }
11074                } else if (this.getCurrentPage() === 'faturacao/detalhe.html' && !localStorage.getItem('invoiceDate')) {
11075                    this.redirectPage('faturacao');
11076                } else if (this.getCurrentPage() === 'faturas-delegadas/detalhe.html' && !localStorage.getItem('invoiceDate')) {
11077                    this.redirectPage('faturas-delegadas');
11078                } else if (((item.profile !== 'ACCOUNT' && !item.singleService && !item.isChooserBilling) || (item.profile === 'ACCOUNT' && !item.hasPaymentResponsability)) && (this.getCurrentPage() === 'faturacao/fatura-eletronica.html' || this.getCurrentPage() === 'faturacao/debito-direto.html' )) {
11079
11080                    this.redirectPage('home');
11081                } else {
11082                    PortfolioEventBus.$emit('selected-item', item);
11083                }
11084            }
11085        }
11086
11087    }
11088};
11089
11090var serviceMixins = {
11091    methods: {
11092        isSpecialNumber: function(service) {
11093            return service && service.endsWith('***');
11094        }
11095    }
11096};
11097var myi18n = {
11098    mixins: [utils],
11099    methods:{
11100        getLabel: function(i18nLabel){
11101            result = this.i18nUtils().getProperty(i18nLabel);
11102            result = this.parse(result,arguments)
11103            return (result == i18nLabel ? '' : result);
11104        },
11105        parse: function(text,params){
11106            if(params.length == 1) return text;
11107            let aux = text;
11108            for(var i = 1;i<params.length;i++){
11109                aux = aux.replace("{"+(i-1)+"}",params[i]);
11110            }
11111            return aux;
11112        }
11113    },
11114};
11115
11116(function (global, factory) {
11117	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
11118	typeof define === 'function' && define.amd ? define(factory) :
11119	(global.deepmerge = factory());
11120}(this, (function () { 'use strict';
11121
11122var isMergeableObject = function isMergeableObject(value) {
11123	return isNonNullObject(value)
11124		&& !isSpecial(value)
11125};
11126
11127function isNonNullObject(value) {
11128	return !!value && typeof value === 'object'
11129}
11130
11131function isSpecial(value) {
11132	var stringValue = Object.prototype.toString.call(value);
11133
11134	return stringValue === '[object RegExp]'
11135		|| stringValue === '[object Date]'
11136		|| isReactElement(value)
11137}
11138
11139// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
11140var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
11141var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
11142
11143function isReactElement(value) {
11144	return value.$$typeof === REACT_ELEMENT_TYPE
11145}
11146
11147function emptyTarget(val) {
11148	return Array.isArray(val) ? [] : {}
11149}
11150
11151function cloneUnlessOtherwiseSpecified(value, options) {
11152	return (options.clone !== false && options.isMergeableObject(value))
11153		? deepmerge(emptyTarget(value), value, options)
11154		: value
11155}
11156
11157function defaultArrayMerge(target, source, options) {
11158	return target.concat(source).map(function(element) {
11159		return cloneUnlessOtherwiseSpecified(element, options)
11160	})
11161}
11162
11163function mergeObject(target, source, options) {
11164	var destination = {};
11165	if (options.isMergeableObject(target)) {
11166		Object.keys(target).forEach(function(key) {
11167			destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
11168		});
11169	}
11170	Object.keys(source).forEach(function(key) {
11171		if (!options.isMergeableObject(source[key]) || !target[key]) {
11172			destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
11173		} else {
11174			destination[key] = deepmerge(target[key], source[key], options);
11175		}
11176	});
11177	return destination
11178}
11179
11180function deepmerge(target, source, options) {
11181	options = options || {};
11182	options.arrayMerge = options.arrayMerge || defaultArrayMerge;
11183	options.isMergeableObject = options.isMergeableObject || isMergeableObject;
11184
11185	var sourceIsArray = Array.isArray(source);
11186	var targetIsArray = Array.isArray(target);
11187	var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
11188
11189	if (!sourceAndTargetTypesMatch) {
11190		return cloneUnlessOtherwiseSpecified(source, options)
11191	} else if (sourceIsArray) {
11192		return options.arrayMerge(target, source, options)
11193	} else {
11194		return mergeObject(target, source, options)
11195	}
11196}
11197
11198deepmerge.all = function deepmergeAll(array, options) {
11199	if (!Array.isArray(array)) {
11200		throw new Error('first argument should be an array')
11201	}
11202
11203	return array.reduce(function(prev, next) {
11204		return deepmerge(prev, next, options)
11205	}, {})
11206};
11207
11208var deepmerge_1 = deepmerge;
11209
11210return deepmerge_1;
11211
11212})));
11213
11214!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.shvl={})}(this,function(e){e.get=function(e,t,n){return void 0===(e=(t.split?t.split("."):t).reduce(function(e,t){return e&&e[t]},e))?n:e},e.set=function(e,t,n,i){return(t=t.split?t.split("."):t).slice(0,-1).reduce(function(e,t){return e[t]=e[t]||{}},e)[t.pop()]=n,e}});
11215
11216!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("deepmerge"),require("shvl")):"functi
vendor: 4,109 bytes, lines 11216-11246
11216on"==typeof define&&define.amd?define(["deepmerge","shvl"],t):e.createPersistedState=t(e.deepmerge,e.shvl)}(this,function(e,t){return e=e&&e.hasOwnProperty("default")?e.default:e,function(r,n,u){function o(e,t,r){try{return(r=t.getItem(e))&&void 0!==r?JSON.parse(r):void 0}catch(e){}}if(n=(r=r||{}).storage||window&&window.localStorage,u=r.key||"vuex",!function(e){try{return e.setItem("@@",1),e.removeItem("@@"),!0}catch(e){}return!1}(n))throw new Error("Invalid storage instance given");return function(i){var c=t.get(r,"getState",o)(u,n);"object"==typeof c&&null!==c&&i.replaceState(e(i.state,c,{arrayMerge:r.arrayMerger||function(e,t){return t},clone:!1})),(r.subscriber||function(e){return function(t){return e.subscribe(t)}})(i)(function(e,o){(r.filter||function(){return!0})(e)&&(r.setState||function(e,t,r){return r.setItem(e,JSON.stringify(t))})(u,(r.reducer||function(e,r){return 0===r.length?e:r.reduce(function(r,n){return t.set(r,n,t.get(e,n))},{})})(o,r.paths||[]),n)})}}});
11217
11218/* @preserve
11219 * The MIT License (MIT)
11220 * 
11221 * Copyright (c) 2013-2018 Petka Antonov
11222 * 
11223 * Permission is hereby granted, free of charge, to any person obtaining a copy
11224 * of this software and associated documentation files (the "Software"), to deal
11225 * in the Software without restriction, including without limitation the rights
11226 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11227 * copies of the Software, and to permit persons to whom the Software is
11228 * furnished to do so, subject to the following conditions:
11229 * 
11230 * The above copyright notice and this permission notice shall be included in
11231 * all copies or substantial portions of the Software.
11232 * 
11233 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11234 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11235 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
11236 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11237 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
11238 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
11239 * THE SOFTWARE.
11240 * 
11241 */
11242/**
11243 * bluebird build version 3.5.5
11244 * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
11245*/
11246!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new h(16),this._normalQueue=new h(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=p}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}function a(t){for(;t.length()>0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),h=t("./queue"),f=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;
vendor: 1,577 bytes, line 11246
11246return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n    See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1}
vendor: 4,404 bytes, line 11246
11246,e.exports=r,e.exports.firstLineError=l},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(c){var l=a._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];
vendor: 5,335 bytes, line 11246
11246if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var h=o(p).call(l,c);if(h===s)return h;if(h)return o(n).call(l,c)}else if(r.isObject(c)){for(var f=i(p),_=0;_<f.length;++_){var d=f[_];if(p[d]!=c[d])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new O(this._peekContext())}function _(t,e){if(U(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=C(a),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match($);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),m(n)}function m(t,n,r){if(at.warnings){var i,o=new N(t);if(n)r._attachExtraTrace(o);else if(at.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=E(o);o.stack=s.message+"\n"+s.stack.join("\n")}nt("warning",o)||k(o,"",!0)}}function g(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function b(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i="    (No stack trace)"===r||Q.test(r),o=i&&it(r);i&&!o&&(z&&" "!==r.charAt(0)&&(r="    "+r),e.push(r))}return e}function j(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if("    (No stack trace)"===r||Q.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?j(t):["    (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof V?V(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){L.throwLater(o)}
vendor: 9,849 bytes, line 11246
11246"unhandledRejection"===t?nt(t,n,r)||i||k(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function P(){return"function"==typeof st}function S(t){var e=t.match(ot);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(P()){for(var n,r,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),s=-1,a=-1,c=0;c<i.length;++c){var l=S(i[c]);if(l){n=l.fileName,s=l.line;break}}for(var c=0;c<o.length;++c){var l=S(o[c]);if(l){r=l.fileName,a=l.line;break}}0>s||0>a||!n||!r||n!==r||s>=a||(it=function(t){if(M.test(t))return!0;var e=S(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function O(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);st(this,O),e>32&&this.uncycle()}var A,D,V,I=e._getDomain,L=e._async,N=t("./errors").Warning,H=t("./util"),B=t("./es5"),U=H.canAttachTrace,M=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,$=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,Q=null,G=null,z=!1,X=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),W=!(0==H.env("BLUEBIRD_WARNINGS")||!X&&!H.env("BLUEBIRD_WARNINGS")),K=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!X&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(W||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",D,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return m(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=I();D="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=I();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n    See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;at.longStackTraces=!0,Y=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n    See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),L.enableTrampoline(),at.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,e.prototype._dereferenceTrace=d,n.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return at.longStackTraces&&P()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!H.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason}),!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){L.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){L.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;at.warnings=!!n,J=at.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,rt=u,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&at.monitoring&&(at.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(O,Error),n.CapturedTrace=O,O.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},O.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),b(r),H.notEnumerableProp(t,"stack",g(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var st=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,Q=t,G=e;var n=Error.captureStackTrace;return it=function(t){return M.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return Q=/@/,G=e,z=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(Q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(V=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?V=function(t,e){var n=e?"�[33m":"�[31m";console.warn(n+t+"�[0m\n")}:H.isNode||"string"!=typeof(new Error).stack||(V=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:W,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return h},checkForgottenReturns:v,setBounds:R,warn:m,deprecated:y,CapturedTrace:O,fireDomEvent:Z,fireGlobalEvent:tt}}}
vendor: 19,419 bytes, lines 11246-11247
11246,{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<y.length;++m)"function"==typeof Array.prototype[y[m]]&&(d.prototype[y[m]]=Array.prototype[y[m]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return g--,e},u(i,Error);var b=Error.__BluebirdErrorTypes__;b||(b=c({CancellationError:f,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(e){return s}},h=function(t){try{return"[object Array]"===o.call(t)}catch(e){return!1}};e.exports={isArray:h,keys:a,names:a,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function s(t,e){return null!=t.cancelPromise?(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return l.call(this,this.promise._target()._settledValue())}function c(t){return s(this,t)?void 0:(h.e=t,h)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var f=n(u,i);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var _=new p("late cancellation observer");return i._attachExtraTrace(_),h.e=_,h}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(a,c,void 0,this,void 0)}}}return i.isRejected()?(s(this),h.e=t,h):(s(this),t)}var u=t("./util"),p=e.CancellationError,h=u.errorObj,f=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var s=arguments[r];if(!u.isObject(s))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(s)));i[o++]=s}i.length=o;var a=arguments[r];return this._passThrough(f(i,a,this),1,void 0,l)},i}},{"./catch_filter":7,"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(t);if(r._popContext(),s===h){r._pushContext();var a=e.reject(h.e);return r._popContext(),a}var c=i(s,r);if(c instanceof e)return c}return null}function c(t,n,i,o){if(s.cancellation()){var a=new e(r),c=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{var l=this._promise=new e(r);l._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var l=t("./errors"),u=l.TypeError,p=t("./util"),h=p.errorObj,f=p.tryCatch,_=[];p.inherits(c,o),c.prototype._isResolved=function(){return null===this._promise},c.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},c.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n="undefined"!=typeof this._generator["return"];if(n)this._promise._pushContext(),t=f(this._generator["return"]).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=f(this._generator["throw"]).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},c.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=f(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=f(this._generator["throw"]).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},c.prototype.promise=function(){return this._promise},c.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},c.prototype._continue=function(t){var n=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(!(o instanceof e)&&(o=a(o,this._yieldHandlers,this._promise),
11247null===o))return void this._promiseRejected(new u("A value %s was yielded that could not be treated as a promise\n\n    See http://goo.gl/MqrFmX\n\n".replace("%s",String(r))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0===(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n    See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=c,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new u("expecting a function but got "+p.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n    See http://goo.gl/MqrFmX\n");var r=new c(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;n>o;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(a(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===c&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===c&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===c&&s.throwLater(i.e)}var o=t("./util"),s=e._async,a=o.tryCatch,c=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if(null==t||t.constructor!==i)throw new m("the promise constructor cannot be invoked directly\n\n    See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new m("expecting a function but got "+f.classString(e))}function i(t){t!==b&&r(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function a(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new m("circular promise resolution chain\n\n    See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new m(t))},h={},f=t("./util");c=f.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},f.notEnumerableProp(i,"_getDomain",c);var _=t("./es5"),d=t("./async"),v=new d;_.defineProperty(i,"_async",{value:v});var y=t("./errors"),m=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var g=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},w={},C={},j=t("./thenables")(i,b),E=t("./promise_array")(i,b,j,p,n),k=t("./context")(i),F=k.create,T=t("./debuggability")(i,k),x=(T.CapturedTrace,t("./finally")(i,j,C)),P=t("./catch_filter")(C),S=t("./nodeback"),R=f.errorObj,O=f.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("Catch statement predicate: expecting an object but got "+f.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new m("The last argument to .catch() must be a function, got "+f.toString(t));return this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(T.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(S(e,n));return r===R&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e}
vendor: 4,150 bytes, line 11247
11247,i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;
vendor: 5,577 bytes, line 11247
11247if(!i&&!n&&T.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=R,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===R?r._rejectCallback(o.e,!1):(T.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof x&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===R&&t._reject(R.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&_.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){T.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,T),t("./bind")(i,b,j,T),t("./cancel")(i,E,p,T),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.5.5",t("./call_get.js")(i),t("./generators.js")(i,p,b,j,n,T),t("./map.js")(i,E,p,j,b,T),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,T),t("./settle.js")(i,E,T),t("./some.js")(i,E,p),t("./timers.js")(i,b,T),t("./using.js")(i,p,j,F,b,T),t("./any.js")(i),t("./each.js")(i,b),t("./filter.js")(i,b),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),T.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(t){var r=this._promise=new e(n);
vendor: 2,027 bytes, line 11247
11247t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0}
vendor: 4,517 bytes, line 11247
11247,a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!C.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,n){var r=f.getDataPropertyOrDefault(t,e+n,b);return r?i(r):!1}function s(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new m("Cannot promisify an API that has normal methods with '%s'-suffix\n\n    See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=f.inheritedDataKeys(t),c=[],l=0;l<a.length;++l){var u=a[l],p=t[u],h=r===j?!0:j(u,p,t);"function"!=typeof p||i(p)||o(t,u,e)||!r(u,p,t,h)||c.push(u,p)}return s(c,e,n),c}function c(t,r,i,o,s,a){function c(){var i=r;r===h&&(i=this);var o=new e(n);o._captureStackTrace();var s="string"==typeof u&&this!==l?this[u]:t,c=_(o,a);try{s.apply(i,d(arguments,c))}catch(p){o._rejectCallback(v(p),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var l=function(){return this}(),u=t;return"string"==typeof u&&(t=o),f.notEnumerableProp(c,"__isPromisified__",!0),c}function l(t,e,n,r,i){for(var o=new RegExp(E(e)+"$"),s=a(t,e,o,n),c=0,l=s.length;l>c;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n    See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n    See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;a<s.length;++a){var c=t[s[a]];"constructor"!==s[a]&&f.isClass(c)&&(l(c.prototype,r,i,o,n),l(c,r,i,o,n))}return l(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==a&&t instanceof a)e=p(t),n=!0;else{var r=u.keys(t),i=r.length;e=new Array(2*i);for(var o=0;i>o;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n    See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}}
vendor: 5,833 bytes, lines 11247-11248
11247,{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var c=r(t);if(c instanceof e)return a(c);if(t=s.asArray(t),null===t)return i("expecting an array or an iterable object but got "+s.classString(t));var l=new e(n);void 0!==o&&l._propagateFrom(o,3);for(var u=l._fulfill,p=l._reject,h=0,f=t.length;f>h;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n    See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}():"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o;e.exports=r},{"./util":36
11248}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)}
vendor: 11,242 bytes, line 11248
11248,i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n    See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n    See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n    See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p<b.length;++p)b[p]=e.resolve(c[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return y.e=n.error(),y;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=m(i);var r=a?i.apply(void 0,t):i(t),o=C._popContext();return s.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return l(c,t)});return c.promise=C,C._setOnCancel(c),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return x.e=e,x}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}
11248function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{F.defineProperty(e,o,F.getDescriptor(t,o))}catch(s){}}}function j(t){return H?process.env[t]:void 0}function E(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(e){}}function k(t,e){return t.bind(e)}var F=t("./es5"),T="undefined"==typeof navigator,x={e:{}},P,S="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,R=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(F.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(s){return r}for(var a=0;a<o.length;++a){var c=o[a];if(!i[c]){i[c]=!0;var l=Object.getOwnPropertyDescriptor(t,c);null!=l&&null==l.get&&null==l.set&&r.push(c)}}t=F.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,V=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),I=function(t){return F.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};I=function(t){return F.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var N="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),H="undefined"!=typeof process&&"undefined"!=typeof process.env,B={isClass:h,isIdentifier:_,inheritedDataKeys:O,getDataPropertyOrDefault:l,thrower:p,isArray:F.isArray,asArray:I,notEnumerableProp:u,isPrimitive:o,isObject:s,isError:y,canEvaluate:T,errorObj:x,tryCatch:i,inherits:R,withAppended:c,maybeWrapAsError:a,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:V,originatesFromRejection:g,markAsOriginatingFromRejection:m,classString:w,copyDescriptors:C,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:N,hasEnvVariables:H,env:j,global:S,getNativePromise:E,domainBind:k};B.isRecentNode=B.isNode&&function(){var t;return process.versions&&process.versions.node?t=process.versions.node.split(".").map(Number):process.version&&(t=process.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(U){B.lastLineError=U}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise);
11249var LZString=function(){function o(o,r){if(!t[o]){t[o]={};for(var n=0;n<o.length;n++)t[o][o.charAt(n)]=n}return t[o][r]}var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",t={},i={compressToBase64:function(o){if(null==o)return"";var r=i._compress(o,6,function(o){return n.charAt(o)});switch(r.length%4){default:case 0:return r;case 1:return r+"===";case 2:return r+"==";case 3:return r+"="}},decompressFromBase64:function(r){return null==r?"":""==r?null:i._decompress(r.length,32,function(e){return o(n,r.charAt(e))})},compressToUTF16:function(o){return null==o?"":i._compress(o,15,function(o){return r(o+32)})+" "},decompressFromUTF16:function(o){return null==o?"":""==o?null:i._decompress(o.length,16384,function(r){return o.charCodeAt(r)-32})},compressToUint8Array:function(o){for(var r=i.compress(o),n=new Uint8Array(2*r.length),e=0,t=r.length;t>e;e++){var s=r.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n}
11249,decompressFromUint8Array:function(o){if(null===o||void 0===o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;t>e;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(o){return null==o?"":i._compress(o,6,function(o){return e.charAt(o)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(n){return o(e,r.charAt(n))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(o,r,n){if(null==o)return"";var e,t,i,s={},p={},u="",c="",a="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<o.length;i+=1)if(u=o.charAt(i),Object.prototype.hasOwnProperty.call(s,u)||(s[u]=f++,p[u]=!0),c=a+u,Object.prototype.hasOwnProperty.call(s,c))a=c;else{if(Object.prototype.hasOwnProperty.call(p,a)){if(a.charCodeAt(0)<256){for(e=0;h>e;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++),s[c]=f++,a=String(u)}if(""!==a){if(Object.prototype.hasOwnProperty.call(p,a)){if(a.charCodeAt(0)<256){for(e=0;h>e;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==r-1){d.push(n(m));break}v++}return d.join("")},decompress:function(o){return null==o?"":""==o?null:i._decompress(o.length,32768,function(r){return o.charCodeAt(r)})},_decompress:function(o,n,e){var t,i,s,p,u,c,a,l,f=[],h=4,d=4,m=3,v="",w=[],A={val:e(0),position:n,index:1};for(i=0;3>i;i+=1)f[i]=i;for(p=0,c=Math.pow(2,2),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(t=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 2:return""}for(f[3]=l,s=l,w.push(l);;){if(A.index>o)return"";for(p=0,c=Math.pow(2,m),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(l=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 2:return w.join("")}if(0==h&&(h=Math.pow(2,m),m++),f[l])v=f[l];else{if(l!==d)return null;v=s+s.charAt(0)}w.push(v),f[d++]=s+v.charAt(0),h--,s=v,0==h&&(h=Math.pow(2,m),m++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module&&(module.exports=LZString);
11250var VueObserveVisibility=function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}
vendor: 2,816 bytes, lines 11250-11251
11250var r=function(){function e(t,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(i,n)}var t,r,o;return t=e,(r=[{key:"createObserver",value:function(e,t){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){var r;if(this.options="function"==typeof(r=e)?{callback:r}:r,this.callback=function(e,t){i.options.callback(e,t),e&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var o=(this.options.throttleOptions||{}).leading;this.callback=function(e,t){var i,r,o,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=function(s){for(var a=arguments.length,c=new Array(a>1?a-1:0),u=1;u<a;u++)c[u-1]=arguments[u];if(o=c,!i||s!==r){var f=l.leading;"function"==typeof f&&(f=f(s,r)),i&&s===r||!f||e.apply(void 0,[s].concat(n(o))),r=s,clearTimeout(i),i=setTimeout(function(){e.apply(void 0,[s].concat(n(o))),i=0},t)}};return s._clear=function(){clearTimeout(i),i=null},s}(this.callback,this.options.throttle,{leading:function(e){return"both"===o||"visible"===o&&e||"hidden"===o&&!e}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(e){var t=e[0];if(e.length>1){var n=e.find(function(e){return e.isIntersecting});n&&(t=n)}if(i.callback){var r=t.isIntersecting&&t.intersectionRatio>=i.threshold;if(r===i.oldResult)return;i.oldResult=r,i.callback(r,t)}},this.options.intersection),t.context.$nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&this.options.intersection.threshold||0}}])&&i(t.prototype,r),o&&i(t,o),e}();function o(e,t,i){var n=t.value;if(n)if("undefined"==typeof IntersectionObserver)console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new r(e,n,i);e._vue_visibilityState=o}}function l(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var s={bind:o,update:function(e,i,n){var r=i.value;if(!function e(i,n){if(i===n)return!0;if("object"===t(i)){for(var r in i)if(!e(i[r],n[r]))return!1;return!0}return!1}(r,i.oldValue)){var s=e._vue_visibilityState;r?s?s.createObserver(r,n):o(e,{value:r},n):l(e)}},unbind:l};function a(e){e.directive("observe-visibility",s)}var c={version:"0.4.6",install:a},u=null;return"undefined"!=typeof window?u=window.Vue:"undefined"!=typeof global&&(u=global.Vue),u&&u.use(c),e.ObserveVisibility=s,e.default=c,e.install=a,e}({});
11251

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.