1/*! 2 * jQuery JavaScript Library v3.6.0 3 * https://jquery.com/ 4 * 5 * Includes Sizzle.js 6 * https://sizzlejs.com/ 7 * 8 * Copyright OpenJS Foundation and other contributors 9 * Released under the MIT license 10 * https://jquery.org/license 11 * 12 * Date: 2021-03-02T17:08Z 13 */ 14( function( global, factory ) { 15 16 "use strict";
vendor: 6,502 bytes, lines 16-262
16 17 18 if ( typeof module === "object" && typeof module.exports === "object" ) { 19 20 // For CommonJS and CommonJS-like environments where a proper `window` 21 // is present, execute the factory and get jQuery. 22 // For environments that do not have a `window` with a `document` 23 // (such as Node.js), expose a factory as module.exports. 24 // This accentuates the need for the creation of a real `window`. 25 // e.g. var jQuery = require("jquery")(window); 26 // See ticket #14549 for more info. 27 module.exports = global.document ? 28 factory( global, true ) : 29 function( w ) { 30 if ( !w.document ) { 31 throw new Error( "jQuery requires a window with a document" ); 32 } 33 return factory( w ); 34 }; 35 } else { 36 factory( global ); 37 } 38 39// Pass this if window is not defined yet 40} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { 41 42// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 43// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode 44// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common 45// enough that all such attempts are guarded in a try block. 46"use strict"; 47 48var arr = []; 49 50var getProto = Object.getPrototypeOf; 51 52var slice = arr.slice; 53 54var flat = arr.flat ? function( array ) { 55 return arr.flat.call( array ); 56} : function( array ) { 57 return arr.concat.apply( [], array ); 58}; 59 60 61var push = arr.push; 62 63var indexOf = arr.indexOf; 64 65var class2type = {}; 66 67var toString = class2type.toString; 68 69var hasOwn = class2type.hasOwnProperty; 70 71var fnToString = hasOwn.toString; 72 73var ObjectFunctionString = fnToString.call( Object ); 74 75var support = {}; 76 77var isFunction = function isFunction( obj ) { 78 79 // Support: Chrome <=57, Firefox <=52 80 // In some browsers, typeof returns "function" for HTML <object> elements 81 // (i.e., `typeof document.createElement( "object" ) === "function"`). 82 // We don't want to classify *any* DOM node as a function. 83 // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 84 // Plus for old WebKit, typeof returns "function" for HTML collections 85 // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) 86 return typeof obj === "function" && typeof obj.nodeType !== "number" && 87 typeof obj.item !== "function"; 88 }; 89 90 91var isWindow = function isWindow( obj ) { 92 return obj != null && obj === obj.window; 93 }; 94 95 96var document = window.document; 97 98 99 100 var preservedScriptAttributes = { 101 type: true, 102 src: true, 103 nonce: true, 104 noModule: true 105 }; 106 107 function DOMEval( code, node, doc ) { 108 doc = doc || document; 109 110 var i, val, 111 script = doc.createElement( "script" ); 112 113 script.text = code; 114 if ( node ) { 115 for ( i in preservedScriptAttributes ) { 116 117 // Support: Firefox 64+, Edge 18+ 118 // Some browsers don't support the "nonce" property on scripts. 119 // On the other hand, just using `getAttribute` is not enough as 120 // the `nonce` attribute is reset to an empty string whenever it 121 // becomes browsing-context connected. 122 // See https://github.com/whatwg/html/issues/2369 123 // See https://html.spec.whatwg.org/#nonce-attributes 124 // The `node.getAttribute` check was added for the sake of 125 // `jQuery.globalEval` so that it can fake a nonce-containing node 126 // via an object. 127 val = node[ i ] || node.getAttribute && node.getAttribute( i ); 128 if ( val ) { 129 script.setAttribute( i, val ); 130 } 131 } 132 } 133 doc.head.appendChild( script ).parentNode.removeChild( script ); 134 } 135 136 137function toType( obj ) { 138 if ( obj == null ) { 139 return obj + ""; 140 } 141 142 // Support: Android <=2.3 only (functionish RegExp) 143 return typeof obj === "object" || typeof obj === "function" ? 144 class2type[ toString.call( obj ) ] || "object" : 145 typeof obj; 146} 147/* global Symbol */ 148// Defining this global in .eslintrc.json would create a danger of using the global 149// unguarded in another place, it seems safer to define global only for this module 150 151 152 153var 154 version = "3.6.0", 155 156 // Define a local copy of jQuery 157 jQuery = function( selector, context ) { 158 159 // The jQuery object is actually just the init constructor 'enhanced' 160 // Need init if jQuery is called (just allow error to be thrown if not included) 161 return new jQuery.fn.init( selector, context ); 162 }; 163 164jQuery.fn = jQuery.prototype = { 165 166 // The current version of jQuery being used 167 jquery: version, 168 169 constructor: jQuery, 170 171 // The default length of a jQuery object is 0 172 length: 0, 173 174 toArray: function() { 175 return slice.call( this ); 176 }, 177 178 // Get the Nth element in the matched element set OR 179 // Get the whole matched element set as a clean array 180 get: function( num ) { 181 182 // Return all the elements in a clean array 183 if ( num == null ) { 184 return slice.call( this ); 185 } 186 187 // Return just the one element from the set 188 return num < 0 ? this[ num + this.length ] : this[ num ]; 189 }, 190 191 // Take an array of elements and push it onto the stack 192 // (returning the new matched element set) 193 pushStack: function( elems ) { 194 195 // Build a new jQuery matched element set 196 var ret = jQuery.merge( this.constructor(), elems ); 197 198 // Add the old object onto the stack (as a reference) 199 ret.prevObject = this; 200 201 // Return the newly-formed element set 202 return ret; 203 }, 204 205 // Execute a callback for every element in the matched set. 206 each: function( callback ) { 207 return jQuery.each( this, callback ); 208 }, 209 210 map: function( callback ) { 211 return this.pushStack( jQuery.map( this, function( elem, i ) { 212 return callback.call( elem, i, elem ); 213 } ) ); 214 }, 215 216 slice: function() { 217 return this.pushStack( slice.apply( this, arguments ) ); 218 }, 219 220 first: function() { 221 return this.eq( 0 ); 222 }, 223 224 last: function() { 225 return this.eq( -1 ); 226 }, 227 228 even: function() { 229 return this.pushStack( jQuery.grep( this, function( _elem, i ) { 230 return ( i + 1 ) % 2; 231 } ) ); 232 }, 233 234 odd: function() { 235 return this.pushStack( jQuery.grep( this, function( _elem, i ) { 236 return i % 2; 237 } ) ); 238 }, 239 240 eq: function( i ) { 241 var len = this.length, 242 j = +i + ( i < 0 ? len : 0 ); 243 return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 244 }, 245 246 end: function() { 247 return this.prevObject || this.constructor(); 248 }, 249 250 // For internal use only. 251 // Behaves like an Array's method, not like a jQuery method. 252 push: push, 253 sort: arr.sort, 254 splice: arr.splice 255}; 256 257jQuery.extend = jQuery.fn.extend = function() { 258 var options, name, src, copy, copyIsArray, clone, 259 target = arguments[ 0 ] || {}, 260 i = 1, 261 length = arguments.length, 262 deep = false;
vendor: 180,765 bytes, lines 263-6949
263 264 // Handle a deep copy situation 265 if ( typeof target === "boolean" ) { 266 deep = target; 267 268 // Skip the boolean and the target 269 target = arguments[ i ] || {}; 270 i++; 271 } 272 273 // Handle case when target is a string or something (possible in deep copy) 274 if ( typeof target !== "object" && !isFunction( target ) ) { 275 target = {}; 276 } 277 278 // Extend jQuery itself if only one argument is passed 279 if ( i === length ) { 280 target = this; 281 i--; 282 } 283 284 for ( ; i < length; i++ ) { 285 286 // Only deal with non-null/undefined values 287 if ( ( options = arguments[ i ] ) != null ) { 288 289 // Extend the base object 290 for ( name in options ) { 291 copy = options[ name ]; 292 293 // Prevent Object.prototype pollution 294 // Prevent never-ending loop 295 if ( name === "__proto__" || target === copy ) { 296 continue; 297 } 298 299 // Recurse if we're merging plain objects or arrays 300 if ( deep && copy && ( jQuery.isPlainObject( copy ) || 301 ( copyIsArray = Array.isArray( copy ) ) ) ) { 302 src = target[ name ]; 303 304 // Ensure proper type for the source value 305 if ( copyIsArray && !Array.isArray( src ) ) { 306 clone = []; 307 } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { 308 clone = {}; 309 } else { 310 clone = src; 311 } 312 copyIsArray = false; 313 314 // Never move original objects, clone them 315 target[ name ] = jQuery.extend( deep, clone, copy ); 316 317 // Don't bring in undefined values 318 } else if ( copy !== undefined ) { 319 target[ name ] = copy; 320 } 321 } 322 } 323 } 324 325 // Return the modified object 326 return target; 327}; 328 329jQuery.extend( { 330 331 // Unique for each copy of jQuery on the page 332 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 333 334 // Assume jQuery is ready without the ready module 335 isReady: true, 336 337 error: function( msg ) { 338 throw new Error( msg ); 339 }, 340 341 noop: function() {}, 342 343 isPlainObject: function( obj ) { 344 var proto, Ctor; 345 346 // Detect obvious negatives 347 // Use toString instead of jQuery.type to catch host objects 348 if ( !obj || toString.call( obj ) !== "[object Object]" ) { 349 return false; 350 } 351 352 proto = getProto( obj ); 353 354 // Objects with no prototype (e.g., `Object.create( null )`) are plain 355 if ( !proto ) { 356 return true; 357 } 358 359 // Objects with prototype are plain iff they were constructed by a global Object function 360 Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; 361 return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; 362 }, 363 364 isEmptyObject: function( obj ) { 365 var name; 366 367 for ( name in obj ) { 368 return false; 369 } 370 return true; 371 }, 372 373 // Evaluates a script in a provided context; falls back to the global one 374 // if not specified. 375 globalEval: function( code, options, doc ) { 376 DOMEval( code, { nonce: options && options.nonce }, doc ); 377 }, 378 379 each: function( obj, callback ) { 380 var length, i = 0; 381 382 if ( isArrayLike( obj ) ) { 383 length = obj.length; 384 for ( ; i < length; i++ ) { 385 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 386 break; 387 } 388 } 389 } else { 390 for ( i in obj ) { 391 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 392 break; 393 } 394 } 395 } 396 397 return obj; 398 }, 399 400 // results is for internal usage only 401 makeArray: function( arr, results ) { 402 var ret = results || []; 403 404 if ( arr != null ) { 405 if ( isArrayLike( Object( arr ) ) ) { 406 jQuery.merge( ret, 407 typeof arr === "string" ? 408 [ arr ] : arr 409 ); 410 } else { 411 push.call( ret, arr ); 412 } 413 } 414 415 return ret; 416 }, 417 418 inArray: function( elem, arr, i ) { 419 return arr == null ? -1 : indexOf.call( arr, elem, i ); 420 }, 421 422 // Support: Android <=4.0 only, PhantomJS 1 only 423 // push.apply(_, arraylike) throws on ancient WebKit 424 merge: function( first, second ) { 425 var len = +second.length, 426 j = 0, 427 i = first.length; 428 429 for ( ; j < len; j++ ) { 430 first[ i++ ] = second[ j ]; 431 } 432 433 first.length = i; 434 435 return first; 436 }, 437 438 grep: function( elems, callback, invert ) { 439 var callbackInverse, 440 matches = [], 441 i = 0, 442 length = elems.length, 443 callbackExpect = !invert; 444 445 // Go through the array, only saving the items 446 // that pass the validator function 447 for ( ; i < length; i++ ) { 448 callbackInverse = !callback( elems[ i ], i ); 449 if ( callbackInverse !== callbackExpect ) { 450 matches.push( elems[ i ] ); 451 } 452 } 453 454 return matches; 455 }, 456 457 // arg is for internal usage only 458 map: function( elems, callback, arg ) { 459 var length, value, 460 i = 0, 461 ret = []; 462 463 // Go through the array, translating each of the items to their new values 464 if ( isArrayLike( elems ) ) { 465 length = elems.length; 466 for ( ; i < length; i++ ) { 467 value = callback( elems[ i ], i, arg ); 468 469 if ( value != null ) { 470 ret.push( value ); 471 } 472 } 473 474 // Go through every key on the object, 475 } else { 476 for ( i in elems ) { 477 value = callback( elems[ i ], i, arg ); 478 479 if ( value != null ) { 480 ret.push( value ); 481 } 482 } 483 } 484 485 // Flatten any nested arrays 486 return flat( ret ); 487 }, 488 489 // A global GUID counter for objects 490 guid: 1, 491 492 // jQuery.support is not used in Core but other projects attach their 493 // properties to it so it needs to exist. 494 support: support 495} ); 496 497if ( typeof Symbol === "function" ) { 498 jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; 499} 500 501// Populate the class2type map 502jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 503 function( _i, name ) { 504 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 505 } ); 506 507function isArrayLike( obj ) { 508 509 // Support: real iOS 8.2 only (not reproducible in simulator) 510 // `in` check used to prevent JIT error (gh-2145) 511 // hasOwn isn't used here due to false negatives 512 // regarding Nodelist length in IE 513 var length = !!obj && "length" in obj && obj.length, 514 type = toType( obj ); 515 516 if ( isFunction( obj ) || isWindow( obj ) ) { 517 return false; 518 } 519 520 return type === "array" || length === 0 || 521 typeof length === "number" && length > 0 && ( length - 1 ) in obj; 522} 523var Sizzle = 524/*! 525 * Sizzle CSS Selector Engine v2.3.6 526 * https://sizzlejs.com/ 527 * 528 * Copyright JS Foundation and other contributors 529 * Released under the MIT license 530 * https://js.foundation/ 531 * 532 * Date: 2021-02-16 533 */ 534( function( window ) { 535var i, 536 support, 537 Expr, 538 getText, 539 isXML, 540 tokenize, 541 compile, 542 select, 543 outermostContext, 544 sortInput, 545 hasDuplicate, 546 547 // Local document vars 548 setDocument, 549 document, 550 docElem, 551 documentIsHTML, 552 rbuggyQSA, 553 rbuggyMatches, 554 matches, 555 contains, 556 557 // Instance-specific data 558 expando = "sizzle" + 1 * new Date(), 559 preferredDoc = window.document, 560 dirruns = 0, 561 done = 0, 562 classCache = createCache(), 563 tokenCache = createCache(), 564 compilerCache = createCache(), 565 nonnativeSelectorCache = createCache(), 566 sortOrder = function( a, b ) { 567 if ( a === b ) { 568 hasDuplicate = true; 569 } 570 return 0; 571 }, 572 573 // Instance methods 574 hasOwn = ( {} ).hasOwnProperty, 575 arr = [], 576 pop = arr.pop, 577 pushNative = arr.push, 578 push = arr.push, 579 slice = arr.slice, 580 581 // Use a stripped-down indexOf as it's faster than native 582 // https://jsperf.com/thor-indexof-vs-for/5 583 indexOf = function( list, elem ) { 584 var i = 0, 585 len = list.length; 586 for ( ; i < len; i++ ) { 587 if ( list[ i ] === elem ) { 588 return i; 589 } 590 } 591 return -1; 592 }, 593 594 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + 595 "ismap|loop|multiple|open|readonly|required|scoped", 596 597 // Regular expressions 598 599 // http://www.w3.org/TR/css3-selectors/#whitespace 600 whitespace = "[\\x20\\t\\r\\n\\f]", 601 602 // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram 603 identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + 604 "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", 605 606 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 607 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + 608 609 // Operator (capture 2) 610 "*([*^$|!~]?=)" + whitespace + 611 612 // "Attribute values must be CSS identifiers [capture 5] 613 // or strings [capture 3 or capture 4]" 614 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + 615 whitespace + "*\\]", 616 617 pseudos = ":(" + identifier + ")(?:\\((" + 618 619 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 620 // 1. quoted (capture 3; capture 4 or capture 5) 621 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 622 623 // 2. simple (capture 6) 624 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 625 626 // 3. anything else (capture 2) 627 ".*" + 628 ")\\)|)", 629 630 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 631 rwhitespace = new RegExp( whitespace + "+", "g" ), 632 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + 633 whitespace + "+$", "g" ), 634 635 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), 636 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + 637 "*" ), 638 rdescend = new RegExp( whitespace + "|>" ), 639 640 rpseudo = new RegExp( pseudos ), 641 ridentifier = new RegExp( "^" + identifier + "$" ), 642 643 matchExpr = { 644 "ID": new RegExp( "^#(" + identifier + ")" ), 645 "CLASS": new RegExp( "^\\.(" + identifier + ")" ), 646 "TAG": new RegExp( "^(" + identifier + "|[*])" ), 647 "ATTR": new RegExp( "^" + attributes ), 648 "PSEUDO": new RegExp( "^" + pseudos ), 649 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + 650 whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + 651 whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 652 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), 653 654 // For use in libraries implementing .is() 655 // We use this for POS matching in `select` 656 "needsContext": new RegExp( "^" + whitespace + 657 "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + 658 "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) 659 }, 660 661 rhtml = /HTML$/i, 662 rinputs = /^(?:input|select|textarea|button)$/i, 663 rheader = /^h\d$/i, 664 665 rnative = /^[^{]+\{\s*\[native \w/, 666 667 // Easily-parseable/retrievable ID or TAG or CLASS selectors 668 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 669 670 rsibling = /[+~]/, 671 672 // CSS escapes 673 // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 674 runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), 675 funescape = function( escape, nonHex ) { 676 var high = "0x" + escape.slice( 1 ) - 0x10000; 677 678 return nonHex ? 679 680 // Strip the backslash prefix from a non-hex escape sequence 681 nonHex : 682 683 // Replace a hexadecimal escape sequence with the encoded Unicode code point 684 // Support: IE <=11+ 685 // For values outside the Basic Multilingual Plane (BMP), manually construct a 686 // surrogate pair 687 high < 0 ? 688 String.fromCharCode( high + 0x10000 ) : 689 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 690 }, 691 692 // CSS string/identifier serialization 693 // https://drafts.csswg.org/cssom/#common-serializing-idioms 694 rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, 695 fcssescape = function( ch, asCodePoint ) { 696 if ( asCodePoint ) { 697 698 // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER 699 if ( ch === "\0" ) { 700 return "\uFFFD"; 701 } 702 703 // Control characters and (dependent upon position) numbers get escaped as code points 704 return ch.slice( 0, -1 ) + "\\" + 705 ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; 706 } 707 708 // Other potentially-special ASCII characters get backslash-escaped 709 return "\\" + ch; 710 }, 711 712 // Used for iframes 713 // See setDocument() 714 // Removing the function wrapper causes a "Permission Denied" 715 // error in IE 716 unloadHandler = function() { 717 setDocument(); 718 }, 719 720 inDisabledFieldset = addCombinator( 721 function( elem ) { 722 return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; 723 }, 724 { dir: "parentNode", next: "legend" } 725 ); 726 727// Optimize for push.apply( _, NodeList ) 728try { 729 push.apply( 730 ( arr = slice.call( preferredDoc.childNodes ) ), 731 preferredDoc.childNodes 732 ); 733 734 // Support: Android<4.0 735 // Detect silently failing push.apply 736 // eslint-disable-next-line no-unused-expressions 737 arr[ preferredDoc.childNodes.length ].nodeType; 738} catch ( e ) { 739 push = { apply: arr.length ? 740 741 // Leverage slice if possible 742 function( target, els ) { 743 pushNative.apply( target, slice.call( els ) ); 744 } : 745 746 // Support: IE<9 747 // Otherwise append directly 748 function( target, els ) { 749 var j = target.length, 750 i = 0; 751 752 // Can't trust NodeList.length 753 while ( ( target[ j++ ] = els[ i++ ] ) ) {} 754 target.length = j - 1; 755 } 756 }; 757} 758 759function Sizzle( selector, context, results, seed ) { 760 var m, i, elem, nid, match, groups, newSelector, 761 newContext = context && context.ownerDocument, 762 763 // nodeType defaults to 9, since context defaults to document 764 nodeType = context ? context.nodeType : 9; 765 766 results = results || []; 767 768 // Return early from calls with invalid selector or context 769 if ( typeof selector !== "string" || !selector || 770 nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { 771 772 return results; 773 } 774 775 // Try to shortcut find operations (as opposed to filters) in HTML documents 776 if ( !seed ) { 777 setDocument( context ); 778 context = context || document; 779 780 if ( documentIsHTML ) { 781 782 // If the selector is sufficiently simple, try using a "get*By*" DOM method 783 // (excepting DocumentFragment context, where the methods don't exist) 784 if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { 785 786 // ID selector 787 if ( ( m = match[ 1 ] ) ) { 788 789 // Document context 790 if ( nodeType === 9 ) { 791 if ( ( elem = context.getElementById( m ) ) ) { 792 793 // Support: IE, Opera, Webkit 794 // TODO: identify versions 795 // getElementById can match elements by name instead of ID 796 if ( elem.id === m ) { 797 results.push( elem ); 798 return results; 799 } 800 } else { 801 return results; 802 } 803 804 // Element context 805 } else { 806 807 // Support: IE, Opera, Webkit 808 // TODO: identify versions 809 // getElementById can match elements by name instead of ID 810 if ( newContext && ( elem = newContext.getElementById( m ) ) && 811 contains( context, elem ) && 812 elem.id === m ) { 813 814 results.push( elem ); 815 return results; 816 } 817 } 818 819 // Type selector 820 } else if ( match[ 2 ] ) { 821 push.apply( results, context.getElementsByTagName( selector ) ); 822 return results; 823 824 // Class selector 825 } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && 826 context.getElementsByClassName ) { 827 828 push.apply( results, context.getElementsByClassName( m ) ); 829 return results; 830 } 831 } 832 833 // Take advantage of querySelectorAll 834 if ( support.qsa && 835 !nonnativeSelectorCache[ selector + " " ] && 836 ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && 837 838 // Support: IE 8 only 839 // Exclude object elements 840 ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { 841 842 newSelector = selector; 843 newContext = context; 844 845 // qSA considers elements outside a scoping root when evaluating child or 846 // descendant combinators, which is not what we want. 847 // In such cases, we work around the behavior by prefixing every selector in the 848 // list with an ID selector referencing the scope context. 849 // The technique has to be used as well when a leading combinator is used 850 // as such selectors are not recognized by querySelectorAll. 851 // Thanks to Andrew Dupont for this technique. 852 if ( nodeType === 1 && 853 ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { 854 855 // Expand context for sibling selectors 856 newContext = rsibling.test( selector ) && testContext( context.parentNode ) || 857 context; 858 859 // We can use :scope instead of the ID hack if the browser 860 // supports it & if we're not changing the context. 861 if ( newContext !== context || !support.scope ) { 862 863 // Capture the context ID, setting it first if necessary 864 if ( ( nid = context.getAttribute( "id" ) ) ) { 865 nid = nid.replace( rcssescape, fcssescape ); 866 } else { 867 context.setAttribute( "id", ( nid = expando ) ); 868 } 869 } 870 871 // Prefix every selector in the list 872 groups = tokenize( selector ); 873 i = groups.length; 874 while ( i-- ) { 875 groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + 876 toSelector( groups[ i ] ); 877 } 878 newSelector = groups.join( "," ); 879 } 880 881 try { 882 push.apply( results, 883 newContext.querySelectorAll( newSelector ) 884 ); 885 return results; 886 } catch ( qsaError ) { 887 nonnativeSelectorCache( selector, true ); 888 } finally { 889 if ( nid === expando ) { 890 context.removeAttribute( "id" ); 891 } 892 } 893 } 894 } 895 } 896 897 // All others 898 return select( selector.replace( rtrim, "$1" ), context, results, seed ); 899} 900 901/** 902 * Create key-value caches of limited size 903 * @returns {function(string, object)} Returns the Object data after storing it on itself with 904 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 905 * deleting the oldest entry 906 */ 907function createCache() { 908 var keys = []; 909 910 function cache( key, value ) { 911 912 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 913 if ( keys.push( key + " " ) > Expr.cacheLength ) { 914 915 // Only keep the most recent entries 916 delete cache[ keys.shift() ]; 917 } 918 return ( cache[ key + " " ] = value ); 919 } 920 return cache; 921} 922 923/** 924 * Mark a function for special use by Sizzle 925 * @param {Function} fn The function to mark 926 */ 927function markFunction( fn ) { 928 fn[ expando ] = true; 929 return fn; 930} 931 932/** 933 * Support testing using an element 934 * @param {Function} fn Passed the created element and returns a boolean result 935 */ 936function assert( fn ) { 937 var el = document.createElement( "fieldset" ); 938 939 try { 940 return !!fn( el ); 941 } catch ( e ) { 942 return false; 943 } finally { 944 945 // Remove from its parent by default 946 if ( el.parentNode ) { 947 el.parentNode.removeChild( el ); 948 } 949 950 // release memory in IE 951 el = null; 952 } 953} 954 955/** 956 * Adds the same handler for all of the specified attrs 957 * @param {String} attrs Pipe-separated list of attributes 958 * @param {Function} handler The method that will be applied 959 */ 960function addHandle( attrs, handler ) { 961 var arr = attrs.split( "|" ), 962 i = arr.length; 963 964 while ( i-- ) { 965 Expr.attrHandle[ arr[ i ] ] = handler; 966 } 967} 968 969/** 970 * Checks document order of two siblings 971 * @param {Element} a 972 * @param {Element} b 973 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 974 */ 975function siblingCheck( a, b ) { 976 var cur = b && a, 977 diff = cur && a.nodeType === 1 && b.nodeType === 1 && 978 a.sourceIndex - b.sourceIndex; 979 980 // Use IE sourceIndex if available on both nodes 981 if ( diff ) { 982 return diff; 983 } 984 985 // Check if b follows a 986 if ( cur ) { 987 while ( ( cur = cur.nextSibling ) ) { 988 if ( cur === b ) { 989 return -1; 990 } 991 } 992 } 993 994 return a ? 1 : -1; 995} 996 997/** 998 * Returns a function to use in pseudos for input types 999 * @param {String} type 1000 */ 1001function createInputPseudo( type ) { 1002 return function( elem ) { 1003 var name = elem.nodeName.toLowerCase(); 1004 return name === "input" && elem.type === type; 1005 }; 1006} 1007 1008/** 1009 * Returns a function to use in pseudos for buttons 1010 * @param {String} type 1011 */ 1012function createButtonPseudo( type ) { 1013 return function( elem ) { 1014 var name = elem.nodeName.toLowerCase(); 1015 return ( name === "input" || name === "button" ) && elem.type === type; 1016 }; 1017} 1018 1019/** 1020 * Returns a function to use in pseudos for :enabled/:disabled 1021 * @param {Boolean} disabled true for :disabled; false for :enabled 1022 */ 1023function createDisabledPseudo( disabled ) { 1024 1025 // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable 1026 return function( elem ) { 1027 1028 // Only certain elements can match :enabled or :disabled 1029 // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled 1030 // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled 1031 if ( "form" in elem ) { 1032 1033 // Check for inherited disabledness on relevant non-disabled elements: 1034 // * listed form-associated elements in a disabled fieldset 1035 // https://html.spec.whatwg.org/multipage/forms.html#category-listed 1036 // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled 1037 // * option elements in a disabled optgroup 1038 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled 1039 // All such elements have a "form" property. 1040 if ( elem.parentNode && elem.disabled === false ) { 1041 1042 // Option elements defer to a parent optgroup if present 1043 if ( "label" in elem ) { 1044 if ( "label" in elem.parentNode ) { 1045 return elem.parentNode.disabled === disabled; 1046 } else { 1047 return elem.disabled === disabled; 1048 } 1049 } 1050 1051 // Support: IE 6 - 11 1052 // Use the isDisabled shortcut property to check for disabled fieldset ancestors 1053 return elem.isDisabled === disabled || 1054 1055 // Where there is no isDisabled, check manually 1056 /* jshint -W018 */ 1057 elem.isDisabled !== !disabled && 1058 inDisabledFieldset( elem ) === disabled; 1059 } 1060 1061 return elem.disabled === disabled; 1062 1063 // Try to winnow out elements that can't be disabled before trusting the disabled property. 1064 // Some victims get caught in our net (label, legend, menu, track), but it shouldn't 1065 // even exist on them, let alone have a boolean value. 1066 } else if ( "label" in elem ) { 1067 return elem.disabled === disabled; 1068 } 1069 1070 // Remaining elements are neither :enabled nor :disabled 1071 return false; 1072 }; 1073} 1074 1075/** 1076 * Returns a function to use in pseudos for positionals 1077 * @param {Function} fn 1078 */ 1079function createPositionalPseudo( fn ) { 1080 return markFunction( function( argument ) { 1081 argument = +argument; 1082 return markFunction( function( seed, matches ) { 1083 var j, 1084 matchIndexes = fn( [], seed.length, argument ), 1085 i = matchIndexes.length; 1086 1087 // Match elements found at the specified indexes 1088 while ( i-- ) { 1089 if ( seed[ ( j = matchIndexes[ i ] ) ] ) { 1090 seed[ j ] = !( matches[ j ] = seed[ j ] ); 1091 } 1092 } 1093 } ); 1094 } ); 1095} 1096 1097/** 1098 * Checks a node for validity as a Sizzle context 1099 * @param {Element|Object=} context 1100 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 1101 */ 1102function testContext( context ) { 1103 return context && typeof context.getElementsByTagName !== "undefined" && context; 1104} 1105 1106// Expose support vars for convenience 1107support = Sizzle.support = {}; 1108 1109/** 1110 * Detects XML nodes 1111 * @param {Element|Object} elem An element or a document 1112 * @returns {Boolean} True iff elem is a non-HTML XML node 1113 */ 1114isXML = Sizzle.isXML = function( elem ) { 1115 var namespace = elem && elem.namespaceURI, 1116 docElem = elem && ( elem.ownerDocument || elem ).documentElement; 1117 1118 // Support: IE <=8 1119 // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes 1120 // https://bugs.jquery.com/ticket/4833 1121 return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); 1122}; 1123 1124/** 1125 * Sets document-related variables once based on the current document 1126 * @param {Element|Object} [doc] An element or document object to use to set the document 1127 * @returns {Object} Returns the current document 1128 */ 1129setDocument = Sizzle.setDocument = function( node ) { 1130 var hasCompare, subWindow, 1131 doc = node ? node.ownerDocument || node : preferredDoc; 1132 1133 // Return early if doc is invalid or already selected 1134 // Support: IE 11+, Edge 17 - 18+ 1135 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1136 // two documents; shallow comparisons work. 1137 // eslint-disable-next-line eqeqeq 1138 if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { 1139 return document; 1140 } 1141 1142 // Update global variables 1143 document = doc; 1144 docElem = document.documentElement; 1145 documentIsHTML = !isXML( document ); 1146 1147 // Support: IE 9 - 11+, Edge 12 - 18+ 1148 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 1149 // Support: IE 11+, Edge 17 - 18+ 1150 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1151 // two documents; shallow comparisons work. 1152 // eslint-disable-next-line eqeqeq 1153 if ( preferredDoc != document && 1154 ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { 1155 1156 // Support: IE 11, Edge 1157 if ( subWindow.addEventListener ) { 1158 subWindow.addEventListener( "unload", unloadHandler, false ); 1159 1160 // Support: IE 9 - 10 only 1161 } else if ( subWindow.attachEvent ) { 1162 subWindow.attachEvent( "onunload", unloadHandler ); 1163 } 1164 } 1165 1166 // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, 1167 // Safari 4 - 5 only, Opera <=11.6 - 12.x only 1168 // IE/Edge & older browsers don't support the :scope pseudo-class. 1169 // Support: Safari 6.0 only 1170 // Safari 6.0 supports :scope but it's an alias of :root there. 1171 support.scope = assert( function( el ) { 1172 docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); 1173 return typeof el.querySelectorAll !== "undefined" && 1174 !el.querySelectorAll( ":scope fieldset div" ).length; 1175 } ); 1176 1177 /* Attributes 1178 ---------------------------------------------------------------------- */ 1179 1180 // Support: IE<8 1181 // Verify that getAttribute really returns attributes and not properties 1182 // (excepting IE8 booleans) 1183 support.attributes = assert( function( el ) { 1184 el.className = "i"; 1185 return !el.getAttribute( "className" ); 1186 } ); 1187 1188 /* getElement(s)By* 1189 ---------------------------------------------------------------------- */ 1190 1191 // Check if getElementsByTagName("*") returns only elements 1192 support.getElementsByTagName = assert( function( el ) { 1193 el.appendChild( document.createComment( "" ) ); 1194 return !el.getElementsByTagName( "*" ).length; 1195 } ); 1196 1197 // Support: IE<9 1198 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); 1199 1200 // Support: IE<10 1201 // Check if getElementById returns elements by name 1202 // The broken getElementById methods don't pick up programmatically-set names, 1203 // so use a roundabout getElementsByName test 1204 support.getById = assert( function( el ) { 1205 docElem.appendChild( el ).id = expando; 1206 return !document.getElementsByName || !document.getElementsByName( expando ).length; 1207 } ); 1208 1209 // ID filter and find 1210 if ( support.getById ) { 1211 Expr.filter[ "ID" ] = function( id ) { 1212 var attrId = id.replace( runescape, funescape ); 1213 return function( elem ) { 1214 return elem.getAttribute( "id" ) === attrId; 1215 }; 1216 }; 1217 Expr.find[ "ID" ] = function( id, context ) { 1218 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 1219 var elem = context.getElementById( id ); 1220 return elem ? [ elem ] : []; 1221 } 1222 }; 1223 } else { 1224 Expr.filter[ "ID" ] = function( id ) { 1225 var attrId = id.replace( runescape, funescape ); 1226 return function( elem ) { 1227 var node = typeof elem.getAttributeNode !== "undefined" && 1228 elem.getAttributeNode( "id" ); 1229 return node && node.value === attrId; 1230 }; 1231 }; 1232 1233 // Support: IE 6 - 7 only 1234 // getElementById is not reliable as a find shortcut 1235 Expr.find[ "ID" ] = function( id, context ) { 1236 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 1237 var node, i, elems, 1238 elem = context.getElementById( id ); 1239 1240 if ( elem ) { 1241 1242 // Verify the id attribute 1243 node = elem.getAttributeNode( "id" ); 1244 if ( node && node.value === id ) { 1245 return [ elem ]; 1246 } 1247 1248 // Fall back on getElementsByName 1249 elems = context.getElementsByName( id ); 1250 i = 0; 1251 while ( ( elem = elems[ i++ ] ) ) { 1252 node = elem.getAttributeNode( "id" ); 1253 if ( node && node.value === id ) { 1254 return [ elem ]; 1255 } 1256 } 1257 } 1258 1259 return []; 1260 } 1261 }; 1262 } 1263 1264 // Tag 1265 Expr.find[ "TAG" ] = support.getElementsByTagName ? 1266 function( tag, context ) { 1267 if ( typeof context.getElementsByTagName !== "undefined" ) { 1268 return context.getElementsByTagName( tag ); 1269 1270 // DocumentFragment nodes don't have gEBTN 1271 } else if ( support.qsa ) { 1272 return context.querySelectorAll( tag ); 1273 } 1274 } : 1275 1276 function( tag, context ) { 1277 var elem, 1278 tmp = [], 1279 i = 0, 1280 1281 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 1282 results = context.getElementsByTagName( tag ); 1283 1284 // Filter out possible comments 1285 if ( tag === "*" ) { 1286 while ( ( elem = results[ i++ ] ) ) { 1287 if ( elem.nodeType === 1 ) { 1288 tmp.push( elem ); 1289 } 1290 } 1291 1292 return tmp; 1293 } 1294 return results; 1295 }; 1296 1297 // Class 1298 Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { 1299 if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { 1300 return context.getElementsByClassName( className ); 1301 } 1302 }; 1303 1304 /* QSA/matchesSelector 1305 ---------------------------------------------------------------------- */ 1306 1307 // QSA and matchesSelector support 1308 1309 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 1310 rbuggyMatches = []; 1311 1312 // qSa(:focus) reports false when true (Chrome 21) 1313 // We allow this because of a bug in IE8/9 that throws an error 1314 // whenever `document.activeElement` is accessed on an iframe 1315 // So, we allow :focus to pass through QSA all the time to avoid the IE error 1316 // See https://bugs.jquery.com/ticket/13378 1317 rbuggyQSA = []; 1318 1319 if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { 1320 1321 // Build QSA regex 1322 // Regex strategy adopted from Diego Perini 1323 assert( function( el ) { 1324 1325 var input; 1326 1327 // Select is set to empty string on purpose 1328 // This is to test IE's treatment of not explicitly 1329 // setting a boolean content attribute, 1330 // since its presence should be enough 1331 // https://bugs.jquery.com/ticket/12359 1332 docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" + 1333 "<select id='" + expando + "-\r\\' msallowcapture=''>" + 1334 "<option selected=''></option></select>"; 1335 1336 // Support: IE8, Opera 11-12.16 1337 // Nothing should be selected when empty strings follow ^= or $= or *= 1338 // The test attribute must be unknown in Opera but "safe" for WinRT 1339 // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 1340 if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { 1341 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); 1342 } 1343 1344 // Support: IE8 1345 // Boolean attributes and "value" are not treated correctly 1346 if ( !el.querySelectorAll( "[selected]" ).length ) { 1347 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); 1348 } 1349 1350 // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 1351 if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { 1352 rbuggyQSA.push( "~=" ); 1353 } 1354 1355 // Support: IE 11+, Edge 15 - 18+ 1356 // IE 11/Edge don't find elements on a `[name='']` query in some cases. 1357 // Adding a temporary attribute to the document before the selection works 1358 // around the issue. 1359 // Interestingly, IE 10 & older don't seem to have the issue. 1360 input = document.createElement( "input" ); 1361 input.setAttribute( "name", "" ); 1362 el.appendChild( input ); 1363 if ( !el.querySelectorAll( "[name='']" ).length ) { 1364 rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + 1365 whitespace + "*(?:''|\"\")" ); 1366 } 1367 1368 // Webkit/Opera - :checked should return selected option elements 1369 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1370 // IE8 throws error here and will not see later tests 1371 if ( !el.querySelectorAll( ":checked" ).length ) { 1372 rbuggyQSA.push( ":checked" ); 1373 } 1374 1375 // Support: Safari 8+, iOS 8+ 1376 // https://bugs.webkit.org/show_bug.cgi?id=136851 1377 // In-page `selector#id sibling-combinator selector` fails 1378 if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { 1379 rbuggyQSA.push( ".#.+[+~]" ); 1380 } 1381 1382 // Support: Firefox <=3.6 - 5 only 1383 // Old Firefox doesn't throw on a badly-escaped identifier. 1384 el.querySelectorAll( "\\\f" ); 1385 rbuggyQSA.push( "[\\r\\n\\f]" ); 1386 } ); 1387 1388 assert( function( el ) { 1389 el.innerHTML = "<a href='' disabled='disabled'></a>" + 1390 "<select disabled='disabled'><option/></select>"; 1391 1392 // Support: Windows 8 Native Apps 1393 // The type and name attributes are restricted during .innerHTML assignment 1394 var input = document.createElement( "input" ); 1395 input.setAttribute( "type", "hidden" ); 1396 el.appendChild( input ).setAttribute( "name", "D" ); 1397 1398 // Support: IE8 1399 // Enforce case-sensitivity of name attribute 1400 if ( el.querySelectorAll( "[name=d]" ).length ) { 1401 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); 1402 } 1403 1404 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 1405 // IE8 throws error here and will not see later tests 1406 if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { 1407 rbuggyQSA.push( ":enabled", ":disabled" ); 1408 } 1409 1410 // Support: IE9-11+ 1411 // IE's :disabled selector does not pick up the children of disabled fieldsets 1412 docElem.appendChild( el ).disabled = true; 1413 if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { 1414 rbuggyQSA.push( ":enabled", ":disabled" ); 1415 } 1416 1417 // Support: Opera 10 - 11 only 1418 // Opera 10-11 does not throw on post-comma invalid pseudos 1419 el.querySelectorAll( "*,:x" ); 1420 rbuggyQSA.push( ",.*:" ); 1421 } ); 1422 } 1423 1424 if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || 1425 docElem.webkitMatchesSelector || 1426 docElem.mozMatchesSelector || 1427 docElem.oMatchesSelector || 1428 docElem.msMatchesSelector ) ) ) ) { 1429 1430 assert( function( el ) { 1431 1432 // Check to see if it's possible to do matchesSelector 1433 // on a disconnected node (IE 9) 1434 support.disconnectedMatch = matches.call( el, "*" ); 1435 1436 // This should fail with an exception 1437 // Gecko does not error, returns false instead 1438 matches.call( el, "[s!='']:x" ); 1439 rbuggyMatches.push( "!=", pseudos ); 1440 } ); 1441 } 1442 1443 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); 1444 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); 1445 1446 /* Contains 1447 ---------------------------------------------------------------------- */ 1448 hasCompare = rnative.test( docElem.compareDocumentPosition ); 1449 1450 // Element contains another 1451 // Purposefully self-exclusive 1452 // As in, an element does not contain itself 1453 contains = hasCompare || rnative.test( docElem.contains ) ? 1454 function( a, b ) { 1455 var adown = a.nodeType === 9 ? a.documentElement : a, 1456 bup = b && b.parentNode; 1457 return a === bup || !!( bup && bup.nodeType === 1 && ( 1458 adown.contains ? 1459 adown.contains( bup ) : 1460 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 1461 ) ); 1462 } : 1463 function( a, b ) { 1464 if ( b ) { 1465 while ( ( b = b.parentNode ) ) { 1466 if ( b === a ) { 1467 return true; 1468 } 1469 } 1470 } 1471 return false; 1472 }; 1473 1474 /* Sorting 1475 ---------------------------------------------------------------------- */ 1476 1477 // Document order sorting 1478 sortOrder = hasCompare ? 1479 function( a, b ) { 1480 1481 // Flag for duplicate removal 1482 if ( a === b ) { 1483 hasDuplicate = true; 1484 return 0; 1485 } 1486 1487 // Sort on method existence if only one input has compareDocumentPosition 1488 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 1489 if ( compare ) { 1490 return compare; 1491 } 1492 1493 // Calculate position if both inputs belong to the same document 1494 // Support: IE 11+, Edge 17 - 18+ 1495 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1496 // two documents; shallow comparisons work. 1497 // eslint-disable-next-line eqeqeq 1498 compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? 1499 a.compareDocumentPosition( b ) : 1500 1501 // Otherwise we know they are disconnected 1502 1; 1503 1504 // Disconnected nodes 1505 if ( compare & 1 || 1506 ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { 1507 1508 // Choose the first element that is related to our preferred document 1509 // Support: IE 11+, Edge 17 - 18+ 1510 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1511 // two documents; shallow comparisons work. 1512 // eslint-disable-next-line eqeqeq 1513 if ( a == document || a.ownerDocument == preferredDoc && 1514 contains( preferredDoc, a ) ) { 1515 return -1; 1516 } 1517 1518 // Support: IE 11+, Edge 17 - 18+ 1519 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1520 // two documents; shallow comparisons work. 1521 // eslint-disable-next-line eqeqeq 1522 if ( b == document || b.ownerDocument == preferredDoc && 1523 contains( preferredDoc, b ) ) { 1524 return 1; 1525 } 1526 1527 // Maintain original order 1528 return sortInput ? 1529 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 1530 0; 1531 } 1532 1533 return compare & 4 ? -1 : 1; 1534 } : 1535 function( a, b ) { 1536 1537 // Exit early if the nodes are identical 1538 if ( a === b ) { 1539 hasDuplicate = true; 1540 return 0; 1541 } 1542 1543 var cur, 1544 i = 0, 1545 aup = a.parentNode, 1546 bup = b.parentNode, 1547 ap = [ a ], 1548 bp = [ b ]; 1549 1550 // Parentless nodes are either documents or disconnected 1551 if ( !aup || !bup ) { 1552 1553 // Support: IE 11+, Edge 17 - 18+ 1554 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1555 // two documents; shallow comparisons work. 1556 /* eslint-disable eqeqeq */ 1557 return a == document ? -1 : 1558 b == document ? 1 : 1559 /* eslint-enable eqeqeq */ 1560 aup ? -1 : 1561 bup ? 1 : 1562 sortInput ? 1563 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 1564 0; 1565 1566 // If the nodes are siblings, we can do a quick check 1567 } else if ( aup === bup ) { 1568 return siblingCheck( a, b ); 1569 } 1570 1571 // Otherwise we need full lists of their ancestors for comparison 1572 cur = a; 1573 while ( ( cur = cur.parentNode ) ) { 1574 ap.unshift( cur ); 1575 } 1576 cur = b; 1577 while ( ( cur = cur.parentNode ) ) { 1578 bp.unshift( cur ); 1579 } 1580 1581 // Walk down the tree looking for a discrepancy 1582 while ( ap[ i ] === bp[ i ] ) { 1583 i++; 1584 } 1585 1586 return i ? 1587 1588 // Do a sibling check if the nodes have a common ancestor 1589 siblingCheck( ap[ i ], bp[ i ] ) : 1590 1591 // Otherwise nodes in our document sort first 1592 // Support: IE 11+, Edge 17 - 18+ 1593 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1594 // two documents; shallow comparisons work. 1595 /* eslint-disable eqeqeq */ 1596 ap[ i ] == preferredDoc ? -1 : 1597 bp[ i ] == preferredDoc ? 1 : 1598 /* eslint-enable eqeqeq */ 1599 0; 1600 }; 1601 1602 return document; 1603}; 1604 1605Sizzle.matches = function( expr, elements ) { 1606 return Sizzle( expr, null, null, elements ); 1607}; 1608 1609Sizzle.matchesSelector = function( elem, expr ) { 1610 setDocument( elem ); 1611 1612 if ( support.matchesSelector && documentIsHTML && 1613 !nonnativeSelectorCache[ expr + " " ] && 1614 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && 1615 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { 1616 1617 try { 1618 var ret = matches.call( elem, expr ); 1619 1620 // IE 9's matchesSelector returns false on disconnected nodes 1621 if ( ret || support.disconnectedMatch || 1622 1623 // As well, disconnected nodes are said to be in a document 1624 // fragment in IE 9 1625 elem.document && elem.document.nodeType !== 11 ) { 1626 return ret; 1627 } 1628 } catch ( e ) { 1629 nonnativeSelectorCache( expr, true ); 1630 } 1631 } 1632 1633 return Sizzle( expr, document, null, [ elem ] ).length > 0; 1634}; 1635 1636Sizzle.contains = function( context, elem ) { 1637 1638 // Set document vars if needed 1639 // Support: IE 11+, Edge 17 - 18+ 1640 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1641 // two documents; shallow comparisons work. 1642 // eslint-disable-next-line eqeqeq 1643 if ( ( context.ownerDocument || context ) != document ) { 1644 setDocument( context ); 1645 } 1646 return contains( context, elem ); 1647}; 1648 1649Sizzle.attr = function( elem, name ) { 1650 1651 // Set document vars if needed 1652 // Support: IE 11+, Edge 17 - 18+ 1653 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1654 // two documents; shallow comparisons work. 1655 // eslint-disable-next-line eqeqeq 1656 if ( ( elem.ownerDocument || elem ) != document ) { 1657 setDocument( elem ); 1658 } 1659 1660 var fn = Expr.attrHandle[ name.toLowerCase() ], 1661 1662 // Don't get fooled by Object.prototype properties (jQuery #13807) 1663 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? 1664 fn( elem, name, !documentIsHTML ) : 1665 undefined; 1666 1667 return val !== undefined ? 1668 val : 1669 support.attributes || !documentIsHTML ? 1670 elem.getAttribute( name ) : 1671 ( val = elem.getAttributeNode( name ) ) && val.specified ? 1672 val.value : 1673 null; 1674}; 1675 1676Sizzle.escape = function( sel ) { 1677 return ( sel + "" ).replace( rcssescape, fcssescape ); 1678}; 1679 1680Sizzle.error = function( msg ) { 1681 throw new Error( "Syntax error, unrecognized expression: " + msg ); 1682}; 1683 1684/** 1685 * Document sorting and removing duplicates 1686 * @param {ArrayLike} results 1687 */ 1688Sizzle.uniqueSort = function( results ) { 1689 var elem, 1690 duplicates = [], 1691 j = 0, 1692 i = 0; 1693 1694 // Unless we *know* we can detect duplicates, assume their presence 1695 hasDuplicate = !support.detectDuplicates; 1696 sortInput = !support.sortStable && results.slice( 0 ); 1697 results.sort( sortOrder ); 1698 1699 if ( hasDuplicate ) { 1700 while ( ( elem = results[ i++ ] ) ) { 1701 if ( elem === results[ i ] ) { 1702 j = duplicates.push( i ); 1703 } 1704 } 1705 while ( j-- ) { 1706 results.splice( duplicates[ j ], 1 ); 1707 } 1708 } 1709 1710 // Clear input after sorting to release objects 1711 // See https://github.com/jquery/sizzle/pull/225 1712 sortInput = null; 1713 1714 return results; 1715}; 1716 1717/** 1718 * Utility function for retrieving the text value of an array of DOM nodes 1719 * @param {Array|Element} elem 1720 */ 1721getText = Sizzle.getText = function( elem ) { 1722 var node, 1723 ret = "", 1724 i = 0, 1725 nodeType = elem.nodeType; 1726 1727 if ( !nodeType ) { 1728 1729 // If no nodeType, this is expected to be an array 1730 while ( ( node = elem[ i++ ] ) ) { 1731 1732 // Do not traverse comment nodes 1733 ret += getText( node ); 1734 } 1735 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 1736 1737 // Use textContent for elements 1738 // innerText usage removed for consistency of new lines (jQuery #11153) 1739 if ( typeof elem.textContent === "string" ) { 1740 return elem.textContent; 1741 } else { 1742 1743 // Traverse its children 1744 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 1745 ret += getText( elem ); 1746 } 1747 } 1748 } else if ( nodeType === 3 || nodeType === 4 ) { 1749 return elem.nodeValue; 1750 } 1751 1752 // Do not include comment or processing instruction nodes 1753 1754 return ret; 1755}; 1756 1757Expr = Sizzle.selectors = { 1758 1759 // Can be adjusted by the user 1760 cacheLength: 50, 1761 1762 createPseudo: markFunction, 1763 1764 match: matchExpr, 1765 1766 attrHandle: {}, 1767 1768 find: {}, 1769 1770 relative: { 1771 ">": { dir: "parentNode", first: true }, 1772 " ": { dir: "parentNode" }, 1773 "+": { dir: "previousSibling", first: true }, 1774 "~": { dir: "previousSibling" } 1775 }, 1776 1777 preFilter: { 1778 "ATTR": function( match ) { 1779 match[ 1 ] = match[ 1 ].replace( runescape, funescape ); 1780 1781 // Move the given value to match[3] whether quoted or unquoted 1782 match[ 3 ] = ( match[ 3 ] || match[ 4 ] || 1783 match[ 5 ] || "" ).replace( runescape, funescape ); 1784 1785 if ( match[ 2 ] === "~=" ) { 1786 match[ 3 ] = " " + match[ 3 ] + " "; 1787 } 1788 1789 return match.slice( 0, 4 ); 1790 }, 1791 1792 "CHILD": function( match ) { 1793 1794 /* matches from matchExpr["CHILD"] 1795 1 type (only|nth|...) 1796 2 what (child|of-type) 1797 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 1798 4 xn-component of xn+y argument ([+-]?\d*n|) 1799 5 sign of xn-component 1800 6 x of xn-component 1801 7 sign of y-component 1802 8 y of y-component 1803 */ 1804 match[ 1 ] = match[ 1 ].toLowerCase(); 1805 1806 if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { 1807 1808 // nth-* requires argument 1809 if ( !match[ 3 ] ) { 1810 Sizzle.error( match[ 0 ] ); 1811 } 1812 1813 // numeric x and y parameters for Expr.filter.CHILD 1814 // remember that false/true cast respectively to 0/1 1815 match[ 4 ] = +( match[ 4 ] ? 1816 match[ 5 ] + ( match[ 6 ] || 1 ) : 1817 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); 1818 match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); 1819 1820 // other types prohibit arguments 1821 } else if ( match[ 3 ] ) { 1822 Sizzle.error( match[ 0 ] ); 1823 } 1824 1825 return match; 1826 }, 1827 1828 "PSEUDO": function( match ) { 1829 var excess, 1830 unquoted = !match[ 6 ] && match[ 2 ]; 1831 1832 if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { 1833 return null; 1834 } 1835 1836 // Accept quoted arguments as-is 1837 if ( match[ 3 ] ) { 1838 match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; 1839 1840 // Strip excess characters from unquoted arguments 1841 } else if ( unquoted && rpseudo.test( unquoted ) && 1842 1843 // Get excess from tokenize (recursively) 1844 ( excess = tokenize( unquoted, true ) ) && 1845 1846 // advance to the next closing parenthesis 1847 ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { 1848 1849 // excess is a negative index 1850 match[ 0 ] = match[ 0 ].slice( 0, excess ); 1851 match[ 2 ] = unquoted.slice( 0, excess ); 1852 } 1853 1854 // Return only captures needed by the pseudo filter method (type and argument) 1855 return match.slice( 0, 3 ); 1856 } 1857 }, 1858 1859 filter: { 1860 1861 "TAG": function( nodeNameSelector ) { 1862 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); 1863 return nodeNameSelector === "*" ? 1864 function() { 1865 return true; 1866 } : 1867 function( elem ) { 1868 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 1869 }; 1870 }, 1871 1872 "CLASS": function( className ) { 1873 var pattern = classCache[ className + " " ]; 1874 1875 return pattern || 1876 ( pattern = new RegExp( "(^|" + whitespace + 1877 ")" + className + "(" + whitespace + "|$)" ) ) && classCache( 1878 className, function( elem ) { 1879 return pattern.test( 1880 typeof elem.className === "string" && elem.className || 1881 typeof elem.getAttribute !== "undefined" && 1882 elem.getAttribute( "class" ) || 1883 "" 1884 ); 1885 } ); 1886 }, 1887 1888 "ATTR": function( name, operator, check ) { 1889 return function( elem ) { 1890 var result = Sizzle.attr( elem, name ); 1891 1892 if ( result == null ) { 1893 return operator === "!="; 1894 } 1895 if ( !operator ) { 1896 return true; 1897 } 1898 1899 result += ""; 1900 1901 /* eslint-disable max-len */ 1902 1903 return operator === "=" ? result === check : 1904 operator === "!=" ? result !== check : 1905 operator === "^=" ? check && result.indexOf( check ) === 0 : 1906 operator === "*=" ? check && result.indexOf( check ) > -1 : 1907 operator === "$=" ? check && result.slice( -check.length ) === check : 1908 operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : 1909 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : 1910 false; 1911 /* eslint-enable max-len */ 1912 1913 }; 1914 }, 1915 1916 "CHILD": function( type, what, _argument, first, last ) { 1917 var simple = type.slice( 0, 3 ) !== "nth", 1918 forward = type.slice( -4 ) !== "last", 1919 ofType = what === "of-type"; 1920 1921 return first === 1 && last === 0 ? 1922 1923 // Shortcut for :nth-*(n) 1924 function( elem ) { 1925 return !!elem.parentNode; 1926 } : 1927 1928 function( elem, _context, xml ) { 1929 var cache, uniqueCache, outerCache, node, nodeIndex, start, 1930 dir = simple !== forward ? "nextSibling" : "previousSibling", 1931 parent = elem.parentNode, 1932 name = ofType && elem.nodeName.toLowerCase(), 1933 useCache = !xml && !ofType, 1934 diff = false; 1935 1936 if ( parent ) { 1937 1938 // :(first|last|only)-(child|of-type) 1939 if ( simple ) { 1940 while ( dir ) { 1941 node = elem; 1942 while ( ( node = node[ dir ] ) ) { 1943 if ( ofType ? 1944 node.nodeName.toLowerCase() === name : 1945 node.nodeType === 1 ) { 1946 1947 return false; 1948 } 1949 } 1950 1951 // Reverse direction for :only-* (if we haven't yet done so) 1952 start = dir = type === "only" && !start && "nextSibling"; 1953 } 1954 return true; 1955 } 1956 1957 start = [ forward ? parent.firstChild : parent.lastChild ]; 1958 1959 // non-xml :nth-child(...) stores cache data on `parent` 1960 if ( forward && useCache ) { 1961 1962 // Seek `elem` from a previously-cached index 1963 1964 // ...in a gzip-friendly way 1965 node = parent; 1966 outerCache = node[ expando ] || ( node[ expando ] = {} ); 1967 1968 // Support: IE <9 only 1969 // Defend against cloned attroperties (jQuery gh-1709) 1970 uniqueCache = outerCache[ node.uniqueID ] || 1971 ( outerCache[ node.uniqueID ] = {} ); 1972 1973 cache = uniqueCache[ type ] || []; 1974 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 1975 diff = nodeIndex && cache[ 2 ]; 1976 node = nodeIndex && parent.childNodes[ nodeIndex ]; 1977 1978 while ( ( node = ++nodeIndex && node && node[ dir ] || 1979 1980 // Fallback to seeking `elem` from the start 1981 ( diff = nodeIndex = 0 ) || start.pop() ) ) { 1982 1983 // When found, cache indexes on `parent` and break 1984 if ( node.nodeType === 1 && ++diff && node === elem ) { 1985 uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; 1986 break; 1987 } 1988 } 1989 1990 } else { 1991 1992 // Use previously-cached element index if available 1993 if ( useCache ) { 1994 1995 // ...in a gzip-friendly way 1996 node = elem; 1997 outerCache = node[ expando ] || ( node[ expando ] = {} ); 1998 1999 // Support: IE <9 only 2000 // Defend against cloned attroperties (jQuery gh-1709) 2001 uniqueCache = outerCache[ node.uniqueID ] || 2002 ( outerCache[ node.uniqueID ] = {} ); 2003 2004 cache = uniqueCache[ type ] || []; 2005 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 2006 diff = nodeIndex; 2007 } 2008 2009 // xml :nth-child(...) 2010 // or :nth-last-child(...) or :nth(-last)?-of-type(...) 2011 if ( diff === false ) { 2012 2013 // Use the same loop as above to seek `elem` from the start 2014 while ( ( node = ++nodeIndex && node && node[ dir ] || 2015 ( diff = nodeIndex = 0 ) || start.pop() ) ) { 2016 2017 if ( ( ofType ? 2018 node.nodeName.toLowerCase() === name : 2019 node.nodeType === 1 ) && 2020 ++diff ) { 2021 2022 // Cache the index of each encountered element 2023 if ( useCache ) { 2024 outerCache = node[ expando ] || 2025 ( node[ expando ] = {} ); 2026 2027 // Support: IE <9 only 2028 // Defend against cloned attroperties (jQuery gh-1709) 2029 uniqueCache = outerCache[ node.uniqueID ] || 2030 ( outerCache[ node.uniqueID ] = {} ); 2031 2032 uniqueCache[ type ] = [ dirruns, diff ]; 2033 } 2034 2035 if ( node === elem ) { 2036 break; 2037 } 2038 } 2039 } 2040 } 2041 } 2042 2043 // Incorporate the offset, then check against cycle size 2044 diff -= last; 2045 return diff === first || ( diff % first === 0 && diff / first >= 0 ); 2046 } 2047 }; 2048 }, 2049 2050 "PSEUDO": function( pseudo, argument ) { 2051 2052 // pseudo-class names are case-insensitive 2053 // http://www.w3.org/TR/selectors/#pseudo-classes 2054 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 2055 // Remember that setFilters inherits from pseudos 2056 var args, 2057 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || 2058 Sizzle.error( "unsupported pseudo: " + pseudo ); 2059 2060 // The user may use createPseudo to indicate that 2061 // arguments are needed to create the filter function 2062 // just as Sizzle does 2063 if ( fn[ expando ] ) { 2064 return fn( argument ); 2065 } 2066 2067 // But maintain support for old signatures 2068 if ( fn.length > 1 ) { 2069 args = [ pseudo, pseudo, "", argument ]; 2070 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? 2071 markFunction( function( seed, matches ) { 2072 var idx, 2073 matched = fn( seed, argument ), 2074 i = matched.length; 2075 while ( i-- ) { 2076 idx = indexOf( seed, matched[ i ] ); 2077 seed[ idx ] = !( matches[ idx ] = matched[ i ] ); 2078 } 2079 } ) : 2080 function( elem ) { 2081 return fn( elem, 0, args ); 2082 }; 2083 } 2084 2085 return fn; 2086 } 2087 }, 2088 2089 pseudos: { 2090 2091 // Potentially complex pseudos 2092 "not": markFunction( function( selector ) { 2093 2094 // Trim the selector passed to compile 2095 // to avoid treating leading and trailing 2096 // spaces as combinators 2097 var input = [], 2098 results = [], 2099 matcher = compile( selector.replace( rtrim, "$1" ) ); 2100 2101 return matcher[ expando ] ? 2102 markFunction( function( seed, matches, _context, xml ) { 2103 var elem, 2104 unmatched = matcher( seed, null, xml, [] ), 2105 i = seed.length; 2106 2107 // Match elements unmatched by `matcher` 2108 while ( i-- ) { 2109 if ( ( elem = unmatched[ i ] ) ) { 2110 seed[ i ] = !( matches[ i ] = elem ); 2111 } 2112 } 2113 } ) : 2114 function( elem, _context, xml ) { 2115 input[ 0 ] = elem; 2116 matcher( input, null, xml, results ); 2117 2118 // Don't keep the element (issue #299) 2119 input[ 0 ] = null; 2120 return !results.pop(); 2121 }; 2122 } ), 2123 2124 "has": markFunction( function( selector ) { 2125 return function( elem ) { 2126 return Sizzle( selector, elem ).length > 0; 2127 }; 2128 } ), 2129 2130 "contains": markFunction( function( text ) { 2131 text = text.replace( runescape, funescape ); 2132 return function( elem ) { 2133 return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; 2134 }; 2135 } ), 2136 2137 // "Whether an element is represented by a :lang() selector 2138 // is based solely on the element's language value 2139 // being equal to the identifier C, 2140 // or beginning with the identifier C immediately followed by "-". 2141 // The matching of C against the element's language value is performed case-insensitively. 2142 // The identifier C does not have to be a valid language name." 2143 // http://www.w3.org/TR/selectors/#lang-pseudo 2144 "lang": markFunction( function( lang ) { 2145 2146 // lang value must be a valid identifier 2147 if ( !ridentifier.test( lang || "" ) ) { 2148 Sizzle.error( "unsupported lang: " + lang ); 2149 } 2150 lang = lang.replace( runescape, funescape ).toLowerCase(); 2151 return function( elem ) { 2152 var elemLang; 2153 do { 2154 if ( ( elemLang = documentIsHTML ? 2155 elem.lang : 2156 elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { 2157 2158 elemLang = elemLang.toLowerCase(); 2159 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; 2160 } 2161 } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); 2162 return false; 2163 }; 2164 } ), 2165 2166 // Miscellaneous 2167 "target": function( elem ) { 2168 var hash = window.location && window.location.hash; 2169 return hash && hash.slice( 1 ) === elem.id; 2170 }, 2171 2172 "root": function( elem ) { 2173 return elem === docElem; 2174 }, 2175 2176 "focus": function( elem ) { 2177 return elem === document.activeElement && 2178 ( !document.hasFocus || document.hasFocus() ) && 2179 !!( elem.type || elem.href || ~elem.tabIndex ); 2180 }, 2181 2182 // Boolean properties 2183 "enabled": createDisabledPseudo( false ), 2184 "disabled": createDisabledPseudo( true ), 2185 2186 "checked": function( elem ) { 2187 2188 // In CSS3, :checked should return both checked and selected elements 2189 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 2190 var nodeName = elem.nodeName.toLowerCase(); 2191 return ( nodeName === "input" && !!elem.checked ) || 2192 ( nodeName === "option" && !!elem.selected ); 2193 }, 2194 2195 "selected": function( elem ) { 2196 2197 // Accessing this property makes selected-by-default 2198 // options in Safari work properly 2199 if ( elem.parentNode ) { 2200 // eslint-disable-next-line no-unused-expressions 2201 elem.parentNode.selectedIndex; 2202 } 2203 2204 return elem.selected === true; 2205 }, 2206 2207 // Contents 2208 "empty": function( elem ) { 2209 2210 // http://www.w3.org/TR/selectors/#empty-pseudo 2211 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 2212 // but not by others (comment: 8; processing instruction: 7; etc.) 2213 // nodeType < 6 works because attributes (2) do not appear as children 2214 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 2215 if ( elem.nodeType < 6 ) { 2216 return false; 2217 } 2218 } 2219 return true; 2220 }, 2221 2222 "parent": function( elem ) { 2223 return !Expr.pseudos[ "empty" ]( elem ); 2224 }, 2225 2226 // Element/input types 2227 "header": function( elem ) { 2228 return rheader.test( elem.nodeName ); 2229 }, 2230 2231 "input": function( elem ) { 2232 return rinputs.test( elem.nodeName ); 2233 }, 2234 2235 "button": function( elem ) { 2236 var name = elem.nodeName.toLowerCase(); 2237 return name === "input" && elem.type === "button" || name === "button"; 2238 }, 2239 2240 "text": function( elem ) { 2241 var attr; 2242 return elem.nodeName.toLowerCase() === "input" && 2243 elem.type === "text" && 2244 2245 // Support: IE<8 2246 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 2247 ( ( attr = elem.getAttribute( "type" ) ) == null || 2248 attr.toLowerCase() === "text" ); 2249 }, 2250 2251 // Position-in-collection 2252 "first": createPositionalPseudo( function() { 2253 return [ 0 ]; 2254 } ), 2255 2256 "last": createPositionalPseudo( function( _matchIndexes, length ) { 2257 return [ length - 1 ]; 2258 } ), 2259 2260 "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { 2261 return [ argument < 0 ? argument + length : argument ]; 2262 } ), 2263 2264 "even": createPositionalPseudo( function( matchIndexes, length ) { 2265 var i = 0; 2266 for ( ; i < length; i += 2 ) { 2267 matchIndexes.push( i ); 2268 } 2269 return matchIndexes; 2270 } ), 2271 2272 "odd": createPositionalPseudo( function( matchIndexes, length ) { 2273 var i = 1; 2274 for ( ; i < length; i += 2 ) { 2275 matchIndexes.push( i ); 2276 } 2277 return matchIndexes; 2278 } ), 2279 2280 "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { 2281 var i = argument < 0 ? 2282 argument + length : 2283 argument > length ? 2284 length : 2285 argument; 2286 for ( ; --i >= 0; ) { 2287 matchIndexes.push( i ); 2288 } 2289 return matchIndexes; 2290 } ), 2291 2292 "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { 2293 var i = argument < 0 ? argument + length : argument; 2294 for ( ; ++i < length; ) { 2295 matchIndexes.push( i ); 2296 } 2297 return matchIndexes; 2298 } ) 2299 } 2300}; 2301 2302Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; 2303 2304// Add button/input type pseudos 2305for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { 2306 Expr.pseudos[ i ] = createInputPseudo( i ); 2307} 2308for ( i in { submit: true, reset: true } ) { 2309 Expr.pseudos[ i ] = createButtonPseudo( i ); 2310} 2311 2312// Easy API for creating new setFilters 2313function setFilters() {} 2314setFilters.prototype = Expr.filters = Expr.pseudos; 2315Expr.setFilters = new setFilters(); 2316 2317tokenize = Sizzle.tokenize = function( selector, parseOnly ) { 2318 var matched, match, tokens, type, 2319 soFar, groups, preFilters, 2320 cached = tokenCache[ selector + " " ]; 2321 2322 if ( cached ) { 2323 return parseOnly ? 0 : cached.slice( 0 ); 2324 } 2325 2326 soFar = selector; 2327 groups = []; 2328 preFilters = Expr.preFilter; 2329 2330 while ( soFar ) { 2331 2332 // Comma and first run 2333 if ( !matched || ( match = rcomma.exec( soFar ) ) ) { 2334 if ( match ) { 2335 2336 // Don't consume trailing commas as valid 2337 soFar = soFar.slice( match[ 0 ].length ) || soFar; 2338 } 2339 groups.push( ( tokens = [] ) ); 2340 } 2341 2342 matched = false; 2343 2344 // Combinators 2345 if ( ( match = rcombinators.exec( soFar ) ) ) { 2346 matched = match.shift(); 2347 tokens.push( { 2348 value: matched, 2349 2350 // Cast descendant combinators to space 2351 type: match[ 0 ].replace( rtrim, " " ) 2352 } ); 2353 soFar = soFar.slice( matched.length ); 2354 } 2355 2356 // Filters 2357 for ( type in Expr.filter ) { 2358 if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || 2359 ( match = preFilters[ type ]( match ) ) ) ) { 2360 matched = match.shift(); 2361 tokens.push( { 2362 value: matched, 2363 type: type, 2364 matches: match 2365 } ); 2366 soFar = soFar.slice( matched.length ); 2367 } 2368 } 2369 2370 if ( !matched ) { 2371 break; 2372 } 2373 } 2374 2375 // Return the length of the invalid excess 2376 // if we're just parsing 2377 // Otherwise, throw an error or return tokens 2378 return parseOnly ? 2379 soFar.length : 2380 soFar ? 2381 Sizzle.error( selector ) : 2382 2383 // Cache the tokens 2384 tokenCache( selector, groups ).slice( 0 ); 2385}; 2386 2387function toSelector( tokens ) { 2388 var i = 0, 2389 len = tokens.length, 2390 selector = ""; 2391 for ( ; i < len; i++ ) { 2392 selector += tokens[ i ].value; 2393 } 2394 return selector; 2395} 2396 2397function addCombinator( matcher, combinator, base ) { 2398 var dir = combinator.dir, 2399 skip = combinator.next, 2400 key = skip || dir, 2401 checkNonElements = base && key === "parentNode", 2402 doneName = done++; 2403 2404 return combinator.first ? 2405 2406 // Check against closest ancestor/preceding element 2407 function( elem, context, xml ) { 2408 while ( ( elem = elem[ dir ] ) ) { 2409 if ( elem.nodeType === 1 || checkNonElements ) { 2410 return matcher( elem, context, xml ); 2411 } 2412 } 2413 return false; 2414 } : 2415 2416 // Check against all ancestor/preceding elements 2417 function( elem, context, xml ) { 2418 var oldCache, uniqueCache, outerCache, 2419 newCache = [ dirruns, doneName ]; 2420 2421 // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 2422 if ( xml ) { 2423 while ( ( elem = elem[ dir ] ) ) { 2424 if ( elem.nodeType === 1 || checkNonElements ) { 2425 if ( matcher( elem, context, xml ) ) { 2426 return true; 2427 } 2428 } 2429 } 2430 } else { 2431 while ( ( elem = elem[ dir ] ) ) { 2432 if ( elem.nodeType === 1 || checkNonElements ) { 2433 outerCache = elem[ expando ] || ( elem[ expando ] = {} ); 2434 2435 // Support: IE <9 only 2436 // Defend against cloned attroperties (jQuery gh-1709) 2437 uniqueCache = outerCache[ elem.uniqueID ] || 2438 ( outerCache[ elem.uniqueID ] = {} ); 2439 2440 if ( skip && skip === elem.nodeName.toLowerCase() ) { 2441 elem = elem[ dir ] || elem; 2442 } else if ( ( oldCache = uniqueCache[ key ] ) && 2443 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { 2444 2445 // Assign to newCache so results back-propagate to previous elements 2446 return ( newCache[ 2 ] = oldCache[ 2 ] ); 2447 } else { 2448 2449 // Reuse newcache so results back-propagate to previous elements 2450 uniqueCache[ key ] = newCache; 2451 2452 // A match means we're done; a fail means we have to keep checking 2453 if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { 2454 return true; 2455 } 2456 } 2457 } 2458 } 2459 } 2460 return false; 2461 }; 2462} 2463 2464function elementMatcher( matchers ) { 2465 return matchers.length > 1 ? 2466 function( elem, context, xml ) { 2467 var i = matchers.length; 2468 while ( i-- ) { 2469 if ( !matchers[ i ]( elem, context, xml ) ) { 2470 return false; 2471 } 2472 } 2473 return true; 2474 } : 2475 matchers[ 0 ]; 2476} 2477 2478function multipleContexts( selector, contexts, results ) { 2479 var i = 0, 2480 len = contexts.length; 2481 for ( ; i < len; i++ ) { 2482 Sizzle( selector, contexts[ i ], results ); 2483 } 2484 return results; 2485} 2486 2487function condense( unmatched, map, filter, context, xml ) { 2488 var elem, 2489 newUnmatched = [], 2490 i = 0, 2491 len = unmatched.length, 2492 mapped = map != null; 2493 2494 for ( ; i < len; i++ ) { 2495 if ( ( elem = unmatched[ i ] ) ) { 2496 if ( !filter || filter( elem, context, xml ) ) { 2497 newUnmatched.push( elem ); 2498 if ( mapped ) { 2499 map.push( i ); 2500 } 2501 } 2502 } 2503 } 2504 2505 return newUnmatched; 2506} 2507 2508function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { 2509 if ( postFilter && !postFilter[ expando ] ) { 2510 postFilter = setMatcher( postFilter ); 2511 } 2512 if ( postFinder && !postFinder[ expando ] ) { 2513 postFinder = setMatcher( postFinder, postSelector ); 2514 } 2515 return markFunction( function( seed, results, context, xml ) { 2516 var temp, i, elem, 2517 preMap = [], 2518 postMap = [], 2519 preexisting = results.length, 2520 2521 // Get initial elements from seed or context 2522 elems = seed || multipleContexts( 2523 selector || "*", 2524 context.nodeType ? [ context ] : context, 2525 [] 2526 ), 2527 2528 // Prefilter to get matcher input, preserving a map for seed-results synchronization 2529 matcherIn = preFilter && ( seed || !selector ) ? 2530 condense( elems, preMap, preFilter, context, xml ) : 2531 elems, 2532 2533 matcherOut = matcher ? 2534 2535 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 2536 postFinder || ( seed ? preFilter : preexisting || postFilter ) ? 2537 2538 // ...intermediate processing is necessary 2539 [] : 2540 2541 // ...otherwise use results directly 2542 results : 2543 matcherIn; 2544 2545 // Find primary matches 2546 if ( matcher ) { 2547 matcher( matcherIn, matcherOut, context, xml ); 2548 } 2549 2550 // Apply postFilter 2551 if ( postFilter ) { 2552 temp = condense( matcherOut, postMap ); 2553 postFilter( temp, [], context, xml ); 2554 2555 // Un-match failing elements by moving them back to matcherIn 2556 i = temp.length; 2557 while ( i-- ) { 2558 if ( ( elem = temp[ i ] ) ) { 2559 matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); 2560 } 2561 } 2562 } 2563 2564 if ( seed ) { 2565 if ( postFinder || preFilter ) { 2566 if ( postFinder ) { 2567 2568 // Get the final matcherOut by condensing this intermediate into postFinder contexts 2569 temp = []; 2570 i = matcherOut.length; 2571 while ( i-- ) { 2572 if ( ( elem = matcherOut[ i ] ) ) { 2573 2574 // Restore matcherIn since elem is not yet a final match 2575 temp.push( ( matcherIn[ i ] = elem ) ); 2576 } 2577 } 2578 postFinder( null, ( matcherOut = [] ), temp, xml ); 2579 } 2580 2581 // Move matched elements from seed to results to keep them synchronized 2582 i = matcherOut.length; 2583 while ( i-- ) { 2584 if ( ( elem = matcherOut[ i ] ) && 2585 ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { 2586 2587 seed[ temp ] = !( results[ temp ] = elem ); 2588 } 2589 } 2590 } 2591 2592 // Add elements to results, through postFinder if defined 2593 } else { 2594 matcherOut = condense( 2595 matcherOut === results ? 2596 matcherOut.splice( preexisting, matcherOut.length ) : 2597 matcherOut 2598 ); 2599 if ( postFinder ) { 2600 postFinder( null, results, matcherOut, xml ); 2601 } else { 2602 push.apply( results, matcherOut ); 2603 } 2604 } 2605 } ); 2606} 2607 2608function matcherFromTokens( tokens ) { 2609 var checkContext, matcher, j, 2610 len = tokens.length, 2611 leadingRelative = Expr.relative[ tokens[ 0 ].type ], 2612 implicitRelative = leadingRelative || Expr.relative[ " " ], 2613 i = leadingRelative ? 1 : 0, 2614 2615 // The foundational matcher ensures that elements are reachable from top-level context(s) 2616 matchContext = addCombinator( function( elem ) { 2617 return elem === checkContext; 2618 }, implicitRelative, true ), 2619 matchAnyContext = addCombinator( function( elem ) { 2620 return indexOf( checkContext, elem ) > -1; 2621 }, implicitRelative, true ), 2622 matchers = [ function( elem, context, xml ) { 2623 var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( 2624 ( checkContext = context ).nodeType ? 2625 matchContext( elem, context, xml ) : 2626 matchAnyContext( elem, context, xml ) ); 2627 2628 // Avoid hanging onto element (issue #299) 2629 checkContext = null; 2630 return ret; 2631 } ]; 2632 2633 for ( ; i < len; i++ ) { 2634 if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { 2635 matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; 2636 } else { 2637 matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); 2638 2639 // Return special upon seeing a positional matcher 2640 if ( matcher[ expando ] ) { 2641 2642 // Find the next relative operator (if any) for proper handling 2643 j = ++i; 2644 for ( ; j < len; j++ ) { 2645 if ( Expr.relative[ tokens[ j ].type ] ) { 2646 break; 2647 } 2648 } 2649 return setMatcher( 2650 i > 1 && elementMatcher( matchers ), 2651 i > 1 && toSelector( 2652 2653 // If the preceding token was a descendant combinator, insert an implicit any-element `*` 2654 tokens 2655 .slice( 0, i - 1 ) 2656 .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) 2657 ).replace( rtrim, "$1" ), 2658 matcher, 2659 i < j && matcherFromTokens( tokens.slice( i, j ) ), 2660 j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), 2661 j < len && toSelector( tokens ) 2662 ); 2663 } 2664 matchers.push( matcher ); 2665 } 2666 } 2667 2668 return elementMatcher( matchers ); 2669} 2670 2671function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 2672 var bySet = setMatchers.length > 0, 2673 byElement = elementMatchers.length > 0, 2674 superMatcher = function( seed, context, xml, results, outermost ) { 2675 var elem, j, matcher, 2676 matchedCount = 0, 2677 i = "0", 2678 unmatched = seed && [], 2679 setMatched = [], 2680 contextBackup = outermostContext, 2681 2682 // We must always have either seed elements or outermost context 2683 elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), 2684 2685 // Use integer dirruns iff this is the outermost matcher 2686 dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), 2687 len = elems.length; 2688 2689 if ( outermost ) { 2690 2691 // Support: IE 11+, Edge 17 - 18+ 2692 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 2693 // two documents; shallow comparisons work. 2694 // eslint-disable-next-line eqeqeq 2695 outermostContext = context == document || context || outermost; 2696 } 2697 2698 // Add elements passing elementMatchers directly to results 2699 // Support: IE<9, Safari 2700 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 2701 for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { 2702 if ( byElement && elem ) { 2703 j = 0; 2704 2705 // Support: IE 11+, Edge 17 - 18+ 2706 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 2707 // two documents; shallow comparisons work. 2708 // eslint-disable-next-line eqeqeq 2709 if ( !context && elem.ownerDocument != document ) { 2710 setDocument( elem ); 2711 xml = !documentIsHTML; 2712 } 2713 while ( ( matcher = elementMatchers[ j++ ] ) ) { 2714 if ( matcher( elem, context || document, xml ) ) { 2715 results.push( elem ); 2716 break; 2717 } 2718 } 2719 if ( outermost ) { 2720 dirruns = dirrunsUnique; 2721 } 2722 } 2723 2724 // Track unmatched elements for set filters 2725 if ( bySet ) { 2726 2727 // They will have gone through all possible matchers 2728 if ( ( elem = !matcher && elem ) ) { 2729 matchedCount--; 2730 } 2731 2732 // Lengthen the array for every element, matched or not 2733 if ( seed ) { 2734 unmatched.push( elem ); 2735 } 2736 } 2737 } 2738 2739 // `i` is now the count of elements visited above, and adding it to `matchedCount` 2740 // makes the latter nonnegative. 2741 matchedCount += i; 2742 2743 // Apply set filters to unmatched elements 2744 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 2745 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have 2746 // no element matchers and no seed. 2747 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 2748 // case, which will result in a "00" `matchedCount` that differs from `i` but is also 2749 // numerically zero. 2750 if ( bySet && i !== matchedCount ) { 2751 j = 0; 2752 while ( ( matcher = setMatchers[ j++ ] ) ) { 2753 matcher( unmatched, setMatched, context, xml ); 2754 } 2755 2756 if ( seed ) { 2757 2758 // Reintegrate element matches to eliminate the need for sorting 2759 if ( matchedCount > 0 ) { 2760 while ( i-- ) { 2761 if ( !( unmatched[ i ] || setMatched[ i ] ) ) { 2762 setMatched[ i ] = pop.call( results ); 2763 } 2764 } 2765 } 2766 2767 // Discard index placeholder values to get only actual matches 2768 setMatched = condense( setMatched ); 2769 } 2770 2771 // Add matches to results 2772 push.apply( results, setMatched ); 2773 2774 // Seedless set matches succeeding multiple successful matchers stipulate sorting 2775 if ( outermost && !seed && setMatched.length > 0 && 2776 ( matchedCount + setMatchers.length ) > 1 ) { 2777 2778 Sizzle.uniqueSort( results ); 2779 } 2780 } 2781 2782 // Override manipulation of globals by nested matchers 2783 if ( outermost ) { 2784 dirruns = dirrunsUnique; 2785 outermostContext = contextBackup; 2786 } 2787 2788 return unmatched; 2789 }; 2790 2791 return bySet ? 2792 markFunction( superMatcher ) : 2793 superMatcher; 2794} 2795 2796compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { 2797 var i, 2798 setMatchers = [], 2799 elementMatchers = [], 2800 cached = compilerCache[ selector + " " ]; 2801 2802 if ( !cached ) { 2803 2804 // Generate a function of recursive functions that can be used to check each element 2805 if ( !match ) { 2806 match = tokenize( selector ); 2807 } 2808 i = match.length; 2809 while ( i-- ) { 2810 cached = matcherFromTokens( match[ i ] ); 2811 if ( cached[ expando ] ) { 2812 setMatchers.push( cached ); 2813 } else { 2814 elementMatchers.push( cached ); 2815 } 2816 } 2817 2818 // Cache the compiled function 2819 cached = compilerCache( 2820 selector, 2821 matcherFromGroupMatchers( elementMatchers, setMatchers ) 2822 ); 2823 2824 // Save selector and tokenization 2825 cached.selector = selector; 2826 } 2827 return cached; 2828}; 2829 2830/** 2831 * A low-level selection function that works with Sizzle's compiled 2832 * selector functions 2833 * @param {String|Function} selector A selector or a pre-compiled 2834 * selector function built with Sizzle.compile 2835 * @param {Element} context 2836 * @param {Array} [results] 2837 * @param {Array} [seed] A set of elements to match against 2838 */ 2839select = Sizzle.select = function( selector, context, results, seed ) { 2840 var i, tokens, token, type, find, 2841 compiled = typeof selector === "function" && selector, 2842 match = !seed && tokenize( ( selector = compiled.selector || selector ) ); 2843 2844 results = results || []; 2845 2846 // Try to minimize operations if there is only one selector in the list and no seed 2847 // (the latter of which guarantees us context) 2848 if ( match.length === 1 ) { 2849 2850 // Reduce context if the leading compound selector is an ID 2851 tokens = match[ 0 ] = match[ 0 ].slice( 0 ); 2852 if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && 2853 context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { 2854 2855 context = ( Expr.find[ "ID" ]( token.matches[ 0 ] 2856 .replace( runescape, funescape ), context ) || [] )[ 0 ]; 2857 if ( !context ) { 2858 return results; 2859 2860 // Precompiled matchers will still verify ancestry, so step up a level 2861 } else if ( compiled ) { 2862 context = context.parentNode; 2863 } 2864 2865 selector = selector.slice( tokens.shift().value.length ); 2866 } 2867 2868 // Fetch a seed set for right-to-left matching 2869 i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; 2870 while ( i-- ) { 2871 token = tokens[ i ]; 2872 2873 // Abort if we hit a combinator 2874 if ( Expr.relative[ ( type = token.type ) ] ) { 2875 break; 2876 } 2877 if ( ( find = Expr.find[ type ] ) ) { 2878 2879 // Search, expanding context for leading sibling combinators 2880 if ( ( seed = find( 2881 token.matches[ 0 ].replace( runescape, funescape ), 2882 rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || 2883 context 2884 ) ) ) { 2885 2886 // If seed is empty or no tokens remain, we can return early 2887 tokens.splice( i, 1 ); 2888 selector = seed.length && toSelector( tokens ); 2889 if ( !selector ) { 2890 push.apply( results, seed ); 2891 return results; 2892 } 2893 2894 break; 2895 } 2896 } 2897 } 2898 } 2899 2900 // Compile and execute a filtering function if one is not provided 2901 // Provide `match` to avoid retokenization if we modified the selector above 2902 ( compiled || compile( selector, match ) )( 2903 seed, 2904 context, 2905 !documentIsHTML, 2906 results, 2907 !context || rsibling.test( selector ) && testContext( context.parentNode ) || context 2908 ); 2909 return results; 2910}; 2911 2912// One-time assignments 2913 2914// Sort stability 2915support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; 2916 2917// Support: Chrome 14-35+ 2918// Always assume duplicates if they aren't passed to the comparison function 2919support.detectDuplicates = !!hasDuplicate; 2920 2921// Initialize against the default document 2922setDocument(); 2923 2924// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 2925// Detached nodes confoundingly follow *each other* 2926support.sortDetached = assert( function( el ) { 2927 2928 // Should return 1, but returns 4 (following) 2929 return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; 2930} ); 2931 2932// Support: IE<8 2933// Prevent attribute/property "interpolation" 2934// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 2935if ( !assert( function( el ) { 2936 el.innerHTML = "<a href='#'></a>"; 2937 return el.firstChild.getAttribute( "href" ) === "#"; 2938} ) ) { 2939 addHandle( "type|href|height|width", function( elem, name, isXML ) { 2940 if ( !isXML ) { 2941 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 2942 } 2943 } ); 2944} 2945 2946// Support: IE<9 2947// Use defaultValue in place of getAttribute("value") 2948if ( !support.attributes || !assert( function( el ) { 2949 el.innerHTML = "<input/>"; 2950 el.firstChild.setAttribute( "value", "" ); 2951 return el.firstChild.getAttribute( "value" ) === ""; 2952} ) ) { 2953 addHandle( "value", function( elem, _name, isXML ) { 2954 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { 2955 return elem.defaultValue; 2956 } 2957 } ); 2958} 2959 2960// Support: IE<9 2961// Use getAttributeNode to fetch booleans when getAttribute lies 2962if ( !assert( function( el ) { 2963 return el.getAttribute( "disabled" ) == null; 2964} ) ) { 2965 addHandle( booleans, function( elem, name, isXML ) { 2966 var val; 2967 if ( !isXML ) { 2968 return elem[ name ] === true ? name.toLowerCase() : 2969 ( val = elem.getAttributeNode( name ) ) && val.specified ? 2970 val.value : 2971 null; 2972 } 2973 } ); 2974} 2975 2976return Sizzle; 2977 2978} )( window ); 2979 2980 2981 2982jQuery.find = Sizzle; 2983jQuery.expr = Sizzle.selectors; 2984 2985// Deprecated 2986jQuery.expr[ ":" ] = jQuery.expr.pseudos; 2987jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 2988jQuery.text = Sizzle.getText; 2989jQuery.isXMLDoc = Sizzle.isXML; 2990jQuery.contains = Sizzle.contains; 2991jQuery.escapeSelector = Sizzle.escape; 2992 2993 2994 2995 2996var dir = function( elem, dir, until ) { 2997 var matched = [], 2998 truncate = until !== undefined; 2999 3000 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 3001 if ( elem.nodeType === 1 ) { 3002 if ( truncate && jQuery( elem ).is( until ) ) { 3003 break; 3004 } 3005 matched.push( elem ); 3006 } 3007 } 3008 return matched; 3009}; 3010 3011 3012var siblings = function( n, elem ) { 3013 var matched = []; 3014 3015 for ( ; n; n = n.nextSibling ) { 3016 if ( n.nodeType === 1 && n !== elem ) { 3017 matched.push( n ); 3018 } 3019 } 3020 3021 return matched; 3022}; 3023 3024 3025var rneedsContext = jQuery.expr.match.needsContext; 3026 3027 3028 3029function nodeName( elem, name ) { 3030 3031 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 3032 3033} 3034var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); 3035 3036 3037 3038// Implement the identical functionality for filter and not 3039function winnow( elements, qualifier, not ) { 3040 if ( isFunction( qualifier ) ) { 3041 return jQuery.grep( elements, function( elem, i ) { 3042 return !!qualifier.call( elem, i, elem ) !== not; 3043 } ); 3044 } 3045 3046 // Single element 3047 if ( qualifier.nodeType ) { 3048 return jQuery.grep( elements, function( elem ) { 3049 return ( elem === qualifier ) !== not; 3050 } ); 3051 } 3052 3053 // Arraylike of elements (jQuery, arguments, Array) 3054 if ( typeof qualifier !== "string" ) { 3055 return jQuery.grep( elements, function( elem ) { 3056 return ( indexOf.call( qualifier, elem ) > -1 ) !== not; 3057 } ); 3058 } 3059 3060 // Filtered directly for both simple and complex selectors 3061 return jQuery.filter( qualifier, elements, not ); 3062} 3063 3064jQuery.filter = function( expr, elems, not ) { 3065 var elem = elems[ 0 ]; 3066 3067 if ( not ) { 3068 expr = ":not(" + expr + ")"; 3069 } 3070 3071 if ( elems.length === 1 && elem.nodeType === 1 ) { 3072 return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; 3073 } 3074 3075 return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { 3076 return elem.nodeType === 1; 3077 } ) ); 3078}; 3079 3080jQuery.fn.extend( { 3081 find: function( selector ) { 3082 var i, ret, 3083 len = this.length, 3084 self = this; 3085 3086 if ( typeof selector !== "string" ) { 3087 return this.pushStack( jQuery( selector ).filter( function() { 3088 for ( i = 0; i < len; i++ ) { 3089 if ( jQuery.contains( self[ i ], this ) ) { 3090 return true; 3091 } 3092 } 3093 } ) ); 3094 } 3095 3096 ret = this.pushStack( [] ); 3097 3098 for ( i = 0; i < len; i++ ) { 3099 jQuery.find( selector, self[ i ], ret ); 3100 } 3101 3102 return len > 1 ? jQuery.uniqueSort( ret ) : ret; 3103 }, 3104 filter: function( selector ) { 3105 return this.pushStack( winnow( this, selector || [], false ) ); 3106 }, 3107 not: function( selector ) { 3108 return this.pushStack( winnow( this, selector || [], true ) ); 3109 }, 3110 is: function( selector ) { 3111 return !!winnow( 3112 this, 3113 3114 // If this is a positional/relative selector, check membership in the returned set 3115 // so $("p:first").is("p:last") won't return true for a doc with two "p". 3116 typeof selector === "string" && rneedsContext.test( selector ) ? 3117 jQuery( selector ) : 3118 selector || [], 3119 false 3120 ).length; 3121 } 3122} ); 3123 3124 3125// Initialize a jQuery object 3126 3127 3128// A central reference to the root jQuery(document) 3129var rootjQuery, 3130 3131 // A simple way to check for HTML strings 3132 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 3133 // Strict HTML recognition (#11290: must start with <) 3134 // Shortcut simple #id case for speed 3135 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, 3136 3137 init = jQuery.fn.init = function( selector, context, root ) { 3138 var match, elem; 3139 3140 // HANDLE: $(""), $(null), $(undefined), $(false) 3141 if ( !selector ) { 3142 return this; 3143 } 3144 3145 // Method init() accepts an alternate rootjQuery 3146 // so migrate can support jQuery.sub (gh-2101) 3147 root = root || rootjQuery; 3148 3149 // Handle HTML strings 3150 if ( typeof selector === "string" ) { 3151 if ( selector[ 0 ] === "<" && 3152 selector[ selector.length - 1 ] === ">" && 3153 selector.length >= 3 ) { 3154 3155 // Assume that strings that start and end with <> are HTML and skip the regex check 3156 match = [ null, selector, null ]; 3157 3158 } else { 3159 match = rquickExpr.exec( selector ); 3160 } 3161 3162 // Match html or make sure no context is specified for #id 3163 if ( match && ( match[ 1 ] || !context ) ) { 3164 3165 // HANDLE: $(html) -> $(array) 3166 if ( match[ 1 ] ) { 3167 context = context instanceof jQuery ? context[ 0 ] : context; 3168 3169 // Option to run scripts is true for back-compat 3170 // Intentionally let the error be thrown if parseHTML is not present 3171 jQuery.merge( this, jQuery.parseHTML( 3172 match[ 1 ], 3173 context && context.nodeType ? context.ownerDocument || context : document, 3174 true 3175 ) ); 3176 3177 // HANDLE: $(html, props) 3178 if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { 3179 for ( match in context ) { 3180 3181 // Properties of context are called as methods if possible 3182 if ( isFunction( this[ match ] ) ) { 3183 this[ match ]( context[ match ] ); 3184 3185 // ...and otherwise set as attributes 3186 } else { 3187 this.attr( match, context[ match ] ); 3188 } 3189 } 3190 } 3191 3192 return this; 3193 3194 // HANDLE: $(#id) 3195 } else { 3196 elem = document.getElementById( match[ 2 ] ); 3197 3198 if ( elem ) { 3199 3200 // Inject the element directly into the jQuery object 3201 this[ 0 ] = elem; 3202 this.length = 1; 3203 } 3204 return this; 3205 } 3206 3207 // HANDLE: $(expr, $(...)) 3208 } else if ( !context || context.jquery ) { 3209 return ( context || root ).find( selector ); 3210 3211 // HANDLE: $(expr, context) 3212 // (which is just equivalent to: $(context).find(expr) 3213 } else { 3214 return this.constructor( context ).find( selector ); 3215 } 3216 3217 // HANDLE: $(DOMElement) 3218 } else if ( selector.nodeType ) { 3219 this[ 0 ] = selector; 3220 this.length = 1; 3221 return this; 3222 3223 // HANDLE: $(function) 3224 // Shortcut for document ready 3225 } else if ( isFunction( selector ) ) { 3226 return root.ready !== undefined ? 3227 root.ready( selector ) : 3228 3229 // Execute immediately if ready is not present 3230 selector( jQuery ); 3231 } 3232 3233 return jQuery.makeArray( selector, this ); 3234 }; 3235 3236// Give the init function the jQuery prototype for later instantiation 3237init.prototype = jQuery.fn; 3238 3239// Initialize central reference 3240rootjQuery = jQuery( document ); 3241 3242 3243var rparentsprev = /^(?:parents|prev(?:Until|All))/, 3244 3245 // Methods guaranteed to produce a unique set when starting from a unique set 3246 guaranteedUnique = { 3247 children: true, 3248 contents: true, 3249 next: true, 3250 prev: true 3251 }; 3252 3253jQuery.fn.extend( { 3254 has: function( target ) { 3255 var targets = jQuery( target, this ), 3256 l = targets.length; 3257 3258 return this.filter( function() { 3259 var i = 0; 3260 for ( ; i < l; i++ ) { 3261 if ( jQuery.contains( this, targets[ i ] ) ) { 3262 return true; 3263 } 3264 } 3265 } ); 3266 }, 3267 3268 closest: function( selectors, context ) { 3269 var cur, 3270 i = 0, 3271 l = this.length, 3272 matched = [], 3273 targets = typeof selectors !== "string" && jQuery( selectors ); 3274 3275 // Positional selectors never match, since there's no _selection_ context 3276 if ( !rneedsContext.test( selectors ) ) { 3277 for ( ; i < l; i++ ) { 3278 for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { 3279 3280 // Always skip document fragments 3281 if ( cur.nodeType < 11 && ( targets ? 3282 targets.index( cur ) > -1 : 3283 3284 // Don't pass non-elements to Sizzle 3285 cur.nodeType === 1 && 3286 jQuery.find.matchesSelector( cur, selectors ) ) ) { 3287 3288 matched.push( cur ); 3289 break; 3290 } 3291 } 3292 } 3293 } 3294 3295 return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); 3296 }, 3297 3298 // Determine the position of an element within the set 3299 index: function( elem ) { 3300 3301 // No argument, return index in parent 3302 if ( !elem ) { 3303 return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; 3304 } 3305 3306 // Index in selector 3307 if ( typeof elem === "string" ) { 3308 return indexOf.call( jQuery( elem ), this[ 0 ] ); 3309 } 3310 3311 // Locate the position of the desired element 3312 return indexOf.call( this, 3313 3314 // If it receives a jQuery object, the first element is used 3315 elem.jquery ? elem[ 0 ] : elem 3316 ); 3317 }, 3318 3319 add: function( selector, context ) { 3320 return this.pushStack( 3321 jQuery.uniqueSort( 3322 jQuery.merge( this.get(), jQuery( selector, context ) ) 3323 ) 3324 ); 3325 }, 3326 3327 addBack: function( selector ) { 3328 return this.add( selector == null ? 3329 this.prevObject : this.prevObject.filter( selector ) 3330 ); 3331 } 3332} ); 3333 3334function sibling( cur, dir ) { 3335 while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} 3336 return cur; 3337} 3338 3339jQuery.each( { 3340 parent: function( elem ) { 3341 var parent = elem.parentNode; 3342 return parent && parent.nodeType !== 11 ? parent : null; 3343 }, 3344 parents: function( elem ) { 3345 return dir( elem, "parentNode" ); 3346 }, 3347 parentsUntil: function( elem, _i, until ) { 3348 return dir( elem, "parentNode", until ); 3349 }, 3350 next: function( elem ) { 3351 return sibling( elem, "nextSibling" ); 3352 }, 3353 prev: function( elem ) { 3354 return sibling( elem, "previousSibling" ); 3355 }, 3356 nextAll: function( elem ) { 3357 return dir( elem, "nextSibling" ); 3358 }, 3359 prevAll: function( elem ) { 3360 return dir( elem, "previousSibling" ); 3361 }, 3362 nextUntil: function( elem, _i, until ) { 3363 return dir( elem, "nextSibling", until ); 3364 }, 3365 prevUntil: function( elem, _i, until ) { 3366 return dir( elem, "previousSibling", until ); 3367 }, 3368 siblings: function( elem ) { 3369 return siblings( ( elem.parentNode || {} ).firstChild, elem ); 3370 }, 3371 children: function( elem ) { 3372 return siblings( elem.firstChild ); 3373 }, 3374 contents: function( elem ) { 3375 if ( elem.contentDocument != null && 3376 3377 // Support: IE 11+ 3378 // <object> elements with no `data` attribute has an object 3379 // `contentDocument` with a `null` prototype. 3380 getProto( elem.contentDocument ) ) { 3381 3382 return elem.contentDocument; 3383 } 3384 3385 // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only 3386 // Treat the template element as a regular one in browsers that 3387 // don't support it. 3388 if ( nodeName( elem, "template" ) ) { 3389 elem = elem.content || elem; 3390 } 3391 3392 return jQuery.merge( [], elem.childNodes ); 3393 } 3394}, function( name, fn ) { 3395 jQuery.fn[ name ] = function( until, selector ) { 3396 var matched = jQuery.map( this, fn, until ); 3397 3398 if ( name.slice( -5 ) !== "Until" ) { 3399 selector = until; 3400 } 3401 3402 if ( selector && typeof selector === "string" ) { 3403 matched = jQuery.filter( selector, matched ); 3404 } 3405 3406 if ( this.length > 1 ) { 3407 3408 // Remove duplicates 3409 if ( !guaranteedUnique[ name ] ) { 3410 jQuery.uniqueSort( matched ); 3411 } 3412 3413 // Reverse order for parents* and prev-derivatives 3414 if ( rparentsprev.test( name ) ) { 3415 matched.reverse(); 3416 } 3417 } 3418 3419 return this.pushStack( matched ); 3420 }; 3421} ); 3422var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); 3423 3424 3425 3426// Convert String-formatted options into Object-formatted ones 3427function createOptions( options ) { 3428 var object = {}; 3429 jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { 3430 object[ flag ] = true; 3431 } ); 3432 return object; 3433} 3434 3435/* 3436 * Create a callback list using the following parameters: 3437 * 3438 * options: an optional list of space-separated options that will change how 3439 * the callback list behaves or a more traditional option object 3440 * 3441 * By default a callback list will act like an event callback list and can be 3442 * "fired" multiple times. 3443 * 3444 * Possible options: 3445 * 3446 * once: will ensure the callback list can only be fired once (like a Deferred) 3447 * 3448 * memory: will keep track of previous values and will call any callback added 3449 * after the list has been fired right away with the latest "memorized" 3450 * values (like a Deferred) 3451 * 3452 * unique: will ensure a callback can only be added once (no duplicate in the list) 3453 * 3454 * stopOnFalse: interrupt callings when a callback returns false 3455 * 3456 */ 3457jQuery.Callbacks = function( options ) { 3458 3459 // Convert options from String-formatted to Object-formatted if needed 3460 // (we check in cache first) 3461 options = typeof options === "string" ? 3462 createOptions( options ) : 3463 jQuery.extend( {}, options ); 3464 3465 var // Flag to know if list is currently firing 3466 firing, 3467 3468 // Last fire value for non-forgettable lists 3469 memory, 3470 3471 // Flag to know if list was already fired 3472 fired, 3473 3474 // Flag to prevent firing 3475 locked, 3476 3477 // Actual callback list 3478 list = [], 3479 3480 // Queue of execution data for repeatable lists 3481 queue = [], 3482 3483 // Index of currently firing callback (modified by add/remove as needed) 3484 firingIndex = -1, 3485 3486 // Fire callbacks 3487 fire = function() { 3488 3489 // Enforce single-firing 3490 locked = locked || options.once; 3491 3492 // Execute callbacks for all pending executions, 3493 // respecting firingIndex overrides and runtime changes 3494 fired = firing = true; 3495 for ( ; queue.length; firingIndex = -1 ) { 3496 memory = queue.shift(); 3497 while ( ++firingIndex < list.length ) { 3498 3499 // Run callback and check for early termination 3500 if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && 3501 options.stopOnFalse ) { 3502 3503 // Jump to end and forget the data so .add doesn't re-fire 3504 firingIndex = list.length; 3505 memory = false; 3506 } 3507 } 3508 } 3509 3510 // Forget the data if we're done with it 3511 if ( !options.memory ) { 3512 memory = false; 3513 } 3514 3515 firing = false; 3516 3517 // Clean up if we're done firing for good 3518 if ( locked ) { 3519 3520 // Keep an empty list if we have data for future add calls 3521 if ( memory ) { 3522 list = []; 3523 3524 // Otherwise, this object is spent 3525 } else { 3526 list = ""; 3527 } 3528 } 3529 }, 3530 3531 // Actual Callbacks object 3532 self = { 3533 3534 // Add a callback or a collection of callbacks to the list 3535 add: function() { 3536 if ( list ) { 3537 3538 // If we have memory from a past run, we should fire after adding 3539 if ( memory && !firing ) { 3540 firingIndex = list.length - 1; 3541 queue.push( memory ); 3542 } 3543 3544 ( function add( args ) { 3545 jQuery.each( args, function( _, arg ) { 3546 if ( isFunction( arg ) ) { 3547 if ( !options.unique || !self.has( arg ) ) { 3548 list.push( arg ); 3549 } 3550 } else if ( arg && arg.length && toType( arg ) !== "string" ) { 3551 3552 // Inspect recursively 3553 add( arg ); 3554 } 3555 } ); 3556 } )( arguments ); 3557 3558 if ( memory && !firing ) { 3559 fire(); 3560 } 3561 } 3562 return this; 3563 }, 3564 3565 // Remove a callback from the list 3566 remove: function() { 3567 jQuery.each( arguments, function( _, arg ) { 3568 var index; 3569 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 3570 list.splice( index, 1 ); 3571 3572 // Handle firing indexes 3573 if ( index <= firingIndex ) { 3574 firingIndex--; 3575 } 3576 } 3577 } ); 3578 return this; 3579 }, 3580 3581 // Check if a given callback is in the list. 3582 // If no argument is given, return whether or not list has callbacks attached. 3583 has: function( fn ) { 3584 return fn ? 3585 jQuery.inArray( fn, list ) > -1 : 3586 list.length > 0; 3587 }, 3588 3589 // Remove all callbacks from the list 3590 empty: function() { 3591 if ( list ) { 3592 list = []; 3593 } 3594 return this; 3595 }, 3596 3597 // Disable .fire and .add 3598 // Abort any current/pending executions 3599 // Clear all callbacks and values 3600 disable: function() { 3601 locked = queue = []; 3602 list = memory = ""; 3603 return this; 3604 }, 3605 disabled: function() { 3606 return !list; 3607 }, 3608 3609 // Disable .fire 3610 // Also disable .add unless we have memory (since it would have no effect) 3611 // Abort any pending executions 3612 lock: function() { 3613 locked = queue = []; 3614 if ( !memory && !firing ) { 3615 list = memory = ""; 3616 } 3617 return this; 3618 }, 3619 locked: function() { 3620 return !!locked; 3621 }, 3622 3623 // Call all callbacks with the given context and arguments 3624 fireWith: function( context, args ) { 3625 if ( !locked ) { 3626 args = args || []; 3627 args = [ context, args.slice ? args.slice() : args ]; 3628 queue.push( args ); 3629 if ( !firing ) { 3630 fire(); 3631 } 3632 } 3633 return this; 3634 }, 3635 3636 // Call all the callbacks with the given arguments 3637 fire: function() { 3638 self.fireWith( this, arguments ); 3639 return this; 3640 }, 3641 3642 // To know if the callbacks have already been called at least once 3643 fired: function() { 3644 return !!fired; 3645 } 3646 }; 3647 3648 return self; 3649}; 3650 3651 3652function Identity( v ) { 3653 return v; 3654} 3655function Thrower( ex ) { 3656 throw ex; 3657} 3658 3659function adoptValue( value, resolve, reject, noValue ) { 3660 var method; 3661 3662 try { 3663 3664 // Check for promise aspect first to privilege synchronous behavior 3665 if ( value && isFunction( ( method = value.promise ) ) ) { 3666 method.call( value ).done( resolve ).fail( reject ); 3667 3668 // Other thenables 3669 } else if ( value && isFunction( ( method = value.then ) ) ) { 3670 method.call( value, resolve, reject ); 3671 3672 // Other non-thenables 3673 } else { 3674 3675 // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: 3676 // * false: [ value ].slice( 0 ) => resolve( value ) 3677 // * true: [ value ].slice( 1 ) => resolve() 3678 resolve.apply( undefined, [ value ].slice( noValue ) ); 3679 } 3680 3681 // For Promises/A+, convert exceptions into rejections 3682 // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in 3683 // Deferred#then to conditionally suppress rejection. 3684 } catch ( value ) { 3685 3686 // Support: Android 4.0 only 3687 // Strict mode functions invoked without .call/.apply get global-object context 3688 reject.apply( undefined, [ value ] ); 3689 } 3690} 3691 3692jQuery.extend( { 3693 3694 Deferred: function( func ) { 3695 var tuples = [ 3696 3697 // action, add listener, callbacks, 3698 // ... .then handlers, argument index, [final state] 3699 [ "notify", "progress", jQuery.Callbacks( "memory" ), 3700 jQuery.Callbacks( "memory" ), 2 ], 3701 [ "resolve", "done", jQuery.Callbacks( "once memory" ), 3702 jQuery.Callbacks( "once memory" ), 0, "resolved" ], 3703 [ "reject", "fail", jQuery.Callbacks( "once memory" ), 3704 jQuery.Callbacks( "once memory" ), 1, "rejected" ] 3705 ], 3706 state = "pending", 3707 promise = { 3708 state: function() { 3709 return state; 3710 }, 3711 always: function() { 3712 deferred.done( arguments ).fail( arguments ); 3713 return this; 3714 }, 3715 "catch": function( fn ) { 3716 return promise.then( null, fn ); 3717 }, 3718 3719 // Keep pipe for back-compat 3720 pipe: function( /* fnDone, fnFail, fnProgress */ ) { 3721 var fns = arguments; 3722 3723 return jQuery.Deferred( function( newDefer ) { 3724 jQuery.each( tuples, function( _i, tuple ) { 3725 3726 // Map tuples (progress, done, fail) to arguments (done, fail, progress) 3727 var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; 3728 3729 // deferred.progress(function() { bind to newDefer or newDefer.notify }) 3730 // deferred.done(function() { bind to newDefer or newDefer.resolve }) 3731 // deferred.fail(function() { bind to newDefer or newDefer.reject }) 3732 deferred[ tuple[ 1 ] ]( function() { 3733 var returned = fn && fn.apply( this, arguments ); 3734 if ( returned && isFunction( returned.promise ) ) { 3735 returned.promise() 3736 .progress( newDefer.notify ) 3737 .done( newDefer.resolve ) 3738 .fail( newDefer.reject ); 3739 } else { 3740 newDefer[ tuple[ 0 ] + "With" ]( 3741 this, 3742 fn ? [ returned ] : arguments 3743 ); 3744 } 3745 } ); 3746 } ); 3747 fns = null; 3748 } ).promise(); 3749 }, 3750 then: function( onFulfilled, onRejected, onProgress ) { 3751 var maxDepth = 0; 3752 function resolve( depth, deferred, handler, special ) { 3753 return function() { 3754 var that = this, 3755 args = arguments, 3756 mightThrow = function() { 3757 var returned, then; 3758 3759 // Support: Promises/A+ section 2.3.3.3.3 3760 // https://promisesaplus.com/#point-59 3761 // Ignore double-resolution attempts 3762 if ( depth < maxDepth ) { 3763 return; 3764 } 3765 3766 returned = handler.apply( that, args ); 3767 3768 // Support: Promises/A+ section 2.3.1 3769 // https://promisesaplus.com/#point-48 3770 if ( returned === deferred.promise() ) { 3771 throw new TypeError( "Thenable self-resolution" ); 3772 } 3773 3774 // Support: Promises/A+ sections 2.3.3.1, 3.5 3775 // https://promisesaplus.com/#point-54 3776 // https://promisesaplus.com/#point-75 3777 // Retrieve `then` only once 3778 then = returned && 3779 3780 // Support: Promises/A+ section 2.3.4 3781 // https://promisesaplus.com/#point-64 3782 // Only check objects and functions for thenability 3783 ( typeof returned === "object" || 3784 typeof returned === "function" ) && 3785 returned.then; 3786 3787 // Handle a returned thenable 3788 if ( isFunction( then ) ) { 3789 3790 // Special processors (notify) just wait for resolution 3791 if ( special ) { 3792 then.call( 3793 returned, 3794 resolve( maxDepth, deferred, Identity, special ), 3795 resolve( maxDepth, deferred, Thrower, special ) 3796 ); 3797 3798 // Normal processors (resolve) also hook into progress 3799 } else { 3800 3801 // ...and disregard older resolution values 3802 maxDepth++; 3803 3804 then.call( 3805 returned, 3806 resolve( maxDepth, deferred, Identity, special ), 3807 resolve( maxDepth, deferred, Thrower, special ), 3808 resolve( maxDepth, deferred, Identity, 3809 deferred.notifyWith ) 3810 ); 3811 } 3812 3813 // Handle all other returned values 3814 } else { 3815 3816 // Only substitute handlers pass on context 3817 // and multiple values (non-spec behavior) 3818 if ( handler !== Identity ) { 3819 that = undefined; 3820 args = [ returned ]; 3821 } 3822 3823 // Process the value(s) 3824 // Default process is resolve 3825 ( special || deferred.resolveWith )( that, args ); 3826 } 3827 }, 3828 3829 // Only normal processors (resolve) catch and reject exceptions 3830 process = special ? 3831 mightThrow : 3832 function() { 3833 try { 3834 mightThrow(); 3835 } catch ( e ) { 3836 3837 if ( jQuery.Deferred.exceptionHook ) { 3838 jQuery.Deferred.exceptionHook( e, 3839 process.stackTrace ); 3840 } 3841 3842 // Support: Promises/A+ section 2.3.3.3.4.1 3843 // https://promisesaplus.com/#point-61 3844 // Ignore post-resolution exceptions 3845 if ( depth + 1 >= maxDepth ) { 3846 3847 // Only substitute handlers pass on context 3848 // and multiple values (non-spec behavior) 3849 if ( handler !== Thrower ) { 3850 that = undefined; 3851 args = [ e ]; 3852 } 3853 3854 deferred.rejectWith( that, args ); 3855 } 3856 } 3857 }; 3858 3859 // Support: Promises/A+ section 2.3.3.3.1 3860 // https://promisesaplus.com/#point-57 3861 // Re-resolve promises immediately to dodge false rejection from 3862 // subsequent errors 3863 if ( depth ) { 3864 process(); 3865 } else { 3866 3867 // Call an optional hook to record the stack, in case of exception 3868 // since it's otherwise lost when execution goes async 3869 if ( jQuery.Deferred.getStackHook ) { 3870 process.stackTrace = jQuery.Deferred.getStackHook(); 3871 } 3872 window.setTimeout( process ); 3873 } 3874 }; 3875 } 3876 3877 return jQuery.Deferred( function( newDefer ) { 3878 3879 // progress_handlers.add( ... ) 3880 tuples[ 0 ][ 3 ].add( 3881 resolve( 3882 0, 3883 newDefer, 3884 isFunction( onProgress ) ? 3885 onProgress : 3886 Identity, 3887 newDefer.notifyWith 3888 ) 3889 ); 3890 3891 // fulfilled_handlers.add( ... ) 3892 tuples[ 1 ][ 3 ].add( 3893 resolve( 3894 0, 3895 newDefer, 3896 isFunction( onFulfilled ) ? 3897 onFulfilled : 3898 Identity 3899 ) 3900 ); 3901 3902 // rejected_handlers.add( ... ) 3903 tuples[ 2 ][ 3 ].add( 3904 resolve( 3905 0, 3906 newDefer, 3907 isFunction( onRejected ) ? 3908 onRejected : 3909 Thrower 3910 ) 3911 ); 3912 } ).promise(); 3913 }, 3914 3915 // Get a promise for this deferred 3916 // If obj is provided, the promise aspect is added to the object 3917 promise: function( obj ) { 3918 return obj != null ? jQuery.extend( obj, promise ) : promise; 3919 } 3920 }, 3921 deferred = {}; 3922 3923 // Add list-specific methods 3924 jQuery.each( tuples, function( i, tuple ) { 3925 var list = tuple[ 2 ], 3926 stateString = tuple[ 5 ]; 3927 3928 // promise.progress = list.add 3929 // promise.done = list.add 3930 // promise.fail = list.add 3931 promise[ tuple[ 1 ] ] = list.add; 3932 3933 // Handle state 3934 if ( stateString ) { 3935 list.add( 3936 function() { 3937 3938 // state = "resolved" (i.e., fulfilled) 3939 // state = "rejected" 3940 state = stateString; 3941 }, 3942 3943 // rejected_callbacks.disable 3944 // fulfilled_callbacks.disable 3945 tuples[ 3 - i ][ 2 ].disable, 3946 3947 // rejected_handlers.disable 3948 // fulfilled_handlers.disable 3949 tuples[ 3 - i ][ 3 ].disable, 3950 3951 // progress_callbacks.lock 3952 tuples[ 0 ][ 2 ].lock, 3953 3954 // progress_handlers.lock 3955 tuples[ 0 ][ 3 ].lock 3956 ); 3957 } 3958 3959 // progress_handlers.fire 3960 // fulfilled_handlers.fire 3961 // rejected_handlers.fire 3962 list.add( tuple[ 3 ].fire ); 3963 3964 // deferred.notify = function() { deferred.notifyWith(...) } 3965 // deferred.resolve = function() { deferred.resolveWith(...) } 3966 // deferred.reject = function() { deferred.rejectWith(...) } 3967 deferred[ tuple[ 0 ] ] = function() { 3968 deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); 3969 return this; 3970 }; 3971 3972 // deferred.notifyWith = list.fireWith 3973 // deferred.resolveWith = list.fireWith 3974 // deferred.rejectWith = list.fireWith 3975 deferred[ tuple[ 0 ] + "With" ] = list.fireWith; 3976 } ); 3977 3978 // Make the deferred a promise 3979 promise.promise( deferred ); 3980 3981 // Call given func if any 3982 if ( func ) { 3983 func.call( deferred, deferred ); 3984 } 3985 3986 // All done! 3987 return deferred; 3988 }, 3989 3990 // Deferred helper 3991 when: function( singleValue ) { 3992 var 3993 3994 // count of uncompleted subordinates 3995 remaining = arguments.length, 3996 3997 // count of unprocessed arguments 3998 i = remaining, 3999 4000 // subordinate fulfillment data 4001 resolveContexts = Array( i ), 4002 resolveValues = slice.call( arguments ), 4003 4004 // the primary Deferred 4005 primary = jQuery.Deferred(), 4006 4007 // subordinate callback factory 4008 updateFunc = function( i ) { 4009 return function( value ) { 4010 resolveContexts[ i ] = this; 4011 resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; 4012 if ( !( --remaining ) ) { 4013 primary.resolveWith( resolveContexts, resolveValues ); 4014 } 4015 }; 4016 }; 4017 4018 // Single- and empty arguments are adopted like Promise.resolve 4019 if ( remaining <= 1 ) { 4020 adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, 4021 !remaining ); 4022 4023 // Use .then() to unwrap secondary thenables (cf. gh-3000) 4024 if ( primary.state() === "pending" || 4025 isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { 4026 4027 return primary.then(); 4028 } 4029 } 4030 4031 // Multiple arguments are aggregated like Promise.all array elements 4032 while ( i-- ) { 4033 adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); 4034 } 4035 4036 return primary.promise(); 4037 } 4038} ); 4039 4040 4041// These usually indicate a programmer mistake during development, 4042// warn about them ASAP rather than swallowing them by default. 4043var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 4044 4045jQuery.Deferred.exceptionHook = function( error, stack ) { 4046 4047 // Support: IE 8 - 9 only 4048 // Console exists when dev tools are open, which can happen at any time 4049 if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { 4050 window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); 4051 } 4052}; 4053 4054 4055 4056 4057jQuery.readyException = function( error ) { 4058 window.setTimeout( function() { 4059 throw error; 4060 } ); 4061}; 4062 4063 4064 4065 4066// The deferred used on DOM ready 4067var readyList = jQuery.Deferred(); 4068 4069jQuery.fn.ready = function( fn ) { 4070 4071 readyList 4072 .then( fn ) 4073 4074 // Wrap jQuery.readyException in a function so that the lookup 4075 // happens at the time of error handling instead of callback 4076 // registration. 4077 .catch( function( error ) { 4078 jQuery.readyException( error ); 4079 } ); 4080 4081 return this; 4082}; 4083 4084jQuery.extend( { 4085 4086 // Is the DOM ready to be used? Set to true once it occurs. 4087 isReady: false, 4088 4089 // A counter to track how many items to wait for before 4090 // the ready event fires. See #6781 4091 readyWait: 1, 4092 4093 // Handle when the DOM is ready 4094 ready: function( wait ) { 4095 4096 // Abort if there are pending holds or we're already ready 4097 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 4098 return; 4099 } 4100 4101 // Remember that the DOM is ready 4102 jQuery.isReady = true; 4103 4104 // If a normal DOM Ready event fired, decrement, and wait if need be 4105 if ( wait !== true && --jQuery.readyWait > 0 ) { 4106 return; 4107 } 4108 4109 // If there are functions bound, to execute 4110 readyList.resolveWith( document, [ jQuery ] ); 4111 } 4112} ); 4113 4114jQuery.ready.then = readyList.then; 4115 4116// The ready event handler and self cleanup method 4117function completed() { 4118 document.removeEventListener( "DOMContentLoaded", completed ); 4119 window.removeEventListener( "load", completed ); 4120 jQuery.ready(); 4121} 4122 4123// Catch cases where $(document).ready() is called 4124// after the browser event has already occurred. 4125// Support: IE <=9 - 10 only 4126// Older IE sometimes signals "interactive" too soon 4127if ( document.readyState === "complete" || 4128 ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { 4129 4130 // Handle it asynchronously to allow scripts the opportunity to delay ready 4131 window.setTimeout( jQuery.ready ); 4132 4133} else { 4134 4135 // Use the handy event callback 4136 document.addEventListener( "DOMContentLoaded", completed ); 4137 4138 // A fallback to window.onload, that will always work 4139 window.addEventListener( "load", completed ); 4140} 4141 4142 4143 4144 4145// Multifunctional method to get and set values of a collection 4146// The value/s can optionally be executed if it's a function 4147var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 4148 var i = 0, 4149 len = elems.length, 4150 bulk = key == null; 4151 4152 // Sets many values 4153 if ( toType( key ) === "object" ) { 4154 chainable = true; 4155 for ( i in key ) { 4156 access( elems, fn, i, key[ i ], true, emptyGet, raw ); 4157 } 4158 4159 // Sets one value 4160 } else if ( value !== undefined ) { 4161 chainable = true; 4162 4163 if ( !isFunction( value ) ) { 4164 raw = true; 4165 } 4166 4167 if ( bulk ) { 4168 4169 // Bulk operations run against the entire set 4170 if ( raw ) { 4171 fn.call( elems, value ); 4172 fn = null; 4173 4174 // ...except when executing function values 4175 } else { 4176 bulk = fn; 4177 fn = function( elem, _key, value ) { 4178 return bulk.call( jQuery( elem ), value ); 4179 }; 4180 } 4181 } 4182 4183 if ( fn ) { 4184 for ( ; i < len; i++ ) { 4185 fn( 4186 elems[ i ], key, raw ? 4187 value : 4188 value.call( elems[ i ], i, fn( elems[ i ], key ) ) 4189 ); 4190 } 4191 } 4192 } 4193 4194 if ( chainable ) { 4195 return elems; 4196 } 4197 4198 // Gets 4199 if ( bulk ) { 4200 return fn.call( elems ); 4201 } 4202 4203 return len ? fn( elems[ 0 ], key ) : emptyGet; 4204}; 4205 4206 4207// Matches dashed string for camelizing 4208var rmsPrefix = /^-ms-/, 4209 rdashAlpha = /-([a-z])/g; 4210 4211// Used by camelCase as callback to replace() 4212function fcamelCase( _all, letter ) { 4213 return letter.toUpperCase(); 4214} 4215 4216// Convert dashed to camelCase; used by the css and data modules 4217// Support: IE <=9 - 11, Edge 12 - 15 4218// Microsoft forgot to hump their vendor prefix (#9572) 4219function camelCase( string ) { 4220 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 4221} 4222var acceptData = function( owner ) { 4223 4224 // Accepts only: 4225 // - Node 4226 // - Node.ELEMENT_NODE 4227 // - Node.DOCUMENT_NODE 4228 // - Object 4229 // - Any 4230 return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 4231}; 4232 4233 4234 4235 4236function Data() { 4237 this.expando = jQuery.expando + Data.uid++; 4238} 4239 4240Data.uid = 1; 4241 4242Data.prototype = { 4243 4244 cache: function( owner ) { 4245 4246 // Check if the owner object already has a cache 4247 var value = owner[ this.expando ]; 4248 4249 // If not, create one 4250 if ( !value ) { 4251 value = {}; 4252 4253 // We can accept data for non-element nodes in modern browsers, 4254 // but we should not, see #8335. 4255 // Always return an empty object. 4256 if ( acceptData( owner ) ) { 4257 4258 // If it is a node unlikely to be stringify-ed or looped over 4259 // use plain assignment 4260 if ( owner.nodeType ) { 4261 owner[ this.expando ] = value; 4262 4263 // Otherwise secure it in a non-enumerable property 4264 // configurable must be true to allow the property to be 4265 // deleted when data is removed 4266 } else { 4267 Object.defineProperty( owner, this.expando, { 4268 value: value, 4269 configurable: true 4270 } ); 4271 } 4272 } 4273 } 4274 4275 return value; 4276 }, 4277 set: function( owner, data, value ) { 4278 var prop, 4279 cache = this.cache( owner ); 4280 4281 // Handle: [ owner, key, value ] args 4282 // Always use camelCase key (gh-2257) 4283 if ( typeof data === "string" ) { 4284 cache[ camelCase( data ) ] = value; 4285 4286 // Handle: [ owner, { properties } ] args 4287 } else { 4288 4289 // Copy the properties one-by-one to the cache object 4290 for ( prop in data ) { 4291 cache[ camelCase( prop ) ] = data[ prop ]; 4292 } 4293 } 4294 return cache; 4295 }, 4296 get: function( owner, key ) { 4297 return key === undefined ? 4298 this.cache( owner ) : 4299 4300 // Always use camelCase key (gh-2257) 4301 owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; 4302 }, 4303 access: function( owner, key, value ) { 4304 4305 // In cases where either: 4306 // 4307 // 1. No key was specified 4308 // 2. A string key was specified, but no value provided 4309 // 4310 // Take the "read" path and allow the get method to determine 4311 // which value to return, respectively either: 4312 // 4313 // 1. The entire cache object 4314 // 2. The data stored at the key 4315 // 4316 if ( key === undefined || 4317 ( ( key && typeof key === "string" ) && value === undefined ) ) { 4318 4319 return this.get( owner, key ); 4320 } 4321 4322 // When the key is not a string, or both a key and value 4323 // are specified, set or extend (existing objects) with either: 4324 // 4325 // 1. An object of properties 4326 // 2. A key and value 4327 // 4328 this.set( owner, key, value ); 4329 4330 // Since the "set" path can have two possible entry points 4331 // return the expected data based on which path was taken[*] 4332 return value !== undefined ? value : key; 4333 }, 4334 remove: function( owner, key ) { 4335 var i, 4336 cache = owner[ this.expando ]; 4337 4338 if ( cache === undefined ) { 4339 return; 4340 } 4341 4342 if ( key !== undefined ) { 4343 4344 // Support array or space separated string of keys 4345 if ( Array.isArray( key ) ) { 4346 4347 // If key is an array of keys... 4348 // We always set camelCase keys, so remove that. 4349 key = key.map( camelCase ); 4350 } else { 4351 key = camelCase( key ); 4352 4353 // If a key with the spaces exists, use it. 4354 // Otherwise, create an array by matching non-whitespace 4355 key = key in cache ? 4356 [ key ] : 4357 ( key.match( rnothtmlwhite ) || [] ); 4358 } 4359 4360 i = key.length; 4361 4362 while ( i-- ) { 4363 delete cache[ key[ i ] ]; 4364 } 4365 } 4366 4367 // Remove the expando if there's no more data 4368 if ( key === undefined || jQuery.isEmptyObject( cache ) ) { 4369 4370 // Support: Chrome <=35 - 45 4371 // Webkit & Blink performance suffers when deleting properties 4372 // from DOM nodes, so set to undefined instead 4373 // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) 4374 if ( owner.nodeType ) { 4375 owner[ this.expando ] = undefined; 4376 } else { 4377 delete owner[ this.expando ]; 4378 } 4379 } 4380 }, 4381 hasData: function( owner ) { 4382 var cache = owner[ this.expando ]; 4383 return cache !== undefined && !jQuery.isEmptyObject( cache ); 4384 } 4385}; 4386var dataPriv = new Data(); 4387 4388var dataUser = new Data(); 4389 4390 4391 4392// Implementation Summary 4393// 4394// 1. Enforce API surface and semantic compatibility with 1.9.x branch 4395// 2. Improve the module's maintainability by reducing the storage 4396// paths to a single mechanism. 4397// 3. Use the same single mechanism to support "private" and "user" data. 4398// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 4399// 5. Avoid exposing implementation details on user objects (eg. expando properties) 4400// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 4401 4402var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 4403 rmultiDash = /[A-Z]/g; 4404 4405function getData( data ) { 4406 if ( data === "true" ) { 4407 return true; 4408 } 4409 4410 if ( data === "false" ) { 4411 return false; 4412 } 4413 4414 if ( data === "null" ) { 4415 return null; 4416 } 4417 4418 // Only convert to a number if it doesn't change the string 4419 if ( data === +data + "" ) { 4420 return +data; 4421 } 4422 4423 if ( rbrace.test( data ) ) { 4424 return JSON.parse( data ); 4425 } 4426 4427 return data; 4428} 4429 4430function dataAttr( elem, key, data ) { 4431 var name; 4432 4433 // If nothing was found internally, try to fetch any 4434 // data from the HTML5 data-* attribute 4435 if ( data === undefined && elem.nodeType === 1 ) { 4436 name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); 4437 data = elem.getAttribute( name ); 4438 4439 if ( typeof data === "string" ) { 4440 try { 4441 data = getData( data ); 4442 } catch ( e ) {} 4443 4444 // Make sure we set the data so it isn't changed later 4445 dataUser.set( elem, key, data ); 4446 } else { 4447 data = undefined; 4448 } 4449 } 4450 return data; 4451} 4452 4453jQuery.extend( { 4454 hasData: function( elem ) { 4455 return dataUser.hasData( elem ) || dataPriv.hasData( elem ); 4456 }, 4457 4458 data: function( elem, name, data ) { 4459 return dataUser.access( elem, name, data ); 4460 }, 4461 4462 removeData: function( elem, name ) { 4463 dataUser.remove( elem, name ); 4464 }, 4465 4466 // TODO: Now that all calls to _data and _removeData have been replaced 4467 // with direct calls to dataPriv methods, these can be deprecated. 4468 _data: function( elem, name, data ) { 4469 return dataPriv.access( elem, name, data ); 4470 }, 4471 4472 _removeData: function( elem, name ) { 4473 dataPriv.remove( elem, name ); 4474 } 4475} ); 4476 4477jQuery.fn.extend( { 4478 data: function( key, value ) { 4479 var i, name, data, 4480 elem = this[ 0 ], 4481 attrs = elem && elem.attributes; 4482 4483 // Gets all values 4484 if ( key === undefined ) { 4485 if ( this.length ) { 4486 data = dataUser.get( elem ); 4487 4488 if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { 4489 i = attrs.length; 4490 while ( i-- ) { 4491 4492 // Support: IE 11 only 4493 // The attrs elements can be null (#14894) 4494 if ( attrs[ i ] ) { 4495 name = attrs[ i ].name; 4496 if ( name.indexOf( "data-" ) === 0 ) { 4497 name = camelCase( name.slice( 5 ) ); 4498 dataAttr( elem, name, data[ name ] ); 4499 } 4500 } 4501 } 4502 dataPriv.set( elem, "hasDataAttrs", true ); 4503 } 4504 } 4505 4506 return data; 4507 } 4508 4509 // Sets multiple values 4510 if ( typeof key === "object" ) { 4511 return this.each( function() { 4512 dataUser.set( this, key ); 4513 } ); 4514 } 4515 4516 return access( this, function( value ) { 4517 var data; 4518 4519 // The calling jQuery object (element matches) is not empty 4520 // (and therefore has an element appears at this[ 0 ]) and the 4521 // `value` parameter was not undefined. An empty jQuery object 4522 // will result in `undefined` for elem = this[ 0 ] which will 4523 // throw an exception if an attempt to read a data cache is made. 4524 if ( elem && value === undefined ) { 4525 4526 // Attempt to get data from the cache 4527 // The key will always be camelCased in Data 4528 data = dataUser.get( elem, key ); 4529 if ( data !== undefined ) { 4530 return data; 4531 } 4532 4533 // Attempt to "discover" the data in 4534 // HTML5 custom data-* attrs 4535 data = dataAttr( elem, key ); 4536 if ( data !== undefined ) { 4537 return data; 4538 } 4539 4540 // We tried really hard, but the data doesn't exist. 4541 return; 4542 } 4543 4544 // Set the data... 4545 this.each( function() { 4546 4547 // We always store the camelCased key 4548 dataUser.set( this, key, value ); 4549 } ); 4550 }, null, value, arguments.length > 1, null, true ); 4551 }, 4552 4553 removeData: function( key ) { 4554 return this.each( function() { 4555 dataUser.remove( this, key ); 4556 } ); 4557 } 4558} ); 4559 4560 4561jQuery.extend( { 4562 queue: function( elem, type, data ) { 4563 var queue; 4564 4565 if ( elem ) { 4566 type = ( type || "fx" ) + "queue"; 4567 queue = dataPriv.get( elem, type ); 4568 4569 // Speed up dequeue by getting out quickly if this is just a lookup 4570 if ( data ) { 4571 if ( !queue || Array.isArray( data ) ) { 4572 queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); 4573 } else { 4574 queue.push( data ); 4575 } 4576 } 4577 return queue || []; 4578 } 4579 }, 4580 4581 dequeue: function( elem, type ) { 4582 type = type || "fx"; 4583 4584 var queue = jQuery.queue( elem, type ), 4585 startLength = queue.length, 4586 fn = queue.shift(), 4587 hooks = jQuery._queueHooks( elem, type ), 4588 next = function() { 4589 jQuery.dequeue( elem, type ); 4590 }; 4591 4592 // If the fx queue is dequeued, always remove the progress sentinel 4593 if ( fn === "inprogress" ) { 4594 fn = queue.shift(); 4595 startLength--; 4596 } 4597 4598 if ( fn ) { 4599 4600 // Add a progress sentinel to prevent the fx queue from being 4601 // automatically dequeued 4602 if ( type === "fx" ) { 4603 queue.unshift( "inprogress" ); 4604 } 4605 4606 // Clear up the last queue stop function 4607 delete hooks.stop; 4608 fn.call( elem, next, hooks ); 4609 } 4610 4611 if ( !startLength && hooks ) { 4612 hooks.empty.fire(); 4613 } 4614 }, 4615 4616 // Not public - generate a queueHooks object, or return the current one 4617 _queueHooks: function( elem, type ) { 4618 var key = type + "queueHooks"; 4619 return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { 4620 empty: jQuery.Callbacks( "once memory" ).add( function() { 4621 dataPriv.remove( elem, [ type + "queue", key ] ); 4622 } ) 4623 } ); 4624 } 4625} ); 4626 4627jQuery.fn.extend( { 4628 queue: function( type, data ) { 4629 var setter = 2; 4630 4631 if ( typeof type !== "string" ) { 4632 data = type; 4633 type = "fx"; 4634 setter--; 4635 } 4636 4637 if ( arguments.length < setter ) { 4638 return jQuery.queue( this[ 0 ], type ); 4639 } 4640 4641 return data === undefined ? 4642 this : 4643 this.each( function() { 4644 var queue = jQuery.queue( this, type, data ); 4645 4646 // Ensure a hooks for this queue 4647 jQuery._queueHooks( this, type ); 4648 4649 if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { 4650 jQuery.dequeue( this, type ); 4651 } 4652 } ); 4653 }, 4654 dequeue: function( type ) { 4655 return this.each( function() { 4656 jQuery.dequeue( this, type ); 4657 } ); 4658 }, 4659 clearQueue: function( type ) { 4660 return this.queue( type || "fx", [] ); 4661 }, 4662 4663 // Get a promise resolved when queues of a certain type 4664 // are emptied (fx is the type by default) 4665 promise: function( type, obj ) { 4666 var tmp, 4667 count = 1, 4668 defer = jQuery.Deferred(), 4669 elements = this, 4670 i = this.length, 4671 resolve = function() { 4672 if ( !( --count ) ) { 4673 defer.resolveWith( elements, [ elements ] ); 4674 } 4675 }; 4676 4677 if ( typeof type !== "string" ) { 4678 obj = type; 4679 type = undefined; 4680 } 4681 type = type || "fx"; 4682 4683 while ( i-- ) { 4684 tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); 4685 if ( tmp && tmp.empty ) { 4686 count++; 4687 tmp.empty.add( resolve ); 4688 } 4689 } 4690 resolve(); 4691 return defer.promise( obj ); 4692 } 4693} ); 4694var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 4695 4696var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 4697 4698 4699var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; 4700 4701var documentElement = document.documentElement; 4702 4703 4704 4705 var isAttached = function( elem ) { 4706 return jQuery.contains( elem.ownerDocument, elem ); 4707 }, 4708 composed = { composed: true }; 4709 4710 // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only 4711 // Check attachment across shadow DOM boundaries when possible (gh-3504) 4712 // Support: iOS 10.0-10.2 only 4713 // Early iOS 10 versions support `attachShadow` but not `getRootNode`, 4714 // leading to errors. We need to check for `getRootNode`. 4715 if ( documentElement.getRootNode ) { 4716 isAttached = function( elem ) { 4717 return jQuery.contains( elem.ownerDocument, elem ) || 4718 elem.getRootNode( composed ) === elem.ownerDocument; 4719 }; 4720 } 4721var isHiddenWithinTree = function( elem, el ) { 4722 4723 // isHiddenWithinTree might be called from jQuery#filter function; 4724 // in that case, element will be second argument 4725 elem = el || elem; 4726 4727 // Inline style trumps all 4728 return elem.style.display === "none" || 4729 elem.style.display === "" && 4730 4731 // Otherwise, check computed style 4732 // Support: Firefox <=43 - 45 4733 // Disconnected elements can have computed display: none, so first confirm that elem is 4734 // in the document. 4735 isAttached( elem ) && 4736 4737 jQuery.css( elem, "display" ) === "none"; 4738 }; 4739 4740 4741 4742function adjustCSS( elem, prop, valueParts, tween ) { 4743 var adjusted, scale, 4744 maxIterations = 20, 4745 currentValue = tween ? 4746 function() { 4747 return tween.cur(); 4748 } : 4749 function() { 4750 return jQuery.css( elem, prop, "" ); 4751 }, 4752 initial = currentValue(), 4753 unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), 4754 4755 // Starting value computation is required for potential unit mismatches 4756 initialInUnit = elem.nodeType && 4757 ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && 4758 rcssNum.exec( jQuery.css( elem, prop ) ); 4759 4760 if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { 4761 4762 // Support: Firefox <=54 4763 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) 4764 initial = initial / 2; 4765 4766 // Trust units reported by jQuery.css 4767 unit = unit || initialInUnit[ 3 ]; 4768 4769 // Iteratively approximate from a nonzero starting point 4770 initialInUnit = +initial || 1; 4771 4772 while ( maxIterations-- ) { 4773 4774 // Evaluate and update our best guess (doubling guesses that zero out). 4775 // Finish if the scale equals or crosses 1 (making the old*new product non-positive). 4776 jQuery.style( elem, prop, initialInUnit + unit ); 4777 if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { 4778 maxIterations = 0; 4779 } 4780 initialInUnit = initialInUnit / scale; 4781 4782 } 4783 4784 initialInUnit = initialInUnit * 2; 4785 jQuery.style( elem, prop, initialInUnit + unit ); 4786 4787 // Make sure we update the tween properties later on 4788 valueParts = valueParts || []; 4789 } 4790 4791 if ( valueParts ) { 4792 initialInUnit = +initialInUnit || +initial || 0; 4793 4794 // Apply relative offset (+=/-=) if specified 4795 adjusted = valueParts[ 1 ] ? 4796 initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : 4797 +valueParts[ 2 ]; 4798 if ( tween ) { 4799 tween.unit = unit; 4800 tween.start = initialInUnit; 4801 tween.end = adjusted; 4802 } 4803 } 4804 return adjusted; 4805} 4806 4807 4808var defaultDisplayMap = {}; 4809 4810function getDefaultDisplay( elem ) { 4811 var temp, 4812 doc = elem.ownerDocument, 4813 nodeName = elem.nodeName, 4814 display = defaultDisplayMap[ nodeName ]; 4815 4816 if ( display ) { 4817 return display; 4818 } 4819 4820 temp = doc.body.appendChild( doc.createElement( nodeName ) ); 4821 display = jQuery.css( temp, "display" ); 4822 4823 temp.parentNode.removeChild( temp ); 4824 4825 if ( display === "none" ) { 4826 display = "block"; 4827 } 4828 defaultDisplayMap[ nodeName ] = display; 4829 4830 return display; 4831} 4832 4833function showHide( elements, show ) { 4834 var display, elem, 4835 values = [], 4836 index = 0, 4837 length = elements.length; 4838 4839 // Determine new display value for elements that need to change 4840 for ( ; index < length; index++ ) { 4841 elem = elements[ index ]; 4842 if ( !elem.style ) { 4843 continue; 4844 } 4845 4846 display = elem.style.display; 4847 if ( show ) { 4848 4849 // Since we force visibility upon cascade-hidden elements, an immediate (and slow) 4850 // check is required in this first loop unless we have a nonempty display value (either 4851 // inline or about-to-be-restored) 4852 if ( display === "none" ) { 4853 values[ index ] = dataPriv.get( elem, "display" ) || null; 4854 if ( !values[ index ] ) { 4855 elem.style.display = ""; 4856 } 4857 } 4858 if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { 4859 values[ index ] = getDefaultDisplay( elem ); 4860 } 4861 } else { 4862 if ( display !== "none" ) { 4863 values[ index ] = "none"; 4864 4865 // Remember what we're overwriting 4866 dataPriv.set( elem, "display", display ); 4867 } 4868 } 4869 } 4870 4871 // Set the display of the elements in a second loop to avoid constant reflow 4872 for ( index = 0; index < length; index++ ) { 4873 if ( values[ index ] != null ) { 4874 elements[ index ].style.display = values[ index ]; 4875 } 4876 } 4877 4878 return elements; 4879} 4880 4881jQuery.fn.extend( { 4882 show: function() { 4883 return showHide( this, true ); 4884 }, 4885 hide: function() { 4886 return showHide( this ); 4887 }, 4888 toggle: function( state ) { 4889 if ( typeof state === "boolean" ) { 4890 return state ? this.show() : this.hide(); 4891 } 4892 4893 return this.each( function() { 4894 if ( isHiddenWithinTree( this ) ) { 4895 jQuery( this ).show(); 4896 } else { 4897 jQuery( this ).hide(); 4898 } 4899 } ); 4900 } 4901} ); 4902var rcheckableType = ( /^(?:checkbox|radio)$/i ); 4903 4904var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); 4905 4906var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); 4907 4908 4909 4910( function() { 4911 var fragment = document.createDocumentFragment(), 4912 div = fragment.appendChild( document.createElement( "div" ) ), 4913 input = document.createElement( "input" ); 4914 4915 // Support: Android 4.0 - 4.3 only 4916 // Check state lost if the name is set (#11217) 4917 // Support: Windows Web Apps (WWA) 4918 // `name` and `type` must use .setAttribute for WWA (#14901) 4919 input.setAttribute( "type", "radio" ); 4920 input.setAttribute( "checked", "checked" ); 4921 input.setAttribute( "name", "t" ); 4922 4923 div.appendChild( input ); 4924 4925 // Support: Android <=4.1 only 4926 // Older WebKit doesn't clone checked state correctly in fragments 4927 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 4928 4929 // Support: IE <=11 only 4930 // Make sure textarea (and checkbox) defaultValue is properly cloned 4931 div.innerHTML = "<textarea>x</textarea>"; 4932 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 4933 4934 // Support: IE <=9 only 4935 // IE <=9 replaces <option> tags with their contents when inserted outside of 4936 // the select element. 4937 div.innerHTML = "<option></option>"; 4938 support.option = !!div.lastChild; 4939} )(); 4940 4941 4942// We have to close these tags to support XHTML (#13200) 4943var wrapMap = { 4944 4945 // XHTML parsers do not magically insert elements in the 4946 // same way that tag soup parsers do. So we cannot shorten 4947 // this by omitting <tbody> or other required elements. 4948 thead: [ 1, "<table>", "</table>" ], 4949 col: [ 2, "<table><colgroup>", "</colgroup></table>" ], 4950 tr: [ 2, "<table><tbody>", "</tbody></table>" ], 4951 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 4952 4953 _default: [ 0, "", "" ] 4954}; 4955 4956wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 4957wrapMap.th = wrapMap.td; 4958 4959// Support: IE <=9 only 4960if ( !support.option ) { 4961 wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ]; 4962} 4963 4964 4965function getAll( context, tag ) { 4966 4967 // Support: IE <=9 - 11 only 4968 // Use typeof to avoid zero-argument method invocation on host objects (#15151) 4969 var ret; 4970 4971 if ( typeof context.getElementsByTagName !== "undefined" ) { 4972 ret = context.getElementsByTagName( tag || "*" ); 4973 4974 } else if ( typeof context.querySelectorAll !== "undefined" ) { 4975 ret = context.querySelectorAll( tag || "*" ); 4976 4977 } else { 4978 ret = []; 4979 } 4980 4981 if ( tag === undefined || tag && nodeName( context, tag ) ) { 4982 return jQuery.merge( [ context ], ret ); 4983 } 4984 4985 return ret; 4986} 4987 4988 4989// Mark scripts as having already been evaluated 4990function setGlobalEval( elems, refElements ) { 4991 var i = 0, 4992 l = elems.length; 4993 4994 for ( ; i < l; i++ ) { 4995 dataPriv.set( 4996 elems[ i ], 4997 "globalEval", 4998 !refElements || dataPriv.get( refElements[ i ], "globalEval" ) 4999 ); 5000 } 5001} 5002 5003 5004var rhtml = /<|&#?\w+;/; 5005 5006function buildFragment( elems, context, scripts, selection, ignored ) { 5007 var elem, tmp, tag, wrap, attached, j, 5008 fragment = context.createDocumentFragment(), 5009 nodes = [], 5010 i = 0, 5011 l = elems.length; 5012 5013 for ( ; i < l; i++ ) { 5014 elem = elems[ i ]; 5015 5016 if ( elem || elem === 0 ) { 5017 5018 // Add nodes directly 5019 if ( toType( elem ) === "object" ) { 5020 5021 // Support: Android <=4.0 only, PhantomJS 1 only 5022 // push.apply(_, arraylike) throws on ancient WebKit 5023 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 5024 5025 // Convert non-html into a text node 5026 } else if ( !rhtml.test( elem ) ) { 5027 nodes.push( context.createTextNode( elem ) ); 5028 5029 // Convert html into DOM nodes 5030 } else { 5031 tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); 5032 5033 // Deserialize a standard representation 5034 tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); 5035 wrap = wrapMap[ tag ] || wrapMap._default; 5036 tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; 5037 5038 // Descend through wrappers to the right content 5039 j = wrap[ 0 ]; 5040 while ( j-- ) { 5041 tmp = tmp.lastChild; 5042 } 5043 5044 // Support: Android <=4.0 only, PhantomJS 1 only 5045 // push.apply(_, arraylike) throws on ancient WebKit 5046 jQuery.merge( nodes, tmp.childNodes ); 5047 5048 // Remember the top-level container 5049 tmp = fragment.firstChild; 5050 5051 // Ensure the created nodes are orphaned (#12392) 5052 tmp.textContent = ""; 5053 } 5054 } 5055 } 5056 5057 // Remove wrapper from fragment 5058 fragment.textContent = ""; 5059 5060 i = 0; 5061 while ( ( elem = nodes[ i++ ] ) ) { 5062 5063 // Skip elements already in the context collection (trac-4087) 5064 if ( selection && jQuery.inArray( elem, selection ) > -1 ) { 5065 if ( ignored ) { 5066 ignored.push( elem ); 5067 } 5068 continue; 5069 } 5070 5071 attached = isAttached( elem ); 5072 5073 // Append to fragment 5074 tmp = getAll( fragment.appendChild( elem ), "script" ); 5075 5076 // Preserve script evaluation history 5077 if ( attached ) { 5078 setGlobalEval( tmp ); 5079 } 5080 5081 // Capture executables 5082 if ( scripts ) { 5083 j = 0; 5084 while ( ( elem = tmp[ j++ ] ) ) { 5085 if ( rscriptType.test( elem.type || "" ) ) { 5086 scripts.push( elem ); 5087 } 5088 } 5089 } 5090 } 5091 5092 return fragment; 5093} 5094 5095 5096var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 5097 5098function returnTrue() { 5099 return true; 5100} 5101 5102function returnFalse() { 5103 return false; 5104} 5105 5106// Support: IE <=9 - 11+ 5107// focus() and blur() are asynchronous, except when they are no-op. 5108// So expect focus to be synchronous when the element is already active, 5109// and blur to be synchronous when the element is not already active. 5110// (focus and blur are always synchronous in other supported browsers, 5111// this just defines when we can count on it). 5112function expectSync( elem, type ) { 5113 return ( elem === safeActiveElement() ) === ( type === "focus" ); 5114} 5115 5116// Support: IE <=9 only 5117// Accessing document.activeElement can throw unexpectedly 5118// https://bugs.jquery.com/ticket/13393 5119function safeActiveElement() { 5120 try { 5121 return document.activeElement; 5122 } catch ( err ) { } 5123} 5124 5125function on( elem, types, selector, data, fn, one ) { 5126 var origFn, type; 5127 5128 // Types can be a map of types/handlers 5129 if ( typeof types === "object" ) { 5130 5131 // ( types-Object, selector, data ) 5132 if ( typeof selector !== "string" ) { 5133 5134 // ( types-Object, data ) 5135 data = data || selector; 5136 selector = undefined; 5137 } 5138 for ( type in types ) { 5139 on( elem, type, selector, data, types[ type ], one ); 5140 } 5141 return elem; 5142 } 5143 5144 if ( data == null && fn == null ) { 5145 5146 // ( types, fn ) 5147 fn = selector; 5148 data = selector = undefined; 5149 } else if ( fn == null ) { 5150 if ( typeof selector === "string" ) { 5151 5152 // ( types, selector, fn ) 5153 fn = data; 5154 data = undefined; 5155 } else { 5156 5157 // ( types, data, fn ) 5158 fn = data; 5159 data = selector; 5160 selector = undefined; 5161 } 5162 } 5163 if ( fn === false ) { 5164 fn = returnFalse; 5165 } else if ( !fn ) { 5166 return elem; 5167 } 5168 5169 if ( one === 1 ) { 5170 origFn = fn; 5171 fn = function( event ) { 5172 5173 // Can use an empty set, since event contains the info 5174 jQuery().off( event ); 5175 return origFn.apply( this, arguments ); 5176 }; 5177 5178 // Use same guid so caller can remove using origFn 5179 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); 5180 } 5181 return elem.each( function() { 5182 jQuery.event.add( this, types, fn, data, selector ); 5183 } ); 5184} 5185 5186/* 5187 * Helper functions for managing events -- not part of the public interface. 5188 * Props to Dean Edwards' addEvent library for many of the ideas. 5189 */ 5190jQuery.event = { 5191 5192 global: {}, 5193 5194 add: function( elem, types, handler, data, selector ) { 5195 5196 var handleObjIn, eventHandle, tmp, 5197 events, t, handleObj, 5198 special, handlers, type, namespaces, origType, 5199 elemData = dataPriv.get( elem ); 5200 5201 // Only attach events to objects that accept data 5202 if ( !acceptData( elem ) ) { 5203 return; 5204 } 5205 5206 // Caller can pass in an object of custom data in lieu of the handler 5207 if ( handler.handler ) { 5208 handleObjIn = handler; 5209 handler = handleObjIn.handler; 5210 selector = handleObjIn.selector; 5211 } 5212 5213 // Ensure that invalid selectors throw exceptions at attach time 5214 // Evaluate against documentElement in case elem is a non-element node (e.g., document) 5215 if ( selector ) { 5216 jQuery.find.matchesSelector( documentElement, selector ); 5217 } 5218 5219 // Make sure that the handler has a unique ID, used to find/remove it later 5220 if ( !handler.guid ) { 5221 handler.guid = jQuery.guid++; 5222 } 5223 5224 // Init the element's event structure and main handler, if this is the first 5225 if ( !( events = elemData.events ) ) { 5226 events = elemData.events = Object.create( null ); 5227 } 5228 if ( !( eventHandle = elemData.handle ) ) { 5229 eventHandle = elemData.handle = function( e ) { 5230 5231 // Discard the second event of a jQuery.event.trigger() and 5232 // when an event is called after a page has unloaded 5233 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? 5234 jQuery.event.dispatch.apply( elem, arguments ) : undefined; 5235 }; 5236 } 5237 5238 // Handle multiple events separated by a space 5239 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; 5240 t = types.length; 5241 while ( t-- ) { 5242 tmp = rtypenamespace.exec( types[ t ] ) || []; 5243 type = origType = tmp[ 1 ]; 5244 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 5245 5246 // There *must* be a type, no attaching namespace-only handlers 5247 if ( !type ) { 5248 continue; 5249 } 5250 5251 // If event changes its type, use the special event handlers for the changed type 5252 special = jQuery.event.special[ type ] || {}; 5253 5254 // If selector defined, determine special event api type, otherwise given type 5255 type = ( selector ? special.delegateType : special.bindType ) || type; 5256 5257 // Update special based on newly reset type 5258 special = jQuery.event.special[ type ] || {}; 5259 5260 // handleObj is passed to all event handlers 5261 handleObj = jQuery.extend( { 5262 type: type, 5263 origType: origType, 5264 data: data, 5265 handler: handler, 5266 guid: handler.guid, 5267 selector: selector, 5268 needsContext: selector && jQuery.expr.match.needsContext.test( selector ), 5269 namespace: namespaces.join( "." ) 5270 }, handleObjIn ); 5271 5272 // Init the event handler queue if we're the first 5273 if ( !( handlers = events[ type ] ) ) { 5274 handlers = events[ type ] = []; 5275 handlers.delegateCount = 0; 5276 5277 // Only use addEventListener if the special events handler returns false 5278 if ( !special.setup || 5279 special.setup.call( elem, data, namespaces, eventHandle ) === false ) { 5280 5281 if ( elem.addEventListener ) { 5282 elem.addEventListener( type, eventHandle ); 5283 } 5284 } 5285 } 5286 5287 if ( special.add ) { 5288 special.add.call( elem, handleObj ); 5289 5290 if ( !handleObj.handler.guid ) { 5291 handleObj.handler.guid = handler.guid; 5292 } 5293 } 5294 5295 // Add to the element's handler list, delegates in front 5296 if ( selector ) { 5297 handlers.splice( handlers.delegateCount++, 0, handleObj ); 5298 } else { 5299 handlers.push( handleObj ); 5300 } 5301 5302 // Keep track of which events have ever been used, for event optimization 5303 jQuery.event.global[ type ] = true; 5304 } 5305 5306 }, 5307 5308 // Detach an event or set of events from an element 5309 remove: function( elem, types, handler, selector, mappedTypes ) { 5310 5311 var j, origCount, tmp, 5312 events, t, handleObj, 5313 special, handlers, type, namespaces, origType, 5314 elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); 5315 5316 if ( !elemData || !( events = elemData.events ) ) { 5317 return; 5318 } 5319 5320 // Once for each type.namespace in types; type may be omitted 5321 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; 5322 t = types.length; 5323 while ( t-- ) { 5324 tmp = rtypenamespace.exec( types[ t ] ) || []; 5325 type = origType = tmp[ 1 ]; 5326 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 5327 5328 // Unbind all events (on this namespace, if provided) for the element 5329 if ( !type ) { 5330 for ( type in events ) { 5331 jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); 5332 } 5333 continue; 5334 } 5335 5336 special = jQuery.event.special[ type ] || {}; 5337 type = ( selector ? special.delegateType : special.bindType ) || type; 5338 handlers = events[ type ] || []; 5339 tmp = tmp[ 2 ] && 5340 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); 5341 5342 // Remove matching events 5343 origCount = j = handlers.length; 5344 while ( j-- ) { 5345 handleObj = handlers[ j ]; 5346 5347 if ( ( mappedTypes || origType === handleObj.origType ) && 5348 ( !handler || handler.guid === handleObj.guid ) && 5349 ( !tmp || tmp.test( handleObj.namespace ) ) && 5350 ( !selector || selector === handleObj.selector || 5351 selector === "**" && handleObj.selector ) ) { 5352 handlers.splice( j, 1 ); 5353 5354 if ( handleObj.selector ) { 5355 handlers.delegateCount--; 5356 } 5357 if ( special.remove ) { 5358 special.remove.call( elem, handleObj ); 5359 } 5360 } 5361 } 5362 5363 // Remove generic event handler if we removed something and no more handlers exist 5364 // (avoids potential for endless recursion during removal of special event handlers) 5365 if ( origCount && !handlers.length ) { 5366 if ( !special.teardown || 5367 special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 5368 5369 jQuery.removeEvent( elem, type, elemData.handle ); 5370 } 5371 5372 delete events[ type ]; 5373 } 5374 } 5375 5376 // Remove data and the expando if it's no longer used 5377 if ( jQuery.isEmptyObject( events ) ) { 5378 dataPriv.remove( elem, "handle events" ); 5379 } 5380 }, 5381 5382 dispatch: function( nativeEvent ) { 5383 5384 var i, j, ret, matched, handleObj, handlerQueue, 5385 args = new Array( arguments.length ), 5386 5387 // Make a writable jQuery.Event from the native event object 5388 event = jQuery.event.fix( nativeEvent ), 5389 5390 handlers = ( 5391 dataPriv.get( this, "events" ) || Object.create( null ) 5392 )[ event.type ] || [], 5393 special = jQuery.event.special[ event.type ] || {}; 5394 5395 // Use the fix-ed jQuery.Event rather than the (read-only) native event 5396 args[ 0 ] = event; 5397 5398 for ( i = 1; i < arguments.length; i++ ) { 5399 args[ i ] = arguments[ i ]; 5400 } 5401 5402 event.delegateTarget = this; 5403 5404 // Call the preDispatch hook for the mapped type, and let it bail if desired 5405 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { 5406 return; 5407 } 5408 5409 // Determine handlers 5410 handlerQueue = jQuery.event.handlers.call( this, event, handlers ); 5411 5412 // Run delegates first; they may want to stop propagation beneath us 5413 i = 0; 5414 while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { 5415 event.currentTarget = matched.elem; 5416 5417 j = 0; 5418 while ( ( handleObj = matched.handlers[ j++ ] ) && 5419 !event.isImmediatePropagationStopped() ) { 5420 5421 // If the event is namespaced, then each handler is only invoked if it is 5422 // specially universal or its namespaces are a superset of the event's. 5423 if ( !event.rnamespace || handleObj.namespace === false || 5424 event.rnamespace.test( handleObj.namespace ) ) { 5425 5426 event.handleObj = handleObj; 5427 event.data = handleObj.data; 5428 5429 ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || 5430 handleObj.handler ).apply( matched.elem, args ); 5431 5432 if ( ret !== undefined ) { 5433 if ( ( event.result = ret ) === false ) { 5434 event.preventDefault(); 5435 event.stopPropagation(); 5436 } 5437 } 5438 } 5439 } 5440 } 5441 5442 // Call the postDispatch hook for the mapped type 5443 if ( special.postDispatch ) { 5444 special.postDispatch.call( this, event ); 5445 } 5446 5447 return event.result; 5448 }, 5449 5450 handlers: function( event, handlers ) { 5451 var i, handleObj, sel, matchedHandlers, matchedSelectors, 5452 handlerQueue = [], 5453 delegateCount = handlers.delegateCount, 5454 cur = event.target; 5455 5456 // Find delegate handlers 5457 if ( delegateCount && 5458 5459 // Support: IE <=9 5460 // Black-hole SVG <use> instance trees (trac-13180) 5461 cur.nodeType && 5462 5463 // Support: Firefox <=42 5464 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) 5465 // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click 5466 // Support: IE 11 only 5467 // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) 5468 !( event.type === "click" && event.button >= 1 ) ) { 5469 5470 for ( ; cur !== this; cur = cur.parentNode || this ) { 5471 5472 // Don't check non-elements (#13208) 5473 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 5474 if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { 5475 matchedHandlers = []; 5476 matchedSelectors = {}; 5477 for ( i = 0; i < delegateCount; i++ ) { 5478 handleObj = handlers[ i ]; 5479 5480 // Don't conflict with Object.prototype properties (#13203) 5481 sel = handleObj.selector + " "; 5482 5483 if ( matchedSelectors[ sel ] === undefined ) { 5484 matchedSelectors[ sel ] = handleObj.needsContext ? 5485 jQuery( sel, this ).index( cur ) > -1 : 5486 jQuery.find( sel, this, null, [ cur ] ).length; 5487 } 5488 if ( matchedSelectors[ sel ] ) { 5489 matchedHandlers.push( handleObj ); 5490 } 5491 } 5492 if ( matchedHandlers.length ) { 5493 handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); 5494 } 5495 } 5496 } 5497 } 5498 5499 // Add the remaining (directly-bound) handlers 5500 cur = this; 5501 if ( delegateCount < handlers.length ) { 5502 handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); 5503 } 5504 5505 return handlerQueue; 5506 }, 5507 5508 addProp: function( name, hook ) { 5509 Object.defineProperty( jQuery.Event.prototype, name, { 5510 enumerable: true, 5511 configurable: true, 5512 5513 get: isFunction( hook ) ? 5514 function() { 5515 if ( this.originalEvent ) { 5516 return hook( this.originalEvent ); 5517 } 5518 } : 5519 function() { 5520 if ( this.originalEvent ) { 5521 return this.originalEvent[ name ]; 5522 } 5523 }, 5524 5525 set: function( value ) { 5526 Object.defineProperty( this, name, { 5527 enumerable: true, 5528 configurable: true, 5529 writable: true, 5530 value: value 5531 } ); 5532 } 5533 } ); 5534 }, 5535 5536 fix: function( originalEvent ) { 5537 return originalEvent[ jQuery.expando ] ? 5538 originalEvent : 5539 new jQuery.Event( originalEvent ); 5540 }, 5541 5542 special: { 5543 load: { 5544 5545 // Prevent triggered image.load events from bubbling to window.load 5546 noBubble: true 5547 }, 5548 click: { 5549 5550 // Utilize native event to ensure correct state for checkable inputs 5551 setup: function( data ) { 5552 5553 // For mutual compressibility with _default, replace `this` access with a local var. 5554 // `|| data` is dead code meant only to preserve the variable through minification. 5555 var el = this || data; 5556 5557 // Claim the first handler 5558 if ( rcheckableType.test( el.type ) && 5559 el.click && nodeName( el, "input" ) ) { 5560 5561 // dataPriv.set( el, "click", ... ) 5562 leverageNative( el, "click", returnTrue ); 5563 } 5564 5565 // Return false to allow normal processing in the caller 5566 return false; 5567 }, 5568 trigger: function( data ) { 5569 5570 // For mutual compressibility with _default, replace `this` access with a local var. 5571 // `|| data` is dead code meant only to preserve the variable through minification. 5572 var el = this || data; 5573 5574 // Force setup before triggering a click 5575 if ( rcheckableType.test( el.type ) && 5576 el.click && nodeName( el, "input" ) ) { 5577 5578 leverageNative( el, "click" ); 5579 } 5580 5581 // Return non-false to allow normal event-path propagation 5582 return true; 5583 }, 5584 5585 // For cross-browser consistency, suppress native .click() on links 5586 // Also prevent it if we're currently inside a leveraged native-event stack 5587 _default: function( event ) { 5588 var target = event.target; 5589 return rcheckableType.test( target.type ) && 5590 target.click && nodeName( target, "input" ) && 5591 dataPriv.get( target, "click" ) || 5592 nodeName( target, "a" ); 5593 } 5594 }, 5595 5596 beforeunload: { 5597 postDispatch: function( event ) { 5598 5599 // Support: Firefox 20+ 5600 // Firefox doesn't alert if the returnValue field is not set. 5601 if ( event.result !== undefined && event.originalEvent ) { 5602 event.originalEvent.returnValue = event.result; 5603 } 5604 } 5605 } 5606 } 5607}; 5608 5609// Ensure the presence of an event listener that handles manually-triggered 5610// synthetic events by interrupting progress until reinvoked in response to 5611// *native* events that it fires directly, ensuring that state changes have 5612// already occurred before other listeners are invoked. 5613function leverageNative( el, type, expectSync ) { 5614 5615 // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add 5616 if ( !expectSync ) { 5617 if ( dataPriv.get( el, type ) === undefined ) { 5618 jQuery.event.add( el, type, returnTrue ); 5619 } 5620 return; 5621 } 5622 5623 // Register the controller as a special universal handler for all event namespaces 5624 dataPriv.set( el, type, false ); 5625 jQuery.event.add( el, type, { 5626 namespace: false, 5627 handler: function( event ) { 5628 var notAsync, result, 5629 saved = dataPriv.get( this, type ); 5630 5631 if ( ( event.isTrigger & 1 ) && this[ type ] ) { 5632 5633 // Interrupt processing of the outer synthetic .trigger()ed event 5634 // Saved data should be false in such cases, but might be a leftover capture object 5635 // from an async native handler (gh-4350) 5636 if ( !saved.length ) { 5637 5638 // Store arguments for use when handling the inner native event 5639 // There will always be at least one argument (an event object), so this array 5640 // will not be confused with a leftover capture object. 5641 saved = slice.call( arguments ); 5642 dataPriv.set( this, type, saved ); 5643 5644 // Trigger the native event and capture its result 5645 // Support: IE <=9 - 11+ 5646 // focus() and blur() are asynchronous 5647 notAsync = expectSync( this, type ); 5648 this[ type ](); 5649 result = dataPriv.get( this, type ); 5650 if ( saved !== result || notAsync ) { 5651 dataPriv.set( this, type, false ); 5652 } else { 5653 result = {}; 5654 } 5655 if ( saved !== result ) { 5656 5657 // Cancel the outer synthetic event 5658 event.stopImmediatePropagation(); 5659 event.preventDefault(); 5660 5661 // Support: Chrome 86+ 5662 // In Chrome, if an element having a focusout handler is blurred by 5663 // clicking outside of it, it invokes the handler synchronously. If 5664 // that handler calls `.remove()` on the element, the data is cleared, 5665 // leaving `result` undefined. We need to guard against this. 5666 return result && result.value; 5667 } 5668 5669 // If this is an inner synthetic event for an event with a bubbling surrogate 5670 // (focus or blur), assume that the surrogate already propagated from triggering the 5671 // native event and prevent that from happening again here. 5672 // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the 5673 // bubbling surrogate propagates *after* the non-bubbling base), but that seems 5674 // less bad than duplication. 5675 } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { 5676 event.stopPropagation(); 5677 } 5678 5679 // If this is a native event triggered above, everything is now in order 5680 // Fire an inner synthetic event with the original arguments 5681 } else if ( saved.length ) { 5682 5683 // ...and capture the result 5684 dataPriv.set( this, type, { 5685 value: jQuery.event.trigger( 5686 5687 // Support: IE <=9 - 11+ 5688 // Extend with the prototype to reset the above stopImmediatePropagation() 5689 jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), 5690 saved.slice( 1 ), 5691 this 5692 ) 5693 } ); 5694 5695 // Abort handling of the native event 5696 event.stopImmediatePropagation(); 5697 } 5698 } 5699 } ); 5700} 5701 5702jQuery.removeEvent = function( elem, type, handle ) { 5703 5704 // This "if" is needed for plain objects 5705 if ( elem.removeEventListener ) { 5706 elem.removeEventListener( type, handle ); 5707 } 5708}; 5709 5710jQuery.Event = function( src, props ) { 5711 5712 // Allow instantiation without the 'new' keyword 5713 if ( !( this instanceof jQuery.Event ) ) { 5714 return new jQuery.Event( src, props ); 5715 } 5716 5717 // Event object 5718 if ( src && src.type ) { 5719 this.originalEvent = src; 5720 this.type = src.type; 5721 5722 // Events bubbling up the document may have been marked as prevented 5723 // by a handler lower down the tree; reflect the correct value. 5724 this.isDefaultPrevented = src.defaultPrevented || 5725 src.defaultPrevented === undefined && 5726 5727 // Support: Android <=2.3 only 5728 src.returnValue === false ? 5729 returnTrue : 5730 returnFalse; 5731 5732 // Create target properties 5733 // Support: Safari <=6 - 7 only 5734 // Target should not be a text node (#504, #13143) 5735 this.target = ( src.target && src.target.nodeType === 3 ) ? 5736 src.target.parentNode : 5737 src.target; 5738 5739 this.currentTarget = src.currentTarget; 5740 this.relatedTarget = src.relatedTarget; 5741 5742 // Event type 5743 } else { 5744 this.type = src; 5745 } 5746 5747 // Put explicitly provided properties onto the event object 5748 if ( props ) { 5749 jQuery.extend( this, props ); 5750 } 5751 5752 // Create a timestamp if incoming event doesn't have one 5753 this.timeStamp = src && src.timeStamp || Date.now(); 5754 5755 // Mark it as fixed 5756 this[ jQuery.expando ] = true; 5757}; 5758 5759// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 5760// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 5761jQuery.Event.prototype = { 5762 constructor: jQuery.Event, 5763 isDefaultPrevented: returnFalse, 5764 isPropagationStopped: returnFalse, 5765 isImmediatePropagationStopped: returnFalse, 5766 isSimulated: false, 5767 5768 preventDefault: function() { 5769 var e = this.originalEvent; 5770 5771 this.isDefaultPrevented = returnTrue; 5772 5773 if ( e && !this.isSimulated ) { 5774 e.preventDefault(); 5775 } 5776 }, 5777 stopPropagation: function() { 5778 var e = this.originalEvent; 5779 5780 this.isPropagationStopped = returnTrue; 5781 5782 if ( e && !this.isSimulated ) { 5783 e.stopPropagation(); 5784 } 5785 }, 5786 stopImmediatePropagation: function() { 5787 var e = this.originalEvent; 5788 5789 this.isImmediatePropagationStopped = returnTrue; 5790 5791 if ( e && !this.isSimulated ) { 5792 e.stopImmediatePropagation(); 5793 } 5794 5795 this.stopPropagation(); 5796 } 5797}; 5798 5799// Includes all common event props including KeyEvent and MouseEvent specific props 5800jQuery.each( { 5801 altKey: true, 5802 bubbles: true, 5803 cancelable: true, 5804 changedTouches: true, 5805 ctrlKey: true, 5806 detail: true, 5807 eventPhase: true, 5808 metaKey: true, 5809 pageX: true, 5810 pageY: true, 5811 shiftKey: true, 5812 view: true, 5813 "char": true, 5814 code: true, 5815 charCode: true, 5816 key: true, 5817 keyCode: true, 5818 button: true, 5819 buttons: true, 5820 clientX: true, 5821 clientY: true, 5822 offsetX: true, 5823 offsetY: true, 5824 pointerId: true, 5825 pointerType: true, 5826 screenX: true, 5827 screenY: true, 5828 targetTouches: true, 5829 toElement: true, 5830 touches: true, 5831 which: true 5832}, jQuery.event.addProp ); 5833 5834jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { 5835 jQuery.event.special[ type ] = { 5836 5837 // Utilize native event if possible so blur/focus sequence is correct 5838 setup: function() { 5839 5840 // Claim the first handler 5841 // dataPriv.set( this, "focus", ... ) 5842 // dataPriv.set( this, "blur", ... ) 5843 leverageNative( this, type, expectSync ); 5844 5845 // Return false to allow normal processing in the caller 5846 return false; 5847 }, 5848 trigger: function() { 5849 5850 // Force setup before trigger 5851 leverageNative( this, type ); 5852 5853 // Return non-false to allow normal event-path propagation 5854 return true; 5855 }, 5856 5857 // Suppress native focus or blur as it's already being fired 5858 // in leverageNative. 5859 _default: function() { 5860 return true; 5861 }, 5862 5863 delegateType: delegateType 5864 }; 5865} ); 5866 5867// Create mouseenter/leave events using mouseover/out and event-time checks 5868// so that event delegation works in jQuery. 5869// Do the same for pointerenter/pointerleave and pointerover/pointerout 5870// 5871// Support: Safari 7 only 5872// Safari sends mouseenter too often; see: 5873// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 5874// for the description of the bug (it existed in older Chrome versions as well). 5875jQuery.each( { 5876 mouseenter: "mouseover", 5877 mouseleave: "mouseout", 5878 pointerenter: "pointerover", 5879 pointerleave: "pointerout" 5880}, function( orig, fix ) { 5881 jQuery.event.special[ orig ] = { 5882 delegateType: fix, 5883 bindType: fix, 5884 5885 handle: function( event ) { 5886 var ret, 5887 target = this, 5888 related = event.relatedTarget, 5889 handleObj = event.handleObj; 5890 5891 // For mouseenter/leave call the handler if related is outside the target. 5892 // NB: No relatedTarget if the mouse left/entered the browser window 5893 if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { 5894 event.type = handleObj.origType; 5895 ret = handleObj.handler.apply( this, arguments ); 5896 event.type = fix; 5897 } 5898 return ret; 5899 } 5900 }; 5901} ); 5902 5903jQuery.fn.extend( { 5904 5905 on: function( types, selector, data, fn ) { 5906 return on( this, types, selector, data, fn ); 5907 }, 5908 one: function( types, selector, data, fn ) { 5909 return on( this, types, selector, data, fn, 1 ); 5910 }, 5911 off: function( types, selector, fn ) { 5912 var handleObj, type; 5913 if ( types && types.preventDefault && types.handleObj ) { 5914 5915 // ( event ) dispatched jQuery.Event 5916 handleObj = types.handleObj; 5917 jQuery( types.delegateTarget ).off( 5918 handleObj.namespace ? 5919 handleObj.origType + "." + handleObj.namespace : 5920 handleObj.origType, 5921 handleObj.selector, 5922 handleObj.handler 5923 ); 5924 return this; 5925 } 5926 if ( typeof types === "object" ) { 5927 5928 // ( types-object [, selector] ) 5929 for ( type in types ) { 5930 this.off( type, selector, types[ type ] ); 5931 } 5932 return this; 5933 } 5934 if ( selector === false || typeof selector === "function" ) { 5935 5936 // ( types [, fn] ) 5937 fn = selector; 5938 selector = undefined; 5939 } 5940 if ( fn === false ) { 5941 fn = returnFalse; 5942 } 5943 return this.each( function() { 5944 jQuery.event.remove( this, types, fn, selector ); 5945 } ); 5946 } 5947} ); 5948 5949 5950var 5951 5952 // Support: IE <=10 - 11, Edge 12 - 13 only 5953 // In IE/Edge using regex groups here causes severe slowdowns. 5954 // See https://connect.microsoft.com/IE/feedback/details/1736512/ 5955 rnoInnerhtml = /<script|<style|<link/i, 5956 5957 // checked="checked" or checked 5958 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 5959 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; 5960 5961// Prefer a tbody over its parent table for containing new rows 5962function manipulationTarget( elem, content ) { 5963 if ( nodeName( elem, "table" ) && 5964 nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { 5965 5966 return jQuery( elem ).children( "tbody" )[ 0 ] || elem; 5967 } 5968 5969 return elem; 5970} 5971 5972// Replace/restore the type attribute of script elements for safe DOM manipulation 5973function disableScript( elem ) { 5974 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; 5975 return elem; 5976} 5977function restoreScript( elem ) { 5978 if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { 5979 elem.type = elem.type.slice( 5 ); 5980 } else { 5981 elem.removeAttribute( "type" ); 5982 } 5983 5984 return elem; 5985} 5986 5987function cloneCopyEvent( src, dest ) { 5988 var i, l, type, pdataOld, udataOld, udataCur, events; 5989 5990 if ( dest.nodeType !== 1 ) { 5991 return; 5992 } 5993 5994 // 1. Copy private data: events, handlers, etc. 5995 if ( dataPriv.hasData( src ) ) { 5996 pdataOld = dataPriv.get( src ); 5997 events = pdataOld.events; 5998 5999 if ( events ) { 6000 dataPriv.remove( dest, "handle events" ); 6001 6002 for ( type in events ) { 6003 for ( i = 0, l = events[ type ].length; i < l; i++ ) { 6004 jQuery.event.add( dest, type, events[ type ][ i ] ); 6005 } 6006 } 6007 } 6008 } 6009 6010 // 2. Copy user data 6011 if ( dataUser.hasData( src ) ) { 6012 udataOld = dataUser.access( src ); 6013 udataCur = jQuery.extend( {}, udataOld ); 6014 6015 dataUser.set( dest, udataCur ); 6016 } 6017} 6018 6019// Fix IE bugs, see support tests 6020function fixInput( src, dest ) { 6021 var nodeName = dest.nodeName.toLowerCase(); 6022 6023 // Fails to persist the checked state of a cloned checkbox or radio button. 6024 if ( nodeName === "input" && rcheckableType.test( src.type ) ) { 6025 dest.checked = src.checked; 6026 6027 // Fails to return the selected option to the default selected state when cloning options 6028 } else if ( nodeName === "input" || nodeName === "textarea" ) { 6029 dest.defaultValue = src.defaultValue; 6030 } 6031} 6032 6033function domManip( collection, args, callback, ignored ) { 6034 6035 // Flatten any nested arrays 6036 args = flat( args ); 6037 6038 var fragment, first, scripts, hasScripts, node, doc, 6039 i = 0, 6040 l = collection.length, 6041 iNoClone = l - 1, 6042 value = args[ 0 ], 6043 valueIsFunction = isFunction( value ); 6044 6045 // We can't cloneNode fragments that contain checked, in WebKit 6046 if ( valueIsFunction || 6047 ( l > 1 && typeof value === "string" && 6048 !support.checkClone && rchecked.test( value ) ) ) { 6049 return collection.each( function( index ) { 6050 var self = collection.eq( index ); 6051 if ( valueIsFunction ) { 6052 args[ 0 ] = value.call( this, index, self.html() ); 6053 } 6054 domManip( self, args, callback, ignored ); 6055 } ); 6056 } 6057 6058 if ( l ) { 6059 fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); 6060 first = fragment.firstChild; 6061 6062 if ( fragment.childNodes.length === 1 ) { 6063 fragment = first; 6064 } 6065 6066 // Require either new content or an interest in ignored elements to invoke the callback 6067 if ( first || ignored ) { 6068 scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); 6069 hasScripts = scripts.length; 6070 6071 // Use the original fragment for the last item 6072 // instead of the first because it can end up 6073 // being emptied incorrectly in certain situations (#8070). 6074 for ( ; i < l; i++ ) { 6075 node = fragment; 6076 6077 if ( i !== iNoClone ) { 6078 node = jQuery.clone( node, true, true ); 6079 6080 // Keep references to cloned scripts for later restoration 6081 if ( hasScripts ) { 6082 6083 // Support: Android <=4.0 only, PhantomJS 1 only 6084 // push.apply(_, arraylike) throws on ancient WebKit 6085 jQuery.merge( scripts, getAll( node, "script" ) ); 6086 } 6087 } 6088 6089 callback.call( collection[ i ], node, i ); 6090 } 6091 6092 if ( hasScripts ) { 6093 doc = scripts[ scripts.length - 1 ].ownerDocument; 6094 6095 // Reenable scripts 6096 jQuery.map( scripts, restoreScript ); 6097 6098 // Evaluate executable scripts on first document insertion 6099 for ( i = 0; i < hasScripts; i++ ) { 6100 node = scripts[ i ]; 6101 if ( rscriptType.test( node.type || "" ) && 6102 !dataPriv.access( node, "globalEval" ) && 6103 jQuery.contains( doc, node ) ) { 6104 6105 if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { 6106 6107 // Optional AJAX dependency, but won't run scripts if not present 6108 if ( jQuery._evalUrl && !node.noModule ) { 6109 jQuery._evalUrl( node.src, { 6110 nonce: node.nonce || node.getAttribute( "nonce" ) 6111 }, doc ); 6112 } 6113 } else { 6114 DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); 6115 } 6116 } 6117 } 6118 } 6119 } 6120 } 6121 6122 return collection; 6123} 6124 6125function remove( elem, selector, keepData ) { 6126 var node, 6127 nodes = selector ? jQuery.filter( selector, elem ) : elem, 6128 i = 0; 6129 6130 for ( ; ( node = nodes[ i ] ) != null; i++ ) { 6131 if ( !keepData && node.nodeType === 1 ) { 6132 jQuery.cleanData( getAll( node ) ); 6133 } 6134 6135 if ( node.parentNode ) { 6136 if ( keepData && isAttached( node ) ) { 6137 setGlobalEval( getAll( node, "script" ) ); 6138 } 6139 node.parentNode.removeChild( node ); 6140 } 6141 } 6142 6143 return elem; 6144} 6145 6146jQuery.extend( { 6147 htmlPrefilter: function( html ) { 6148 return html; 6149 }, 6150 6151 clone: function( elem, dataAndEvents, deepDataAndEvents ) { 6152 var i, l, srcElements, destElements, 6153 clone = elem.cloneNode( true ), 6154 inPage = isAttached( elem ); 6155 6156 // Fix IE cloning issues 6157 if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && 6158 !jQuery.isXMLDoc( elem ) ) { 6159 6160 // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 6161 destElements = getAll( clone ); 6162 srcElements = getAll( elem ); 6163 6164 for ( i = 0, l = srcElements.length; i < l; i++ ) { 6165 fixInput( srcElements[ i ], destElements[ i ] ); 6166 } 6167 } 6168 6169 // Copy the events from the original to the clone 6170 if ( dataAndEvents ) { 6171 if ( deepDataAndEvents ) { 6172 srcElements = srcElements || getAll( elem ); 6173 destElements = destElements || getAll( clone ); 6174 6175 for ( i = 0, l = srcElements.length; i < l; i++ ) { 6176 cloneCopyEvent( srcElements[ i ], destElements[ i ] ); 6177 } 6178 } else { 6179 cloneCopyEvent( elem, clone ); 6180 } 6181 } 6182 6183 // Preserve script evaluation history 6184 destElements = getAll( clone, "script" ); 6185 if ( destElements.length > 0 ) { 6186 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); 6187 } 6188 6189 // Return the cloned set 6190 return clone; 6191 }, 6192 6193 cleanData: function( elems ) { 6194 var data, elem, type, 6195 special = jQuery.event.special, 6196 i = 0; 6197 6198 for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { 6199 if ( acceptData( elem ) ) { 6200 if ( ( data = elem[ dataPriv.expando ] ) ) { 6201 if ( data.events ) { 6202 for ( type in data.events ) { 6203 if ( special[ type ] ) { 6204 jQuery.event.remove( elem, type ); 6205 6206 // This is a shortcut to avoid jQuery.event.remove's overhead 6207 } else { 6208 jQuery.removeEvent( elem, type, data.handle ); 6209 } 6210 } 6211 } 6212 6213 // Support: Chrome <=35 - 45+ 6214 // Assign undefined instead of using delete, see Data#remove 6215 elem[ dataPriv.expando ] = undefined; 6216 } 6217 if ( elem[ dataUser.expando ] ) { 6218 6219 // Support: Chrome <=35 - 45+ 6220 // Assign undefined instead of using delete, see Data#remove 6221 elem[ dataUser.expando ] = undefined; 6222 } 6223 } 6224 } 6225 } 6226} ); 6227 6228jQuery.fn.extend( { 6229 detach: function( selector ) { 6230 return remove( this, selector, true ); 6231 }, 6232 6233 remove: function( selector ) { 6234 return remove( this, selector ); 6235 }, 6236 6237 text: function( value ) { 6238 return access( this, function( value ) { 6239 return value === undefined ? 6240 jQuery.text( this ) : 6241 this.empty().each( function() { 6242 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6243 this.textContent = value; 6244 } 6245 } ); 6246 }, null, value, arguments.length ); 6247 }, 6248 6249 append: function() { 6250 return domManip( this, arguments, function( elem ) { 6251 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6252 var target = manipulationTarget( this, elem ); 6253 target.appendChild( elem ); 6254 } 6255 } ); 6256 }, 6257 6258 prepend: function() { 6259 return domManip( this, arguments, function( elem ) { 6260 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6261 var target = manipulationTarget( this, elem ); 6262 target.insertBefore( elem, target.firstChild ); 6263 } 6264 } ); 6265 }, 6266 6267 before: function() { 6268 return domManip( this, arguments, function( elem ) { 6269 if ( this.parentNode ) { 6270 this.parentNode.insertBefore( elem, this ); 6271 } 6272 } ); 6273 }, 6274 6275 after: function() { 6276 return domManip( this, arguments, function( elem ) { 6277 if ( this.parentNode ) { 6278 this.parentNode.insertBefore( elem, this.nextSibling ); 6279 } 6280 } ); 6281 }, 6282 6283 empty: function() { 6284 var elem, 6285 i = 0; 6286 6287 for ( ; ( elem = this[ i ] ) != null; i++ ) { 6288 if ( elem.nodeType === 1 ) { 6289 6290 // Prevent memory leaks 6291 jQuery.cleanData( getAll( elem, false ) ); 6292 6293 // Remove any remaining nodes 6294 elem.textContent = ""; 6295 } 6296 } 6297 6298 return this; 6299 }, 6300 6301 clone: function( dataAndEvents, deepDataAndEvents ) { 6302 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 6303 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 6304 6305 return this.map( function() { 6306 return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); 6307 } ); 6308 }, 6309 6310 html: function( value ) { 6311 return access( this, function( value ) { 6312 var elem = this[ 0 ] || {}, 6313 i = 0, 6314 l = this.length; 6315 6316 if ( value === undefined && elem.nodeType === 1 ) { 6317 return elem.innerHTML; 6318 } 6319 6320 // See if we can take a shortcut and just use innerHTML 6321 if ( typeof value === "string" && !rnoInnerhtml.test( value ) && 6322 !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { 6323 6324 value = jQuery.htmlPrefilter( value ); 6325 6326 try { 6327 for ( ; i < l; i++ ) { 6328 elem = this[ i ] || {}; 6329 6330 // Remove element nodes and prevent memory leaks 6331 if ( elem.nodeType === 1 ) { 6332 jQuery.cleanData( getAll( elem, false ) ); 6333 elem.innerHTML = value; 6334 } 6335 } 6336 6337 elem = 0; 6338 6339 // If using innerHTML throws an exception, use the fallback method 6340 } catch ( e ) {} 6341 } 6342 6343 if ( elem ) { 6344 this.empty().append( value ); 6345 } 6346 }, null, value, arguments.length ); 6347 }, 6348 6349 replaceWith: function() { 6350 var ignored = []; 6351 6352 // Make the changes, replacing each non-ignored context element with the new content 6353 return domManip( this, arguments, function( elem ) { 6354 var parent = this.parentNode; 6355 6356 if ( jQuery.inArray( this, ignored ) < 0 ) { 6357 jQuery.cleanData( getAll( this ) ); 6358 if ( parent ) { 6359 parent.replaceChild( elem, this ); 6360 } 6361 } 6362 6363 // Force callback invocation 6364 }, ignored ); 6365 } 6366} ); 6367 6368jQuery.each( { 6369 appendTo: "append", 6370 prependTo: "prepend", 6371 insertBefore: "before", 6372 insertAfter: "after", 6373 replaceAll: "replaceWith" 6374}, function( name, original ) { 6375 jQuery.fn[ name ] = function( selector ) { 6376 var elems, 6377 ret = [], 6378 insert = jQuery( selector ), 6379 last = insert.length - 1, 6380 i = 0; 6381 6382 for ( ; i <= last; i++ ) { 6383 elems = i === last ? this : this.clone( true ); 6384 jQuery( insert[ i ] )[ original ]( elems ); 6385 6386 // Support: Android <=4.0 only, PhantomJS 1 only 6387 // .get() because push.apply(_, arraylike) throws on ancient WebKit 6388 push.apply( ret, elems.get() ); 6389 } 6390 6391 return this.pushStack( ret ); 6392 }; 6393} ); 6394var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 6395 6396var getStyles = function( elem ) { 6397 6398 // Support: IE <=11 only, Firefox <=30 (#15098, #14150) 6399 // IE throws on elements created in popups 6400 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 6401 var view = elem.ownerDocument.defaultView; 6402 6403 if ( !view || !view.opener ) { 6404 view = window; 6405 } 6406 6407 return view.getComputedStyle( elem ); 6408 }; 6409 6410var swap = function( elem, options, callback ) { 6411 var ret, name, 6412 old = {}; 6413 6414 // Remember the old values, and insert the new ones 6415 for ( name in options ) { 6416 old[ name ] = elem.style[ name ]; 6417 elem.style[ name ] = options[ name ]; 6418 } 6419 6420 ret = callback.call( elem ); 6421 6422 // Revert the old values 6423 for ( name in options ) { 6424 elem.style[ name ] = old[ name ]; 6425 } 6426 6427 return ret; 6428}; 6429 6430 6431var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); 6432 6433 6434 6435( function() { 6436 6437 // Executing both pixelPosition & boxSizingReliable tests require only one layout 6438 // so they're executed at the same time to save the second computation. 6439 function computeStyleTests() { 6440 6441 // This is a singleton, we need to execute it only once 6442 if ( !div ) { 6443 return; 6444 } 6445 6446 container.style.cssText = "position:absolute;left:-11111px;width:60px;" + 6447 "margin-top:1px;padding:0;border:0"; 6448 div.style.cssText = 6449 "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + 6450 "margin:auto;border:1px;padding:1px;" + 6451 "width:60%;top:1%"; 6452 documentElement.appendChild( container ).appendChild( div ); 6453 6454 var divStyle = window.getComputedStyle( div ); 6455 pixelPositionVal = divStyle.top !== "1%"; 6456 6457 // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 6458 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; 6459 6460 // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 6461 // Some styles come back with percentage values, even though they shouldn't 6462 div.style.right = "60%"; 6463 pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; 6464 6465 // Support: IE 9 - 11 only 6466 // Detect misreporting of content dimensions for box-sizing:border-box elements 6467 boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; 6468 6469 // Support: IE 9 only 6470 // Detect overflow:scroll screwiness (gh-3699) 6471 // Support: Chrome <=64 6472 // Don't get tricked when zoom affects offsetWidth (gh-4029) 6473 div.style.position = "absolute"; 6474 scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; 6475 6476 documentElement.removeChild( container ); 6477 6478 // Nullify the div so it wouldn't be stored in the memory and 6479 // it will also be a sign that checks already performed 6480 div = null; 6481 } 6482 6483 function roundPixelMeasures( measure ) { 6484 return Math.round( parseFloat( measure ) ); 6485 } 6486 6487 var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, 6488 reliableTrDimensionsVal, reliableMarginLeftVal, 6489 container = document.createElement( "div" ), 6490 div = document.createElement( "div" ); 6491 6492 // Finish early in limited (non-browser) environments 6493 if ( !div.style ) { 6494 return; 6495 } 6496 6497 // Support: IE <=9 - 11 only 6498 // Style of cloned element affects source element cloned (#8908) 6499 div.style.backgroundClip = "content-box"; 6500 div.cloneNode( true ).style.backgroundClip = ""; 6501 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 6502 6503 jQuery.extend( support, { 6504 boxSizingReliable: function() { 6505 computeStyleTests(); 6506 return boxSizingReliableVal; 6507 }, 6508 pixelBoxStyles: function() { 6509 computeStyleTests(); 6510 return pixelBoxStylesVal; 6511 }, 6512 pixelPosition: function() { 6513 computeStyleTests(); 6514 return pixelPositionVal; 6515 }, 6516 reliableMarginLeft: function() { 6517 computeStyleTests(); 6518 return reliableMarginLeftVal; 6519 }, 6520 scrollboxSize: function() { 6521 computeStyleTests(); 6522 return scrollboxSizeVal; 6523 }, 6524 6525 // Support: IE 9 - 11+, Edge 15 - 18+ 6526 // IE/Edge misreport `getComputedStyle` of table rows with width/height 6527 // set in CSS while `offset*` properties report correct values. 6528 // Behavior in IE 9 is more subtle than in newer versions & it passes 6529 // some versions of this test; make sure not to make it pass there! 6530 // 6531 // Support: Firefox 70+ 6532 // Only Firefox includes border widths 6533 // in computed dimensions. (gh-4529) 6534 reliableTrDimensions: function() { 6535 var table, tr, trChild, trStyle; 6536 if ( reliableTrDimensionsVal == null ) { 6537 table = document.createElement( "table" ); 6538 tr = document.createElement( "tr" ); 6539 trChild = document.createElement( "div" ); 6540 6541 table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; 6542 tr.style.cssText = "border:1px solid"; 6543 6544 // Support: Chrome 86+ 6545 // Height set through cssText does not get applied. 6546 // Computed height then comes back as 0. 6547 tr.style.height = "1px"; 6548 trChild.style.height = "9px"; 6549 6550 // Support: Android 8 Chrome 86+ 6551 // In our bodyBackground.html iframe, 6552 // display for all div elements is set to "inline", 6553 // which causes a problem only in Android 8 Chrome 86. 6554 // Ensuring the div is display: block 6555 // gets around this issue. 6556 trChild.style.display = "block"; 6557 6558 documentElement 6559 .appendChild( table ) 6560 .appendChild( tr ) 6561 .appendChild( trChild ); 6562 6563 trStyle = window.getComputedStyle( tr ); 6564 reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + 6565 parseInt( trStyle.borderTopWidth, 10 ) + 6566 parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; 6567 6568 documentElement.removeChild( table ); 6569 } 6570 return reliableTrDimensionsVal; 6571 } 6572 } ); 6573} )(); 6574 6575 6576function curCSS( elem, name, computed ) { 6577 var width, minWidth, maxWidth, ret, 6578 6579 // Support: Firefox 51+ 6580 // Retrieving style before computed somehow 6581 // fixes an issue with getting wrong values 6582 // on detached elements 6583 style = elem.style; 6584 6585 computed = computed || getStyles( elem ); 6586 6587 // getPropertyValue is needed for: 6588 // .css('filter') (IE 9 only, #12537) 6589 // .css('--customProperty) (#3144) 6590 if ( computed ) { 6591 ret = computed.getPropertyValue( name ) || computed[ name ]; 6592 6593 if ( ret === "" && !isAttached( elem ) ) { 6594 ret = jQuery.style( elem, name ); 6595 } 6596 6597 // A tribute to the "awesome hack by Dean Edwards" 6598 // Android Browser returns percentage for some values, 6599 // but width seems to be reliably pixels. 6600 // This is against the CSSOM draft spec: 6601 // https://drafts.csswg.org/cssom/#resolved-values 6602 if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { 6603 6604 // Remember the original values 6605 width = style.width; 6606 minWidth = style.minWidth; 6607 maxWidth = style.maxWidth; 6608 6609 // Put in the new values to get a computed value out 6610 style.minWidth = style.maxWidth = style.width = ret; 6611 ret = computed.width; 6612 6613 // Revert the changed values 6614 style.width = width; 6615 style.minWidth = minWidth; 6616 style.maxWidth = maxWidth; 6617 } 6618 } 6619 6620 return ret !== undefined ? 6621 6622 // Support: IE <=9 - 11 only 6623 // IE returns zIndex value as an integer. 6624 ret + "" : 6625 ret; 6626} 6627 6628 6629function addGetHookIf( conditionFn, hookFn ) { 6630 6631 // Define the hook, we'll check on the first run if it's really needed. 6632 return { 6633 get: function() { 6634 if ( conditionFn() ) { 6635 6636 // Hook not needed (or it's not possible to use it due 6637 // to missing dependency), remove it. 6638 delete this.get; 6639 return; 6640 } 6641 6642 // Hook needed; redefine it so that the support test is not executed again. 6643 return ( this.get = hookFn ).apply( this, arguments ); 6644 } 6645 }; 6646} 6647 6648 6649var cssPrefixes = [ "Webkit", "Moz", "ms" ], 6650 emptyStyle = document.createElement( "div" ).style, 6651 vendorProps = {}; 6652 6653// Return a vendor-prefixed property or undefined 6654function vendorPropName( name ) { 6655 6656 // Check for vendor prefixed names 6657 var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), 6658 i = cssPrefixes.length; 6659 6660 while ( i-- ) { 6661 name = cssPrefixes[ i ] + capName; 6662 if ( name in emptyStyle ) { 6663 return name; 6664 } 6665 } 6666} 6667 6668// Return a potentially-mapped jQuery.cssProps or vendor prefixed property 6669function finalPropName( name ) { 6670 var final = jQuery.cssProps[ name ] || vendorProps[ name ]; 6671 6672 if ( final ) { 6673 return final; 6674 } 6675 if ( name in emptyStyle ) { 6676 return name; 6677 } 6678 return vendorProps[ name ] = vendorPropName( name ) || name; 6679} 6680 6681 6682var 6683 6684 // Swappable if display is none or starts with table 6685 // except "table", "table-cell", or "table-caption" 6686 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 6687 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 6688 rcustomProp = /^--/, 6689 cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 6690 cssNormalTransform = { 6691 letterSpacing: "0", 6692 fontWeight: "400" 6693 }; 6694 6695function setPositiveNumber( _elem, value, subtract ) { 6696 6697 // Any relative (+/-) values have already been 6698 // normalized at this point 6699 var matches = rcssNum.exec( value ); 6700 return matches ? 6701 6702 // Guard against undefined "subtract", e.g., when used as in cssHooks 6703 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : 6704 value; 6705} 6706 6707function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { 6708 var i = dimension === "width" ? 1 : 0, 6709 extra = 0, 6710 delta = 0; 6711 6712 // Adjustment may not be necessary 6713 if ( box === ( isBorderBox ? "border" : "content" ) ) { 6714 return 0; 6715 } 6716 6717 for ( ; i < 4; i += 2 ) { 6718 6719 // Both box models exclude margin 6720 if ( box === "margin" ) { 6721 delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); 6722 } 6723 6724 // If we get here with a content-box, we're seeking "padding" or "border" or "margin" 6725 if ( !isBorderBox ) { 6726 6727 // Add padding 6728 delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 6729 6730 // For "border" or "margin", add border 6731 if ( box !== "padding" ) { 6732 delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6733 6734 // But still keep track of it otherwise 6735 } else { 6736 extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6737 } 6738 6739 // If we get here with a border-box (content + padding + border), we're seeking "content" or 6740 // "padding" or "margin" 6741 } else { 6742 6743 // For "content", subtract padding 6744 if ( box === "content" ) { 6745 delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 6746 } 6747 6748 // For "content" or "padding", subtract border 6749 if ( box !== "margin" ) { 6750 delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6751 } 6752 } 6753 } 6754 6755 // Account for positive content-box scroll gutter when requested by providing computedVal 6756 if ( !isBorderBox && computedVal >= 0 ) { 6757 6758 // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border 6759 // Assuming integer scroll gutter, subtract the rest and round down 6760 delta += Math.max( 0, Math.ceil( 6761 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - 6762 computedVal - 6763 delta - 6764 extra - 6765 0.5 6766 6767 // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter 6768 // Use an explicit zero to avoid NaN (gh-3964) 6769 ) ) || 0; 6770 } 6771 6772 return delta; 6773} 6774 6775function getWidthOrHeight( elem, dimension, extra ) { 6776 6777 // Start with computed style 6778 var styles = getStyles( elem ), 6779 6780 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). 6781 // Fake content-box until we know it's needed to know the true value. 6782 boxSizingNeeded = !support.boxSizingReliable() || extra, 6783 isBorderBox = boxSizingNeeded && 6784 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 6785 valueIsBorderBox = isBorderBox, 6786 6787 val = curCSS( elem, dimension, styles ), 6788 offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); 6789 6790 // Support: Firefox <=54 6791 // Return a confounding non-pixel value or feign ignorance, as appropriate. 6792 if ( rnumnonpx.test( val ) ) { 6793 if ( !extra ) { 6794 return val; 6795 } 6796 val = "auto"; 6797 } 6798 6799 6800 // Support: IE 9 - 11 only 6801 // Use offsetWidth/offsetHeight for when box sizing is unreliable. 6802 // In those cases, the computed value can be trusted to be border-box. 6803 if ( ( !support.boxSizingReliable() && isBorderBox || 6804 6805 // Support: IE 10 - 11+, Edge 15 - 18+ 6806 // IE/Edge misreport `getComputedStyle` of table rows with width/height 6807 // set in CSS while `offset*` properties report correct values. 6808 // Interestingly, in some cases IE 9 doesn't suffer from this issue. 6809 !support.reliableTrDimensions() && nodeName( elem, "tr" ) || 6810 6811 // Fall back to offsetWidth/offsetHeight when value is "auto" 6812 // This happens for inline elements with no explicit setting (gh-3571) 6813 val === "auto" || 6814 6815 // Support: Android <=4.1 - 4.3 only 6816 // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) 6817 !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && 6818 6819 // Make sure the element is visible & connected 6820 elem.getClientRects().length ) { 6821 6822 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 6823 6824 // Where available, offsetWidth/offsetHeight approximate border box dimensions. 6825 // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the 6826 // retrieved value as a content box dimension. 6827 valueIsBorderBox = offsetProp in elem; 6828 if ( valueIsBorderBox ) { 6829 val = elem[ offsetProp ]; 6830 } 6831 } 6832 6833 // Normalize "" and auto 6834 val = parseFloat( val ) || 0; 6835 6836 // Adjust for the element's box model 6837 return ( val + 6838 boxModelAdjustment( 6839 elem, 6840 dimension, 6841 extra || ( isBorderBox ? "border" : "content" ), 6842 valueIsBorderBox, 6843 styles, 6844 6845 // Provide the current computed size to request scroll gutter calculation (gh-3589) 6846 val 6847 ) 6848 ) + "px"; 6849} 6850 6851jQuery.extend( { 6852 6853 // Add in style property hooks for overriding the default 6854 // behavior of getting and setting a style property 6855 cssHooks: { 6856 opacity: { 6857 get: function( elem, computed ) { 6858 if ( computed ) { 6859 6860 // We should always get a number back from opacity 6861 var ret = curCSS( elem, "opacity" ); 6862 return ret === "" ? "1" : ret; 6863 } 6864 } 6865 } 6866 }, 6867 6868 // Don't automatically add "px" to these possibly-unitless properties 6869 cssNumber: { 6870 "animationIterationCount": true, 6871 "columnCount": true, 6872 "fillOpacity": true, 6873 "flexGrow": true, 6874 "flexShrink": true, 6875 "fontWeight": true, 6876 "gridArea": true, 6877 "gridColumn": true, 6878 "gridColumnEnd": true, 6879 "gridColumnStart": true, 6880 "gridRow": true, 6881 "gridRowEnd": true, 6882 "gridRowStart": true, 6883 "lineHeight": true, 6884 "opacity": true, 6885 "order": true, 6886 "orphans": true, 6887 "widows": true, 6888 "zIndex": true, 6889 "zoom": true 6890 }, 6891 6892 // Add in properties whose names you wish to fix before 6893 // setting or getting the value 6894 cssProps: {}, 6895 6896 // Get and set the style property on a DOM Node 6897 style: function( elem, name, value, extra ) { 6898 6899 // Don't set styles on text and comment nodes 6900 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 6901 return; 6902 } 6903 6904 // Make sure that we're working with the right name 6905 var ret, type, hooks, 6906 origName = camelCase( name ), 6907 isCustomProp = rcustomProp.test( name ), 6908 style = elem.style; 6909 6910 // Make sure that we're working with the right name. We don't 6911 // want to query the value if it is a CSS custom property 6912 // since they are user-defined. 6913 if ( !isCustomProp ) { 6914 name = finalPropName( origName ); 6915 } 6916 6917 // Gets hook for the prefixed version, then unprefixed version 6918 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 6919 6920 // Check if we're setting a value 6921 if ( value !== undefined ) { 6922 type = typeof value; 6923 6924 // Convert "+=" or "-=" to relative numbers (#7345) 6925 if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { 6926 value = adjustCSS( elem, name, ret ); 6927 6928 // Fixes bug #9237 6929 type = "number"; 6930 } 6931 6932 // Make sure that null and NaN values aren't set (#7116) 6933 if ( value == null || value !== value ) { 6934 return; 6935 } 6936 6937 // If a number was passed in, add the unit (except for certain CSS properties) 6938 // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append 6939 // "px" to a few hardcoded values. 6940 if ( type === "number" && !isCustomProp ) { 6941 value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); 6942 } 6943 6944 // background-* props affect original clone's values 6945 if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { 6946 style[ name ] = "inherit"; 6947 } 6948 6949 // If a hook was provided, use that value, otherwise just set the specified value
vendor: 25,692 bytes, lines 6950-7946
6950 if ( !hooks || !( "set" in hooks ) || 6951 ( value = hooks.set( elem, value, extra ) ) !== undefined ) { 6952 6953 if ( isCustomProp ) { 6954 style.setProperty( name, value ); 6955 } else { 6956 style[ name ] = value; 6957 } 6958 } 6959 6960 } else { 6961 6962 // If a hook was provided get the non-computed value from there 6963 if ( hooks && "get" in hooks && 6964 ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { 6965 6966 return ret; 6967 } 6968 6969 // Otherwise just get the value from the style object 6970 return style[ name ]; 6971 } 6972 }, 6973 6974 css: function( elem, name, extra, styles ) { 6975 var val, num, hooks, 6976 origName = camelCase( name ), 6977 isCustomProp = rcustomProp.test( name ); 6978 6979 // Make sure that we're working with the right name. We don't 6980 // want to modify the value if it is a CSS custom property 6981 // since they are user-defined. 6982 if ( !isCustomProp ) { 6983 name = finalPropName( origName ); 6984 } 6985 6986 // Try prefixed name followed by the unprefixed name 6987 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 6988 6989 // If a hook was provided get the computed value from there 6990 if ( hooks && "get" in hooks ) { 6991 val = hooks.get( elem, true, extra ); 6992 } 6993 6994 // Otherwise, if a way to get the computed value exists, use that 6995 if ( val === undefined ) { 6996 val = curCSS( elem, name, styles ); 6997 } 6998 6999 // Convert "normal" to computed value 7000 if ( val === "normal" && name in cssNormalTransform ) { 7001 val = cssNormalTransform[ name ]; 7002 } 7003 7004 // Make numeric if forced or a qualifier was provided and val looks numeric 7005 if ( extra === "" || extra ) { 7006 num = parseFloat( val ); 7007 return extra === true || isFinite( num ) ? num || 0 : val; 7008 } 7009 7010 return val; 7011 } 7012} ); 7013 7014jQuery.each( [ "height", "width" ], function( _i, dimension ) { 7015 jQuery.cssHooks[ dimension ] = { 7016 get: function( elem, computed, extra ) { 7017 if ( computed ) { 7018 7019 // Certain elements can have dimension info if we invisibly show them 7020 // but it must have a current display style that would benefit 7021 return rdisplayswap.test( jQuery.css( elem, "display" ) ) && 7022 7023 // Support: Safari 8+ 7024 // Table columns in Safari have non-zero offsetWidth & zero 7025 // getBoundingClientRect().width unless display is changed. 7026 // Support: IE <=11 only 7027 // Running getBoundingClientRect on a disconnected node 7028 // in IE throws an error. 7029 ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? 7030 swap( elem, cssShow, function() { 7031 return getWidthOrHeight( elem, dimension, extra ); 7032 } ) : 7033 getWidthOrHeight( elem, dimension, extra ); 7034 } 7035 }, 7036 7037 set: function( elem, value, extra ) { 7038 var matches, 7039 styles = getStyles( elem ), 7040 7041 // Only read styles.position if the test has a chance to fail 7042 // to avoid forcing a reflow. 7043 scrollboxSizeBuggy = !support.scrollboxSize() && 7044 styles.position === "absolute", 7045 7046 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) 7047 boxSizingNeeded = scrollboxSizeBuggy || extra, 7048 isBorderBox = boxSizingNeeded && 7049 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 7050 subtract = extra ? 7051 boxModelAdjustment( 7052 elem, 7053 dimension, 7054 extra, 7055 isBorderBox, 7056 styles 7057 ) : 7058 0; 7059 7060 // Account for unreliable border-box dimensions by comparing offset* to computed and 7061 // faking a content-box to get border and padding (gh-3699) 7062 if ( isBorderBox && scrollboxSizeBuggy ) { 7063 subtract -= Math.ceil( 7064 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - 7065 parseFloat( styles[ dimension ] ) - 7066 boxModelAdjustment( elem, dimension, "border", false, styles ) - 7067 0.5 7068 ); 7069 } 7070 7071 // Convert to pixels if value adjustment is needed 7072 if ( subtract && ( matches = rcssNum.exec( value ) ) && 7073 ( matches[ 3 ] || "px" ) !== "px" ) { 7074 7075 elem.style[ dimension ] = value; 7076 value = jQuery.css( elem, dimension ); 7077 } 7078 7079 return setPositiveNumber( elem, value, subtract ); 7080 } 7081 }; 7082} ); 7083 7084jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, 7085 function( elem, computed ) { 7086 if ( computed ) { 7087 return ( parseFloat( curCSS( elem, "marginLeft" ) ) || 7088 elem.getBoundingClientRect().left - 7089 swap( elem, { marginLeft: 0 }, function() { 7090 return elem.getBoundingClientRect().left; 7091 } ) 7092 ) + "px"; 7093 } 7094 } 7095); 7096 7097// These hooks are used by animate to expand properties 7098jQuery.each( { 7099 margin: "", 7100 padding: "", 7101 border: "Width" 7102}, function( prefix, suffix ) { 7103 jQuery.cssHooks[ prefix + suffix ] = { 7104 expand: function( value ) { 7105 var i = 0, 7106 expanded = {}, 7107 7108 // Assumes a single number if not a string 7109 parts = typeof value === "string" ? value.split( " " ) : [ value ]; 7110 7111 for ( ; i < 4; i++ ) { 7112 expanded[ prefix + cssExpand[ i ] + suffix ] = 7113 parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 7114 } 7115 7116 return expanded; 7117 } 7118 }; 7119 7120 if ( prefix !== "margin" ) { 7121 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 7122 } 7123} ); 7124 7125jQuery.fn.extend( { 7126 css: function( name, value ) { 7127 return access( this, function( elem, name, value ) { 7128 var styles, len, 7129 map = {}, 7130 i = 0; 7131 7132 if ( Array.isArray( name ) ) { 7133 styles = getStyles( elem ); 7134 len = name.length; 7135 7136 for ( ; i < len; i++ ) { 7137 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 7138 } 7139 7140 return map; 7141 } 7142 7143 return value !== undefined ? 7144 jQuery.style( elem, name, value ) : 7145 jQuery.css( elem, name ); 7146 }, name, value, arguments.length > 1 ); 7147 } 7148} ); 7149 7150 7151function Tween( elem, options, prop, end, easing ) { 7152 return new Tween.prototype.init( elem, options, prop, end, easing ); 7153} 7154jQuery.Tween = Tween; 7155 7156Tween.prototype = { 7157 constructor: Tween, 7158 init: function( elem, options, prop, end, easing, unit ) { 7159 this.elem = elem; 7160 this.prop = prop; 7161 this.easing = easing || jQuery.easing._default; 7162 this.options = options; 7163 this.start = this.now = this.cur(); 7164 this.end = end; 7165 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 7166 }, 7167 cur: function() { 7168 var hooks = Tween.propHooks[ this.prop ]; 7169 7170 return hooks && hooks.get ? 7171 hooks.get( this ) : 7172 Tween.propHooks._default.get( this ); 7173 }, 7174 run: function( percent ) { 7175 var eased, 7176 hooks = Tween.propHooks[ this.prop ]; 7177 7178 if ( this.options.duration ) { 7179 this.pos = eased = jQuery.easing[ this.easing ]( 7180 percent, this.options.duration * percent, 0, 1, this.options.duration 7181 ); 7182 } else { 7183 this.pos = eased = percent; 7184 } 7185 this.now = ( this.end - this.start ) * eased + this.start; 7186 7187 if ( this.options.step ) { 7188 this.options.step.call( this.elem, this.now, this ); 7189 } 7190 7191 if ( hooks && hooks.set ) { 7192 hooks.set( this ); 7193 } else { 7194 Tween.propHooks._default.set( this ); 7195 } 7196 return this; 7197 } 7198}; 7199 7200Tween.prototype.init.prototype = Tween.prototype; 7201 7202Tween.propHooks = { 7203 _default: { 7204 get: function( tween ) { 7205 var result; 7206 7207 // Use a property on the element directly when it is not a DOM element, 7208 // or when there is no matching style property that exists. 7209 if ( tween.elem.nodeType !== 1 || 7210 tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { 7211 return tween.elem[ tween.prop ]; 7212 } 7213 7214 // Passing an empty string as a 3rd parameter to .css will automatically 7215 // attempt a parseFloat and fallback to a string if the parse fails. 7216 // Simple values such as "10px" are parsed to Float; 7217 // complex values such as "rotate(1rad)" are returned as-is. 7218 result = jQuery.css( tween.elem, tween.prop, "" ); 7219 7220 // Empty strings, null, undefined and "auto" are converted to 0. 7221 return !result || result === "auto" ? 0 : result; 7222 }, 7223 set: function( tween ) { 7224 7225 // Use step hook for back compat. 7226 // Use cssHook if its there. 7227 // Use .style if available and use plain properties where available. 7228 if ( jQuery.fx.step[ tween.prop ] ) { 7229 jQuery.fx.step[ tween.prop ]( tween ); 7230 } else if ( tween.elem.nodeType === 1 && ( 7231 jQuery.cssHooks[ tween.prop ] || 7232 tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { 7233 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 7234 } else { 7235 tween.elem[ tween.prop ] = tween.now; 7236 } 7237 } 7238 } 7239}; 7240 7241// Support: IE <=9 only 7242// Panic based approach to setting things on disconnected nodes 7243Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 7244 set: function( tween ) { 7245 if ( tween.elem.nodeType && tween.elem.parentNode ) { 7246 tween.elem[ tween.prop ] = tween.now; 7247 } 7248 } 7249}; 7250 7251jQuery.easing = { 7252 linear: function( p ) { 7253 return p; 7254 }, 7255 swing: function( p ) { 7256 return 0.5 - Math.cos( p * Math.PI ) / 2; 7257 }, 7258 _default: "swing" 7259}; 7260 7261jQuery.fx = Tween.prototype.init; 7262 7263// Back compat <1.8 extension point 7264jQuery.fx.step = {}; 7265 7266 7267 7268 7269var 7270 fxNow, inProgress, 7271 rfxtypes = /^(?:toggle|show|hide)$/, 7272 rrun = /queueHooks$/; 7273 7274function schedule() { 7275 if ( inProgress ) { 7276 if ( document.hidden === false && window.requestAnimationFrame ) { 7277 window.requestAnimationFrame( schedule ); 7278 } else { 7279 window.setTimeout( schedule, jQuery.fx.interval ); 7280 } 7281 7282 jQuery.fx.tick(); 7283 } 7284} 7285 7286// Animations created synchronously will run synchronously 7287function createFxNow() { 7288 window.setTimeout( function() { 7289 fxNow = undefined; 7290 } ); 7291 return ( fxNow = Date.now() ); 7292} 7293 7294// Generate parameters to create a standard animation 7295function genFx( type, includeWidth ) { 7296 var which, 7297 i = 0, 7298 attrs = { height: type }; 7299 7300 // If we include width, step value is 1 to do all cssExpand values, 7301 // otherwise step value is 2 to skip over Left and Right 7302 includeWidth = includeWidth ? 1 : 0; 7303 for ( ; i < 4; i += 2 - includeWidth ) { 7304 which = cssExpand[ i ]; 7305 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; 7306 } 7307 7308 if ( includeWidth ) { 7309 attrs.opacity = attrs.width = type; 7310 } 7311 7312 return attrs; 7313} 7314 7315function createTween( value, prop, animation ) { 7316 var tween, 7317 collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), 7318 index = 0, 7319 length = collection.length; 7320 for ( ; index < length; index++ ) { 7321 if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { 7322 7323 // We're done with this property 7324 return tween; 7325 } 7326 } 7327} 7328 7329function defaultPrefilter( elem, props, opts ) { 7330 var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, 7331 isBox = "width" in props || "height" in props, 7332 anim = this, 7333 orig = {}, 7334 style = elem.style, 7335 hidden = elem.nodeType && isHiddenWithinTree( elem ), 7336 dataShow = dataPriv.get( elem, "fxshow" ); 7337 7338 // Queue-skipping animations hijack the fx hooks 7339 if ( !opts.queue ) { 7340 hooks = jQuery._queueHooks( elem, "fx" ); 7341 if ( hooks.unqueued == null ) { 7342 hooks.unqueued = 0; 7343 oldfire = hooks.empty.fire; 7344 hooks.empty.fire = function() { 7345 if ( !hooks.unqueued ) { 7346 oldfire(); 7347 } 7348 }; 7349 } 7350 hooks.unqueued++; 7351 7352 anim.always( function() { 7353 7354 // Ensure the complete handler is called before this completes 7355 anim.always( function() { 7356 hooks.unqueued--; 7357 if ( !jQuery.queue( elem, "fx" ).length ) { 7358 hooks.empty.fire(); 7359 } 7360 } ); 7361 } ); 7362 } 7363 7364 // Detect show/hide animations 7365 for ( prop in props ) { 7366 value = props[ prop ]; 7367 if ( rfxtypes.test( value ) ) { 7368 delete props[ prop ]; 7369 toggle = toggle || value === "toggle"; 7370 if ( value === ( hidden ? "hide" : "show" ) ) { 7371 7372 // Pretend to be hidden if this is a "show" and 7373 // there is still data from a stopped show/hide 7374 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { 7375 hidden = true; 7376 7377 // Ignore all other no-op show/hide data 7378 } else { 7379 continue; 7380 } 7381 } 7382 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); 7383 } 7384 } 7385 7386 // Bail out if this is a no-op like .hide().hide() 7387 propTween = !jQuery.isEmptyObject( props ); 7388 if ( !propTween && jQuery.isEmptyObject( orig ) ) { 7389 return; 7390 } 7391 7392 // Restrict "overflow" and "display" styles during box animations 7393 if ( isBox && elem.nodeType === 1 ) { 7394 7395 // Support: IE <=9 - 11, Edge 12 - 15 7396 // Record all 3 overflow attributes because IE does not infer the shorthand 7397 // from identically-valued overflowX and overflowY and Edge just mirrors 7398 // the overflowX value there. 7399 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; 7400 7401 // Identify a display type, preferring old show/hide data over the CSS cascade 7402 restoreDisplay = dataShow && dataShow.display; 7403 if ( restoreDisplay == null ) { 7404 restoreDisplay = dataPriv.get( elem, "display" ); 7405 } 7406 display = jQuery.css( elem, "display" ); 7407 if ( display === "none" ) { 7408 if ( restoreDisplay ) { 7409 display = restoreDisplay; 7410 } else { 7411 7412 // Get nonempty value(s) by temporarily forcing visibility 7413 showHide( [ elem ], true ); 7414 restoreDisplay = elem.style.display || restoreDisplay; 7415 display = jQuery.css( elem, "display" ); 7416 showHide( [ elem ] ); 7417 } 7418 } 7419 7420 // Animate inline elements as inline-block 7421 if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { 7422 if ( jQuery.css( elem, "float" ) === "none" ) { 7423 7424 // Restore the original display value at the end of pure show/hide animations 7425 if ( !propTween ) { 7426 anim.done( function() { 7427 style.display = restoreDisplay; 7428 } ); 7429 if ( restoreDisplay == null ) { 7430 display = style.display; 7431 restoreDisplay = display === "none" ? "" : display; 7432 } 7433 } 7434 style.display = "inline-block"; 7435 } 7436 } 7437 } 7438 7439 if ( opts.overflow ) { 7440 style.overflow = "hidden"; 7441 anim.always( function() { 7442 style.overflow = opts.overflow[ 0 ]; 7443 style.overflowX = opts.overflow[ 1 ]; 7444 style.overflowY = opts.overflow[ 2 ]; 7445 } ); 7446 } 7447 7448 // Implement show/hide animations 7449 propTween = false; 7450 for ( prop in orig ) { 7451 7452 // General show/hide setup for this element animation 7453 if ( !propTween ) { 7454 if ( dataShow ) { 7455 if ( "hidden" in dataShow ) { 7456 hidden = dataShow.hidden; 7457 } 7458 } else { 7459 dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); 7460 } 7461 7462 // Store hidden/visible for toggle so `.stop().toggle()` "reverses" 7463 if ( toggle ) { 7464 dataShow.hidden = !hidden; 7465 } 7466 7467 // Show elements before animating them 7468 if ( hidden ) { 7469 showHide( [ elem ], true ); 7470 } 7471 7472 /* eslint-disable no-loop-func */ 7473 7474 anim.done( function() { 7475 7476 /* eslint-enable no-loop-func */ 7477 7478 // The final step of a "hide" animation is actually hiding the element 7479 if ( !hidden ) { 7480 showHide( [ elem ] ); 7481 } 7482 dataPriv.remove( elem, "fxshow" ); 7483 for ( prop in orig ) { 7484 jQuery.style( elem, prop, orig[ prop ] ); 7485 } 7486 } ); 7487 } 7488 7489 // Per-property setup 7490 propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); 7491 if ( !( prop in dataShow ) ) { 7492 dataShow[ prop ] = propTween.start; 7493 if ( hidden ) { 7494 propTween.end = propTween.start; 7495 propTween.start = 0; 7496 } 7497 } 7498 } 7499} 7500 7501function propFilter( props, specialEasing ) { 7502 var index, name, easing, value, hooks; 7503 7504 // camelCase, specialEasing and expand cssHook pass 7505 for ( index in props ) { 7506 name = camelCase( index ); 7507 easing = specialEasing[ name ]; 7508 value = props[ index ]; 7509 if ( Array.isArray( value ) ) { 7510 easing = value[ 1 ]; 7511 value = props[ index ] = value[ 0 ]; 7512 } 7513 7514 if ( index !== name ) { 7515 props[ name ] = value; 7516 delete props[ index ]; 7517 } 7518 7519 hooks = jQuery.cssHooks[ name ]; 7520 if ( hooks && "expand" in hooks ) { 7521 value = hooks.expand( value ); 7522 delete props[ name ]; 7523 7524 // Not quite $.extend, this won't overwrite existing keys. 7525 // Reusing 'index' because we have the correct "name" 7526 for ( index in value ) { 7527 if ( !( index in props ) ) { 7528 props[ index ] = value[ index ]; 7529 specialEasing[ index ] = easing; 7530 } 7531 } 7532 } else { 7533 specialEasing[ name ] = easing; 7534 } 7535 } 7536} 7537 7538function Animation( elem, properties, options ) { 7539 var result, 7540 stopped, 7541 index = 0, 7542 length = Animation.prefilters.length, 7543 deferred = jQuery.Deferred().always( function() { 7544 7545 // Don't match elem in the :animated selector 7546 delete tick.elem; 7547 } ), 7548 tick = function() { 7549 if ( stopped ) { 7550 return false; 7551 } 7552 var currentTime = fxNow || createFxNow(), 7553 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), 7554 7555 // Support: Android 2.3 only 7556 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 7557 temp = remaining / animation.duration || 0, 7558 percent = 1 - temp, 7559 index = 0, 7560 length = animation.tweens.length; 7561 7562 for ( ; index < length; index++ ) { 7563 animation.tweens[ index ].run( percent ); 7564 } 7565 7566 deferred.notifyWith( elem, [ animation, percent, remaining ] ); 7567 7568 // If there's more to do, yield 7569 if ( percent < 1 && length ) { 7570 return remaining; 7571 } 7572 7573 // If this was an empty animation, synthesize a final progress notification 7574 if ( !length ) { 7575 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 7576 } 7577 7578 // Resolve the animation and report its conclusion 7579 deferred.resolveWith( elem, [ animation ] ); 7580 return false; 7581 }, 7582 animation = deferred.promise( { 7583 elem: elem, 7584 props: jQuery.extend( {}, properties ), 7585 opts: jQuery.extend( true, { 7586 specialEasing: {}, 7587 easing: jQuery.easing._default 7588 }, options ), 7589 originalProperties: properties, 7590 originalOptions: options, 7591 startTime: fxNow || createFxNow(), 7592 duration: options.duration, 7593 tweens: [], 7594 createTween: function( prop, end ) { 7595 var tween = jQuery.Tween( elem, animation.opts, prop, end, 7596 animation.opts.specialEasing[ prop ] || animation.opts.easing ); 7597 animation.tweens.push( tween ); 7598 return tween; 7599 }, 7600 stop: function( gotoEnd ) { 7601 var index = 0, 7602 7603 // If we are going to the end, we want to run all the tweens 7604 // otherwise we skip this part 7605 length = gotoEnd ? animation.tweens.length : 0; 7606 if ( stopped ) { 7607 return this; 7608 } 7609 stopped = true; 7610 for ( ; index < length; index++ ) { 7611 animation.tweens[ index ].run( 1 ); 7612 } 7613 7614 // Resolve when we played the last frame; otherwise, reject 7615 if ( gotoEnd ) { 7616 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 7617 deferred.resolveWith( elem, [ animation, gotoEnd ] ); 7618 } else { 7619 deferred.rejectWith( elem, [ animation, gotoEnd ] ); 7620 } 7621 return this; 7622 } 7623 } ), 7624 props = animation.props; 7625 7626 propFilter( props, animation.opts.specialEasing ); 7627 7628 for ( ; index < length; index++ ) { 7629 result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); 7630 if ( result ) { 7631 if ( isFunction( result.stop ) ) { 7632 jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = 7633 result.stop.bind( result ); 7634 } 7635 return result; 7636 } 7637 } 7638 7639 jQuery.map( props, createTween, animation ); 7640 7641 if ( isFunction( animation.opts.start ) ) { 7642 animation.opts.start.call( elem, animation ); 7643 } 7644 7645 // Attach callbacks from options 7646 animation 7647 .progress( animation.opts.progress ) 7648 .done( animation.opts.done, animation.opts.complete ) 7649 .fail( animation.opts.fail ) 7650 .always( animation.opts.always ); 7651 7652 jQuery.fx.timer( 7653 jQuery.extend( tick, { 7654 elem: elem, 7655 anim: animation, 7656 queue: animation.opts.queue 7657 } ) 7658 ); 7659 7660 return animation; 7661} 7662 7663jQuery.Animation = jQuery.extend( Animation, { 7664 7665 tweeners: { 7666 "*": [ function( prop, value ) { 7667 var tween = this.createTween( prop, value ); 7668 adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); 7669 return tween; 7670 } ] 7671 }, 7672 7673 tweener: function( props, callback ) { 7674 if ( isFunction( props ) ) { 7675 callback = props; 7676 props = [ "*" ]; 7677 } else { 7678 props = props.match( rnothtmlwhite ); 7679 } 7680 7681 var prop, 7682 index = 0, 7683 length = props.length; 7684 7685 for ( ; index < length; index++ ) { 7686 prop = props[ index ]; 7687 Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; 7688 Animation.tweeners[ prop ].unshift( callback ); 7689 } 7690 }, 7691 7692 prefilters: [ defaultPrefilter ], 7693 7694 prefilter: function( callback, prepend ) { 7695 if ( prepend ) { 7696 Animation.prefilters.unshift( callback ); 7697 } else { 7698 Animation.prefilters.push( callback ); 7699 } 7700 } 7701} ); 7702 7703jQuery.speed = function( speed, easing, fn ) { 7704 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { 7705 complete: fn || !fn && easing || 7706 isFunction( speed ) && speed, 7707 duration: speed, 7708 easing: fn && easing || easing && !isFunction( easing ) && easing 7709 }; 7710 7711 // Go to the end state if fx are off 7712 if ( jQuery.fx.off ) { 7713 opt.duration = 0; 7714 7715 } else { 7716 if ( typeof opt.duration !== "number" ) { 7717 if ( opt.duration in jQuery.fx.speeds ) { 7718 opt.duration = jQuery.fx.speeds[ opt.duration ]; 7719 7720 } else { 7721 opt.duration = jQuery.fx.speeds._default; 7722 } 7723 } 7724 } 7725 7726 // Normalize opt.queue - true/undefined/null -> "fx" 7727 if ( opt.queue == null || opt.queue === true ) { 7728 opt.queue = "fx"; 7729 } 7730 7731 // Queueing 7732 opt.old = opt.complete; 7733 7734 opt.complete = function() { 7735 if ( isFunction( opt.old ) ) { 7736 opt.old.call( this ); 7737 } 7738 7739 if ( opt.queue ) { 7740 jQuery.dequeue( this, opt.queue ); 7741 } 7742 }; 7743 7744 return opt; 7745}; 7746 7747jQuery.fn.extend( { 7748 fadeTo: function( speed, to, easing, callback ) { 7749 7750 // Show any hidden elements after setting opacity to 0 7751 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() 7752 7753 // Animate to the value specified 7754 .end().animate( { opacity: to }, speed, easing, callback ); 7755 }, 7756 animate: function( prop, speed, easing, callback ) { 7757 var empty = jQuery.isEmptyObject( prop ), 7758 optall = jQuery.speed( speed, easing, callback ), 7759 doAnimation = function() { 7760 7761 // Operate on a copy of prop so per-property easing won't be lost 7762 var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 7763 7764 // Empty animations, or finishing resolves immediately 7765 if ( empty || dataPriv.get( this, "finish" ) ) { 7766 anim.stop( true ); 7767 } 7768 }; 7769 7770 doAnimation.finish = doAnimation; 7771 7772 return empty || optall.queue === false ? 7773 this.each( doAnimation ) : 7774 this.queue( optall.queue, doAnimation ); 7775 }, 7776 stop: function( type, clearQueue, gotoEnd ) { 7777 var stopQueue = function( hooks ) { 7778 var stop = hooks.stop; 7779 delete hooks.stop; 7780 stop( gotoEnd ); 7781 }; 7782 7783 if ( typeof type !== "string" ) { 7784 gotoEnd = clearQueue; 7785 clearQueue = type; 7786 type = undefined; 7787 } 7788 if ( clearQueue ) { 7789 this.queue( type || "fx", [] ); 7790 } 7791 7792 return this.each( function() { 7793 var dequeue = true, 7794 index = type != null && type + "queueHooks", 7795 timers = jQuery.timers, 7796 data = dataPriv.get( this ); 7797 7798 if ( index ) { 7799 if ( data[ index ] && data[ index ].stop ) { 7800 stopQueue( data[ index ] ); 7801 } 7802 } else { 7803 for ( index in data ) { 7804 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { 7805 stopQueue( data[ index ] ); 7806 } 7807 } 7808 } 7809 7810 for ( index = timers.length; index--; ) { 7811 if ( timers[ index ].elem === this && 7812 ( type == null || timers[ index ].queue === type ) ) { 7813 7814 timers[ index ].anim.stop( gotoEnd ); 7815 dequeue = false; 7816 timers.splice( index, 1 ); 7817 } 7818 } 7819 7820 // Start the next in the queue if the last step wasn't forced. 7821 // Timers currently will call their complete callbacks, which 7822 // will dequeue but only if they were gotoEnd. 7823 if ( dequeue || !gotoEnd ) { 7824 jQuery.dequeue( this, type ); 7825 } 7826 } ); 7827 }, 7828 finish: function( type ) { 7829 if ( type !== false ) { 7830 type = type || "fx"; 7831 } 7832 return this.each( function() { 7833 var index, 7834 data = dataPriv.get( this ), 7835 queue = data[ type + "queue" ], 7836 hooks = data[ type + "queueHooks" ], 7837 timers = jQuery.timers, 7838 length = queue ? queue.length : 0; 7839 7840 // Enable finishing flag on private data 7841 data.finish = true; 7842 7843 // Empty the queue first 7844 jQuery.queue( this, type, [] ); 7845 7846 if ( hooks && hooks.stop ) { 7847 hooks.stop.call( this, true ); 7848 } 7849 7850 // Look for any active animations, and finish them 7851 for ( index = timers.length; index--; ) { 7852 if ( timers[ index ].elem === this && timers[ index ].queue === type ) { 7853 timers[ index ].anim.stop( true ); 7854 timers.splice( index, 1 ); 7855 } 7856 } 7857 7858 // Look for any animations in the old queue and finish them 7859 for ( index = 0; index < length; index++ ) { 7860 if ( queue[ index ] && queue[ index ].finish ) { 7861 queue[ index ].finish.call( this ); 7862 } 7863 } 7864 7865 // Turn off finishing flag 7866 delete data.finish; 7867 } ); 7868 } 7869} ); 7870 7871jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { 7872 var cssFn = jQuery.fn[ name ]; 7873 jQuery.fn[ name ] = function( speed, easing, callback ) { 7874 return speed == null || typeof speed === "boolean" ? 7875 cssFn.apply( this, arguments ) : 7876 this.animate( genFx( name, true ), speed, easing, callback ); 7877 }; 7878} ); 7879 7880// Generate shortcuts for custom animations 7881jQuery.each( { 7882 slideDown: genFx( "show" ), 7883 slideUp: genFx( "hide" ), 7884 slideToggle: genFx( "toggle" ), 7885 fadeIn: { opacity: "show" }, 7886 fadeOut: { opacity: "hide" }, 7887 fadeToggle: { opacity: "toggle" } 7888}, function( name, props ) { 7889 jQuery.fn[ name ] = function( speed, easing, callback ) { 7890 return this.animate( props, speed, easing, callback ); 7891 }; 7892} ); 7893 7894jQuery.timers = []; 7895jQuery.fx.tick = function() { 7896 var timer, 7897 i = 0, 7898 timers = jQuery.timers; 7899 7900 fxNow = Date.now(); 7901 7902 for ( ; i < timers.length; i++ ) { 7903 timer = timers[ i ]; 7904 7905 // Run the timer and safely remove it when done (allowing for external removal) 7906 if ( !timer() && timers[ i ] === timer ) { 7907 timers.splice( i--, 1 ); 7908 } 7909 } 7910 7911 if ( !timers.length ) { 7912 jQuery.fx.stop(); 7913 } 7914 fxNow = undefined; 7915}; 7916 7917jQuery.fx.timer = function( timer ) { 7918 jQuery.timers.push( timer ); 7919 jQuery.fx.start(); 7920}; 7921 7922jQuery.fx.interval = 13; 7923jQuery.fx.start = function() { 7924 if ( inProgress ) { 7925 return; 7926 } 7927 7928 inProgress = true; 7929 schedule(); 7930}; 7931 7932jQuery.fx.stop = function() { 7933 inProgress = null; 7934}; 7935 7936jQuery.fx.speeds = { 7937 slow: 600, 7938 fast: 200, 7939 7940 // Default speed 7941 _default: 400 7942}; 7943 7944 7945// Based off of the plugin by Clint Helfers, with permission. 7946// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
vendor: 21,001 bytes, lines 7947-8815
7947jQuery.fn.delay = function( time, type ) { 7948 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 7949 type = type || "fx"; 7950 7951 return this.queue( type, function( next, hooks ) { 7952 var timeout = window.setTimeout( next, time ); 7953 hooks.stop = function() { 7954 window.clearTimeout( timeout ); 7955 }; 7956 } ); 7957}; 7958 7959 7960( function() { 7961 var input = document.createElement( "input" ), 7962 select = document.createElement( "select" ), 7963 opt = select.appendChild( document.createElement( "option" ) ); 7964 7965 input.type = "checkbox"; 7966 7967 // Support: Android <=4.3 only 7968 // Default value for a checkbox should be "on" 7969 support.checkOn = input.value !== ""; 7970 7971 // Support: IE <=11 only 7972 // Must access selectedIndex to make default options select 7973 support.optSelected = opt.selected; 7974 7975 // Support: IE <=11 only 7976 // An input loses its value after becoming a radio 7977 input = document.createElement( "input" ); 7978 input.value = "t"; 7979 input.type = "radio"; 7980 support.radioValue = input.value === "t"; 7981} )(); 7982 7983 7984var boolHook, 7985 attrHandle = jQuery.expr.attrHandle; 7986 7987jQuery.fn.extend( { 7988 attr: function( name, value ) { 7989 return access( this, jQuery.attr, name, value, arguments.length > 1 ); 7990 }, 7991 7992 removeAttr: function( name ) { 7993 return this.each( function() { 7994 jQuery.removeAttr( this, name ); 7995 } ); 7996 } 7997} ); 7998 7999jQuery.extend( { 8000 attr: function( elem, name, value ) { 8001 var ret, hooks, 8002 nType = elem.nodeType; 8003 8004 // Don't get/set attributes on text, comment and attribute nodes 8005 if ( nType === 3 || nType === 8 || nType === 2 ) { 8006 return; 8007 } 8008 8009 // Fallback to prop when attributes are not supported 8010 if ( typeof elem.getAttribute === "undefined" ) { 8011 return jQuery.prop( elem, name, value ); 8012 } 8013 8014 // Attribute hooks are determined by the lowercase version 8015 // Grab necessary hook if one is defined 8016 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 8017 hooks = jQuery.attrHooks[ name.toLowerCase() ] || 8018 ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); 8019 } 8020 8021 if ( value !== undefined ) { 8022 if ( value === null ) { 8023 jQuery.removeAttr( elem, name ); 8024 return; 8025 } 8026 8027 if ( hooks && "set" in hooks && 8028 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 8029 return ret; 8030 } 8031 8032 elem.setAttribute( name, value + "" ); 8033 return value; 8034 } 8035 8036 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 8037 return ret; 8038 } 8039 8040 ret = jQuery.find.attr( elem, name ); 8041 8042 // Non-existent attributes return null, we normalize to undefined 8043 return ret == null ? undefined : ret; 8044 }, 8045 8046 attrHooks: { 8047 type: { 8048 set: function( elem, value ) { 8049 if ( !support.radioValue && value === "radio" && 8050 nodeName( elem, "input" ) ) { 8051 var val = elem.value; 8052 elem.setAttribute( "type", value ); 8053 if ( val ) { 8054 elem.value = val; 8055 } 8056 return value; 8057 } 8058 } 8059 } 8060 }, 8061 8062 removeAttr: function( elem, value ) { 8063 var name, 8064 i = 0, 8065 8066 // Attribute names can contain non-HTML whitespace characters 8067 // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 8068 attrNames = value && value.match( rnothtmlwhite ); 8069 8070 if ( attrNames && elem.nodeType === 1 ) { 8071 while ( ( name = attrNames[ i++ ] ) ) { 8072 elem.removeAttribute( name ); 8073 } 8074 } 8075 } 8076} ); 8077 8078// Hooks for boolean attributes 8079boolHook = { 8080 set: function( elem, value, name ) { 8081 if ( value === false ) { 8082 8083 // Remove boolean attributes when set to false 8084 jQuery.removeAttr( elem, name ); 8085 } else { 8086 elem.setAttribute( name, name ); 8087 } 8088 return name; 8089 } 8090}; 8091 8092jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { 8093 var getter = attrHandle[ name ] || jQuery.find.attr; 8094 8095 attrHandle[ name ] = function( elem, name, isXML ) { 8096 var ret, handle, 8097 lowercaseName = name.toLowerCase(); 8098 8099 if ( !isXML ) { 8100 8101 // Avoid an infinite loop by temporarily removing this function from the getter 8102 handle = attrHandle[ lowercaseName ]; 8103 attrHandle[ lowercaseName ] = ret; 8104 ret = getter( elem, name, isXML ) != null ? 8105 lowercaseName : 8106 null; 8107 attrHandle[ lowercaseName ] = handle; 8108 } 8109 return ret; 8110 }; 8111} ); 8112 8113 8114 8115 8116var rfocusable = /^(?:input|select|textarea|button)$/i, 8117 rclickable = /^(?:a|area)$/i; 8118 8119jQuery.fn.extend( { 8120 prop: function( name, value ) { 8121 return access( this, jQuery.prop, name, value, arguments.length > 1 ); 8122 }, 8123 8124 removeProp: function( name ) { 8125 return this.each( function() { 8126 delete this[ jQuery.propFix[ name ] || name ]; 8127 } ); 8128 } 8129} ); 8130 8131jQuery.extend( { 8132 prop: function( elem, name, value ) { 8133 var ret, hooks, 8134 nType = elem.nodeType; 8135 8136 // Don't get/set properties on text, comment and attribute nodes 8137 if ( nType === 3 || nType === 8 || nType === 2 ) { 8138 return; 8139 } 8140 8141 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 8142 8143 // Fix name and attach hooks 8144 name = jQuery.propFix[ name ] || name; 8145 hooks = jQuery.propHooks[ name ]; 8146 } 8147 8148 if ( value !== undefined ) { 8149 if ( hooks && "set" in hooks && 8150 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 8151 return ret; 8152 } 8153 8154 return ( elem[ name ] = value ); 8155 } 8156 8157 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 8158 return ret; 8159 } 8160 8161 return elem[ name ]; 8162 }, 8163 8164 propHooks: { 8165 tabIndex: { 8166 get: function( elem ) { 8167 8168 // Support: IE <=9 - 11 only 8169 // elem.tabIndex doesn't always return the 8170 // correct value when it hasn't been explicitly set 8171 // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 8172 // Use proper attribute retrieval(#12072) 8173 var tabindex = jQuery.find.attr( elem, "tabindex" ); 8174 8175 if ( tabindex ) { 8176 return parseInt( tabindex, 10 ); 8177 } 8178 8179 if ( 8180 rfocusable.test( elem.nodeName ) || 8181 rclickable.test( elem.nodeName ) && 8182 elem.href 8183 ) { 8184 return 0; 8185 } 8186 8187 return -1; 8188 } 8189 } 8190 }, 8191 8192 propFix: { 8193 "for": "htmlFor", 8194 "class": "className" 8195 } 8196} ); 8197 8198// Support: IE <=11 only 8199// Accessing the selectedIndex property 8200// forces the browser to respect setting selected 8201// on the option 8202// The getter ensures a default option is selected 8203// when in an optgroup 8204// eslint rule "no-unused-expressions" is disabled for this code 8205// since it considers such accessions noop 8206if ( !support.optSelected ) { 8207 jQuery.propHooks.selected = { 8208 get: function( elem ) { 8209 8210 /* eslint no-unused-expressions: "off" */ 8211 8212 var parent = elem.parentNode; 8213 if ( parent && parent.parentNode ) { 8214 parent.parentNode.selectedIndex; 8215 } 8216 return null; 8217 }, 8218 set: function( elem ) { 8219 8220 /* eslint no-unused-expressions: "off" */ 8221 8222 var parent = elem.parentNode; 8223 if ( parent ) { 8224 parent.selectedIndex; 8225 8226 if ( parent.parentNode ) { 8227 parent.parentNode.selectedIndex; 8228 } 8229 } 8230 } 8231 }; 8232} 8233 8234jQuery.each( [ 8235 "tabIndex", 8236 "readOnly", 8237 "maxLength", 8238 "cellSpacing", 8239 "cellPadding", 8240 "rowSpan", 8241 "colSpan", 8242 "useMap", 8243 "frameBorder", 8244 "contentEditable" 8245], function() { 8246 jQuery.propFix[ this.toLowerCase() ] = this; 8247} ); 8248 8249 8250 8251 8252 // Strip and collapse whitespace according to HTML spec 8253 // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace 8254 function stripAndCollapse( value ) { 8255 var tokens = value.match( rnothtmlwhite ) || []; 8256 return tokens.join( " " ); 8257 } 8258 8259 8260function getClass( elem ) { 8261 return elem.getAttribute && elem.getAttribute( "class" ) || ""; 8262} 8263 8264function classesToArray( value ) { 8265 if ( Array.isArray( value ) ) { 8266 return value; 8267 } 8268 if ( typeof value === "string" ) { 8269 return value.match( rnothtmlwhite ) || []; 8270 } 8271 return []; 8272} 8273 8274jQuery.fn.extend( { 8275 addClass: function( value ) { 8276 var classes, elem, cur, curValue, clazz, j, finalValue, 8277 i = 0; 8278 8279 if ( isFunction( value ) ) { 8280 return this.each( function( j ) { 8281 jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); 8282 } ); 8283 } 8284 8285 classes = classesToArray( value ); 8286 8287 if ( classes.length ) { 8288 while ( ( elem = this[ i++ ] ) ) { 8289 curValue = getClass( elem ); 8290 cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 8291 8292 if ( cur ) { 8293 j = 0; 8294 while ( ( clazz = classes[ j++ ] ) ) { 8295 if ( cur.indexOf( " " + clazz + " " ) < 0 ) { 8296 cur += clazz + " "; 8297 } 8298 } 8299 8300 // Only assign if different to avoid unneeded rendering. 8301 finalValue = stripAndCollapse( cur ); 8302 if ( curValue !== finalValue ) { 8303 elem.setAttribute( "class", finalValue ); 8304 } 8305 } 8306 } 8307 } 8308 8309 return this; 8310 }, 8311 8312 removeClass: function( value ) { 8313 var classes, elem, cur, curValue, clazz, j, finalValue, 8314 i = 0; 8315 8316 if ( isFunction( value ) ) { 8317 return this.each( function( j ) { 8318 jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); 8319 } ); 8320 } 8321 8322 if ( !arguments.length ) { 8323 return this.attr( "class", "" ); 8324 } 8325 8326 classes = classesToArray( value ); 8327 8328 if ( classes.length ) { 8329 while ( ( elem = this[ i++ ] ) ) { 8330 curValue = getClass( elem ); 8331 8332 // This expression is here for better compressibility (see addClass) 8333 cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 8334 8335 if ( cur ) { 8336 j = 0; 8337 while ( ( clazz = classes[ j++ ] ) ) { 8338 8339 // Remove *all* instances 8340 while ( cur.indexOf( " " + clazz + " " ) > -1 ) { 8341 cur = cur.replace( " " + clazz + " ", " " ); 8342 } 8343 } 8344 8345 // Only assign if different to avoid unneeded rendering. 8346 finalValue = stripAndCollapse( cur ); 8347 if ( curValue !== finalValue ) { 8348 elem.setAttribute( "class", finalValue ); 8349 } 8350 } 8351 } 8352 } 8353 8354 return this; 8355 }, 8356 8357 toggleClass: function( value, stateVal ) { 8358 var type = typeof value, 8359 isValidValue = type === "string" || Array.isArray( value ); 8360 8361 if ( typeof stateVal === "boolean" && isValidValue ) { 8362 return stateVal ? this.addClass( value ) : this.removeClass( value ); 8363 } 8364 8365 if ( isFunction( value ) ) { 8366 return this.each( function( i ) { 8367 jQuery( this ).toggleClass( 8368 value.call( this, i, getClass( this ), stateVal ), 8369 stateVal 8370 ); 8371 } ); 8372 } 8373 8374 return this.each( function() { 8375 var className, i, self, classNames; 8376 8377 if ( isValidValue ) { 8378 8379 // Toggle individual class names 8380 i = 0; 8381 self = jQuery( this ); 8382 classNames = classesToArray( value ); 8383 8384 while ( ( className = classNames[ i++ ] ) ) { 8385 8386 // Check each className given, space separated list 8387 if ( self.hasClass( className ) ) { 8388 self.removeClass( className ); 8389 } else { 8390 self.addClass( className ); 8391 } 8392 } 8393 8394 // Toggle whole class name 8395 } else if ( value === undefined || type === "boolean" ) { 8396 className = getClass( this ); 8397 if ( className ) { 8398 8399 // Store className if set 8400 dataPriv.set( this, "__className__", className ); 8401 } 8402 8403 // If the element has a class name or if we're passed `false`, 8404 // then remove the whole classname (if there was one, the above saved it). 8405 // Otherwise bring back whatever was previously saved (if anything), 8406 // falling back to the empty string if nothing was stored. 8407 if ( this.setAttribute ) { 8408 this.setAttribute( "class", 8409 className || value === false ? 8410 "" : 8411 dataPriv.get( this, "__className__" ) || "" 8412 ); 8413 } 8414 } 8415 } ); 8416 }, 8417 8418 hasClass: function( selector ) { 8419 var className, elem, 8420 i = 0; 8421 8422 className = " " + selector + " "; 8423 while ( ( elem = this[ i++ ] ) ) { 8424 if ( elem.nodeType === 1 && 8425 ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { 8426 return true; 8427 } 8428 } 8429 8430 return false; 8431 } 8432} ); 8433 8434 8435 8436 8437var rreturn = /\r/g; 8438 8439jQuery.fn.extend( { 8440 val: function( value ) { 8441 var hooks, ret, valueIsFunction, 8442 elem = this[ 0 ]; 8443 8444 if ( !arguments.length ) { 8445 if ( elem ) { 8446 hooks = jQuery.valHooks[ elem.type ] || 8447 jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 8448 8449 if ( hooks && 8450 "get" in hooks && 8451 ( ret = hooks.get( elem, "value" ) ) !== undefined 8452 ) { 8453 return ret; 8454 } 8455 8456 ret = elem.value; 8457 8458 // Handle most common string cases 8459 if ( typeof ret === "string" ) { 8460 return ret.replace( rreturn, "" ); 8461 } 8462 8463 // Handle cases where value is null/undef or number 8464 return ret == null ? "" : ret; 8465 } 8466 8467 return; 8468 } 8469 8470 valueIsFunction = isFunction( value ); 8471 8472 return this.each( function( i ) { 8473 var val; 8474 8475 if ( this.nodeType !== 1 ) { 8476 return; 8477 } 8478 8479 if ( valueIsFunction ) { 8480 val = value.call( this, i, jQuery( this ).val() ); 8481 } else { 8482 val = value; 8483 } 8484 8485 // Treat null/undefined as ""; convert numbers to string 8486 if ( val == null ) { 8487 val = ""; 8488 8489 } else if ( typeof val === "number" ) { 8490 val += ""; 8491 8492 } else if ( Array.isArray( val ) ) { 8493 val = jQuery.map( val, function( value ) { 8494 return value == null ? "" : value + ""; 8495 } ); 8496 } 8497 8498 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 8499 8500 // If set returns undefined, fall back to normal setting 8501 if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { 8502 this.value = val; 8503 } 8504 } ); 8505 } 8506} ); 8507 8508jQuery.extend( { 8509 valHooks: { 8510 option: { 8511 get: function( elem ) { 8512 8513 var val = jQuery.find.attr( elem, "value" ); 8514 return val != null ? 8515 val : 8516 8517 // Support: IE <=10 - 11 only 8518 // option.text throws exceptions (#14686, #14858) 8519 // Strip and collapse whitespace 8520 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace 8521 stripAndCollapse( jQuery.text( elem ) ); 8522 } 8523 }, 8524 select: { 8525 get: function( elem ) { 8526 var value, option, i, 8527 options = elem.options, 8528 index = elem.selectedIndex, 8529 one = elem.type === "select-one", 8530 values = one ? null : [], 8531 max = one ? index + 1 : options.length; 8532 8533 if ( index < 0 ) { 8534 i = max; 8535 8536 } else { 8537 i = one ? index : 0; 8538 } 8539 8540 // Loop through all the selected options 8541 for ( ; i < max; i++ ) { 8542 option = options[ i ]; 8543 8544 // Support: IE <=9 only 8545 // IE8-9 doesn't update selected after form reset (#2551) 8546 if ( ( option.selected || i === index ) && 8547 8548 // Don't return options that are disabled or in a disabled optgroup 8549 !option.disabled && 8550 ( !option.parentNode.disabled || 8551 !nodeName( option.parentNode, "optgroup" ) ) ) { 8552 8553 // Get the specific value for the option 8554 value = jQuery( option ).val(); 8555 8556 // We don't need an array for one selects 8557 if ( one ) { 8558 return value; 8559 } 8560 8561 // Multi-Selects return an array 8562 values.push( value ); 8563 } 8564 } 8565 8566 return values; 8567 }, 8568 8569 set: function( elem, value ) { 8570 var optionSet, option, 8571 options = elem.options, 8572 values = jQuery.makeArray( value ), 8573 i = options.length; 8574 8575 while ( i-- ) { 8576 option = options[ i ]; 8577 8578 /* eslint-disable no-cond-assign */ 8579 8580 if ( option.selected = 8581 jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 8582 ) { 8583 optionSet = true; 8584 } 8585 8586 /* eslint-enable no-cond-assign */ 8587 } 8588 8589 // Force browsers to behave consistently when non-matching value is set 8590 if ( !optionSet ) { 8591 elem.selectedIndex = -1; 8592 } 8593 return values; 8594 } 8595 } 8596 } 8597} ); 8598 8599// Radios and checkboxes getter/setter 8600jQuery.each( [ "radio", "checkbox" ], function() { 8601 jQuery.valHooks[ this ] = { 8602 set: function( elem, value ) { 8603 if ( Array.isArray( value ) ) { 8604 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); 8605 } 8606 } 8607 }; 8608 if ( !support.checkOn ) { 8609 jQuery.valHooks[ this ].get = function( elem ) { 8610 return elem.getAttribute( "value" ) === null ? "on" : elem.value; 8611 }; 8612 } 8613} ); 8614 8615 8616 8617 8618// Return jQuery for attributes-only inclusion 8619 8620 8621support.focusin = "onfocusin" in window; 8622 8623 8624var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 8625 stopPropagationCallback = function( e ) { 8626 e.stopPropagation(); 8627 }; 8628 8629jQuery.extend( jQuery.event, { 8630 8631 trigger: function( event, data, elem, onlyHandlers ) { 8632 8633 var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, 8634 eventPath = [ elem || document ], 8635 type = hasOwn.call( event, "type" ) ? event.type : event, 8636 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; 8637 8638 cur = lastElement = tmp = elem = elem || document; 8639 8640 // Don't do events on text and comment nodes 8641 if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 8642 return; 8643 } 8644 8645 // focus/blur morphs to focusin/out; ensure we're not firing them right now 8646 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 8647 return; 8648 } 8649 8650 if ( type.indexOf( "." ) > -1 ) { 8651 8652 // Namespaced trigger; create a regexp to match event type in handle() 8653 namespaces = type.split( "." ); 8654 type = namespaces.shift(); 8655 namespaces.sort(); 8656 } 8657 ontype = type.indexOf( ":" ) < 0 && "on" + type; 8658 8659 // Caller can pass in a jQuery.Event object, Object, or just an event type string 8660 event = event[ jQuery.expando ] ? 8661 event : 8662 new jQuery.Event( type, typeof event === "object" && event ); 8663 8664 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 8665 event.isTrigger = onlyHandlers ? 2 : 3; 8666 event.namespace = namespaces.join( "." ); 8667 event.rnamespace = event.namespace ? 8668 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : 8669 null; 8670 8671 // Clean up the event in case it is being reused 8672 event.result = undefined; 8673 if ( !event.target ) { 8674 event.target = elem; 8675 } 8676 8677 // Clone any incoming data and prepend the event, creating the handler arg list 8678 data = data == null ? 8679 [ event ] : 8680 jQuery.makeArray( data, [ event ] ); 8681 8682 // Allow special events to draw outside the lines 8683 special = jQuery.event.special[ type ] || {}; 8684 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 8685 return; 8686 } 8687 8688 // Determine event propagation path in advance, per W3C events spec (#9951) 8689 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 8690 if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { 8691 8692 bubbleType = special.delegateType || type; 8693 if ( !rfocusMorph.test( bubbleType + type ) ) { 8694 cur = cur.parentNode; 8695 } 8696 for ( ; cur; cur = cur.parentNode ) { 8697 eventPath.push( cur ); 8698 tmp = cur; 8699 } 8700 8701 // Only add window if we got to document (e.g., not plain obj or detached DOM) 8702 if ( tmp === ( elem.ownerDocument || document ) ) { 8703 eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 8704 } 8705 } 8706 8707 // Fire handlers on the event path 8708 i = 0; 8709 while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { 8710 lastElement = cur; 8711 event.type = i > 1 ? 8712 bubbleType : 8713 special.bindType || type; 8714 8715 // jQuery handler 8716 handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && 8717 dataPriv.get( cur, "handle" ); 8718 if ( handle ) { 8719 handle.apply( cur, data ); 8720 } 8721 8722 // Native handler 8723 handle = ontype && cur[ ontype ]; 8724 if ( handle && handle.apply && acceptData( cur ) ) { 8725 event.result = handle.apply( cur, data ); 8726 if ( event.result === false ) { 8727 event.preventDefault(); 8728 } 8729 } 8730 } 8731 event.type = type; 8732 8733 // If nobody prevented the default action, do it now 8734 if ( !onlyHandlers && !event.isDefaultPrevented() ) { 8735 8736 if ( ( !special._default || 8737 special._default.apply( eventPath.pop(), data ) === false ) && 8738 acceptData( elem ) ) { 8739 8740 // Call a native DOM method on the target with the same name as the event. 8741 // Don't do default actions on window, that's where global variables be (#6170) 8742 if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { 8743 8744 // Don't re-trigger an onFOO event when we call its FOO() method 8745 tmp = elem[ ontype ]; 8746 8747 if ( tmp ) { 8748 elem[ ontype ] = null; 8749 } 8750 8751 // Prevent re-triggering of the same event, since we already bubbled it above 8752 jQuery.event.triggered = type; 8753 8754 if ( event.isPropagationStopped() ) { 8755 lastElement.addEventListener( type, stopPropagationCallback ); 8756 } 8757 8758 elem[ type ](); 8759 8760 if ( event.isPropagationStopped() ) { 8761 lastElement.removeEventListener( type, stopPropagationCallback ); 8762 } 8763 8764 jQuery.event.triggered = undefined; 8765 8766 if ( tmp ) { 8767 elem[ ontype ] = tmp; 8768 } 8769 } 8770 } 8771 } 8772 8773 return event.result; 8774 }, 8775 8776 // Piggyback on a donor event to simulate a different one 8777 // Used only for `focus(in | out)` events 8778 simulate: function( type, elem, event ) { 8779 var e = jQuery.extend( 8780 new jQuery.Event(), 8781 event, 8782 { 8783 type: type, 8784 isSimulated: true 8785 } 8786 ); 8787 8788 jQuery.event.trigger( e, null, elem ); 8789 } 8790 8791} ); 8792 8793jQuery.fn.extend( { 8794 8795 trigger: function( type, data ) { 8796 return this.each( function() { 8797 jQuery.event.trigger( type, data, this ); 8798 } ); 8799 }, 8800 triggerHandler: function( type, data ) { 8801 var elem = this[ 0 ]; 8802 if ( elem ) { 8803 return jQuery.event.trigger( type, data, elem, true ); 8804 } 8805 } 8806} ); 8807 8808 8809// Support: Firefox <=44 8810// Firefox doesn't have focus(in | out) events 8811// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 8812// 8813// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 8814// focus(in | out) events fire after focus & blur events, 8815// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
vendor: 54,284 bytes, lines 8816-10878
8816// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 8817if ( !support.focusin ) { 8818 jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { 8819 8820 // Attach a single capturing handler on the document while someone wants focusin/focusout 8821 var handler = function( event ) { 8822 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); 8823 }; 8824 8825 jQuery.event.special[ fix ] = { 8826 setup: function() { 8827 8828 // Handle: regular nodes (via `this.ownerDocument`), window 8829 // (via `this.document`) & document (via `this`). 8830 var doc = this.ownerDocument || this.document || this, 8831 attaches = dataPriv.access( doc, fix ); 8832 8833 if ( !attaches ) { 8834 doc.addEventListener( orig, handler, true ); 8835 } 8836 dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); 8837 }, 8838 teardown: function() { 8839 var doc = this.ownerDocument || this.document || this, 8840 attaches = dataPriv.access( doc, fix ) - 1; 8841 8842 if ( !attaches ) { 8843 doc.removeEventListener( orig, handler, true ); 8844 dataPriv.remove( doc, fix ); 8845 8846 } else { 8847 dataPriv.access( doc, fix, attaches ); 8848 } 8849 } 8850 }; 8851 } ); 8852} 8853var location = window.location; 8854 8855var nonce = { guid: Date.now() }; 8856 8857var rquery = ( /\?/ ); 8858 8859 8860 8861// Cross-browser xml parsing 8862jQuery.parseXML = function( data ) { 8863 var xml, parserErrorElem; 8864 if ( !data || typeof data !== "string" ) { 8865 return null; 8866 } 8867 8868 // Support: IE 9 - 11 only 8869 // IE throws on parseFromString with invalid input. 8870 try { 8871 xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 8872 } catch ( e ) {} 8873 8874 parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; 8875 if ( !xml || parserErrorElem ) { 8876 jQuery.error( "Invalid XML: " + ( 8877 parserErrorElem ? 8878 jQuery.map( parserErrorElem.childNodes, function( el ) { 8879 return el.textContent; 8880 } ).join( "\n" ) : 8881 data 8882 ) ); 8883 } 8884 return xml; 8885}; 8886 8887 8888var 8889 rbracket = /\[\]$/, 8890 rCRLF = /\r?\n/g, 8891 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 8892 rsubmittable = /^(?:input|select|textarea|keygen)/i; 8893 8894function buildParams( prefix, obj, traditional, add ) { 8895 var name; 8896 8897 if ( Array.isArray( obj ) ) { 8898 8899 // Serialize array item. 8900 jQuery.each( obj, function( i, v ) { 8901 if ( traditional || rbracket.test( prefix ) ) { 8902 8903 // Treat each array item as a scalar. 8904 add( prefix, v ); 8905 8906 } else { 8907 8908 // Item is non-scalar (array or object), encode its numeric index. 8909 buildParams( 8910 prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", 8911 v, 8912 traditional, 8913 add 8914 ); 8915 } 8916 } ); 8917 8918 } else if ( !traditional && toType( obj ) === "object" ) { 8919 8920 // Serialize object item. 8921 for ( name in obj ) { 8922 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 8923 } 8924 8925 } else { 8926 8927 // Serialize scalar item. 8928 add( prefix, obj ); 8929 } 8930} 8931 8932// Serialize an array of form elements or a set of 8933// key/values into a query string 8934jQuery.param = function( a, traditional ) { 8935 var prefix, 8936 s = [], 8937 add = function( key, valueOrFunction ) { 8938 8939 // If value is a function, invoke it and use its return value 8940 var value = isFunction( valueOrFunction ) ? 8941 valueOrFunction() : 8942 valueOrFunction; 8943 8944 s[ s.length ] = encodeURIComponent( key ) + "=" + 8945 encodeURIComponent( value == null ? "" : value ); 8946 }; 8947 8948 if ( a == null ) { 8949 return ""; 8950 } 8951 8952 // If an array was passed in, assume that it is an array of form elements. 8953 if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 8954 8955 // Serialize the form elements 8956 jQuery.each( a, function() { 8957 add( this.name, this.value ); 8958 } ); 8959 8960 } else { 8961 8962 // If traditional, encode the "old" way (the way 1.3.2 or older 8963 // did it), otherwise encode params recursively. 8964 for ( prefix in a ) { 8965 buildParams( prefix, a[ prefix ], traditional, add ); 8966 } 8967 } 8968 8969 // Return the resulting serialization 8970 return s.join( "&" ); 8971}; 8972 8973jQuery.fn.extend( { 8974 serialize: function() { 8975 return jQuery.param( this.serializeArray() ); 8976 }, 8977 serializeArray: function() { 8978 return this.map( function() { 8979 8980 // Can add propHook for "elements" to filter or add form elements 8981 var elements = jQuery.prop( this, "elements" ); 8982 return elements ? jQuery.makeArray( elements ) : this; 8983 } ).filter( function() { 8984 var type = this.type; 8985 8986 // Use .is( ":disabled" ) so that fieldset[disabled] works 8987 return this.name && !jQuery( this ).is( ":disabled" ) && 8988 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 8989 ( this.checked || !rcheckableType.test( type ) ); 8990 } ).map( function( _i, elem ) { 8991 var val = jQuery( this ).val(); 8992 8993 if ( val == null ) { 8994 return null; 8995 } 8996 8997 if ( Array.isArray( val ) ) { 8998 return jQuery.map( val, function( val ) { 8999 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 9000 } ); 9001 } 9002 9003 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 9004 } ).get(); 9005 } 9006} ); 9007 9008 9009var 9010 r20 = /%20/g, 9011 rhash = /#.*$/, 9012 rantiCache = /([?&])_=[^&]*/, 9013 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 9014 9015 // #7653, #8125, #8152: local protocol detection 9016 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 9017 rnoContent = /^(?:GET|HEAD)$/, 9018 rprotocol = /^\/\//, 9019 9020 /* Prefilters 9021 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 9022 * 2) These are called: 9023 * - BEFORE asking for a transport 9024 * - AFTER param serialization (s.data is a string if s.processData is true) 9025 * 3) key is the dataType 9026 * 4) the catchall symbol "*" can be used 9027 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 9028 */ 9029 prefilters = {}, 9030 9031 /* Transports bindings 9032 * 1) key is the dataType 9033 * 2) the catchall symbol "*" can be used 9034 * 3) selection will start with transport dataType and THEN go to "*" if needed 9035 */ 9036 transports = {}, 9037 9038 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 9039 allTypes = "*/".concat( "*" ), 9040 9041 // Anchor tag for parsing the document origin 9042 originAnchor = document.createElement( "a" ); 9043 9044originAnchor.href = location.href; 9045 9046// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 9047function addToPrefiltersOrTransports( structure ) { 9048 9049 // dataTypeExpression is optional and defaults to "*" 9050 return function( dataTypeExpression, func ) { 9051 9052 if ( typeof dataTypeExpression !== "string" ) { 9053 func = dataTypeExpression; 9054 dataTypeExpression = "*"; 9055 } 9056 9057 var dataType, 9058 i = 0, 9059 dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; 9060 9061 if ( isFunction( func ) ) { 9062 9063 // For each dataType in the dataTypeExpression 9064 while ( ( dataType = dataTypes[ i++ ] ) ) { 9065 9066 // Prepend if requested 9067 if ( dataType[ 0 ] === "+" ) { 9068 dataType = dataType.slice( 1 ) || "*"; 9069 ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); 9070 9071 // Otherwise append 9072 } else { 9073 ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); 9074 } 9075 } 9076 } 9077 }; 9078} 9079 9080// Base inspection function for prefilters and transports 9081function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { 9082 9083 var inspected = {}, 9084 seekingTransport = ( structure === transports ); 9085 9086 function inspect( dataType ) { 9087 var selected; 9088 inspected[ dataType ] = true; 9089 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { 9090 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); 9091 if ( typeof dataTypeOrTransport === "string" && 9092 !seekingTransport && !inspected[ dataTypeOrTransport ] ) { 9093 9094 options.dataTypes.unshift( dataTypeOrTransport ); 9095 inspect( dataTypeOrTransport ); 9096 return false; 9097 } else if ( seekingTransport ) { 9098 return !( selected = dataTypeOrTransport ); 9099 } 9100 } ); 9101 return selected; 9102 } 9103 9104 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); 9105} 9106 9107// A special extend for ajax options 9108// that takes "flat" options (not to be deep extended) 9109// Fixes #9887 9110function ajaxExtend( target, src ) { 9111 var key, deep, 9112 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 9113 9114 for ( key in src ) { 9115 if ( src[ key ] !== undefined ) { 9116 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; 9117 } 9118 } 9119 if ( deep ) { 9120 jQuery.extend( true, target, deep ); 9121 } 9122 9123 return target; 9124} 9125 9126/* Handles responses to an ajax request: 9127 * - finds the right dataType (mediates between content-type and expected dataType) 9128 * - returns the corresponding response 9129 */ 9130function ajaxHandleResponses( s, jqXHR, responses ) { 9131 9132 var ct, type, finalDataType, firstDataType, 9133 contents = s.contents, 9134 dataTypes = s.dataTypes; 9135 9136 // Remove auto dataType and get content-type in the process 9137 while ( dataTypes[ 0 ] === "*" ) { 9138 dataTypes.shift(); 9139 if ( ct === undefined ) { 9140 ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); 9141 } 9142 } 9143 9144 // Check if we're dealing with a known content-type 9145 if ( ct ) { 9146 for ( type in contents ) { 9147 if ( contents[ type ] && contents[ type ].test( ct ) ) { 9148 dataTypes.unshift( type ); 9149 break; 9150 } 9151 } 9152 } 9153 9154 // Check to see if we have a response for the expected dataType 9155 if ( dataTypes[ 0 ] in responses ) { 9156 finalDataType = dataTypes[ 0 ]; 9157 } else { 9158 9159 // Try convertible dataTypes 9160 for ( type in responses ) { 9161 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { 9162 finalDataType = type; 9163 break; 9164 } 9165 if ( !firstDataType ) { 9166 firstDataType = type; 9167 } 9168 } 9169 9170 // Or just use first one 9171 finalDataType = finalDataType || firstDataType; 9172 } 9173 9174 // If we found a dataType 9175 // We add the dataType to the list if needed 9176 // and return the corresponding response 9177 if ( finalDataType ) { 9178 if ( finalDataType !== dataTypes[ 0 ] ) { 9179 dataTypes.unshift( finalDataType ); 9180 } 9181 return responses[ finalDataType ]; 9182 } 9183} 9184 9185/* Chain conversions given the request and the original response 9186 * Also sets the responseXXX fields on the jqXHR instance 9187 */ 9188function ajaxConvert( s, response, jqXHR, isSuccess ) { 9189 var conv2, current, conv, tmp, prev, 9190 converters = {}, 9191 9192 // Work with a copy of dataTypes in case we need to modify it for conversion 9193 dataTypes = s.dataTypes.slice(); 9194 9195 // Create converters map with lowercased keys 9196 if ( dataTypes[ 1 ] ) { 9197 for ( conv in s.converters ) { 9198 converters[ conv.toLowerCase() ] = s.converters[ conv ]; 9199 } 9200 } 9201 9202 current = dataTypes.shift(); 9203 9204 // Convert to each sequential dataType 9205 while ( current ) { 9206 9207 if ( s.responseFields[ current ] ) { 9208 jqXHR[ s.responseFields[ current ] ] = response; 9209 } 9210 9211 // Apply the dataFilter if provided 9212 if ( !prev && isSuccess && s.dataFilter ) { 9213 response = s.dataFilter( response, s.dataType ); 9214 } 9215 9216 prev = current; 9217 current = dataTypes.shift(); 9218 9219 if ( current ) { 9220 9221 // There's only work to do if current dataType is non-auto 9222 if ( current === "*" ) { 9223 9224 current = prev; 9225 9226 // Convert response if prev dataType is non-auto and differs from current 9227 } else if ( prev !== "*" && prev !== current ) { 9228 9229 // Seek a direct converter 9230 conv = converters[ prev + " " + current ] || converters[ "* " + current ]; 9231 9232 // If none found, seek a pair 9233 if ( !conv ) { 9234 for ( conv2 in converters ) { 9235 9236 // If conv2 outputs current 9237 tmp = conv2.split( " " ); 9238 if ( tmp[ 1 ] === current ) { 9239 9240 // If prev can be converted to accepted input 9241 conv = converters[ prev + " " + tmp[ 0 ] ] || 9242 converters[ "* " + tmp[ 0 ] ]; 9243 if ( conv ) { 9244 9245 // Condense equivalence converters 9246 if ( conv === true ) { 9247 conv = converters[ conv2 ]; 9248 9249 // Otherwise, insert the intermediate dataType 9250 } else if ( converters[ conv2 ] !== true ) { 9251 current = tmp[ 0 ]; 9252 dataTypes.unshift( tmp[ 1 ] ); 9253 } 9254 break; 9255 } 9256 } 9257 } 9258 } 9259 9260 // Apply converter (if not an equivalence) 9261 if ( conv !== true ) { 9262 9263 // Unless errors are allowed to bubble, catch and return them 9264 if ( conv && s.throws ) { 9265 response = conv( response ); 9266 } else { 9267 try { 9268 response = conv( response ); 9269 } catch ( e ) { 9270 return { 9271 state: "parsererror", 9272 error: conv ? e : "No conversion from " + prev + " to " + current 9273 }; 9274 } 9275 } 9276 } 9277 } 9278 } 9279 } 9280 9281 return { state: "success", data: response }; 9282} 9283 9284jQuery.extend( { 9285 9286 // Counter for holding the number of active queries 9287 active: 0, 9288 9289 // Last-Modified header cache for next request 9290 lastModified: {}, 9291 etag: {}, 9292 9293 ajaxSettings: { 9294 url: location.href, 9295 type: "GET", 9296 isLocal: rlocalProtocol.test( location.protocol ), 9297 global: true, 9298 processData: true, 9299 async: true, 9300 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 9301 9302 /* 9303 timeout: 0, 9304 data: null, 9305 dataType: null, 9306 username: null, 9307 password: null, 9308 cache: null, 9309 throws: false, 9310 traditional: false, 9311 headers: {}, 9312 */ 9313 9314 accepts: { 9315 "*": allTypes, 9316 text: "text/plain", 9317 html: "text/html", 9318 xml: "application/xml, text/xml", 9319 json: "application/json, text/javascript" 9320 }, 9321 9322 contents: { 9323 xml: /\bxml\b/, 9324 html: /\bhtml/, 9325 json: /\bjson\b/ 9326 }, 9327 9328 responseFields: { 9329 xml: "responseXML", 9330 text: "responseText", 9331 json: "responseJSON" 9332 }, 9333 9334 // Data converters 9335 // Keys separate source (or catchall "*") and destination types with a single space 9336 converters: { 9337 9338 // Convert anything to text 9339 "* text": String, 9340 9341 // Text to html (true = no transformation) 9342 "text html": true, 9343 9344 // Evaluate text as a json expression 9345 "text json": JSON.parse, 9346 9347 // Parse text as xml 9348 "text xml": jQuery.parseXML 9349 }, 9350 9351 // For options that shouldn't be deep extended: 9352 // you can add your own custom options here if 9353 // and when you create one that shouldn't be 9354 // deep extended (see ajaxExtend) 9355 flatOptions: { 9356 url: true, 9357 context: true 9358 } 9359 }, 9360 9361 // Creates a full fledged settings object into target 9362 // with both ajaxSettings and settings fields. 9363 // If target is omitted, writes into ajaxSettings. 9364 ajaxSetup: function( target, settings ) { 9365 return settings ? 9366 9367 // Building a settings object 9368 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : 9369 9370 // Extending ajaxSettings 9371 ajaxExtend( jQuery.ajaxSettings, target ); 9372 }, 9373 9374 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), 9375 ajaxTransport: addToPrefiltersOrTransports( transports ), 9376 9377 // Main method 9378 ajax: function( url, options ) { 9379 9380 // If url is an object, simulate pre-1.5 signature 9381 if ( typeof url === "object" ) { 9382 options = url; 9383 url = undefined; 9384 } 9385 9386 // Force options to be an object 9387 options = options || {}; 9388 9389 var transport, 9390 9391 // URL without anti-cache param 9392 cacheURL, 9393 9394 // Response headers 9395 responseHeadersString, 9396 responseHeaders, 9397 9398 // timeout handle 9399 timeoutTimer, 9400 9401 // Url cleanup var 9402 urlAnchor, 9403 9404 // Request state (becomes false upon send and true upon completion) 9405 completed, 9406 9407 // To know if global events are to be dispatched 9408 fireGlobals, 9409 9410 // Loop variable 9411 i, 9412 9413 // uncached part of the url 9414 uncached, 9415 9416 // Create the final options object 9417 s = jQuery.ajaxSetup( {}, options ), 9418 9419 // Callbacks context 9420 callbackContext = s.context || s, 9421 9422 // Context for global events is callbackContext if it is a DOM node or jQuery collection 9423 globalEventContext = s.context && 9424 ( callbackContext.nodeType || callbackContext.jquery ) ? 9425 jQuery( callbackContext ) : 9426 jQuery.event, 9427 9428 // Deferreds 9429 deferred = jQuery.Deferred(), 9430 completeDeferred = jQuery.Callbacks( "once memory" ), 9431 9432 // Status-dependent callbacks 9433 statusCode = s.statusCode || {}, 9434 9435 // Headers (they are sent all at once) 9436 requestHeaders = {}, 9437 requestHeadersNames = {}, 9438 9439 // Default abort message 9440 strAbort = "canceled", 9441 9442 // Fake xhr 9443 jqXHR = { 9444 readyState: 0, 9445 9446 // Builds headers hashtable if needed 9447 getResponseHeader: function( key ) { 9448 var match; 9449 if ( completed ) { 9450 if ( !responseHeaders ) { 9451 responseHeaders = {}; 9452 while ( ( match = rheaders.exec( responseHeadersString ) ) ) { 9453 responseHeaders[ match[ 1 ].toLowerCase() + " " ] = 9454 ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) 9455 .concat( match[ 2 ] ); 9456 } 9457 } 9458 match = responseHeaders[ key.toLowerCase() + " " ]; 9459 } 9460 return match == null ? null : match.join( ", " ); 9461 }, 9462 9463 // Raw string 9464 getAllResponseHeaders: function() { 9465 return completed ? responseHeadersString : null; 9466 }, 9467 9468 // Caches the header 9469 setRequestHeader: function( name, value ) { 9470 if ( completed == null ) { 9471 name = requestHeadersNames[ name.toLowerCase() ] = 9472 requestHeadersNames[ name.toLowerCase() ] || name; 9473 requestHeaders[ name ] = value; 9474 } 9475 return this; 9476 }, 9477 9478 // Overrides response content-type header 9479 overrideMimeType: function( type ) { 9480 if ( completed == null ) { 9481 s.mimeType = type; 9482 } 9483 return this; 9484 }, 9485 9486 // Status-dependent callbacks 9487 statusCode: function( map ) { 9488 var code; 9489 if ( map ) { 9490 if ( completed ) { 9491 9492 // Execute the appropriate callbacks 9493 jqXHR.always( map[ jqXHR.status ] ); 9494 } else { 9495 9496 // Lazy-add the new callbacks in a way that preserves old ones 9497 for ( code in map ) { 9498 statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; 9499 } 9500 } 9501 } 9502 return this; 9503 }, 9504 9505 // Cancel the request 9506 abort: function( statusText ) { 9507 var finalText = statusText || strAbort; 9508 if ( transport ) { 9509 transport.abort( finalText ); 9510 } 9511 done( 0, finalText ); 9512 return this; 9513 } 9514 }; 9515 9516 // Attach deferreds 9517 deferred.promise( jqXHR ); 9518 9519 // Add protocol if not provided (prefilters might expect it) 9520 // Handle falsy url in the settings object (#10093: consistency with old signature) 9521 // We also use the url parameter if available 9522 s.url = ( ( url || s.url || location.href ) + "" ) 9523 .replace( rprotocol, location.protocol + "//" ); 9524 9525 // Alias method option to type as per ticket #12004 9526 s.type = options.method || options.type || s.method || s.type; 9527 9528 // Extract dataTypes list 9529 s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; 9530 9531 // A cross-domain request is in order when the origin doesn't match the current origin. 9532 if ( s.crossDomain == null ) { 9533 urlAnchor = document.createElement( "a" ); 9534 9535 // Support: IE <=8 - 11, Edge 12 - 15 9536 // IE throws exception on accessing the href property if url is malformed, 9537 // e.g. http://example.com:80x/ 9538 try { 9539 urlAnchor.href = s.url; 9540 9541 // Support: IE <=8 - 11 only 9542 // Anchor's host property isn't correctly set when s.url is relative 9543 urlAnchor.href = urlAnchor.href; 9544 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== 9545 urlAnchor.protocol + "//" + urlAnchor.host; 9546 } catch ( e ) { 9547 9548 // If there is an error parsing the URL, assume it is crossDomain, 9549 // it can be rejected by the transport if it is invalid 9550 s.crossDomain = true; 9551 } 9552 } 9553 9554 // Convert data if not already a string 9555 if ( s.data && s.processData && typeof s.data !== "string" ) { 9556 s.data = jQuery.param( s.data, s.traditional ); 9557 } 9558 9559 // Apply prefilters 9560 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); 9561 9562 // If request was aborted inside a prefilter, stop there 9563 if ( completed ) { 9564 return jqXHR; 9565 } 9566 9567 // We can fire global events as of now if asked to 9568 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 9569 fireGlobals = jQuery.event && s.global; 9570 9571 // Watch for a new set of requests 9572 if ( fireGlobals && jQuery.active++ === 0 ) { 9573 jQuery.event.trigger( "ajaxStart" ); 9574 } 9575 9576 // Uppercase the type 9577 s.type = s.type.toUpperCase(); 9578 9579 // Determine if request has content 9580 s.hasContent = !rnoContent.test( s.type ); 9581 9582 // Save the URL in case we're toying with the If-Modified-Since 9583 // and/or If-None-Match header later on 9584 // Remove hash to simplify url manipulation 9585 cacheURL = s.url.replace( rhash, "" ); 9586 9587 // More options handling for requests with no content 9588 if ( !s.hasContent ) { 9589 9590 // Remember the hash so we can put it back 9591 uncached = s.url.slice( cacheURL.length ); 9592 9593 // If data is available and should be processed, append data to url 9594 if ( s.data && ( s.processData || typeof s.data === "string" ) ) { 9595 cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; 9596 9597 // #9682: remove data so that it's not used in an eventual retry 9598 delete s.data; 9599 } 9600 9601 // Add or update anti-cache param if needed 9602 if ( s.cache === false ) { 9603 cacheURL = cacheURL.replace( rantiCache, "$1" ); 9604 uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + 9605 uncached; 9606 } 9607 9608 // Put hash and anti-cache on the URL that will be requested (gh-1732) 9609 s.url = cacheURL + uncached; 9610 9611 // Change '%20' to '+' if this is encoded form body content (gh-2658) 9612 } else if ( s.data && s.processData && 9613 ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { 9614 s.data = s.data.replace( r20, "+" ); 9615 } 9616 9617 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 9618 if ( s.ifModified ) { 9619 if ( jQuery.lastModified[ cacheURL ] ) { 9620 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); 9621 } 9622 if ( jQuery.etag[ cacheURL ] ) { 9623 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); 9624 } 9625 } 9626 9627 // Set the correct header, if data is being sent 9628 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 9629 jqXHR.setRequestHeader( "Content-Type", s.contentType ); 9630 } 9631 9632 // Set the Accepts header for the server, depending on the dataType 9633 jqXHR.setRequestHeader( 9634 "Accept", 9635 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? 9636 s.accepts[ s.dataTypes[ 0 ] ] + 9637 ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : 9638 s.accepts[ "*" ] 9639 ); 9640 9641 // Check for headers option 9642 for ( i in s.headers ) { 9643 jqXHR.setRequestHeader( i, s.headers[ i ] ); 9644 } 9645 9646 // Allow custom headers/mimetypes and early abort 9647 if ( s.beforeSend && 9648 ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { 9649 9650 // Abort if not done already and return 9651 return jqXHR.abort(); 9652 } 9653 9654 // Aborting is no longer a cancellation 9655 strAbort = "abort"; 9656 9657 // Install callbacks on deferreds 9658 completeDeferred.add( s.complete ); 9659 jqXHR.done( s.success ); 9660 jqXHR.fail( s.error ); 9661 9662 // Get transport 9663 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); 9664 9665 // If no transport, we auto-abort 9666 if ( !transport ) { 9667 done( -1, "No Transport" ); 9668 } else { 9669 jqXHR.readyState = 1; 9670 9671 // Send global event 9672 if ( fireGlobals ) { 9673 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); 9674 } 9675 9676 // If request was aborted inside ajaxSend, stop there 9677 if ( completed ) { 9678 return jqXHR; 9679 } 9680 9681 // Timeout 9682 if ( s.async && s.timeout > 0 ) { 9683 timeoutTimer = window.setTimeout( function() { 9684 jqXHR.abort( "timeout" ); 9685 }, s.timeout ); 9686 } 9687 9688 try { 9689 completed = false; 9690 transport.send( requestHeaders, done ); 9691 } catch ( e ) { 9692 9693 // Rethrow post-completion exceptions 9694 if ( completed ) { 9695 throw e; 9696 } 9697 9698 // Propagate others as results 9699 done( -1, e ); 9700 } 9701 } 9702 9703 // Callback for when everything is done 9704 function done( status, nativeStatusText, responses, headers ) { 9705 var isSuccess, success, error, response, modified, 9706 statusText = nativeStatusText; 9707 9708 // Ignore repeat invocations 9709 if ( completed ) { 9710 return; 9711 } 9712 9713 completed = true; 9714 9715 // Clear timeout if it exists 9716 if ( timeoutTimer ) { 9717 window.clearTimeout( timeoutTimer ); 9718 } 9719 9720 // Dereference transport for early garbage collection 9721 // (no matter how long the jqXHR object will be used) 9722 transport = undefined; 9723 9724 // Cache response headers 9725 responseHeadersString = headers || ""; 9726 9727 // Set readyState 9728 jqXHR.readyState = status > 0 ? 4 : 0; 9729 9730 // Determine if successful 9731 isSuccess = status >= 200 && status < 300 || status === 304; 9732 9733 // Get response data 9734 if ( responses ) { 9735 response = ajaxHandleResponses( s, jqXHR, responses ); 9736 } 9737 9738 // Use a noop converter for missing script but not if jsonp 9739 if ( !isSuccess && 9740 jQuery.inArray( "script", s.dataTypes ) > -1 && 9741 jQuery.inArray( "json", s.dataTypes ) < 0 ) { 9742 s.converters[ "text script" ] = function() {}; 9743 } 9744 9745 // Convert no matter what (that way responseXXX fields are always set) 9746 response = ajaxConvert( s, response, jqXHR, isSuccess ); 9747 9748 // If successful, handle type chaining 9749 if ( isSuccess ) { 9750 9751 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 9752 if ( s.ifModified ) { 9753 modified = jqXHR.getResponseHeader( "Last-Modified" ); 9754 if ( modified ) { 9755 jQuery.lastModified[ cacheURL ] = modified; 9756 } 9757 modified = jqXHR.getResponseHeader( "etag" ); 9758 if ( modified ) { 9759 jQuery.etag[ cacheURL ] = modified; 9760 } 9761 } 9762 9763 // if no content 9764 if ( status === 204 || s.type === "HEAD" ) { 9765 statusText = "nocontent"; 9766 9767 // if not modified 9768 } else if ( status === 304 ) { 9769 statusText = "notmodified"; 9770 9771 // If we have data, let's convert it 9772 } else { 9773 statusText = response.state; 9774 success = response.data; 9775 error = response.error; 9776 isSuccess = !error; 9777 } 9778 } else { 9779 9780 // Extract error from statusText and normalize for non-aborts 9781 error = statusText; 9782 if ( status || !statusText ) { 9783 statusText = "error"; 9784 if ( status < 0 ) { 9785 status = 0; 9786 } 9787 } 9788 } 9789 9790 // Set data for the fake xhr object 9791 jqXHR.status = status; 9792 jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 9793 9794 // Success/Error 9795 if ( isSuccess ) { 9796 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 9797 } else { 9798 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 9799 } 9800 9801 // Status-dependent callbacks 9802 jqXHR.statusCode( statusCode ); 9803 statusCode = undefined; 9804 9805 if ( fireGlobals ) { 9806 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", 9807 [ jqXHR, s, isSuccess ? success : error ] ); 9808 } 9809 9810 // Complete 9811 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 9812 9813 if ( fireGlobals ) { 9814 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 9815 9816 // Handle the global AJAX counter 9817 if ( !( --jQuery.active ) ) { 9818 jQuery.event.trigger( "ajaxStop" ); 9819 } 9820 } 9821 } 9822 9823 return jqXHR; 9824 }, 9825 9826 getJSON: function( url, data, callback ) { 9827 return jQuery.get( url, data, callback, "json" ); 9828 }, 9829 9830 getScript: function( url, callback ) { 9831 return jQuery.get( url, undefined, callback, "script" ); 9832 } 9833} ); 9834 9835jQuery.each( [ "get", "post" ], function( _i, method ) { 9836 jQuery[ method ] = function( url, data, callback, type ) { 9837 9838 // Shift arguments if data argument was omitted 9839 if ( isFunction( data ) ) { 9840 type = type || callback; 9841 callback = data; 9842 data = undefined; 9843 } 9844 9845 // The url can be an options object (which then must have .url) 9846 return jQuery.ajax( jQuery.extend( { 9847 url: url, 9848 type: method, 9849 dataType: type, 9850 data: data, 9851 success: callback 9852 }, jQuery.isPlainObject( url ) && url ) ); 9853 }; 9854} ); 9855 9856jQuery.ajaxPrefilter( function( s ) { 9857 var i; 9858 for ( i in s.headers ) { 9859 if ( i.toLowerCase() === "content-type" ) { 9860 s.contentType = s.headers[ i ] || ""; 9861 } 9862 } 9863} ); 9864 9865 9866jQuery._evalUrl = function( url, options, doc ) { 9867 return jQuery.ajax( { 9868 url: url, 9869 9870 // Make this explicit, since user can override this through ajaxSetup (#11264) 9871 type: "GET", 9872 dataType: "script", 9873 cache: true, 9874 async: false, 9875 global: false, 9876 9877 // Only evaluate the response if it is successful (gh-4126) 9878 // dataFilter is not invoked for failure responses, so using it instead 9879 // of the default converter is kludgy but it works. 9880 converters: { 9881 "text script": function() {} 9882 }, 9883 dataFilter: function( response ) { 9884 jQuery.globalEval( response, options, doc ); 9885 } 9886 } ); 9887}; 9888 9889 9890jQuery.fn.extend( { 9891 wrapAll: function( html ) { 9892 var wrap; 9893 9894 if ( this[ 0 ] ) { 9895 if ( isFunction( html ) ) { 9896 html = html.call( this[ 0 ] ); 9897 } 9898 9899 // The elements to wrap the target around 9900 wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 9901 9902 if ( this[ 0 ].parentNode ) { 9903 wrap.insertBefore( this[ 0 ] ); 9904 } 9905 9906 wrap.map( function() { 9907 var elem = this; 9908 9909 while ( elem.firstElementChild ) { 9910 elem = elem.firstElementChild; 9911 } 9912 9913 return elem; 9914 } ).append( this ); 9915 } 9916 9917 return this; 9918 }, 9919 9920 wrapInner: function( html ) { 9921 if ( isFunction( html ) ) { 9922 return this.each( function( i ) { 9923 jQuery( this ).wrapInner( html.call( this, i ) ); 9924 } ); 9925 } 9926 9927 return this.each( function() { 9928 var self = jQuery( this ), 9929 contents = self.contents(); 9930 9931 if ( contents.length ) { 9932 contents.wrapAll( html ); 9933 9934 } else { 9935 self.append( html ); 9936 } 9937 } ); 9938 }, 9939 9940 wrap: function( html ) { 9941 var htmlIsFunction = isFunction( html ); 9942 9943 return this.each( function( i ) { 9944 jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); 9945 } ); 9946 }, 9947 9948 unwrap: function( selector ) { 9949 this.parent( selector ).not( "body" ).each( function() { 9950 jQuery( this ).replaceWith( this.childNodes ); 9951 } ); 9952 return this; 9953 } 9954} ); 9955 9956 9957jQuery.expr.pseudos.hidden = function( elem ) { 9958 return !jQuery.expr.pseudos.visible( elem ); 9959}; 9960jQuery.expr.pseudos.visible = function( elem ) { 9961 return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); 9962}; 9963 9964 9965 9966 9967jQuery.ajaxSettings.xhr = function() { 9968 try { 9969 return new window.XMLHttpRequest(); 9970 } catch ( e ) {} 9971}; 9972 9973var xhrSuccessStatus = { 9974 9975 // File protocol always yields status code 0, assume 200 9976 0: 200, 9977 9978 // Support: IE <=9 only 9979 // #1450: sometimes IE returns 1223 when it should be 204 9980 1223: 204 9981 }, 9982 xhrSupported = jQuery.ajaxSettings.xhr(); 9983 9984support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 9985support.ajax = xhrSupported = !!xhrSupported; 9986 9987jQuery.ajaxTransport( function( options ) { 9988 var callback, errorCallback; 9989 9990 // Cross domain only allowed if supported through XMLHttpRequest 9991 if ( support.cors || xhrSupported && !options.crossDomain ) { 9992 return { 9993 send: function( headers, complete ) { 9994 var i, 9995 xhr = options.xhr(); 9996 9997 xhr.open( 9998 options.type, 9999 options.url, 10000 options.async, 10001 options.username, 10002 options.password 10003 ); 10004 10005 // Apply custom fields if provided 10006 if ( options.xhrFields ) { 10007 for ( i in options.xhrFields ) { 10008 xhr[ i ] = options.xhrFields[ i ]; 10009 } 10010 } 10011 10012 // Override mime type if needed 10013 if ( options.mimeType && xhr.overrideMimeType ) { 10014 xhr.overrideMimeType( options.mimeType ); 10015 } 10016 10017 // X-Requested-With header 10018 // For cross-domain requests, seeing as conditions for a preflight are 10019 // akin to a jigsaw puzzle, we simply never set it to be sure. 10020 // (it can always be set on a per-request basis or even using ajaxSetup) 10021 // For same-domain requests, won't change header if already provided. 10022 if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { 10023 headers[ "X-Requested-With" ] = "XMLHttpRequest"; 10024 } 10025 10026 // Set headers 10027 for ( i in headers ) { 10028 xhr.setRequestHeader( i, headers[ i ] ); 10029 } 10030 10031 // Callback 10032 callback = function( type ) { 10033 return function() { 10034 if ( callback ) { 10035 callback = errorCallback = xhr.onload = 10036 xhr.onerror = xhr.onabort = xhr.ontimeout = 10037 xhr.onreadystatechange = null; 10038 10039 if ( type === "abort" ) { 10040 xhr.abort(); 10041 } else if ( type === "error" ) { 10042 10043 // Support: IE <=9 only 10044 // On a manual native abort, IE9 throws 10045 // errors on any property access that is not readyState 10046 if ( typeof xhr.status !== "number" ) { 10047 complete( 0, "error" ); 10048 } else { 10049 complete( 10050 10051 // File: protocol always yields status 0; see #8605, #14207 10052 xhr.status, 10053 xhr.statusText 10054 ); 10055 } 10056 } else { 10057 complete( 10058 xhrSuccessStatus[ xhr.status ] || xhr.status, 10059 xhr.statusText, 10060 10061 // Support: IE <=9 only 10062 // IE9 has no XHR2 but throws on binary (trac-11426) 10063 // For XHR2 non-text, let the caller handle it (gh-2498) 10064 ( xhr.responseType || "text" ) !== "text" || 10065 typeof xhr.responseText !== "string" ? 10066 { binary: xhr.response } : 10067 { text: xhr.responseText }, 10068 xhr.getAllResponseHeaders() 10069 ); 10070 } 10071 } 10072 }; 10073 }; 10074 10075 // Listen to events 10076 xhr.onload = callback(); 10077 errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); 10078 10079 // Support: IE 9 only 10080 // Use onreadystatechange to replace onabort 10081 // to handle uncaught aborts 10082 if ( xhr.onabort !== undefined ) { 10083 xhr.onabort = errorCallback; 10084 } else { 10085 xhr.onreadystatechange = function() { 10086 10087 // Check readyState before timeout as it changes 10088 if ( xhr.readyState === 4 ) { 10089 10090 // Allow onerror to be called first, 10091 // but that will not handle a native abort 10092 // Also, save errorCallback to a variable 10093 // as xhr.onerror cannot be accessed 10094 window.setTimeout( function() { 10095 if ( callback ) { 10096 errorCallback(); 10097 } 10098 } ); 10099 } 10100 }; 10101 } 10102 10103 // Create the abort callback 10104 callback = callback( "abort" ); 10105 10106 try { 10107 10108 // Do send the request (this may raise an exception) 10109 xhr.send( options.hasContent && options.data || null ); 10110 } catch ( e ) { 10111 10112 // #14683: Only rethrow if this hasn't been notified as an error yet 10113 if ( callback ) { 10114 throw e; 10115 } 10116 } 10117 }, 10118 10119 abort: function() { 10120 if ( callback ) { 10121 callback(); 10122 } 10123 } 10124 }; 10125 } 10126} ); 10127 10128 10129 10130 10131// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 10132jQuery.ajaxPrefilter( function( s ) { 10133 if ( s.crossDomain ) { 10134 s.contents.script = false; 10135 } 10136} ); 10137 10138// Install script dataType 10139jQuery.ajaxSetup( { 10140 accepts: { 10141 script: "text/javascript, application/javascript, " + 10142 "application/ecmascript, application/x-ecmascript" 10143 }, 10144 contents: { 10145 script: /\b(?:java|ecma)script\b/ 10146 }, 10147 converters: { 10148 "text script": function( text ) { 10149 jQuery.globalEval( text ); 10150 return text; 10151 } 10152 } 10153} ); 10154 10155// Handle cache's special case and crossDomain 10156jQuery.ajaxPrefilter( "script", function( s ) { 10157 if ( s.cache === undefined ) { 10158 s.cache = false; 10159 } 10160 if ( s.crossDomain ) { 10161 s.type = "GET"; 10162 } 10163} ); 10164 10165// Bind script tag hack transport 10166jQuery.ajaxTransport( "script", function( s ) { 10167 10168 // This transport only deals with cross domain or forced-by-attrs requests 10169 if ( s.crossDomain || s.scriptAttrs ) { 10170 var script, callback; 10171 return { 10172 send: function( _, complete ) { 10173 script = jQuery( "<script>" ) 10174 .attr( s.scriptAttrs || {} ) 10175 .prop( { charset: s.scriptCharset, src: s.url } ) 10176 .on( "load error", callback = function( evt ) { 10177 script.remove(); 10178 callback = null; 10179 if ( evt ) { 10180 complete( evt.type === "error" ? 404 : 200, evt.type ); 10181 } 10182 } ); 10183 10184 // Use native DOM manipulation to avoid our domManip AJAX trickery 10185 document.head.appendChild( script[ 0 ] ); 10186 }, 10187 abort: function() { 10188 if ( callback ) { 10189 callback(); 10190 } 10191 } 10192 }; 10193 } 10194} ); 10195 10196 10197 10198 10199var oldCallbacks = [], 10200 rjsonp = /(=)\?(?=&|$)|\?\?/; 10201 10202// Default jsonp settings 10203jQuery.ajaxSetup( { 10204 jsonp: "callback", 10205 jsonpCallback: function() { 10206 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) ); 10207 this[ callback ] = true; 10208 return callback; 10209 } 10210} ); 10211 10212// Detect, normalize options and install callbacks for jsonp requests 10213jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 10214 10215 var callbackName, overwritten, responseContainer, 10216 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 10217 "url" : 10218 typeof s.data === "string" && 10219 ( s.contentType || "" ) 10220 .indexOf( "application/x-www-form-urlencoded" ) === 0 && 10221 rjsonp.test( s.data ) && "data" 10222 ); 10223 10224 // Handle iff the expected data type is "jsonp" or we have a parameter to set 10225 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 10226 10227 // Get callback name, remembering preexisting value associated with it 10228 callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? 10229 s.jsonpCallback() : 10230 s.jsonpCallback; 10231 10232 // Insert callback into url or form data 10233 if ( jsonProp ) { 10234 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 10235 } else if ( s.jsonp !== false ) { 10236 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 10237 } 10238 10239 // Use data converter to retrieve json after script execution 10240 s.converters[ "script json" ] = function() { 10241 if ( !responseContainer ) { 10242 jQuery.error( callbackName + " was not called" ); 10243 } 10244 return responseContainer[ 0 ]; 10245 }; 10246 10247 // Force json dataType 10248 s.dataTypes[ 0 ] = "json"; 10249 10250 // Install callback 10251 overwritten = window[ callbackName ]; 10252 window[ callbackName ] = function() { 10253 responseContainer = arguments; 10254 }; 10255 10256 // Clean-up function (fires after converters) 10257 jqXHR.always( function() { 10258 10259 // If previous value didn't exist - remove it 10260 if ( overwritten === undefined ) { 10261 jQuery( window ).removeProp( callbackName ); 10262 10263 // Otherwise restore preexisting value 10264 } else { 10265 window[ callbackName ] = overwritten; 10266 } 10267 10268 // Save back as free 10269 if ( s[ callbackName ] ) { 10270 10271 // Make sure that re-using the options doesn't screw things around 10272 s.jsonpCallback = originalSettings.jsonpCallback; 10273 10274 // Save the callback name for future use 10275 oldCallbacks.push( callbackName ); 10276 } 10277 10278 // Call if it was a function and we have a response 10279 if ( responseContainer && isFunction( overwritten ) ) { 10280 overwritten( responseContainer[ 0 ] ); 10281 } 10282 10283 responseContainer = overwritten = undefined; 10284 } ); 10285 10286 // Delegate to script 10287 return "script"; 10288 } 10289} ); 10290 10291 10292 10293 10294// Support: Safari 8 only 10295// In Safari 8 documents created via document.implementation.createHTMLDocument 10296// collapse sibling forms: the second one becomes a child of the first one. 10297// Because of that, this security measure has to be disabled in Safari 8. 10298// https://bugs.webkit.org/show_bug.cgi?id=137337 10299support.createHTMLDocument = ( function() { 10300 var body = document.implementation.createHTMLDocument( "" ).body; 10301 body.innerHTML = "<form></form><form></form>"; 10302 return body.childNodes.length === 2; 10303} )(); 10304 10305 10306// Argument "data" should be string of html 10307// context (optional): If specified, the fragment will be created in this context, 10308// defaults to document 10309// keepScripts (optional): If true, will include scripts passed in the html string 10310jQuery.parseHTML = function( data, context, keepScripts ) { 10311 if ( typeof data !== "string" ) { 10312 return []; 10313 } 10314 if ( typeof context === "boolean" ) { 10315 keepScripts = context; 10316 context = false; 10317 } 10318 10319 var base, parsed, scripts; 10320 10321 if ( !context ) { 10322 10323 // Stop scripts or inline event handlers from being executed immediately 10324 // by using document.implementation 10325 if ( support.createHTMLDocument ) { 10326 context = document.implementation.createHTMLDocument( "" ); 10327 10328 // Set the base href for the created document 10329 // so any parsed elements with URLs 10330 // are based on the document's URL (gh-2965) 10331 base = context.createElement( "base" ); 10332 base.href = document.location.href; 10333 context.head.appendChild( base ); 10334 } else { 10335 context = document; 10336 } 10337 } 10338 10339 parsed = rsingleTag.exec( data ); 10340 scripts = !keepScripts && []; 10341 10342 // Single tag 10343 if ( parsed ) { 10344 return [ context.createElement( parsed[ 1 ] ) ]; 10345 } 10346 10347 parsed = buildFragment( [ data ], context, scripts ); 10348 10349 if ( scripts && scripts.length ) { 10350 jQuery( scripts ).remove(); 10351 } 10352 10353 return jQuery.merge( [], parsed.childNodes ); 10354}; 10355 10356 10357/** 10358 * Load a url into a page 10359 */ 10360jQuery.fn.load = function( url, params, callback ) { 10361 var selector, type, response, 10362 self = this, 10363 off = url.indexOf( " " ); 10364 10365 if ( off > -1 ) { 10366 selector = stripAndCollapse( url.slice( off ) ); 10367 url = url.slice( 0, off ); 10368 } 10369 10370 // If it's a function 10371 if ( isFunction( params ) ) { 10372 10373 // We assume that it's the callback 10374 callback = params; 10375 params = undefined; 10376 10377 // Otherwise, build a param string 10378 } else if ( params && typeof params === "object" ) { 10379 type = "POST"; 10380 } 10381 10382 // If we have elements to modify, make the request 10383 if ( self.length > 0 ) { 10384 jQuery.ajax( { 10385 url: url, 10386 10387 // If "type" variable is undefined, then "GET" method will be used. 10388 // Make value of this field explicit since 10389 // user can override it through ajaxSetup method 10390 type: type || "GET", 10391 dataType: "html", 10392 data: params 10393 } ).done( function( responseText ) { 10394 10395 // Save response for use in complete callback 10396 response = arguments; 10397 10398 self.html( selector ? 10399 10400 // If a selector was specified, locate the right elements in a dummy div 10401 // Exclude scripts to avoid IE 'Permission Denied' errors 10402 jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 10403 10404 // Otherwise use the full result 10405 responseText ); 10406 10407 // If the request succeeds, this function gets "data", "status", "jqXHR" 10408 // but they are ignored because response was set above. 10409 // If it fails, this function gets "jqXHR", "status", "error" 10410 } ).always( callback && function( jqXHR, status ) { 10411 self.each( function() { 10412 callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 10413 } ); 10414 } ); 10415 } 10416 10417 return this; 10418}; 10419 10420 10421 10422 10423jQuery.expr.pseudos.animated = function( elem ) { 10424 return jQuery.grep( jQuery.timers, function( fn ) { 10425 return elem === fn.elem; 10426 } ).length; 10427}; 10428 10429 10430 10431 10432jQuery.offset = { 10433 setOffset: function( elem, options, i ) { 10434 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 10435 position = jQuery.css( elem, "position" ), 10436 curElem = jQuery( elem ), 10437 props = {}; 10438 10439 // Set position first, in-case top/left are set even on static elem 10440 if ( position === "static" ) { 10441 elem.style.position = "relative"; 10442 } 10443 10444 curOffset = curElem.offset(); 10445 curCSSTop = jQuery.css( elem, "top" ); 10446 curCSSLeft = jQuery.css( elem, "left" ); 10447 calculatePosition = ( position === "absolute" || position === "fixed" ) && 10448 ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; 10449 10450 // Need to be able to calculate position if either 10451 // top or left is auto and position is either absolute or fixed 10452 if ( calculatePosition ) { 10453 curPosition = curElem.position(); 10454 curTop = curPosition.top; 10455 curLeft = curPosition.left; 10456 10457 } else { 10458 curTop = parseFloat( curCSSTop ) || 0; 10459 curLeft = parseFloat( curCSSLeft ) || 0; 10460 } 10461 10462 if ( isFunction( options ) ) { 10463 10464 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 10465 options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); 10466 } 10467 10468 if ( options.top != null ) { 10469 props.top = ( options.top - curOffset.top ) + curTop; 10470 } 10471 if ( options.left != null ) { 10472 props.left = ( options.left - curOffset.left ) + curLeft; 10473 } 10474 10475 if ( "using" in options ) { 10476 options.using.call( elem, props ); 10477 10478 } else { 10479 curElem.css( props ); 10480 } 10481 } 10482}; 10483 10484jQuery.fn.extend( { 10485 10486 // offset() relates an element's border box to the document origin 10487 offset: function( options ) { 10488 10489 // Preserve chaining for setter 10490 if ( arguments.length ) { 10491 return options === undefined ? 10492 this : 10493 this.each( function( i ) { 10494 jQuery.offset.setOffset( this, options, i ); 10495 } ); 10496 } 10497 10498 var rect, win, 10499 elem = this[ 0 ]; 10500 10501 if ( !elem ) { 10502 return; 10503 } 10504 10505 // Return zeros for disconnected and hidden (display: none) elements (gh-2310) 10506 // Support: IE <=11 only 10507 // Running getBoundingClientRect on a 10508 // disconnected node in IE throws an error 10509 if ( !elem.getClientRects().length ) { 10510 return { top: 0, left: 0 }; 10511 } 10512 10513 // Get document-relative position by adding viewport scroll to viewport-relative gBCR 10514 rect = elem.getBoundingClientRect(); 10515 win = elem.ownerDocument.defaultView; 10516 return { 10517 top: rect.top + win.pageYOffset, 10518 left: rect.left + win.pageXOffset 10519 }; 10520 }, 10521 10522 // position() relates an element's margin box to its offset parent's padding box 10523 // This corresponds to the behavior of CSS absolute positioning 10524 position: function() { 10525 if ( !this[ 0 ] ) { 10526 return; 10527 } 10528 10529 var offsetParent, offset, doc, 10530 elem = this[ 0 ], 10531 parentOffset = { top: 0, left: 0 }; 10532 10533 // position:fixed elements are offset from the viewport, which itself always has zero offset 10534 if ( jQuery.css( elem, "position" ) === "fixed" ) { 10535 10536 // Assume position:fixed implies availability of getBoundingClientRect 10537 offset = elem.getBoundingClientRect(); 10538 10539 } else { 10540 offset = this.offset(); 10541 10542 // Account for the *real* offset parent, which can be the document or its root element 10543 // when a statically positioned element is identified 10544 doc = elem.ownerDocument; 10545 offsetParent = elem.offsetParent || doc.documentElement; 10546 while ( offsetParent && 10547 ( offsetParent === doc.body || offsetParent === doc.documentElement ) && 10548 jQuery.css( offsetParent, "position" ) === "static" ) { 10549 10550 offsetParent = offsetParent.parentNode; 10551 } 10552 if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { 10553 10554 // Incorporate borders into its offset, since they are outside its content origin 10555 parentOffset = jQuery( offsetParent ).offset(); 10556 parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); 10557 parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); 10558 } 10559 } 10560 10561 // Subtract parent offsets and element margins 10562 return { 10563 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 10564 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) 10565 }; 10566 }, 10567 10568 // This method will return documentElement in the following cases: 10569 // 1) For the element inside the iframe without offsetParent, this method will return 10570 // documentElement of the parent window 10571 // 2) For the hidden or detached element 10572 // 3) For body or html element, i.e. in case of the html node - it will return itself 10573 // 10574 // but those exceptions were never presented as a real life use-cases 10575 // and might be considered as more preferable results. 10576 // 10577 // This logic, however, is not guaranteed and can change at any point in the future 10578 offsetParent: function() { 10579 return this.map( function() { 10580 var offsetParent = this.offsetParent; 10581 10582 while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { 10583 offsetParent = offsetParent.offsetParent; 10584 } 10585 10586 return offsetParent || documentElement; 10587 } ); 10588 } 10589} ); 10590 10591// Create scrollLeft and scrollTop methods 10592jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { 10593 var top = "pageYOffset" === prop; 10594 10595 jQuery.fn[ method ] = function( val ) { 10596 return access( this, function( elem, method, val ) { 10597 10598 // Coalesce documents and windows 10599 var win; 10600 if ( isWindow( elem ) ) { 10601 win = elem; 10602 } else if ( elem.nodeType === 9 ) { 10603 win = elem.defaultView; 10604 } 10605 10606 if ( val === undefined ) { 10607 return win ? win[ prop ] : elem[ method ]; 10608 } 10609 10610 if ( win ) { 10611 win.scrollTo( 10612 !top ? val : win.pageXOffset, 10613 top ? val : win.pageYOffset 10614 ); 10615 10616 } else { 10617 elem[ method ] = val; 10618 } 10619 }, method, val, arguments.length ); 10620 }; 10621} ); 10622 10623// Support: Safari <=7 - 9.1, Chrome <=37 - 49 10624// Add the top/left cssHooks using jQuery.fn.position 10625// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 10626// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 10627// getComputedStyle returns percent when specified for top/left/bottom/right; 10628// rather than make the css module depend on the offset module, just check for it here 10629jQuery.each( [ "top", "left" ], function( _i, prop ) { 10630 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, 10631 function( elem, computed ) { 10632 if ( computed ) { 10633 computed = curCSS( elem, prop ); 10634 10635 // If curCSS returns percentage, fallback to offset 10636 return rnumnonpx.test( computed ) ? 10637 jQuery( elem ).position()[ prop ] + "px" : 10638 computed; 10639 } 10640 } 10641 ); 10642} ); 10643 10644 10645// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 10646jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 10647 jQuery.each( { 10648 padding: "inner" + name, 10649 content: type, 10650 "": "outer" + name 10651 }, function( defaultExtra, funcName ) { 10652 10653 // Margin is only for outerHeight, outerWidth 10654 jQuery.fn[ funcName ] = function( margin, value ) { 10655 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 10656 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 10657 10658 return access( this, function( elem, type, value ) { 10659 var doc; 10660 10661 if ( isWindow( elem ) ) { 10662 10663 // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) 10664 return funcName.indexOf( "outer" ) === 0 ? 10665 elem[ "inner" + name ] : 10666 elem.document.documentElement[ "client" + name ]; 10667 } 10668 10669 // Get document width or height 10670 if ( elem.nodeType === 9 ) { 10671 doc = elem.documentElement; 10672 10673 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 10674 // whichever is greatest 10675 return Math.max( 10676 elem.body[ "scroll" + name ], doc[ "scroll" + name ], 10677 elem.body[ "offset" + name ], doc[ "offset" + name ], 10678 doc[ "client" + name ] 10679 ); 10680 } 10681 10682 return value === undefined ? 10683 10684 // Get width or height on the element, requesting but not forcing parseFloat 10685 jQuery.css( elem, type, extra ) : 10686 10687 // Set width or height on the element 10688 jQuery.style( elem, type, value, extra ); 10689 }, type, chainable ? margin : undefined, chainable ); 10690 }; 10691 } ); 10692} ); 10693 10694 10695jQuery.each( [ 10696 "ajaxStart", 10697 "ajaxStop", 10698 "ajaxComplete", 10699 "ajaxError", 10700 "ajaxSuccess", 10701 "ajaxSend" 10702], function( _i, type ) { 10703 jQuery.fn[ type ] = function( fn ) { 10704 return this.on( type, fn ); 10705 }; 10706} ); 10707 10708 10709 10710 10711jQuery.fn.extend( { 10712 10713 bind: function( types, data, fn ) { 10714 return this.on( types, null, data, fn ); 10715 }, 10716 unbind: function( types, fn ) { 10717 return this.off( types, null, fn ); 10718 }, 10719 10720 delegate: function( selector, types, data, fn ) { 10721 return this.on( types, selector, data, fn ); 10722 }, 10723 undelegate: function( selector, types, fn ) { 10724 10725 // ( namespace ) or ( selector, types [, fn] ) 10726 return arguments.length === 1 ? 10727 this.off( selector, "**" ) : 10728 this.off( types, selector || "**", fn ); 10729 }, 10730 10731 hover: function( fnOver, fnOut ) { 10732 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 10733 } 10734} ); 10735 10736jQuery.each( 10737 ( "blur focus focusin focusout resize scroll click dblclick " + 10738 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 10739 "change select submit keydown keypress keyup contextmenu" ).split( " " ), 10740 function( _i, name ) { 10741 10742 // Handle event binding 10743 jQuery.fn[ name ] = function( data, fn ) { 10744 return arguments.length > 0 ? 10745 this.on( name, null, data, fn ) : 10746 this.trigger( name ); 10747 }; 10748 } 10749); 10750 10751 10752 10753 10754// Support: Android <=4.0 only 10755// Make sure we trim BOM and NBSP 10756var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 10757 10758// Bind a function to a context, optionally partially applying any 10759// arguments. 10760// jQuery.proxy is deprecated to promote standards (specifically Function#bind) 10761// However, it is not slated for removal any time soon 10762jQuery.proxy = function( fn, context ) { 10763 var tmp, args, proxy; 10764 10765 if ( typeof context === "string" ) { 10766 tmp = fn[ context ]; 10767 context = fn; 10768 fn = tmp; 10769 } 10770 10771 // Quick check to determine if target is callable, in the spec 10772 // this throws a TypeError, but we will just return undefined. 10773 if ( !isFunction( fn ) ) { 10774 return undefined; 10775 } 10776 10777 // Simulated bind 10778 args = slice.call( arguments, 2 ); 10779 proxy = function() { 10780 return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); 10781 }; 10782 10783 // Set the guid of unique handler to the same of original handler, so it can be removed 10784 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 10785 10786 return proxy; 10787}; 10788 10789jQuery.holdReady = function( hold ) { 10790 if ( hold ) { 10791 jQuery.readyWait++; 10792 } else { 10793 jQuery.ready( true ); 10794 } 10795}; 10796jQuery.isArray = Array.isArray; 10797jQuery.parseJSON = JSON.parse; 10798jQuery.nodeName = nodeName; 10799jQuery.isFunction = isFunction; 10800jQuery.isWindow = isWindow; 10801jQuery.camelCase = camelCase; 10802jQuery.type = toType; 10803 10804jQuery.now = Date.now; 10805 10806jQuery.isNumeric = function( obj ) { 10807 10808 // As of jQuery 3.0, isNumeric is limited to 10809 // strings and numbers (primitives or objects) 10810 // that can be coerced to finite numbers (gh-2662) 10811 var type = jQuery.type( obj ); 10812 return ( type === "number" || type === "string" ) && 10813 10814 // parseFloat NaNs numeric-cast false positives ("") 10815 // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 10816 // subtraction forces infinities to NaN 10817 !isNaN( obj - parseFloat( obj ) ); 10818}; 10819 10820jQuery.trim = function( text ) { 10821 return text == null ? 10822 "" : 10823 ( text + "" ).replace( rtrim, "" ); 10824}; 10825 10826 10827 10828// Register as a named AMD module, since jQuery can be concatenated with other 10829// files that may use define, but not via a proper concatenation script that 10830// understands anonymous AMD modules. A named AMD is safest and most robust 10831// way to register. Lowercase jquery is used because AMD module names are 10832// derived from file names, and jQuery is normally delivered in a lowercase 10833// file name. Do this after creating the global so that if an AMD module wants 10834// to call noConflict to hide this version of jQuery, it will work. 10835 10836// Note that for maximum portability, libraries that are not jQuery should 10837// declare themselves as anonymous modules, and avoid setting a global if an 10838// AMD loader is present. jQuery is a special case. For more information, see 10839// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 10840 10841if ( typeof define === "function" && define.amd ) { 10842 define( "jquery", [], function() { 10843 return jQuery; 10844 } ); 10845} 10846 10847 10848 10849 10850var 10851 10852 // Map over jQuery in case of overwrite 10853 _jQuery = window.jQuery, 10854 10855 // Map over the $ in case of overwrite 10856 _$ = window.$; 10857 10858jQuery.noConflict = function( deep ) { 10859 if ( window.$ === jQuery ) { 10860 window.$ = _$; 10861 } 10862 10863 if ( deep && window.jQuery === jQuery ) { 10864 window.jQuery = _jQuery; 10865 } 10866 10867 return jQuery; 10868}; 10869 10870// Expose jQuery and $ identifiers, even in AMD 10871// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 10872// and CommonJS for browser emulators (#13566) 10873if ( typeof noGlobal === "undefined" ) { 10874 window.jQuery = window.$ = jQuery; 10875} 10876 10877 10878
10879 10880return jQuery; 10881} );
vendor: 17,162 bytes, lines 10881-11372
10881 10882 10883/** 10884 * Copyright (c) 2014-present, Facebook, Inc. 10885 * 10886 * This source code is licensed under the MIT license found in the 10887 * LICENSE file in the root directory of this source tree. 10888 */ 10889 10890var runtime = (function (exports) { 10891 "use strict"; 10892 10893 var Op = Object.prototype; 10894 var hasOwn = Op.hasOwnProperty; 10895 var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }; 10896 var undefined; // More compressible than void 0. 10897 var $Symbol = typeof Symbol === "function" ? Symbol : {}; 10898 var iteratorSymbol = $Symbol.iterator || "@@iterator"; 10899 var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; 10900 var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; 10901 10902 function define(obj, key, value) { 10903 Object.defineProperty(obj, key, { 10904 value: value, 10905 enumerable: true, 10906 configurable: true, 10907 writable: true 10908 }); 10909 return obj[key]; 10910 } 10911 try { 10912 // IE 8 has a broken Object.defineProperty that only works on DOM objects. 10913 define({}, ""); 10914 } catch (err) { 10915 define = function(obj, key, value) { 10916 return obj[key] = value; 10917 }; 10918 } 10919 10920 function wrap(innerFn, outerFn, self, tryLocsList) { 10921 // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. 10922 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; 10923 var generator = Object.create(protoGenerator.prototype); 10924 var context = new Context(tryLocsList || []); 10925 10926 // The ._invoke method unifies the implementations of the .next, 10927 // .throw, and .return methods. 10928 defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }); 10929 10930 return generator; 10931 } 10932 exports.wrap = wrap; 10933 10934 // Try/catch helper to minimize deoptimizations. Returns a completion 10935 // record like context.tryEntries[i].completion. This interface could 10936 // have been (and was previously) designed to take a closure to be 10937 // invoked without arguments, but in all the cases we care about we 10938 // already have an existing method we want to call, so there's no need 10939 // to create a new function object. We can even get away with assuming 10940 // the method takes exactly one argument, since that happens to be true 10941 // in every case, so we don't have to touch the arguments object. The 10942 // only additional allocation required is the completion record, which 10943 // has a stable shape and so hopefully should be cheap to allocate. 10944 function tryCatch(fn, obj, arg) { 10945 try { 10946 return { type: "normal", arg: fn.call(obj, arg) }; 10947 } catch (err) { 10948 return { type: "throw", arg: err }; 10949 } 10950 } 10951 10952 var GenStateSuspendedStart = "suspendedStart"; 10953 var GenStateSuspendedYield = "suspendedYield"; 10954 var GenStateExecuting = "executing"; 10955 var GenStateCompleted = "completed"; 10956 10957 // Returning this object from the innerFn has the same effect as 10958 // breaking out of the dispatch switch statement. 10959 var ContinueSentinel = {}; 10960 10961 // Dummy constructor functions that we use as the .constructor and 10962 // .constructor.prototype properties for functions that return Generator 10963 // objects. For full spec compliance, you may wish to configure your 10964 // minifier not to mangle the names of these two functions. 10965 function Generator() {} 10966 function GeneratorFunction() {} 10967 function GeneratorFunctionPrototype() {} 10968 10969 // This is a polyfill for %IteratorPrototype% for environments that 10970 // don't natively support it. 10971 var IteratorPrototype = {}; 10972 define(IteratorPrototype, iteratorSymbol, function () { 10973 return this; 10974 }); 10975 10976 var getProto = Object.getPrototypeOf; 10977 var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); 10978 if (NativeIteratorPrototype && 10979 NativeIteratorPrototype !== Op && 10980 hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { 10981 // This environment has a native %IteratorPrototype%; use it instead 10982 // of the polyfill. 10983 IteratorPrototype = NativeIteratorPrototype; 10984 } 10985 10986 var Gp = GeneratorFunctionPrototype.prototype = 10987 Generator.prototype = Object.create(IteratorPrototype); 10988 GeneratorFunction.prototype = GeneratorFunctionPrototype; 10989 defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: true }); 10990 defineProperty( 10991 GeneratorFunctionPrototype, 10992 "constructor", 10993 { value: GeneratorFunction, configurable: true } 10994 ); 10995 GeneratorFunction.displayName = define( 10996 GeneratorFunctionPrototype, 10997 toStringTagSymbol, 10998 "GeneratorFunction" 10999 ); 11000 11001 // Helper for defining the .next, .throw, and .return methods of the 11002 // Iterator interface in terms of a single ._invoke method. 11003 function defineIteratorMethods(prototype) { 11004 ["next", "throw", "return"].forEach(function(method) { 11005 define(prototype, method, function(arg) { 11006 return this._invoke(method, arg); 11007 }); 11008 }); 11009 } 11010 11011 exports.isGeneratorFunction = function(genFun) { 11012 var ctor = typeof genFun === "function" && genFun.constructor; 11013 return ctor 11014 ? ctor === GeneratorFunction || 11015 // For the native GeneratorFunction constructor, the best we can 11016 // do is to check its .name property. 11017 (ctor.displayName || ctor.name) === "GeneratorFunction" 11018 : false; 11019 }; 11020 11021 exports.mark = function(genFun) { 11022 if (Object.setPrototypeOf) { 11023 Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); 11024 } else { 11025 genFun.__proto__ = GeneratorFunctionPrototype; 11026 define(genFun, toStringTagSymbol, "GeneratorFunction"); 11027 } 11028 genFun.prototype = Object.create(Gp); 11029 return genFun; 11030 }; 11031 11032 // Within the body of any async function, `await x` is transformed to 11033 // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test 11034 // `hasOwn.call(value, "__await")` to determine if the yielded value is 11035 // meant to be awaited. 11036 exports.awrap = function(arg) { 11037 return { __await: arg }; 11038 }; 11039 11040 function AsyncIterator(generator, PromiseImpl) { 11041 function invoke(method, arg, resolve, reject) { 11042 var record = tryCatch(generator[method], generator, arg); 11043 if (record.type === "throw") { 11044 reject(record.arg); 11045 } else { 11046 var result = record.arg; 11047 var value = result.value; 11048 if (value && 11049 typeof value === "object" && 11050 hasOwn.call(value, "__await")) { 11051 return PromiseImpl.resolve(value.__await).then(function(value) { 11052 invoke("next", value, resolve, reject); 11053 }, function(err) { 11054 invoke("throw", err, resolve, reject); 11055 }); 11056 } 11057 11058 return PromiseImpl.resolve(value).then(function(unwrapped) { 11059 // When a yielded Promise is resolved, its final value becomes 11060 // the .value of the Promise<{value,done}> result for the 11061 // current iteration. 11062 result.value = unwrapped; 11063 resolve(result); 11064 }, function(error) { 11065 // If a rejected Promise was yielded, throw the rejection back 11066 // into the async generator function so it can be handled there. 11067 return invoke("throw", error, resolve, reject); 11068 }); 11069 } 11070 } 11071 11072 var previousPromise; 11073 11074 function enqueue(method, arg) { 11075 function callInvokeWithMethodAndArg() { 11076 return new PromiseImpl(function(resolve, reject) { 11077 invoke(method, arg, resolve, reject); 11078 }); 11079 } 11080 11081 return previousPromise = 11082 // If enqueue has been called before, then we want to wait until 11083 // all previous Promises have been resolved before calling invoke, 11084 // so that results are always delivered in the correct order. If 11085 // enqueue has not been called before, then it is important to 11086 // call invoke immediately, without waiting on a callback to fire, 11087 // so that the async generator function has the opportunity to do 11088 // any necessary setup in a predictable way. This predictability 11089 // is why the Promise constructor synchronously invokes its 11090 // executor callback, and why async functions synchronously 11091 // execute code before the first await. Since we implement simple 11092 // async functions in terms of async generators, it is especially 11093 // important to get this right, even though it requires care. 11094 previousPromise ? previousPromise.then( 11095 callInvokeWithMethodAndArg, 11096 // Avoid propagating failures to Promises returned by later 11097 // invocations of the iterator. 11098 callInvokeWithMethodAndArg 11099 ) : callInvokeWithMethodAndArg(); 11100 } 11101 11102 // Define the unified helper method that is used to implement .next, 11103 // .throw, and .return (see defineIteratorMethods). 11104 defineProperty(this, "_invoke", { value: enqueue }); 11105 } 11106 11107 defineIteratorMethods(AsyncIterator.prototype); 11108 define(AsyncIterator.prototype, asyncIteratorSymbol, function () { 11109 return this; 11110 }); 11111 exports.AsyncIterator = AsyncIterator; 11112 11113 // Note that simple async functions are implemented on top of 11114 // AsyncIterator objects; they just return a Promise for the value of 11115 // the final result produced by the iterator. 11116 exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) { 11117 if (PromiseImpl === void 0) PromiseImpl = Promise; 11118 11119 var iter = new AsyncIterator( 11120 wrap(innerFn, outerFn, self, tryLocsList), 11121 PromiseImpl 11122 ); 11123 11124 return exports.isGeneratorFunction(outerFn) 11125 ? iter // If outerFn is a generator, return the full iterator. 11126 : iter.next().then(function(result) { 11127 return result.done ? result.value : iter.next(); 11128 }); 11129 }; 11130 11131 function makeInvokeMethod(innerFn, self, context) { 11132 var state = GenStateSuspendedStart; 11133 11134 return function invoke(method, arg) { 11135 if (state === GenStateExecuting) { 11136 throw new Error("Generator is already running"); 11137 } 11138 11139 if (state === GenStateCompleted) { 11140 if (method === "throw") { 11141 throw arg; 11142 } 11143 11144 // Be forgiving, per 25.3.3.3.3 of the spec: 11145 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume 11146 return doneResult(); 11147 } 11148 11149 context.method = method; 11150 context.arg = arg; 11151 11152 while (true) { 11153 var delegate = context.delegate; 11154 if (delegate) { 11155 var delegateResult = maybeInvokeDelegate(delegate, context); 11156 if (delegateResult) { 11157 if (delegateResult === ContinueSentinel) continue; 11158 return delegateResult; 11159 } 11160 } 11161 11162 if (context.method === "next") { 11163 // Setting context._sent for legacy support of Babel's 11164 // function.sent implementation. 11165 context.sent = context._sent = context.arg; 11166 11167 } else if (context.method === "throw") { 11168 if (state === GenStateSuspendedStart) { 11169 state = GenStateCompleted; 11170 throw context.arg; 11171 } 11172 11173 context.dispatchException(context.arg); 11174 11175 } else if (context.method === "return") { 11176 context.abrupt("return", context.arg); 11177 } 11178 11179 state = GenStateExecuting; 11180 11181 var record = tryCatch(innerFn, self, context); 11182 if (record.type === "normal") { 11183 // If an exception is thrown from innerFn, we leave state === 11184 // GenStateExecuting and loop back for another invocation. 11185 state = context.done 11186 ? GenStateCompleted 11187 : GenStateSuspendedYield; 11188 11189 if (record.arg === ContinueSentinel) { 11190 continue; 11191 } 11192 11193 return { 11194 value: record.arg, 11195 done: context.done 11196 }; 11197 11198 } else if (record.type === "throw") { 11199 state = GenStateCompleted; 11200 // Dispatch the exception by looping back around to the 11201 // context.dispatchException(context.arg) call above. 11202 context.method = "throw"; 11203 context.arg = record.arg; 11204 } 11205 } 11206 }; 11207 } 11208 11209 // Call delegate.iterator[context.method](context.arg) and handle the 11210 // result, either by returning a { value, done } result from the 11211 // delegate iterator, or by modifying context.method and context.arg, 11212 // setting context.delegate to null, and returning the ContinueSentinel. 11213 function maybeInvokeDelegate(delegate, context) { 11214 var methodName = context.method; 11215 var method = delegate.iterator[methodName]; 11216 if (method === undefined) { 11217 // A .throw or .return when the delegate iterator has no .throw 11218 // method, or a missing .next mehtod, always terminate the 11219 // yield* loop. 11220 context.delegate = null; 11221 11222 // Note: ["return"] must be used for ES3 parsing compatibility. 11223 if (methodName === "throw" && delegate.iterator["return"]) { 11224 // If the delegate iterator has a return method, give it a 11225 // chance to clean up. 11226 context.method = "return"; 11227 context.arg = undefined; 11228 maybeInvokeDelegate(delegate, context); 11229 11230 if (context.method === "throw") { 11231 // If maybeInvokeDelegate(context) changed context.method from 11232 // "return" to "throw", let that override the TypeError below. 11233 return ContinueSentinel; 11234 } 11235 } 11236 if (methodName !== "return") { 11237 context.method = "throw"; 11238 context.arg = new TypeError( 11239 "The iterator does not provide a '" + methodName + "' method"); 11240 } 11241 11242 return ContinueSentinel; 11243 } 11244 11245 var record = tryCatch(method, delegate.iterator, context.arg); 11246 11247 if (record.type === "throw") { 11248 context.method = "throw"; 11249 context.arg = record.arg; 11250 context.delegate = null; 11251 return ContinueSentinel; 11252 } 11253 11254 var info = record.arg; 11255 11256 if (! info) { 11257 context.method = "throw"; 11258 context.arg = new TypeError("iterator result is not an object"); 11259 context.delegate = null; 11260 return ContinueSentinel; 11261 } 11262 11263 if (info.done) { 11264 // Assign the result of the finished delegate to the temporary 11265 // variable specified by delegate.resultName (see delegateYield). 11266 context[delegate.resultName] = info.value; 11267 11268 // Resume execution at the desired location (see delegateYield). 11269 context.next = delegate.nextLoc; 11270 11271 // If context.method was "throw" but the delegate handled the 11272 // exception, let the outer generator proceed normally. If 11273 // context.method was "next", forget context.arg since it has been 11274 // "consumed" by the delegate iterator. If context.method was 11275 // "return", allow the original .return call to continue in the 11276 // outer generator. 11277 if (context.method !== "return") { 11278 context.method = "next"; 11279 context.arg = undefined; 11280 } 11281 11282 } else { 11283 // Re-yield the result returned by the delegate method. 11284 return info; 11285 } 11286 11287 // The delegate iterator is finished, so forget it and continue with 11288 // the outer generator. 11289 context.delegate = null; 11290 return ContinueSentinel; 11291 } 11292 11293 // Define Generator.prototype.{next,throw,return} in terms of the 11294 // unified ._invoke helper method. 11295 defineIteratorMethods(Gp); 11296 11297 define(Gp, toStringTagSymbol, "Generator"); 11298 11299 // A Generator should always return itself as the iterator object when the 11300 // @@iterator function is called on it. Some browsers' implementations of the 11301 // iterator prototype chain incorrectly implement this, causing the Generator 11302 // object to not be returned from this call. This ensures that doesn't happen. 11303 // See https://github.com/facebook/regenerator/issues/274 for more details. 11304 define(Gp, iteratorSymbol, function() { 11305 return this; 11306 }); 11307 11308 define(Gp, "toString", function() { 11309 return "[object Generator]"; 11310 }); 11311 11312 function pushTryEntry(locs) { 11313 var entry = { tryLoc: locs[0] }; 11314 11315 if (1 in locs) { 11316 entry.catchLoc = locs[1]; 11317 } 11318 11319 if (2 in locs) { 11320 entry.finallyLoc = locs[2]; 11321 entry.afterLoc = locs[3]; 11322 } 11323 11324 this.tryEntries.push(entry); 11325 } 11326 11327 function resetTryEntry(entry) { 11328 var record = entry.completion || {}; 11329 record.type = "normal"; 11330 delete record.arg; 11331 entry.completion = record; 11332 } 11333 11334 function Context(tryLocsList) { 11335 // The root entry object (effectively a try statement without a catch 11336 // or a finally block) gives us a place to store values thrown from 11337 // locations where there is no enclosing try statement. 11338 this.tryEntries = [{ tryLoc: "root" }]; 11339 tryLocsList.forEach(pushTryEntry, this); 11340 this.reset(true); 11341 } 11342 11343 exports.keys = function(val) { 11344 var object = Object(val); 11345 var keys = []; 11346 for (var key in object) { 11347 keys.push(key); 11348 } 11349 keys.reverse(); 11350 11351 // Rather than returning an object with a next method, we keep 11352 // things simple and return the next function itself. 11353 return function next() { 11354 while (keys.length) { 11355 var key = keys.pop(); 11356 if (key in object) { 11357 next.value = key; 11358 next.done = false; 11359 return next; 11360 } 11361 } 11362 11363 // To avoid creating an additional object, we just hang the .value 11364 // and .done properties off the next function object itself. This 11365 // also ensures that the minifier will not anonymize the function. 11366 next.done = true; 11367 return next; 11368 }; 11369 }; 11370 11371 function values(iterable) { 11372 if (iterable
11372 || iterable === ""
vendor: 8,038 bytes, lines 11372-11645
11372) { 11373 var iteratorMethod = iterable[iteratorSymbol]; 11374 if (iteratorMethod) { 11375 return iteratorMethod.call(iterable); 11376 } 11377 11378 if (typeof iterable.next === "function") { 11379 return iterable; 11380 } 11381 11382 if (!isNaN(iterable.length)) { 11383 var i = -1, next = function next() { 11384 while (++i < iterable.length) { 11385 if (hasOwn.call(iterable, i)) { 11386 next.value = iterable[i]; 11387 next.done = false; 11388 return next; 11389 } 11390 } 11391 11392 next.value = undefined; 11393 next.done = true; 11394 11395 return next; 11396 }; 11397 11398 return next.next = next; 11399 } 11400 } 11401 11402 throw new TypeError(typeof iterable + " is not iterable"); 11403 } 11404 exports.values = values; 11405 11406 function doneResult() { 11407 return { value: undefined, done: true }; 11408 } 11409 11410 Context.prototype = { 11411 constructor: Context, 11412 11413 reset: function(skipTempReset) { 11414 this.prev = 0; 11415 this.next = 0; 11416 // Resetting context._sent for legacy support of Babel's 11417 // function.sent implementation. 11418 this.sent = this._sent = undefined; 11419 this.done = false; 11420 this.delegate = null; 11421 11422 this.method = "next"; 11423 this.arg = undefined; 11424 11425 this.tryEntries.forEach(resetTryEntry); 11426 11427 if (!skipTempReset) { 11428 for (var name in this) { 11429 // Not sure about the optimal order of these conditions: 11430 if (name.charAt(0) === "t" && 11431 hasOwn.call(this, name) && 11432 !isNaN(+name.slice(1))) { 11433 this[name] = undefined; 11434 } 11435 } 11436 } 11437 }, 11438 11439 stop: function() { 11440 this.done = true; 11441 11442 var rootEntry = this.tryEntries[0]; 11443 var rootRecord = rootEntry.completion; 11444 if (rootRecord.type === "throw") { 11445 throw rootRecord.arg; 11446 } 11447 11448 return this.rval; 11449 }, 11450 11451 dispatchException: function(exception) { 11452 if (this.done) { 11453 throw exception; 11454 } 11455 11456 var context = this; 11457 function handle(loc, caught) { 11458 record.type = "throw"; 11459 record.arg = exception; 11460 context.next = loc; 11461 11462 if (caught) { 11463 // If the dispatched exception was caught by a catch block, 11464 // then let that catch block handle the exception normally. 11465 context.method = "next"; 11466 context.arg = undefined; 11467 } 11468 11469 return !! caught; 11470 } 11471 11472 for (var i = this.tryEntries.length - 1; i >= 0; --i) { 11473 var entry = this.tryEntries[i]; 11474 var record = entry.completion; 11475 11476 if (entry.tryLoc === "root") { 11477 // Exception thrown outside of any try block that could handle 11478 // it, so set the completion value of the entire function to 11479 // throw the exception. 11480 return handle("end"); 11481 } 11482 11483 if (entry.tryLoc <= this.prev) { 11484 var hasCatch = hasOwn.call(entry, "catchLoc"); 11485 var hasFinally = hasOwn.call(entry, "finallyLoc"); 11486 11487 if (hasCatch && hasFinally) { 11488 if (this.prev < entry.catchLoc) { 11489 return handle(entry.catchLoc, true); 11490 } else if (this.prev < entry.finallyLoc) { 11491 return handle(entry.finallyLoc); 11492 } 11493 11494 } else if (hasCatch) { 11495 if (this.prev < entry.catchLoc) { 11496 return handle(entry.catchLoc, true); 11497 } 11498 11499 } else if (hasFinally) { 11500 if (this.prev < entry.finallyLoc) { 11501 return handle(entry.finallyLoc); 11502 } 11503 11504 } else { 11505 throw new Error("try statement without catch or finally"); 11506 } 11507 } 11508 } 11509 }, 11510 11511 abrupt: function(type, arg) { 11512 for (var i = this.tryEntries.length - 1; i >= 0; --i) { 11513 var entry = this.tryEntries[i]; 11514 if (entry.tryLoc <= this.prev && 11515 hasOwn.call(entry, "finallyLoc") && 11516 this.prev < entry.finallyLoc) { 11517 var finallyEntry = entry; 11518 break; 11519 } 11520 } 11521 11522 if (finallyEntry && 11523 (type === "break" || 11524 type === "continue") && 11525 finallyEntry.tryLoc <= arg && 11526 arg <= finallyEntry.finallyLoc) { 11527 // Ignore the finally entry if control is not jumping to a 11528 // location outside the try/catch block. 11529 finallyEntry = null; 11530 } 11531 11532 var record = finallyEntry ? finallyEntry.completion : {}; 11533 record.type = type; 11534 record.arg = arg; 11535 11536 if (finallyEntry) { 11537 this.method = "next"; 11538 this.next = finallyEntry.finallyLoc; 11539 return ContinueSentinel; 11540 } 11541 11542 return this.complete(record); 11543 }, 11544 11545 complete: function(record, afterLoc) { 11546 if (record.type === "throw") { 11547 throw record.arg; 11548 } 11549 11550 if (record.type === "break" || 11551 record.type === "continue") { 11552 this.next = record.arg; 11553 } else if (record.type === "return") { 11554 this.rval = this.arg = record.arg; 11555 this.method = "return"; 11556 this.next = "end"; 11557 } else if (record.type === "normal" && afterLoc) { 11558 this.next = afterLoc; 11559 } 11560 11561 return ContinueSentinel; 11562 }, 11563 11564 finish: function(finallyLoc) { 11565 for (var i = this.tryEntries.length - 1; i >= 0; --i) { 11566 var entry = this.tryEntries[i]; 11567 if (entry.finallyLoc === finallyLoc) { 11568 this.complete(entry.completion, entry.afterLoc); 11569 resetTryEntry(entry); 11570 return ContinueSentinel; 11571 } 11572 } 11573 }, 11574 11575 "catch": function(tryLoc) { 11576 for (var i = this.tryEntries.length - 1; i >= 0; --i) { 11577 var entry = this.tryEntries[i]; 11578 if (entry.tryLoc === tryLoc) { 11579 var record = entry.completion; 11580 if (record.type === "throw") { 11581 var thrown = record.arg; 11582 resetTryEntry(entry); 11583 } 11584 return thrown; 11585 } 11586 } 11587 11588 // The context.catch method must only be called with a location 11589 // argument that corresponds to a known catch block. 11590 throw new Error("illegal catch attempt"); 11591 }, 11592 11593 delegateYield: function(iterable, resultName, nextLoc) { 11594 this.delegate = { 11595 iterator: values(iterable), 11596 resultName: resultName, 11597 nextLoc: nextLoc 11598 }; 11599 11600 if (this.method === "next") { 11601 // Deliberately forget the last sent value so that we don't 11602 // accidentally pass it on to the delegate. 11603 this.arg = undefined; 11604 } 11605 11606 return ContinueSentinel; 11607 } 11608 }; 11609 11610 // Regardless of whether this script is executing as a CommonJS module 11611 // or not, return the runtime object so that we can declare the variable 11612 // regeneratorRuntime in the outer scope, which allows this module to be 11613 // injected easily by `bin/regenerator --include-runtime script.js`. 11614 return exports; 11615 11616}( 11617 // If this script is executing as a CommonJS module, use module.exports 11618 // as the regeneratorRuntime namespace. Otherwise create a new empty 11619 // object. Either way, the resulting object will be used to initialize 11620 // the regeneratorRuntime variable at the top of this file. 11621 typeof module === "object" ? module.exports : {} 11622)); 11623 11624try { 11625 regeneratorRuntime = runtime; 11626} catch (accidentalStrictMode) { 11627 // This module should not be running in strict mode, so the above 11628 // assignment should always work unless something is misconfigured. Just 11629 // in case runtime.js accidentally runs in strict mode, in modern engines 11630 // we can explicitly access globalThis. In older engines we can escape 11631 // strict mode using a global Function call. This could conceivably fail 11632 // if a Content Security Policy forbids using Function, but in that case 11633 // the proper solution is to fix the accidental strict mode problem. If 11634 // you've misconfigured your bundler to force strict mode and applied a 11635 // CSP to forbid Function, and you're not willing to fix either of those 11636 // problems, please detail your unique predicament in a GitHub issue. 11637 if (typeof globalThis === "object") { 11638 globalThis.regeneratorRuntime = runtime; 11639 } else { 11640 Function("r", "regeneratorRuntime = r")(runtime); 11641 } 11642} 11643 11644/** 11645 *
11645Swiper 10.2.0 11646 * Most modern mobile touch slider and framework with hardware accelerated transitions 11647 * https://swiperjs.com 11648 * 11649 * Copyright 2014-2023 Vladimir Kharlampidi 11650 * 11651 * Released under the MIT License 11652 * 11653 * Released on: August 17, 2023 11654 */ 11655 11656var Swiper = (function () { 11657 'use strict'; 11658 11659 /** 11660 * SSR Window 4.0.2 11661 * Better handling for window object in SSR environment 11662 * https://github.com/nolimits4web/ssr-window 11663 * 11664 * Copyright 2021, Vladimir Kharlampidi 11665 * 11666 * Licensed under MIT 11667 * 11668 * Released on: December 13, 2021 11669 */ 11670 /* eslint-disable no-param-reassign */ 11671 function isObject$1(obj) { 11672 return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object; 11673 }
vendor: 9,216 bytes, lines 11674-11986
11674 function extend$1(target, src) { 11675 if (target === void 0) { 11676 target = {}; 11677 } 11678 if (src === void 0) { 11679 src = {}; 11680 } 11681 Object.keys(src).forEach(key => { 11682 if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject$1(src[key]) && isObject$1(target[key]) && Object.keys(src[key]).length > 0) { 11683 extend$1(target[key], src[key]); 11684 } 11685 }); 11686 } 11687 const ssrDocument = { 11688 body: {}, 11689 addEventListener() {}, 11690 removeEventListener() {}, 11691 activeElement: { 11692 blur() {}, 11693 nodeName: '' 11694 }, 11695 querySelector() { 11696 return null; 11697 }, 11698 querySelectorAll() { 11699 return []; 11700 }, 11701 getElementById() { 11702 return null; 11703 }, 11704 createEvent() { 11705 return { 11706 initEvent() {} 11707 }; 11708 }, 11709 createElement() { 11710 return { 11711 children: [], 11712 childNodes: [], 11713 style: {}, 11714 setAttribute() {}, 11715 getElementsByTagName() { 11716 return []; 11717 } 11718 }; 11719 }, 11720 createElementNS() { 11721 return {}; 11722 }, 11723 importNode() { 11724 return null; 11725 }, 11726 location: { 11727 hash: '', 11728 host: '', 11729 hostname: '', 11730 href: '', 11731 origin: '', 11732 pathname: '', 11733 protocol: '', 11734 search: '' 11735 } 11736 }; 11737 function getDocument() { 11738 const doc = typeof document !== 'undefined' ? document : {}; 11739 extend$1(doc, ssrDocument); 11740 return doc; 11741 } 11742 const ssrWindow = { 11743 document: ssrDocument, 11744 navigator: { 11745 userAgent: '' 11746 }, 11747 location: { 11748 hash: '', 11749 host: '', 11750 hostname: '', 11751 href: '', 11752 origin: '', 11753 pathname: '', 11754 protocol: '', 11755 search: '' 11756 }, 11757 history: { 11758 replaceState() {}, 11759 pushState() {}, 11760 go() {}, 11761 back() {} 11762 }, 11763 CustomEvent: function CustomEvent() { 11764 return this; 11765 }, 11766 addEventListener() {}, 11767 removeEventListener() {}, 11768 getComputedStyle() { 11769 return { 11770 getPropertyValue() { 11771 return ''; 11772 } 11773 }; 11774 }, 11775 Image() {}, 11776 Date() {}, 11777 screen: {}, 11778 setTimeout() {}, 11779 clearTimeout() {}, 11780 matchMedia() { 11781 return {}; 11782 }, 11783 requestAnimationFrame(callback) { 11784 if (typeof setTimeout === 'undefined') { 11785 callback(); 11786 return null; 11787 } 11788 return setTimeout(callback, 0); 11789 }, 11790 cancelAnimationFrame(id) { 11791 if (typeof setTimeout === 'undefined') { 11792 return; 11793 } 11794 clearTimeout(id); 11795 } 11796 }; 11797 function getWindow() { 11798 const win = typeof window !== 'undefined' ? window : {}; 11799 extend$1(win, ssrWindow); 11800 return win; 11801 } 11802 11803 function deleteProps(obj) { 11804 const object = obj; 11805 Object.keys(object).forEach(key => { 11806 try { 11807 object[key] = null; 11808 } catch (e) { 11809 // no getter for object 11810 } 11811 try { 11812 delete object[key]; 11813 } catch (e) { 11814 // something got wrong 11815 } 11816 }); 11817 } 11818 function nextTick(callback, delay) { 11819 if (delay === void 0) { 11820 delay = 0; 11821 } 11822 return setTimeout(callback, delay); 11823 } 11824 function now() { 11825 return Date.now(); 11826 } 11827 function getComputedStyle$1(el) { 11828 const window = getWindow(); 11829 let style; 11830 if (window.getComputedStyle) { 11831 style = window.getComputedStyle(el, null); 11832 } 11833 if (!style && el.currentStyle) { 11834 style = el.currentStyle; 11835 } 11836 if (!style) { 11837 style = el.style; 11838 } 11839 return style; 11840 } 11841 function getTranslate(el, axis) { 11842 if (axis === void 0) { 11843 axis = 'x'; 11844 } 11845 const window = getWindow(); 11846 let matrix; 11847 let curTransform; 11848 let transformMatrix; 11849 const curStyle = getComputedStyle$1(el); 11850 if (window.WebKitCSSMatrix) { 11851 curTransform = curStyle.transform || curStyle.webkitTransform; 11852 if (curTransform.split(',').length > 6) { 11853 curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', '); 11854 } 11855 // Some old versions of Webkit choke when 'none' is passed; pass 11856 // empty string instead in this case 11857 transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); 11858 } else { 11859 transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); 11860 matrix = transformMatrix.toString().split(','); 11861 } 11862 if (axis === 'x') { 11863 // Latest Chrome and webkits Fix 11864 if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; 11865 // Crazy IE10 Matrix 11866 else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); 11867 // Normal Browsers 11868 else curTransform = parseFloat(matrix[4]); 11869 } 11870 if (axis === 'y') { 11871 // Latest Chrome and webkits Fix 11872 if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; 11873 // Crazy IE10 Matrix 11874 else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); 11875 // Normal Browsers 11876 else curTransform = parseFloat(matrix[5]); 11877 } 11878 return curTransform || 0; 11879 } 11880 function isObject(o) { 11881 return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object'; 11882 } 11883 function isNode(node) { 11884 // eslint-disable-next-line 11885 if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') { 11886 return node instanceof HTMLElement; 11887 } 11888 return node && (node.nodeType === 1 || node.nodeType === 11); 11889 } 11890 function extend() { 11891 const to = Object(arguments.length <= 0 ? undefined : arguments[0]); 11892 const noExtend = ['__proto__', 'constructor', 'prototype']; 11893 for (let i = 1; i < arguments.length; i += 1) { 11894 const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i]; 11895 if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) { 11896 const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0); 11897 for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { 11898 const nextKey = keysArray[nextIndex]; 11899 const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); 11900 if (desc !== undefined && desc.enumerable) { 11901 if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) { 11902 if (nextSource[nextKey].__swiper__) { 11903 to[nextKey] = nextSource[nextKey]; 11904 } else { 11905 extend(to[nextKey], nextSource[nextKey]); 11906 } 11907 } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) { 11908 to[nextKey] = {}; 11909 if (nextSource[nextKey].__swiper__) { 11910 to[nextKey] = nextSource[nextKey]; 11911 } else { 11912 extend(to[nextKey], nextSource[nextKey]); 11913 } 11914 } else { 11915 to[nextKey] = nextSource[nextKey]; 11916 } 11917 } 11918 } 11919 } 11920 } 11921 return to; 11922 } 11923 function setCSSProperty(el, varName, varValue) { 11924 el.style.setProperty(varName, varValue); 11925 } 11926 function animateCSSModeScroll(_ref) { 11927 let { 11928 swiper, 11929 targetPosition, 11930 side 11931 } = _ref; 11932 const window = getWindow(); 11933 const startPosition = -swiper.translate; 11934 let startTime = null; 11935 let time; 11936 const duration = swiper.params.speed; 11937 swiper.wrapperEl.style.scrollSnapType = 'none'; 11938 window.cancelAnimationFrame(swiper.cssModeFrameID); 11939 const dir = targetPosition > startPosition ? 'next' : 'prev'; 11940 const isOutOfBound = (current, target) => { 11941 return dir === 'next' && current >= target || dir === 'prev' && current <= target; 11942 }; 11943 const animate = () => { 11944 time = new Date().getTime(); 11945 if (startTime === null) { 11946 startTime = time; 11947 } 11948 const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); 11949 const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2; 11950 let currentPosition = startPosition + easeProgress * (targetPosition - startPosition); 11951 if (isOutOfBound(currentPosition, targetPosition)) { 11952 currentPosition = targetPosition; 11953 } 11954 swiper.wrapperEl.scrollTo({ 11955 [side]: currentPosition 11956 }); 11957 if (isOutOfBound(currentPosition, targetPosition)) { 11958 swiper.wrapperEl.style.overflow = 'hidden'; 11959 swiper.wrapperEl.style.scrollSnapType = ''; 11960 setTimeout(() => { 11961 swiper.wrapperEl.style.overflow = ''; 11962 swiper.wrapperEl.scrollTo({ 11963 [side]: currentPosition 11964 }); 11965 }); 11966 window.cancelAnimationFrame(swiper.cssModeFrameID); 11967 return; 11968 } 11969 swiper.cssModeFrameID = window.requestAnimationFrame(animate); 11970 }; 11971 animate(); 11972 } 11973 function getSlideTransformEl(slideEl) { 11974 return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl; 11975 } 11976 function elementChildren(element, selector) { 11977 if (selector === void 0) { 11978 selector = ''; 11979 } 11980 return [...element.children].filter(el => el.matches(selector)); 11981 } 11982 function createElement(tag, classes) { 11983 if (classes === void 0) { 11984 classes = []; 11985 } 11986 const el = document.createElement(tag);
vendor: 3,443 bytes, lines 11987-12094
11987 el.classList.add(...(Array.isArray(classes) ? classes : [classes])); 11988 return el; 11989 } 11990 function elementOffset(el) { 11991 const window = getWindow(); 11992 const document = getDocument(); 11993 const box = el.getBoundingClientRect(); 11994 const body = document.body; 11995 const clientTop = el.clientTop || body.clientTop || 0; 11996 const clientLeft = el.clientLeft || body.clientLeft || 0; 11997 const scrollTop = el === window ? window.scrollY : el.scrollTop; 11998 const scrollLeft = el === window ? window.scrollX : el.scrollLeft; 11999 return { 12000 top: box.top + scrollTop - clientTop, 12001 left: box.left + scrollLeft - clientLeft 12002 }; 12003 } 12004 function elementPrevAll(el, selector) { 12005 const prevEls = []; 12006 while (el.previousElementSibling) { 12007 const prev = el.previousElementSibling; // eslint-disable-line 12008 if (selector) { 12009 if (prev.matches(selector)) prevEls.push(prev); 12010 } else prevEls.push(prev); 12011 el = prev; 12012 } 12013 return prevEls; 12014 } 12015 function elementNextAll(el, selector) { 12016 const nextEls = []; 12017 while (el.nextElementSibling) { 12018 const next = el.nextElementSibling; // eslint-disable-line 12019 if (selector) { 12020 if (next.matches(selector)) nextEls.push(next); 12021 } else nextEls.push(next); 12022 el = next; 12023 } 12024 return nextEls; 12025 } 12026 function elementStyle(el, prop) { 12027 const window = getWindow(); 12028 return window.getComputedStyle(el, null).getPropertyValue(prop); 12029 } 12030 function elementIndex(el) { 12031 let child = el; 12032 let i; 12033 if (child) { 12034 i = 0; 12035 // eslint-disable-next-line 12036 while ((child = child.previousSibling) !== null) { 12037 if (child.nodeType === 1) i += 1; 12038 } 12039 return i; 12040 } 12041 return undefined; 12042 } 12043 function elementParents(el, selector) { 12044 const parents = []; // eslint-disable-line 12045 let parent = el.parentElement; // eslint-disable-line 12046 while (parent) { 12047 if (selector) { 12048 if (parent.matches(selector)) parents.push(parent); 12049 } else { 12050 parents.push(parent); 12051 } 12052 parent = parent.parentElement; 12053 } 12054 return parents; 12055 } 12056 function elementTransitionEnd(el, callback) { 12057 function fireCallBack(e) { 12058 if (e.target !== el) return; 12059 callback.call(el, e); 12060 el.removeEventListener('transitionend', fireCallBack); 12061 } 12062 if (callback) { 12063 el.addEventListener('transitionend', fireCallBack); 12064 } 12065 } 12066 function elementOuterSize(el, size, includeMargins) { 12067 const window = getWindow(); 12068 if (includeMargins) { 12069 return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom')); 12070 } 12071 return el.offsetWidth; 12072 } 12073 12074 let support; 12075 function calcSupport() { 12076 const window = getWindow(); 12077 const document = getDocument(); 12078 return { 12079 smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style, 12080 touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch) 12081 }; 12082 } 12083 function getSupport() { 12084 if (!support) { 12085 support = calcSupport(); 12086 } 12087 return support; 12088 } 12089 12090 let deviceCached; 12091 function calcDevice(_temp) { 12092 let { 12093 userAgent 12094 } = _temp === void 0 ? {} : _temp;
vendor: 5,909 bytes, lines 12095-12274
12095 const support = getSupport(); 12096 const window = getWindow(); 12097 const platform = window.navigator.platform; 12098 const ua = userAgent || window.navigator.userAgent; 12099 const device = { 12100 ios: false, 12101 android: false 12102 }; 12103 const screenWidth = window.screen.width; 12104 const screenHeight = window.screen.height; 12105 const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line 12106 let ipad = ua.match(/(iPad).*OS\s([\d_]+)/); 12107 const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); 12108 const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); 12109 const windows = platform === 'Win32'; 12110 let macos = platform === 'MacIntel'; 12111 12112 // iPadOs 13 fix 12113 const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810']; 12114 if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) { 12115 ipad = ua.match(/(Version)\/([\d.]+)/); 12116 if (!ipad) ipad = [0, 1, '13_0_0']; 12117 macos = false; 12118 } 12119 12120 // Android 12121 if (android && !windows) { 12122 device.os = 'android'; 12123 device.android = true; 12124 } 12125 if (ipad || iphone || ipod) { 12126 device.os = 'ios'; 12127 device.ios = true; 12128 } 12129 12130 // Export object 12131 return device; 12132 } 12133 function getDevice(overrides) { 12134 if (overrides === void 0) { 12135 overrides = {}; 12136 } 12137 if (!deviceCached) { 12138 deviceCached = calcDevice(overrides); 12139 } 12140 return deviceCached; 12141 } 12142 12143 let browser; 12144 function calcBrowser() { 12145 const window = getWindow(); 12146 let needPerspectiveFix = false; 12147 function isSafari() { 12148 const ua = window.navigator.userAgent.toLowerCase(); 12149 return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0; 12150 } 12151 if (isSafari()) { 12152 const ua = String(window.navigator.userAgent); 12153 if (ua.includes('Version/')) { 12154 const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num)); 12155 needPerspectiveFix = major < 16 || major === 16 && minor < 2; 12156 } 12157 } 12158 return { 12159 isSafari: needPerspectiveFix || isSafari(), 12160 needPerspectiveFix, 12161 isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent) 12162 }; 12163 } 12164 function getBrowser() { 12165 if (!browser) { 12166 browser = calcBrowser(); 12167 } 12168 return browser; 12169 } 12170 12171 function Resize(_ref) { 12172 let { 12173 swiper, 12174 on, 12175 emit 12176 } = _ref; 12177 const window = getWindow(); 12178 let observer = null; 12179 let animationFrame = null; 12180 const resizeHandler = () => { 12181 if (!swiper || swiper.destroyed || !swiper.initialized) return; 12182 emit('beforeResize'); 12183 emit('resize'); 12184 }; 12185 const createObserver = () => { 12186 if (!swiper || swiper.destroyed || !swiper.initialized) return; 12187 observer = new ResizeObserver(entries => { 12188 animationFrame = window.requestAnimationFrame(() => { 12189 const { 12190 width, 12191 height 12192 } = swiper; 12193 let newWidth = width; 12194 let newHeight = height; 12195 entries.forEach(_ref2 => { 12196 let { 12197 contentBoxSize, 12198 contentRect, 12199 target 12200 } = _ref2; 12201 if (target && target !== swiper.el) return; 12202 newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize; 12203 newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize; 12204 }); 12205 if (newWidth !== width || newHeight !== height) { 12206 resizeHandler(); 12207 } 12208 }); 12209 }); 12210 observer.observe(swiper.el); 12211 }; 12212 const removeObserver = () => { 12213 if (animationFrame) { 12214 window.cancelAnimationFrame(animationFrame); 12215 } 12216 if (observer && observer.unobserve && swiper.el) { 12217 observer.unobserve(swiper.el); 12218 observer = null; 12219 } 12220 }; 12221 const orientationChangeHandler = () => { 12222 if (!swiper || swiper.destroyed || !swiper.initialized) return; 12223 emit('orientationchange'); 12224 }; 12225 on('init', () => { 12226 if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') { 12227 createObserver(); 12228 return; 12229 } 12230 window.addEventListener('resize', resizeHandler); 12231 window.addEventListener('orientationchange', orientationChangeHandler); 12232 }); 12233 on('destroy', () => { 12234 removeObserver(); 12235 window.removeEventListener('resize', resizeHandler); 12236 window.removeEventListener('orientationchange', orientationChangeHandler); 12237 }); 12238 } 12239 12240 function Observer(_ref) { 12241 let { 12242 swiper, 12243 extendParams, 12244 on, 12245 emit 12246 } = _ref; 12247 const observers = []; 12248 const window = getWindow(); 12249 const attach = function (target, options) { 12250 if (options === void 0) { 12251 options = {}; 12252 } 12253 const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; 12254 const observer = new ObserverFunc(mutations => { 12255 // The observerUpdate event should only be triggered 12256 // once despite the number of mutations. Additional 12257 // triggers are redundant and are very costly 12258 if (swiper.__preventObserver__) return; 12259 if (mutations.length === 1) { 12260 emit('observerUpdate', mutations[0]); 12261 return; 12262 } 12263 const observerUpdate = function observerUpdate() { 12264 emit('observerUpdate', mutations[0]); 12265 }; 12266 if (window.requestAnimationFrame) { 12267 window.requestAnimationFrame(observerUpdate); 12268 } else { 12269 window.setTimeout(observerUpdate, 0); 12270 } 12271 }); 12272 observer.observe(target, { 12273 attributes: typeof options.attributes === 'undefined' ? true : options.attributes, 12274 childList: typeof options.childList === 'undefined' ? true : options
vendor: 5,892 bytes, lines 12274-12450
12274.childList, 12275 characterData: typeof options.characterData === 'undefined' ? true : options.characterData 12276 }); 12277 observers.push(observer); 12278 }; 12279 const init = () => { 12280 if (!swiper.params.observer) return; 12281 if (swiper.params.observeParents) { 12282 const containerParents = elementParents(swiper.hostEl); 12283 for (let i = 0; i < containerParents.length; i += 1) { 12284 attach(containerParents[i]); 12285 } 12286 } 12287 // Observe container 12288 attach(swiper.hostEl, { 12289 childList: swiper.params.observeSlideChildren 12290 }); 12291 12292 // Observe wrapper 12293 attach(swiper.wrapperEl, { 12294 attributes: false 12295 }); 12296 }; 12297 const destroy = () => { 12298 observers.forEach(observer => { 12299 observer.disconnect(); 12300 }); 12301 observers.splice(0, observers.length); 12302 }; 12303 extendParams({ 12304 observer: false, 12305 observeParents: false, 12306 observeSlideChildren: false 12307 }); 12308 on('init', init); 12309 on('destroy', destroy); 12310 } 12311 12312 /* eslint-disable no-underscore-dangle */ 12313 12314 var eventsEmitter = { 12315 on(events, handler, priority) { 12316 const self = this; 12317 if (!self.eventsListeners || self.destroyed) return self; 12318 if (typeof handler !== 'function') return self; 12319 const method = priority ? 'unshift' : 'push'; 12320 events.split(' ').forEach(event => { 12321 if (!self.eventsListeners[event]) self.eventsListeners[event] = []; 12322 self.eventsListeners[event][method](handler); 12323 }); 12324 return self; 12325 }, 12326 once(events, handler, priority) { 12327 const self = this; 12328 if (!self.eventsListeners || self.destroyed) return self; 12329 if (typeof handler !== 'function') return self; 12330 function onceHandler() { 12331 self.off(events, onceHandler); 12332 if (onceHandler.__emitterProxy) { 12333 delete onceHandler.__emitterProxy; 12334 } 12335 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 12336 args[_key] = arguments[_key]; 12337 } 12338 handler.apply(self, args); 12339 } 12340 onceHandler.__emitterProxy = handler; 12341 return self.on(events, onceHandler, priority); 12342 }, 12343 onAny(handler, priority) { 12344 const self = this; 12345 if (!self.eventsListeners || self.destroyed) return self; 12346 if (typeof handler !== 'function') return self; 12347 const method = priority ? 'unshift' : 'push'; 12348 if (self.eventsAnyListeners.indexOf(handler) < 0) { 12349 self.eventsAnyListeners[method](handler); 12350 } 12351 return self; 12352 }, 12353 offAny(handler) { 12354 const self = this; 12355 if (!self.eventsListeners || self.destroyed) return self; 12356 if (!self.eventsAnyListeners) return self; 12357 const index = self.eventsAnyListeners.indexOf(handler); 12358 if (index >= 0) { 12359 self.eventsAnyListeners.splice(index, 1); 12360 } 12361 return self; 12362 }, 12363 off(events, handler) { 12364 const self = this; 12365 if (!self.eventsListeners || self.destroyed) return self; 12366 if (!self.eventsListeners) return self; 12367 events.split(' ').forEach(event => { 12368 if (typeof handler === 'undefined') { 12369 self.eventsListeners[event] = []; 12370 } else if (self.eventsListeners[event]) { 12371 self.eventsListeners[event].forEach((eventHandler, index) => { 12372 if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) { 12373 self.eventsListeners[event].splice(index, 1); 12374 } 12375 }); 12376 } 12377 }); 12378 return self; 12379 }, 12380 emit() { 12381 const self = this; 12382 if (!self.eventsListeners || self.destroyed) return self; 12383 if (!self.eventsListeners) return self; 12384 let events; 12385 let data; 12386 let context; 12387 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 12388 args[_key2] = arguments[_key2]; 12389 } 12390 if (typeof args[0] === 'string' || Array.isArray(args[0])) { 12391 events = args[0]; 12392 data = args.slice(1, args.length); 12393 context = self; 12394 } else { 12395 events = args[0].events; 12396 data = args[0].data; 12397 context = args[0].context || self; 12398 } 12399 data.unshift(context); 12400 const eventsArray = Array.isArray(events) ? events : events.split(' '); 12401 eventsArray.forEach(event => { 12402 if (self.eventsAnyListeners && self.eventsAnyListeners.length) { 12403 self.eventsAnyListeners.forEach(eventHandler => { 12404 eventHandler.apply(context, [event, ...data]); 12405 }); 12406 } 12407 if (self.eventsListeners && self.eventsListeners[event]) { 12408 self.eventsListeners[event].forEach(eventHandler => { 12409 eventHandler.apply(context, data); 12410 }); 12411 } 12412 }); 12413 return self; 12414 } 12415 }; 12416 12417 function updateSize() { 12418 const swiper = this; 12419 let width; 12420 let height; 12421 const el = swiper.el; 12422 if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) { 12423 width = swiper.params.width; 12424 } else { 12425 width = el.clientWidth; 12426 } 12427 if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) { 12428 height = swiper.params.height; 12429 } else { 12430 height = el.clientHeight; 12431 } 12432 if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { 12433 return; 12434 } 12435 12436 // Subtract paddings 12437 width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10); 12438 height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10); 12439 if (Number.isNaN(width)) width = 0; 12440 if (Number.isNaN(height)) height = 0; 12441 Object.assign(swiper, { 12442 width, 12443 height, 12444 size: swiper.isHorizontal() ? width : height 12445 }); 12446 } 12447 12448 function updateSlides() { 12449 const swiper = this; 12450 function getDirection
vendor: 12,449 bytes, lines 12450-12754
12450Label(property) { 12451 if (swiper.isHorizontal()) { 12452 return property; 12453 } 12454 // prettier-ignore 12455 return { 12456 'width': 'height', 12457 'margin-top': 'margin-left', 12458 'margin-bottom ': 'margin-right', 12459 'margin-left': 'margin-top', 12460 'margin-right': 'margin-bottom', 12461 'padding-left': 'padding-top', 12462 'padding-right': 'padding-bottom', 12463 'marginRight': 'marginBottom' 12464 }[property]; 12465 } 12466 function getDirectionPropertyValue(node, label) { 12467 return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0); 12468 } 12469 const params = swiper.params; 12470 const { 12471 wrapperEl, 12472 slidesEl, 12473 size: swiperSize, 12474 rtlTranslate: rtl, 12475 wrongRTL 12476 } = swiper; 12477 const isVirtual = swiper.virtual && params.virtual.enabled; 12478 const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; 12479 const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`); 12480 const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; 12481 let snapGrid = []; 12482 const slidesGrid = []; 12483 const slidesSizesGrid = []; 12484 let offsetBefore = params.slidesOffsetBefore; 12485 if (typeof offsetBefore === 'function') { 12486 offsetBefore = params.slidesOffsetBefore.call(swiper); 12487 } 12488 let offsetAfter = params.slidesOffsetAfter; 12489 if (typeof offsetAfter === 'function') { 12490 offsetAfter = params.slidesOffsetAfter.call(swiper); 12491 } 12492 const previousSnapGridLength = swiper.snapGrid.length; 12493 const previousSlidesGridLength = swiper.slidesGrid.length; 12494 let spaceBetween = params.spaceBetween; 12495 let slidePosition = -offsetBefore; 12496 let prevSlideSize = 0; 12497 let index = 0; 12498 if (typeof swiperSize === 'undefined') { 12499 return; 12500 } 12501 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 12502 spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize; 12503 } else if (typeof spaceBetween === 'string') { 12504 spaceBetween = parseFloat(spaceBetween); 12505 } 12506 swiper.virtualSize = -spaceBetween; 12507 12508 // reset margins 12509 slides.forEach(slideEl => { 12510 if (rtl) { 12511 slideEl.style.marginLeft = ''; 12512 } else { 12513 slideEl.style.marginRight = ''; 12514 } 12515 slideEl.style.marginBottom = ''; 12516 slideEl.style.marginTop = ''; 12517 }); 12518 12519 // reset cssMode offsets 12520 if (params.centeredSlides && params.cssMode) { 12521 setCSSProperty(wrapperEl, '--swiper-centered-offset-before', ''); 12522 setCSSProperty(wrapperEl, '--swiper-centered-offset-after', ''); 12523 } 12524 const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid; 12525 if (gridEnabled) { 12526 swiper.grid.initSlides(slidesLength); 12527 } 12528 12529 // Calc slides 12530 let slideSize; 12531 const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => { 12532 return typeof params.breakpoints[key].slidesPerView !== 'undefined'; 12533 }).length > 0; 12534 for (let i = 0; i < slidesLength; i += 1) { 12535 slideSize = 0; 12536 let slide; 12537 if (slides[i]) slide = slides[i]; 12538 if (gridEnabled) { 12539 swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel); 12540 } 12541 if (slides[i] && elementStyle(slide, 'display') === 'none') continue; // eslint-disable-line 12542 12543 if (params.slidesPerView === 'auto') { 12544 if (shouldResetSlideSize) { 12545 slides[i].style[getDirectionLabel('width')] = ``; 12546 } 12547 const slideStyles = getComputedStyle(slide); 12548 const currentTransform = slide.style.transform; 12549 const currentWebKitTransform = slide.style.webkitTransform; 12550 if (currentTransform) { 12551 slide.style.transform = 'none'; 12552 } 12553 if (currentWebKitTransform) { 12554 slide.style.webkitTransform = 'none'; 12555 } 12556 if (params.roundLengths) { 12557 slideSize = swiper.isHorizontal() ? elementOuterSize(slide, 'width', true) : elementOuterSize(slide, 'height', true); 12558 } else { 12559 // eslint-disable-next-line 12560 const width = getDirectionPropertyValue(slideStyles, 'width'); 12561 const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left'); 12562 const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right'); 12563 const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left'); 12564 const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right'); 12565 const boxSizing = slideStyles.getPropertyValue('box-sizing'); 12566 if (boxSizing && boxSizing === 'border-box') { 12567 slideSize = width + marginLeft + marginRight; 12568 } else { 12569 const { 12570 clientWidth, 12571 offsetWidth 12572 } = slide; 12573 slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth); 12574 } 12575 } 12576 if (currentTransform) { 12577 slide.style.transform = currentTransform; 12578 } 12579 if (currentWebKitTransform) { 12580 slide.style.webkitTransform = currentWebKitTransform; 12581 } 12582 if (params.roundLengths) slideSize = Math.floor(slideSize); 12583 } else { 12584 slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; 12585 if (params.roundLengths) slideSize = Math.floor(slideSize); 12586 if (slides[i]) { 12587 slides[i].style[getDirectionLabel('width')] = `${slideSize}px`; 12588 } 12589 } 12590 if (slides[i]) { 12591 slides[i].swiperSlideSize = slideSize; 12592 } 12593 slidesSizesGrid.push(slideSize); 12594 if (params.centeredSlides) { 12595 slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; 12596 if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 12597 if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 12598 if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; 12599 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 12600 if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition); 12601 slidesGrid.push(slidePosition); 12602 } else { 12603 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 12604 if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition); 12605 slidesGrid.push(slidePosition); 12606 slidePosition = slidePosition + slideSize + spaceBetween; 12607 } 12608 swiper.virtualSize += slideSize + spaceBetween; 12609 prevSlideSize = slideSize; 12610 index += 1; 12611 } 12612 swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; 12613 if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { 12614 wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`; 12615 } 12616 if (params.setWrapperSize) { 12617 wrapperEl.style[getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`; 12618 } 12619 if (gridEnabled) { 12620 swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel); 12621 } 12622 12623 // Remove last grid elements depending on width 12624 if (!params.centeredSlides) { 12625 const newSlidesGrid = []; 12626 for (let i = 0; i < snapGrid.length; i += 1) { 12627 let slidesGridItem = snapGrid[i]; 12628 if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); 12629 if (snapGrid[i] <= swiper.virtualSize - swiperSize) { 12630 newSlidesGrid.push(slidesGridItem); 12631 } 12632 } 12633 snapGrid = newSlidesGrid; 12634 if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { 12635 snapGrid.push(swiper.virtualSize - swiperSize); 12636 } 12637 } 12638 if (isVirtual && params.loop) { 12639 const size = slidesSizesGrid[0] + spaceBetween; 12640 if (params.slidesPerGroup > 1) { 12641 const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup); 12642 const groupSize = size * params.slidesPerGroup; 12643 for (let i = 0; i < groups; i += 1) { 12644 snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize); 12645 } 12646 } 12647 for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) { 12648 if (params.slidesPerGroup === 1) { 12649 snapGrid.push(snapGrid[snapGrid.length - 1] + size); 12650 } 12651 slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size); 12652 swiper.virtualSize += size; 12653 } 12654 } 12655 if (snapGrid.length === 0) snapGrid = [0]; 12656 if (spaceBetween !== 0) { 12657 const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight'); 12658 slides.filter((_, slideIndex) => { 12659 if (!params.cssMode || params.loop) return true; 12660 if (slideIndex === slides.length - 1) { 12661 return false; 12662 } 12663 return true; 12664 }).forEach(slideEl => { 12665 slideEl.style[key] = `${spaceBetween}px`; 12666 }); 12667 } 12668 if (params.centeredSlides && params.centeredSlidesBounds) { 12669 let allSlidesSize = 0; 12670 slidesSizesGrid.forEach(slideSizeValue => { 12671 allSlidesSize += slideSizeValue + (spaceBetween || 0); 12672 }); 12673 allSlidesSize -= spaceBetween; 12674 const maxSnap = allSlidesSize - swiperSize; 12675 snapGrid = snapGrid.map(snap => { 12676 if (snap <= 0) return -offsetBefore; 12677 if (snap > maxSnap) return maxSnap + offsetAfter; 12678 return snap; 12679 }); 12680 } 12681 if (params.centerInsufficientSlides) { 12682 let allSlidesSize = 0; 12683 slidesSizesGrid.forEach(slideSizeValue => { 12684 allSlidesSize += slideSizeValue + (spaceBetween || 0); 12685 }); 12686 allSlidesSize -= spaceBetween; 12687 if (allSlidesSize < swiperSize) { 12688 const allSlidesOffset = (swiperSize - allSlidesSize) / 2; 12689 snapGrid.forEach((snap, snapIndex) => { 12690 snapGrid[snapIndex] = snap - allSlidesOffset; 12691 }); 12692 slidesGrid.forEach((snap, snapIndex) => { 12693 slidesGrid[snapIndex] = snap + allSlidesOffset; 12694 }); 12695 } 12696 } 12697 Object.assign(swiper, { 12698 slides, 12699 snapGrid, 12700 slidesGrid, 12701 slidesSizesGrid 12702 }); 12703 if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) { 12704 setCSSProperty(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`); 12705 setCSSProperty(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`); 12706 const addToSnapGrid = -swiper.snapGrid[0]; 12707 const addToSlidesGrid = -swiper.slidesGrid[0]; 12708 swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid); 12709 swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid); 12710 } 12711 if (slidesLength !== previousSlidesLength) { 12712 swiper.emit('slidesLengthChange'); 12713 } 12714 if (snapGrid.length !== previousSnapGridLength) { 12715 if (swiper.params.watchOverflow) swiper.checkOverflow(); 12716 swiper.emit('snapGridLengthChange'); 12717 } 12718 if (slidesGrid.length !== previousSlidesGridLength) { 12719 swiper.emit('slidesGridLengthChange'); 12720 } 12721 if (params.watchSlidesProgress) { 12722 swiper.updateSlidesOffset(); 12723 } 12724 if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) { 12725 const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`; 12726 const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass); 12727 if (slidesLength <= params.maxBackfaceHiddenSlides) { 12728 if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass); 12729 } else if (hasClassBackfaceClassAdded) { 12730 swiper.el.classList.remove(backFaceHiddenClass); 12731 } 12732 } 12733 } 12734 12735 function updateAutoHeight(speed) { 12736 const swiper = this; 12737 const activeSlides = []; 12738 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 12739 let newHeight = 0; 12740 let i; 12741 if (typeof speed === 'number') { 12742 swiper.setTransition(speed); 12743 } else if (speed === true) { 12744 swiper.setTransition(swiper.params.speed); 12745 } 12746 const getSlideByIndex = index => { 12747 if (isVirtual) { 12748 return swiper.slides[swiper.getSlideIndexByData(index)]; 12749 } 12750 return swiper.slides[index]; 12751 }; 12752 // Find slides currently in view 12753 if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { 12754 if (swiper.params.centeredSlides) {
vendor: 1,816 bytes, lines 12755-12807
12755 (swiper.visibleSlides || []).forEach(slide => { 12756 activeSlides.push(slide); 12757 }); 12758 } else { 12759 for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { 12760 const index = swiper.activeIndex + i; 12761 if (index > swiper.slides.length && !isVirtual) break; 12762 activeSlides.push(getSlideByIndex(index)); 12763 } 12764 } 12765 } else { 12766 activeSlides.push(getSlideByIndex(swiper.activeIndex)); 12767 } 12768 12769 // Find new height from highest slide in view 12770 for (i = 0; i < activeSlides.length; i += 1) { 12771 if (typeof activeSlides[i] !== 'undefined') { 12772 const height = activeSlides[i].offsetHeight; 12773 newHeight = height > newHeight ? height : newHeight; 12774 } 12775 } 12776 12777 // Update Height 12778 if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`; 12779 } 12780 12781 function updateSlidesOffset() { 12782 const swiper = this; 12783 const slides = swiper.slides; 12784 // eslint-disable-next-line 12785 const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0; 12786 for (let i = 0; i < slides.length; i += 1) { 12787 slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment(); 12788 } 12789 } 12790 12791 function updateSlidesProgress(translate) { 12792 if (translate === void 0) { 12793 translate = this && this.translate || 0; 12794 } 12795 const swiper = this; 12796 const params = swiper.params; 12797 const { 12798 slides, 12799 rtlTranslate: rtl, 12800 snapGrid 12801 } = swiper; 12802 if (slides.length === 0) return; 12803 if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset(); 12804 let offsetCenter = -translate; 12805 if (rtl) offsetCenter = translate; 12806 12807 // Visible Slides
vendor: 9,114 bytes, lines 12808-13034
12808 slides.forEach(slideEl => { 12809 slideEl.classList.remove(params.slideVisibleClass); 12810 }); 12811 swiper.visibleSlidesIndexes = []; 12812 swiper.visibleSlides = []; 12813 let spaceBetween = params.spaceBetween; 12814 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 12815 spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size; 12816 } else if (typeof spaceBetween === 'string') { 12817 spaceBetween = parseFloat(spaceBetween); 12818 } 12819 for (let i = 0; i < slides.length; i += 1) { 12820 const slide = slides[i]; 12821 let slideOffset = slide.swiperSlideOffset; 12822 if (params.cssMode && params.centeredSlides) { 12823 slideOffset -= slides[0].swiperSlideOffset; 12824 } 12825 const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween); 12826 const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween); 12827 const slideBefore = -(offsetCenter - slideOffset); 12828 const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; 12829 const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; 12830 if (isVisible) { 12831 swiper.visibleSlides.push(slide); 12832 swiper.visibleSlidesIndexes.push(i); 12833 slides[i].classList.add(params.slideVisibleClass); 12834 } 12835 slide.progress = rtl ? -slideProgress : slideProgress; 12836 slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress; 12837 } 12838 } 12839 12840 function updateProgress(translate) { 12841 const swiper = this; 12842 if (typeof translate === 'undefined') { 12843 const multiplier = swiper.rtlTranslate ? -1 : 1; 12844 // eslint-disable-next-line 12845 translate = swiper && swiper.translate && swiper.translate * multiplier || 0; 12846 } 12847 const params = swiper.params; 12848 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 12849 let { 12850 progress, 12851 isBeginning, 12852 isEnd, 12853 progressLoop 12854 } = swiper; 12855 const wasBeginning = isBeginning; 12856 const wasEnd = isEnd; 12857 if (translatesDiff === 0) { 12858 progress = 0; 12859 isBeginning = true; 12860 isEnd = true; 12861 } else { 12862 progress = (translate - swiper.minTranslate()) / translatesDiff; 12863 const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1; 12864 const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1; 12865 isBeginning = isBeginningRounded || progress <= 0; 12866 isEnd = isEndRounded || progress >= 1; 12867 if (isBeginningRounded) progress = 0; 12868 if (isEndRounded) progress = 1; 12869 } 12870 if (params.loop) { 12871 const firstSlideIndex = swiper.getSlideIndexByData(0); 12872 const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1); 12873 const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex]; 12874 const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex]; 12875 const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1]; 12876 const translateAbs = Math.abs(translate); 12877 if (translateAbs >= firstSlideTranslate) { 12878 progressLoop = (translateAbs - firstSlideTranslate) / translateMax; 12879 } else { 12880 progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax; 12881 } 12882 if (progressLoop > 1) progressLoop -= 1; 12883 } 12884 Object.assign(swiper, { 12885 progress, 12886 progressLoop, 12887 isBeginning, 12888 isEnd 12889 }); 12890 if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate); 12891 if (isBeginning && !wasBeginning) { 12892 swiper.emit('reachBeginning toEdge'); 12893 } 12894 if (isEnd && !wasEnd) { 12895 swiper.emit('reachEnd toEdge'); 12896 } 12897 if (wasBeginning && !isBeginning || wasEnd && !isEnd) { 12898 swiper.emit('fromEdge'); 12899 } 12900 swiper.emit('progress', progress); 12901 } 12902 12903 function updateSlidesClasses() { 12904 const swiper = this; 12905 const { 12906 slides, 12907 params, 12908 slidesEl, 12909 activeIndex 12910 } = swiper; 12911 const isVirtual = swiper.virtual && params.virtual.enabled; 12912 const getFilteredSlide = selector => { 12913 return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0]; 12914 }; 12915 slides.forEach(slideEl => { 12916 slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass); 12917 }); 12918 let activeSlide; 12919 if (isVirtual) { 12920 if (params.loop) { 12921 let slideIndex = activeIndex - swiper.virtual.slidesBefore; 12922 if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex; 12923 if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length; 12924 activeSlide = getFilteredSlide(`[data-swiper-slide-index="${slideIndex}"]`); 12925 } else { 12926 activeSlide = getFilteredSlide(`[data-swiper-slide-index="${activeIndex}"]`); 12927 } 12928 } else { 12929 activeSlide = slides[activeIndex]; 12930 } 12931 if (activeSlide) { 12932 // Active classes 12933 activeSlide.classList.add(params.slideActiveClass); 12934 12935 // Next Slide 12936 let nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0]; 12937 if (params.loop && !nextSlide) { 12938 nextSlide = slides[0]; 12939 } 12940 if (nextSlide) { 12941 nextSlide.classList.add(params.slideNextClass); 12942 } 12943 // Prev Slide 12944 let prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0]; 12945 if (params.loop && !prevSlide === 0) { 12946 prevSlide = slides[slides.length - 1]; 12947 } 12948 if (prevSlide) { 12949 prevSlide.classList.add(params.slidePrevClass); 12950 } 12951 } 12952 swiper.emitSlidesClasses(); 12953 } 12954 12955 const processLazyPreloader = (swiper, imageEl) => { 12956 if (!swiper || swiper.destroyed || !swiper.params) return; 12957 const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`; 12958 const slideEl = imageEl.closest(slideSelector()); 12959 if (slideEl) { 12960 let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`); 12961 if (!lazyEl && swiper.isElement) { 12962 lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`); 12963 } 12964 if (lazyEl) lazyEl.remove(); 12965 } 12966 }; 12967 const unlazy = (swiper, index) => { 12968 if (!swiper.slides[index]) return; 12969 const imageEl = swiper.slides[index].querySelector('[loading="lazy"]'); 12970 if (imageEl) imageEl.removeAttribute('loading'); 12971 }; 12972 const preload = swiper => { 12973 if (!swiper || swiper.destroyed || !swiper.params) return; 12974 let amount = swiper.params.lazyPreloadPrevNext; 12975 const len = swiper.slides.length; 12976 if (!len || !amount || amount < 0) return; 12977 amount = Math.min(amount, len); 12978 const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView); 12979 const activeIndex = swiper.activeIndex; 12980 if (swiper.params.grid && swiper.params.grid.rows > 1) { 12981 const activeColumn = activeIndex; 12982 const preloadColumns = [activeColumn - amount]; 12983 preloadColumns.push(...Array.from({ 12984 length: amount 12985 }).map((_, i) => { 12986 return activeColumn + slidesPerView + i; 12987 })); 12988 swiper.slides.forEach((slideEl, i) => { 12989 if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i); 12990 }); 12991 return; 12992 } 12993 const slideIndexLastInView = activeIndex + slidesPerView - 1; 12994 if (swiper.params.rewind || swiper.params.loop) { 12995 for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) { 12996 const realIndex = (i % len + len) % len; 12997 if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex); 12998 } 12999 } else { 13000 for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) { 13001 if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) { 13002 unlazy(swiper, i); 13003 } 13004 } 13005 } 13006 }; 13007 13008 function getActiveIndexByTranslate(swiper) { 13009 const { 13010 slidesGrid, 13011 params 13012 } = swiper; 13013 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 13014 let activeIndex; 13015 for (let i = 0; i < slidesGrid.length; i += 1) { 13016 if (typeof slidesGrid[i + 1] !== 'undefined') { 13017 if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { 13018 activeIndex = i; 13019 } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { 13020 activeIndex = i + 1; 13021 } 13022 } else if (translate >= slidesGrid[i]) { 13023 activeIndex = i; 13024 } 13025 } 13026 // Normalize slideIndex 13027 if (params.normalizeSlideIndex) { 13028 if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0; 13029 } 13030 return activeIndex; 13031 } 13032 function updateActiveIndex(newActiveIndex) { 13033 const swiper = this; 13034 const translate = swiper.rtlTranslate ? swiper.translate : -swi
vendor: 6,052 bytes, lines 13034-13245
13034per.translate; 13035 const { 13036 snapGrid, 13037 params, 13038 activeIndex: previousIndex, 13039 realIndex: previousRealIndex, 13040 snapIndex: previousSnapIndex 13041 } = swiper; 13042 let activeIndex = newActiveIndex; 13043 let snapIndex; 13044 const getVirtualRealIndex = aIndex => { 13045 let realIndex = aIndex - swiper.virtual.slidesBefore; 13046 if (realIndex < 0) { 13047 realIndex = swiper.virtual.slides.length + realIndex; 13048 } 13049 if (realIndex >= swiper.virtual.slides.length) { 13050 realIndex -= swiper.virtual.slides.length; 13051 } 13052 return realIndex; 13053 }; 13054 if (typeof activeIndex === 'undefined') { 13055 activeIndex = getActiveIndexByTranslate(swiper); 13056 } 13057 if (snapGrid.indexOf(translate) >= 0) { 13058 snapIndex = snapGrid.indexOf(translate); 13059 } else { 13060 const skip = Math.min(params.slidesPerGroupSkip, activeIndex); 13061 snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); 13062 } 13063 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 13064 if (activeIndex === previousIndex) { 13065 if (snapIndex !== previousSnapIndex) { 13066 swiper.snapIndex = snapIndex; 13067 swiper.emit('snapIndexChange'); 13068 } 13069 if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) { 13070 swiper.realIndex = getVirtualRealIndex(activeIndex); 13071 } 13072 return; 13073 } 13074 // Get real index 13075 let realIndex; 13076 if (swiper.virtual && params.virtual.enabled && params.loop) { 13077 realIndex = getVirtualRealIndex(activeIndex); 13078 } else if (swiper.slides[activeIndex]) { 13079 realIndex = parseInt(swiper.slides[activeIndex].getAttribute('data-swiper-slide-index') || activeIndex, 10); 13080 } else { 13081 realIndex = activeIndex; 13082 } 13083 Object.assign(swiper, { 13084 previousSnapIndex, 13085 snapIndex, 13086 previousRealIndex, 13087 realIndex, 13088 previousIndex, 13089 activeIndex 13090 }); 13091 if (swiper.initialized) { 13092 preload(swiper); 13093 } 13094 swiper.emit('activeIndexChange'); 13095 swiper.emit('snapIndexChange'); 13096 if (previousRealIndex !== realIndex) { 13097 swiper.emit('realIndexChange'); 13098 } 13099 if (swiper.initialized || swiper.params.runCallbacksOnInit) { 13100 swiper.emit('slideChange'); 13101 } 13102 } 13103 13104 function updateClickedSlide(e) { 13105 const swiper = this; 13106 const params = swiper.params; 13107 const slide = e.closest(`.${params.slideClass}, swiper-slide`); 13108 let slideFound = false; 13109 let slideIndex; 13110 if (slide) { 13111 for (let i = 0; i < swiper.slides.length; i += 1) { 13112 if (swiper.slides[i] === slide) { 13113 slideFound = true; 13114 slideIndex = i; 13115 break; 13116 } 13117 } 13118 } 13119 if (slide && slideFound) { 13120 swiper.clickedSlide = slide; 13121 if (swiper.virtual && swiper.params.virtual.enabled) { 13122 swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10); 13123 } else { 13124 swiper.clickedIndex = slideIndex; 13125 } 13126 } else { 13127 swiper.clickedSlide = undefined; 13128 swiper.clickedIndex = undefined; 13129 return; 13130 } 13131 if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { 13132 swiper.slideToClickedSlide(); 13133 } 13134 } 13135 13136 var update = { 13137 updateSize, 13138 updateSlides, 13139 updateAutoHeight, 13140 updateSlidesOffset, 13141 updateSlidesProgress, 13142 updateProgress, 13143 updateSlidesClasses, 13144 updateActiveIndex, 13145 updateClickedSlide 13146 }; 13147 13148 function getSwiperTranslate(axis) { 13149 if (axis === void 0) { 13150 axis = this.isHorizontal() ? 'x' : 'y'; 13151 } 13152 const swiper = this; 13153 const { 13154 params, 13155 rtlTranslate: rtl, 13156 translate, 13157 wrapperEl 13158 } = swiper; 13159 if (params.virtualTranslate) { 13160 return rtl ? -translate : translate; 13161 } 13162 if (params.cssMode) { 13163 return translate; 13164 } 13165 let currentTranslate = getTranslate(wrapperEl, axis); 13166 currentTranslate += swiper.cssOverflowAdjustment(); 13167 if (rtl) currentTranslate = -currentTranslate; 13168 return currentTranslate || 0; 13169 } 13170 13171 function setTranslate(translate, byController) { 13172 const swiper = this; 13173 const { 13174 rtlTranslate: rtl, 13175 params, 13176 wrapperEl, 13177 progress 13178 } = swiper; 13179 let x = 0; 13180 let y = 0; 13181 const z = 0; 13182 if (swiper.isHorizontal()) { 13183 x = rtl ? -translate : translate; 13184 } else { 13185 y = translate; 13186 } 13187 if (params.roundLengths) { 13188 x = Math.floor(x); 13189 y = Math.floor(y); 13190 } 13191 swiper.previousTranslate = swiper.translate; 13192 swiper.translate = swiper.isHorizontal() ? x : y; 13193 if (params.cssMode) { 13194 wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; 13195 } else if (!params.virtualTranslate) { 13196 if (swiper.isHorizontal()) { 13197 x -= swiper.cssOverflowAdjustment(); 13198 } else { 13199 y -= swiper.cssOverflowAdjustment(); 13200 } 13201 wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`; 13202 } 13203 13204 // Check if we need to update progress 13205 let newProgress; 13206 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 13207 if (translatesDiff === 0) { 13208 newProgress = 0; 13209 } else { 13210 newProgress = (translate - swiper.minTranslate()) / translatesDiff; 13211 } 13212 if (newProgress !== progress) { 13213 swiper.updateProgress(translate); 13214 } 13215 swiper.emit('setTranslate', swiper.translate, byController); 13216 } 13217 13218 function minTranslate() { 13219 return -this.snapGrid[0]; 13220 } 13221 13222 function maxTranslate() { 13223 return -this.snapGrid[this.snapGrid.length - 1]; 13224 } 13225 13226 function translateTo(translate, speed, runCallbacks, translateBounds, internal) { 13227 if (translate === void 0) { 13228 translate = 0; 13229 } 13230 if (speed === void 0) { 13231 speed = this.params.speed; 13232 } 13233 if (runCallbacks === void 0) { 13234 runCallbacks = true; 13235 } 13236 if (translateBounds === void 0) { 13237 translateBounds = true; 13238 } 13239 const swiper = this; 13240 const { 13241 params, 13242 wrapperEl 13243 } = swiper; 13244 if (swiper.animating && params.preventInteractionOnTransition) { 13245 return false;
vendor: 4,982 bytes, lines 13246-13427
13246 } 13247 const minTranslate = swiper.minTranslate(); 13248 const maxTranslate = swiper.maxTranslate(); 13249 let newTranslate; 13250 if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; 13251 13252 // Update progress 13253 swiper.updateProgress(newTranslate); 13254 if (params.cssMode) { 13255 const isH = swiper.isHorizontal(); 13256 if (speed === 0) { 13257 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; 13258 } else { 13259 if (!swiper.support.smoothScroll) { 13260 animateCSSModeScroll({ 13261 swiper, 13262 targetPosition: -newTranslate, 13263 side: isH ? 'left' : 'top' 13264 }); 13265 return true; 13266 } 13267 wrapperEl.scrollTo({ 13268 [isH ? 'left' : 'top']: -newTranslate, 13269 behavior: 'smooth' 13270 }); 13271 } 13272 return true; 13273 } 13274 if (speed === 0) { 13275 swiper.setTransition(0); 13276 swiper.setTranslate(newTranslate); 13277 if (runCallbacks) { 13278 swiper.emit('beforeTransitionStart', speed, internal); 13279 swiper.emit('transitionEnd'); 13280 } 13281 } else { 13282 swiper.setTransition(speed); 13283 swiper.setTranslate(newTranslate); 13284 if (runCallbacks) { 13285 swiper.emit('beforeTransitionStart', speed, internal); 13286 swiper.emit('transitionStart'); 13287 } 13288 if (!swiper.animating) { 13289 swiper.animating = true; 13290 if (!swiper.onTranslateToWrapperTransitionEnd) { 13291 swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { 13292 if (!swiper || swiper.destroyed) return; 13293 if (e.target !== this) return; 13294 swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); 13295 swiper.onTranslateToWrapperTransitionEnd = null; 13296 delete swiper.onTranslateToWrapperTransitionEnd; 13297 if (runCallbacks) { 13298 swiper.emit('transitionEnd'); 13299 } 13300 }; 13301 } 13302 swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); 13303 } 13304 } 13305 return true; 13306 } 13307 13308 var translate = { 13309 getTranslate: getSwiperTranslate, 13310 setTranslate, 13311 minTranslate, 13312 maxTranslate, 13313 translateTo 13314 }; 13315 13316 function setTransition(duration, byController) { 13317 const swiper = this; 13318 if (!swiper.params.cssMode) { 13319 swiper.wrapperEl.style.transitionDuration = `${duration}ms`; 13320 swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : ''; 13321 } 13322 swiper.emit('setTransition', duration, byController); 13323 } 13324 13325 function transitionEmit(_ref) { 13326 let { 13327 swiper, 13328 runCallbacks, 13329 direction, 13330 step 13331 } = _ref; 13332 const { 13333 activeIndex, 13334 previousIndex 13335 } = swiper; 13336 let dir = direction; 13337 if (!dir) { 13338 if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset'; 13339 } 13340 swiper.emit(`transition${step}`); 13341 if (runCallbacks && activeIndex !== previousIndex) { 13342 if (dir === 'reset') { 13343 swiper.emit(`slideResetTransition${step}`); 13344 return; 13345 } 13346 swiper.emit(`slideChangeTransition${step}`); 13347 if (dir === 'next') { 13348 swiper.emit(`slideNextTransition${step}`); 13349 } else { 13350 swiper.emit(`slidePrevTransition${step}`); 13351 } 13352 } 13353 } 13354 13355 function transitionStart(runCallbacks, direction) { 13356 if (runCallbacks === void 0) { 13357 runCallbacks = true; 13358 } 13359 const swiper = this; 13360 const { 13361 params 13362 } = swiper; 13363 if (params.cssMode) return; 13364 if (params.autoHeight) { 13365 swiper.updateAutoHeight(); 13366 } 13367 transitionEmit({ 13368 swiper, 13369 runCallbacks, 13370 direction, 13371 step: 'Start' 13372 }); 13373 } 13374 13375 function transitionEnd(runCallbacks, direction) { 13376 if (runCallbacks === void 0) { 13377 runCallbacks = true; 13378 } 13379 const swiper = this; 13380 const { 13381 params 13382 } = swiper; 13383 swiper.animating = false; 13384 if (params.cssMode) return; 13385 swiper.setTransition(0); 13386 transitionEmit({ 13387 swiper, 13388 runCallbacks, 13389 direction, 13390 step: 'End' 13391 }); 13392 } 13393 13394 var transition = { 13395 setTransition, 13396 transitionStart, 13397 transitionEnd 13398 }; 13399 13400 function slideTo(index, speed, runCallbacks, internal, initial) { 13401 if (index === void 0) { 13402 index = 0; 13403 } 13404 if (speed === void 0) { 13405 speed = this.params.speed; 13406 } 13407 if (runCallbacks === void 0) { 13408 runCallbacks = true; 13409 } 13410 if (typeof index === 'string') { 13411 index = parseInt(index, 10); 13412 } 13413 const swiper = this; 13414 let slideIndex = index; 13415 if (slideIndex < 0) slideIndex = 0; 13416 const { 13417 params, 13418 snapGrid, 13419 slidesGrid, 13420 previousIndex, 13421 activeIndex, 13422 rtlTranslate: rtl, 13423 wrapperEl, 13424 enabled 13425 } = swiper; 13426 if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) { 13427 return false;
vendor: 50,461 bytes, lines 13428-14851
13428 } 13429 const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); 13430 let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); 13431 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 13432 const translate = -snapGrid[snapIndex]; 13433 // Normalize slideIndex 13434 if (params.normalizeSlideIndex) { 13435 for (let i = 0; i < slidesGrid.length; i += 1) { 13436 const normalizedTranslate = -Math.floor(translate * 100); 13437 const normalizedGrid = Math.floor(slidesGrid[i] * 100); 13438 const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100); 13439 if (typeof slidesGrid[i + 1] !== 'undefined') { 13440 if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) { 13441 slideIndex = i; 13442 } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) { 13443 slideIndex = i + 1; 13444 } 13445 } else if (normalizedTranslate >= normalizedGrid) { 13446 slideIndex = i; 13447 } 13448 } 13449 } 13450 // Directions locks 13451 if (swiper.initialized && slideIndex !== activeIndex) { 13452 if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) { 13453 return false; 13454 } 13455 if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { 13456 if ((activeIndex || 0) !== slideIndex) { 13457 return false; 13458 } 13459 } 13460 } 13461 if (slideIndex !== (previousIndex || 0) && runCallbacks) { 13462 swiper.emit('beforeSlideChangeStart'); 13463 } 13464 13465 // Update progress 13466 swiper.updateProgress(translate); 13467 let direction; 13468 if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; 13469 13470 // Update Index 13471 if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) { 13472 swiper.updateActiveIndex(slideIndex); 13473 // Update Height 13474 if (params.autoHeight) { 13475 swiper.updateAutoHeight(); 13476 } 13477 swiper.updateSlidesClasses(); 13478 if (params.effect !== 'slide') { 13479 swiper.setTranslate(translate); 13480 } 13481 if (direction !== 'reset') { 13482 swiper.transitionStart(runCallbacks, direction); 13483 swiper.transitionEnd(runCallbacks, direction); 13484 } 13485 return false; 13486 } 13487 if (params.cssMode) { 13488 const isH = swiper.isHorizontal(); 13489 const t = rtl ? translate : -translate; 13490 if (speed === 0) { 13491 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 13492 if (isVirtual) { 13493 swiper.wrapperEl.style.scrollSnapType = 'none'; 13494 swiper._immediateVirtual = true; 13495 } 13496 if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) { 13497 swiper._cssModeVirtualInitialSet = true; 13498 requestAnimationFrame(() => { 13499 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; 13500 }); 13501 } else { 13502 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; 13503 } 13504 if (isVirtual) { 13505 requestAnimationFrame(() => { 13506 swiper.wrapperEl.style.scrollSnapType = ''; 13507 swiper._immediateVirtual = false; 13508 }); 13509 } 13510 } else { 13511 if (!swiper.support.smoothScroll) { 13512 animateCSSModeScroll({ 13513 swiper, 13514 targetPosition: t, 13515 side: isH ? 'left' : 'top' 13516 }); 13517 return true; 13518 } 13519 wrapperEl.scrollTo({ 13520 [isH ? 'left' : 'top']: t, 13521 behavior: 'smooth' 13522 }); 13523 } 13524 return true; 13525 } 13526 swiper.setTransition(speed); 13527 swiper.setTranslate(translate); 13528 swiper.updateActiveIndex(slideIndex); 13529 swiper.updateSlidesClasses(); 13530 swiper.emit('beforeTransitionStart', speed, internal); 13531 swiper.transitionStart(runCallbacks, direction); 13532 if (speed === 0) { 13533 swiper.transitionEnd(runCallbacks, direction); 13534 } else if (!swiper.animating) { 13535 swiper.animating = true; 13536 if (!swiper.onSlideToWrapperTransitionEnd) { 13537 swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { 13538 if (!swiper || swiper.destroyed) return; 13539 if (e.target !== this) return; 13540 swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 13541 swiper.onSlideToWrapperTransitionEnd = null; 13542 delete swiper.onSlideToWrapperTransitionEnd; 13543 swiper.transitionEnd(runCallbacks, direction); 13544 }; 13545 } 13546 swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 13547 } 13548 return true; 13549 } 13550 13551 function slideToLoop(index, speed, runCallbacks, internal) { 13552 if (index === void 0) { 13553 index = 0; 13554 } 13555 if (speed === void 0) { 13556 speed = this.params.speed; 13557 } 13558 if (runCallbacks === void 0) { 13559 runCallbacks = true; 13560 } 13561 if (typeof index === 'string') { 13562 const indexAsNumber = parseInt(index, 10); 13563 index = indexAsNumber; 13564 } 13565 const swiper = this; 13566 let newIndex = index; 13567 if (swiper.params.loop) { 13568 if (swiper.virtual && swiper.params.virtual.enabled) { 13569 // eslint-disable-next-line 13570 newIndex = newIndex + swiper.virtual.slidesBefore; 13571 } else { 13572 newIndex = swiper.getSlideIndexByData(newIndex); 13573 } 13574 } 13575 return swiper.slideTo(newIndex, speed, runCallbacks, internal); 13576 } 13577 13578 /* eslint no-unused-vars: "off" */ 13579 function slideNext(speed, runCallbacks, internal) { 13580 if (speed === void 0) { 13581 speed = this.params.speed; 13582 } 13583 if (runCallbacks === void 0) { 13584 runCallbacks = true; 13585 } 13586 const swiper = this; 13587 const { 13588 enabled, 13589 params, 13590 animating 13591 } = swiper; 13592 if (!enabled) return swiper; 13593 let perGroup = params.slidesPerGroup; 13594 if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 13595 perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1); 13596 } 13597 const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup; 13598 const isVirtual = swiper.virtual && params.virtual.enabled; 13599 if (params.loop) { 13600 if (animating && !isVirtual && params.loopPreventsSliding) return false; 13601 swiper.loopFix({ 13602 direction: 'next' 13603 }); 13604 // eslint-disable-next-line 13605 swiper._clientLeft = swiper.wrapperEl.clientLeft; 13606 } 13607 if (params.rewind && swiper.isEnd) { 13608 return swiper.slideTo(0, speed, runCallbacks, internal); 13609 } 13610 return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); 13611 } 13612 13613 /* eslint no-unused-vars: "off" */ 13614 function slidePrev(speed, runCallbacks, internal) { 13615 if (speed === void 0) { 13616 speed = this.params.speed; 13617 } 13618 if (runCallbacks === void 0) { 13619 runCallbacks = true; 13620 } 13621 const swiper = this; 13622 const { 13623 params, 13624 snapGrid, 13625 slidesGrid, 13626 rtlTranslate, 13627 enabled, 13628 animating 13629 } = swiper; 13630 if (!enabled) return swiper; 13631 const isVirtual = swiper.virtual && params.virtual.enabled; 13632 if (params.loop) { 13633 if (animating && !isVirtual && params.loopPreventsSliding) return false; 13634 swiper.loopFix({ 13635 direction: 'prev' 13636 }); 13637 // eslint-disable-next-line 13638 swiper._clientLeft = swiper.wrapperEl.clientLeft; 13639 } 13640 const translate = rtlTranslate ? swiper.translate : -swiper.translate; 13641 function normalize(val) { 13642 if (val < 0) return -Math.floor(Math.abs(val)); 13643 return Math.floor(val); 13644 } 13645 const normalizedTranslate = normalize(translate); 13646 const normalizedSnapGrid = snapGrid.map(val => normalize(val)); 13647 let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; 13648 if (typeof prevSnap === 'undefined' && params.cssMode) { 13649 let prevSnapIndex; 13650 snapGrid.forEach((snap, snapIndex) => { 13651 if (normalizedTranslate >= snap) { 13652 // prevSnap = snap; 13653 prevSnapIndex = snapIndex; 13654 } 13655 }); 13656 if (typeof prevSnapIndex !== 'undefined') { 13657 prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex]; 13658 } 13659 } 13660 let prevIndex = 0; 13661 if (typeof prevSnap !== 'undefined') { 13662 prevIndex = slidesGrid.indexOf(prevSnap); 13663 if (prevIndex < 0) prevIndex = swiper.activeIndex - 1; 13664 if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 13665 prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1; 13666 prevIndex = Math.max(prevIndex, 0); 13667 } 13668 } 13669 if (params.rewind && swiper.isBeginning) { 13670 const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; 13671 return swiper.slideTo(lastIndex, speed, runCallbacks, internal); 13672 } 13673 return swiper.slideTo(prevIndex, speed, runCallbacks, internal); 13674 } 13675 13676 /* eslint no-unused-vars: "off" */ 13677 function slideReset(speed, runCallbacks, internal) { 13678 if (speed === void 0) { 13679 speed = this.params.speed; 13680 } 13681 if (runCallbacks === void 0) { 13682 runCallbacks = true; 13683 } 13684 const swiper = this; 13685 return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); 13686 } 13687 13688 /* eslint no-unused-vars: "off" */ 13689 function slideToClosest(speed, runCallbacks, internal, threshold) { 13690 if (speed === void 0) { 13691 speed = this.params.speed; 13692 } 13693 if (runCallbacks === void 0) { 13694 runCallbacks = true; 13695 } 13696 if (threshold === void 0) { 13697 threshold = 0.5; 13698 } 13699 const swiper = this; 13700 let index = swiper.activeIndex; 13701 const skip = Math.min(swiper.params.slidesPerGroupSkip, index); 13702 const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); 13703 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 13704 if (translate >= swiper.snapGrid[snapIndex]) { 13705 // The current translate is on or after the current snap index, so the choice 13706 // is between the current index and the one after it. 13707 const currentSnap = swiper.snapGrid[snapIndex]; 13708 const nextSnap = swiper.snapGrid[snapIndex + 1]; 13709 if (translate - currentSnap > (nextSnap - currentSnap) * threshold) { 13710 index += swiper.params.slidesPerGroup; 13711 } 13712 } else { 13713 // The current translate is before the current snap index, so the choice 13714 // is between the current index and the one before it. 13715 const prevSnap = swiper.snapGrid[snapIndex - 1]; 13716 const currentSnap = swiper.snapGrid[snapIndex]; 13717 if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) { 13718 index -= swiper.params.slidesPerGroup; 13719 } 13720 } 13721 index = Math.max(index, 0); 13722 index = Math.min(index, swiper.slidesGrid.length - 1); 13723 return swiper.slideTo(index, speed, runCallbacks, internal); 13724 } 13725 13726 function slideToClickedSlide() { 13727 const swiper = this; 13728 const { 13729 params, 13730 slidesEl 13731 } = swiper; 13732 const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; 13733 let slideToIndex = swiper.clickedIndex; 13734 let realIndex; 13735 const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`; 13736 if (params.loop) { 13737 if (swiper.animating) return; 13738 realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10); 13739 if (params.centeredSlides) { 13740 if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) { 13741 swiper.loopFix(); 13742 slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]); 13743 nextTick(() => { 13744 swiper.slideTo(slideToIndex); 13745 }); 13746 } else { 13747 swiper.slideTo(slideToIndex); 13748 } 13749 } else if (slideToIndex > swiper.slides.length - slidesPerView) { 13750 swiper.loopFix(); 13751 slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]); 13752 nextTick(() => { 13753 swiper.slideTo(slideToIndex); 13754 }); 13755 } else { 13756 swiper.slideTo(slideToIndex); 13757 } 13758 } else { 13759 swiper.slideTo(slideToIndex); 13760 } 13761 } 13762 13763 var slide = { 13764 slideTo, 13765 slideToLoop, 13766 slideNext, 13767 slidePrev, 13768 slideReset, 13769 slideToClosest, 13770 slideToClickedSlide 13771 }; 13772 13773 function loopCreate(slideRealIndex) { 13774 const swiper = this; 13775 const { 13776 params, 13777 slidesEl 13778 } = swiper; 13779 if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return; 13780 const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`); 13781 slides.forEach((el, index) => { 13782 el.setAttribute('data-swiper-slide-index', index); 13783 }); 13784 swiper.loopFix({ 13785 slideRealIndex, 13786 direction: params.centeredSlides ? undefined : 'next' 13787 }); 13788 } 13789 13790 function loopFix(_temp) { 13791 let { 13792 slideRealIndex, 13793 slideTo = true, 13794 direction, 13795 setTranslate, 13796 activeSlideIndex, 13797 byController, 13798 byMousewheel 13799 } = _temp === void 0 ? {} : _temp; 13800 const swiper = this; 13801 if (!swiper.params.loop) return; 13802 swiper.emit('beforeLoopFix'); 13803 const { 13804 slides, 13805 allowSlidePrev, 13806 allowSlideNext, 13807 slidesEl, 13808 params 13809 } = swiper; 13810 swiper.allowSlidePrev = true; 13811 swiper.allowSlideNext = true; 13812 if (swiper.virtual && params.virtual.enabled) { 13813 if (slideTo) { 13814 if (!params.centeredSlides && swiper.snapIndex === 0) { 13815 swiper.slideTo(swiper.virtual.slides.length, 0, false, true); 13816 } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) { 13817 swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true); 13818 } else if (swiper.snapIndex === swiper.snapGrid.length - 1) { 13819 swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true); 13820 } 13821 } 13822 swiper.allowSlidePrev = allowSlidePrev; 13823 swiper.allowSlideNext = allowSlideNext; 13824 swiper.emit('loopFix'); 13825 return; 13826 } 13827 const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)); 13828 let loopedSlides = params.loopedSlides || slidesPerView; 13829 if (loopedSlides % params.slidesPerGroup !== 0) { 13830 loopedSlides += params.slidesPerGroup - loopedSlides % params.slidesPerGroup; 13831 } 13832 swiper.loopedSlides = loopedSlides; 13833 const prependSlidesIndexes = []; 13834 const appendSlidesIndexes = []; 13835 let activeIndex = swiper.activeIndex; 13836 if (typeof activeSlideIndex === 'undefined') { 13837 activeSlideIndex = swiper.getSlideIndex(swiper.slides.filter(el => el.classList.contains(params.slideActiveClass))[0]); 13838 } else { 13839 activeIndex = activeSlideIndex; 13840 } 13841 const isNext = direction === 'next' || !direction; 13842 const isPrev = direction === 'prev' || !direction; 13843 let slidesPrepended = 0; 13844 let slidesAppended = 0; 13845 // prepend last slides before start 13846 if (activeSlideIndex < loopedSlides) { 13847 slidesPrepended = Math.max(loopedSlides - activeSlideIndex, params.slidesPerGroup); 13848 for (let i = 0; i < loopedSlides - activeSlideIndex; i += 1) { 13849 const index = i - Math.floor(i / slides.length) * slides.length; 13850 prependSlidesIndexes.push(slides.length - index - 1); 13851 } 13852 } else if (activeSlideIndex /* + slidesPerView */ > swiper.slides.length - loopedSlides * 2) { 13853 slidesAppended = Math.max(activeSlideIndex - (swiper.slides.length - loopedSlides * 2), params.slidesPerGroup); 13854 for (let i = 0; i < slidesAppended; i += 1) { 13855 const index = i - Math.floor(i / slides.length) * slides.length; 13856 appendSlidesIndexes.push(index); 13857 } 13858 } 13859 if (isPrev) { 13860 prependSlidesIndexes.forEach(index => { 13861 swiper.slides[index].swiperLoopMoveDOM = true; 13862 slidesEl.prepend(swiper.slides[index]); 13863 swiper.slides[index].swiperLoopMoveDOM = false; 13864 }); 13865 } 13866 if (isNext) { 13867 appendSlidesIndexes.forEach(index => { 13868 swiper.slides[index].swiperLoopMoveDOM = true; 13869 slidesEl.append(swiper.slides[index]); 13870 swiper.slides[index].swiperLoopMoveDOM = false; 13871 }); 13872 } 13873 swiper.recalcSlides(); 13874 if (params.slidesPerView === 'auto') { 13875 swiper.updateSlides(); 13876 } 13877 if (params.watchSlidesProgress) { 13878 swiper.updateSlidesOffset(); 13879 } 13880 if (slideTo) { 13881 if (prependSlidesIndexes.length > 0 && isPrev) { 13882 if (typeof slideRealIndex === 'undefined') { 13883 const currentSlideTranslate = swiper.slidesGrid[activeIndex]; 13884 const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended]; 13885 const diff = newSlideTranslate - currentSlideTranslate; 13886 if (byMousewheel) { 13887 swiper.setTranslate(swiper.translate - diff); 13888 } else { 13889 swiper.slideTo(activeIndex + slidesPrepended, 0, false, true); 13890 if (setTranslate) { 13891 swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff; 13892 swiper.touchEventsData.currentTranslate = swiper.translate; 13893 } 13894 } 13895 } else { 13896 if (setTranslate) { 13897 swiper.slideToLoop(slideRealIndex, 0, false, true); 13898 swiper.touchEventsData.currentTranslate = swiper.translate; 13899 } 13900 } 13901 } else if (appendSlidesIndexes.length > 0 && isNext) { 13902 if (typeof slideRealIndex === 'undefined') { 13903 const currentSlideTranslate = swiper.slidesGrid[activeIndex]; 13904 const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended]; 13905 const diff = newSlideTranslate - currentSlideTranslate; 13906 if (byMousewheel) { 13907 swiper.setTranslate(swiper.translate - diff); 13908 } else { 13909 swiper.slideTo(activeIndex - slidesAppended, 0, false, true); 13910 if (setTranslate) { 13911 swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff; 13912 swiper.touchEventsData.currentTranslate = swiper.translate; 13913 } 13914 } 13915 } else { 13916 swiper.slideToLoop(slideRealIndex, 0, false, true); 13917 } 13918 } 13919 } 13920 swiper.allowSlidePrev = allowSlidePrev; 13921 swiper.allowSlideNext = allowSlideNext; 13922 if (swiper.controller && swiper.controller.control && !byController) { 13923 const loopParams = { 13924 slideRealIndex, 13925 direction, 13926 setTranslate, 13927 activeSlideIndex, 13928 byController: true 13929 }; 13930 if (Array.isArray(swiper.controller.control)) { 13931 swiper.controller.control.forEach(c => { 13932 if (!c.destroyed && c.params.loop) c.loopFix({ 13933 ...loopParams, 13934 slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false 13935 }); 13936 }); 13937 } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) { 13938 swiper.controller.control.loopFix({ 13939 ...loopParams, 13940 slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false 13941 }); 13942 } 13943 } 13944 swiper.emit('loopFix'); 13945 } 13946 13947 function loopDestroy() { 13948 const swiper = this; 13949 const { 13950 params, 13951 slidesEl 13952 } = swiper; 13953 if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return; 13954 swiper.recalcSlides(); 13955 const newSlidesOrder = []; 13956 swiper.slides.forEach(slideEl => { 13957 const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex; 13958 newSlidesOrder[index] = slideEl; 13959 }); 13960 swiper.slides.forEach(slideEl => { 13961 slideEl.removeAttribute('data-swiper-slide-index'); 13962 }); 13963 newSlidesOrder.forEach(slideEl => { 13964 slidesEl.append(slideEl); 13965 }); 13966 swiper.recalcSlides(); 13967 swiper.slideTo(swiper.realIndex, 0); 13968 } 13969 13970 var loop = { 13971 loopCreate, 13972 loopFix, 13973 loopDestroy 13974 }; 13975 13976 function setGrabCursor(moving) { 13977 const swiper = this; 13978 if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return; 13979 const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl; 13980 if (swiper.isElement) { 13981 swiper.__preventObserver__ = true; 13982 } 13983 el.style.cursor = 'move'; 13984 el.style.cursor = moving ? 'grabbing' : 'grab'; 13985 if (swiper.isElement) { 13986 requestAnimationFrame(() => { 13987 swiper.__preventObserver__ = false; 13988 }); 13989 } 13990 } 13991 13992 function unsetGrabCursor() { 13993 const swiper = this; 13994 if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) { 13995 return; 13996 } 13997 if (swiper.isElement) { 13998 swiper.__preventObserver__ = true; 13999 } 14000 swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = ''; 14001 if (swiper.isElement) { 14002 requestAnimationFrame(() => { 14003 swiper.__preventObserver__ = false; 14004 }); 14005 } 14006 } 14007 14008 var grabCursor = { 14009 setGrabCursor, 14010 unsetGrabCursor 14011 }; 14012 14013 // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd 14014 function closestElement(selector, base) { 14015 if (base === void 0) { 14016 base = this; 14017 } 14018 function __closestFrom(el) { 14019 if (!el || el === getDocument() || el === getWindow()) return null; 14020 if (el.assignedSlot) el = el.assignedSlot; 14021 const found = el.closest(selector); 14022 if (!found && !el.getRootNode) { 14023 return null; 14024 } 14025 return found || __closestFrom(el.getRootNode().host); 14026 } 14027 return __closestFrom(base); 14028 } 14029 function onTouchStart(event) { 14030 const swiper = this; 14031 const document = getDocument(); 14032 const window = getWindow(); 14033 const data = swiper.touchEventsData; 14034 data.evCache.push(event); 14035 const { 14036 params, 14037 touches, 14038 enabled 14039 } = swiper; 14040 if (!enabled) return; 14041 if (!params.simulateTouch && event.pointerType === 'mouse') return; 14042 if (swiper.animating && params.preventInteractionOnTransition) { 14043 return; 14044 } 14045 if (!swiper.animating && params.cssMode && params.loop) { 14046 swiper.loopFix(); 14047 } 14048 let e = event; 14049 if (e.originalEvent) e = e.originalEvent; 14050 let targetEl = e.target; 14051 if (params.touchEventsTarget === 'wrapper') { 14052 if (!swiper.wrapperEl.contains(targetEl)) return; 14053 } 14054 if ('which' in e && e.which === 3) return; 14055 if ('button' in e && e.button > 0) return; 14056 if (data.isTouched && data.isMoved) return; 14057 14058 // change target el for shadow root component 14059 const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; 14060 // eslint-disable-next-line 14061 const eventPath = event.composedPath ? event.composedPath() : event.path; 14062 if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) { 14063 targetEl = eventPath[0]; 14064 } 14065 const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`; 14066 const isTargetShadow = !!(e.target && e.target.shadowRoot); 14067 14068 // use closestElement for shadow root element to get the actual closest for nested shadow root element 14069 if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) { 14070 swiper.allowClick = true; 14071 return; 14072 } 14073 if (params.swipeHandler) { 14074 if (!targetEl.closest(params.swipeHandler)) return; 14075 } 14076 touches.currentX = e.pageX; 14077 touches.currentY = e.pageY; 14078 const startX = touches.currentX; 14079 const startY = touches.currentY; 14080 14081 // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore 14082 14083 const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; 14084 const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; 14085 if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) { 14086 if (edgeSwipeDetection === 'prevent') { 14087 event.preventDefault(); 14088 } else { 14089 return; 14090 } 14091 } 14092 Object.assign(data, { 14093 isTouched: true, 14094 isMoved: false, 14095 allowTouchCallbacks: true, 14096 isScrolling: undefined, 14097 startMoving: undefined 14098 }); 14099 touches.startX = startX; 14100 touches.startY = startY; 14101 data.touchStartTime = now(); 14102 swiper.allowClick = true; 14103 swiper.updateSize(); 14104 swiper.swipeDirection = undefined; 14105 if (params.threshold > 0) data.allowThresholdMove = false; 14106 let preventDefault = true; 14107 if (targetEl.matches(data.focusableElements)) { 14108 preventDefault = false; 14109 if (targetEl.nodeName === 'SELECT') { 14110 data.isTouched = false; 14111 } 14112 } 14113 if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl) { 14114 document.activeElement.blur(); 14115 } 14116 const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; 14117 if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) { 14118 e.preventDefault(); 14119 } 14120 if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) { 14121 swiper.freeMode.onTouchStart(); 14122 } 14123 swiper.emit('touchStart', e); 14124 } 14125 14126 function onTouchMove(event) { 14127 const document = getDocument(); 14128 const swiper = this; 14129 const data = swiper.touchEventsData; 14130 const { 14131 params, 14132 touches, 14133 rtlTranslate: rtl, 14134 enabled 14135 } = swiper; 14136 if (!enabled) return; 14137 if (!params.simulateTouch && event.pointerType === 'mouse') return; 14138 let e = event; 14139 if (e.originalEvent) e = e.originalEvent; 14140 if (!data.isTouched) { 14141 if (data.startMoving && data.isScrolling) { 14142 swiper.emit('touchMoveOpposite', e); 14143 } 14144 return; 14145 } 14146 const pointerIndex = data.evCache.findIndex(cachedEv => cachedEv.pointerId === e.pointerId); 14147 if (pointerIndex >= 0) data.evCache[pointerIndex] = e; 14148 const targetTouch = data.evCache.length > 1 ? data.evCache[0] : e; 14149 const pageX = targetTouch.pageX; 14150 const pageY = targetTouch.pageY; 14151 if (e.preventedByNestedSwiper) { 14152 touches.startX = pageX; 14153 touches.startY = pageY; 14154 return; 14155 } 14156 if (!swiper.allowTouchMove) { 14157 if (!e.target.matches(data.focusableElements)) { 14158 swiper.allowClick = false; 14159 } 14160 if (data.isTouched) { 14161 Object.assign(touches, { 14162 startX: pageX, 14163 startY: pageY, 14164 prevX: swiper.touches.currentX, 14165 prevY: swiper.touches.currentY, 14166 currentX: pageX, 14167 currentY: pageY 14168 }); 14169 data.touchStartTime = now(); 14170 } 14171 return; 14172 } 14173 if (params.touchReleaseOnEdges && !params.loop) { 14174 if (swiper.isVertical()) { 14175 // Vertical 14176 if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { 14177 data.isTouched = false; 14178 data.isMoved = false; 14179 return; 14180 } 14181 } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) { 14182 return; 14183 } 14184 } 14185 if (document.activeElement) { 14186 if (e.target === document.activeElement && e.target.matches(data.focusableElements)) { 14187 data.isMoved = true; 14188 swiper.allowClick = false; 14189 return; 14190 } 14191 } 14192 if (data.allowTouchCallbacks) { 14193 swiper.emit('touchMove', e); 14194 } 14195 if (e.targetTouches && e.targetTouches.length > 1) return; 14196 touches.currentX = pageX; 14197 touches.currentY = pageY; 14198 const diffX = touches.currentX - touches.startX; 14199 const diffY = touches.currentY - touches.startY; 14200 if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return; 14201 if (typeof data.isScrolling === 'undefined') { 14202 let touchAngle; 14203 if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { 14204 data.isScrolling = false; 14205 } else { 14206 // eslint-disable-next-line 14207 if (diffX * diffX + diffY * diffY >= 25) { 14208 touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; 14209 data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; 14210 } 14211 } 14212 } 14213 if (data.isScrolling) { 14214 swiper.emit('touchMoveOpposite', e); 14215 } 14216 if (typeof data.startMoving === 'undefined') { 14217 if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { 14218 data.startMoving = true; 14219 } 14220 } 14221 if (data.isScrolling || swiper.zoom && swiper.params.zoom && swiper.params.zoom.enabled && data.evCache.length > 1) { 14222 data.isTouched = false; 14223 return; 14224 } 14225 if (!data.startMoving) { 14226 return; 14227 } 14228 swiper.allowClick = false; 14229 if (!params.cssMode && e.cancelable) { 14230 e.preventDefault(); 14231 } 14232 if (params.touchMoveStopPropagation && !params.nested) { 14233 e.stopPropagation(); 14234 } 14235 let diff = swiper.isHorizontal() ? diffX : diffY; 14236 let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY; 14237 if (params.oneWayMovement) { 14238 diff = Math.abs(diff) * (rtl ? 1 : -1); 14239 touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1); 14240 } 14241 touches.diff = diff; 14242 diff *= params.touchRatio; 14243 if (rtl) { 14244 diff = -diff; 14245 touchesDiff = -touchesDiff; 14246 } 14247 const prevTouchesDirection = swiper.touchesDirection; 14248 swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; 14249 swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next'; 14250 const isLoop = swiper.params.loop && !params.cssMode; 14251 if (!data.isMoved) { 14252 if (isLoop) { 14253 swiper.loopFix({ 14254 direction: swiper.swipeDirection 14255 }); 14256 } 14257 data.startTranslate = swiper.getTranslate(); 14258 swiper.setTransition(0); 14259 if (swiper.animating) { 14260 const evt = new window.CustomEvent('transitionend', { 14261 bubbles: true, 14262 cancelable: true 14263 }); 14264 swiper.wrapperEl.dispatchEvent(evt); 14265 } 14266 data.allowMomentumBounce = false; 14267 // Grab Cursor 14268 if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 14269 swiper.setGrabCursor(true); 14270 } 14271 swiper.emit('sliderFirstMove', e); 14272 } 14273 let loopFixed; 14274 if (data.isMoved && prevTouchesDirection !== swiper.touchesDirection && isLoop && Math.abs(diff) >= 1) { 14275 // need another loop fix 14276 swiper.loopFix({ 14277 direction: swiper.swipeDirection, 14278 setTranslate: true 14279 }); 14280 loopFixed = true; 14281 } 14282 swiper.emit('sliderMove', e); 14283 data.isMoved = true; 14284 data.currentTranslate = diff + data.startTranslate; 14285 let disableParentSwiper = true; 14286 let resistanceRatio = params.resistanceRatio; 14287 if (params.touchReleaseOnEdges) { 14288 resistanceRatio = 0; 14289 } 14290 if (diff > 0) { 14291 if (isLoop && !loopFixed && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.size / 2 : swiper.minTranslate())) { 14292 swiper.loopFix({ 14293 direction: 'prev', 14294 setTranslate: true, 14295 activeSlideIndex: 0 14296 }); 14297 } 14298 if (data.currentTranslate > swiper.minTranslate()) { 14299 disableParentSwiper = false; 14300 if (params.resistance) { 14301 data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio; 14302 } 14303 } 14304 } else if (diff < 0) { 14305 if (isLoop && !loopFixed && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.size / 2 : swiper.maxTranslate())) { 14306 swiper.loopFix({ 14307 direction: 'next', 14308 setTranslate: true, 14309 activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10))) 14310 }); 14311 } 14312 if (data.currentTranslate < swiper.maxTranslate()) { 14313 disableParentSwiper = false; 14314 if (params.resistance) { 14315 data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio; 14316 } 14317 } 14318 } 14319 if (disableParentSwiper) { 14320 e.preventedByNestedSwiper = true; 14321 } 14322 14323 // Directions locks 14324 if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { 14325 data.currentTranslate = data.startTranslate; 14326 } 14327 if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { 14328 data.currentTranslate = data.startTranslate; 14329 } 14330 if (!swiper.allowSlidePrev && !swiper.allowSlideNext) { 14331 data.currentTranslate = data.startTranslate; 14332 } 14333 14334 // Threshold 14335 if (params.threshold > 0) { 14336 if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { 14337 if (!data.allowThresholdMove) { 14338 data.allowThresholdMove = true; 14339 touches.startX = touches.currentX; 14340 touches.startY = touches.currentY; 14341 data.currentTranslate = data.startTranslate; 14342 touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; 14343 return; 14344 } 14345 } else { 14346 data.currentTranslate = data.startTranslate; 14347 return; 14348 } 14349 } 14350 if (!params.followFinger || params.cssMode) return; 14351 14352 // Update active index in free mode 14353 if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) { 14354 swiper.updateActiveIndex(); 14355 swiper.updateSlidesClasses(); 14356 } 14357 if (params.freeMode && params.freeMode.enabled && swiper.freeMode) { 14358 swiper.freeMode.onTouchMove(); 14359 } 14360 // Update progress 14361 swiper.updateProgress(data.currentTranslate); 14362 // Update translate 14363 swiper.setTranslate(data.currentTranslate); 14364 } 14365 14366 function onTouchEnd(event) { 14367 const swiper = this; 14368 const data = swiper.touchEventsData; 14369 const pointerIndex = data.evCache.findIndex(cachedEv => cachedEv.pointerId === event.pointerId); 14370 if (pointerIndex >= 0) { 14371 data.evCache.splice(pointerIndex, 1); 14372 } 14373 if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(event.type)) { 14374 const proceed = ['pointercancel', 'contextmenu'].includes(event.type) && (swiper.browser.isSafari || swiper.browser.isWebView); 14375 if (!proceed) { 14376 return; 14377 } 14378 } 14379 const { 14380 params, 14381 touches, 14382 rtlTranslate: rtl, 14383 slidesGrid, 14384 enabled 14385 } = swiper; 14386 if (!enabled) return; 14387 if (!params.simulateTouch && event.pointerType === 'mouse') return; 14388 let e = event; 14389 if (e.originalEvent) e = e.originalEvent; 14390 if (data.allowTouchCallbacks) { 14391 swiper.emit('touchEnd', e); 14392 } 14393 data.allowTouchCallbacks = false; 14394 if (!data.isTouched) { 14395 if (data.isMoved && params.grabCursor) { 14396 swiper.setGrabCursor(false); 14397 } 14398 data.isMoved = false; 14399 data.startMoving = false; 14400 return; 14401 } 14402 // Return Grab Cursor 14403 if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 14404 swiper.setGrabCursor(false); 14405 } 14406 14407 // Time diff 14408 const touchEndTime = now(); 14409 const timeDiff = touchEndTime - data.touchStartTime; 14410 14411 // Tap, doubleTap, Click 14412 if (swiper.allowClick) { 14413 const pathTree = e.path || e.composedPath && e.composedPath(); 14414 swiper.updateClickedSlide(pathTree && pathTree[0] || e.target); 14415 swiper.emit('tap click', e); 14416 if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { 14417 swiper.emit('doubleTap doubleClick', e); 14418 } 14419 } 14420 data.lastClickTime = now(); 14421 nextTick(() => { 14422 if (!swiper.destroyed) swiper.allowClick = true; 14423 }); 14424 if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { 14425 data.isTouched = false; 14426 data.isMoved = false; 14427 data.startMoving = false; 14428 return; 14429 } 14430 data.isTouched = false; 14431 data.isMoved = false; 14432 data.startMoving = false; 14433 let currentPos; 14434 if (params.followFinger) { 14435 currentPos = rtl ? swiper.translate : -swiper.translate; 14436 } else { 14437 currentPos = -data.currentTranslate; 14438 } 14439 if (params.cssMode) { 14440 return; 14441 } 14442 if (params.freeMode && params.freeMode.enabled) { 14443 swiper.freeMode.onTouchEnd({ 14444 currentPos 14445 }); 14446 return; 14447 } 14448 14449 // Find current slide 14450 let stopIndex = 0; 14451 let groupSize = swiper.slidesSizesGrid[0]; 14452 for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { 14453 const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 14454 if (typeof slidesGrid[i + increment] !== 'undefined') { 14455 if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) { 14456 stopIndex = i; 14457 groupSize = slidesGrid[i + increment] - slidesGrid[i]; 14458 } 14459 } else if (currentPos >= slidesGrid[i]) { 14460 stopIndex = i; 14461 groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; 14462 } 14463 } 14464 let rewindFirstIndex = null; 14465 let rewindLastIndex = null; 14466 if (params.rewind) { 14467 if (swiper.isBeginning) { 14468 rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; 14469 } else if (swiper.isEnd) { 14470 rewindFirstIndex = 0; 14471 } 14472 } 14473 // Find current slide size 14474 const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; 14475 const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 14476 if (timeDiff > params.longSwipesMs) { 14477 // Long touches 14478 if (!params.longSwipes) { 14479 swiper.slideTo(swiper.activeIndex); 14480 return; 14481 } 14482 if (swiper.swipeDirection === 'next') { 14483 if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex); 14484 } 14485 if (swiper.swipeDirection === 'prev') { 14486 if (ratio > 1 - params.longSwipesRatio) { 14487 swiper.slideTo(stopIndex + increment); 14488 } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) { 14489 swiper.slideTo(rewindLastIndex); 14490 } else { 14491 swiper.slideTo(stopIndex); 14492 } 14493 } 14494 } else { 14495 // Short swipes 14496 if (!params.shortSwipes) { 14497 swiper.slideTo(swiper.activeIndex); 14498 return; 14499 } 14500 const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); 14501 if (!isNavButtonTarget) { 14502 if (swiper.swipeDirection === 'next') { 14503 swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment); 14504 } 14505 if (swiper.swipeDirection === 'prev') { 14506 swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex); 14507 } 14508 } else if (e.target === swiper.navigation.nextEl) { 14509 swiper.slideTo(stopIndex + increment); 14510 } else { 14511 swiper.slideTo(stopIndex); 14512 } 14513 } 14514 } 14515 14516 function onResize() { 14517 const swiper = this; 14518 const { 14519 params, 14520 el 14521 } = swiper; 14522 if (el && el.offsetWidth === 0) return; 14523 14524 // Breakpoints 14525 if (params.breakpoints) { 14526 swiper.setBreakpoint(); 14527 } 14528 14529 // Save locks 14530 const { 14531 allowSlideNext, 14532 allowSlidePrev, 14533 snapGrid 14534 } = swiper; 14535 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 14536 14537 // Disable locks on resize 14538 swiper.allowSlideNext = true; 14539 swiper.allowSlidePrev = true; 14540 swiper.updateSize(); 14541 swiper.updateSlides(); 14542 swiper.updateSlidesClasses(); 14543 const isVirtualLoop = isVirtual && params.loop; 14544 if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) { 14545 swiper.slideTo(swiper.slides.length - 1, 0, false, true); 14546 } else { 14547 if (swiper.params.loop && !isVirtual) { 14548 swiper.slideToLoop(swiper.realIndex, 0, false, true); 14549 } else { 14550 swiper.slideTo(swiper.activeIndex, 0, false, true); 14551 } 14552 } 14553 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 14554 clearTimeout(swiper.autoplay.resizeTimeout); 14555 swiper.autoplay.resizeTimeout = setTimeout(() => { 14556 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 14557 swiper.autoplay.resume(); 14558 } 14559 }, 500); 14560 } 14561 // Return locks after resize 14562 swiper.allowSlidePrev = allowSlidePrev; 14563 swiper.allowSlideNext = allowSlideNext; 14564 if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { 14565 swiper.checkOverflow(); 14566 } 14567 } 14568 14569 function onClick(e) { 14570 const swiper = this; 14571 if (!swiper.enabled) return; 14572 if (!swiper.allowClick) { 14573 if (swiper.params.preventClicks) e.preventDefault(); 14574 if (swiper.params.preventClicksPropagation && swiper.animating) { 14575 e.stopPropagation(); 14576 e.stopImmediatePropagation(); 14577 } 14578 } 14579 } 14580 14581 function onScroll() { 14582 const swiper = this; 14583 const { 14584 wrapperEl, 14585 rtlTranslate, 14586 enabled 14587 } = swiper; 14588 if (!enabled) return; 14589 swiper.previousTranslate = swiper.translate; 14590 if (swiper.isHorizontal()) { 14591 swiper.translate = -wrapperEl.scrollLeft; 14592 } else { 14593 swiper.translate = -wrapperEl.scrollTop; 14594 } 14595 // eslint-disable-next-line 14596 if (swiper.translate === 0) swiper.translate = 0; 14597 swiper.updateActiveIndex(); 14598 swiper.updateSlidesClasses(); 14599 let newProgress; 14600 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 14601 if (translatesDiff === 0) { 14602 newProgress = 0; 14603 } else { 14604 newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; 14605 } 14606 if (newProgress !== swiper.progress) { 14607 swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); 14608 } 14609 swiper.emit('setTranslate', swiper.translate, false); 14610 } 14611 14612 function onLoad(e) { 14613 const swiper = this; 14614 processLazyPreloader(swiper, e.target); 14615 if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) { 14616 return; 14617 } 14618 swiper.update(); 14619 } 14620 14621 let dummyEventAttached = false; 14622 function dummyEventListener() {} 14623 const events = (swiper, method) => { 14624 const document = getDocument(); 14625 const { 14626 params, 14627 el, 14628 wrapperEl, 14629 device 14630 } = swiper; 14631 const capture = !!params.nested; 14632 const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; 14633 const swiperMethod = method; 14634 14635 // Touch Events 14636 el[domMethod]('pointerdown', swiper.onTouchStart, { 14637 passive: false 14638 }); 14639 document[domMethod]('pointermove', swiper.onTouchMove, { 14640 passive: false, 14641 capture 14642 }); 14643 document[domMethod]('pointerup', swiper.onTouchEnd, { 14644 passive: true 14645 }); 14646 document[domMethod]('pointercancel', swiper.onTouchEnd, { 14647 passive: true 14648 }); 14649 document[domMethod]('pointerout', swiper.onTouchEnd, { 14650 passive: true 14651 }); 14652 document[domMethod]('pointerleave', swiper.onTouchEnd, { 14653 passive: true 14654 }); 14655 document[domMethod]('contextmenu', swiper.onTouchEnd, { 14656 passive: true 14657 }); 14658 14659 // Prevent Links Clicks 14660 if (params.preventClicks || params.preventClicksPropagation) { 14661 el[domMethod]('click', swiper.onClick, true); 14662 } 14663 if (params.cssMode) { 14664 wrapperEl[domMethod]('scroll', swiper.onScroll); 14665 } 14666 14667 // Resize handler 14668 if (params.updateOnWindowResize) { 14669 swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true); 14670 } else { 14671 swiper[swiperMethod]('observerUpdate', onResize, true); 14672 } 14673 14674 // Images loader 14675 el[domMethod]('load', swiper.onLoad, { 14676 capture: true 14677 }); 14678 }; 14679 function attachEvents() { 14680 const swiper = this; 14681 const document = getDocument(); 14682 const { 14683 params 14684 } = swiper; 14685 swiper.onTouchStart = onTouchStart.bind(swiper); 14686 swiper.onTouchMove = onTouchMove.bind(swiper); 14687 swiper.onTouchEnd = onTouchEnd.bind(swiper); 14688 if (params.cssMode) { 14689 swiper.onScroll = onScroll.bind(swiper); 14690 } 14691 swiper.onClick = onClick.bind(swiper); 14692 swiper.onLoad = onLoad.bind(swiper); 14693 if (!dummyEventAttached) { 14694 document.addEventListener('touchstart', dummyEventListener); 14695 dummyEventAttached = true; 14696 } 14697 events(swiper, 'on'); 14698 } 14699 function detachEvents() { 14700 const swiper = this; 14701 events(swiper, 'off'); 14702 } 14703 var events$1 = { 14704 attachEvents, 14705 detachEvents 14706 }; 14707 14708 const isGridEnabled = (swiper, params) => { 14709 return swiper.grid && params.grid && params.grid.rows > 1; 14710 }; 14711 function setBreakpoint() { 14712 const swiper = this; 14713 const { 14714 realIndex, 14715 initialized, 14716 params, 14717 el 14718 } = swiper; 14719 const breakpoints = params.breakpoints; 14720 if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; 14721 14722 // Get breakpoint for window width and update parameters 14723 const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el); 14724 if (!breakpoint || swiper.currentBreakpoint === breakpoint) return; 14725 const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; 14726 const breakpointParams = breakpointOnlyParams || swiper.originalParams; 14727 const wasMultiRow = isGridEnabled(swiper, params); 14728 const isMultiRow = isGridEnabled(swiper, breakpointParams); 14729 const wasEnabled = params.enabled; 14730 if (wasMultiRow && !isMultiRow) { 14731 el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`); 14732 swiper.emitContainerClasses(); 14733 } else if (!wasMultiRow && isMultiRow) { 14734 el.classList.add(`${params.containerModifierClass}grid`); 14735 if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') { 14736 el.classList.add(`${params.containerModifierClass}grid-column`); 14737 } 14738 swiper.emitContainerClasses(); 14739 } 14740 14741 // Toggle navigation, pagination, scrollbar 14742 ['navigation', 'pagination', 'scrollbar'].forEach(prop => { 14743 if (typeof breakpointParams[prop] === 'undefined') return; 14744 const wasModuleEnabled = params[prop] && params[prop].enabled; 14745 const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled; 14746 if (wasModuleEnabled && !isModuleEnabled) { 14747 swiper[prop].disable(); 14748 } 14749 if (!wasModuleEnabled && isModuleEnabled) { 14750 swiper[prop].enable(); 14751 } 14752 }); 14753 const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; 14754 const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); 14755 if (directionChanged && initialized) { 14756 swiper.changeDirection(); 14757 } 14758 extend(swiper.params, breakpointParams); 14759 const isEnabled = swiper.params.enabled; 14760 Object.assign(swiper, { 14761 allowTouchMove: swiper.params.allowTouchMove, 14762 allowSlideNext: swiper.params.allowSlideNext, 14763 allowSlidePrev: swiper.params.allowSlidePrev 14764 }); 14765 if (wasEnabled && !isEnabled) { 14766 swiper.disable(); 14767 } else if (!wasEnabled && isEnabled) { 14768 swiper.enable(); 14769 } 14770 swiper.currentBreakpoint = breakpoint; 14771 swiper.emit('_beforeBreakpoint', breakpointParams); 14772 if (needsReLoop && initialized) { 14773 swiper.loopDestroy(); 14774 swiper.loopCreate(realIndex); 14775 swiper.updateSlides(); 14776 } 14777 swiper.emit('breakpoint', breakpointParams); 14778 } 14779 14780 function getBreakpoint(breakpoints, base, containerEl) { 14781 if (base === void 0) { 14782 base = 'window'; 14783 } 14784 if (!breakpoints || base === 'container' && !containerEl) return undefined; 14785 let breakpoint = false; 14786 const window = getWindow(); 14787 const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight; 14788 const points = Object.keys(breakpoints).map(point => { 14789 if (typeof point === 'string' && point.indexOf('@') === 0) { 14790 const minRatio = parseFloat(point.substr(1)); 14791 const value = currentHeight * minRatio; 14792 return { 14793 value, 14794 point 14795 }; 14796 } 14797 return { 14798 value: point, 14799 point 14800 }; 14801 }); 14802 points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10)); 14803 for (let i = 0; i < points.length; i += 1) { 14804 const { 14805 point, 14806 value 14807 } = points[i]; 14808 if (base === 'window') { 14809 if (window.matchMedia(`(min-width: ${value}px)`).matches) { 14810 breakpoint = point; 14811 } 14812 } else if (value <= containerEl.clientWidth) { 14813 breakpoint = point; 14814 } 14815 } 14816 return breakpoint || 'max'; 14817 } 14818 14819 var breakpoints = { 14820 setBreakpoint, 14821 getBreakpoint 14822 }; 14823 14824 function prepareClasses(entries, prefix) { 14825 const resultClasses = []; 14826 entries.forEach(item => { 14827 if (typeof item === 'object') { 14828 Object.keys(item).forEach(classNames => { 14829 if (item[classNames]) { 14830 resultClasses.push(prefix + classNames); 14831 } 14832 }); 14833 } else if (typeof item === 'string') { 14834 resultClasses.push(prefix + item); 14835 } 14836 }); 14837 return resultClasses; 14838 } 14839 function addClasses() { 14840 const swiper = this; 14841 const { 14842 classNames, 14843 params, 14844 rtl, 14845 el, 14846 device 14847 } = swiper; 14848 // prettier-ignore 14849 const suffixes = prepareClasses(['initialized', params.direction, { 14850 'free-mode': swiper.params.freeMode && params.freeMode.enabled 14851 }, {
vendor: 2,737 bytes, lines 14852-14957
14852 'autoheight': params.autoHeight 14853 }, { 14854 'rtl': rtl 14855 }, { 14856 'grid': params.grid && params.grid.rows > 1 14857 }, { 14858 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column' 14859 }, { 14860 'android': device.android 14861 }, { 14862 'ios': device.ios 14863 }, { 14864 'css-mode': params.cssMode 14865 }, { 14866 'centered': params.cssMode && params.centeredSlides 14867 }, { 14868 'watch-progress': params.watchSlidesProgress 14869 }], params.containerModifierClass); 14870 classNames.push(...suffixes); 14871 el.classList.add(...classNames); 14872 swiper.emitContainerClasses(); 14873 } 14874 14875 function removeClasses() { 14876 const swiper = this; 14877 const { 14878 el, 14879 classNames 14880 } = swiper; 14881 el.classList.remove(...classNames); 14882 swiper.emitContainerClasses(); 14883 } 14884 14885 var classes = { 14886 addClasses, 14887 removeClasses 14888 }; 14889 14890 function checkOverflow() { 14891 const swiper = this; 14892 const { 14893 isLocked: wasLocked, 14894 params 14895 } = swiper; 14896 const { 14897 slidesOffsetBefore 14898 } = params; 14899 if (slidesOffsetBefore) { 14900 const lastSlideIndex = swiper.slides.length - 1; 14901 const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2; 14902 swiper.isLocked = swiper.size > lastSlideRightEdge; 14903 } else { 14904 swiper.isLocked = swiper.snapGrid.length === 1; 14905 } 14906 if (params.allowSlideNext === true) { 14907 swiper.allowSlideNext = !swiper.isLocked; 14908 } 14909 if (params.allowSlidePrev === true) { 14910 swiper.allowSlidePrev = !swiper.isLocked; 14911 } 14912 if (wasLocked && wasLocked !== swiper.isLocked) { 14913 swiper.isEnd = false; 14914 } 14915 if (wasLocked !== swiper.isLocked) { 14916 swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); 14917 } 14918 } 14919 var checkOverflow$1 = { 14920 checkOverflow 14921 }; 14922 14923 var defaults = { 14924 init: true, 14925 direction: 'horizontal', 14926 oneWayMovement: false, 14927 touchEventsTarget: 'wrapper', 14928 initialSlide: 0, 14929 speed: 300, 14930 cssMode: false, 14931 updateOnWindowResize: true, 14932 resizeObserver: true, 14933 nested: false, 14934 createElements: false, 14935 enabled: true, 14936 focusableElements: 'input, select, option, textarea, button, video, label', 14937 // Overrides 14938 width: null, 14939 height: null, 14940 // 14941 preventInteractionOnTransition: false, 14942 // ssr 14943 userAgent: null, 14944 url: null, 14945 // To support iOS's swipe-to-go-back gesture (when being used in-app). 14946 edgeSwipeDetection: false, 14947 edgeSwipeThreshold: 20, 14948 // Autoheight 14949 autoHeight: false, 14950 // Set wrapper width 14951 setWrapperSize: false, 14952 // Virtual Translate 14953 virtualTranslate: false, 14954 // Effects 14955 effect: 'slide', 14956 // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' 14957
vendor: 4,692 bytes, lines 14958-15121
14958 // Breakpoints 14959 breakpoints: undefined, 14960 breakpointsBase: 'window', 14961 // Slides grid 14962 spaceBetween: 0, 14963 slidesPerView: 1, 14964 slidesPerGroup: 1, 14965 slidesPerGroupSkip: 0, 14966 slidesPerGroupAuto: false, 14967 centeredSlides: false, 14968 centeredSlidesBounds: false, 14969 slidesOffsetBefore: 0, 14970 // in px 14971 slidesOffsetAfter: 0, 14972 // in px 14973 normalizeSlideIndex: true, 14974 centerInsufficientSlides: false, 14975 // Disable swiper and hide navigation when container not overflow 14976 watchOverflow: true, 14977 // Round length 14978 roundLengths: false, 14979 // Touches 14980 touchRatio: 1, 14981 touchAngle: 45, 14982 simulateTouch: true, 14983 shortSwipes: true, 14984 longSwipes: true, 14985 longSwipesRatio: 0.5, 14986 longSwipesMs: 300, 14987 followFinger: true, 14988 allowTouchMove: true, 14989 threshold: 5, 14990 touchMoveStopPropagation: false, 14991 touchStartPreventDefault: true, 14992 touchStartForcePreventDefault: false, 14993 touchReleaseOnEdges: false, 14994 // Unique Navigation Elements 14995 uniqueNavElements: true, 14996 // Resistance 14997 resistance: true, 14998 resistanceRatio: 0.85, 14999 // Progress 15000 watchSlidesProgress: false, 15001 // Cursor 15002 grabCursor: false, 15003 // Clicks 15004 preventClicks: true, 15005 preventClicksPropagation: true, 15006 slideToClickedSlide: false, 15007 // loop 15008 loop: false, 15009 loopedSlides: null, 15010 loopPreventsSliding: true, 15011 // rewind 15012 rewind: false, 15013 // Swiping/no swiping 15014 allowSlidePrev: true, 15015 allowSlideNext: true, 15016 swipeHandler: null, 15017 // '.swipe-handler', 15018 noSwiping: true, 15019 noSwipingClass: 'swiper-no-swiping', 15020 noSwipingSelector: null, 15021 // Passive Listeners 15022 passiveListeners: true, 15023 maxBackfaceHiddenSlides: 10, 15024 // NS 15025 containerModifierClass: 'swiper-', 15026 // NEW 15027 slideClass: 'swiper-slide', 15028 slideActiveClass: 'swiper-slide-active', 15029 slideVisibleClass: 'swiper-slide-visible', 15030 slideNextClass: 'swiper-slide-next', 15031 slidePrevClass: 'swiper-slide-prev', 15032 wrapperClass: 'swiper-wrapper', 15033 lazyPreloaderClass: 'swiper-lazy-preloader', 15034 lazyPreloadPrevNext: 0, 15035 // Callbacks 15036 runCallbacksOnInit: true, 15037 // Internals 15038 _emitClasses: false 15039 }; 15040 15041 function moduleExtendParams(params, allModulesParams) { 15042 return function extendParams(obj) { 15043 if (obj === void 0) { 15044 obj = {}; 15045 } 15046 const moduleParamName = Object.keys(obj)[0]; 15047 const moduleParams = obj[moduleParamName]; 15048 if (typeof moduleParams !== 'object' || moduleParams === null) { 15049 extend(allModulesParams, obj); 15050 return; 15051 } 15052 if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) { 15053 params[moduleParamName] = { 15054 auto: true 15055 }; 15056 } 15057 if (!(moduleParamName in params && 'enabled' in moduleParams)) { 15058 extend(allModulesParams, obj); 15059 return; 15060 } 15061 if (params[moduleParamName] === true) { 15062 params[moduleParamName] = { 15063 enabled: true 15064 }; 15065 } 15066 if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) { 15067 params[moduleParamName].enabled = true; 15068 } 15069 if (!params[moduleParamName]) params[moduleParamName] = { 15070 enabled: false 15071 }; 15072 extend(allModulesParams, obj); 15073 }; 15074 } 15075 15076 /* eslint no-param-reassign: "off" */ 15077 const prototypes = { 15078 eventsEmitter, 15079 update, 15080 translate, 15081 transition, 15082 slide, 15083 loop, 15084 grabCursor, 15085 events: events$1, 15086 breakpoints, 15087 checkOverflow: checkOverflow$1, 15088 classes 15089 }; 15090 const extendedDefaults = {}; 15091 class Swiper { 15092 constructor() { 15093 let el; 15094 let params; 15095 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 15096 args[_key] = arguments[_key]; 15097 } 15098 if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') { 15099 params = args[0]; 15100 } else { 15101 [el, params] = args; 15102 } 15103 if (!params) params = {}; 15104 params = extend({}, params); 15105 if (el && !params.el) params.el = el; 15106 const document = getDocument(); 15107 if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) { 15108 const swipers = []; 15109 document.querySelectorAll(params.el).forEach(containerEl => { 15110 const newParams = extend({}, params, { 15111 el: containerEl 15112 }); 15113 swipers.push(new Swiper(newParams)); 15114 }); 15115 // eslint-disable-next-line no-constructor-return 15116 return swipers; 15117 } 15118 15119 // Swiper Instance 15120 const swiper = this; 15121 swiper.__swiper__ = true;
vendor: 7,046 bytes, lines 15122-15348
15122 swiper.support = getSupport(); 15123 swiper.device = getDevice({ 15124 userAgent: params.userAgent 15125 }); 15126 swiper.browser = getBrowser(); 15127 swiper.eventsListeners = {}; 15128 swiper.eventsAnyListeners = []; 15129 swiper.modules = [...swiper.__modules__]; 15130 if (params.modules && Array.isArray(params.modules)) { 15131 swiper.modules.push(...params.modules); 15132 } 15133 const allModulesParams = {}; 15134 swiper.modules.forEach(mod => { 15135 mod({ 15136 params, 15137 swiper, 15138 extendParams: moduleExtendParams(params, allModulesParams), 15139 on: swiper.on.bind(swiper), 15140 once: swiper.once.bind(swiper), 15141 off: swiper.off.bind(swiper), 15142 emit: swiper.emit.bind(swiper) 15143 }); 15144 }); 15145 15146 // Extend defaults with modules params 15147 const swiperParams = extend({}, defaults, allModulesParams); 15148 15149 // Extend defaults with passed params 15150 swiper.params = extend({}, swiperParams, extendedDefaults, params); 15151 swiper.originalParams = extend({}, swiper.params); 15152 swiper.passedParams = extend({}, params); 15153 15154 // add event listeners 15155 if (swiper.params && swiper.params.on) { 15156 Object.keys(swiper.params.on).forEach(eventName => { 15157 swiper.on(eventName, swiper.params.on[eventName]); 15158 }); 15159 } 15160 if (swiper.params && swiper.params.onAny) { 15161 swiper.onAny(swiper.params.onAny); 15162 } 15163 15164 // Extend Swiper 15165 Object.assign(swiper, { 15166 enabled: swiper.params.enabled, 15167 el, 15168 // Classes 15169 classNames: [], 15170 // Slides 15171 slides: [], 15172 slidesGrid: [], 15173 snapGrid: [], 15174 slidesSizesGrid: [], 15175 // isDirection 15176 isHorizontal() { 15177 return swiper.params.direction === 'horizontal'; 15178 }, 15179 isVertical() { 15180 return swiper.params.direction === 'vertical'; 15181 }, 15182 // Indexes 15183 activeIndex: 0, 15184 realIndex: 0, 15185 // 15186 isBeginning: true, 15187 isEnd: false, 15188 // Props 15189 translate: 0, 15190 previousTranslate: 0, 15191 progress: 0, 15192 velocity: 0, 15193 animating: false, 15194 cssOverflowAdjustment() { 15195 // Returns 0 unless `translate` is > 2**23 15196 // Should be subtracted from css values to prevent overflow 15197 return Math.trunc(this.translate / 2 ** 23) * 2 ** 23; 15198 }, 15199 // Locks 15200 allowSlideNext: swiper.params.allowSlideNext, 15201 allowSlidePrev: swiper.params.allowSlidePrev, 15202 // Touch Events 15203 touchEventsData: { 15204 isTouched: undefined, 15205 isMoved: undefined, 15206 allowTouchCallbacks: undefined, 15207 touchStartTime: undefined, 15208 isScrolling: undefined, 15209 currentTranslate: undefined, 15210 startTranslate: undefined, 15211 allowThresholdMove: undefined, 15212 // Form elements to match 15213 focusableElements: swiper.params.focusableElements, 15214 // Last click time 15215 lastClickTime: 0, 15216 clickTimeout: undefined, 15217 // Velocities 15218 velocities: [], 15219 allowMomentumBounce: undefined, 15220 startMoving: undefined, 15221 evCache: [] 15222 }, 15223 // Clicks 15224 allowClick: true, 15225 // Touches 15226 allowTouchMove: swiper.params.allowTouchMove, 15227 touches: { 15228 startX: 0, 15229 startY: 0, 15230 currentX: 0, 15231 currentY: 0, 15232 diff: 0 15233 }, 15234 // Images 15235 imagesToLoad: [], 15236 imagesLoaded: 0 15237 }); 15238 swiper.emit('_swiper'); 15239 15240 // Init 15241 if (swiper.params.init) { 15242 swiper.init(); 15243 } 15244 15245 // Return app instance 15246 // eslint-disable-next-line no-constructor-return 15247 return swiper; 15248 } 15249 getSlideIndex(slideEl) { 15250 const { 15251 slidesEl, 15252 params 15253 } = this; 15254 const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`); 15255 const firstSlideIndex = elementIndex(slides[0]); 15256 return elementIndex(slideEl) - firstSlideIndex; 15257 } 15258 getSlideIndexByData(index) { 15259 return this.getSlideIndex(this.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index)[0]); 15260 } 15261 recalcSlides() { 15262 const swiper = this; 15263 const { 15264 slidesEl, 15265 params 15266 } = swiper; 15267 swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`); 15268 } 15269 enable() { 15270 const swiper = this; 15271 if (swiper.enabled) return; 15272 swiper.enabled = true; 15273 if (swiper.params.grabCursor) { 15274 swiper.setGrabCursor(); 15275 } 15276 swiper.emit('enable'); 15277 } 15278 disable() { 15279 const swiper = this; 15280 if (!swiper.enabled) return; 15281 swiper.enabled = false; 15282 if (swiper.params.grabCursor) { 15283 swiper.unsetGrabCursor(); 15284 } 15285 swiper.emit('disable'); 15286 } 15287 setProgress(progress, speed) { 15288 const swiper = this; 15289 progress = Math.min(Math.max(progress, 0), 1); 15290 const min = swiper.minTranslate(); 15291 const max = swiper.maxTranslate(); 15292 const current = (max - min) * progress + min; 15293 swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed); 15294 swiper.updateActiveIndex(); 15295 swiper.updateSlidesClasses(); 15296 } 15297 emitContainerClasses() { 15298 const swiper = this; 15299 if (!swiper.params._emitClasses || !swiper.el) return; 15300 const cls = swiper.el.className.split(' ').filter(className => { 15301 return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0; 15302 }); 15303 swiper.emit('_containerClasses', cls.join(' ')); 15304 } 15305 getSlideClasses(slideEl) { 15306 const swiper = this; 15307 if (swiper.destroyed) return ''; 15308 return slideEl.className.split(' ').filter(className => { 15309 return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0; 15310 }).join(' '); 15311 } 15312 emitSlidesClasses() { 15313 const swiper = this; 15314 if (!swiper.params._emitClasses || !swiper.el) return; 15315 const updates = []; 15316 swiper.slides.forEach(slideEl => { 15317 const classNames = swiper.getSlideClasses(slideEl); 15318 updates.push({ 15319 slideEl, 15320 classNames 15321 }); 15322 swiper.emit('_slideClass', slideEl, classNames); 15323 }); 15324 swiper.emit('_slideClasses', updates); 15325 } 15326 slidesPerViewDynamic(view, exact) { 15327 if (view === void 0) { 15328 view = 'current'; 15329 } 15330 if (exact === void 0) { 15331 exact = false; 15332 } 15333 const swiper = this; 15334 const { 15335 params, 15336 slides, 15337 slidesGrid, 15338 slidesSizesGrid, 15339 size: swiperSize, 15340 activeIndex 15341 } = swiper; 15342 let spv = 1; 15343 if (params.centeredSlides) { 15344 let slideSize = slides[activeIndex] ? slides[activeIndex].swiperSlideSize : 0; 15345 let breakLoop; 15346 for (let i = activeIndex + 1; i < slides.length; i += 1) { 15347 if (slides[i] && !breakLoop) { 15348 slideSize += slides[i].swiperSlideSize
vendor: 4,845 bytes, lines 15348-15485
15348; 15349 spv += 1; 15350 if (slideSize > swiperSize) breakLoop = true; 15351 } 15352 } 15353 for (let i = activeIndex - 1; i >= 0; i -= 1) { 15354 if (slides[i] && !breakLoop) { 15355 slideSize += slides[i].swiperSlideSize; 15356 spv += 1; 15357 if (slideSize > swiperSize) breakLoop = true; 15358 } 15359 } 15360 } else { 15361 // eslint-disable-next-line 15362 if (view === 'current') { 15363 for (let i = activeIndex + 1; i < slides.length; i += 1) { 15364 const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize; 15365 if (slideInView) { 15366 spv += 1; 15367 } 15368 } 15369 } else { 15370 // previous 15371 for (let i = activeIndex - 1; i >= 0; i -= 1) { 15372 const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize; 15373 if (slideInView) { 15374 spv += 1; 15375 } 15376 } 15377 } 15378 } 15379 return spv; 15380 } 15381 update() { 15382 const swiper = this; 15383 if (!swiper || swiper.destroyed) return; 15384 const { 15385 snapGrid, 15386 params 15387 } = swiper; 15388 // Breakpoints 15389 if (params.breakpoints) { 15390 swiper.setBreakpoint(); 15391 } 15392 [...swiper.el.querySelectorAll('[loading="lazy"]')].forEach(imageEl => { 15393 if (imageEl.complete) { 15394 processLazyPreloader(swiper, imageEl); 15395 } 15396 }); 15397 swiper.updateSize(); 15398 swiper.updateSlides(); 15399 swiper.updateProgress(); 15400 swiper.updateSlidesClasses(); 15401 function setTranslate() { 15402 const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; 15403 const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); 15404 swiper.setTranslate(newTranslate); 15405 swiper.updateActiveIndex(); 15406 swiper.updateSlidesClasses(); 15407 } 15408 let translated; 15409 if (params.freeMode && params.freeMode.enabled && !params.cssMode) { 15410 setTranslate(); 15411 if (params.autoHeight) { 15412 swiper.updateAutoHeight(); 15413 } 15414 } else { 15415 if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) { 15416 const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides; 15417 translated = swiper.slideTo(slides.length - 1, 0, false, true); 15418 } else { 15419 translated = swiper.slideTo(swiper.activeIndex, 0, false, true); 15420 } 15421 if (!translated) { 15422 setTranslate(); 15423 } 15424 } 15425 if (params.watchOverflow && snapGrid !== swiper.snapGrid) { 15426 swiper.checkOverflow(); 15427 } 15428 swiper.emit('update'); 15429 } 15430 changeDirection(newDirection, needUpdate) { 15431 if (needUpdate === void 0) { 15432 needUpdate = true; 15433 } 15434 const swiper = this; 15435 const currentDirection = swiper.params.direction; 15436 if (!newDirection) { 15437 // eslint-disable-next-line 15438 newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; 15439 } 15440 if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') { 15441 return swiper; 15442 } 15443 swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`); 15444 swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`); 15445 swiper.emitContainerClasses(); 15446 swiper.params.direction = newDirection; 15447 swiper.slides.forEach(slideEl => { 15448 if (newDirection === 'vertical') { 15449 slideEl.style.width = ''; 15450 } else { 15451 slideEl.style.height = ''; 15452 } 15453 }); 15454 swiper.emit('changeDirection'); 15455 if (needUpdate) swiper.update(); 15456 return swiper; 15457 } 15458 changeLanguageDirection(direction) { 15459 const swiper = this; 15460 if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return; 15461 swiper.rtl = direction === 'rtl'; 15462 swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl; 15463 if (swiper.rtl) { 15464 swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`); 15465 swiper.el.dir = 'rtl'; 15466 } else { 15467 swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`); 15468 swiper.el.dir = 'ltr'; 15469 } 15470 swiper.update(); 15471 } 15472 mount(element) { 15473 const swiper = this; 15474 if (swiper.mounted) return true; 15475 15476 // Find el 15477 let el = element || swiper.params.el; 15478 if (typeof el === 'string') { 15479 el = document.querySelector(el); 15480 } 15481 if (!el) { 15482 return false; 15483 } 15484 el.swiper = swiper; 15485 if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName ===
vendor: 792 bytes, lines 15485-15504
15485'SWIPER-CONTAINER') { 15486 swiper.isElement = true; 15487 } 15488 const getWrapperSelector = () => { 15489 return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`; 15490 }; 15491 const getWrapper = () => { 15492 if (el && el.shadowRoot && el.shadowRoot.querySelector) { 15493 const res = el.shadowRoot.querySelector(getWrapperSelector()); 15494 // Children needs to return slot items 15495 return res; 15496 } 15497 return elementChildren(el, getWrapperSelector())[0]; 15498 }; 15499 // Find Wrapper 15500 let wrapperEl = getWrapper(); 15501 if (!wrapperEl && swiper.params.createElements) { 15502 wrapperEl = createElement('div', swiper.params.wrapperClass); 15503 el.append(wrapperEl); 15504 elementChildren(el, `.${swiper.params.slideClass}
15504`).forEach(slideEl => { 15505 wrapperEl.append(slideEl); 15506 }); 15507 } 15508 Object.assign(swiper, { 15509 el, 15510 wrapperEl, 15511 slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl, 15512 hostEl: swiper.isElement ? el.parentNode.host : el, 15513 mounted: true, 15514 // RTL 15515 rtl: el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl', 15516 rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl'), 15517 wrongRTL: elementStyle(wrapperEl, 'display') === '-webkit-box' 15518 }); 15519 return true; 15520 } 15521 init(el) { 15522 const swiper = this; 15523 if (swiper.initialized) return swiper; 15524 const mounted = swiper.mount(el); 15525 if (mounted === false) return swiper; 15526 swiper.emit('beforeInit'); 15527 15528 // Set breakpoint 15529 if (swiper.params.breakpoints) { 15530 swiper.setBreakpoint(); 15531 } 15532 15533 // Add Classes 15534 swiper.addClasses(); 15535 15536 // Update size 15537 swiper.updateSize(); 15538 15539 // Update slides 15540 swiper.updateSlides(); 15541 if (swiper.params.watchOverflow) { 15542 swiper.checkOverflow(); 15543 } 15544 15545 // Set Grab Cursor 15546 if (swiper.params.grabCursor && swiper.enabled) { 15547 swiper.setGrabCursor(); 15548 } 15549 15550 // Slide To Initial Slide 15551 if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) { 15552 swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true); 15553 } else { 15554 swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true); 15555 } 15556 15557 // Create loop 15558 if (swiper.params.loop) { 15559 swiper.loopCreate(); 15560 } 15561 15562 // Attach events 15563 swiper.attachEvents(); 15564 const lazyElements = [...swiper.el.querySelectorAll('[loading="lazy"]')]; 15565 if (swiper.isElement) { 15566 lazyElements.push(...swiper.hostEl.querySelectorAll('[loading="lazy"]')); 15567 } 15568 lazyElements.forEach(imageEl => { 15569 if (imageEl.complete) { 15570 processLazyPreloader(swiper, imageEl); 15571 } else { 15572 imageEl.addEventListener('load', e => { 15573 processLazyPreloader(swiper, e.target); 15574 }); 15575 } 15576 }); 15577 preload(swiper); 15578 15579 // Init Flag 15580 swiper.initialized = true; 15581 preload(swiper); 15582 15583 // Emit 15584 swiper.emit('init'); 15585 swiper.emit('afterInit'); 15586 return swiper; 15587 } 15588 destroy(deleteInstance, cleanStyles) { 15589 if (deleteInstance === void 0) { 15590 deleteInstance = true; 15591 } 15592 if (cleanStyles === void 0) { 15593 cleanStyles = true; 15594 } 15595 const swiper = this; 15596 const { 15597 params, 15598 el, 15599 wrapperEl, 15600 slides 15601 } = swiper; 15602 if (typeof swiper.params === 'undefined' || swiper.destroyed) { 15603 return null; 15604 } 15605 swiper.emit('beforeDestroy'); 15606 15607 // Init Flag 15608 swiper.initialized = false; 15609 15610 // Detach events 15611 swiper.detachEvents(); 15612 15613 // Destroy loop 15614 if (params.loop) { 15615 swiper.loopDestroy(); 15616 } 15617 15618 // Cleanup styles 15619 if (cleanStyles) { 15620 swiper.removeClasses(); 15621 el.removeAttribute('style'); 15622 wrapperEl.removeAttribute('style'); 15623 if (slides && slides.length) {
vendor: 5,308 bytes, lines 15624-15793
15624 slides.forEach(slideEl => { 15625 slideEl.classList.remove(params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass); 15626 slideEl.removeAttribute('style'); 15627 slideEl.removeAttribute('data-swiper-slide-index'); 15628 }); 15629 } 15630 } 15631 swiper.emit('destroy'); 15632 15633 // Detach emitter events 15634 Object.keys(swiper.eventsListeners).forEach(eventName => { 15635 swiper.off(eventName); 15636 }); 15637 if (deleteInstance !== false) { 15638 swiper.el.swiper = null; 15639 deleteProps(swiper); 15640 } 15641 swiper.destroyed = true; 15642 return null; 15643 } 15644 static extendDefaults(newDefaults) { 15645 extend(extendedDefaults, newDefaults); 15646 } 15647 static get extendedDefaults() { 15648 return extendedDefaults; 15649 } 15650 static get defaults() { 15651 return defaults; 15652 } 15653 static installModule(mod) { 15654 if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = []; 15655 const modules = Swiper.prototype.__modules__; 15656 if (typeof mod === 'function' && modules.indexOf(mod) < 0) { 15657 modules.push(mod); 15658 } 15659 } 15660 static use(module) { 15661 if (Array.isArray(module)) { 15662 module.forEach(m => Swiper.installModule(m)); 15663 return Swiper; 15664 } 15665 Swiper.installModule(module); 15666 return Swiper; 15667 } 15668 } 15669 Object.keys(prototypes).forEach(prototypeGroup => { 15670 Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => { 15671 Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; 15672 }); 15673 }); 15674 Swiper.use([Resize, Observer]); 15675 15676 function Virtual(_ref) { 15677 let { 15678 swiper, 15679 extendParams, 15680 on, 15681 emit 15682 } = _ref; 15683 extendParams({ 15684 virtual: { 15685 enabled: false, 15686 slides: [], 15687 cache: true, 15688 renderSlide: null, 15689 renderExternal: null, 15690 renderExternalUpdate: true, 15691 addSlidesBefore: 0, 15692 addSlidesAfter: 0 15693 } 15694 }); 15695 let cssModeTimeout; 15696 const document = getDocument(); 15697 swiper.virtual = { 15698 cache: {}, 15699 from: undefined, 15700 to: undefined, 15701 slides: [], 15702 offset: 0, 15703 slidesGrid: [] 15704 }; 15705 const tempDOM = document.createElement('div'); 15706 function renderSlide(slide, index) { 15707 const params = swiper.params.virtual; 15708 if (params.cache && swiper.virtual.cache[index]) { 15709 return swiper.virtual.cache[index]; 15710 } 15711 // eslint-disable-next-line 15712 let slideEl; 15713 if (params.renderSlide) { 15714 slideEl = params.renderSlide.call(swiper, slide, index); 15715 if (typeof slideEl === 'string') { 15716 tempDOM.innerHTML = slideEl; 15717 slideEl = tempDOM.children[0]; 15718 } 15719 } else if (swiper.isElement) { 15720 slideEl = createElement('swiper-slide'); 15721 } else { 15722 slideEl = createElement('div', swiper.params.slideClass); 15723 } 15724 slideEl.setAttribute('data-swiper-slide-index', index); 15725 if (!params.renderSlide) { 15726 slideEl.innerHTML = slide; 15727 } 15728 if (params.cache) swiper.virtual.cache[index] = slideEl; 15729 return slideEl; 15730 } 15731 function update(force) { 15732 const { 15733 slidesPerView, 15734 slidesPerGroup, 15735 centeredSlides, 15736 loop: isLoop 15737 } = swiper.params; 15738 const { 15739 addSlidesBefore, 15740 addSlidesAfter 15741 } = swiper.params.virtual; 15742 const { 15743 from: previousFrom, 15744 to: previousTo, 15745 slides, 15746 slidesGrid: previousSlidesGrid, 15747 offset: previousOffset 15748 } = swiper.virtual; 15749 if (!swiper.params.cssMode) { 15750 swiper.updateActiveIndex(); 15751 } 15752 const activeIndex = swiper.activeIndex || 0; 15753 let offsetProp; 15754 if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top'; 15755 let slidesAfter; 15756 let slidesBefore; 15757 if (centeredSlides) { 15758 slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; 15759 slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; 15760 } else { 15761 slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter; 15762 slidesBefore = (isLoop ? slidesPerView : slidesPerGroup) + addSlidesBefore; 15763 } 15764 let from = activeIndex - slidesBefore; 15765 let to = activeIndex + slidesAfter; 15766 if (!isLoop) { 15767 from = Math.max(from, 0); 15768 to = Math.min(to, slides.length - 1); 15769 } 15770 let offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); 15771 if (isLoop && activeIndex >= slidesBefore) { 15772 from -= slidesBefore; 15773 if (!centeredSlides) offset += swiper.slidesGrid[0]; 15774 } else if (isLoop && activeIndex < slidesBefore) { 15775 from = -slidesBefore; 15776 if (centeredSlides) offset += swiper.slidesGrid[0]; 15777 } 15778 Object.assign(swiper.virtual, { 15779 from, 15780 to, 15781 offset, 15782 slidesGrid: swiper.slidesGrid, 15783 slidesBefore, 15784 slidesAfter 15785 }); 15786 function onRendered() { 15787 swiper.updateSlides(); 15788 swiper.updateProgress(); 15789 swiper.updateSlidesClasses(); 15790 emit('virtualUpdate'); 15791 } 15792 if (previousFrom === from && previousTo === to && !force) { 15793 if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {
vendor: 1,311 bytes, lines 15794-15835
15794 swiper.slides.forEach(slideEl => { 15795 slideEl.style[offsetProp] = `${offset - Math.abs(swiper.cssOverflowAdjustment())}px`; 15796 }); 15797 } 15798 swiper.updateProgress(); 15799 emit('virtualUpdate'); 15800 return; 15801 } 15802 if (swiper.params.virtual.renderExternal) { 15803 swiper.params.virtual.renderExternal.call(swiper, { 15804 offset, 15805 from, 15806 to, 15807 slides: function getSlides() { 15808 const slidesToRender = []; 15809 for (let i = from; i <= to; i += 1) { 15810 slidesToRender.push(slides[i]); 15811 } 15812 return slidesToRender; 15813 }() 15814 }); 15815 if (swiper.params.virtual.renderExternalUpdate) { 15816 onRendered(); 15817 } else { 15818 emit('virtualUpdate'); 15819 } 15820 return; 15821 } 15822 const prependIndexes = []; 15823 const appendIndexes = []; 15824 const getSlideIndex = index => { 15825 let slideIndex = index; 15826 if (index < 0) { 15827 slideIndex = slides.length + index; 15828 } else if (slideIndex >= slides.length) { 15829 // eslint-disable-next-line 15830 slideIndex = slideIndex - slides.length; 15831 } 15832 return slideIndex; 15833 }; 15834 if (force) { 15835 swiper.slidesEl.querySelectorAll(`.${swiper.params.slideClass}
15835, swiper-slide`).forEach(slideEl => { 15836 slideEl.remove(); 15837 }); 15838 } else { 15839 for (let i = previousFrom; i <= previousTo; i += 1) { 15840 if (i < from || i > to) { 15841 const slideIndex = getSlideIndex(i); 15842 swiper.slidesEl.querySelectorAll(`.${swiper.params.slideClass}[data-swiper-slide-index="${slideIndex}"], swiper-slide[data-swiper-slide-index="${slideIndex}"]`).forEach(slideEl => { 15843 slideEl.remove(); 15844 }); 15845 } 15846 } 15847 } 15848 const loopFrom = isLoop ? -slides.length : 0; 15849 const loopTo = isLoop ? slides.length * 2 : slides.length; 15850 for (let i = loopFrom; i < loopTo; i += 1) { 15851 if (i >= from && i <= to) { 15852 const slideIndex = getSlideIndex(i); 15853 if (typeof previousTo === 'undefined' || force) { 15854 appendIndexes.push(slideIndex); 15855 } else { 15856 if (i > previousTo) appendIndexes.push(slideIndex); 15857 if (i < previousFrom) prependIndexes.push(slideIndex); 15858 } 15859 } 15860 } 15861 appendIndexes.forEach(index => { 15862 swiper.slidesEl.append(renderSlide(slides[index], index)); 15863 }); 15864 if (isLoop) { 15865 for (let i = prependIndexes.length - 1; i >= 0; i -= 1) { 15866 const index = prependIndexes[i]; 15867 swiper.slidesEl.prepend(renderSlide(slides[index], index)); 15868 } 15869 } else { 15870 prependIndexes.sort((a, b) => b - a); 15871 prependIndexes.forEach(index => { 15872 swiper.slidesEl.prepend(renderSlide(slides[index], index)); 15873 }); 15874 } 15875 elementChildren(swiper.slidesEl, '.swiper-slide, swiper-slide').forEach(sli
vendor: 4,316 bytes, lines 15875-15991
15875deEl => { 15876 slideEl.style[offsetProp] = `${offset - Math.abs(swiper.cssOverflowAdjustment())}px`; 15877 }); 15878 onRendered(); 15879 } 15880 function appendSlide(slides) { 15881 if (typeof slides === 'object' && 'length' in slides) { 15882 for (let i = 0; i < slides.length; i += 1) { 15883 if (slides[i]) swiper.virtual.slides.push(slides[i]); 15884 } 15885 } else { 15886 swiper.virtual.slides.push(slides); 15887 } 15888 update(true); 15889 } 15890 function prependSlide(slides) { 15891 const activeIndex = swiper.activeIndex; 15892 let newActiveIndex = activeIndex + 1; 15893 let numberOfNewSlides = 1; 15894 if (Array.isArray(slides)) { 15895 for (let i = 0; i < slides.length; i += 1) { 15896 if (slides[i]) swiper.virtual.slides.unshift(slides[i]); 15897 } 15898 newActiveIndex = activeIndex + slides.length; 15899 numberOfNewSlides = slides.length; 15900 } else { 15901 swiper.virtual.slides.unshift(slides); 15902 } 15903 if (swiper.params.virtual.cache) { 15904 const cache = swiper.virtual.cache; 15905 const newCache = {}; 15906 Object.keys(cache).forEach(cachedIndex => { 15907 const cachedEl = cache[cachedIndex]; 15908 const cachedElIndex = cachedEl.getAttribute('data-swiper-slide-index'); 15909 if (cachedElIndex) { 15910 cachedEl.setAttribute('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides); 15911 } 15912 newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = cachedEl; 15913 }); 15914 swiper.virtual.cache = newCache; 15915 } 15916 update(true); 15917 swiper.slideTo(newActiveIndex, 0); 15918 } 15919 function removeSlide(slidesIndexes) { 15920 if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return; 15921 let activeIndex = swiper.activeIndex; 15922 if (Array.isArray(slidesIndexes)) { 15923 for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) { 15924 swiper.virtual.slides.splice(slidesIndexes[i], 1); 15925 if (swiper.params.virtual.cache) { 15926 delete swiper.virtual.cache[slidesIndexes[i]]; 15927 } 15928 if (slidesIndexes[i] < activeIndex) activeIndex -= 1; 15929 activeIndex = Math.max(activeIndex, 0); 15930 } 15931 } else { 15932 swiper.virtual.slides.splice(slidesIndexes, 1); 15933 if (swiper.params.virtual.cache) { 15934 delete swiper.virtual.cache[slidesIndexes]; 15935 } 15936 if (slidesIndexes < activeIndex) activeIndex -= 1; 15937 activeIndex = Math.max(activeIndex, 0); 15938 } 15939 update(true); 15940 swiper.slideTo(activeIndex, 0); 15941 } 15942 function removeAllSlides() { 15943 swiper.virtual.slides = []; 15944 if (swiper.params.virtual.cache) { 15945 swiper.virtual.cache = {}; 15946 } 15947 update(true); 15948 swiper.slideTo(0, 0); 15949 } 15950 on('beforeInit', () => { 15951 if (!swiper.params.virtual.enabled) return; 15952 let domSlidesAssigned; 15953 if (typeof swiper.passedParams.virtual.slides === 'undefined') { 15954 const slides = [...swiper.slidesEl.children].filter(el => el.matches(`.${swiper.params.slideClass}, swiper-slide`)); 15955 if (slides && slides.length) { 15956 swiper.virtual.slides = [...slides]; 15957 domSlidesAssigned = true; 15958 slides.forEach((slideEl, slideIndex) => { 15959 slideEl.setAttribute('data-swiper-slide-index', slideIndex); 15960 swiper.virtual.cache[slideIndex] = slideEl; 15961 slideEl.remove(); 15962 }); 15963 } 15964 } 15965 if (!domSlidesAssigned) { 15966 swiper.virtual.slides = swiper.params.virtual.slides; 15967 } 15968 swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`); 15969 swiper.params.watchSlidesProgress = true; 15970 swiper.originalParams.watchSlidesProgress = true; 15971 if (!swiper.params.initialSlide) { 15972 update(); 15973 } 15974 }); 15975 on('setTranslate', () => { 15976 if (!swiper.params.virtual.enabled) return; 15977 if (swiper.params.cssMode && !swiper._immediateVirtual) { 15978 clearTimeout(cssModeTimeout); 15979 cssModeTimeout = setTimeout(() => { 15980 update(); 15981 }, 100); 15982 } else { 15983 update(); 15984 } 15985 }); 15986 on('init update resize', () => { 15987 if (!swiper.params.virtual.enabled) return; 15988 if (swiper.params.cssMode) { 15989 setCSSProperty(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`); 15990 } 15991 });
vendor: 4,242 bytes, lines 15992-16096
15992 Object.assign(swiper.virtual, { 15993 appendSlide, 15994 prependSlide, 15995 removeSlide, 15996 removeAllSlides, 15997 update 15998 }); 15999 } 16000 16001 /* eslint-disable consistent-return */ 16002 function Keyboard(_ref) { 16003 let { 16004 swiper, 16005 extendParams, 16006 on, 16007 emit 16008 } = _ref; 16009 const document = getDocument(); 16010 const window = getWindow(); 16011 swiper.keyboard = { 16012 enabled: false 16013 }; 16014 extendParams({ 16015 keyboard: { 16016 enabled: false, 16017 onlyInViewport: true, 16018 pageUpDown: true 16019 } 16020 }); 16021 function handle(event) { 16022 if (!swiper.enabled) return; 16023 const { 16024 rtlTranslate: rtl 16025 } = swiper; 16026 let e = event; 16027 if (e.originalEvent) e = e.originalEvent; // jquery fix 16028 const kc = e.keyCode || e.charCode; 16029 const pageUpDown = swiper.params.keyboard.pageUpDown; 16030 const isPageUp = pageUpDown && kc === 33; 16031 const isPageDown = pageUpDown && kc === 34; 16032 const isArrowLeft = kc === 37; 16033 const isArrowRight = kc === 39; 16034 const isArrowUp = kc === 38; 16035 const isArrowDown = kc === 40; 16036 // Directions locks 16037 if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) { 16038 return false; 16039 } 16040 if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) { 16041 return false; 16042 } 16043 if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { 16044 return undefined; 16045 } 16046 if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) { 16047 return undefined; 16048 } 16049 if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) { 16050 let inView = false; 16051 // Check that swiper should be inside of visible area of window 16052 if (elementParents(swiper.el, `.${swiper.params.slideClass}, swiper-slide`).length > 0 && elementParents(swiper.el, `.${swiper.params.slideActiveClass}`).length === 0) { 16053 return undefined; 16054 } 16055 const el = swiper.el; 16056 const swiperWidth = el.clientWidth; 16057 const swiperHeight = el.clientHeight; 16058 const windowWidth = window.innerWidth; 16059 const windowHeight = window.innerHeight; 16060 const swiperOffset = elementOffset(el); 16061 if (rtl) swiperOffset.left -= el.scrollLeft; 16062 const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]]; 16063 for (let i = 0; i < swiperCoord.length; i += 1) { 16064 const point = swiperCoord[i]; 16065 if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) { 16066 if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line 16067 inView = true; 16068 } 16069 } 16070 if (!inView) return undefined; 16071 } 16072 if (swiper.isHorizontal()) { 16073 if (isPageUp || isPageDown || isArrowLeft || isArrowRight) { 16074 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 16075 } 16076 if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(); 16077 if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(); 16078 } else { 16079 if (isPageUp || isPageDown || isArrowUp || isArrowDown) { 16080 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 16081 } 16082 if (isPageDown || isArrowDown) swiper.slideNext(); 16083 if (isPageUp || isArrowUp) swiper.slidePrev(); 16084 } 16085 emit('keyPress', kc); 16086 return undefined; 16087 } 16088 function enable() { 16089 if (swiper.keyboard.enabled) return; 16090 document.addEventListener('keydown', handle); 16091 swiper.keyboard.enabled = true; 16092 } 16093 function disable() { 16094 if (!swiper.keyboard.enabled) return; 16095 document.removeEventListener('keydown', handle); 16096 swiper.keyboard.enabled = false;
vendor: 28,184 bytes, lines 16097-16850
16097 } 16098 on('init', () => { 16099 if (swiper.params.keyboard.enabled) { 16100 enable(); 16101 } 16102 }); 16103 on('destroy', () => { 16104 if (swiper.keyboard.enabled) { 16105 disable(); 16106 } 16107 }); 16108 Object.assign(swiper.keyboard, { 16109 enable, 16110 disable 16111 }); 16112 } 16113 16114 /* eslint-disable consistent-return */ 16115 function Mousewheel(_ref) { 16116 let { 16117 swiper, 16118 extendParams, 16119 on, 16120 emit 16121 } = _ref; 16122 const window = getWindow(); 16123 extendParams({ 16124 mousewheel: { 16125 enabled: false, 16126 releaseOnEdges: false, 16127 invert: false, 16128 forceToAxis: false, 16129 sensitivity: 1, 16130 eventsTarget: 'container', 16131 thresholdDelta: null, 16132 thresholdTime: null, 16133 noMousewheelClass: 'swiper-no-mousewheel' 16134 } 16135 }); 16136 swiper.mousewheel = { 16137 enabled: false 16138 }; 16139 let timeout; 16140 let lastScrollTime = now(); 16141 let lastEventBeforeSnap; 16142 const recentWheelEvents = []; 16143 function normalize(e) { 16144 // Reasonable defaults 16145 const PIXEL_STEP = 10; 16146 const LINE_HEIGHT = 40; 16147 const PAGE_HEIGHT = 800; 16148 let sX = 0; 16149 let sY = 0; // spinX, spinY 16150 let pX = 0; 16151 let pY = 0; // pixelX, pixelY 16152 16153 // Legacy 16154 if ('detail' in e) { 16155 sY = e.detail; 16156 } 16157 if ('wheelDelta' in e) { 16158 sY = -e.wheelDelta / 120; 16159 } 16160 if ('wheelDeltaY' in e) { 16161 sY = -e.wheelDeltaY / 120; 16162 } 16163 if ('wheelDeltaX' in e) { 16164 sX = -e.wheelDeltaX / 120; 16165 } 16166 16167 // side scrolling on FF with DOMMouseScroll 16168 if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { 16169 sX = sY; 16170 sY = 0; 16171 } 16172 pX = sX * PIXEL_STEP; 16173 pY = sY * PIXEL_STEP; 16174 if ('deltaY' in e) { 16175 pY = e.deltaY; 16176 } 16177 if ('deltaX' in e) { 16178 pX = e.deltaX; 16179 } 16180 if (e.shiftKey && !pX) { 16181 // if user scrolls with shift he wants horizontal scroll 16182 pX = pY; 16183 pY = 0; 16184 } 16185 if ((pX || pY) && e.deltaMode) { 16186 if (e.deltaMode === 1) { 16187 // delta in LINE units 16188 pX *= LINE_HEIGHT; 16189 pY *= LINE_HEIGHT; 16190 } else { 16191 // delta in PAGE units 16192 pX *= PAGE_HEIGHT; 16193 pY *= PAGE_HEIGHT; 16194 } 16195 } 16196 16197 // Fall-back if spin cannot be determined 16198 if (pX && !sX) { 16199 sX = pX < 1 ? -1 : 1; 16200 } 16201 if (pY && !sY) { 16202 sY = pY < 1 ? -1 : 1; 16203 } 16204 return { 16205 spinX: sX, 16206 spinY: sY, 16207 pixelX: pX, 16208 pixelY: pY 16209 }; 16210 } 16211 function handleMouseEnter() { 16212 if (!swiper.enabled) return; 16213 swiper.mouseEntered = true; 16214 } 16215 function handleMouseLeave() { 16216 if (!swiper.enabled) return; 16217 swiper.mouseEntered = false; 16218 } 16219 function animateSlider(newEvent) { 16220 if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) { 16221 // Prevent if delta of wheel scroll delta is below configured threshold 16222 return false; 16223 } 16224 if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) { 16225 // Prevent if time between scrolls is below configured threshold 16226 return false; 16227 } 16228 16229 // If the movement is NOT big enough and 16230 // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): 16231 // Don't go any further (avoid insignificant scroll movement). 16232 if (newEvent.delta >= 6 && now() - lastScrollTime < 60) { 16233 // Return false as a default 16234 return true; 16235 } 16236 // If user is scrolling towards the end: 16237 // If the slider hasn't hit the latest slide or 16238 // if the slider is a loop and 16239 // if the slider isn't moving right now: 16240 // Go to next slide and 16241 // emit a scroll event. 16242 // Else (the user is scrolling towards the beginning) and 16243 // if the slider hasn't hit the first slide or 16244 // if the slider is a loop and 16245 // if the slider isn't moving right now: 16246 // Go to prev slide and 16247 // emit a scroll event. 16248 if (newEvent.direction < 0) { 16249 if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { 16250 swiper.slideNext(); 16251 emit('scroll', newEvent.raw); 16252 } 16253 } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { 16254 swiper.slidePrev(); 16255 emit('scroll', newEvent.raw); 16256 } 16257 // If you got here is because an animation has been triggered so store the current time 16258 lastScrollTime = new window.Date().getTime(); 16259 // Return false as a default 16260 return false; 16261 } 16262 function releaseScroll(newEvent) { 16263 const params = swiper.params.mousewheel; 16264 if (newEvent.direction < 0) { 16265 if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { 16266 // Return true to animate scroll on edges 16267 return true; 16268 } 16269 } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { 16270 // Return true to animate scroll on edges 16271 return true; 16272 } 16273 return false; 16274 } 16275 function handle(event) { 16276 let e = event; 16277 let disableParentSwiper = true; 16278 if (!swiper.enabled) return; 16279 16280 // Ignore event if the target or its parents have the swiper-no-mousewheel class 16281 if (event.target.closest(`.${swiper.params.mousewheel.noMousewheelClass}`)) return; 16282 const params = swiper.params.mousewheel; 16283 if (swiper.params.cssMode) { 16284 e.preventDefault(); 16285 } 16286 let targetEl = swiper.el; 16287 if (swiper.params.mousewheel.eventsTarget !== 'container') { 16288 targetEl = document.querySelector(swiper.params.mousewheel.eventsTarget); 16289 } 16290 const targetElContainsTarget = targetEl && targetEl.contains(e.target); 16291 if (!swiper.mouseEntered && !targetElContainsTarget && !params.releaseOnEdges) return true; 16292 if (e.originalEvent) e = e.originalEvent; // jquery fix 16293 let delta = 0; 16294 const rtlFactor = swiper.rtlTranslate ? -1 : 1; 16295 const data = normalize(e); 16296 if (params.forceToAxis) { 16297 if (swiper.isHorizontal()) { 16298 if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true; 16299 } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true; 16300 } else { 16301 delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; 16302 } 16303 if (delta === 0) return true; 16304 if (params.invert) delta = -delta; 16305 16306 // Get the scroll positions 16307 let positions = swiper.getTranslate() + delta * params.sensitivity; 16308 if (positions >= swiper.minTranslate()) positions = swiper.minTranslate(); 16309 if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); 16310 16311 // When loop is true: 16312 // the disableParentSwiper will be true. 16313 // When loop is false: 16314 // if the scroll positions is not on edge, 16315 // then the disableParentSwiper will be true. 16316 // if the scroll on edge positions, 16317 // then the disableParentSwiper will be false. 16318 disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate()); 16319 if (disableParentSwiper && swiper.params.nested) e.stopPropagation(); 16320 if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) { 16321 // Register the new event in a variable which stores the relevant data 16322 const newEvent = { 16323 time: now(), 16324 delta: Math.abs(delta), 16325 direction: Math.sign(delta), 16326 raw: event 16327 }; 16328 16329 // Keep the most recent events 16330 if (recentWheelEvents.length >= 2) { 16331 recentWheelEvents.shift(); // only store the last N events 16332 } 16333 16334 const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; 16335 recentWheelEvents.push(newEvent); 16336 16337 // If there is at least one previous recorded event: 16338 // If direction has changed or 16339 // if the scroll is quicker than the previous one: 16340 // Animate the slider. 16341 // Else (this is the first time the wheel is moved): 16342 // Animate the slider. 16343 if (prevEvent) { 16344 if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) { 16345 animateSlider(newEvent); 16346 } 16347 } else { 16348 animateSlider(newEvent); 16349 } 16350 16351 // If it's time to release the scroll: 16352 // Return now so you don't hit the preventDefault. 16353 if (releaseScroll(newEvent)) { 16354 return true; 16355 } 16356 } else { 16357 // Freemode or scrollContainer: 16358 16359 // If we recently snapped after a momentum scroll, then ignore wheel events 16360 // to give time for the deceleration to finish. Stop ignoring after 500 msecs 16361 // or if it's a new scroll (larger delta or inverse sign as last event before 16362 // an end-of-momentum snap). 16363 const newEvent = { 16364 time: now(), 16365 delta: Math.abs(delta), 16366 direction: Math.sign(delta) 16367 }; 16368 const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction; 16369 if (!ignoreWheelEvents) { 16370 lastEventBeforeSnap = undefined; 16371 let position = swiper.getTranslate() + delta * params.sensitivity; 16372 const wasBeginning = swiper.isBeginning; 16373 const wasEnd = swiper.isEnd; 16374 if (position >= swiper.minTranslate()) position = swiper.minTranslate(); 16375 if (position <= swiper.maxTranslate()) position = swiper.maxTranslate(); 16376 swiper.setTransition(0); 16377 swiper.setTranslate(position); 16378 swiper.updateProgress(); 16379 swiper.updateActiveIndex(); 16380 swiper.updateSlidesClasses(); 16381 if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) { 16382 swiper.updateSlidesClasses(); 16383 } 16384 if (swiper.params.loop) { 16385 swiper.loopFix({ 16386 direction: newEvent.direction < 0 ? 'next' : 'prev', 16387 byMousewheel: true 16388 }); 16389 } 16390 if (swiper.params.freeMode.sticky) { 16391 // When wheel scrolling starts with sticky (aka snap) enabled, then detect 16392 // the end of a momentum scroll by storing recent (N=15?) wheel events. 16393 // 1. do all N events have decreasing or same (absolute value) delta? 16394 // 2. did all N events arrive in the last M (M=500?) msecs? 16395 // 3. does the earliest event have an (absolute value) delta that's 16396 // at least P (P=1?) larger than the most recent event's delta? 16397 // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? 16398 // If 1-4 are "yes" then we're near the end of a momentum scroll deceleration. 16399 // Snap immediately and ignore remaining wheel events in this scroll. 16400 // See comment above for "remaining wheel events in this scroll" determination. 16401 // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. 16402 clearTimeout(timeout); 16403 timeout = undefined; 16404 if (recentWheelEvents.length >= 15) { 16405 recentWheelEvents.shift(); // only store the last N events 16406 } 16407 16408 const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; 16409 const firstEvent = recentWheelEvents[0]; 16410 recentWheelEvents.push(newEvent); 16411 if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) { 16412 // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. 16413 recentWheelEvents.splice(0); 16414 } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) { 16415 // We're at the end of the deceleration of a momentum scroll, so there's no need 16416 // to wait for more events. Snap ASAP on the next tick. 16417 // Also, because there's some remaining momentum we'll bias the snap in the 16418 // direction of the ongoing scroll because it's better UX for the scroll to snap 16419 // in the same direction as the scroll instead of reversing to snap. Therefore, 16420 // if it's already scrolled more than 20% in the current direction, keep going. 16421 const snapToThreshold = delta > 0 ? 0.8 : 0.2; 16422 lastEventBeforeSnap = newEvent; 16423 recentWheelEvents.splice(0); 16424 timeout = nextTick(() => { 16425 swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); 16426 }, 0); // no delay; move on next tick 16427 } 16428 16429 if (!timeout) { 16430 // if we get here, then we haven't detected the end of a momentum scroll, so 16431 // we'll consider a scroll "complete" when there haven't been any wheel events 16432 // for 500ms. 16433 timeout = nextTick(() => { 16434 const snapToThreshold = 0.5; 16435 lastEventBeforeSnap = newEvent; 16436 recentWheelEvents.splice(0); 16437 swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); 16438 }, 500); 16439 } 16440 } 16441 16442 // Emit event 16443 if (!ignoreWheelEvents) emit('scroll', e); 16444 16445 // Stop autoplay 16446 if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); 16447 // Return page scroll on edge positions 16448 if (params.releaseOnEdges && (position === swiper.minTranslate() || position === swiper.maxTranslate())) { 16449 return true; 16450 } 16451 } 16452 } 16453 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 16454 return false; 16455 } 16456 function events(method) { 16457 let targetEl = swiper.el; 16458 if (swiper.params.mousewheel.eventsTarget !== 'container') { 16459 targetEl = document.querySelector(swiper.params.mousewheel.eventsTarget); 16460 } 16461 targetEl[method]('mouseenter', handleMouseEnter); 16462 targetEl[method]('mouseleave', handleMouseLeave); 16463 targetEl[method]('wheel', handle); 16464 } 16465 function enable() { 16466 if (swiper.params.cssMode) { 16467 swiper.wrapperEl.removeEventListener('wheel', handle); 16468 return true; 16469 } 16470 if (swiper.mousewheel.enabled) return false; 16471 events('addEventListener'); 16472 swiper.mousewheel.enabled = true; 16473 return true; 16474 } 16475 function disable() { 16476 if (swiper.params.cssMode) { 16477 swiper.wrapperEl.addEventListener(event, handle); 16478 return true; 16479 } 16480 if (!swiper.mousewheel.enabled) return false; 16481 events('removeEventListener'); 16482 swiper.mousewheel.enabled = false; 16483 return true; 16484 } 16485 on('init', () => { 16486 if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { 16487 disable(); 16488 } 16489 if (swiper.params.mousewheel.enabled) enable(); 16490 }); 16491 on('destroy', () => { 16492 if (swiper.params.cssMode) { 16493 enable(); 16494 } 16495 if (swiper.mousewheel.enabled) disable(); 16496 }); 16497 Object.assign(swiper.mousewheel, { 16498 enable, 16499 disable 16500 }); 16501 } 16502 16503 function createElementIfNotDefined(swiper, originalParams, params, checkProps) { 16504 if (swiper.params.createElements) { 16505 Object.keys(checkProps).forEach(key => { 16506 if (!params[key] && params.auto === true) { 16507 let element = elementChildren(swiper.el, `.${checkProps[key]}`)[0]; 16508 if (!element) { 16509 element = createElement('div', checkProps[key]); 16510 element.className = checkProps[key]; 16511 swiper.el.append(element); 16512 } 16513 params[key] = element; 16514 originalParams[key] = element; 16515 } 16516 }); 16517 } 16518 return params; 16519 } 16520 16521 function Navigation(_ref) { 16522 let { 16523 swiper, 16524 extendParams, 16525 on, 16526 emit 16527 } = _ref; 16528 extendParams({ 16529 navigation: { 16530 nextEl: null, 16531 prevEl: null, 16532 hideOnClick: false, 16533 disabledClass: 'swiper-button-disabled', 16534 hiddenClass: 'swiper-button-hidden', 16535 lockClass: 'swiper-button-lock', 16536 navigationDisabledClass: 'swiper-navigation-disabled' 16537 } 16538 }); 16539 swiper.navigation = { 16540 nextEl: null, 16541 prevEl: null 16542 }; 16543 const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e); 16544 function getEl(el) { 16545 let res; 16546 if (el && typeof el === 'string' && swiper.isElement) { 16547 res = swiper.el.querySelector(el); 16548 if (res) return res; 16549 } 16550 if (el) { 16551 if (typeof el === 'string') res = [...document.querySelectorAll(el)]; 16552 if (swiper.params.uniqueNavElements && typeof el === 'string' && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) { 16553 res = swiper.el.querySelector(el); 16554 } 16555 } 16556 if (el && !res) return el; 16557 // if (Array.isArray(res) && res.length === 1) res = res[0]; 16558 return res; 16559 } 16560 function toggleEl(el, disabled) { 16561 const params = swiper.params.navigation; 16562 el = makeElementsArray(el); 16563 el.forEach(subEl => { 16564 if (subEl) { 16565 subEl.classList[disabled ? 'add' : 'remove'](...params.disabledClass.split(' ')); 16566 if (subEl.tagName === 'BUTTON') subEl.disabled = disabled; 16567 if (swiper.params.watchOverflow && swiper.enabled) { 16568 subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass); 16569 } 16570 } 16571 }); 16572 } 16573 function update() { 16574 // Update Navigation Buttons 16575 const { 16576 nextEl, 16577 prevEl 16578 } = swiper.navigation; 16579 if (swiper.params.loop) { 16580 toggleEl(prevEl, false); 16581 toggleEl(nextEl, false); 16582 return; 16583 } 16584 toggleEl(prevEl, swiper.isBeginning && !swiper.params.rewind); 16585 toggleEl(nextEl, swiper.isEnd && !swiper.params.rewind); 16586 } 16587 function onPrevClick(e) { 16588 e.preventDefault(); 16589 if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return; 16590 swiper.slidePrev(); 16591 emit('navigationPrev'); 16592 } 16593 function onNextClick(e) { 16594 e.preventDefault(); 16595 if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return; 16596 swiper.slideNext(); 16597 emit('navigationNext'); 16598 } 16599 function init() { 16600 const params = swiper.params.navigation; 16601 swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, { 16602 nextEl: 'swiper-button-next', 16603 prevEl: 'swiper-button-prev' 16604 }); 16605 if (!(params.nextEl || params.prevEl)) return; 16606 let nextEl = getEl(params.nextEl); 16607 let prevEl = getEl(params.prevEl); 16608 Object.assign(swiper.navigation, { 16609 nextEl, 16610 prevEl 16611 }); 16612 nextEl = makeElementsArray(nextEl); 16613 prevEl = makeElementsArray(prevEl); 16614 const initButton = (el, dir) => { 16615 if (el) { 16616 el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick); 16617 } 16618 if (!swiper.enabled && el) { 16619 el.classList.add(...params.lockClass.split(' ')); 16620 } 16621 }; 16622 nextEl.forEach(el => initButton(el, 'next')); 16623 prevEl.forEach(el => initButton(el, 'prev')); 16624 } 16625 function destroy() { 16626 let { 16627 nextEl, 16628 prevEl 16629 } = swiper.navigation; 16630 nextEl = makeElementsArray(nextEl); 16631 prevEl = makeElementsArray(prevEl); 16632 const destroyButton = (el, dir) => { 16633 el.removeEventListener('click', dir === 'next' ? onNextClick : onPrevClick); 16634 el.classList.remove(...swiper.params.navigation.disabledClass.split(' ')); 16635 }; 16636 nextEl.forEach(el => destroyButton(el, 'next')); 16637 prevEl.forEach(el => destroyButton(el, 'prev')); 16638 } 16639 on('init', () => { 16640 if (swiper.params.navigation.enabled === false) { 16641 // eslint-disable-next-line 16642 disable(); 16643 } else { 16644 init(); 16645 update(); 16646 } 16647 }); 16648 on('toEdge fromEdge lock unlock', () => { 16649 update(); 16650 }); 16651 on('destroy', () => { 16652 destroy(); 16653 }); 16654 on('enable disable', () => { 16655 let { 16656 nextEl, 16657 prevEl 16658 } = swiper.navigation; 16659 nextEl = makeElementsArray(nextEl); 16660 prevEl = makeElementsArray(prevEl); 16661 [...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.navigation.lockClass)); 16662 }); 16663 on('click', (_s, e) => { 16664 let { 16665 nextEl, 16666 prevEl 16667 } = swiper.navigation; 16668 nextEl = makeElementsArray(nextEl); 16669 prevEl = makeElementsArray(prevEl); 16670 const targetEl = e.target; 16671 if (swiper.params.navigation.hideOnClick && !prevEl.includes(targetEl) && !nextEl.includes(targetEl)) { 16672 if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return; 16673 let isHidden; 16674 if (nextEl.length) { 16675 isHidden = nextEl[0].classList.contains(swiper.params.navigation.hiddenClass); 16676 } else if (prevEl.length) { 16677 isHidden = prevEl[0].classList.contains(swiper.params.navigation.hiddenClass); 16678 } 16679 if (isHidden === true) { 16680 emit('navigationShow'); 16681 } else { 16682 emit('navigationHide'); 16683 } 16684 [...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList.toggle(swiper.params.navigation.hiddenClass)); 16685 } 16686 }); 16687 const enable = () => { 16688 swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(' ')); 16689 init(); 16690 update(); 16691 }; 16692 const disable = () => { 16693 swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(' ')); 16694 destroy(); 16695 }; 16696 Object.assign(swiper.navigation, { 16697 enable, 16698 disable, 16699 update, 16700 init, 16701 destroy 16702 }); 16703 } 16704 16705 function classesToSelector(classes) { 16706 if (classes === void 0) { 16707 classes = ''; 16708 } 16709 return `.${classes.trim().replace(/([\.:!+\/])/g, '\\$1') // eslint-disable-line 16710 .replace(/ /g, '.')}`; 16711 } 16712 16713 function Pagination(_ref) { 16714 let { 16715 swiper, 16716 extendParams, 16717 on, 16718 emit 16719 } = _ref; 16720 const pfx = 'swiper-pagination'; 16721 extendParams({ 16722 pagination: { 16723 el: null, 16724 bulletElement: 'span', 16725 clickable: false, 16726 hideOnClick: false, 16727 renderBullet: null, 16728 renderProgressbar: null, 16729 renderFraction: null, 16730 renderCustom: null, 16731 progressbarOpposite: false, 16732 type: 'bullets', 16733 // 'bullets' or 'progressbar' or 'fraction' or 'custom' 16734 dynamicBullets: false, 16735 dynamicMainBullets: 1, 16736 formatFractionCurrent: number => number, 16737 formatFractionTotal: number => number, 16738 bulletClass: `${pfx}-bullet`, 16739 bulletActiveClass: `${pfx}-bullet-active`, 16740 modifierClass: `${pfx}-`, 16741 currentClass: `${pfx}-current`, 16742 totalClass: `${pfx}-total`, 16743 hiddenClass: `${pfx}-hidden`, 16744 progressbarFillClass: `${pfx}-progressbar-fill`, 16745 progressbarOppositeClass: `${pfx}-progressbar-opposite`, 16746 clickableClass: `${pfx}-clickable`, 16747 lockClass: `${pfx}-lock`, 16748 horizontalClass: `${pfx}-horizontal`, 16749 verticalClass: `${pfx}-vertical`, 16750 paginationDisabledClass: `${pfx}-disabled` 16751 } 16752 }); 16753 swiper.pagination = { 16754 el: null, 16755 bullets: [] 16756 }; 16757 let bulletSize; 16758 let dynamicBulletIndex = 0; 16759 const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e); 16760 function isPaginationDisabled() { 16761 return !swiper.params.pagination.el || !swiper.pagination.el || Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0; 16762 } 16763 function setSideBullets(bulletEl, position) { 16764 const { 16765 bulletActiveClass 16766 } = swiper.params.pagination; 16767 if (!bulletEl) return; 16768 bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`]; 16769 if (bulletEl) { 16770 bulletEl.classList.add(`${bulletActiveClass}-${position}`); 16771 bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`]; 16772 if (bulletEl) { 16773 bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`); 16774 } 16775 } 16776 } 16777 function onBulletClick(e) { 16778 const bulletEl = e.target.closest(classesToSelector(swiper.params.pagination.bulletClass)); 16779 if (!bulletEl) { 16780 return; 16781 } 16782 e.preventDefault(); 16783 const index = elementIndex(bulletEl) * swiper.params.slidesPerGroup; 16784 if (swiper.params.loop) { 16785 if (swiper.realIndex === index) return; 16786 const realIndex = swiper.realIndex; 16787 const newSlideIndex = swiper.getSlideIndexByData(index); 16788 const currentSlideIndex = swiper.getSlideIndexByData(swiper.realIndex); 16789 if (newSlideIndex > swiper.slides.length - swiper.loopedSlides) { 16790 const indexBeforeLoopFix = swiper.activeIndex; 16791 swiper.loopFix({ 16792 direction: newSlideIndex > currentSlideIndex ? 'next' : 'prev', 16793 activeSlideIndex: newSlideIndex, 16794 slideTo: false 16795 }); 16796 const indexAfterFix = swiper.activeIndex; 16797 if (indexBeforeLoopFix === indexAfterFix) { 16798 swiper.slideToLoop(realIndex, 0, false, true); 16799 } 16800 } 16801 swiper.slideToLoop(index); 16802 } else { 16803 swiper.slideTo(index); 16804 } 16805 } 16806 function update() { 16807 // Render || Update Pagination bullets/items 16808 const rtl = swiper.rtl; 16809 const params = swiper.params.pagination; 16810 if (isPaginationDisabled()) return; 16811 let el = swiper.pagination.el; 16812 el = makeElementsArray(el); 16813 // Current/Total 16814 let current; 16815 let previousIndex; 16816 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 16817 const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 16818 if (swiper.params.loop) { 16819 previousIndex = swiper.previousRealIndex || 0; 16820 current = swiper.params.slidesPerGroup > 1 ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup) : swiper.realIndex; 16821 } else if (typeof swiper.snapIndex !== 'undefined') { 16822 current = swiper.snapIndex; 16823 previousIndex = swiper.previousSnapIndex; 16824 } else { 16825 previousIndex = swiper.previousIndex || 0; 16826 current = swiper.activeIndex || 0; 16827 } 16828 // Types 16829 if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { 16830 const bullets = swiper.pagination.bullets; 16831 let firstIndex; 16832 let lastIndex; 16833 let midIndex; 16834 if (params.dynamicBullets) { 16835 bulletSize = elementOuterSize(bullets[0], swiper.isHorizontal() ? 'width' : 'height', true); 16836 el.forEach(subEl => { 16837 subEl.style[swiper.isHorizontal() ? 'width' : 'height'] = `${bulletSize * (params.dynamicMainBullets + 4)}px`; 16838 }); 16839 if (params.dynamicMainBullets > 1 && previousIndex !== undefined) { 16840 dynamicBulletIndex += current - (previousIndex || 0); 16841 if (dynamicBulletIndex > params.dynamicMainBullets - 1) { 16842 dynamicBulletIndex = params.dynamicMainBullets - 1; 16843 } else if (dynamicBulletIndex < 0) { 16844 dynamicBulletIndex = 0; 16845 } 16846 } 16847 firstIndex = Math.max(current - dynamicBulletIndex, 0); 16848 lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); 16849 midIndex = (lastIndex + firstIndex) / 2; 16850 }
vendor: 5,156 bytes, lines 16851-16961
16851 bullets.forEach(bulletEl => { 16852 const classesToRemove = [...['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`)].map(s => typeof s === 'string' && s.includes(' ') ? s.split(' ') : s).flat(); 16853 bulletEl.classList.remove(...classesToRemove); 16854 }); 16855 if (el.length > 1) { 16856 bullets.forEach(bullet => { 16857 const bulletIndex = elementIndex(bullet); 16858 if (bulletIndex === current) { 16859 bullet.classList.add(...params.bulletActiveClass.split(' ')); 16860 } else if (swiper.isElement) { 16861 bullet.setAttribute('part', 'bullet'); 16862 } 16863 if (params.dynamicBullets) { 16864 if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { 16865 bullet.classList.add(...`${params.bulletActiveClass}-main`.split(' ')); 16866 } 16867 if (bulletIndex === firstIndex) { 16868 setSideBullets(bullet, 'prev'); 16869 } 16870 if (bulletIndex === lastIndex) { 16871 setSideBullets(bullet, 'next'); 16872 } 16873 } 16874 }); 16875 } else { 16876 const bullet = bullets[current]; 16877 if (bullet) { 16878 bullet.classList.add(...params.bulletActiveClass.split(' ')); 16879 } 16880 if (swiper.isElement) { 16881 bullets.forEach((bulletEl, bulletIndex) => { 16882 bulletEl.setAttribute('part', bulletIndex === current ? 'bullet-active' : 'bullet'); 16883 }); 16884 } 16885 if (params.dynamicBullets) { 16886 const firstDisplayedBullet = bullets[firstIndex]; 16887 const lastDisplayedBullet = bullets[lastIndex]; 16888 for (let i = firstIndex; i <= lastIndex; i += 1) { 16889 if (bullets[i]) { 16890 bullets[i].classList.add(...`${params.bulletActiveClass}-main`.split(' ')); 16891 } 16892 } 16893 setSideBullets(firstDisplayedBullet, 'prev'); 16894 setSideBullets(lastDisplayedBullet, 'next'); 16895 } 16896 } 16897 if (params.dynamicBullets) { 16898 const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); 16899 const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize; 16900 const offsetProp = rtl ? 'right' : 'left'; 16901 bullets.forEach(bullet => { 16902 bullet.style[swiper.isHorizontal() ? offsetProp : 'top'] = `${bulletsOffset}px`; 16903 }); 16904 } 16905 } 16906 el.forEach((subEl, subElIndex) => { 16907 if (params.type === 'fraction') { 16908 subEl.querySelectorAll(classesToSelector(params.currentClass)).forEach(fractionEl => { 16909 fractionEl.textContent = params.formatFractionCurrent(current + 1); 16910 }); 16911 subEl.querySelectorAll(classesToSelector(params.totalClass)).forEach(totalEl => { 16912 totalEl.textContent = params.formatFractionTotal(total); 16913 }); 16914 } 16915 if (params.type === 'progressbar') { 16916 let progressbarDirection; 16917 if (params.progressbarOpposite) { 16918 progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; 16919 } else { 16920 progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; 16921 } 16922 const scale = (current + 1) / total; 16923 let scaleX = 1; 16924 let scaleY = 1; 16925 if (progressbarDirection === 'horizontal') { 16926 scaleX = scale; 16927 } else { 16928 scaleY = scale; 16929 } 16930 subEl.querySelectorAll(classesToSelector(params.progressbarFillClass)).forEach(progressEl => { 16931 progressEl.style.transform = `translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`; 16932 progressEl.style.transitionDuration = `${swiper.params.speed}ms`; 16933 }); 16934 } 16935 if (params.type === 'custom' && params.renderCustom) { 16936 subEl.innerHTML = params.renderCustom(swiper, current + 1, total); 16937 if (subElIndex === 0) emit('paginationRender', subEl); 16938 } else { 16939 if (subElIndex === 0) emit('paginationRender', subEl); 16940 emit('paginationUpdate', subEl); 16941 } 16942 if (swiper.params.watchOverflow && swiper.enabled) { 16943 subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass); 16944 } 16945 }); 16946 } 16947 function render() { 16948 // Render Container 16949 const params = swiper.params.pagination; 16950 if (isPaginationDisabled()) return; 16951 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 16952 let el = swiper.pagination.el; 16953 el = makeElementsArray(el); 16954 let paginationHTML = ''; 16955 if (params.type === 'bullets') { 16956 let numberOfBullets = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 16957 if (swiper.params.freeMode && swiper.params.freeMode.enabled && numberOfBullets > slidesLength) { 16958 numberOfBullets = slidesLength; 16959 } 16960 for (let i = 0; i < numberOfBullets; i += 1) { 16961 if (params.renderBullet) {
vendor: 41,170 bytes, lines 16962-18107
16962 paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); 16963 } else { 16964 // prettier-ignore 16965 paginationHTML += `<${params.bulletElement} ${swiper.isElement ? 'part="bullet"' : ''} class="${params.bulletClass}"></${params.bulletElement}>`; 16966 } 16967 } 16968 } 16969 if (params.type === 'fraction') { 16970 if (params.renderFraction) { 16971 paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); 16972 } else { 16973 paginationHTML = `<span class="${params.currentClass}"></span>` + ' / ' + `<span class="${params.totalClass}"></span>`; 16974 } 16975 } 16976 if (params.type === 'progressbar') { 16977 if (params.renderProgressbar) { 16978 paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); 16979 } else { 16980 paginationHTML = `<span class="${params.progressbarFillClass}"></span>`; 16981 } 16982 } 16983 swiper.pagination.bullets = []; 16984 el.forEach(subEl => { 16985 if (params.type !== 'custom') { 16986 subEl.innerHTML = paginationHTML || ''; 16987 } 16988 if (params.type === 'bullets') { 16989 swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass))); 16990 } 16991 }); 16992 if (params.type !== 'custom') { 16993 emit('paginationRender', el[0]); 16994 } 16995 } 16996 function init() { 16997 swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, { 16998 el: 'swiper-pagination' 16999 }); 17000 const params = swiper.params.pagination; 17001 if (!params.el) return; 17002 let el; 17003 if (typeof params.el === 'string' && swiper.isElement) { 17004 el = swiper.el.querySelector(params.el); 17005 } 17006 if (!el && typeof params.el === 'string') { 17007 el = [...document.querySelectorAll(params.el)]; 17008 } 17009 if (!el) { 17010 el = params.el; 17011 } 17012 if (!el || el.length === 0) return; 17013 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) { 17014 el = [...swiper.el.querySelectorAll(params.el)]; 17015 // check if it belongs to another nested Swiper 17016 if (el.length > 1) { 17017 el = el.filter(subEl => { 17018 if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false; 17019 return true; 17020 })[0]; 17021 } 17022 } 17023 if (Array.isArray(el) && el.length === 1) el = el[0]; 17024 Object.assign(swiper.pagination, { 17025 el 17026 }); 17027 el = makeElementsArray(el); 17028 el.forEach(subEl => { 17029 if (params.type === 'bullets' && params.clickable) { 17030 subEl.classList.add(...(params.clickableClass || '').split(' ')); 17031 } 17032 subEl.classList.add(params.modifierClass + params.type); 17033 subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 17034 if (params.type === 'bullets' && params.dynamicBullets) { 17035 subEl.classList.add(`${params.modifierClass}${params.type}-dynamic`); 17036 dynamicBulletIndex = 0; 17037 if (params.dynamicMainBullets < 1) { 17038 params.dynamicMainBullets = 1; 17039 } 17040 } 17041 if (params.type === 'progressbar' && params.progressbarOpposite) { 17042 subEl.classList.add(params.progressbarOppositeClass); 17043 } 17044 if (params.clickable) { 17045 subEl.addEventListener('click', onBulletClick); 17046 } 17047 if (!swiper.enabled) { 17048 subEl.classList.add(params.lockClass); 17049 } 17050 }); 17051 } 17052 function destroy() { 17053 const params = swiper.params.pagination; 17054 if (isPaginationDisabled()) return; 17055 let el = swiper.pagination.el; 17056 if (el) { 17057 el = makeElementsArray(el); 17058 el.forEach(subEl => { 17059 subEl.classList.remove(params.hiddenClass); 17060 subEl.classList.remove(params.modifierClass + params.type); 17061 subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 17062 if (params.clickable) { 17063 subEl.classList.remove(...(params.clickableClass || '').split(' ')); 17064 subEl.removeEventListener('click', onBulletClick); 17065 } 17066 }); 17067 } 17068 if (swiper.pagination.bullets) swiper.pagination.bullets.forEach(subEl => subEl.classList.remove(...params.bulletActiveClass.split(' '))); 17069 } 17070 on('changeDirection', () => { 17071 if (!swiper.pagination || !swiper.pagination.el) return; 17072 const params = swiper.params.pagination; 17073 let { 17074 el 17075 } = swiper.pagination; 17076 el = makeElementsArray(el); 17077 el.forEach(subEl => { 17078 subEl.classList.remove(params.horizontalClass, params.verticalClass); 17079 subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 17080 }); 17081 }); 17082 on('init', () => { 17083 if (swiper.params.pagination.enabled === false) { 17084 // eslint-disable-next-line 17085 disable(); 17086 } else { 17087 init(); 17088 render(); 17089 update(); 17090 } 17091 }); 17092 on('activeIndexChange', () => { 17093 if (typeof swiper.snapIndex === 'undefined') { 17094 update(); 17095 } 17096 }); 17097 on('snapIndexChange', () => { 17098 update(); 17099 }); 17100 on('snapGridLengthChange', () => { 17101 render(); 17102 update(); 17103 }); 17104 on('destroy', () => { 17105 destroy(); 17106 }); 17107 on('enable disable', () => { 17108 let { 17109 el 17110 } = swiper.pagination; 17111 if (el) { 17112 el = makeElementsArray(el); 17113 el.forEach(subEl => subEl.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.pagination.lockClass)); 17114 } 17115 }); 17116 on('lock unlock', () => { 17117 update(); 17118 }); 17119 on('click', (_s, e) => { 17120 const targetEl = e.target; 17121 const el = makeElementsArray(swiper.pagination.el); 17122 if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && el && el.length > 0 && !targetEl.classList.contains(swiper.params.pagination.bulletClass)) { 17123 if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return; 17124 const isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass); 17125 if (isHidden === true) { 17126 emit('paginationShow'); 17127 } else { 17128 emit('paginationHide'); 17129 } 17130 el.forEach(subEl => subEl.classList.toggle(swiper.params.pagination.hiddenClass)); 17131 } 17132 }); 17133 const enable = () => { 17134 swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass); 17135 let { 17136 el 17137 } = swiper.pagination; 17138 if (el) { 17139 el = makeElementsArray(el); 17140 el.forEach(subEl => subEl.classList.remove(swiper.params.pagination.paginationDisabledClass)); 17141 } 17142 init(); 17143 render(); 17144 update(); 17145 }; 17146 const disable = () => { 17147 swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass); 17148 let { 17149 el 17150 } = swiper.pagination; 17151 if (el) { 17152 el = makeElementsArray(el); 17153 el.forEach(subEl => subEl.classList.add(swiper.params.pagination.paginationDisabledClass)); 17154 } 17155 destroy(); 17156 }; 17157 Object.assign(swiper.pagination, { 17158 enable, 17159 disable, 17160 render, 17161 update, 17162 init, 17163 destroy 17164 }); 17165 } 17166 17167 function Scrollbar(_ref) { 17168 let { 17169 swiper, 17170 extendParams, 17171 on, 17172 emit 17173 } = _ref; 17174 const document = getDocument(); 17175 let isTouched = false; 17176 let timeout = null; 17177 let dragTimeout = null; 17178 let dragStartPos; 17179 let dragSize; 17180 let trackSize; 17181 let divider; 17182 extendParams({ 17183 scrollbar: { 17184 el: null, 17185 dragSize: 'auto', 17186 hide: false, 17187 draggable: false, 17188 snapOnRelease: true, 17189 lockClass: 'swiper-scrollbar-lock', 17190 dragClass: 'swiper-scrollbar-drag', 17191 scrollbarDisabledClass: 'swiper-scrollbar-disabled', 17192 horizontalClass: `swiper-scrollbar-horizontal`, 17193 verticalClass: `swiper-scrollbar-vertical` 17194 } 17195 }); 17196 swiper.scrollbar = { 17197 el: null, 17198 dragEl: null 17199 }; 17200 function setTranslate() { 17201 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 17202 const { 17203 scrollbar, 17204 rtlTranslate: rtl 17205 } = swiper; 17206 const { 17207 dragEl, 17208 el 17209 } = scrollbar; 17210 const params = swiper.params.scrollbar; 17211 const progress = swiper.params.loop ? swiper.progressLoop : swiper.progress; 17212 let newSize = dragSize; 17213 let newPos = (trackSize - dragSize) * progress; 17214 if (rtl) { 17215 newPos = -newPos; 17216 if (newPos > 0) { 17217 newSize = dragSize - newPos; 17218 newPos = 0; 17219 } else if (-newPos + dragSize > trackSize) { 17220 newSize = trackSize + newPos; 17221 } 17222 } else if (newPos < 0) { 17223 newSize = dragSize + newPos; 17224 newPos = 0; 17225 } else if (newPos + dragSize > trackSize) { 17226 newSize = trackSize - newPos; 17227 } 17228 if (swiper.isHorizontal()) { 17229 dragEl.style.transform = `translate3d(${newPos}px, 0, 0)`; 17230 dragEl.style.width = `${newSize}px`; 17231 } else { 17232 dragEl.style.transform = `translate3d(0px, ${newPos}px, 0)`; 17233 dragEl.style.height = `${newSize}px`; 17234 } 17235 if (params.hide) { 17236 clearTimeout(timeout); 17237 el.style.opacity = 1; 17238 timeout = setTimeout(() => { 17239 el.style.opacity = 0; 17240 el.style.transitionDuration = '400ms'; 17241 }, 1000); 17242 } 17243 } 17244 function setTransition(duration) { 17245 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 17246 swiper.scrollbar.dragEl.style.transitionDuration = `${duration}ms`; 17247 } 17248 function updateSize() { 17249 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 17250 const { 17251 scrollbar 17252 } = swiper; 17253 const { 17254 dragEl, 17255 el 17256 } = scrollbar; 17257 dragEl.style.width = ''; 17258 dragEl.style.height = ''; 17259 trackSize = swiper.isHorizontal() ? el.offsetWidth : el.offsetHeight; 17260 divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0)); 17261 if (swiper.params.scrollbar.dragSize === 'auto') { 17262 dragSize = trackSize * divider; 17263 } else { 17264 dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); 17265 } 17266 if (swiper.isHorizontal()) { 17267 dragEl.style.width = `${dragSize}px`; 17268 } else { 17269 dragEl.style.height = `${dragSize}px`; 17270 } 17271 if (divider >= 1) { 17272 el.style.display = 'none'; 17273 } else { 17274 el.style.display = ''; 17275 } 17276 if (swiper.params.scrollbar.hide) { 17277 el.style.opacity = 0; 17278 } 17279 if (swiper.params.watchOverflow && swiper.enabled) { 17280 scrollbar.el.classList[swiper.isLocked ? 'add' : 'remove'](swiper.params.scrollbar.lockClass); 17281 } 17282 } 17283 function getPointerPosition(e) { 17284 return swiper.isHorizontal() ? e.clientX : e.clientY; 17285 } 17286 function setDragPosition(e) { 17287 const { 17288 scrollbar, 17289 rtlTranslate: rtl 17290 } = swiper; 17291 const { 17292 el 17293 } = scrollbar; 17294 let positionRatio; 17295 positionRatio = (getPointerPosition(e) - elementOffset(el)[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); 17296 positionRatio = Math.max(Math.min(positionRatio, 1), 0); 17297 if (rtl) { 17298 positionRatio = 1 - positionRatio; 17299 } 17300 const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio; 17301 swiper.updateProgress(position); 17302 swiper.setTranslate(position); 17303 swiper.updateActiveIndex(); 17304 swiper.updateSlidesClasses(); 17305 } 17306 function onDragStart(e) { 17307 const params = swiper.params.scrollbar; 17308 const { 17309 scrollbar, 17310 wrapperEl 17311 } = swiper; 17312 const { 17313 el, 17314 dragEl 17315 } = scrollbar; 17316 isTouched = true; 17317 dragStartPos = e.target === dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; 17318 e.preventDefault(); 17319 e.stopPropagation(); 17320 wrapperEl.style.transitionDuration = '100ms'; 17321 dragEl.style.transitionDuration = '100ms'; 17322 setDragPosition(e); 17323 clearTimeout(dragTimeout); 17324 el.style.transitionDuration = '0ms'; 17325 if (params.hide) { 17326 el.style.opacity = 1; 17327 } 17328 if (swiper.params.cssMode) { 17329 swiper.wrapperEl.style['scroll-snap-type'] = 'none'; 17330 } 17331 emit('scrollbarDragStart', e); 17332 } 17333 function onDragMove(e) { 17334 const { 17335 scrollbar, 17336 wrapperEl 17337 } = swiper; 17338 const { 17339 el, 17340 dragEl 17341 } = scrollbar; 17342 if (!isTouched) return; 17343 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 17344 setDragPosition(e); 17345 wrapperEl.style.transitionDuration = '0ms'; 17346 el.style.transitionDuration = '0ms'; 17347 dragEl.style.transitionDuration = '0ms'; 17348 emit('scrollbarDragMove', e); 17349 } 17350 function onDragEnd(e) { 17351 const params = swiper.params.scrollbar; 17352 const { 17353 scrollbar, 17354 wrapperEl 17355 } = swiper; 17356 const { 17357 el 17358 } = scrollbar; 17359 if (!isTouched) return; 17360 isTouched = false; 17361 if (swiper.params.cssMode) { 17362 swiper.wrapperEl.style['scroll-snap-type'] = ''; 17363 wrapperEl.style.transitionDuration = ''; 17364 } 17365 if (params.hide) { 17366 clearTimeout(dragTimeout); 17367 dragTimeout = nextTick(() => { 17368 el.style.opacity = 0; 17369 el.style.transitionDuration = '400ms'; 17370 }, 1000); 17371 } 17372 emit('scrollbarDragEnd', e); 17373 if (params.snapOnRelease) { 17374 swiper.slideToClosest(); 17375 } 17376 } 17377 function events(method) { 17378 const { 17379 scrollbar, 17380 params 17381 } = swiper; 17382 const el = scrollbar.el; 17383 if (!el) return; 17384 const target = el; 17385 const activeListener = params.passiveListeners ? { 17386 passive: false, 17387 capture: false 17388 } : false; 17389 const passiveListener = params.passiveListeners ? { 17390 passive: true, 17391 capture: false 17392 } : false; 17393 if (!target) return; 17394 const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; 17395 target[eventMethod]('pointerdown', onDragStart, activeListener); 17396 document[eventMethod]('pointermove', onDragMove, activeListener); 17397 document[eventMethod]('pointerup', onDragEnd, passiveListener); 17398 } 17399 function enableDraggable() { 17400 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 17401 events('on'); 17402 } 17403 function disableDraggable() { 17404 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 17405 events('off'); 17406 } 17407 function init() { 17408 const { 17409 scrollbar, 17410 el: swiperEl 17411 } = swiper; 17412 swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, { 17413 el: 'swiper-scrollbar' 17414 }); 17415 const params = swiper.params.scrollbar; 17416 if (!params.el) return; 17417 let el; 17418 if (typeof params.el === 'string' && swiper.isElement) { 17419 el = swiper.el.querySelector(params.el); 17420 } 17421 if (!el && typeof params.el === 'string') { 17422 el = document.querySelectorAll(params.el); 17423 } else if (!el) { 17424 el = params.el; 17425 } 17426 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && el.length > 1 && swiperEl.querySelectorAll(params.el).length === 1) { 17427 el = swiperEl.querySelector(params.el); 17428 } 17429 if (el.length > 0) el = el[0]; 17430 el.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 17431 let dragEl; 17432 if (el) { 17433 dragEl = el.querySelector(`.${swiper.params.scrollbar.dragClass}`); 17434 if (!dragEl) { 17435 dragEl = createElement('div', swiper.params.scrollbar.dragClass); 17436 el.append(dragEl); 17437 } 17438 } 17439 Object.assign(scrollbar, { 17440 el, 17441 dragEl 17442 }); 17443 if (params.draggable) { 17444 enableDraggable(); 17445 } 17446 if (el) { 17447 el.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.scrollbar.lockClass); 17448 } 17449 } 17450 function destroy() { 17451 const params = swiper.params.scrollbar; 17452 const el = swiper.scrollbar.el; 17453 if (el) { 17454 el.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); 17455 } 17456 disableDraggable(); 17457 } 17458 on('init', () => { 17459 if (swiper.params.scrollbar.enabled === false) { 17460 // eslint-disable-next-line 17461 disable(); 17462 } else { 17463 init(); 17464 updateSize(); 17465 setTranslate(); 17466 } 17467 }); 17468 on('update resize observerUpdate lock unlock', () => { 17469 updateSize(); 17470 }); 17471 on('setTranslate', () => { 17472 setTranslate(); 17473 }); 17474 on('setTransition', (_s, duration) => { 17475 setTransition(duration); 17476 }); 17477 on('enable disable', () => { 17478 const { 17479 el 17480 } = swiper.scrollbar; 17481 if (el) { 17482 el.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.scrollbar.lockClass); 17483 } 17484 }); 17485 on('destroy', () => { 17486 destroy(); 17487 }); 17488 const enable = () => { 17489 swiper.el.classList.remove(swiper.params.scrollbar.scrollbarDisabledClass); 17490 if (swiper.scrollbar.el) { 17491 swiper.scrollbar.el.classList.remove(swiper.params.scrollbar.scrollbarDisabledClass); 17492 } 17493 init(); 17494 updateSize(); 17495 setTranslate(); 17496 }; 17497 const disable = () => { 17498 swiper.el.classList.add(swiper.params.scrollbar.scrollbarDisabledClass); 17499 if (swiper.scrollbar.el) { 17500 swiper.scrollbar.el.classList.add(swiper.params.scrollbar.scrollbarDisabledClass); 17501 } 17502 destroy(); 17503 }; 17504 Object.assign(swiper.scrollbar, { 17505 enable, 17506 disable, 17507 updateSize, 17508 setTranslate, 17509 init, 17510 destroy 17511 }); 17512 } 17513 17514 function Parallax(_ref) { 17515 let { 17516 swiper, 17517 extendParams, 17518 on 17519 } = _ref; 17520 extendParams({ 17521 parallax: { 17522 enabled: false 17523 } 17524 }); 17525 const elementsSelector = '[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]'; 17526 const setTransform = (el, progress) => { 17527 const { 17528 rtl 17529 } = swiper; 17530 const rtlFactor = rtl ? -1 : 1; 17531 const p = el.getAttribute('data-swiper-parallax') || '0'; 17532 let x = el.getAttribute('data-swiper-parallax-x'); 17533 let y = el.getAttribute('data-swiper-parallax-y'); 17534 const scale = el.getAttribute('data-swiper-parallax-scale'); 17535 const opacity = el.getAttribute('data-swiper-parallax-opacity'); 17536 const rotate = el.getAttribute('data-swiper-parallax-rotate'); 17537 if (x || y) { 17538 x = x || '0'; 17539 y = y || '0'; 17540 } else if (swiper.isHorizontal()) { 17541 x = p; 17542 y = '0'; 17543 } else { 17544 y = p; 17545 x = '0'; 17546 } 17547 if (x.indexOf('%') >= 0) { 17548 x = `${parseInt(x, 10) * progress * rtlFactor}%`; 17549 } else { 17550 x = `${x * progress * rtlFactor}px`; 17551 } 17552 if (y.indexOf('%') >= 0) { 17553 y = `${parseInt(y, 10) * progress}%`; 17554 } else { 17555 y = `${y * progress}px`; 17556 } 17557 if (typeof opacity !== 'undefined' && opacity !== null) { 17558 const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress)); 17559 el.style.opacity = currentOpacity; 17560 } 17561 let transform = `translate3d(${x}, ${y}, 0px)`; 17562 if (typeof scale !== 'undefined' && scale !== null) { 17563 const currentScale = scale - (scale - 1) * (1 - Math.abs(progress)); 17564 transform += ` scale(${currentScale})`; 17565 } 17566 if (rotate && typeof rotate !== 'undefined' && rotate !== null) { 17567 const currentRotate = rotate * progress * -1; 17568 transform += ` rotate(${currentRotate}deg)`; 17569 } 17570 el.style.transform = transform; 17571 }; 17572 const setTranslate = () => { 17573 const { 17574 el, 17575 slides, 17576 progress, 17577 snapGrid, 17578 isElement 17579 } = swiper; 17580 const elements = elementChildren(el, elementsSelector); 17581 if (swiper.isElement) { 17582 elements.push(...elementChildren(swiper.hostEl, elementsSelector)); 17583 } 17584 elements.forEach(subEl => { 17585 setTransform(subEl, progress); 17586 }); 17587 slides.forEach((slideEl, slideIndex) => { 17588 let slideProgress = slideEl.progress; 17589 if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { 17590 slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1); 17591 } 17592 slideProgress = Math.min(Math.max(slideProgress, -1), 1); 17593 slideEl.querySelectorAll(`${elementsSelector}, [data-swiper-parallax-rotate]`).forEach(subEl => { 17594 setTransform(subEl, slideProgress); 17595 }); 17596 }); 17597 }; 17598 const setTransition = function (duration) { 17599 if (duration === void 0) { 17600 duration = swiper.params.speed; 17601 } 17602 const { 17603 el, 17604 hostEl 17605 } = swiper; 17606 const elements = [...el.querySelectorAll(elementsSelector)]; 17607 if (swiper.isElement) { 17608 elements.push(...hostEl.querySelectorAll(elementsSelector)); 17609 } 17610 elements.forEach(parallaxEl => { 17611 let parallaxDuration = parseInt(parallaxEl.getAttribute('data-swiper-parallax-duration'), 10) || duration; 17612 if (duration === 0) parallaxDuration = 0; 17613 parallaxEl.style.transitionDuration = `${parallaxDuration}ms`; 17614 }); 17615 }; 17616 on('beforeInit', () => { 17617 if (!swiper.params.parallax.enabled) return; 17618 swiper.params.watchSlidesProgress = true; 17619 swiper.originalParams.watchSlidesProgress = true; 17620 }); 17621 on('init', () => { 17622 if (!swiper.params.parallax.enabled) return; 17623 setTranslate(); 17624 }); 17625 on('setTranslate', () => { 17626 if (!swiper.params.parallax.enabled) return; 17627 setTranslate(); 17628 }); 17629 on('setTransition', (_swiper, duration) => { 17630 if (!swiper.params.parallax.enabled) return; 17631 setTransition(duration); 17632 }); 17633 } 17634 17635 function Zoom(_ref) { 17636 let { 17637 swiper, 17638 extendParams, 17639 on, 17640 emit 17641 } = _ref; 17642 const window = getWindow(); 17643 extendParams({ 17644 zoom: { 17645 enabled: false, 17646 maxRatio: 3, 17647 minRatio: 1, 17648 toggle: true, 17649 containerClass: 'swiper-zoom-container', 17650 zoomedSlideClass: 'swiper-slide-zoomed' 17651 } 17652 }); 17653 swiper.zoom = { 17654 enabled: false 17655 }; 17656 let currentScale = 1; 17657 let isScaling = false; 17658 let fakeGestureTouched; 17659 let fakeGestureMoved; 17660 const evCache = []; 17661 const gesture = { 17662 originX: 0, 17663 originY: 0, 17664 slideEl: undefined, 17665 slideWidth: undefined, 17666 slideHeight: undefined, 17667 imageEl: undefined, 17668 imageWrapEl: undefined, 17669 maxRatio: 3 17670 }; 17671 const image = { 17672 isTouched: undefined, 17673 isMoved: undefined, 17674 currentX: undefined, 17675 currentY: undefined, 17676 minX: undefined, 17677 minY: undefined, 17678 maxX: undefined, 17679 maxY: undefined, 17680 width: undefined, 17681 height: undefined, 17682 startX: undefined, 17683 startY: undefined, 17684 touchesStart: {}, 17685 touchesCurrent: {} 17686 }; 17687 const velocity = { 17688 x: undefined, 17689 y: undefined, 17690 prevPositionX: undefined, 17691 prevPositionY: undefined, 17692 prevTime: undefined 17693 }; 17694 let scale = 1; 17695 Object.defineProperty(swiper.zoom, 'scale', { 17696 get() { 17697 return scale; 17698 }, 17699 set(value) { 17700 if (scale !== value) { 17701 const imageEl = gesture.imageEl; 17702 const slideEl = gesture.slideEl; 17703 emit('zoomChange', value, imageEl, slideEl); 17704 } 17705 scale = value; 17706 } 17707 }); 17708 function getDistanceBetweenTouches() { 17709 if (evCache.length < 2) return 1; 17710 const x1 = evCache[0].pageX; 17711 const y1 = evCache[0].pageY; 17712 const x2 = evCache[1].pageX; 17713 const y2 = evCache[1].pageY; 17714 const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2); 17715 return distance; 17716 } 17717 function getScaleOrigin() { 17718 if (evCache.length < 2) return { 17719 x: null, 17720 y: null 17721 }; 17722 const box = gesture.imageEl.getBoundingClientRect(); 17723 return [(evCache[0].pageX + (evCache[1].pageX - evCache[0].pageX) / 2 - box.x) / currentScale, (evCache[0].pageY + (evCache[1].pageY - evCache[0].pageY) / 2 - box.y) / currentScale]; 17724 } 17725 function getSlideSelector() { 17726 return swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`; 17727 } 17728 function eventWithinSlide(e) { 17729 const slideSelector = getSlideSelector(); 17730 if (e.target.matches(slideSelector)) return true; 17731 if (swiper.slides.filter(slideEl => slideEl.contains(e.target)).length > 0) return true; 17732 return false; 17733 } 17734 function eventWithinZoomContainer(e) { 17735 const selector = `.${swiper.params.zoom.containerClass}`; 17736 if (e.target.matches(selector)) return true; 17737 if ([...swiper.hostEl.querySelectorAll(selector)].filter(containerEl => containerEl.contains(e.target)).length > 0) return true; 17738 return false; 17739 } 17740 17741 // Events 17742 function onGestureStart(e) { 17743 if (e.pointerType === 'mouse') { 17744 evCache.splice(0, evCache.length); 17745 } 17746 if (!eventWithinSlide(e)) return; 17747 const params = swiper.params.zoom; 17748 fakeGestureTouched = false; 17749 fakeGestureMoved = false; 17750 evCache.push(e); 17751 if (evCache.length < 2) { 17752 return; 17753 } 17754 fakeGestureTouched = true; 17755 gesture.scaleStart = getDistanceBetweenTouches(); 17756 if (!gesture.slideEl) { 17757 gesture.slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`); 17758 if (!gesture.slideEl) gesture.slideEl = swiper.slides[swiper.activeIndex]; 17759 let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`); 17760 if (imageEl) { 17761 imageEl = imageEl.querySelectorAll('picture, img, svg, canvas, .swiper-zoom-target')[0]; 17762 } 17763 gesture.imageEl = imageEl; 17764 if (imageEl) { 17765 gesture.imageWrapEl = elementParents(gesture.imageEl, `.${params.containerClass}`)[0]; 17766 } else { 17767 gesture.imageWrapEl = undefined; 17768 } 17769 if (!gesture.imageWrapEl) { 17770 gesture.imageEl = undefined; 17771 return; 17772 } 17773 gesture.maxRatio = gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio; 17774 } 17775 if (gesture.imageEl) { 17776 const [originX, originY] = getScaleOrigin(); 17777 gesture.originX = originX; 17778 gesture.originY = originY; 17779 gesture.imageEl.style.transitionDuration = '0ms'; 17780 } 17781 isScaling = true; 17782 } 17783 function onGestureChange(e) { 17784 if (!eventWithinSlide(e)) return; 17785 const params = swiper.params.zoom; 17786 const zoom = swiper.zoom; 17787 const pointerIndex = evCache.findIndex(cachedEv => cachedEv.pointerId === e.pointerId); 17788 if (pointerIndex >= 0) evCache[pointerIndex] = e; 17789 if (evCache.length < 2) { 17790 return; 17791 } 17792 fakeGestureMoved = true; 17793 gesture.scaleMove = getDistanceBetweenTouches(); 17794 if (!gesture.imageEl) { 17795 return; 17796 } 17797 zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale; 17798 if (zoom.scale > gesture.maxRatio) { 17799 zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5; 17800 } 17801 if (zoom.scale < params.minRatio) { 17802 zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5; 17803 } 17804 gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`; 17805 } 17806 function onGestureEnd(e) { 17807 if (!eventWithinSlide(e)) return; 17808 if (e.pointerType === 'mouse' && e.type === 'pointerout') return; 17809 const params = swiper.params.zoom; 17810 const zoom = swiper.zoom; 17811 const pointerIndex = evCache.findIndex(cachedEv => cachedEv.pointerId === e.pointerId); 17812 if (pointerIndex >= 0) evCache.splice(pointerIndex, 1); 17813 if (!fakeGestureTouched || !fakeGestureMoved) { 17814 return; 17815 } 17816 fakeGestureTouched = false; 17817 fakeGestureMoved = false; 17818 if (!gesture.imageEl) return; 17819 zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); 17820 gesture.imageEl.style.transitionDuration = `${swiper.params.speed}ms`; 17821 gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`; 17822 currentScale = zoom.scale; 17823 isScaling = false; 17824 if (zoom.scale > 1 && gesture.slideEl) { 17825 gesture.slideEl.classList.add(`${params.zoomedSlideClass}`); 17826 } else if (zoom.scale <= 1 && gesture.slideEl) { 17827 gesture.slideEl.classList.remove(`${params.zoomedSlideClass}`); 17828 } 17829 if (zoom.scale === 1) { 17830 gesture.originX = 0; 17831 gesture.originY = 0; 17832 gesture.slideEl = undefined; 17833 } 17834 } 17835 function onTouchStart(e) { 17836 const device = swiper.device; 17837 if (!gesture.imageEl) return; 17838 if (image.isTouched) return; 17839 if (device.android && e.cancelable) e.preventDefault(); 17840 image.isTouched = true; 17841 const event = evCache.length > 0 ? evCache[0] : e; 17842 image.touchesStart.x = event.pageX; 17843 image.touchesStart.y = event.pageY; 17844 } 17845 function onTouchMove(e) { 17846 if (!eventWithinSlide(e) || !eventWithinZoomContainer(e)) return; 17847 const zoom = swiper.zoom; 17848 if (!gesture.imageEl) return; 17849 if (!image.isTouched || !gesture.slideEl) return; 17850 if (!image.isMoved) { 17851 image.width = gesture.imageEl.offsetWidth; 17852 image.height = gesture.imageEl.offsetHeight; 17853 image.startX = getTranslate(gesture.imageWrapEl, 'x') || 0; 17854 image.startY = getTranslate(gesture.imageWrapEl, 'y') || 0; 17855 gesture.slideWidth = gesture.slideEl.offsetWidth; 17856 gesture.slideHeight = gesture.slideEl.offsetHeight; 17857 gesture.imageWrapEl.style.transitionDuration = '0ms'; 17858 } 17859 // Define if we need image drag 17860 const scaledWidth = image.width * zoom.scale; 17861 const scaledHeight = image.height * zoom.scale; 17862 if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return; 17863 image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); 17864 image.maxX = -image.minX; 17865 image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); 17866 image.maxY = -image.minY; 17867 image.touchesCurrent.x = evCache.length > 0 ? evCache[0].pageX : e.pageX; 17868 image.touchesCurrent.y = evCache.length > 0 ? evCache[0].pageY : e.pageY; 17869 const touchesDiff = Math.max(Math.abs(image.touchesCurrent.x - image.touchesStart.x), Math.abs(image.touchesCurrent.y - image.touchesStart.y)); 17870 if (touchesDiff > 5) { 17871 swiper.allowClick = false; 17872 } 17873 if (!image.isMoved && !isScaling) { 17874 if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) { 17875 image.isTouched = false; 17876 return; 17877 } 17878 if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) { 17879 image.isTouched = false; 17880 return; 17881 } 17882 } 17883 if (e.cancelable) { 17884 e.preventDefault(); 17885 } 17886 e.stopPropagation(); 17887 image.isMoved = true; 17888 const scaleRatio = (zoom.scale - currentScale) / (gesture.maxRatio - swiper.params.zoom.minRatio); 17889 const { 17890 originX, 17891 originY 17892 } = gesture; 17893 image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX + scaleRatio * (image.width - originX * 2); 17894 image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY + scaleRatio * (image.height - originY * 2); 17895 if (image.currentX < image.minX) { 17896 image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8; 17897 } 17898 if (image.currentX > image.maxX) { 17899 image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8; 17900 } 17901 if (image.currentY < image.minY) { 17902 image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8; 17903 } 17904 if (image.currentY > image.maxY) { 17905 image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8; 17906 } 17907 17908 // Velocity 17909 if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x; 17910 if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y; 17911 if (!velocity.prevTime) velocity.prevTime = Date.now(); 17912 velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; 17913 velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; 17914 if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0; 17915 if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0; 17916 velocity.prevPositionX = image.touchesCurrent.x; 17917 velocity.prevPositionY = image.touchesCurrent.y; 17918 velocity.prevTime = Date.now(); 17919 gesture.imageWrapEl.style.transform = `translate3d(${image.currentX}px, ${image.currentY}px,0)`; 17920 } 17921 function onTouchEnd() { 17922 const zoom = swiper.zoom; 17923 if (!gesture.imageEl) return; 17924 if (!image.isTouched || !image.isMoved) { 17925 image.isTouched = false; 17926 image.isMoved = false; 17927 return; 17928 } 17929 image.isTouched = false; 17930 image.isMoved = false; 17931 let momentumDurationX = 300; 17932 let momentumDurationY = 300; 17933 const momentumDistanceX = velocity.x * momentumDurationX; 17934 const newPositionX = image.currentX + momentumDistanceX; 17935 const momentumDistanceY = velocity.y * momentumDurationY; 17936 const newPositionY = image.currentY + momentumDistanceY; 17937 17938 // Fix duration 17939 if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); 17940 if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); 17941 const momentumDuration = Math.max(momentumDurationX, momentumDurationY); 17942 image.currentX = newPositionX; 17943 image.currentY = newPositionY; 17944 // Define if we need image drag 17945 const scaledWidth = image.width * zoom.scale; 17946 const scaledHeight = image.height * zoom.scale; 17947 image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); 17948 image.maxX = -image.minX; 17949 image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); 17950 image.maxY = -image.minY; 17951 image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); 17952 image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); 17953 gesture.imageWrapEl.style.transitionDuration = `${momentumDuration}ms`; 17954 gesture.imageWrapEl.style.transform = `translate3d(${image.currentX}px, ${image.currentY}px,0)`; 17955 } 17956 function onTransitionEnd() { 17957 const zoom = swiper.zoom; 17958 if (gesture.slideEl && swiper.activeIndex !== swiper.slides.indexOf(gesture.slideEl)) { 17959 if (gesture.imageEl) { 17960 gesture.imageEl.style.transform = 'translate3d(0,0,0) scale(1)'; 17961 } 17962 if (gesture.imageWrapEl) { 17963 gesture.imageWrapEl.style.transform = 'translate3d(0,0,0)'; 17964 } 17965 gesture.slideEl.classList.remove(`${swiper.params.zoom.zoomedSlideClass}`); 17966 zoom.scale = 1; 17967 currentScale = 1; 17968 gesture.slideEl = undefined; 17969 gesture.imageEl = undefined; 17970 gesture.imageWrapEl = undefined; 17971 gesture.originX = 0; 17972 gesture.originY = 0; 17973 } 17974 } 17975 function zoomIn(e) { 17976 const zoom = swiper.zoom; 17977 const params = swiper.params.zoom; 17978 if (!gesture.slideEl) { 17979 if (e && e.target) { 17980 gesture.slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`); 17981 } 17982 if (!gesture.slideEl) { 17983 if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { 17984 gesture.slideEl = elementChildren(swiper.slidesEl, `.${swiper.params.slideActiveClass}`)[0]; 17985 } else { 17986 gesture.slideEl = swiper.slides[swiper.activeIndex]; 17987 } 17988 } 17989 let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`); 17990 if (imageEl) { 17991 imageEl = imageEl.querySelectorAll('picture, img, svg, canvas, .swiper-zoom-target')[0]; 17992 } 17993 gesture.imageEl = imageEl; 17994 if (imageEl) { 17995 gesture.imageWrapEl = elementParents(gesture.imageEl, `.${params.containerClass}`)[0]; 17996 } else { 17997 gesture.imageWrapEl = undefined; 17998 } 17999 } 18000 if (!gesture.imageEl || !gesture.imageWrapEl) return; 18001 if (swiper.params.cssMode) { 18002 swiper.wrapperEl.style.overflow = 'hidden'; 18003 swiper.wrapperEl.style.touchAction = 'none'; 18004 } 18005 gesture.slideEl.classList.add(`${params.zoomedSlideClass}`); 18006 let touchX; 18007 let touchY; 18008 let offsetX; 18009 let offsetY; 18010 let diffX; 18011 let diffY; 18012 let translateX; 18013 let translateY; 18014 let imageWidth; 18015 let imageHeight; 18016 let scaledWidth; 18017 let scaledHeight; 18018 let translateMinX; 18019 let translateMinY; 18020 let translateMaxX; 18021 let translateMaxY; 18022 let slideWidth; 18023 let slideHeight; 18024 if (typeof image.touchesStart.x === 'undefined' && e) { 18025 touchX = e.pageX; 18026 touchY = e.pageY; 18027 } else { 18028 touchX = image.touchesStart.x; 18029 touchY = image.touchesStart.y; 18030 } 18031 const forceZoomRatio = typeof e === 'number' ? e : null; 18032 if (currentScale === 1 && forceZoomRatio) { 18033 touchX = undefined; 18034 touchY = undefined; 18035 } 18036 zoom.scale = forceZoomRatio || gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio; 18037 currentScale = forceZoomRatio || gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio; 18038 if (e && !(currentScale === 1 && forceZoomRatio)) { 18039 slideWidth = gesture.slideEl.offsetWidth; 18040 slideHeight = gesture.slideEl.offsetHeight; 18041 offsetX = elementOffset(gesture.slideEl).left + window.scrollX; 18042 offsetY = elementOffset(gesture.slideEl).top + window.scrollY; 18043 diffX = offsetX + slideWidth / 2 - touchX; 18044 diffY = offsetY + slideHeight / 2 - touchY; 18045 imageWidth = gesture.imageEl.offsetWidth; 18046 imageHeight = gesture.imageEl.offsetHeight; 18047 scaledWidth = imageWidth * zoom.scale; 18048 scaledHeight = imageHeight * zoom.scale; 18049 translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0); 18050 translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0); 18051 translateMaxX = -translateMinX; 18052 translateMaxY = -translateMinY; 18053 translateX = diffX * zoom.scale; 18054 translateY = diffY * zoom.scale; 18055 if (translateX < translateMinX) { 18056 translateX = translateMinX; 18057 } 18058 if (translateX > translateMaxX) { 18059 translateX = translateMaxX; 18060 } 18061 if (translateY < translateMinY) { 18062 translateY = translateMinY; 18063 } 18064 if (translateY > translateMaxY) { 18065 translateY = translateMaxY; 18066 } 18067 } else { 18068 translateX = 0; 18069 translateY = 0; 18070 } 18071 if (forceZoomRatio && zoom.scale === 1) { 18072 gesture.originX = 0; 18073 gesture.originY = 0; 18074 } 18075 gesture.imageWrapEl.style.transitionDuration = '300ms'; 18076 gesture.imageWrapEl.style.transform = `translate3d(${translateX}px, ${translateY}px,0)`; 18077 gesture.imageEl.style.transitionDuration = '300ms'; 18078 gesture.imageEl.style.transform = `translate3d(0,0,0) scale(${zoom.scale})`; 18079 } 18080 function zoomOut() { 18081 const zoom = swiper.zoom; 18082 const params = swiper.params.zoom; 18083 if (!gesture.slideEl) { 18084 if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { 18085 gesture.slideEl = elementChildren(swiper.slidesEl, `.${swiper.params.slideActiveClass}`)[0]; 18086 } else { 18087 gesture.slideEl = swiper.slides[swiper.activeIndex]; 18088 } 18089 let imageEl = gesture.slideEl.querySelector(`.${params.containerClass}`); 18090 if (imageEl) { 18091 imageEl = imageEl.querySelectorAll('picture, img, svg, canvas, .swiper-zoom-target')[0]; 18092 } 18093 gesture.imageEl = imageEl; 18094 if (imageEl) { 18095 gesture.imageWrapEl = elementParents(gesture.imageEl, `.${params.containerClass}`)[0]; 18096 } else { 18097 gesture.imageWrapEl = undefined; 18098 } 18099 } 18100 if (!gesture.imageEl || !gesture.imageWrapEl) return; 18101 if (swiper.params.cssMode) { 18102 swiper.wrapperEl.style.overflow = ''; 18103 swiper.wrapperEl.style.touchAction = ''; 18104 } 18105 zoom.scale = 1; 18106 currentScale = 1; 18107 gesture.imageWrapEl.style.transitionDuration = '300ms';
vendor: 4,264 bytes, lines 18108-18255
18108 gesture.imageWrapEl.style.transform = 'translate3d(0,0,0)'; 18109 gesture.imageEl.style.transitionDuration = '300ms'; 18110 gesture.imageEl.style.transform = 'translate3d(0,0,0) scale(1)'; 18111 gesture.slideEl.classList.remove(`${params.zoomedSlideClass}`); 18112 gesture.slideEl = undefined; 18113 gesture.originX = 0; 18114 gesture.originY = 0; 18115 } 18116 18117 // Toggle Zoom 18118 function zoomToggle(e) { 18119 const zoom = swiper.zoom; 18120 if (zoom.scale && zoom.scale !== 1) { 18121 // Zoom Out 18122 zoomOut(); 18123 } else { 18124 // Zoom In 18125 zoomIn(e); 18126 } 18127 } 18128 function getListeners() { 18129 const passiveListener = swiper.params.passiveListeners ? { 18130 passive: true, 18131 capture: false 18132 } : false; 18133 const activeListenerWithCapture = swiper.params.passiveListeners ? { 18134 passive: false, 18135 capture: true 18136 } : true; 18137 return { 18138 passiveListener, 18139 activeListenerWithCapture 18140 }; 18141 } 18142 18143 // Attach/Detach Events 18144 function enable() { 18145 const zoom = swiper.zoom; 18146 if (zoom.enabled) return; 18147 zoom.enabled = true; 18148 const { 18149 passiveListener, 18150 activeListenerWithCapture 18151 } = getListeners(); 18152 18153 // Scale image 18154 swiper.wrapperEl.addEventListener('pointerdown', onGestureStart, passiveListener); 18155 swiper.wrapperEl.addEventListener('pointermove', onGestureChange, activeListenerWithCapture); 18156 ['pointerup', 'pointercancel', 'pointerout'].forEach(eventName => { 18157 swiper.wrapperEl.addEventListener(eventName, onGestureEnd, passiveListener); 18158 }); 18159 18160 // Move image 18161 swiper.wrapperEl.addEventListener('pointermove', onTouchMove, activeListenerWithCapture); 18162 } 18163 function disable() { 18164 const zoom = swiper.zoom; 18165 if (!zoom.enabled) return; 18166 zoom.enabled = false; 18167 const { 18168 passiveListener, 18169 activeListenerWithCapture 18170 } = getListeners(); 18171 18172 // Scale image 18173 swiper.wrapperEl.removeEventListener('pointerdown', onGestureStart, passiveListener); 18174 swiper.wrapperEl.removeEventListener('pointermove', onGestureChange, activeListenerWithCapture); 18175 ['pointerup', 'pointercancel', 'pointerout'].forEach(eventName => { 18176 swiper.wrapperEl.removeEventListener(eventName, onGestureEnd, passiveListener); 18177 }); 18178 18179 // Move image 18180 swiper.wrapperEl.removeEventListener('pointermove', onTouchMove, activeListenerWithCapture); 18181 } 18182 on('init', () => { 18183 if (swiper.params.zoom.enabled) { 18184 enable(); 18185 } 18186 }); 18187 on('destroy', () => { 18188 disable(); 18189 }); 18190 on('touchStart', (_s, e) => { 18191 if (!swiper.zoom.enabled) return; 18192 onTouchStart(e); 18193 }); 18194 on('touchEnd', (_s, e) => { 18195 if (!swiper.zoom.enabled) return; 18196 onTouchEnd(); 18197 }); 18198 on('doubleTap', (_s, e) => { 18199 if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { 18200 zoomToggle(e); 18201 } 18202 }); 18203 on('transitionEnd', () => { 18204 if (swiper.zoom.enabled && swiper.params.zoom.enabled) { 18205 onTransitionEnd(); 18206 } 18207 }); 18208 on('slideChange', () => { 18209 if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { 18210 onTransitionEnd(); 18211 } 18212 }); 18213 Object.assign(swiper.zoom, { 18214 enable, 18215 disable, 18216 in: zoomIn, 18217 out: zoomOut, 18218 toggle: zoomToggle 18219 }); 18220 } 18221 18222 /* eslint no-bitwise: ["error", { "allow": [">>"] }] */ 18223 function Controller(_ref) { 18224 let { 18225 swiper, 18226 extendParams, 18227 on 18228 } = _ref; 18229 extendParams({ 18230 controller: { 18231 control: undefined, 18232 inverse: false, 18233 by: 'slide' // or 'container' 18234 } 18235 }); 18236 18237 swiper.controller = { 18238 control: undefined 18239 }; 18240 function LinearSpline(x, y) { 18241 const binarySearch = function search() { 18242 let maxIndex; 18243 let minIndex; 18244 let guess; 18245 return (array, val) => { 18246 minIndex = -1; 18247 maxIndex = array.length; 18248 while (maxIndex - minIndex > 1) { 18249 guess = maxIndex + minIndex >> 1; 18250 if (array[guess] <= val) { 18251 minIndex = guess; 18252 } else { 18253 maxIndex = guess; 18254 } 18255 }
vendor: 26,727 bytes, lines 18256-19023
18256 return maxIndex; 18257 }; 18258 }(); 18259 this.x = x; 18260 this.y = y; 18261 this.lastIndex = x.length - 1; 18262 // Given an x value (x2), return the expected y2 value: 18263 // (x1,y1) is the known point before given value, 18264 // (x3,y3) is the known point after given value. 18265 let i1; 18266 let i3; 18267 this.interpolate = function interpolate(x2) { 18268 if (!x2) return 0; 18269 18270 // Get the indexes of x1 and x3 (the array indexes before and after given x2): 18271 i3 = binarySearch(this.x, x2); 18272 i1 = i3 - 1; 18273 18274 // We have our indexes i1 & i3, so we can calculate already: 18275 // y2 := ((x2âx1) à (y3ây1)) ÷ (x3âx1) + y1 18276 return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1]; 18277 }; 18278 return this; 18279 } 18280 function getInterpolateFunction(c) { 18281 swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid); 18282 } 18283 function setTranslate(_t, byController) { 18284 const controlled = swiper.controller.control; 18285 let multiplier; 18286 let controlledTranslate; 18287 const Swiper = swiper.constructor; 18288 function setControlledTranslate(c) { 18289 if (c.destroyed) return; 18290 18291 // this will create an Interpolate function based on the snapGrids 18292 // x is the Grid of the scrolled scroller and y will be the controlled scroller 18293 // it makes sense to create this only once and recall it for the interpolation 18294 // the function does a lot of value caching for performance 18295 const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; 18296 if (swiper.params.controller.by === 'slide') { 18297 getInterpolateFunction(c); 18298 // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid 18299 // but it did not work out 18300 controlledTranslate = -swiper.controller.spline.interpolate(-translate); 18301 } 18302 if (!controlledTranslate || swiper.params.controller.by === 'container') { 18303 multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); 18304 if (Number.isNaN(multiplier) || !Number.isFinite(multiplier)) { 18305 multiplier = 1; 18306 } 18307 controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate(); 18308 } 18309 if (swiper.params.controller.inverse) { 18310 controlledTranslate = c.maxTranslate() - controlledTranslate; 18311 } 18312 c.updateProgress(controlledTranslate); 18313 c.setTranslate(controlledTranslate, swiper); 18314 c.updateActiveIndex(); 18315 c.updateSlidesClasses(); 18316 } 18317 if (Array.isArray(controlled)) { 18318 for (let i = 0; i < controlled.length; i += 1) { 18319 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 18320 setControlledTranslate(controlled[i]); 18321 } 18322 } 18323 } else if (controlled instanceof Swiper && byController !== controlled) { 18324 setControlledTranslate(controlled); 18325 } 18326 } 18327 function setTransition(duration, byController) { 18328 const Swiper = swiper.constructor; 18329 const controlled = swiper.controller.control; 18330 let i; 18331 function setControlledTransition(c) { 18332 if (c.destroyed) return; 18333 c.setTransition(duration, swiper); 18334 if (duration !== 0) { 18335 c.transitionStart(); 18336 if (c.params.autoHeight) { 18337 nextTick(() => { 18338 c.updateAutoHeight(); 18339 }); 18340 } 18341 elementTransitionEnd(c.wrapperEl, () => { 18342 if (!controlled) return; 18343 c.transitionEnd(); 18344 }); 18345 } 18346 } 18347 if (Array.isArray(controlled)) { 18348 for (i = 0; i < controlled.length; i += 1) { 18349 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 18350 setControlledTransition(controlled[i]); 18351 } 18352 } 18353 } else if (controlled instanceof Swiper && byController !== controlled) { 18354 setControlledTransition(controlled); 18355 } 18356 } 18357 function removeSpline() { 18358 if (!swiper.controller.control) return; 18359 if (swiper.controller.spline) { 18360 swiper.controller.spline = undefined; 18361 delete swiper.controller.spline; 18362 } 18363 } 18364 on('beforeInit', () => { 18365 if (typeof window !== 'undefined' && ( 18366 // eslint-disable-line 18367 typeof swiper.params.controller.control === 'string' || swiper.params.controller.control instanceof HTMLElement)) { 18368 const controlElement = document.querySelector(swiper.params.controller.control); 18369 if (controlElement && controlElement.swiper) { 18370 swiper.controller.control = controlElement.swiper; 18371 } else if (controlElement) { 18372 const onControllerSwiper = e => { 18373 swiper.controller.control = e.detail[0]; 18374 swiper.update(); 18375 controlElement.removeEventListener('init', onControllerSwiper); 18376 }; 18377 controlElement.addEventListener('init', onControllerSwiper); 18378 } 18379 return; 18380 } 18381 swiper.controller.control = swiper.params.controller.control; 18382 }); 18383 on('update', () => { 18384 removeSpline(); 18385 }); 18386 on('resize', () => { 18387 removeSpline(); 18388 }); 18389 on('observerUpdate', () => { 18390 removeSpline(); 18391 }); 18392 on('setTranslate', (_s, translate, byController) => { 18393 if (!swiper.controller.control || swiper.controller.control.destroyed) return; 18394 swiper.controller.setTranslate(translate, byController); 18395 }); 18396 on('setTransition', (_s, duration, byController) => { 18397 if (!swiper.controller.control || swiper.controller.control.destroyed) return; 18398 swiper.controller.setTransition(duration, byController); 18399 }); 18400 Object.assign(swiper.controller, { 18401 setTranslate, 18402 setTransition 18403 }); 18404 } 18405 18406 function A11y(_ref) { 18407 let { 18408 swiper, 18409 extendParams, 18410 on 18411 } = _ref; 18412 extendParams({ 18413 a11y: { 18414 enabled: true, 18415 notificationClass: 'swiper-notification', 18416 prevSlideMessage: 'Previous slide', 18417 nextSlideMessage: 'Next slide', 18418 firstSlideMessage: 'This is the first slide', 18419 lastSlideMessage: 'This is the last slide', 18420 paginationBulletMessage: 'Go to slide {{index}}', 18421 slideLabelMessage: '{{index}} / {{slidesLength}}', 18422 containerMessage: null, 18423 containerRoleDescriptionMessage: null, 18424 itemRoleDescriptionMessage: null, 18425 slideRole: 'group', 18426 id: null 18427 } 18428 }); 18429 swiper.a11y = { 18430 clicked: false 18431 }; 18432 let liveRegion = null; 18433 function notify(message) { 18434 const notification = liveRegion; 18435 if (notification.length === 0) return; 18436 notification.innerHTML = ''; 18437 notification.innerHTML = message; 18438 } 18439 const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e); 18440 function getRandomNumber(size) { 18441 if (size === void 0) { 18442 size = 16; 18443 } 18444 const randomChar = () => Math.round(16 * Math.random()).toString(16); 18445 return 'x'.repeat(size).replace(/x/g, randomChar); 18446 } 18447 function makeElFocusable(el) { 18448 el = makeElementsArray(el); 18449 el.forEach(subEl => { 18450 subEl.setAttribute('tabIndex', '0'); 18451 }); 18452 } 18453 function makeElNotFocusable(el) { 18454 el = makeElementsArray(el); 18455 el.forEach(subEl => { 18456 subEl.setAttribute('tabIndex', '-1'); 18457 }); 18458 } 18459 function addElRole(el, role) { 18460 el = makeElementsArray(el); 18461 el.forEach(subEl => { 18462 subEl.setAttribute('role', role); 18463 }); 18464 } 18465 function addElRoleDescription(el, description) { 18466 el = makeElementsArray(el); 18467 el.forEach(subEl => { 18468 subEl.setAttribute('aria-roledescription', description); 18469 }); 18470 } 18471 function addElControls(el, controls) { 18472 el = makeElementsArray(el); 18473 el.forEach(subEl => { 18474 subEl.setAttribute('aria-controls', controls); 18475 }); 18476 } 18477 function addElLabel(el, label) { 18478 el = makeElementsArray(el); 18479 el.forEach(subEl => { 18480 subEl.setAttribute('aria-label', label); 18481 }); 18482 } 18483 function addElId(el, id) { 18484 el = makeElementsArray(el); 18485 el.forEach(subEl => { 18486 subEl.setAttribute('id', id); 18487 }); 18488 } 18489 function addElLive(el, live) { 18490 el = makeElementsArray(el); 18491 el.forEach(subEl => { 18492 subEl.setAttribute('aria-live', live); 18493 }); 18494 } 18495 function disableEl(el) { 18496 el = makeElementsArray(el); 18497 el.forEach(subEl => { 18498 subEl.setAttribute('aria-disabled', true); 18499 }); 18500 } 18501 function enableEl(el) { 18502 el = makeElementsArray(el); 18503 el.forEach(subEl => { 18504 subEl.setAttribute('aria-disabled', false); 18505 }); 18506 } 18507 function onEnterOrSpaceKey(e) { 18508 if (e.keyCode !== 13 && e.keyCode !== 32) return; 18509 const params = swiper.params.a11y; 18510 const targetEl = e.target; 18511 if (swiper.pagination && swiper.pagination.el && (targetEl === swiper.pagination.el || swiper.pagination.el.contains(e.target))) { 18512 if (!e.target.matches(classesToSelector(swiper.params.pagination.bulletClass))) return; 18513 } 18514 if (swiper.navigation && swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl) { 18515 if (!(swiper.isEnd && !swiper.params.loop)) { 18516 swiper.slideNext(); 18517 } 18518 if (swiper.isEnd) { 18519 notify(params.lastSlideMessage); 18520 } else { 18521 notify(params.nextSlideMessage); 18522 } 18523 } 18524 if (swiper.navigation && swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl) { 18525 if (!(swiper.isBeginning && !swiper.params.loop)) { 18526 swiper.slidePrev(); 18527 } 18528 if (swiper.isBeginning) { 18529 notify(params.firstSlideMessage); 18530 } else { 18531 notify(params.prevSlideMessage); 18532 } 18533 } 18534 if (swiper.pagination && targetEl.matches(classesToSelector(swiper.params.pagination.bulletClass))) { 18535 targetEl.click(); 18536 } 18537 } 18538 function updateNavigation() { 18539 if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return; 18540 const { 18541 nextEl, 18542 prevEl 18543 } = swiper.navigation; 18544 if (prevEl) { 18545 if (swiper.isBeginning) { 18546 disableEl(prevEl); 18547 makeElNotFocusable(prevEl); 18548 } else { 18549 enableEl(prevEl); 18550 makeElFocusable(prevEl); 18551 } 18552 } 18553 if (nextEl) { 18554 if (swiper.isEnd) { 18555 disableEl(nextEl); 18556 makeElNotFocusable(nextEl); 18557 } else { 18558 enableEl(nextEl); 18559 makeElFocusable(nextEl); 18560 } 18561 } 18562 } 18563 function hasPagination() { 18564 return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length; 18565 } 18566 function hasClickablePagination() { 18567 return hasPagination() && swiper.params.pagination.clickable; 18568 } 18569 function updatePagination() { 18570 const params = swiper.params.a11y; 18571 if (!hasPagination()) return; 18572 swiper.pagination.bullets.forEach(bulletEl => { 18573 if (swiper.params.pagination.clickable) { 18574 makeElFocusable(bulletEl); 18575 if (!swiper.params.pagination.renderBullet) { 18576 addElRole(bulletEl, 'button'); 18577 addElLabel(bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, elementIndex(bulletEl) + 1)); 18578 } 18579 } 18580 if (bulletEl.matches(classesToSelector(swiper.params.pagination.bulletActiveClass))) { 18581 bulletEl.setAttribute('aria-current', 'true'); 18582 } else { 18583 bulletEl.removeAttribute('aria-current'); 18584 } 18585 }); 18586 } 18587 const initNavEl = (el, wrapperId, message) => { 18588 makeElFocusable(el); 18589 if (el.tagName !== 'BUTTON') { 18590 addElRole(el, 'button'); 18591 el.addEventListener('keydown', onEnterOrSpaceKey); 18592 } 18593 addElLabel(el, message); 18594 addElControls(el, wrapperId); 18595 }; 18596 const handlePointerDown = () => { 18597 swiper.a11y.clicked = true; 18598 }; 18599 const handlePointerUp = () => { 18600 requestAnimationFrame(() => { 18601 requestAnimationFrame(() => { 18602 if (!swiper.destroyed) { 18603 swiper.a11y.clicked = false; 18604 } 18605 }); 18606 }); 18607 }; 18608 const handleFocus = e => { 18609 if (swiper.a11y.clicked) return; 18610 const slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`); 18611 if (!slideEl || !swiper.slides.includes(slideEl)) return; 18612 const isActive = swiper.slides.indexOf(slideEl) === swiper.activeIndex; 18613 const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl); 18614 if (isActive || isVisible) return; 18615 if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return; 18616 if (swiper.isHorizontal()) { 18617 swiper.el.scrollLeft = 0; 18618 } else { 18619 swiper.el.scrollTop = 0; 18620 } 18621 swiper.slideTo(swiper.slides.indexOf(slideEl), 0); 18622 }; 18623 const initSlides = () => { 18624 const params = swiper.params.a11y; 18625 if (params.itemRoleDescriptionMessage) { 18626 addElRoleDescription(swiper.slides, params.itemRoleDescriptionMessage); 18627 } 18628 if (params.slideRole) { 18629 addElRole(swiper.slides, params.slideRole); 18630 } 18631 const slidesLength = swiper.slides.length; 18632 if (params.slideLabelMessage) { 18633 swiper.slides.forEach((slideEl, index) => { 18634 const slideIndex = swiper.params.loop ? parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10) : index; 18635 const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength); 18636 addElLabel(slideEl, ariaLabelMessage); 18637 }); 18638 } 18639 }; 18640 const init = () => { 18641 const params = swiper.params.a11y; 18642 swiper.el.append(liveRegion); 18643 18644 // Container 18645 const containerEl = swiper.el; 18646 if (params.containerRoleDescriptionMessage) { 18647 addElRoleDescription(containerEl, params.containerRoleDescriptionMessage); 18648 } 18649 if (params.containerMessage) { 18650 addElLabel(containerEl, params.containerMessage); 18651 } 18652 18653 // Wrapper 18654 const wrapperEl = swiper.wrapperEl; 18655 const wrapperId = params.id || wrapperEl.getAttribute('id') || `swiper-wrapper-${getRandomNumber(16)}`; 18656 const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite'; 18657 addElId(wrapperEl, wrapperId); 18658 addElLive(wrapperEl, live); 18659 18660 // Slide 18661 initSlides(); 18662 18663 // Navigation 18664 let { 18665 nextEl, 18666 prevEl 18667 } = swiper.navigation ? swiper.navigation : {}; 18668 nextEl = makeElementsArray(nextEl); 18669 prevEl = makeElementsArray(prevEl); 18670 if (nextEl) { 18671 nextEl.forEach(el => initNavEl(el, wrapperId, params.nextSlideMessage)); 18672 } 18673 if (prevEl) { 18674 prevEl.forEach(el => initNavEl(el, wrapperId, params.prevSlideMessage)); 18675 } 18676 18677 // Pagination 18678 if (hasClickablePagination()) { 18679 const paginationEl = Array.isArray(swiper.pagination.el) ? swiper.pagination.el : [swiper.pagination.el]; 18680 paginationEl.forEach(el => { 18681 el.addEventListener('keydown', onEnterOrSpaceKey); 18682 }); 18683 } 18684 18685 // Tab focus 18686 swiper.el.addEventListener('focus', handleFocus, true); 18687 swiper.el.addEventListener('pointerdown', handlePointerDown, true); 18688 swiper.el.addEventListener('pointerup', handlePointerUp, true); 18689 }; 18690 function destroy() { 18691 if (liveRegion) liveRegion.remove(); 18692 let { 18693 nextEl, 18694 prevEl 18695 } = swiper.navigation ? swiper.navigation : {}; 18696 nextEl = makeElementsArray(nextEl); 18697 prevEl = makeElementsArray(prevEl); 18698 if (nextEl) { 18699 nextEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey)); 18700 } 18701 if (prevEl) { 18702 prevEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey)); 18703 } 18704 18705 // Pagination 18706 if (hasClickablePagination()) { 18707 const paginationEl = Array.isArray(swiper.pagination.el) ? swiper.pagination.el : [swiper.pagination.el]; 18708 paginationEl.forEach(el => { 18709 el.removeEventListener('keydown', onEnterOrSpaceKey); 18710 }); 18711 } 18712 18713 // Tab focus 18714 swiper.el.removeEventListener('focus', handleFocus, true); 18715 swiper.el.removeEventListener('pointerdown', handlePointerDown, true); 18716 swiper.el.removeEventListener('pointerup', handlePointerUp, true); 18717 } 18718 on('beforeInit', () => { 18719 liveRegion = createElement('span', swiper.params.a11y.notificationClass); 18720 liveRegion.setAttribute('aria-live', 'assertive'); 18721 liveRegion.setAttribute('aria-atomic', 'true'); 18722 }); 18723 on('afterInit', () => { 18724 if (!swiper.params.a11y.enabled) return; 18725 init(); 18726 }); 18727 on('slidesLengthChange snapGridLengthChange slidesGridLengthChange', () => { 18728 if (!swiper.params.a11y.enabled) return; 18729 initSlides(); 18730 }); 18731 on('fromEdge toEdge afterInit lock unlock', () => { 18732 if (!swiper.params.a11y.enabled) return; 18733 updateNavigation(); 18734 }); 18735 on('paginationUpdate', () => { 18736 if (!swiper.params.a11y.enabled) return; 18737 updatePagination(); 18738 }); 18739 on('destroy', () => { 18740 if (!swiper.params.a11y.enabled) return; 18741 destroy(); 18742 }); 18743 } 18744 18745 function History(_ref) { 18746 let { 18747 swiper, 18748 extendParams, 18749 on 18750 } = _ref; 18751 extendParams({ 18752 history: { 18753 enabled: false, 18754 root: '', 18755 replaceState: false, 18756 key: 'slides', 18757 keepQuery: false 18758 } 18759 }); 18760 let initialized = false; 18761 let paths = {}; 18762 const slugify = text => { 18763 return text.toString().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, ''); 18764 }; 18765 const getPathValues = urlOverride => { 18766 const window = getWindow(); 18767 let location; 18768 if (urlOverride) { 18769 location = new URL(urlOverride); 18770 } else { 18771 location = window.location; 18772 } 18773 const pathArray = location.pathname.slice(1).split('/').filter(part => part !== ''); 18774 const total = pathArray.length; 18775 const key = pathArray[total - 2]; 18776 const value = pathArray[total - 1]; 18777 return { 18778 key, 18779 value 18780 }; 18781 }; 18782 const setHistory = (key, index) => { 18783 const window = getWindow(); 18784 if (!initialized || !swiper.params.history.enabled) return; 18785 let location; 18786 if (swiper.params.url) { 18787 location = new URL(swiper.params.url); 18788 } else { 18789 location = window.location; 18790 } 18791 const slide = swiper.slides[index]; 18792 let value = slugify(slide.getAttribute('data-history')); 18793 if (swiper.params.history.root.length > 0) { 18794 let root = swiper.params.history.root; 18795 if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1); 18796 value = `${root}/${key ? `${key}/` : ''}${value}`; 18797 } else if (!location.pathname.includes(key)) { 18798 value = `${key ? `${key}/` : ''}${value}`; 18799 } 18800 if (swiper.params.history.keepQuery) { 18801 value += location.search; 18802 } 18803 const currentState = window.history.state; 18804 if (currentState && currentState.value === value) { 18805 return; 18806 } 18807 if (swiper.params.history.replaceState) { 18808 window.history.replaceState({ 18809 value 18810 }, null, value); 18811 } else { 18812 window.history.pushState({ 18813 value 18814 }, null, value); 18815 } 18816 }; 18817 const scrollToSlide = (speed, value, runCallbacks) => { 18818 if (value) { 18819 for (let i = 0, length = swiper.slides.length; i < length; i += 1) { 18820 const slide = swiper.slides[i]; 18821 const slideHistory = slugify(slide.getAttribute('data-history')); 18822 if (slideHistory === value) { 18823 const index = swiper.getSlideIndex(slide); 18824 swiper.slideTo(index, speed, runCallbacks); 18825 } 18826 } 18827 } else { 18828 swiper.slideTo(0, speed, runCallbacks); 18829 } 18830 }; 18831 const setHistoryPopState = () => { 18832 paths = getPathValues(swiper.params.url); 18833 scrollToSlide(swiper.params.speed, paths.value, false); 18834 }; 18835 const init = () => { 18836 const window = getWindow(); 18837 if (!swiper.params.history) return; 18838 if (!window.history || !window.history.pushState) { 18839 swiper.params.history.enabled = false; 18840 swiper.params.hashNavigation.enabled = true; 18841 return; 18842 } 18843 initialized = true; 18844 paths = getPathValues(swiper.params.url); 18845 if (!paths.key && !paths.value) { 18846 if (!swiper.params.history.replaceState) { 18847 window.addEventListener('popstate', setHistoryPopState); 18848 } 18849 return; 18850 } 18851 scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit); 18852 if (!swiper.params.history.replaceState) { 18853 window.addEventListener('popstate', setHistoryPopState); 18854 } 18855 }; 18856 const destroy = () => { 18857 const window = getWindow(); 18858 if (!swiper.params.history.replaceState) { 18859 window.removeEventListener('popstate', setHistoryPopState); 18860 } 18861 }; 18862 on('init', () => { 18863 if (swiper.params.history.enabled) { 18864 init(); 18865 } 18866 }); 18867 on('destroy', () => { 18868 if (swiper.params.history.enabled) { 18869 destroy(); 18870 } 18871 }); 18872 on('transitionEnd _freeModeNoMomentumRelease', () => { 18873 if (initialized) { 18874 setHistory(swiper.params.history.key, swiper.activeIndex); 18875 } 18876 }); 18877 on('slideChange', () => { 18878 if (initialized && swiper.params.cssMode) { 18879 setHistory(swiper.params.history.key, swiper.activeIndex); 18880 } 18881 }); 18882 } 18883 18884 function HashNavigation(_ref) { 18885 let { 18886 swiper, 18887 extendParams, 18888 emit, 18889 on 18890 } = _ref; 18891 let initialized = false; 18892 const document = getDocument(); 18893 const window = getWindow(); 18894 extendParams({ 18895 hashNavigation: { 18896 enabled: false, 18897 replaceState: false, 18898 watchState: false, 18899 getSlideIndex(_s, hash) { 18900 if (swiper.virtual && swiper.params.virtual.enabled) { 18901 const slideWithHash = swiper.slides.filter(slideEl => slideEl.getAttribute('data-hash') === hash)[0]; 18902 if (!slideWithHash) return 0; 18903 const index = parseInt(slideWithHash.getAttribute('data-swiper-slide-index'), 10); 18904 return index; 18905 } 18906 return swiper.getSlideIndex(elementChildren(swiper.slidesEl, `.${swiper.params.slideClass}[data-hash="${hash}"], swiper-slide[data-hash="${hash}"]`)[0]); 18907 } 18908 } 18909 }); 18910 const onHashChange = () => { 18911 emit('hashChange'); 18912 const newHash = document.location.hash.replace('#', ''); 18913 const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex]; 18914 const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute('data-hash') : ''; 18915 if (newHash !== activeSlideHash) { 18916 const newIndex = swiper.params.hashNavigation.getSlideIndex(swiper, newHash); 18917 if (typeof newIndex === 'undefined' || Number.isNaN(newIndex)) return; 18918 swiper.slideTo(newIndex); 18919 } 18920 }; 18921 const setHash = () => { 18922 if (!initialized || !swiper.params.hashNavigation.enabled) return; 18923 const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex]; 18924 const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute('data-hash') || activeSlideEl.getAttribute('data-history') : ''; 18925 if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) { 18926 window.history.replaceState(null, null, `#${activeSlideHash}` || ''); 18927 emit('hashSet'); 18928 } else { 18929 document.location.hash = activeSlideHash || ''; 18930 emit('hashSet'); 18931 } 18932 }; 18933 const init = () => { 18934 if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return; 18935 initialized = true; 18936 const hash = document.location.hash.replace('#', ''); 18937 if (hash) { 18938 const speed = 0; 18939 const index = swiper.params.hashNavigation.getSlideIndex(swiper, hash); 18940 swiper.slideTo(index || 0, speed, swiper.params.runCallbacksOnInit, true); 18941 } 18942 if (swiper.params.hashNavigation.watchState) { 18943 window.addEventListener('hashchange', onHashChange); 18944 } 18945 }; 18946 const destroy = () => { 18947 if (swiper.params.hashNavigation.watchState) { 18948 window.removeEventListener('hashchange', onHashChange); 18949 } 18950 }; 18951 on('init', () => { 18952 if (swiper.params.hashNavigation.enabled) { 18953 init(); 18954 } 18955 }); 18956 on('destroy', () => { 18957 if (swiper.params.hashNavigation.enabled) { 18958 destroy(); 18959 } 18960 }); 18961 on('transitionEnd _freeModeNoMomentumRelease', () => { 18962 if (initialized) { 18963 setHash(); 18964 } 18965 }); 18966 on('slideChange', () => { 18967 if (initialized && swiper.params.cssMode) { 18968 setHash(); 18969 } 18970 }); 18971 } 18972 18973 /* eslint no-underscore-dangle: "off" */ 18974 /* eslint no-use-before-define: "off" */ 18975 function Autoplay(_ref) { 18976 let { 18977 swiper, 18978 extendParams, 18979 on, 18980 emit, 18981 params 18982 } = _ref; 18983 swiper.autoplay = { 18984 running: false, 18985 paused: false, 18986 timeLeft: 0 18987 }; 18988 extendParams({ 18989 autoplay: { 18990 enabled: false, 18991 delay: 3000, 18992 waitForTransition: true, 18993 disableOnInteraction: true, 18994 stopOnLastSlide: false, 18995 reverseDirection: false, 18996 pauseOnMouseEnter: false 18997 } 18998 }); 18999 let timeout; 19000 let raf; 19001 let autoplayDelayTotal = params && params.autoplay ? params.autoplay.delay : 3000; 19002 let autoplayDelayCurrent = params && params.autoplay ? params.autoplay.delay : 3000; 19003 let autoplayTimeLeft; 19004 let autoplayStartTime = new Date().getTime; 19005 let wasPaused; 19006 let isTouched; 19007 let pausedByTouch; 19008 let touchStartTimeout; 19009 let slideChanged; 19010 let pausedByInteraction; 19011 function onTransitionEnd(e) { 19012 if (!swiper || swiper.destroyed || !swiper.wrapperEl) return; 19013 if (e.target !== swiper.wrapperEl) return; 19014 swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd); 19015 resume(); 19016 } 19017 const calcTimeLeft = () => { 19018 if (swiper.destroyed || !swiper.autoplay.running) return; 19019 if (swiper.autoplay.paused) { 19020 wasPaused = true; 19021 } else if (wasPaused) { 19022 autoplayDelayCurrent = autoplayTimeLeft; 19023 wasPaused = false;
vendor: 4,379 bytes, lines 19024-19142
19024 } 19025 const timeLeft = swiper.autoplay.paused ? autoplayTimeLeft : autoplayStartTime + autoplayDelayCurrent - new Date().getTime(); 19026 swiper.autoplay.timeLeft = timeLeft; 19027 emit('autoplayTimeLeft', timeLeft, timeLeft / autoplayDelayTotal); 19028 raf = requestAnimationFrame(() => { 19029 calcTimeLeft(); 19030 }); 19031 }; 19032 const getSlideDelay = () => { 19033 let activeSlideEl; 19034 if (swiper.virtual && swiper.params.virtual.enabled) { 19035 activeSlideEl = swiper.slides.filter(slideEl => slideEl.classList.contains('swiper-slide-active'))[0]; 19036 } else { 19037 activeSlideEl = swiper.slides[swiper.activeIndex]; 19038 } 19039 if (!activeSlideEl) return undefined; 19040 const currentSlideDelay = parseInt(activeSlideEl.getAttribute('data-swiper-autoplay'), 10); 19041 return currentSlideDelay; 19042 }; 19043 const run = delayForce => { 19044 if (swiper.destroyed || !swiper.autoplay.running) return; 19045 cancelAnimationFrame(raf); 19046 calcTimeLeft(); 19047 let delay = typeof delayForce === 'undefined' ? swiper.params.autoplay.delay : delayForce; 19048 autoplayDelayTotal = swiper.params.autoplay.delay; 19049 autoplayDelayCurrent = swiper.params.autoplay.delay; 19050 const currentSlideDelay = getSlideDelay(); 19051 if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0 && typeof delayForce === 'undefined') { 19052 delay = currentSlideDelay; 19053 autoplayDelayTotal = currentSlideDelay; 19054 autoplayDelayCurrent = currentSlideDelay; 19055 } 19056 autoplayTimeLeft = delay; 19057 const speed = swiper.params.speed; 19058 const proceed = () => { 19059 if (!swiper || swiper.destroyed) return; 19060 if (swiper.params.autoplay.reverseDirection) { 19061 if (!swiper.isBeginning || swiper.params.loop || swiper.params.rewind) { 19062 swiper.slidePrev(speed, true, true); 19063 emit('autoplay'); 19064 } else if (!swiper.params.autoplay.stopOnLastSlide) { 19065 swiper.slideTo(swiper.slides.length - 1, speed, true, true); 19066 emit('autoplay'); 19067 } 19068 } else { 19069 if (!swiper.isEnd || swiper.params.loop || swiper.params.rewind) { 19070 swiper.slideNext(speed, true, true); 19071 emit('autoplay'); 19072 } else if (!swiper.params.autoplay.stopOnLastSlide) { 19073 swiper.slideTo(0, speed, true, true); 19074 emit('autoplay'); 19075 } 19076 } 19077 if (swiper.params.cssMode) { 19078 autoplayStartTime = new Date().getTime(); 19079 requestAnimationFrame(() => { 19080 run(); 19081 }); 19082 } 19083 }; 19084 if (delay > 0) { 19085 clearTimeout(timeout); 19086 timeout = setTimeout(() => { 19087 proceed(); 19088 }, delay); 19089 } else { 19090 requestAnimationFrame(() => { 19091 proceed(); 19092 }); 19093 } 19094 19095 // eslint-disable-next-line 19096 return delay; 19097 }; 19098 const start = () => { 19099 swiper.autoplay.running = true; 19100 run(); 19101 emit('autoplayStart'); 19102 }; 19103 const stop = () => { 19104 swiper.autoplay.running = false; 19105 clearTimeout(timeout); 19106 cancelAnimationFrame(raf); 19107 emit('autoplayStop'); 19108 }; 19109 const pause = (internal, reset) => { 19110 if (swiper.destroyed || !swiper.autoplay.running) return; 19111 clearTimeout(timeout); 19112 if (!internal) { 19113 pausedByInteraction = true; 19114 } 19115 const proceed = () => { 19116 emit('autoplayPause'); 19117 if (swiper.params.autoplay.waitForTransition) { 19118 swiper.wrapperEl.addEventListener('transitionend', onTransitionEnd); 19119 } else { 19120 resume(); 19121 } 19122 }; 19123 swiper.autoplay.paused = true; 19124 if (reset) { 19125 if (slideChanged) { 19126 autoplayTimeLeft = swiper.params.autoplay.delay; 19127 } 19128 slideChanged = false; 19129 proceed(); 19130 return; 19131 } 19132 const delay = autoplayTimeLeft || swiper.params.autoplay.delay; 19133 autoplayTimeLeft = delay - (new Date().getTime() - autoplayStartTime); 19134 if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop) return; 19135 if (autoplayTimeLeft < 0) autoplayTimeLeft = 0; 19136 proceed(); 19137 }; 19138 const resume = () => { 19139 if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop || swiper.destroyed || !swiper.autoplay.running) return; 19140 autoplayStartTime = new Date().getTime(); 19141 if (pausedByInteraction) { 19142 pausedByInteraction = false;
vendor: 19,577 bytes, lines 19143-19685
19143 run(autoplayTimeLeft); 19144 } else { 19145 run(); 19146 } 19147 swiper.autoplay.paused = false; 19148 emit('autoplayResume'); 19149 }; 19150 const onVisibilityChange = () => { 19151 if (swiper.destroyed || !swiper.autoplay.running) return; 19152 const document = getDocument(); 19153 if (document.visibilityState === 'hidden') { 19154 pausedByInteraction = true; 19155 pause(true); 19156 } 19157 if (document.visibilityState === 'visible') { 19158 resume(); 19159 } 19160 }; 19161 const onPointerEnter = e => { 19162 if (e.pointerType !== 'mouse') return; 19163 pausedByInteraction = true; 19164 if (swiper.animating || swiper.autoplay.paused) return; 19165 pause(true); 19166 }; 19167 const onPointerLeave = e => { 19168 if (e.pointerType !== 'mouse') return; 19169 if (swiper.autoplay.paused) { 19170 resume(); 19171 } 19172 }; 19173 const attachMouseEvents = () => { 19174 if (swiper.params.autoplay.pauseOnMouseEnter) { 19175 swiper.el.addEventListener('pointerenter', onPointerEnter); 19176 swiper.el.addEventListener('pointerleave', onPointerLeave); 19177 } 19178 }; 19179 const detachMouseEvents = () => { 19180 swiper.el.removeEventListener('pointerenter', onPointerEnter); 19181 swiper.el.removeEventListener('pointerleave', onPointerLeave); 19182 }; 19183 const attachDocumentEvents = () => { 19184 const document = getDocument(); 19185 document.addEventListener('visibilitychange', onVisibilityChange); 19186 }; 19187 const detachDocumentEvents = () => { 19188 const document = getDocument(); 19189 document.removeEventListener('visibilitychange', onVisibilityChange); 19190 }; 19191 on('init', () => { 19192 if (swiper.params.autoplay.enabled) { 19193 attachMouseEvents(); 19194 attachDocumentEvents(); 19195 autoplayStartTime = new Date().getTime(); 19196 start(); 19197 } 19198 }); 19199 on('destroy', () => { 19200 detachMouseEvents(); 19201 detachDocumentEvents(); 19202 if (swiper.autoplay.running) { 19203 stop(); 19204 } 19205 }); 19206 on('beforeTransitionStart', (_s, speed, internal) => { 19207 if (swiper.destroyed || !swiper.autoplay.running) return; 19208 if (internal || !swiper.params.autoplay.disableOnInteraction) { 19209 pause(true, true); 19210 } else { 19211 stop(); 19212 } 19213 }); 19214 on('sliderFirstMove', () => { 19215 if (swiper.destroyed || !swiper.autoplay.running) return; 19216 if (swiper.params.autoplay.disableOnInteraction) { 19217 stop(); 19218 return; 19219 } 19220 isTouched = true; 19221 pausedByTouch = false; 19222 pausedByInteraction = false; 19223 touchStartTimeout = setTimeout(() => { 19224 pausedByInteraction = true; 19225 pausedByTouch = true; 19226 pause(true); 19227 }, 200); 19228 }); 19229 on('touchEnd', () => { 19230 if (swiper.destroyed || !swiper.autoplay.running || !isTouched) return; 19231 clearTimeout(touchStartTimeout); 19232 clearTimeout(timeout); 19233 if (swiper.params.autoplay.disableOnInteraction) { 19234 pausedByTouch = false; 19235 isTouched = false; 19236 return; 19237 } 19238 if (pausedByTouch && swiper.params.cssMode) resume(); 19239 pausedByTouch = false; 19240 isTouched = false; 19241 }); 19242 on('slideChange', () => { 19243 if (swiper.destroyed || !swiper.autoplay.running) return; 19244 slideChanged = true; 19245 }); 19246 Object.assign(swiper.autoplay, { 19247 start, 19248 stop, 19249 pause, 19250 resume 19251 }); 19252 } 19253 19254 function Thumb(_ref) { 19255 let { 19256 swiper, 19257 extendParams, 19258 on 19259 } = _ref; 19260 extendParams({ 19261 thumbs: { 19262 swiper: null, 19263 multipleActiveThumbs: true, 19264 autoScrollOffset: 0, 19265 slideThumbActiveClass: 'swiper-slide-thumb-active', 19266 thumbsContainerClass: 'swiper-thumbs' 19267 } 19268 }); 19269 let initialized = false; 19270 let swiperCreated = false; 19271 swiper.thumbs = { 19272 swiper: null 19273 }; 19274 function onThumbClick() { 19275 const thumbsSwiper = swiper.thumbs.swiper; 19276 if (!thumbsSwiper || thumbsSwiper.destroyed) return; 19277 const clickedIndex = thumbsSwiper.clickedIndex; 19278 const clickedSlide = thumbsSwiper.clickedSlide; 19279 if (clickedSlide && clickedSlide.classList.contains(swiper.params.thumbs.slideThumbActiveClass)) return; 19280 if (typeof clickedIndex === 'undefined' || clickedIndex === null) return; 19281 let slideToIndex; 19282 if (thumbsSwiper.params.loop) { 19283 slideToIndex = parseInt(thumbsSwiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10); 19284 } else { 19285 slideToIndex = clickedIndex; 19286 } 19287 if (swiper.params.loop) { 19288 swiper.slideToLoop(slideToIndex); 19289 } else { 19290 swiper.slideTo(slideToIndex); 19291 } 19292 } 19293 function init() { 19294 const { 19295 thumbs: thumbsParams 19296 } = swiper.params; 19297 if (initialized) return false; 19298 initialized = true; 19299 const SwiperClass = swiper.constructor; 19300 if (thumbsParams.swiper instanceof SwiperClass) { 19301 swiper.thumbs.swiper = thumbsParams.swiper; 19302 Object.assign(swiper.thumbs.swiper.originalParams, { 19303 watchSlidesProgress: true, 19304 slideToClickedSlide: false 19305 }); 19306 Object.assign(swiper.thumbs.swiper.params, { 19307 watchSlidesProgress: true, 19308 slideToClickedSlide: false 19309 }); 19310 swiper.thumbs.swiper.update(); 19311 } else if (isObject(thumbsParams.swiper)) { 19312 const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper); 19313 Object.assign(thumbsSwiperParams, { 19314 watchSlidesProgress: true, 19315 slideToClickedSlide: false 19316 }); 19317 swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams); 19318 swiperCreated = true; 19319 } 19320 swiper.thumbs.swiper.el.classList.add(swiper.params.thumbs.thumbsContainerClass); 19321 swiper.thumbs.swiper.on('tap', onThumbClick); 19322 return true; 19323 } 19324 function update(initial) { 19325 const thumbsSwiper = swiper.thumbs.swiper; 19326 if (!thumbsSwiper || thumbsSwiper.destroyed) return; 19327 const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView; 19328 19329 // Activate thumbs 19330 let thumbsToActivate = 1; 19331 const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; 19332 if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { 19333 thumbsToActivate = swiper.params.slidesPerView; 19334 } 19335 if (!swiper.params.thumbs.multipleActiveThumbs) { 19336 thumbsToActivate = 1; 19337 } 19338 thumbsToActivate = Math.floor(thumbsToActivate); 19339 thumbsSwiper.slides.forEach(slideEl => slideEl.classList.remove(thumbActiveClass)); 19340 if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) { 19341 for (let i = 0; i < thumbsToActivate; i += 1) { 19342 elementChildren(thumbsSwiper.slidesEl, `[data-swiper-slide-index="${swiper.realIndex + i}"]`).forEach(slideEl => { 19343 slideEl.classList.add(thumbActiveClass); 19344 }); 19345 } 19346 } else { 19347 for (let i = 0; i < thumbsToActivate; i += 1) { 19348 if (thumbsSwiper.slides[swiper.realIndex + i]) { 19349 thumbsSwiper.slides[swiper.realIndex + i].classList.add(thumbActiveClass); 19350 } 19351 } 19352 } 19353 const autoScrollOffset = swiper.params.thumbs.autoScrollOffset; 19354 const useOffset = autoScrollOffset && !thumbsSwiper.params.loop; 19355 if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) { 19356 const currentThumbsIndex = thumbsSwiper.activeIndex; 19357 let newThumbsIndex; 19358 let direction; 19359 if (thumbsSwiper.params.loop) { 19360 const newThumbsSlide = thumbsSwiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') === `${swiper.realIndex}`)[0]; 19361 newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide); 19362 direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev'; 19363 } else { 19364 newThumbsIndex = swiper.realIndex; 19365 direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev'; 19366 } 19367 if (useOffset) { 19368 newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset; 19369 } 19370 if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { 19371 if (thumbsSwiper.params.centeredSlides) { 19372 if (newThumbsIndex > currentThumbsIndex) { 19373 newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; 19374 } else { 19375 newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; 19376 } 19377 } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) ; 19378 thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); 19379 } 19380 } 19381 } 19382 on('beforeInit', () => { 19383 const { 19384 thumbs 19385 } = swiper.params; 19386 if (!thumbs || !thumbs.swiper) return; 19387 if (typeof thumbs.swiper === 'string' || thumbs.swiper instanceof HTMLElement) { 19388 const document = getDocument(); 19389 const getThumbsElementAndInit = () => { 19390 const thumbsElement = typeof thumbs.swiper === 'string' ? document.querySelector(thumbs.swiper) : thumbs.swiper; 19391 if (thumbsElement && thumbsElement.swiper) { 19392 thumbs.swiper = thumbsElement.swiper; 19393 init(); 19394 update(true); 19395 } else if (thumbsElement) { 19396 const onThumbsSwiper = e => { 19397 thumbs.swiper = e.detail[0]; 19398 thumbsElement.removeEventListener('init', onThumbsSwiper); 19399 init(); 19400 update(true); 19401 thumbs.swiper.update(); 19402 swiper.update(); 19403 }; 19404 thumbsElement.addEventListener('init', onThumbsSwiper); 19405 } 19406 return thumbsElement; 19407 }; 19408 const watchForThumbsToAppear = () => { 19409 if (swiper.destroyed) return; 19410 const thumbsElement = getThumbsElementAndInit(); 19411 if (!thumbsElement) { 19412 requestAnimationFrame(watchForThumbsToAppear); 19413 } 19414 }; 19415 requestAnimationFrame(watchForThumbsToAppear); 19416 } else { 19417 init(); 19418 update(true); 19419 } 19420 }); 19421 on('slideChange update resize observerUpdate', () => { 19422 update(); 19423 }); 19424 on('setTransition', (_s, duration) => { 19425 const thumbsSwiper = swiper.thumbs.swiper; 19426 if (!thumbsSwiper || thumbsSwiper.destroyed) return; 19427 thumbsSwiper.setTransition(duration); 19428 }); 19429 on('beforeDestroy', () => { 19430 const thumbsSwiper = swiper.thumbs.swiper; 19431 if (!thumbsSwiper || thumbsSwiper.destroyed) return; 19432 if (swiperCreated) { 19433 thumbsSwiper.destroy(); 19434 } 19435 }); 19436 Object.assign(swiper.thumbs, { 19437 init, 19438 update 19439 }); 19440 } 19441 19442 function freeMode(_ref) { 19443 let { 19444 swiper, 19445 extendParams, 19446 emit, 19447 once 19448 } = _ref; 19449 extendParams({ 19450 freeMode: { 19451 enabled: false, 19452 momentum: true, 19453 momentumRatio: 1, 19454 momentumBounce: true, 19455 momentumBounceRatio: 1, 19456 momentumVelocityRatio: 1, 19457 sticky: false, 19458 minimumVelocity: 0.02 19459 } 19460 }); 19461 function onTouchStart() { 19462 if (swiper.params.cssMode) return; 19463 const translate = swiper.getTranslate(); 19464 swiper.setTranslate(translate); 19465 swiper.setTransition(0); 19466 swiper.touchEventsData.velocities.length = 0; 19467 swiper.freeMode.onTouchEnd({ 19468 currentPos: swiper.rtl ? swiper.translate : -swiper.translate 19469 }); 19470 } 19471 function onTouchMove() { 19472 if (swiper.params.cssMode) return; 19473 const { 19474 touchEventsData: data, 19475 touches 19476 } = swiper; 19477 // Velocity 19478 if (data.velocities.length === 0) { 19479 data.velocities.push({ 19480 position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], 19481 time: data.touchStartTime 19482 }); 19483 } 19484 data.velocities.push({ 19485 position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], 19486 time: now() 19487 }); 19488 } 19489 function onTouchEnd(_ref2) { 19490 let { 19491 currentPos 19492 } = _ref2; 19493 if (swiper.params.cssMode) return; 19494 const { 19495 params, 19496 wrapperEl, 19497 rtlTranslate: rtl, 19498 snapGrid, 19499 touchEventsData: data 19500 } = swiper; 19501 // Time diff 19502 const touchEndTime = now(); 19503 const timeDiff = touchEndTime - data.touchStartTime; 19504 if (currentPos < -swiper.minTranslate()) { 19505 swiper.slideTo(swiper.activeIndex); 19506 return; 19507 } 19508 if (currentPos > -swiper.maxTranslate()) { 19509 if (swiper.slides.length < snapGrid.length) { 19510 swiper.slideTo(snapGrid.length - 1); 19511 } else { 19512 swiper.slideTo(swiper.slides.length - 1); 19513 } 19514 return; 19515 } 19516 if (params.freeMode.momentum) { 19517 if (data.velocities.length > 1) { 19518 const lastMoveEvent = data.velocities.pop(); 19519 const velocityEvent = data.velocities.pop(); 19520 const distance = lastMoveEvent.position - velocityEvent.position; 19521 const time = lastMoveEvent.time - velocityEvent.time; 19522 swiper.velocity = distance / time; 19523 swiper.velocity /= 2; 19524 if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) { 19525 swiper.velocity = 0; 19526 } 19527 // this implies that the user stopped moving a finger then released. 19528 // There would be no events with distance zero, so the last event is stale. 19529 if (time > 150 || now() - lastMoveEvent.time > 300) { 19530 swiper.velocity = 0; 19531 } 19532 } else { 19533 swiper.velocity = 0; 19534 } 19535 swiper.velocity *= params.freeMode.momentumVelocityRatio; 19536 data.velocities.length = 0; 19537 let momentumDuration = 1000 * params.freeMode.momentumRatio; 19538 const momentumDistance = swiper.velocity * momentumDuration; 19539 let newPosition = swiper.translate + momentumDistance; 19540 if (rtl) newPosition = -newPosition; 19541 let doBounce = false; 19542 let afterBouncePosition; 19543 const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio; 19544 let needsLoopFix; 19545 if (newPosition < swiper.maxTranslate()) { 19546 if (params.freeMode.momentumBounce) { 19547 if (newPosition + swiper.maxTranslate() < -bounceAmount) { 19548 newPosition = swiper.maxTranslate() - bounceAmount; 19549 } 19550 afterBouncePosition = swiper.maxTranslate(); 19551 doBounce = true; 19552 data.allowMomentumBounce = true; 19553 } else { 19554 newPosition = swiper.maxTranslate(); 19555 } 19556 if (params.loop && params.centeredSlides) needsLoopFix = true; 19557 } else if (newPosition > swiper.minTranslate()) { 19558 if (params.freeMode.momentumBounce) { 19559 if (newPosition - swiper.minTranslate() > bounceAmount) { 19560 newPosition = swiper.minTranslate() + bounceAmount; 19561 } 19562 afterBouncePosition = swiper.minTranslate(); 19563 doBounce = true; 19564 data.allowMomentumBounce = true; 19565 } else { 19566 newPosition = swiper.minTranslate(); 19567 } 19568 if (params.loop && params.centeredSlides) needsLoopFix = true; 19569 } else if (params.freeMode.sticky) { 19570 let nextSlide; 19571 for (let j = 0; j < snapGrid.length; j += 1) { 19572 if (snapGrid[j] > -newPosition) { 19573 nextSlide = j; 19574 break; 19575 } 19576 } 19577 if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { 19578 newPosition = snapGrid[nextSlide]; 19579 } else { 19580 newPosition = snapGrid[nextSlide - 1]; 19581 } 19582 newPosition = -newPosition; 19583 } 19584 if (needsLoopFix) { 19585 once('transitionEnd', () => { 19586 swiper.loopFix(); 19587 }); 19588 } 19589 // Fix duration 19590 if (swiper.velocity !== 0) { 19591 if (rtl) { 19592 momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); 19593 } else { 19594 momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); 19595 } 19596 if (params.freeMode.sticky) { 19597 // If freeMode.sticky is active and the user ends a swipe with a slow-velocity 19598 // event, then durations can be 20+ seconds to slide one (or zero!) slides. 19599 // It's easy to see this when simulating touch with mouse events. To fix this, 19600 // limit single-slide swipes to the default slide duration. This also has the 19601 // nice side effect of matching slide speed if the user stopped moving before 19602 // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. 19603 // For faster swipes, also apply limits (albeit higher ones). 19604 const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); 19605 const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; 19606 if (moveDistance < currentSlideSize) { 19607 momentumDuration = params.speed; 19608 } else if (moveDistance < 2 * currentSlideSize) { 19609 momentumDuration = params.speed * 1.5; 19610 } else { 19611 momentumDuration = params.speed * 2.5; 19612 } 19613 } 19614 } else if (params.freeMode.sticky) { 19615 swiper.slideToClosest(); 19616 return; 19617 } 19618 if (params.freeMode.momentumBounce && doBounce) { 19619 swiper.updateProgress(afterBouncePosition); 19620 swiper.setTransition(momentumDuration); 19621 swiper.setTranslate(newPosition); 19622 swiper.transitionStart(true, swiper.swipeDirection); 19623 swiper.animating = true; 19624 elementTransitionEnd(wrapperEl, () => { 19625 if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return; 19626 emit('momentumBounce'); 19627 swiper.setTransition(params.speed); 19628 setTimeout(() => { 19629 swiper.setTranslate(afterBouncePosition); 19630 elementTransitionEnd(wrapperEl, () => { 19631 if (!swiper || swiper.destroyed) return; 19632 swiper.transitionEnd(); 19633 }); 19634 }, 0); 19635 }); 19636 } else if (swiper.velocity) { 19637 emit('_freeModeNoMomentumRelease'); 19638 swiper.updateProgress(newPosition); 19639 swiper.setTransition(momentumDuration); 19640 swiper.setTranslate(newPosition); 19641 swiper.transitionStart(true, swiper.swipeDirection); 19642 if (!swiper.animating) { 19643 swiper.animating = true; 19644 elementTransitionEnd(wrapperEl, () => { 19645 if (!swiper || swiper.destroyed) return; 19646 swiper.transitionEnd(); 19647 }); 19648 } 19649 } else { 19650 swiper.updateProgress(newPosition); 19651 } 19652 swiper.updateActiveIndex(); 19653 swiper.updateSlidesClasses(); 19654 } else if (params.freeMode.sticky) { 19655 swiper.slideToClosest(); 19656 return; 19657 } else if (params.freeMode) { 19658 emit('_freeModeNoMomentumRelease'); 19659 } 19660 if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) { 19661 swiper.updateProgress(); 19662 swiper.updateActiveIndex(); 19663 swiper.updateSlidesClasses(); 19664 } 19665 } 19666 Object.assign(swiper, { 19667 freeMode: { 19668 onTouchStart, 19669 onTouchMove, 19670 onTouchEnd 19671 } 19672 }); 19673 } 19674 19675 function Grid(_ref) { 19676 let { 19677 swiper, 19678 extendParams 19679 } = _ref; 19680 extendParams({ 19681 grid: { 19682 rows: 1, 19683 fill: 'column' 19684 } 19685 });
vendor: 4,582 bytes, lines 19686-19816
19686 let slidesNumberEvenToRows; 19687 let slidesPerRow; 19688 let numFullColumns; 19689 const getSpaceBetween = () => { 19690 let spaceBetween = swiper.params.spaceBetween; 19691 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 19692 spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size; 19693 } else if (typeof spaceBetween === 'string') { 19694 spaceBetween = parseFloat(spaceBetween); 19695 } 19696 return spaceBetween; 19697 }; 19698 const initSlides = slidesLength => { 19699 const { 19700 slidesPerView 19701 } = swiper.params; 19702 const { 19703 rows, 19704 fill 19705 } = swiper.params.grid; 19706 numFullColumns = Math.floor(slidesLength / rows); 19707 if (Math.floor(slidesLength / rows) === slidesLength / rows) { 19708 slidesNumberEvenToRows = slidesLength; 19709 } else { 19710 slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows; 19711 } 19712 if (slidesPerView !== 'auto' && fill === 'row') { 19713 slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows); 19714 } 19715 slidesPerRow = slidesNumberEvenToRows / rows; 19716 }; 19717 const updateSlide = (i, slide, slidesLength, getDirectionLabel) => { 19718 const { 19719 slidesPerGroup 19720 } = swiper.params; 19721 const spaceBetween = getSpaceBetween(); 19722 const { 19723 rows, 19724 fill 19725 } = swiper.params.grid; 19726 // Set slides order 19727 let newSlideOrderIndex; 19728 let column; 19729 let row; 19730 if (fill === 'row' && slidesPerGroup > 1) { 19731 const groupIndex = Math.floor(i / (slidesPerGroup * rows)); 19732 const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex; 19733 const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup); 19734 row = Math.floor(slideIndexInGroup / columnsInGroup); 19735 column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup; 19736 newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows; 19737 slide.style.order = newSlideOrderIndex; 19738 } else if (fill === 'column') { 19739 column = Math.floor(i / rows); 19740 row = i - column * rows; 19741 if (column > numFullColumns || column === numFullColumns && row === rows - 1) { 19742 row += 1; 19743 if (row >= rows) { 19744 row = 0; 19745 column += 1; 19746 } 19747 } 19748 } else { 19749 row = Math.floor(i / slidesPerRow); 19750 column = i - row * slidesPerRow; 19751 } 19752 slide.row = row; 19753 slide.column = column; 19754 slide.style[getDirectionLabel('margin-top')] = row !== 0 ? spaceBetween && `${spaceBetween}px` : ''; 19755 }; 19756 const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => { 19757 const { 19758 centeredSlides, 19759 roundLengths 19760 } = swiper.params; 19761 const spaceBetween = getSpaceBetween(); 19762 const { 19763 rows 19764 } = swiper.params.grid; 19765 swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows; 19766 swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween; 19767 swiper.wrapperEl.style[getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`; 19768 if (centeredSlides) { 19769 const newSlidesGrid = []; 19770 for (let i = 0; i < snapGrid.length; i += 1) { 19771 let slidesGridItem = snapGrid[i]; 19772 if (roundLengths) slidesGridItem = Math.floor(slidesGridItem); 19773 if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem); 19774 } 19775 snapGrid.splice(0, snapGrid.length); 19776 snapGrid.push(...newSlidesGrid); 19777 } 19778 }; 19779 swiper.grid = { 19780 initSlides, 19781 updateSlide, 19782 updateWrapperSize 19783 }; 19784 } 19785 19786 function appendSlide(slides) { 19787 const swiper = this; 19788 const { 19789 params, 19790 slidesEl 19791 } = swiper; 19792 if (params.loop) { 19793 swiper.loopDestroy(); 19794 } 19795 const appendElement = slideEl => { 19796 if (typeof slideEl === 'string') { 19797 const tempDOM = document.createElement('div'); 19798 tempDOM.innerHTML = slideEl; 19799 slidesEl.append(tempDOM.children[0]); 19800 tempDOM.innerHTML = ''; 19801 } else { 19802 slidesEl.append(slideEl); 19803 } 19804 }; 19805 if (typeof slides === 'object' && 'length' in slides) { 19806 for (let i = 0; i < slides.length; i += 1) { 19807 if (slides[i]) appendElement(slides[i]); 19808 } 19809 } else { 19810 appendElement(slides); 19811 } 19812 swiper.recalcSlides(); 19813 if (params.loop) { 19814 swiper.loopCreate(); 19815 } 19816 if (!params.observer || swiper.isElement) {
vendor: 33,139 bytes, lines 19817-20748
19817 swiper.update(); 19818 } 19819 } 19820 19821 function prependSlide(slides) { 19822 const swiper = this; 19823 const { 19824 params, 19825 activeIndex, 19826 slidesEl 19827 } = swiper; 19828 if (params.loop) { 19829 swiper.loopDestroy(); 19830 } 19831 let newActiveIndex = activeIndex + 1; 19832 const prependElement = slideEl => { 19833 if (typeof slideEl === 'string') { 19834 const tempDOM = document.createElement('div'); 19835 tempDOM.innerHTML = slideEl; 19836 slidesEl.prepend(tempDOM.children[0]); 19837 tempDOM.innerHTML = ''; 19838 } else { 19839 slidesEl.prepend(slideEl); 19840 } 19841 }; 19842 if (typeof slides === 'object' && 'length' in slides) { 19843 for (let i = 0; i < slides.length; i += 1) { 19844 if (slides[i]) prependElement(slides[i]); 19845 } 19846 newActiveIndex = activeIndex + slides.length; 19847 } else { 19848 prependElement(slides); 19849 } 19850 swiper.recalcSlides(); 19851 if (params.loop) { 19852 swiper.loopCreate(); 19853 } 19854 if (!params.observer || swiper.isElement) { 19855 swiper.update(); 19856 } 19857 swiper.slideTo(newActiveIndex, 0, false); 19858 } 19859 19860 function addSlide(index, slides) { 19861 const swiper = this; 19862 const { 19863 params, 19864 activeIndex, 19865 slidesEl 19866 } = swiper; 19867 let activeIndexBuffer = activeIndex; 19868 if (params.loop) { 19869 activeIndexBuffer -= swiper.loopedSlides; 19870 swiper.loopDestroy(); 19871 swiper.recalcSlides(); 19872 } 19873 const baseLength = swiper.slides.length; 19874 if (index <= 0) { 19875 swiper.prependSlide(slides); 19876 return; 19877 } 19878 if (index >= baseLength) { 19879 swiper.appendSlide(slides); 19880 return; 19881 } 19882 let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; 19883 const slidesBuffer = []; 19884 for (let i = baseLength - 1; i >= index; i -= 1) { 19885 const currentSlide = swiper.slides[i]; 19886 currentSlide.remove(); 19887 slidesBuffer.unshift(currentSlide); 19888 } 19889 if (typeof slides === 'object' && 'length' in slides) { 19890 for (let i = 0; i < slides.length; i += 1) { 19891 if (slides[i]) slidesEl.append(slides[i]); 19892 } 19893 newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; 19894 } else { 19895 slidesEl.append(slides); 19896 } 19897 for (let i = 0; i < slidesBuffer.length; i += 1) { 19898 slidesEl.append(slidesBuffer[i]); 19899 } 19900 swiper.recalcSlides(); 19901 if (params.loop) { 19902 swiper.loopCreate(); 19903 } 19904 if (!params.observer || swiper.isElement) { 19905 swiper.update(); 19906 } 19907 if (params.loop) { 19908 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 19909 } else { 19910 swiper.slideTo(newActiveIndex, 0, false); 19911 } 19912 } 19913 19914 function removeSlide(slidesIndexes) { 19915 const swiper = this; 19916 const { 19917 params, 19918 activeIndex 19919 } = swiper; 19920 let activeIndexBuffer = activeIndex; 19921 if (params.loop) { 19922 activeIndexBuffer -= swiper.loopedSlides; 19923 swiper.loopDestroy(); 19924 } 19925 let newActiveIndex = activeIndexBuffer; 19926 let indexToRemove; 19927 if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { 19928 for (let i = 0; i < slidesIndexes.length; i += 1) { 19929 indexToRemove = slidesIndexes[i]; 19930 if (swiper.slides[indexToRemove]) swiper.slides[indexToRemove].remove(); 19931 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 19932 } 19933 newActiveIndex = Math.max(newActiveIndex, 0); 19934 } else { 19935 indexToRemove = slidesIndexes; 19936 if (swiper.slides[indexToRemove]) swiper.slides[indexToRemove].remove(); 19937 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 19938 newActiveIndex = Math.max(newActiveIndex, 0); 19939 } 19940 swiper.recalcSlides(); 19941 if (params.loop) { 19942 swiper.loopCreate(); 19943 } 19944 if (!params.observer || swiper.isElement) { 19945 swiper.update(); 19946 } 19947 if (params.loop) { 19948 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 19949 } else { 19950 swiper.slideTo(newActiveIndex, 0, false); 19951 } 19952 } 19953 19954 function removeAllSlides() { 19955 const swiper = this; 19956 const slidesIndexes = []; 19957 for (let i = 0; i < swiper.slides.length; i += 1) { 19958 slidesIndexes.push(i); 19959 } 19960 swiper.removeSlide(slidesIndexes); 19961 } 19962 19963 function Manipulation(_ref) { 19964 let { 19965 swiper 19966 } = _ref; 19967 Object.assign(swiper, { 19968 appendSlide: appendSlide.bind(swiper), 19969 prependSlide: prependSlide.bind(swiper), 19970 addSlide: addSlide.bind(swiper), 19971 removeSlide: removeSlide.bind(swiper), 19972 removeAllSlides: removeAllSlides.bind(swiper) 19973 }); 19974 } 19975 19976 function effectInit(params) { 19977 const { 19978 effect, 19979 swiper, 19980 on, 19981 setTranslate, 19982 setTransition, 19983 overwriteParams, 19984 perspective, 19985 recreateShadows, 19986 getEffectParams 19987 } = params; 19988 on('beforeInit', () => { 19989 if (swiper.params.effect !== effect) return; 19990 swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`); 19991 if (perspective && perspective()) { 19992 swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); 19993 } 19994 const overwriteParamsResult = overwriteParams ? overwriteParams() : {}; 19995 Object.assign(swiper.params, overwriteParamsResult); 19996 Object.assign(swiper.originalParams, overwriteParamsResult); 19997 }); 19998 on('setTranslate', () => { 19999 if (swiper.params.effect !== effect) return; 20000 setTranslate(); 20001 }); 20002 on('setTransition', (_s, duration) => { 20003 if (swiper.params.effect !== effect) return; 20004 setTransition(duration); 20005 }); 20006 on('transitionEnd', () => { 20007 if (swiper.params.effect !== effect) return; 20008 if (recreateShadows) { 20009 if (!getEffectParams || !getEffectParams().slideShadows) return; 20010 // remove shadows 20011 swiper.slides.forEach(slideEl => { 20012 slideEl.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => shadowEl.remove()); 20013 }); 20014 // create new one 20015 recreateShadows(); 20016 } 20017 }); 20018 let requireUpdateOnVirtual; 20019 on('virtualUpdate', () => { 20020 if (swiper.params.effect !== effect) return; 20021 if (!swiper.slides.length) { 20022 requireUpdateOnVirtual = true; 20023 } 20024 requestAnimationFrame(() => { 20025 if (requireUpdateOnVirtual && swiper.slides && swiper.slides.length) { 20026 setTranslate(); 20027 requireUpdateOnVirtual = false; 20028 } 20029 }); 20030 }); 20031 } 20032 20033 function effectTarget(effectParams, slideEl) { 20034 const transformEl = getSlideTransformEl(slideEl); 20035 if (transformEl !== slideEl) { 20036 transformEl.style.backfaceVisibility = 'hidden'; 20037 transformEl.style['-webkit-backface-visibility'] = 'hidden'; 20038 } 20039 return transformEl; 20040 } 20041 20042 function effectVirtualTransitionEnd(_ref) { 20043 let { 20044 swiper, 20045 duration, 20046 transformElements, 20047 allSlides 20048 } = _ref; 20049 const { 20050 activeIndex 20051 } = swiper; 20052 const getSlide = el => { 20053 if (!el.parentElement) { 20054 // assume shadow root 20055 const slide = swiper.slides.filter(slideEl => slideEl.shadowRoot && slideEl.shadowRoot === el.parentNode)[0]; 20056 return slide; 20057 } 20058 return el.parentElement; 20059 }; 20060 if (swiper.params.virtualTranslate && duration !== 0) { 20061 let eventTriggered = false; 20062 let transitionEndTarget; 20063 if (allSlides) { 20064 transitionEndTarget = transformElements; 20065 } else { 20066 transitionEndTarget = transformElements.filter(transformEl => { 20067 const el = transformEl.classList.contains('swiper-slide-transform') ? getSlide(transformEl) : transformEl; 20068 return swiper.getSlideIndex(el) === activeIndex; 20069 }); 20070 } 20071 transitionEndTarget.forEach(el => { 20072 elementTransitionEnd(el, () => { 20073 if (eventTriggered) return; 20074 if (!swiper || swiper.destroyed) return; 20075 eventTriggered = true; 20076 swiper.animating = false; 20077 const evt = new window.CustomEvent('transitionend', { 20078 bubbles: true, 20079 cancelable: true 20080 }); 20081 swiper.wrapperEl.dispatchEvent(evt); 20082 }); 20083 }); 20084 } 20085 } 20086 20087 function EffectFade(_ref) { 20088 let { 20089 swiper, 20090 extendParams, 20091 on 20092 } = _ref; 20093 extendParams({ 20094 fadeEffect: { 20095 crossFade: false 20096 } 20097 }); 20098 const setTranslate = () => { 20099 const { 20100 slides 20101 } = swiper; 20102 const params = swiper.params.fadeEffect; 20103 for (let i = 0; i < slides.length; i += 1) { 20104 const slideEl = swiper.slides[i]; 20105 const offset = slideEl.swiperSlideOffset; 20106 let tx = -offset; 20107 if (!swiper.params.virtualTranslate) tx -= swiper.translate; 20108 let ty = 0; 20109 if (!swiper.isHorizontal()) { 20110 ty = tx; 20111 tx = 0; 20112 } 20113 const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(slideEl.progress), 0) : 1 + Math.min(Math.max(slideEl.progress, -1), 0); 20114 const targetEl = effectTarget(params, slideEl); 20115 targetEl.style.opacity = slideOpacity; 20116 targetEl.style.transform = `translate3d(${tx}px, ${ty}px, 0px)`; 20117 } 20118 }; 20119 const setTransition = duration => { 20120 const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl)); 20121 transformElements.forEach(el => { 20122 el.style.transitionDuration = `${duration}ms`; 20123 }); 20124 effectVirtualTransitionEnd({ 20125 swiper, 20126 duration, 20127 transformElements, 20128 allSlides: true 20129 }); 20130 }; 20131 effectInit({ 20132 effect: 'fade', 20133 swiper, 20134 on, 20135 setTranslate, 20136 setTransition, 20137 overwriteParams: () => ({ 20138 slidesPerView: 1, 20139 slidesPerGroup: 1, 20140 watchSlidesProgress: true, 20141 spaceBetween: 0, 20142 virtualTranslate: !swiper.params.cssMode 20143 }) 20144 }); 20145 } 20146 20147 function EffectCube(_ref) { 20148 let { 20149 swiper, 20150 extendParams, 20151 on 20152 } = _ref; 20153 extendParams({ 20154 cubeEffect: { 20155 slideShadows: true, 20156 shadow: true, 20157 shadowOffset: 20, 20158 shadowScale: 0.94 20159 } 20160 }); 20161 const createSlideShadows = (slideEl, progress, isHorizontal) => { 20162 let shadowBefore = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top'); 20163 let shadowAfter = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom'); 20164 if (!shadowBefore) { 20165 shadowBefore = createElement('div', `swiper-slide-shadow-cube swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}`.split(' ')); 20166 slideEl.append(shadowBefore); 20167 } 20168 if (!shadowAfter) { 20169 shadowAfter = createElement('div', `swiper-slide-shadow-cube swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}`.split(' ')); 20170 slideEl.append(shadowAfter); 20171 } 20172 if (shadowBefore) shadowBefore.style.opacity = Math.max(-progress, 0); 20173 if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0); 20174 }; 20175 const recreateShadows = () => { 20176 // create new ones 20177 const isHorizontal = swiper.isHorizontal(); 20178 swiper.slides.forEach(slideEl => { 20179 const progress = Math.max(Math.min(slideEl.progress, 1), -1); 20180 createSlideShadows(slideEl, progress, isHorizontal); 20181 }); 20182 }; 20183 const setTranslate = () => { 20184 const { 20185 el, 20186 wrapperEl, 20187 slides, 20188 width: swiperWidth, 20189 height: swiperHeight, 20190 rtlTranslate: rtl, 20191 size: swiperSize, 20192 browser 20193 } = swiper; 20194 const params = swiper.params.cubeEffect; 20195 const isHorizontal = swiper.isHorizontal(); 20196 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 20197 let wrapperRotate = 0; 20198 let cubeShadowEl; 20199 if (params.shadow) { 20200 if (isHorizontal) { 20201 cubeShadowEl = swiper.wrapperEl.querySelector('.swiper-cube-shadow'); 20202 if (!cubeShadowEl) { 20203 cubeShadowEl = createElement('div', 'swiper-cube-shadow'); 20204 swiper.wrapperEl.append(cubeShadowEl); 20205 } 20206 cubeShadowEl.style.height = `${swiperWidth}px`; 20207 } else { 20208 cubeShadowEl = el.querySelector('.swiper-cube-shadow'); 20209 if (!cubeShadowEl) { 20210 cubeShadowEl = createElement('div', 'swiper-cube-shadow'); 20211 el.append(cubeShadowEl); 20212 } 20213 } 20214 } 20215 for (let i = 0; i < slides.length; i += 1) { 20216 const slideEl = slides[i]; 20217 let slideIndex = i; 20218 if (isVirtual) { 20219 slideIndex = parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10); 20220 } 20221 let slideAngle = slideIndex * 90; 20222 let round = Math.floor(slideAngle / 360); 20223 if (rtl) { 20224 slideAngle = -slideAngle; 20225 round = Math.floor(-slideAngle / 360); 20226 } 20227 const progress = Math.max(Math.min(slideEl.progress, 1), -1); 20228 let tx = 0; 20229 let ty = 0; 20230 let tz = 0; 20231 if (slideIndex % 4 === 0) { 20232 tx = -round * 4 * swiperSize; 20233 tz = 0; 20234 } else if ((slideIndex - 1) % 4 === 0) { 20235 tx = 0; 20236 tz = -round * 4 * swiperSize; 20237 } else if ((slideIndex - 2) % 4 === 0) { 20238 tx = swiperSize + round * 4 * swiperSize; 20239 tz = swiperSize; 20240 } else if ((slideIndex - 3) % 4 === 0) { 20241 tx = -swiperSize; 20242 tz = 3 * swiperSize + swiperSize * 4 * round; 20243 } 20244 if (rtl) { 20245 tx = -tx; 20246 } 20247 if (!isHorizontal) { 20248 ty = tx; 20249 tx = 0; 20250 } 20251 const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`; 20252 if (progress <= 1 && progress > -1) { 20253 wrapperRotate = slideIndex * 90 + progress * 90; 20254 if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90; 20255 } 20256 slideEl.style.transform = transform; 20257 if (params.slideShadows) { 20258 createSlideShadows(slideEl, progress, isHorizontal); 20259 } 20260 } 20261 wrapperEl.style.transformOrigin = `50% 50% -${swiperSize / 2}px`; 20262 wrapperEl.style['-webkit-transform-origin'] = `50% 50% -${swiperSize / 2}px`; 20263 if (params.shadow) { 20264 if (isHorizontal) { 20265 cubeShadowEl.style.transform = `translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`; 20266 } else { 20267 const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; 20268 const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); 20269 const scale1 = params.shadowScale; 20270 const scale2 = params.shadowScale / multiplier; 20271 const offset = params.shadowOffset; 20272 cubeShadowEl.style.transform = `scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`; 20273 } 20274 } 20275 const zFactor = (browser.isSafari || browser.isWebView) && browser.needPerspectiveFix ? -swiperSize / 2 : 0; 20276 wrapperEl.style.transform = `translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`; 20277 wrapperEl.style.setProperty('--swiper-cube-translate-z', `${zFactor}px`); 20278 }; 20279 const setTransition = duration => { 20280 const { 20281 el, 20282 slides 20283 } = swiper; 20284 slides.forEach(slideEl => { 20285 slideEl.style.transitionDuration = `${duration}ms`; 20286 slideEl.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(subEl => { 20287 subEl.style.transitionDuration = `${duration}ms`; 20288 }); 20289 }); 20290 if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { 20291 const shadowEl = el.querySelector('.swiper-cube-shadow'); 20292 if (shadowEl) shadowEl.style.transitionDuration = `${duration}ms`; 20293 } 20294 }; 20295 effectInit({ 20296 effect: 'cube', 20297 swiper, 20298 on, 20299 setTranslate, 20300 setTransition, 20301 recreateShadows, 20302 getEffectParams: () => swiper.params.cubeEffect, 20303 perspective: () => true, 20304 overwriteParams: () => ({ 20305 slidesPerView: 1, 20306 slidesPerGroup: 1, 20307 watchSlidesProgress: true, 20308 resistanceRatio: 0, 20309 spaceBetween: 0, 20310 centeredSlides: false, 20311 virtualTranslate: true 20312 }) 20313 }); 20314 } 20315 20316 function createShadow(suffix, slideEl, side) { 20317 const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}${suffix ? ` swiper-slide-shadow-${suffix}` : ''}`; 20318 const shadowContainer = getSlideTransformEl(slideEl); 20319 let shadowEl = shadowContainer.querySelector(`.${shadowClass.split(' ').join('.')}`); 20320 if (!shadowEl) { 20321 shadowEl = createElement('div', shadowClass.split(' ')); 20322 shadowContainer.append(shadowEl); 20323 } 20324 return shadowEl; 20325 } 20326 20327 function EffectFlip(_ref) { 20328 let { 20329 swiper, 20330 extendParams, 20331 on 20332 } = _ref; 20333 extendParams({ 20334 flipEffect: { 20335 slideShadows: true, 20336 limitRotation: true 20337 } 20338 }); 20339 const createSlideShadows = (slideEl, progress) => { 20340 let shadowBefore = swiper.isHorizontal() ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top'); 20341 let shadowAfter = swiper.isHorizontal() ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom'); 20342 if (!shadowBefore) { 20343 shadowBefore = createShadow('flip', slideEl, swiper.isHorizontal() ? 'left' : 'top'); 20344 } 20345 if (!shadowAfter) { 20346 shadowAfter = createShadow('flip', slideEl, swiper.isHorizontal() ? 'right' : 'bottom'); 20347 } 20348 if (shadowBefore) shadowBefore.style.opacity = Math.max(-progress, 0); 20349 if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0); 20350 }; 20351 const recreateShadows = () => { 20352 // Set shadows 20353 swiper.params.flipEffect; 20354 swiper.slides.forEach(slideEl => { 20355 let progress = slideEl.progress; 20356 if (swiper.params.flipEffect.limitRotation) { 20357 progress = Math.max(Math.min(slideEl.progress, 1), -1); 20358 } 20359 createSlideShadows(slideEl, progress); 20360 }); 20361 }; 20362 const setTranslate = () => { 20363 const { 20364 slides, 20365 rtlTranslate: rtl 20366 } = swiper; 20367 const params = swiper.params.flipEffect; 20368 for (let i = 0; i < slides.length; i += 1) { 20369 const slideEl = slides[i]; 20370 let progress = slideEl.progress; 20371 if (swiper.params.flipEffect.limitRotation) { 20372 progress = Math.max(Math.min(slideEl.progress, 1), -1); 20373 } 20374 const offset = slideEl.swiperSlideOffset; 20375 const rotate = -180 * progress; 20376 let rotateY = rotate; 20377 let rotateX = 0; 20378 let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset; 20379 let ty = 0; 20380 if (!swiper.isHorizontal()) { 20381 ty = tx; 20382 tx = 0; 20383 rotateX = -rotateY; 20384 rotateY = 0; 20385 } else if (rtl) { 20386 rotateY = -rotateY; 20387 } 20388 slideEl.style.zIndex = -Math.abs(Math.round(progress)) + slides.length; 20389 if (params.slideShadows) { 20390 createSlideShadows(slideEl, progress); 20391 } 20392 const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; 20393 const targetEl = effectTarget(params, slideEl); 20394 targetEl.style.transform = transform; 20395 } 20396 }; 20397 const setTransition = duration => { 20398 const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl)); 20399 transformElements.forEach(el => { 20400 el.style.transitionDuration = `${duration}ms`; 20401 el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => { 20402 shadowEl.style.transitionDuration = `${duration}ms`; 20403 }); 20404 }); 20405 effectVirtualTransitionEnd({ 20406 swiper, 20407 duration, 20408 transformElements 20409 }); 20410 }; 20411 effectInit({ 20412 effect: 'flip', 20413 swiper, 20414 on, 20415 setTranslate, 20416 setTransition, 20417 recreateShadows, 20418 getEffectParams: () => swiper.params.flipEffect, 20419 perspective: () => true, 20420 overwriteParams: () => ({ 20421 slidesPerView: 1, 20422 slidesPerGroup: 1, 20423 watchSlidesProgress: true, 20424 spaceBetween: 0, 20425 virtualTranslate: !swiper.params.cssMode 20426 }) 20427 }); 20428 } 20429 20430 function EffectCoverflow(_ref) { 20431 let { 20432 swiper, 20433 extendParams, 20434 on 20435 } = _ref; 20436 extendParams({ 20437 coverflowEffect: { 20438 rotate: 50, 20439 stretch: 0, 20440 depth: 100, 20441 scale: 1, 20442 modifier: 1, 20443 slideShadows: true 20444 } 20445 }); 20446 const setTranslate = () => { 20447 const { 20448 width: swiperWidth, 20449 height: swiperHeight, 20450 slides, 20451 slidesSizesGrid 20452 } = swiper; 20453 const params = swiper.params.coverflowEffect; 20454 const isHorizontal = swiper.isHorizontal(); 20455 const transform = swiper.translate; 20456 const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2; 20457 const rotate = isHorizontal ? params.rotate : -params.rotate; 20458 const translate = params.depth; 20459 // Each slide offset from center 20460 for (let i = 0, length = slides.length; i < length; i += 1) { 20461 const slideEl = slides[i]; 20462 const slideSize = slidesSizesGrid[i]; 20463 const slideOffset = slideEl.swiperSlideOffset; 20464 const centerOffset = (center - slideOffset - slideSize / 2) / slideSize; 20465 const offsetMultiplier = typeof params.modifier === 'function' ? params.modifier(centerOffset) : centerOffset * params.modifier; 20466 let rotateY = isHorizontal ? rotate * offsetMultiplier : 0; 20467 let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; 20468 // var rotateZ = 0 20469 let translateZ = -translate * Math.abs(offsetMultiplier); 20470 let stretch = params.stretch; 20471 // Allow percentage to make a relative stretch for responsive sliders 20472 if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) { 20473 stretch = parseFloat(params.stretch) / 100 * slideSize; 20474 } 20475 let translateY = isHorizontal ? 0 : stretch * offsetMultiplier; 20476 let translateX = isHorizontal ? stretch * offsetMultiplier : 0; 20477 let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); 20478 20479 // Fix for ultra small values 20480 if (Math.abs(translateX) < 0.001) translateX = 0; 20481 if (Math.abs(translateY) < 0.001) translateY = 0; 20482 if (Math.abs(translateZ) < 0.001) translateZ = 0; 20483 if (Math.abs(rotateY) < 0.001) rotateY = 0; 20484 if (Math.abs(rotateX) < 0.001) rotateX = 0; 20485 if (Math.abs(scale) < 0.001) scale = 0; 20486 const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`; 20487 const targetEl = effectTarget(params, slideEl); 20488 targetEl.style.transform = slideTransform; 20489 slideEl.style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; 20490 if (params.slideShadows) { 20491 // Set shadows 20492 let shadowBeforeEl = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top'); 20493 let shadowAfterEl = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom'); 20494 if (!shadowBeforeEl) { 20495 shadowBeforeEl = createShadow('coverflow', slideEl, isHorizontal ? 'left' : 'top'); 20496 } 20497 if (!shadowAfterEl) { 20498 shadowAfterEl = createShadow('coverflow', slideEl, isHorizontal ? 'right' : 'bottom'); 20499 } 20500 if (shadowBeforeEl) shadowBeforeEl.style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; 20501 if (shadowAfterEl) shadowAfterEl.style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0; 20502 } 20503 } 20504 }; 20505 const setTransition = duration => { 20506 const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl)); 20507 transformElements.forEach(el => { 20508 el.style.transitionDuration = `${duration}ms`; 20509 el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => { 20510 shadowEl.style.transitionDuration = `${duration}ms`; 20511 }); 20512 }); 20513 }; 20514 effectInit({ 20515 effect: 'coverflow', 20516 swiper, 20517 on, 20518 setTranslate, 20519 setTransition, 20520 perspective: () => true, 20521 overwriteParams: () => ({ 20522 watchSlidesProgress: true 20523 }) 20524 }); 20525 } 20526 20527 function EffectCreative(_ref) { 20528 let { 20529 swiper, 20530 extendParams, 20531 on 20532 } = _ref; 20533 extendParams({ 20534 creativeEffect: { 20535 limitProgress: 1, 20536 shadowPerProgress: false, 20537 progressMultiplier: 1, 20538 perspective: true, 20539 prev: { 20540 translate: [0, 0, 0], 20541 rotate: [0, 0, 0], 20542 opacity: 1, 20543 scale: 1 20544 }, 20545 next: { 20546 translate: [0, 0, 0], 20547 rotate: [0, 0, 0], 20548 opacity: 1, 20549 scale: 1 20550 } 20551 } 20552 }); 20553 const getTranslateValue = value => { 20554 if (typeof value === 'string') return value; 20555 return `${value}px`; 20556 }; 20557 const setTranslate = () => { 20558 const { 20559 slides, 20560 wrapperEl, 20561 slidesSizesGrid 20562 } = swiper; 20563 const params = swiper.params.creativeEffect; 20564 const { 20565 progressMultiplier: multiplier 20566 } = params; 20567 const isCenteredSlides = swiper.params.centeredSlides; 20568 if (isCenteredSlides) { 20569 const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0; 20570 wrapperEl.style.transform = `translateX(calc(50% - ${margin}px))`; 20571 } 20572 for (let i = 0; i < slides.length; i += 1) { 20573 const slideEl = slides[i]; 20574 const slideProgress = slideEl.progress; 20575 const progress = Math.min(Math.max(slideEl.progress, -params.limitProgress), params.limitProgress); 20576 let originalProgress = progress; 20577 if (!isCenteredSlides) { 20578 originalProgress = Math.min(Math.max(slideEl.originalProgress, -params.limitProgress), params.limitProgress); 20579 } 20580 const offset = slideEl.swiperSlideOffset; 20581 const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0]; 20582 const r = [0, 0, 0]; 20583 let custom = false; 20584 if (!swiper.isHorizontal()) { 20585 t[1] = t[0]; 20586 t[0] = 0; 20587 } 20588 let data = { 20589 translate: [0, 0, 0], 20590 rotate: [0, 0, 0], 20591 scale: 1, 20592 opacity: 1 20593 }; 20594 if (progress < 0) { 20595 data = params.next; 20596 custom = true; 20597 } else if (progress > 0) { 20598 data = params.prev; 20599 custom = true; 20600 } 20601 // set translate 20602 t.forEach((value, index) => { 20603 t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`; 20604 }); 20605 // set rotates 20606 r.forEach((value, index) => { 20607 r[index] = data.rotate[index] * Math.abs(progress * multiplier); 20608 }); 20609 slideEl.style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; 20610 const translateString = t.join(', '); 20611 const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`; 20612 const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`; 20613 const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier; 20614 const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; 20615 20616 // Set shadows 20617 if (custom && data.shadow || !custom) { 20618 let shadowEl = slideEl.querySelector('.swiper-slide-shadow'); 20619 if (!shadowEl && data.shadow) { 20620 shadowEl = createShadow('creative', slideEl); 20621 } 20622 if (shadowEl) { 20623 const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress; 20624 shadowEl.style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1); 20625 } 20626 } 20627 const targetEl = effectTarget(params, slideEl); 20628 targetEl.style.transform = transform; 20629 targetEl.style.opacity = opacityString; 20630 if (data.origin) { 20631 targetEl.style.transformOrigin = data.origin; 20632 } 20633 } 20634 }; 20635 const setTransition = duration => { 20636 const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl)); 20637 transformElements.forEach(el => { 20638 el.style.transitionDuration = `${duration}ms`; 20639 el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => { 20640 shadowEl.style.transitionDuration = `${duration}ms`; 20641 }); 20642 }); 20643 effectVirtualTransitionEnd({ 20644 swiper, 20645 duration, 20646 transformElements, 20647 allSlides: true 20648 }); 20649 }; 20650 effectInit({ 20651 effect: 'creative', 20652 swiper, 20653 on, 20654 setTranslate, 20655 setTransition, 20656 perspective: () => swiper.params.creativeEffect.perspective, 20657 overwriteParams: () => ({ 20658 watchSlidesProgress: true, 20659 virtualTranslate: !swiper.params.cssMode 20660 }) 20661 }); 20662 } 20663 20664 function EffectCards(_ref) { 20665 let { 20666 swiper, 20667 extendParams, 20668 on 20669 } = _ref; 20670 extendParams({ 20671 cardsEffect: { 20672 slideShadows: true, 20673 rotate: true, 20674 perSlideRotate: 2, 20675 perSlideOffset: 8 20676 } 20677 }); 20678 const setTranslate = () => { 20679 const { 20680 slides, 20681 activeIndex, 20682 rtlTranslate: rtl 20683 } = swiper; 20684 const params = swiper.params.cardsEffect; 20685 const { 20686 startTranslate, 20687 isTouched 20688 } = swiper.touchEventsData; 20689 const currentTranslate = rtl ? -swiper.translate : swiper.translate; 20690 for (let i = 0; i < slides.length; i += 1) { 20691 const slideEl = slides[i]; 20692 const slideProgress = slideEl.progress; 20693 const progress = Math.min(Math.max(slideProgress, -4), 4); 20694 let offset = slideEl.swiperSlideOffset; 20695 if (swiper.params.centeredSlides && !swiper.params.cssMode) { 20696 swiper.wrapperEl.style.transform = `translateX(${swiper.minTranslate()}px)`; 20697 } 20698 if (swiper.params.centeredSlides && swiper.params.cssMode) { 20699 offset -= slides[0].swiperSlideOffset; 20700 } 20701 let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset; 20702 let tY = 0; 20703 const tZ = -100 * Math.abs(progress); 20704 let scale = 1; 20705 let rotate = -params.perSlideRotate * progress; 20706 let tXAdd = params.perSlideOffset - Math.abs(progress) * 0.75; 20707 const slideIndex = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.from + i : i; 20708 const isSwipeToNext = (slideIndex === activeIndex || slideIndex === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate; 20709 const isSwipeToPrev = (slideIndex === activeIndex || slideIndex === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate; 20710 if (isSwipeToNext || isSwipeToPrev) { 20711 const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5; 20712 rotate += -28 * progress * subProgress; 20713 scale += -0.5 * subProgress; 20714 tXAdd += 96 * subProgress; 20715 tY = `${-25 * subProgress * Math.abs(progress)}%`; 20716 } 20717 if (progress < 0) { 20718 // next 20719 tX = `calc(${tX}px ${rtl ? '-' : '+'} (${tXAdd * Math.abs(progress)}%))`; 20720 } else if (progress > 0) { 20721 // prev 20722 tX = `calc(${tX}px ${rtl ? '-' : '+'} (-${tXAdd * Math.abs(progress)}%))`; 20723 } else { 20724 tX = `${tX}px`; 20725 } 20726 if (!swiper.isHorizontal()) { 20727 const prevY = tY; 20728 tY = tX; 20729 tX = prevY; 20730 } 20731 const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`; 20732 20733 /* eslint-disable */ 20734 const transform = ` 20735 translate3d(${tX}, ${tY}, ${tZ}px) 20736 rotateZ(${params.rotate ? rtl ? -rotate : rotate : 0}deg) 20737 scale(${scaleString}) 20738 `; 20739 /* eslint-enable */ 20740 20741 if (params.slideShadows) { 20742 // Set shadows 20743 let shadowEl = slideEl.querySelector('.swiper-slide-shadow'); 20744 if (!shadowEl) { 20745 shadowEl = createShadow('cards', slideEl); 20746 } 20747 if (shadowEl) shadowEl.style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1); 20748 }
vendor: 52,766 bytes, lines 20749-22463
20749 slideEl.style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; 20750 const targetEl = effectTarget(params, slideEl); 20751 targetEl.style.transform = transform; 20752 } 20753 }; 20754 const setTransition = duration => { 20755 const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl)); 20756 transformElements.forEach(el => { 20757 el.style.transitionDuration = `${duration}ms`; 20758 el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => { 20759 shadowEl.style.transitionDuration = `${duration}ms`; 20760 }); 20761 }); 20762 effectVirtualTransitionEnd({ 20763 swiper, 20764 duration, 20765 transformElements 20766 }); 20767 }; 20768 effectInit({ 20769 effect: 'cards', 20770 swiper, 20771 on, 20772 setTranslate, 20773 setTransition, 20774 perspective: () => true, 20775 overwriteParams: () => ({ 20776 watchSlidesProgress: true, 20777 virtualTranslate: !swiper.params.cssMode 20778 }) 20779 }); 20780 } 20781 20782 /** 20783 * Swiper 10.2.0 20784 * Most modern mobile touch slider and framework with hardware accelerated transitions 20785 * https://swiperjs.com 20786 * 20787 * Copyright 2014-2023 Vladimir Kharlampidi 20788 * 20789 * Released under the MIT License 20790 * 20791 * Released on: August 17, 2023 20792 */ 20793 20794 20795 // Swiper Class 20796 const modules = [Virtual, Keyboard, Mousewheel, Navigation, Pagination, Scrollbar, Parallax, Zoom, Controller, A11y, History, HashNavigation, Autoplay, Thumb, freeMode, Grid, Manipulation, EffectFade, EffectCube, EffectFlip, EffectCoverflow, EffectCreative, EffectCards]; 20797 Swiper.use(modules); 20798 20799 return Swiper; 20800 20801})(); 20802 20803/*! 20804 * jQuery Validation Plugin v1.19.5 20805 * 20806 * https://jqueryvalidation.org/ 20807 * 20808 * Copyright (c) 2022 Jörn Zaefferer 20809 * Released under the MIT license 20810 */ 20811(function( factory ) { 20812 if ( typeof define === "function" && define.amd ) { 20813 define( ["jquery"], factory ); 20814 } else if (typeof module === "object" && module.exports) { 20815 module.exports = factory( require( "jquery" ) ); 20816 } else { 20817 factory( jQuery ); 20818 } 20819}(function( $ ) { 20820 20821$.extend( $.fn, { 20822 20823 // https://jqueryvalidation.org/validate/ 20824 validate: function( options ) { 20825 20826 // If nothing is selected, return nothing; can't chain anyway 20827 if ( !this.length ) { 20828 if ( options && options.debug && window.console ) { 20829 console.warn( "Nothing selected, can't validate, returning nothing." ); 20830 } 20831 return; 20832 } 20833 20834 // Check if a validator for this form was already created 20835 var validator = $.data( this[ 0 ], "validator" ); 20836 if ( validator ) { 20837 return validator; 20838 } 20839 20840 // Add novalidate tag if HTML5. 20841 this.attr( "novalidate", "novalidate" ); 20842 20843 validator = new $.validator( options, this[ 0 ] ); 20844 $.data( this[ 0 ], "validator", validator ); 20845 20846 if ( validator.settings.onsubmit ) { 20847 20848 this.on( "click.validate", ":submit", function( event ) { 20849 20850 // Track the used submit button to properly handle scripted 20851 // submits later. 20852 validator.submitButton = event.currentTarget; 20853 20854 // Allow suppressing validation by adding a cancel class to the submit button 20855 if ( $( this ).hasClass( "cancel" ) ) { 20856 validator.cancelSubmit = true; 20857 } 20858 20859 // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button 20860 if ( $( this ).attr( "formnovalidate" ) !== undefined ) { 20861 validator.cancelSubmit = true; 20862 } 20863 } ); 20864 20865 // Validate the form on submit 20866 this.on( "submit.validate", function( event ) { 20867 if ( validator.settings.debug ) { 20868 20869 // Prevent form submit to be able to see console output 20870 event.preventDefault(); 20871 } 20872 20873 function handle() { 20874 var hidden, result; 20875 20876 // Insert a hidden input as a replacement for the missing submit button 20877 // The hidden input is inserted in two cases: 20878 // - A user defined a `submitHandler` 20879 // - There was a pending request due to `remote` method and `stopRequest()` 20880 // was called to submit the form in case it's valid 20881 if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) { 20882 hidden = $( "<input type='hidden'/>" ) 20883 .attr( "name", validator.submitButton.name ) 20884 .val( $( validator.submitButton ).val() ) 20885 .appendTo( validator.currentForm ); 20886 } 20887 20888 if ( validator.settings.submitHandler && !validator.settings.debug ) { 20889 result = validator.settings.submitHandler.call( validator, validator.currentForm, event ); 20890 if ( hidden ) { 20891 20892 // And clean up afterwards; thanks to no-block-scope, hidden can be referenced 20893 hidden.remove(); 20894 } 20895 if ( result !== undefined ) { 20896 return result; 20897 } 20898 return false; 20899 } 20900 return true; 20901 } 20902 20903 // Prevent submit for invalid forms or custom submit handlers 20904 if ( validator.cancelSubmit ) { 20905 validator.cancelSubmit = false; 20906 return handle(); 20907 } 20908 if ( validator.form() ) { 20909 if ( validator.pendingRequest ) { 20910 validator.formSubmitted = true; 20911 return false; 20912 } 20913 return handle(); 20914 } else { 20915 validator.focusInvalid(); 20916 return false; 20917 } 20918 } ); 20919 } 20920 20921 return validator; 20922 }, 20923 20924 // https://jqueryvalidation.org/valid/ 20925 valid: function() { 20926 var valid, validator, errorList; 20927 20928 if ( $( this[ 0 ] ).is( "form" ) ) { 20929 valid = this.validate().form(); 20930 } else { 20931 errorList = []; 20932 valid = true; 20933 validator = $( this[ 0 ].form ).validate(); 20934 this.each( function() { 20935 valid = validator.element( this ) && valid; 20936 if ( !valid ) { 20937 errorList = errorList.concat( validator.errorList ); 20938 } 20939 } ); 20940 validator.errorList = errorList; 20941 } 20942 return valid; 20943 }, 20944 20945 // https://jqueryvalidation.org/rules/ 20946 rules: function( command, argument ) { 20947 var element = this[ 0 ], 20948 isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false", 20949 settings, staticRules, existingRules, data, param, filtered; 20950 20951 // If nothing is selected, return empty object; can't chain anyway 20952 if ( element == null ) { 20953 return; 20954 } 20955 20956 if ( !element.form && isContentEditable ) { 20957 element.form = this.closest( "form" )[ 0 ]; 20958 element.name = this.attr( "name" ); 20959 } 20960 20961 if ( element.form == null ) { 20962 return; 20963 } 20964 20965 if ( command ) { 20966 settings = $.data( element.form, "validator" ).settings; 20967 staticRules = settings.rules; 20968 existingRules = $.validator.staticRules( element ); 20969 switch ( command ) { 20970 case "add": 20971 $.extend( existingRules, $.validator.normalizeRule( argument ) ); 20972 20973 // Remove messages from rules, but allow them to be set separately 20974 delete existingRules.messages; 20975 staticRules[ element.name ] = existingRules; 20976 if ( argument.messages ) { 20977 settings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages ); 20978 } 20979 break; 20980 case "remove": 20981 if ( !argument ) { 20982 delete staticRules[ element.name ]; 20983 return existingRules; 20984 } 20985 filtered = {}; 20986 $.each( argument.split( /\s/ ), function( index, method ) { 20987 filtered[ method ] = existingRules[ method ]; 20988 delete existingRules[ method ]; 20989 } ); 20990 return filtered; 20991 } 20992 } 20993 20994 data = $.validator.normalizeRules( 20995 $.extend( 20996 {}, 20997 $.validator.classRules( element ), 20998 $.validator.attributeRules( element ), 20999 $.validator.dataRules( element ), 21000 $.validator.staticRules( element ) 21001 ), element ); 21002 21003 // Make sure required is at front 21004 if ( data.required ) { 21005 param = data.required; 21006 delete data.required; 21007 data = $.extend( { required: param }, data ); 21008 } 21009 21010 // Make sure remote is at back 21011 if ( data.remote ) { 21012 param = data.remote; 21013 delete data.remote; 21014 data = $.extend( data, { remote: param } ); 21015 } 21016 21017 return data; 21018 } 21019} ); 21020 21021// JQuery trim is deprecated, provide a trim method based on String.prototype.trim 21022var trim = function( str ) { 21023 21024 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill 21025 return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" ); 21026}; 21027 21028// Custom selectors 21029$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support 21030 21031 // https://jqueryvalidation.org/blank-selector/ 21032 blank: function( a ) { 21033 return !trim( "" + $( a ).val() ); 21034 }, 21035 21036 // https://jqueryvalidation.org/filled-selector/ 21037 filled: function( a ) { 21038 var val = $( a ).val(); 21039 return val !== null && !!trim( "" + val ); 21040 }, 21041 21042 // https://jqueryvalidation.org/unchecked-selector/ 21043 unchecked: function( a ) { 21044 return !$( a ).prop( "checked" ); 21045 } 21046} ); 21047 21048// Constructor for validator 21049$.validator = function( options, form ) { 21050 this.settings = $.extend( true, {}, $.validator.defaults, options ); 21051 this.currentForm = form; 21052 this.init(); 21053}; 21054 21055// https://jqueryvalidation.org/jQuery.validator.format/ 21056$.validator.format = function( source, params ) { 21057 if ( arguments.length === 1 ) { 21058 return function() { 21059 var args = $.makeArray( arguments ); 21060 args.unshift( source ); 21061 return $.validator.format.apply( this, args ); 21062 }; 21063 } 21064 if ( params === undefined ) { 21065 return source; 21066 } 21067 if ( arguments.length > 2 && params.constructor !== Array ) { 21068 params = $.makeArray( arguments ).slice( 1 ); 21069 } 21070 if ( params.constructor !== Array ) { 21071 params = [ params ]; 21072 } 21073 $.each( params, function( i, n ) { 21074 source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() { 21075 return n; 21076 } ); 21077 } ); 21078 return source; 21079}; 21080 21081$.extend( $.validator, { 21082 21083 defaults: { 21084 messages: {}, 21085 groups: {}, 21086 rules: {}, 21087 errorClass: "error", 21088 pendingClass: "pending", 21089 validClass: "valid", 21090 errorElement: "label", 21091 focusCleanup: false, 21092 focusInvalid: true, 21093 errorContainer: $( [] ), 21094 errorLabelContainer: $( [] ), 21095 onsubmit: true, 21096 ignore: ":hidden", 21097 ignoreTitle: false, 21098 onfocusin: function( element ) { 21099 this.lastActive = element; 21100 21101 // Hide error label and remove error class on focus if enabled 21102 if ( this.settings.focusCleanup ) { 21103 if ( this.settings.unhighlight ) { 21104 this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); 21105 } 21106 this.hideThese( this.errorsFor( element ) ); 21107 } 21108 }, 21109 onfocusout: function( element ) { 21110 if ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) { 21111 this.element( element ); 21112 } 21113 }, 21114 onkeyup: function( element, event ) { 21115 21116 // Avoid revalidate the field when pressing one of the following keys 21117 // Shift => 16 21118 // Ctrl => 17 21119 // Alt => 18 21120 // Caps lock => 20 21121 // End => 35 21122 // Home => 36 21123 // Left arrow => 37 21124 // Up arrow => 38 21125 // Right arrow => 39 21126 // Down arrow => 40 21127 // Insert => 45 21128 // Num lock => 144 21129 // AltGr key => 225 21130 var excludedKeys = [ 21131 16, 17, 18, 20, 35, 36, 37, 21132 38, 39, 40, 45, 144, 225 21133 ]; 21134 21135 if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) { 21136 return; 21137 } else if ( element.name in this.submitted || element.name in this.invalid ) { 21138 this.element( element ); 21139 } 21140 }, 21141 onclick: function( element ) { 21142 21143 // Click on selects, radiobuttons and checkboxes 21144 if ( element.name in this.submitted ) { 21145 this.element( element ); 21146 21147 // Or option elements, check parent select in that case 21148 } else if ( element.parentNode.name in this.submitted ) { 21149 this.element( element.parentNode ); 21150 } 21151 }, 21152 highlight: function( element, errorClass, validClass ) { 21153 if ( element.type === "radio" ) { 21154 this.findByName( element.name ).addClass( errorClass ).removeClass( validClass ); 21155 } else { 21156 $( element ).addClass( errorClass ).removeClass( validClass ); 21157 } 21158 }, 21159 unhighlight: function( element, errorClass, validClass ) { 21160 if ( element.type === "radio" ) { 21161 this.findByName( element.name ).removeClass( errorClass ).addClass( validClass ); 21162 } else { 21163 $( element ).removeClass( errorClass ).addClass( validClass ); 21164 } 21165 } 21166 }, 21167 21168 // https://jqueryvalidation.org/jQuery.validator.setDefaults/ 21169 setDefaults: function( settings ) { 21170 $.extend( $.validator.defaults, settings ); 21171 }, 21172 21173 messages: { 21174 required: "This field is required.", 21175 remote: "Please fix this field.", 21176 email: "Please enter a valid email address.", 21177 url: "Please enter a valid URL.", 21178 date: "Please enter a valid date.", 21179 dateISO: "Please enter a valid date (ISO).", 21180 number: "Please enter a valid number.", 21181 digits: "Please enter only digits.", 21182 equalTo: "Please enter the same value again.", 21183 maxlength: $.validator.format( "Please enter no more than {0} characters." ), 21184 minlength: $.validator.format( "Please enter at least {0} characters." ), 21185 rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ), 21186 range: $.validator.format( "Please enter a value between {0} and {1}." ), 21187 max: $.validator.format( "Please enter a value less than or equal to {0}." ), 21188 min: $.validator.format( "Please enter a value greater than or equal to {0}." ), 21189 step: $.validator.format( "Please enter a multiple of {0}." ) 21190 }, 21191 21192 autoCreateRanges: false, 21193 21194 prototype: { 21195 21196 init: function() { 21197 this.labelContainer = $( this.settings.errorLabelContainer ); 21198 this.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm ); 21199 this.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer ); 21200 this.submitted = {}; 21201 this.valueCache = {}; 21202 this.pendingRequest = 0; 21203 this.pending = {}; 21204 this.invalid = {}; 21205 this.reset(); 21206 21207 var currentForm = this.currentForm, 21208 groups = ( this.groups = {} ), 21209 rules; 21210 $.each( this.settings.groups, function( key, value ) { 21211 if ( typeof value === "string" ) { 21212 value = value.split( /\s/ ); 21213 } 21214 $.each( value, function( index, name ) { 21215 groups[ name ] = key; 21216 } ); 21217 } ); 21218 rules = this.settings.rules; 21219 $.each( rules, function( key, value ) { 21220 rules[ key ] = $.validator.normalizeRule( value ); 21221 } ); 21222 21223 function delegate( event ) { 21224 var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false"; 21225 21226 // Set form expando on contenteditable 21227 if ( !this.form && isContentEditable ) { 21228 this.form = $( this ).closest( "form" )[ 0 ]; 21229 this.name = $( this ).attr( "name" ); 21230 } 21231 21232 // Ignore the element if it belongs to another form. This will happen mainly 21233 // when setting the `form` attribute of an input to the id of another form. 21234 if ( currentForm !== this.form ) { 21235 return; 21236 } 21237 21238 var validator = $.data( this.form, "validator" ), 21239 eventType = "on" + event.type.replace( /^validate/, "" ), 21240 settings = validator.settings; 21241 if ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) { 21242 settings[ eventType ].call( validator, this, event ); 21243 } 21244 } 21245 21246 $( this.currentForm ) 21247 .on( "focusin.validate focusout.validate keyup.validate", 21248 ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " + 21249 "[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " + 21250 "[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " + 21251 "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate ) 21252 21253 // Support: Chrome, oldIE 21254 // "select" is provided as event.target when clicking a option 21255 .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate ); 21256 21257 if ( this.settings.invalidHandler ) { 21258 $( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler ); 21259 } 21260 }, 21261 21262 // https://jqueryvalidation.org/Validator.form/ 21263 form: function() { 21264 this.checkForm(); 21265 $.extend( this.submitted, this.errorMap ); 21266 this.invalid = $.extend( {}, this.errorMap ); 21267 if ( !this.valid() ) { 21268 $( this.currentForm ).triggerHandler( "invalid-form", [ this ] ); 21269 } 21270 this.showErrors(); 21271 return this.valid(); 21272 }, 21273 21274 checkForm: function() { 21275 this.prepareForm(); 21276 for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) { 21277 this.check( elements[ i ] ); 21278 } 21279 return this.valid(); 21280 }, 21281 21282 // https://jqueryvalidation.org/Validator.element/ 21283 element: function( element ) { 21284 var cleanElement = this.clean( element ), 21285 checkElement = this.validationTargetFor( cleanElement ), 21286 v = this, 21287 result = true, 21288 rs, group; 21289 21290 if ( checkElement === undefined ) { 21291 delete this.invalid[ cleanElement.name ]; 21292 } else { 21293 this.prepareElement( checkElement ); 21294 this.currentElements = $( checkElement ); 21295 21296 // If this element is grouped, then validate all group elements already 21297 // containing a value 21298 group = this.groups[ checkElement.name ]; 21299 if ( group ) { 21300 $.each( this.groups, function( name, testgroup ) { 21301 if ( testgroup === group && name !== checkElement.name ) { 21302 cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) ); 21303 if ( cleanElement && cleanElement.name in v.invalid ) { 21304 v.currentElements.push( cleanElement ); 21305 result = v.check( cleanElement ) && result; 21306 } 21307 } 21308 } ); 21309 } 21310 21311 rs = this.check( checkElement ) !== false; 21312 result = result && rs; 21313 if ( rs ) { 21314 this.invalid[ checkElement.name ] = false; 21315 } else { 21316 this.invalid[ checkElement.name ] = true; 21317 } 21318 21319 if ( !this.numberOfInvalids() ) { 21320 21321 // Hide error containers on last error 21322 this.toHide = this.toHide.add( this.containers ); 21323 } 21324 this.showErrors(); 21325 21326 // Add aria-invalid status for screen readers 21327 $( element ).attr( "aria-invalid", !rs ); 21328 } 21329 21330 return result; 21331 }, 21332 21333 // https://jqueryvalidation.org/Validator.showErrors/ 21334 showErrors: function( errors ) { 21335 if ( errors ) { 21336 var validator = this; 21337 21338 // Add items to error list and map 21339 $.extend( this.errorMap, errors ); 21340 this.errorList = $.map( this.errorMap, function( message, name ) { 21341 return { 21342 message: message, 21343 element: validator.findByName( name )[ 0 ] 21344 }; 21345 } ); 21346 21347 // Remove items from success list 21348 this.successList = $.grep( this.successList, function( element ) { 21349 return !( element.name in errors ); 21350 } ); 21351 } 21352 if ( this.settings.showErrors ) { 21353 this.settings.showErrors.call( this, this.errorMap, this.errorList ); 21354 } else { 21355 this.defaultShowErrors(); 21356 } 21357 }, 21358 21359 // https://jqueryvalidation.org/Validator.resetForm/ 21360 resetForm: function() { 21361 if ( $.fn.resetForm ) { 21362 $( this.currentForm ).resetForm(); 21363 } 21364 this.invalid = {}; 21365 this.submitted = {}; 21366 this.prepareForm(); 21367 this.hideErrors(); 21368 var elements = this.elements() 21369 .removeData( "previousValue" ) 21370 .removeAttr( "aria-invalid" ); 21371 21372 this.resetElements( elements ); 21373 }, 21374 21375 resetElements: function( elements ) { 21376 var i; 21377 21378 if ( this.settings.unhighlight ) { 21379 for ( i = 0; elements[ i ]; i++ ) { 21380 this.settings.unhighlight.call( this, elements[ i ], 21381 this.settings.errorClass, "" ); 21382 this.findByName( elements[ i ].name ).removeClass( this.settings.validClass ); 21383 } 21384 } else { 21385 elements 21386 .removeClass( this.settings.errorClass ) 21387 .removeClass( this.settings.validClass ); 21388 } 21389 }, 21390 21391 numberOfInvalids: function() { 21392 return this.objectLength( this.invalid ); 21393 }, 21394 21395 objectLength: function( obj ) { 21396 /* jshint unused: false */ 21397 var count = 0, 21398 i; 21399 for ( i in obj ) { 21400 21401 // This check allows counting elements with empty error 21402 // message as invalid elements 21403 if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) { 21404 count++; 21405 } 21406 } 21407 return count; 21408 }, 21409 21410 hideErrors: function() { 21411 this.hideThese( this.toHide ); 21412 }, 21413 21414 hideThese: function( errors ) { 21415 errors.not( this.containers ).text( "" ); 21416 this.addWrapper( errors ).hide(); 21417 }, 21418 21419 valid: function() { 21420 return this.size() === 0; 21421 }, 21422 21423 size: function() { 21424 return this.errorList.length; 21425 }, 21426 21427 focusInvalid: function() { 21428 if ( this.settings.focusInvalid ) { 21429 try { 21430 $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] ) 21431 .filter( ":visible" ) 21432 .trigger( "focus" ) 21433 21434 // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find 21435 .trigger( "focusin" ); 21436 } catch ( e ) { 21437 21438 // Ignore IE throwing errors when focusing hidden elements 21439 } 21440 } 21441 }, 21442 21443 findLastActive: function() { 21444 var lastActive = this.lastActive; 21445 return lastActive && $.grep( this.errorList, function( n ) { 21446 return n.element.name === lastActive.name; 21447 } ).length === 1 && lastActive; 21448 }, 21449 21450 elements: function() { 21451 var validator = this, 21452 rulesCache = {}; 21453 21454 // Select all valid inputs inside the form (no submit or reset buttons) 21455 return $( this.currentForm ) 21456 .find( "input, select, textarea, [contenteditable]" ) 21457 .not( ":submit, :reset, :image, :disabled" ) 21458 .not( this.settings.ignore ) 21459 .filter( function() { 21460 var name = this.name || $( this ).attr( "name" ); // For contenteditable 21461 var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false"; 21462 21463 if ( !name && validator.settings.debug && window.console ) { 21464 console.error( "%o has no name assigned", this ); 21465 } 21466 21467 // Set form expando on contenteditable 21468 if ( isContentEditable ) { 21469 this.form = $( this ).closest( "form" )[ 0 ]; 21470 this.name = name; 21471 } 21472 21473 // Ignore elements that belong to other/nested forms 21474 if ( this.form !== validator.currentForm ) { 21475 return false; 21476 } 21477 21478 // Select only the first element for each name, and only those with rules specified 21479 if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) { 21480 return false; 21481 } 21482 21483 rulesCache[ name ] = true; 21484 return true; 21485 } ); 21486 }, 21487 21488 clean: function( selector ) { 21489 return $( selector )[ 0 ]; 21490 }, 21491 21492 errors: function() { 21493 var errorClass = this.settings.errorClass.split( " " ).join( "." ); 21494 return $( this.settings.errorElement + "." + errorClass, this.errorContext ); 21495 }, 21496 21497 resetInternals: function() { 21498 this.successList = []; 21499 this.errorList = []; 21500 this.errorMap = {}; 21501 this.toShow = $( [] ); 21502 this.toHide = $( [] ); 21503 }, 21504 21505 reset: function() { 21506 this.resetInternals(); 21507 this.currentElements = $( [] ); 21508 }, 21509 21510 prepareForm: function() { 21511 this.reset(); 21512 this.toHide = this.errors().add( this.containers ); 21513 }, 21514 21515 prepareElement: function( element ) { 21516 this.reset(); 21517 this.toHide = this.errorsFor( element ); 21518 }, 21519 21520 elementValue: function( element ) { 21521 var $element = $( element ), 21522 type = element.type, 21523 isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false", 21524 val, idx; 21525 21526 if ( type === "radio" || type === "checkbox" ) { 21527 return this.findByName( element.name ).filter( ":checked" ).val(); 21528 } else if ( type === "number" && typeof element.validity !== "undefined" ) { 21529 return element.validity.badInput ? "NaN" : $element.val(); 21530 } 21531 21532 if ( isContentEditable ) { 21533 val = $element.text(); 21534 } else { 21535 val = $element.val(); 21536 } 21537 21538 if ( type === "file" ) { 21539 21540 // Modern browser (chrome & safari) 21541 if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) { 21542 return val.substr( 12 ); 21543 } 21544 21545 // Legacy browsers 21546 // Unix-based path 21547 idx = val.lastIndexOf( "/" ); 21548 if ( idx >= 0 ) { 21549 return val.substr( idx + 1 ); 21550 } 21551 21552 // Windows-based path 21553 idx = val.lastIndexOf( "\\" ); 21554 if ( idx >= 0 ) { 21555 return val.substr( idx + 1 ); 21556 } 21557 21558 // Just the file name 21559 return val; 21560 } 21561 21562 if ( typeof val === "string" ) { 21563 return val.replace( /\r/g, "" ); 21564 } 21565 return val; 21566 }, 21567 21568 check: function( element ) { 21569 element = this.validationTargetFor( this.clean( element ) ); 21570 21571 var rules = $( element ).rules(), 21572 rulesCount = $.map( rules, function( n, i ) { 21573 return i; 21574 } ).length, 21575 dependencyMismatch = false, 21576 val = this.elementValue( element ), 21577 result, method, rule, normalizer; 21578 21579 // Prioritize the local normalizer defined for this element over the global one 21580 // if the former exists, otherwise user the global one in case it exists. 21581 if ( typeof rules.normalizer === "function" ) { 21582 normalizer = rules.normalizer; 21583 } else if ( typeof this.settings.normalizer === "function" ) { 21584 normalizer = this.settings.normalizer; 21585 } 21586 21587 // If normalizer is defined, then call it to retreive the changed value instead 21588 // of using the real one. 21589 // Note that `this` in the normalizer is `element`. 21590 if ( normalizer ) { 21591 val = normalizer.call( element, val ); 21592 21593 // Delete the normalizer from rules to avoid treating it as a pre-defined method. 21594 delete rules.normalizer; 21595 } 21596 21597 for ( method in rules ) { 21598 rule = { method: method, parameters: rules[ method ] }; 21599 try { 21600 result = $.validator.methods[ method ].call( this, val, element, rule.parameters ); 21601 21602 // If a method indicates that the field is optional and therefore valid, 21603 // don't mark it as valid when there are no other rules 21604 if ( result === "dependency-mismatch" && rulesCount === 1 ) { 21605 dependencyMismatch = true; 21606 continue; 21607 } 21608 dependencyMismatch = false; 21609 21610 if ( result === "pending" ) { 21611 this.toHide = this.toHide.not( this.errorsFor( element ) ); 21612 return; 21613 } 21614 21615 if ( !result ) { 21616 this.formatAndAdd( element, rule ); 21617 return false; 21618 } 21619 } catch ( e ) { 21620 if ( this.settings.debug && window.console ) { 21621 console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e ); 21622 } 21623 if ( e instanceof TypeError ) { 21624 e.message += ". Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method."; 21625 } 21626 21627 throw e; 21628 } 21629 } 21630 if ( dependencyMismatch ) { 21631 return; 21632 } 21633 if ( this.objectLength( rules ) ) { 21634 this.successList.push( element ); 21635 } 21636 return true; 21637 }, 21638 21639 // Return the custom message for the given element and validation method 21640 // specified in the element's HTML5 data attribute 21641 // return the generic message if present and no method specific message is present 21642 customDataMessage: function( element, method ) { 21643 return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() + 21644 method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" ); 21645 }, 21646 21647 // Return the custom message for the given element name and validation method 21648 customMessage: function( name, method ) { 21649 var m = this.settings.messages[ name ]; 21650 return m && ( m.constructor === String ? m : m[ method ] ); 21651 }, 21652 21653 // Return the first defined argument, allowing empty strings 21654 findDefined: function() { 21655 for ( var i = 0; i < arguments.length; i++ ) { 21656 if ( arguments[ i ] !== undefined ) { 21657 return arguments[ i ]; 21658 } 21659 } 21660 return undefined; 21661 }, 21662 21663 // The second parameter 'rule' used to be a string, and extended to an object literal 21664 // of the following form: 21665 // rule = { 21666 // method: "method name", 21667 // parameters: "the given method parameters" 21668 // } 21669 // 21670 // The old behavior still supported, kept to maintain backward compatibility with 21671 // old code, and will be removed in the next major release. 21672 defaultMessage: function( element, rule ) { 21673 if ( typeof rule === "string" ) { 21674 rule = { method: rule }; 21675 } 21676 21677 var message = this.findDefined( 21678 this.customMessage( element.name, rule.method ), 21679 this.customDataMessage( element, rule.method ), 21680 21681 // 'title' is never undefined, so handle empty string as undefined 21682 !this.settings.ignoreTitle && element.title || undefined, 21683 $.validator.messages[ rule.method ], 21684 "<strong>Warning: No message defined for " + element.name + "</strong>" 21685 ), 21686 theregex = /\$?\{(\d+)\}/g; 21687 if ( typeof message === "function" ) { 21688 message = message.call( this, rule.parameters, element ); 21689 } else if ( theregex.test( message ) ) { 21690 message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters ); 21691 } 21692 21693 return message; 21694 }, 21695 21696 formatAndAdd: function( element, rule ) { 21697 var message = this.defaultMessage( element, rule ); 21698 21699 this.errorList.push( { 21700 message: message, 21701 element: element, 21702 method: rule.method 21703 } ); 21704 21705 this.errorMap[ element.name ] = message; 21706 this.submitted[ element.name ] = message; 21707 }, 21708 21709 addWrapper: function( toToggle ) { 21710 if ( this.settings.wrapper ) { 21711 toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); 21712 } 21713 return toToggle; 21714 }, 21715 21716 defaultShowErrors: function() { 21717 var i, elements, error; 21718 for ( i = 0; this.errorList[ i ]; i++ ) { 21719 error = this.errorList[ i ]; 21720 if ( this.settings.highlight ) { 21721 this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); 21722 } 21723 this.showLabel( error.element, error.message ); 21724 } 21725 if ( this.errorList.length ) { 21726 this.toShow = this.toShow.add( this.containers ); 21727 } 21728 if ( this.settings.success ) { 21729 for ( i = 0; this.successList[ i ]; i++ ) { 21730 this.showLabel( this.successList[ i ] ); 21731 } 21732 } 21733 if ( this.settings.unhighlight ) { 21734 for ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) { 21735 this.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass ); 21736 } 21737 } 21738 this.toHide = this.toHide.not( this.toShow ); 21739 this.hideErrors(); 21740 this.addWrapper( this.toShow ).show(); 21741 }, 21742 21743 validElements: function() { 21744 return this.currentElements.not( this.invalidElements() ); 21745 }, 21746 21747 invalidElements: function() { 21748 return $( this.errorList ).map( function() { 21749 return this.element; 21750 } ); 21751 }, 21752 21753 showLabel: function( element, message ) { 21754 var place, group, errorID, v, 21755 error = this.errorsFor( element ), 21756 elementID = this.idOrName( element ), 21757 describedBy = $( element ).attr( "aria-describedby" ); 21758 21759 if ( error.length ) { 21760 21761 // Refresh error/success class 21762 error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass ); 21763 21764 // Replace message on existing label 21765 error.html( message ); 21766 } else { 21767 21768 // Create error element 21769 error = $( "<" + this.settings.errorElement + ">" ) 21770 .attr( "id", elementID + "-error" ) 21771 .addClass( this.settings.errorClass ) 21772 .html( message || "" ); 21773 21774 // Maintain reference to the element to be placed into the DOM 21775 place = error; 21776 if ( this.settings.wrapper ) { 21777 21778 // Make sure the element is visible, even in IE 21779 // actually showing the wrapped element is handled elsewhere 21780 place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent(); 21781 } 21782 if ( this.labelContainer.length ) { 21783 this.labelContainer.append( place ); 21784 } else if ( this.settings.errorPlacement ) { 21785 this.settings.errorPlacement.call( this, place, $( element ) ); 21786 } else { 21787 place.insertAfter( element ); 21788 } 21789 21790 // Link error back to the element 21791 if ( error.is( "label" ) ) { 21792 21793 // If the error is a label, then associate using 'for' 21794 error.attr( "for", elementID ); 21795 21796 // If the element is not a child of an associated label, then it's necessary 21797 // to explicitly apply aria-describedby 21798 } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) { 21799 errorID = error.attr( "id" ); 21800 21801 // Respect existing non-error aria-describedby 21802 if ( !describedBy ) { 21803 describedBy = errorID; 21804 } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) { 21805 21806 // Add to end of list if not already present 21807 describedBy += " " + errorID; 21808 } 21809 $( element ).attr( "aria-describedby", describedBy ); 21810 21811 // If this element is grouped, then assign to all elements in the same group 21812 group = this.groups[ element.name ]; 21813 if ( group ) { 21814 v = this; 21815 $.each( v.groups, function( name, testgroup ) { 21816 if ( testgroup === group ) { 21817 $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm ) 21818 .attr( "aria-describedby", error.attr( "id" ) ); 21819 } 21820 } ); 21821 } 21822 } 21823 } 21824 if ( !message && this.settings.success ) { 21825 error.text( "" ); 21826 if ( typeof this.settings.success === "string" ) { 21827 error.addClass( this.settings.success ); 21828 } else { 21829 this.settings.success( error, element ); 21830 } 21831 } 21832 this.toShow = this.toShow.add( error ); 21833 }, 21834 21835 errorsFor: function( element ) { 21836 var name = this.escapeCssMeta( this.idOrName( element ) ), 21837 describer = $( element ).attr( "aria-describedby" ), 21838 selector = "label[for='" + name + "'], label[for='" + name + "'] *"; 21839 21840 // 'aria-describedby' should directly reference the error element 21841 if ( describer ) { 21842 selector = selector + ", #" + this.escapeCssMeta( describer ) 21843 .replace( /\s+/g, ", #" ); 21844 } 21845 21846 return this 21847 .errors() 21848 .filter( selector ); 21849 }, 21850 21851 // See https://api.jquery.com/category/selectors/, for CSS 21852 // meta-characters that should be escaped in order to be used with JQuery 21853 // as a literal part of a name/id or any selector. 21854 escapeCssMeta: function( string ) { 21855 if ( string === undefined ) { 21856 return ""; 21857 } 21858 21859 return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" ); 21860 }, 21861 21862 idOrName: function( element ) { 21863 return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name ); 21864 }, 21865 21866 validationTargetFor: function( element ) { 21867 21868 // If radio/checkbox, validate first element in group instead 21869 if ( this.checkable( element ) ) { 21870 element = this.findByName( element.name ); 21871 } 21872 21873 // Always apply ignore filter 21874 return $( element ).not( this.settings.ignore )[ 0 ]; 21875 }, 21876 21877 checkable: function( element ) { 21878 return ( /radio|checkbox/i ).test( element.type ); 21879 }, 21880 21881 findByName: function( name ) { 21882 return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" ); 21883 }, 21884 21885 getLength: function( value, element ) { 21886 switch ( element.nodeName.toLowerCase() ) { 21887 case "select": 21888 return $( "option:selected", element ).length; 21889 case "input": 21890 if ( this.checkable( element ) ) { 21891 return this.findByName( element.name ).filter( ":checked" ).length; 21892 } 21893 } 21894 return value.length; 21895 }, 21896 21897 depend: function( param, element ) { 21898 return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true; 21899 }, 21900 21901 dependTypes: { 21902 "boolean": function( param ) { 21903 return param; 21904 }, 21905 "string": function( param, element ) { 21906 return !!$( param, element.form ).length; 21907 }, 21908 "function": function( param, element ) { 21909 return param( element ); 21910 } 21911 }, 21912 21913 optional: function( element ) { 21914 var val = this.elementValue( element ); 21915 return !$.validator.methods.required.call( this, val, element ) && "dependency-mismatch"; 21916 }, 21917 21918 startRequest: function( element ) { 21919 if ( !this.pending[ element.name ] ) { 21920 this.pendingRequest++; 21921 $( element ).addClass( this.settings.pendingClass ); 21922 this.pending[ element.name ] = true; 21923 } 21924 }, 21925 21926 stopRequest: function( element, valid ) { 21927 this.pendingRequest--; 21928 21929 // Sometimes synchronization fails, make sure pendingRequest is never < 0 21930 if ( this.pendingRequest < 0 ) { 21931 this.pendingRequest = 0; 21932 } 21933 delete this.pending[ element.name ]; 21934 $( element ).removeClass( this.settings.pendingClass ); 21935 if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) { 21936 $( this.currentForm ).trigger( "submit" ); 21937 21938 // Remove the hidden input that was used as a replacement for the 21939 // missing submit button. The hidden input is added by `handle()` 21940 // to ensure that the value of the used submit button is passed on 21941 // for scripted submits triggered by this method 21942 if ( this.submitButton ) { 21943 $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove(); 21944 } 21945 21946 this.formSubmitted = false; 21947 } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) { 21948 $( this.currentForm ).triggerHandler( "invalid-form", [ this ] ); 21949 this.formSubmitted = false; 21950 } 21951 }, 21952 21953 previousValue: function( element, method ) { 21954 method = typeof method === "string" && method || "remote"; 21955 21956 return $.data( element, "previousValue" ) || $.data( element, "previousValue", { 21957 old: null, 21958 valid: true, 21959 message: this.defaultMessage( element, { method: method } ) 21960 } ); 21961 }, 21962 21963 // Cleans up all forms and elements, removes validator-specific events 21964 destroy: function() { 21965 this.resetForm(); 21966 21967 $( this.currentForm ) 21968 .off( ".validate" ) 21969 .removeData( "validator" ) 21970 .find( ".validate-equalTo-blur" ) 21971 .off( ".validate-equalTo" ) 21972 .removeClass( "validate-equalTo-blur" ) 21973 .find( ".validate-lessThan-blur" ) 21974 .off( ".validate-lessThan" ) 21975 .removeClass( "validate-lessThan-blur" ) 21976 .find( ".validate-lessThanEqual-blur" ) 21977 .off( ".validate-lessThanEqual" ) 21978 .removeClass( "validate-lessThanEqual-blur" ) 21979 .find( ".validate-greaterThanEqual-blur" ) 21980 .off( ".validate-greaterThanEqual" ) 21981 .removeClass( "validate-greaterThanEqual-blur" ) 21982 .find( ".validate-greaterThan-blur" ) 21983 .off( ".validate-greaterThan" ) 21984 .removeClass( "validate-greaterThan-blur" ); 21985 } 21986 21987 }, 21988 21989 classRuleSettings: { 21990 required: { required: true }, 21991 email: { email: true }, 21992 url: { url: true }, 21993 date: { date: true }, 21994 dateISO: { dateISO: true }, 21995 number: { number: true }, 21996 digits: { digits: true }, 21997 creditcard: { creditcard: true } 21998 }, 21999 22000 addClassRules: function( className, rules ) { 22001 if ( className.constructor === String ) { 22002 this.classRuleSettings[ className ] = rules; 22003 } else { 22004 $.extend( this.classRuleSettings, className ); 22005 } 22006 }, 22007 22008 classRules: function( element ) { 22009 var rules = {}, 22010 classes = $( element ).attr( "class" ); 22011 22012 if ( classes ) { 22013 $.each( classes.split( " " ), function() { 22014 if ( this in $.validator.classRuleSettings ) { 22015 $.extend( rules, $.validator.classRuleSettings[ this ] ); 22016 } 22017 } ); 22018 } 22019 return rules; 22020 }, 22021 22022 normalizeAttributeRule: function( rules, type, method, value ) { 22023 22024 // Convert the value to a number for number inputs, and for text for backwards compability 22025 // allows type="date" and others to be compared as strings 22026 if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) { 22027 value = Number( value ); 22028 22029 // Support Opera Mini, which returns NaN for undefined minlength 22030 if ( isNaN( value ) ) { 22031 value = undefined; 22032 } 22033 } 22034 22035 if ( value || value === 0 ) { 22036 rules[ method ] = value; 22037 } else if ( type === method && type !== "range" ) { 22038 22039 // Exception: the jquery validate 'range' method 22040 // does not test for the html5 'range' type 22041 rules[ type === "date" ? "dateISO" : method ] = true; 22042 } 22043 }, 22044 22045 attributeRules: function( element ) { 22046 var rules = {}, 22047 $element = $( element ), 22048 type = element.getAttribute( "type" ), 22049 method, value; 22050 22051 for ( method in $.validator.methods ) { 22052 22053 // Support for <input required> in both html5 and older browsers 22054 if ( method === "required" ) { 22055 value = element.getAttribute( method ); 22056 22057 // Some browsers return an empty string for the required attribute 22058 // and non-HTML5 browsers might have required="" markup 22059 if ( value === "" ) { 22060 value = true; 22061 } 22062 22063 // Force non-HTML5 browsers to return bool 22064 value = !!value; 22065 } else { 22066 value = $element.attr( method ); 22067 } 22068 22069 this.normalizeAttributeRule( rules, type, method, value ); 22070 } 22071 22072 // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs 22073 if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) { 22074 delete rules.maxlength; 22075 } 22076 22077 return rules; 22078 }, 22079 22080 dataRules: function( element ) { 22081 var rules = {}, 22082 $element = $( element ), 22083 type = element.getAttribute( "type" ), 22084 method, value; 22085 22086 for ( method in $.validator.methods ) { 22087 value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() ); 22088 22089 // Cast empty attributes like `data-rule-required` to `true` 22090 if ( value === "" ) { 22091 value = true; 22092 } 22093 22094 this.normalizeAttributeRule( rules, type, method, value ); 22095 } 22096 return rules; 22097 }, 22098 22099 staticRules: function( element ) { 22100 var rules = {}, 22101 validator = $.data( element.form, "validator" ); 22102 22103 if ( validator.settings.rules ) { 22104 rules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {}; 22105 } 22106 return rules; 22107 }, 22108 22109 normalizeRules: function( rules, element ) { 22110 22111 // Handle dependency check 22112 $.each( rules, function( prop, val ) { 22113 22114 // Ignore rule when param is explicitly false, eg. required:false 22115 if ( val === false ) { 22116 delete rules[ prop ]; 22117 return; 22118 } 22119 if ( val.param || val.depends ) { 22120 var keepRule = true; 22121 switch ( typeof val.depends ) { 22122 case "string": 22123 keepRule = !!$( val.depends, element.form ).length; 22124 break; 22125 case "function": 22126 keepRule = val.depends.call( element, element ); 22127 break; 22128 } 22129 if ( keepRule ) { 22130 rules[ prop ] = val.param !== undefined ? val.param : true; 22131 } else { 22132 $.data( element.form, "validator" ).resetElements( $( element ) ); 22133 delete rules[ prop ]; 22134 } 22135 } 22136 } ); 22137 22138 // Evaluate parameters 22139 $.each( rules, function( rule, parameter ) { 22140 rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter; 22141 } ); 22142 22143 // Clean number parameters 22144 $.each( [ "minlength", "maxlength" ], function() { 22145 if ( rules[ this ] ) { 22146 rules[ this ] = Number( rules[ this ] ); 22147 } 22148 } ); 22149 $.each( [ "rangelength", "range" ], function() { 22150 var parts; 22151 if ( rules[ this ] ) { 22152 if ( Array.isArray( rules[ this ] ) ) { 22153 rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ]; 22154 } else if ( typeof rules[ this ] === "string" ) { 22155 parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ ); 22156 rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ]; 22157 } 22158 } 22159 } ); 22160 22161 if ( $.validator.autoCreateRanges ) { 22162 22163 // Auto-create ranges 22164 if ( rules.min != null && rules.max != null ) { 22165 rules.range = [ rules.min, rules.max ]; 22166 delete rules.min; 22167 delete rules.max; 22168 } 22169 if ( rules.minlength != null && rules.maxlength != null ) { 22170 rules.rangelength = [ rules.minlength, rules.maxlength ]; 22171 delete rules.minlength; 22172 delete rules.maxlength; 22173 } 22174 } 22175 22176 return rules; 22177 }, 22178 22179 // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true} 22180 normalizeRule: function( data ) { 22181 if ( typeof data === "string" ) { 22182 var transformed = {}; 22183 $.each( data.split( /\s/ ), function() { 22184 transformed[ this ] = true; 22185 } ); 22186 data = transformed; 22187 } 22188 return data; 22189 }, 22190 22191 // https://jqueryvalidation.org/jQuery.validator.addMethod/ 22192 addMethod: function( name, method, message ) { 22193 $.validator.methods[ name ] = method; 22194 $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ]; 22195 if ( method.length < 3 ) { 22196 $.validator.addClassRules( name, $.validator.normalizeRule( name ) ); 22197 } 22198 }, 22199 22200 // https://jqueryvalidation.org/jQuery.validator.methods/ 22201 methods: { 22202 22203 // https://jqueryvalidation.org/required-method/ 22204 required: function( value, element, param ) { 22205 22206 // Check if dependency is met 22207 if ( !this.depend( param, element ) ) { 22208 return "dependency-mismatch"; 22209 } 22210 if ( element.nodeName.toLowerCase() === "select" ) { 22211 22212 // Could be an array for select-multiple or a string, both are fine this way 22213 var val = $( element ).val(); 22214 return val && val.length > 0; 22215 } 22216 if ( this.checkable( element ) ) { 22217 return this.getLength( value, element ) > 0; 22218 } 22219 return value !== undefined && value !== null && value.length > 0; 22220 }, 22221 22222 // https://jqueryvalidation.org/email-method/ 22223 email: function( value, element ) { 22224 22225 // From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address 22226 // Retrieved 2014-01-14 22227 // If you have a problem with this implementation, report a bug against the above spec 22228 // Or use custom methods to implement your own email validation 22229 return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value ); 22230 }, 22231 22232 // https://jqueryvalidation.org/url-method/ 22233 url: function( value, element ) { 22234 22235 // Copyright (c) 2010-2013 Diego Perini, MIT licensed 22236 // https://gist.github.com/dperini/729294 22237 // see also https://mathiasbynens.be/demo/url-regex 22238 // modified to allow protocol-relative URLs 22239 return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value ); 22240 }, 22241 22242 // https://jqueryvalidation.org/date-method/ 22243 date: ( function() { 22244 var called = false; 22245 22246 return function( value, element ) { 22247 if ( !called ) { 22248 called = true; 22249 if ( this.settings.debug && window.console ) { 22250 console.warn( 22251 "The `date` method is deprecated and will be removed in version '2.0.0'.\n" + 22252 "Please don't use it, since it relies on the Date constructor, which\n" + 22253 "behaves very differently across browsers and locales. Use `dateISO`\n" + 22254 "instead or one of the locale specific methods in `localizations/`\n" + 22255 "and `additional-methods.js`." 22256 ); 22257 } 22258 } 22259 22260 return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() ); 22261 }; 22262 }() ), 22263 22264 // https://jqueryvalidation.org/dateISO-method/ 22265 dateISO: function( value, element ) { 22266 return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value ); 22267 }, 22268 22269 // https://jqueryvalidation.org/number-method/ 22270 number: function( value, element ) { 22271 return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value ); 22272 }, 22273 22274 // https://jqueryvalidation.org/digits-method/ 22275 digits: function( value, element ) { 22276 return this.optional( element ) || /^\d+$/.test( value ); 22277 }, 22278 22279 // https://jqueryvalidation.org/minlength-method/ 22280 minlength: function( value, element, param ) { 22281 var length = Array.isArray( value ) ? value.length : this.getLength( value, element ); 22282 return this.optional( element ) || length >= param; 22283 }, 22284 22285 // https://jqueryvalidation.org/maxlength-method/ 22286 maxlength: function( value, element, param ) { 22287 var length = Array.isArray( value ) ? value.length : this.getLength( value, element ); 22288 return this.optional( element ) || length <= param; 22289 }, 22290 22291 // https://jqueryvalidation.org/rangelength-method/ 22292 rangelength: function( value, element, param ) { 22293 var length = Array.isArray( value ) ? value.length : this.getLength( value, element ); 22294 return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] ); 22295 }, 22296 22297 // https://jqueryvalidation.org/min-method/ 22298 min: function( value, element, param ) { 22299 return this.optional( element ) || value >= param; 22300 }, 22301 22302 // https://jqueryvalidation.org/max-method/ 22303 max: function( value, element, param ) { 22304 return this.optional( element ) || value <= param; 22305 }, 22306 22307 // https://jqueryvalidation.org/range-method/ 22308 range: function( value, element, param ) { 22309 return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] ); 22310 }, 22311 22312 // https://jqueryvalidation.org/step-method/ 22313 step: function( value, element, param ) { 22314 var type = $( element ).attr( "type" ), 22315 errorMessage = "Step attribute on input type " + type + " is not supported.", 22316 supportedTypes = [ "text", "number", "range" ], 22317 re = new RegExp( "\\b" + type + "\\b" ), 22318 notSupported = type && !re.test( supportedTypes.join() ), 22319 decimalPlaces = function( num ) { 22320 var match = ( "" + num ).match( /(?:\.(\d+))?$/ ); 22321 if ( !match ) { 22322 return 0; 22323 } 22324 22325 // Number of digits right of decimal point. 22326 return match[ 1 ] ? match[ 1 ].length : 0; 22327 }, 22328 toInt = function( num ) { 22329 return Math.round( num * Math.pow( 10, decimals ) ); 22330 }, 22331 valid = true, 22332 decimals; 22333 22334 // Works only for text, number and range input types 22335 // TODO find a way to support input types date, datetime, datetime-local, month, time and week 22336 if ( notSupported ) { 22337 throw new Error( errorMessage ); 22338 } 22339 22340 decimals = decimalPlaces( param ); 22341 22342 // Value can't have too many decimals 22343 if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) { 22344 valid = false; 22345 } 22346 22347 return this.optional( element ) || valid; 22348 }, 22349 22350 // https://jqueryvalidation.org/equalTo-method/ 22351 equalTo: function( value, element, param ) { 22352 22353 // Bind to the blur event of the target in order to revalidate whenever the target field is updated 22354 var target = $( param ); 22355 if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) { 22356 target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() { 22357 $( element ).valid(); 22358 } ); 22359 } 22360 return value === target.val(); 22361 }, 22362 22363 // https://jqueryvalidation.org/remote-method/ 22364 remote: function( value, element, param, method ) { 22365 if ( this.optional( element ) ) { 22366 return "dependency-mismatch"; 22367 } 22368 22369 method = typeof method === "string" && method || "remote"; 22370 22371 var previous = this.previousValue( element, method ), 22372 validator, data, optionDataString; 22373 22374 if ( !this.settings.messages[ element.name ] ) { 22375 this.settings.messages[ element.name ] = {}; 22376 } 22377 previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ]; 22378 this.settings.messages[ element.name ][ method ] = previous.message; 22379 22380 param = typeof param === "string" && { url: param } || param; 22381 optionDataString = $.param( $.extend( { data: value }, param.data ) ); 22382 if ( previous.old === optionDataString ) { 22383 return previous.valid; 22384 } 22385 22386 previous.old = optionDataString; 22387 validator = this; 22388 this.startRequest( element ); 22389 data = {}; 22390 data[ element.name ] = value; 22391 $.ajax( $.extend( true, { 22392 mode: "abort", 22393 port: "validate" + element.name, 22394 dataType: "json", 22395 data: data, 22396 context: validator.currentForm, 22397 success: function( response ) { 22398 var valid = response === true || response === "true", 22399 errors, message, submitted; 22400 22401 validator.settings.messages[ element.name ][ method ] = previous.originalMessage; 22402 if ( valid ) { 22403 submitted = validator.formSubmitted; 22404 validator.resetInternals(); 22405 validator.toHide = validator.errorsFor( element ); 22406 validator.formSubmitted = submitted; 22407 validator.successList.push( element ); 22408 validator.invalid[ element.name ] = false; 22409 validator.showErrors(); 22410 } else { 22411 errors = {}; 22412 message = response || validator.defaultMessage( element, { method: method, parameters: value } ); 22413 errors[ element.name ] = previous.message = message; 22414 validator.invalid[ element.name ] = true; 22415 validator.showErrors( errors ); 22416 } 22417 previous.valid = valid; 22418 validator.stopRequest( element, valid ); 22419 } 22420 }, param ) ); 22421 return "pending"; 22422 } 22423 } 22424 22425} ); 22426 22427// Ajax mode: abort 22428// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); 22429// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() 22430 22431var pendingRequests = {}, 22432 ajax; 22433 22434// Use a prefilter if available (1.5+) 22435if ( $.ajaxPrefilter ) { 22436 $.ajaxPrefilter( function( settings, _, xhr ) { 22437 var port = settings.port; 22438 if ( settings.mode === "abort" ) { 22439 if ( pendingRequests[ port ] ) { 22440 pendingRequests[ port ].abort(); 22441 } 22442 pendingRequests[ port ] = xhr; 22443 } 22444 } ); 22445} else { 22446 22447 // Proxy ajax 22448 ajax = $.ajax; 22449 $.ajax = function( settings ) { 22450 var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, 22451 port = ( "port" in settings ? settings : $.ajaxSettings ).port; 22452 if ( mode === "abort" ) { 22453 if ( pendingRequests[ port ] ) { 22454 pendingRequests[ port ].abort(); 22455 } 22456 pendingRequests[ port ] = ajax.apply( this, arguments ); 22457 return pendingRequests[ port ]; 22458 } 22459 return ajax.apply( this, arguments ); 22460 }; 22461} 22462return $; 22463}));
vendor: 23,177 bytes, lines 22464-23067
22464/** 22465 * jquery.mask.js 22466 * @version: v1.14.16 22467 * @author: Igor Escobar 22468 * 22469 * Created by Igor Escobar on 2012-03-10. Please report any bug at github.com/igorescobar/jQuery-Mask-Plugin 22470 * 22471 * Copyright (c) 2012 Igor Escobar http://igorescobar.com 22472 * 22473 * The MIT License (http://www.opensource.org/licenses/mit-license.php) 22474 * 22475 * Permission is hereby granted, free of charge, to any person 22476 * obtaining a copy of this software and associated documentation 22477 * files (the "Software"), to deal in the Software without 22478 * restriction, including without limitation the rights to use, 22479 * copy, modify, merge, publish, distribute, sublicense, and/or sell 22480 * copies of the Software, and to permit persons to whom the 22481 * Software is furnished to do so, subject to the following 22482 * conditions: 22483 * 22484 * The above copyright notice and this permission notice shall be 22485 * included in all copies or substantial portions of the Software. 22486 * 22487 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22488 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22489 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22490 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 22491 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22492 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22493 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22494 * OTHER DEALINGS IN THE SOFTWARE. 22495 */ 22496 22497/* jshint laxbreak: true */ 22498/* jshint maxcomplexity:17 */ 22499/* global define */ 22500 22501// UMD (Universal Module Definition) patterns for JavaScript modules that work everywhere. 22502// https://github.com/umdjs/umd/blob/master/templates/jqueryPlugin.js 22503(function (factory, jQuery, Zepto) { 22504 22505 if (typeof define === 'function' && define.amd) { 22506 define(['jquery'], factory); 22507 } else if (typeof exports === 'object' && typeof Meteor === 'undefined') { 22508 module.exports = factory(require('jquery')); 22509 } else { 22510 factory(jQuery || Zepto); 22511 } 22512 22513}(function ($) { 22514 'use strict'; 22515 22516 var Mask = function (el, mask, options) { 22517 22518 var p = { 22519 invalid: [], 22520 getCaret: function () { 22521 try { 22522 var sel, 22523 pos = 0, 22524 ctrl = el.get(0), 22525 dSel = document.selection, 22526 cSelStart = ctrl.selectionStart; 22527 22528 // IE Support 22529 if (dSel && navigator.appVersion.indexOf('MSIE 10') === -1) { 22530 sel = dSel.createRange(); 22531 sel.moveStart('character', -p.val().length); 22532 pos = sel.text.length; 22533 } 22534 // Firefox support 22535 else if (cSelStart || cSelStart === '0') { 22536 pos = cSelStart; 22537 } 22538 22539 return pos; 22540 } catch (e) {} 22541 }, 22542 setCaret: function(pos) { 22543 try { 22544 if (el.is(':focus')) { 22545 var range, ctrl = el.get(0); 22546 22547 // Firefox, WebKit, etc.. 22548 if (ctrl.setSelectionRange) { 22549 ctrl.setSelectionRange(pos, pos); 22550 } else { // IE 22551 range = ctrl.createTextRange(); 22552 range.collapse(true); 22553 range.moveEnd('character', pos); 22554 range.moveStart('character', pos); 22555 range.select(); 22556 } 22557 } 22558 } catch (e) {} 22559 }, 22560 events: function() { 22561 el 22562 .on('keydown.mask', function(e) { 22563 el.data('mask-keycode', e.keyCode || e.which); 22564 el.data('mask-previus-value', el.val()); 22565 el.data('mask-previus-caret-pos', p.getCaret()); 22566 p.maskDigitPosMapOld = p.maskDigitPosMap; 22567 }) 22568 .on($.jMaskGlobals.useInput ? 'input.mask' : 'keyup.mask', p.behaviour) 22569 .on('paste.mask drop.mask', function() { 22570 setTimeout(function() { 22571 el.keydown().keyup(); 22572 }, 100); 22573 }) 22574 .on('change.mask', function(){ 22575 el.data('changed', true); 22576 }) 22577 .on('blur.mask', function(){ 22578 if (oldValue !== p.val() && !el.data('changed')) { 22579 el.trigger('change'); 22580 } 22581 el.data('changed', false); 22582 }) 22583 // it's very important that this callback remains in this position 22584 // otherwhise oldValue it's going to work buggy 22585 .on('blur.mask', function() { 22586 oldValue = p.val(); 22587 }) 22588 // select all text on focus 22589 .on('focus.mask', function (e) { 22590 if (options.selectOnFocus === true) { 22591 $(e.target).select(); 22592 } 22593 }) 22594 // clear the value if it not complete the mask 22595 .on('focusout.mask', function() { 22596 if (options.clearIfNotMatch && !regexMask.test(p.val())) { 22597 p.val(''); 22598 } 22599 }); 22600 }, 22601 getRegexMask: function() { 22602 var maskChunks = [], translation, pattern, optional, recursive, oRecursive, r; 22603 22604 for (var i = 0; i < mask.length; i++) { 22605 translation = jMask.translation[mask.charAt(i)]; 22606 22607 if (translation) { 22608 22609 pattern = translation.pattern.toString().replace(/.{1}$|^.{1}/g, ''); 22610 optional = translation.optional; 22611 recursive = translation.recursive; 22612 22613 if (recursive) { 22614 maskChunks.push(mask.charAt(i)); 22615 oRecursive = {digit: mask.charAt(i), pattern: pattern}; 22616 } else { 22617 maskChunks.push(!optional && !recursive ? pattern : (pattern + '?')); 22618 } 22619 22620 } else { 22621 maskChunks.push(mask.charAt(i).replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')); 22622 } 22623 } 22624 22625 r = maskChunks.join(''); 22626 22627 if (oRecursive) { 22628 r = r.replace(new RegExp('(' + oRecursive.digit + '(.*' + oRecursive.digit + ')?)'), '($1)?') 22629 .replace(new RegExp(oRecursive.digit, 'g'), oRecursive.pattern); 22630 } 22631 22632 return new RegExp(r); 22633 }, 22634 destroyEvents: function() { 22635 el.off(['input', 'keydown', 'keyup', 'paste', 'drop', 'blur', 'focusout', ''].join('.mask ')); 22636 }, 22637 val: function(v) { 22638 var isInput = el.is('input'), 22639 method = isInput ? 'val' : 'text', 22640 r; 22641 22642 if (arguments.length > 0) { 22643 if (el[method]() !== v) { 22644 el[method](v); 22645 } 22646 r = el; 22647 } else { 22648 r = el[method](); 22649 } 22650 22651 return r; 22652 }, 22653 calculateCaretPosition: function(oldVal) { 22654 var newVal = p.getMasked(), 22655 caretPosNew = p.getCaret(); 22656 if (oldVal !== newVal) { 22657 var caretPosOld = el.data('mask-previus-caret-pos') || 0, 22658 newValL = newVal.length, 22659 oldValL = oldVal.length, 22660 maskDigitsBeforeCaret = 0, 22661 maskDigitsAfterCaret = 0, 22662 maskDigitsBeforeCaretAll = 0, 22663 maskDigitsBeforeCaretAllOld = 0, 22664 i = 0; 22665 22666 for (i = caretPosNew; i < newValL; i++) { 22667 if (!p.maskDigitPosMap[i]) { 22668 break; 22669 } 22670 maskDigitsAfterCaret++; 22671 } 22672 22673 for (i = caretPosNew - 1; i >= 0; i--) { 22674 if (!p.maskDigitPosMap[i]) { 22675 break; 22676 } 22677 maskDigitsBeforeCaret++; 22678 } 22679 22680 for (i = caretPosNew - 1; i >= 0; i--) { 22681 if (p.maskDigitPosMap[i]) { 22682 maskDigitsBeforeCaretAll++; 22683 } 22684 } 22685 22686 for (i = caretPosOld - 1; i >= 0; i--) { 22687 if (p.maskDigitPosMapOld[i]) { 22688 maskDigitsBeforeCaretAllOld++; 22689 } 22690 } 22691 22692 // if the cursor is at the end keep it there 22693 if (caretPosNew > oldValL) { 22694 caretPosNew = newValL * 10; 22695 } else if (caretPosOld >= caretPosNew && caretPosOld !== oldValL) { 22696 if (!p.maskDigitPosMapOld[caretPosNew]) { 22697 var caretPos = caretPosNew; 22698 caretPosNew -= maskDigitsBeforeCaretAllOld - maskDigitsBeforeCaretAll; 22699 caretPosNew -= maskDigitsBeforeCaret; 22700 if (p.maskDigitPosMap[caretPosNew]) { 22701 caretPosNew = caretPos; 22702 } 22703 } 22704 } 22705 else if (caretPosNew > caretPosOld) { 22706 caretPosNew += maskDigitsBeforeCaretAll - maskDigitsBeforeCaretAllOld; 22707 caretPosNew += maskDigitsAfterCaret; 22708 } 22709 } 22710 return caretPosNew; 22711 }, 22712 behaviour: function(e) { 22713 e = e || window.event; 22714 p.invalid = []; 22715 22716 var keyCode = el.data('mask-keycode'); 22717 22718 if ($.inArray(keyCode, jMask.byPassKeys) === -1) { 22719 var newVal = p.getMasked(), 22720 caretPos = p.getCaret(), 22721 oldVal = el.data('mask-previus-value') || ''; 22722 22723 // this is a compensation to devices/browsers that don't compensate 22724 // caret positioning the right way 22725 setTimeout(function() { 22726 p.setCaret(p.calculateCaretPosition(oldVal)); 22727 }, $.jMaskGlobals.keyStrokeCompensation); 22728 22729 p.val(newVal); 22730 p.setCaret(caretPos); 22731 return p.callbacks(e); 22732 } 22733 }, 22734 getMasked: function(skipMaskChars, val) { 22735 var buf = [], 22736 value = val === undefined ? p.val() : val + '', 22737 m = 0, maskLen = mask.length, 22738 v = 0, valLen = value.length, 22739 offset = 1, addMethod = 'push', 22740 resetPos = -1, 22741 maskDigitCount = 0, 22742 maskDigitPosArr = [], 22743 lastMaskChar, 22744 check; 22745 22746 if (options.reverse) { 22747 addMethod = 'unshift'; 22748 offset = -1; 22749 lastMaskChar = 0; 22750 m = maskLen - 1; 22751 v = valLen - 1; 22752 check = function () { 22753 return m > -1 && v > -1; 22754 }; 22755 } else { 22756 lastMaskChar = maskLen - 1; 22757 check = function () { 22758 return m < maskLen && v < valLen; 22759 }; 22760 } 22761 22762 var lastUntranslatedMaskChar; 22763 while (check()) { 22764 var maskDigit = mask.charAt(m), 22765 valDigit = value.charAt(v), 22766 translation = jMask.translation[maskDigit]; 22767 22768 if (translation) { 22769 if (valDigit.match(translation.pattern)) { 22770 buf[addMethod](valDigit); 22771 if (translation.recursive) { 22772 if (resetPos === -1) { 22773 resetPos = m; 22774 } else if (m === lastMaskChar && m !== resetPos) { 22775 m = resetPos - offset; 22776 } 22777 22778 if (lastMaskChar === resetPos) { 22779 m -= offset; 22780 } 22781 } 22782 m += offset; 22783 } else if (valDigit === lastUntranslatedMaskChar) { 22784 // matched the last untranslated (raw) mask character that we encountered 22785 // likely an insert offset the mask character from the last entry; fall 22786 // through and only increment v 22787 maskDigitCount--; 22788 lastUntranslatedMaskChar = undefined; 22789 } else if (translation.optional) { 22790 m += offset; 22791 v -= offset; 22792 } else if (translation.fallback) { 22793 buf[addMethod](translation.fallback); 22794 m += offset; 22795 v -= offset; 22796 } else { 22797 p.invalid.push({p: v, v: valDigit, e: translation.pattern}); 22798 } 22799 v += offset; 22800 } else { 22801 if (!skipMaskChars) { 22802 buf[addMethod](maskDigit); 22803 } 22804 22805 if (valDigit === maskDigit) { 22806 maskDigitPosArr.push(v); 22807 v += offset; 22808 } else { 22809 lastUntranslatedMaskChar = maskDigit; 22810 maskDigitPosArr.push(v + maskDigitCount); 22811 maskDigitCount++; 22812 } 22813 22814 m += offset; 22815 } 22816 } 22817 22818 var lastMaskCharDigit = mask.charAt(lastMaskChar); 22819 if (maskLen === valLen + 1 && !jMask.translation[lastMaskCharDigit]) { 22820 buf.push(lastMaskCharDigit); 22821 } 22822 22823 var newVal = buf.join(''); 22824 p.mapMaskdigitPositions(newVal, maskDigitPosArr, valLen); 22825 return newVal; 22826 }, 22827 mapMaskdigitPositions: function(newVal, maskDigitPosArr, valLen) { 22828 var maskDiff = options.reverse ? newVal.length - valLen : 0; 22829 p.maskDigitPosMap = {}; 22830 for (var i = 0; i < maskDigitPosArr.length; i++) { 22831 p.maskDigitPosMap[maskDigitPosArr[i] + maskDiff] = 1; 22832 } 22833 }, 22834 callbacks: function (e) { 22835 var val = p.val(), 22836 changed = val !== oldValue, 22837 defaultArgs = [val, e, el, options], 22838 callback = function(name, criteria, args) { 22839 if (typeof options[name] === 'function' && criteria) { 22840 options[name].apply(this, args); 22841 } 22842 }; 22843 22844 callback('onChange', changed === true, defaultArgs); 22845 callback('onKeyPress', changed === true, defaultArgs); 22846 callback('onComplete', val.length === mask.length, defaultArgs); 22847 callback('onInvalid', p.invalid.length > 0, [val, e, el, p.invalid, options]); 22848 } 22849 }; 22850 22851 el = $(el); 22852 var jMask = this, oldValue = p.val(), regexMask; 22853 22854 mask = typeof mask === 'function' ? mask(p.val(), undefined, el, options) : mask; 22855 22856 // public methods 22857 jMask.mask = mask; 22858 jMask.options = options; 22859 jMask.remove = function() { 22860 var caret = p.getCaret(); 22861 if (jMask.options.placeholder) { 22862 el.removeAttr('placeholder'); 22863 } 22864 if (el.data('mask-maxlength')) { 22865 el.removeAttr('maxlength'); 22866 } 22867 p.destroyEvents(); 22868 p.val(jMask.getCleanVal()); 22869 p.setCaret(caret); 22870 return el; 22871 }; 22872 22873 // get value without mask 22874 jMask.getCleanVal = function() { 22875 return p.getMasked(true); 22876 }; 22877 22878 // get masked value without the value being in the input or element 22879 jMask.getMaskedVal = function(val) { 22880 return p.getMasked(false, val); 22881 }; 22882 22883 jMask.init = function(onlyMask) { 22884 onlyMask = onlyMask || false; 22885 options = options || {}; 22886 22887 jMask.clearIfNotMatch = $.jMaskGlobals.clearIfNotMatch; 22888 jMask.byPassKeys = $.jMaskGlobals.byPassKeys; 22889 jMask.translation = $.extend({}, $.jMaskGlobals.translation, options.translation); 22890 22891 jMask = $.extend(true, {}, jMask, options); 22892 22893 regexMask = p.getRegexMask(); 22894 22895 if (onlyMask) { 22896 p.events(); 22897 p.val(p.getMasked()); 22898 } else { 22899 if (options.placeholder) { 22900 el.attr('placeholder' , options.placeholder); 22901 } 22902 22903 // this is necessary, otherwise if the user submit the form 22904 // and then press the "back" button, the autocomplete will erase 22905 // the data. Works fine on IE9+, FF, Opera, Safari. 22906 if (el.data('mask')) { 22907 el.attr('autocomplete', 'off'); 22908 } 22909 22910 // detect if is necessary let the user type freely. 22911 // for is a lot faster than forEach. 22912 for (var i = 0, maxlength = true; i < mask.length; i++) { 22913 var translation = jMask.translation[mask.charAt(i)]; 22914 if (translation && translation.recursive) { 22915 maxlength = false; 22916 break; 22917 } 22918 } 22919 22920 if (maxlength) { 22921 el.attr('maxlength', mask.length).data('mask-maxlength', true); 22922 } 22923 22924 p.destroyEvents(); 22925 p.events(); 22926 22927 var caret = p.getCaret(); 22928 p.val(p.getMasked()); 22929 p.setCaret(caret); 22930 } 22931 }; 22932 22933 jMask.init(!el.is('input')); 22934 }; 22935 22936 $.maskWatchers = {}; 22937 var HTMLAttributes = function () { 22938 var input = $(this), 22939 options = {}, 22940 prefix = 'data-mask-', 22941 mask = input.attr('data-mask'); 22942 22943 if (input.attr(prefix + 'reverse')) { 22944 options.reverse = true; 22945 } 22946 22947 if (input.attr(prefix + 'clearifnotmatch')) { 22948 options.clearIfNotMatch = true; 22949 } 22950 22951 if (input.attr(prefix + 'selectonfocus') === 'true') { 22952 options.selectOnFocus = true; 22953 } 22954 22955 if (notSameMaskObject(input, mask, options)) { 22956 return input.data('mask', new Mask(this, mask, options)); 22957 } 22958 }, 22959 notSameMaskObject = function(field, mask, options) { 22960 options = options || {}; 22961 var maskObject = $(field).data('mask'), 22962 stringify = JSON.stringify, 22963 value = $(field).val() || $(field).text(); 22964 try { 22965 if (typeof mask === 'function') { 22966 mask = mask(value); 22967 } 22968 return typeof maskObject !== 'object' || stringify(maskObject.options) !== stringify(options) || maskObject.mask !== mask; 22969 } catch (e) {} 22970 }, 22971 eventSupported = function(eventName) { 22972 var el = document.createElement('div'), isSupported; 22973 22974 eventName = 'on' + eventName; 22975 isSupported = (eventName in el); 22976 22977 if ( !isSupported ) { 22978 el.setAttribute(eventName, 'return;'); 22979 isSupported = typeof el[eventName] === 'function'; 22980 } 22981 el = null; 22982 22983 return isSupported; 22984 }; 22985 22986 $.fn.mask = function(mask, options) { 22987 options = options || {}; 22988 var selector = this.selector, 22989 globals = $.jMaskGlobals, 22990 interval = globals.watchInterval, 22991 watchInputs = options.watchInputs || globals.watchInputs, 22992 maskFunction = function() { 22993 if (notSameMaskObject(this, mask, options)) { 22994 return $(this).data('mask', new Mask(this, mask, options)); 22995 } 22996 }; 22997 22998 $(this).each(maskFunction); 22999 23000 if (selector && selector !== '' && watchInputs) { 23001 clearInterval($.maskWatchers[selector]); 23002 $.maskWatchers[selector] = setInterval(function(){ 23003 $(document).find(selector).each(maskFunction); 23004 }, interval); 23005 } 23006 return this; 23007 }; 23008 23009 $.fn.masked = function(val) { 23010 return this.data('mask').getMaskedVal(val); 23011 }; 23012 23013 $.fn.unmask = function() { 23014 clearInterval($.maskWatchers[this.selector]); 23015 delete $.maskWatchers[this.selector]; 23016 return this.each(function() { 23017 var dataMask = $(this).data('mask'); 23018 if (dataMask) { 23019 dataMask.remove().removeData('mask'); 23020 } 23021 }); 23022 }; 23023 23024 $.fn.cleanVal = function() { 23025 return this.data('mask').getCleanVal(); 23026 }; 23027 23028 $.applyDataMask = function(selector) { 23029 selector = selector || $.jMaskGlobals.maskElements; 23030 var $selector = (selector instanceof $) ? selector : $(selector); 23031 $selector.filter($.jMaskGlobals.dataMaskAttr).each(HTMLAttributes); 23032 }; 23033 23034 var globals = { 23035 maskElements: 'input,td,span,div', 23036 dataMaskAttr: '*[data-mask]', 23037 dataMask: true, 23038 watchInterval: 300, 23039 watchInputs: true, 23040 keyStrokeCompensation: 10, 23041 // old versions of chrome dont work great with input event 23042 useInput: !/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent) && eventSupported('input'), 23043 watchDataMask: false, 23044 byPassKeys: [9, 16, 17, 18, 36, 37, 38, 39, 40, 91], 23045 translation: { 23046 '0': {pattern: /\d/}, 23047 '9': {pattern: /\d/, optional: true}, 23048 '#': {pattern: /\d/, recursive: true}, 23049 'A': {pattern: /[a-zA-Z0-9]/}, 23050 'S': {pattern: /[a-zA-Z]/} 23051 } 23052 }; 23053 23054 $.jMaskGlobals = $.jMaskGlobals || {}; 23055 globals = $.jMaskGlobals = $.extend(true, {}, globals, $.jMaskGlobals); 23056 23057 // looking for inputs with data-mask attribute 23058 if (globals.dataMask) { 23059 $.applyDataMask(); 23060 } 23061 23062 setInterval(function() { 23063 if ($.jMaskGlobals.watchDataMask) { 23064 $.applyDataMask(); 23065 } 23066 }, globals.watchInterval); 23067}, window.jQuery, window.Zepto));
23068 23069/*! Magnific Popup - v1.1.0 - 2016-02-20
vendor: 41,934 bytes, lines 23070-24935
23070* http://dimsemenov.com/plugins/magnific-popup/ 23071* Copyright (c) 2016 Dmitry Semenov; */ 23072;(function (factory) { 23073if (typeof define === 'function' && define.amd) { 23074 // AMD. Register as an anonymous module. 23075 define(['jquery'], factory); 23076 } else if (typeof exports === 'object') { 23077 // Node/CommonJS 23078 factory(require('jquery')); 23079 } else { 23080 // Browser globals 23081 factory(window.jQuery || window.Zepto); 23082 } 23083 }(function($) { 23084 23085/*>>core*/ 23086/** 23087 * 23088 * Magnific Popup Core JS file 23089 * 23090 */ 23091 23092 23093/** 23094 * Private static constants 23095 */ 23096var CLOSE_EVENT = 'Close', 23097 BEFORE_CLOSE_EVENT = 'BeforeClose', 23098 AFTER_CLOSE_EVENT = 'AfterClose', 23099 BEFORE_APPEND_EVENT = 'BeforeAppend', 23100 MARKUP_PARSE_EVENT = 'MarkupParse', 23101 OPEN_EVENT = 'Open', 23102 CHANGE_EVENT = 'Change', 23103 NS = 'mfp', 23104 EVENT_NS = '.' + NS, 23105 READY_CLASS = 'mfp-ready', 23106 REMOVING_CLASS = 'mfp-removing', 23107 PREVENT_CLOSE_CLASS = 'mfp-prevent-close'; 23108 23109 23110/** 23111 * Private vars 23112 */ 23113/*jshint -W079 */ 23114var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this' 23115 MagnificPopup = function(){}, 23116 _isJQ = !!(window.jQuery), 23117 _prevStatus, 23118 _window = $(window), 23119 _document, 23120 _prevContentType, 23121 _wrapClasses, 23122 _currPopupType; 23123 23124 23125/** 23126 * Private functions 23127 */ 23128var _mfpOn = function(name, f) { 23129 mfp.ev.on(NS + name + EVENT_NS, f); 23130 }, 23131 _getEl = function(className, appendTo, html, raw) { 23132 var el = document.createElement('div'); 23133 el.className = 'mfp-'+className; 23134 if(html) { 23135 el.innerHTML = html; 23136 } 23137 if(!raw) { 23138 el = $(el); 23139 if(appendTo) { 23140 el.appendTo(appendTo); 23141 } 23142 } else if(appendTo) { 23143 appendTo.appendChild(el); 23144 } 23145 return el; 23146 }, 23147 _mfpTrigger = function(e, data) { 23148 mfp.ev.triggerHandler(NS + e, data); 23149 23150 if(mfp.st.callbacks) { 23151 // converts "mfpEventName" to "eventName" callback and triggers it if it's present 23152 e = e.charAt(0).toLowerCase() + e.slice(1); 23153 if(mfp.st.callbacks[e]) { 23154 mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]); 23155 } 23156 } 23157 }, 23158 _getCloseBtn = function(type) { 23159 if(type !== _currPopupType || !mfp.currTemplate.closeBtn) { 23160 mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) ); 23161 _currPopupType = type; 23162 } 23163 return mfp.currTemplate.closeBtn; 23164 }, 23165 // Initialize Magnific Popup only when called at least once 23166 _checkInstance = function() { 23167 if(!$.magnificPopup.instance) { 23168 /*jshint -W020 */ 23169 mfp = new MagnificPopup(); 23170 mfp.init(); 23171 $.magnificPopup.instance = mfp; 23172 } 23173 }, 23174 // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr 23175 supportsTransitions = function() { 23176 var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist 23177 v = ['ms','O','Moz','Webkit']; // 'v' for vendor 23178 23179 if( s['transition'] !== undefined ) { 23180 return true; 23181 } 23182 23183 while( v.length ) { 23184 if( v.pop() + 'Transition' in s ) { 23185 return true; 23186 } 23187 } 23188 23189 return false; 23190 }; 23191 23192 23193 23194/** 23195 * Public functions 23196 */ 23197MagnificPopup.prototype = { 23198 23199 constructor: MagnificPopup, 23200 23201 /** 23202 * Initializes Magnific Popup plugin. 23203 * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed 23204 */ 23205 init: function() { 23206 var appVersion = navigator.appVersion; 23207 mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener; 23208 mfp.isAndroid = (/android/gi).test(appVersion); 23209 mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion); 23210 mfp.supportsTransition = supportsTransitions(); 23211 23212 // We disable fixed positioned lightbox on devices that don't handle it nicely. 23213 // If you know a better way of detecting this - let me know. 23214 mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) ); 23215 _document = $(document); 23216 23217 mfp.popupsCache = {}; 23218 }, 23219 23220 /** 23221 * Opens popup 23222 * @param data [description] 23223 */ 23224 open: function(data) { 23225 23226 var i; 23227 23228 if(data.isObj === false) { 23229 // convert jQuery collection to array to avoid conflicts later 23230 mfp.items = data.items.toArray(); 23231 23232 mfp.index = 0; 23233 var items = data.items, 23234 item; 23235 for(i = 0; i < items.length; i++) { 23236 item = items[i]; 23237 if(item.parsed) { 23238 item = item.el[0]; 23239 } 23240 if(item === data.el[0]) { 23241 mfp.index = i; 23242 break; 23243 } 23244 } 23245 } else { 23246 mfp.items = $.isArray(data.items) ? data.items : [data.items]; 23247 mfp.index = data.index || 0; 23248 } 23249 23250 // if popup is already opened - we just update the content 23251 if(mfp.isOpen) { 23252 mfp.updateItemHTML(); 23253 return; 23254 } 23255 23256 mfp.types = []; 23257 _wrapClasses = ''; 23258 if(data.mainEl && data.mainEl.length) { 23259 mfp.ev = data.mainEl.eq(0); 23260 } else { 23261 mfp.ev = _document; 23262 } 23263 23264 if(data.key) { 23265 if(!mfp.popupsCache[data.key]) { 23266 mfp.popupsCache[data.key] = {}; 23267 } 23268 mfp.currTemplate = mfp.popupsCache[data.key]; 23269 } else { 23270 mfp.currTemplate = {}; 23271 } 23272 23273 23274 23275 mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); 23276 mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos; 23277 23278 if(mfp.st.modal) { 23279 mfp.st.closeOnContentClick = false; 23280 mfp.st.closeOnBgClick = false; 23281 mfp.st.showCloseBtn = false; 23282 mfp.st.enableEscapeKey = false; 23283 } 23284 23285 23286 // Building markup 23287 // main containers are created only once 23288 if(!mfp.bgOverlay) { 23289 23290 // Dark overlay 23291 mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() { 23292 mfp.close(); 23293 }); 23294 23295 mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) { 23296 if(mfp._checkIfClose(e.target)) { 23297 mfp.close(); 23298 } 23299 }); 23300 23301 mfp.container = _getEl('container', mfp.wrap); 23302 } 23303 23304 mfp.contentContainer = _getEl('content'); 23305 if(mfp.st.preloader) { 23306 mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading); 23307 } 23308 23309 23310 // Initializing modules 23311 var modules = $.magnificPopup.modules; 23312 for(i = 0; i < modules.length; i++) { 23313 var n = modules[i]; 23314 n = n.charAt(0).toUpperCase() + n.slice(1); 23315 mfp['init'+n].call(mfp); 23316 } 23317 _mfpTrigger('BeforeOpen'); 23318 23319 23320 if(mfp.st.showCloseBtn) { 23321 // Close button 23322 if(!mfp.st.closeBtnInside) { 23323 mfp.wrap.append( _getCloseBtn() ); 23324 } else { 23325 _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) { 23326 values.close_replaceWith = _getCloseBtn(item.type); 23327 }); 23328 _wrapClasses += ' mfp-close-btn-in'; 23329 } 23330 } 23331 23332 if(mfp.st.alignTop) { 23333 _wrapClasses += ' mfp-align-top'; 23334 } 23335 23336 23337 23338 if(mfp.fixedContentPos) { 23339 mfp.wrap.css({ 23340 overflow: mfp.st.overflowY, 23341 overflowX: 'hidden', 23342 overflowY: mfp.st.overflowY 23343 }); 23344 } else { 23345 mfp.wrap.css({ 23346 top: _window.scrollTop(), 23347 position: 'absolute' 23348 }); 23349 } 23350 if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) { 23351 mfp.bgOverlay.css({ 23352 height: _document.height(), 23353 position: 'absolute' 23354 }); 23355 } 23356 23357 23358 23359 if(mfp.st.enableEscapeKey) { 23360 // Close on ESC key 23361 _document.on('keyup' + EVENT_NS, function(e) { 23362 if(e.keyCode === 27) { 23363 mfp.close(); 23364 } 23365 }); 23366 } 23367 23368 _window.on('resize' + EVENT_NS, function() { 23369 mfp.updateSize(); 23370 }); 23371 23372 23373 if(!mfp.st.closeOnContentClick) { 23374 _wrapClasses += ' mfp-auto-cursor'; 23375 } 23376 23377 if(_wrapClasses) 23378 mfp.wrap.addClass(_wrapClasses); 23379 23380 23381 // this triggers recalculation of layout, so we get it once to not to trigger twice 23382 var windowHeight = mfp.wH = _window.height(); 23383 23384 23385 var windowStyles = {}; 23386 23387 if( mfp.fixedContentPos ) { 23388 if(mfp._hasScrollBar(windowHeight)){ 23389 var s = mfp._getScrollbarSize(); 23390 if(s) { 23391 windowStyles.marginRight = s; 23392 } 23393 } 23394 } 23395 23396 if(mfp.fixedContentPos) { 23397 if(!mfp.isIE7) { 23398 windowStyles.overflow = 'hidden'; 23399 } else { 23400 // ie7 double-scroll bug 23401 $('body, html').css('overflow', 'hidden'); 23402 } 23403 } 23404 23405 23406 23407 var classesToadd = mfp.st.mainClass; 23408 if(mfp.isIE7) { 23409 classesToadd += ' mfp-ie7'; 23410 } 23411 if(classesToadd) { 23412 mfp._addClassToMFP( classesToadd ); 23413 } 23414 23415 // add content 23416 mfp.updateItemHTML(); 23417 23418 _mfpTrigger('BuildControls'); 23419 23420 // remove scrollbar, add margin e.t.c 23421 $('html').css(windowStyles); 23422 23423 // add everything to DOM 23424 mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) ); 23425 23426 // Save last focused element 23427 mfp._lastFocusedEl = document.activeElement; 23428 23429 // Wait for next cycle to allow CSS transition 23430 setTimeout(function() { 23431 23432 if(mfp.content) { 23433 mfp._addClassToMFP(READY_CLASS); 23434 mfp._setFocus(); 23435 } else { 23436 // if content is not defined (not loaded e.t.c) we add class only for BG 23437 mfp.bgOverlay.addClass(READY_CLASS); 23438 } 23439 23440 // Trap the focus in popup 23441 _document.on('focusin' + EVENT_NS, mfp._onFocusIn); 23442 23443 }, 16); 23444 23445 mfp.isOpen = true; 23446 mfp.updateSize(windowHeight); 23447 _mfpTrigger(OPEN_EVENT); 23448 23449 return data; 23450 }, 23451 23452 /** 23453 * Closes the popup 23454 */ 23455 close: function() { 23456 if(!mfp.isOpen) return; 23457 _mfpTrigger(BEFORE_CLOSE_EVENT); 23458 23459 mfp.isOpen = false; 23460 // for CSS3 animation 23461 if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) { 23462 mfp._addClassToMFP(REMOVING_CLASS); 23463 setTimeout(function() { 23464 mfp._close(); 23465 }, mfp.st.removalDelay); 23466 } else { 23467 mfp._close(); 23468 } 23469 }, 23470 23471 /** 23472 * Helper for close() function 23473 */ 23474 _close: function() { 23475 _mfpTrigger(CLOSE_EVENT); 23476 23477 var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' '; 23478 23479 mfp.bgOverlay.detach(); 23480 mfp.wrap.detach(); 23481 mfp.container.empty(); 23482 23483 if(mfp.st.mainClass) { 23484 classesToRemove += mfp.st.mainClass + ' '; 23485 } 23486 23487 mfp._removeClassFromMFP(classesToRemove); 23488 23489 if(mfp.fixedContentPos) { 23490 var windowStyles = {marginRight: ''}; 23491 if(mfp.isIE7) { 23492 $('body, html').css('overflow', ''); 23493 } else { 23494 windowStyles.overflow = ''; 23495 } 23496 $('html').css(windowStyles); 23497 } 23498 23499 _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS); 23500 mfp.ev.off(EVENT_NS); 23501 23502 // clean up DOM elements that aren't removed 23503 mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style'); 23504 mfp.bgOverlay.attr('class', 'mfp-bg'); 23505 mfp.container.attr('class', 'mfp-container'); 23506 23507 // remove close button from target element 23508 if(mfp.st.showCloseBtn && 23509 (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) { 23510 if(mfp.currTemplate.closeBtn) 23511 mfp.currTemplate.closeBtn.detach(); 23512 } 23513 23514 23515 if(mfp.st.autoFocusLast && mfp._lastFocusedEl) { 23516 $(mfp._lastFocusedEl).focus(); // put tab focus back 23517 } 23518 mfp.currItem = null; 23519 mfp.content = null; 23520 mfp.currTemplate = null; 23521 mfp.prevHeight = 0; 23522 23523 _mfpTrigger(AFTER_CLOSE_EVENT); 23524 }, 23525 23526 updateSize: function(winHeight) { 23527 23528 if(mfp.isIOS) { 23529 // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2 23530 var zoomLevel = document.documentElement.clientWidth / window.innerWidth; 23531 var height = window.innerHeight * zoomLevel; 23532 mfp.wrap.css('height', height); 23533 mfp.wH = height; 23534 } else { 23535 mfp.wH = winHeight || _window.height(); 23536 } 23537 // Fixes #84: popup incorrectly positioned with position:relative on body 23538 if(!mfp.fixedContentPos) { 23539 mfp.wrap.css('height', mfp.wH); 23540 } 23541 23542 _mfpTrigger('Resize'); 23543 23544 }, 23545 23546 /** 23547 * Set content of popup based on current index 23548 */ 23549 updateItemHTML: function() { 23550 var item = mfp.items[mfp.index]; 23551 23552 // Detach and perform modifications 23553 mfp.contentContainer.detach(); 23554 23555 if(mfp.content) 23556 mfp.content.detach(); 23557 23558 if(!item.parsed) { 23559 item = mfp.parseEl( mfp.index ); 23560 } 23561 23562 var type = item.type; 23563 23564 _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]); 23565 // BeforeChange event works like so: 23566 // _mfpOn('BeforeChange', function(e, prevType, newType) { }); 23567 23568 mfp.currItem = item; 23569 23570 if(!mfp.currTemplate[type]) { 23571 var markup = mfp.st[type] ? mfp.st[type].markup : false; 23572 23573 // allows to modify markup 23574 _mfpTrigger('FirstMarkupParse', markup); 23575 23576 if(markup) { 23577 mfp.currTemplate[type] = $(markup); 23578 } else { 23579 // if there is no markup found we just define that template is parsed 23580 mfp.currTemplate[type] = true; 23581 } 23582 } 23583 23584 if(_prevContentType && _prevContentType !== item.type) { 23585 mfp.container.removeClass('mfp-'+_prevContentType+'-holder'); 23586 } 23587 23588 var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]); 23589 mfp.appendContent(newContent, type); 23590 23591 item.preloaded = true; 23592 23593 _mfpTrigger(CHANGE_EVENT, item); 23594 _prevContentType = item.type; 23595 23596 // Append container back after its content changed 23597 mfp.container.prepend(mfp.contentContainer); 23598 23599 _mfpTrigger('AfterChange'); 23600 }, 23601 23602 23603 /** 23604 * Set HTML content of popup 23605 */ 23606 appendContent: function(newContent, type) { 23607 mfp.content = newContent; 23608 23609 if(newContent) { 23610 if(mfp.st.showCloseBtn && mfp.st.closeBtnInside && 23611 mfp.currTemplate[type] === true) { 23612 // if there is no markup, we just append close button element inside 23613 if(!mfp.content.find('.mfp-close').length) { 23614 mfp.content.append(_getCloseBtn()); 23615 } 23616 } else { 23617 mfp.content = newContent; 23618 } 23619 } else { 23620 mfp.content = ''; 23621 } 23622 23623 _mfpTrigger(BEFORE_APPEND_EVENT); 23624 mfp.container.addClass('mfp-'+type+'-holder'); 23625 23626 mfp.contentContainer.append(mfp.content); 23627 }, 23628 23629 23630 /** 23631 * Creates Magnific Popup data object based on given data 23632 * @param {int} index Index of item to parse 23633 */ 23634 parseEl: function(index) { 23635 var item = mfp.items[index], 23636 type; 23637 23638 if(item.tagName) { 23639 item = { el: $(item) }; 23640 } else { 23641 type = item.type; 23642 item = { data: item, src: item.src }; 23643 } 23644 23645 if(item.el) { 23646 var types = mfp.types; 23647 23648 // check for 'mfp-TYPE' class 23649 for(var i = 0; i < types.length; i++) { 23650 if( item.el.hasClass('mfp-'+types[i]) ) { 23651 type = types[i]; 23652 break; 23653 } 23654 } 23655 23656 item.src = item.el.attr('data-mfp-src'); 23657 if(!item.src) { 23658 item.src = item.el.attr('href'); 23659 } 23660 } 23661 23662 item.type = type || mfp.st.type || 'inline'; 23663 item.index = index; 23664 item.parsed = true; 23665 mfp.items[index] = item; 23666 _mfpTrigger('ElementParse', item); 23667 23668 return mfp.items[index]; 23669 }, 23670 23671 23672 /** 23673 * Initializes single popup or a group of popups 23674 */ 23675 addGroup: function(el, options) { 23676 var eHandler = function(e) { 23677 e.mfpEl = this; 23678 mfp._openClick(e, el, options); 23679 }; 23680 23681 if(!options) { 23682 options = {}; 23683 } 23684 23685 var eName = 'click.magnificPopup'; 23686 options.mainEl = el; 23687 23688 if(options.items) { 23689 options.isObj = true; 23690 el.off(eName).on(eName, eHandler); 23691 } else { 23692 options.isObj = false; 23693 if(options.delegate) { 23694 el.off(eName).on(eName, options.delegate , eHandler); 23695 } else { 23696 options.items = el; 23697 el.off(eName).on(eName, eHandler); 23698 } 23699 } 23700 }, 23701 _openClick: function(e, el, options) { 23702 var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick; 23703 23704 23705 if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) { 23706 return; 23707 } 23708 23709 var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn; 23710 23711 if(disableOn) { 23712 if($.isFunction(disableOn)) { 23713 if( !disableOn.call(mfp) ) { 23714 return true; 23715 } 23716 } else { // else it's number 23717 if( _window.width() < disableOn ) { 23718 return true; 23719 } 23720 } 23721 } 23722 23723 if(e.type) { 23724 e.preventDefault(); 23725 23726 // This will prevent popup from closing if element is inside and popup is already opened 23727 if(mfp.isOpen) { 23728 e.stopPropagation(); 23729 } 23730 } 23731 23732 options.el = $(e.mfpEl); 23733 if(options.delegate) { 23734 options.items = el.find(options.delegate); 23735 } 23736 mfp.open(options); 23737 }, 23738 23739 23740 /** 23741 * Updates text on preloader 23742 */ 23743 updateStatus: function(status, text) { 23744 23745 if(mfp.preloader) { 23746 if(_prevStatus !== status) { 23747 mfp.container.removeClass('mfp-s-'+_prevStatus); 23748 } 23749 23750 if(!text && status === 'loading') { 23751 text = mfp.st.tLoading; 23752 } 23753 23754 var data = { 23755 status: status, 23756 text: text 23757 }; 23758 // allows to modify status 23759 _mfpTrigger('UpdateStatus', data); 23760 23761 status = data.status; 23762 text = data.text; 23763 23764 mfp.preloader.html(text); 23765 23766 mfp.preloader.find('a').on('click', function(e) { 23767 e.stopImmediatePropagation(); 23768 }); 23769 23770 mfp.container.addClass('mfp-s-'+status); 23771 _prevStatus = status; 23772 } 23773 }, 23774 23775 23776 /* 23777 "Private" helpers that aren't private at all 23778 */ 23779 // Check to close popup or not 23780 // "target" is an element that was clicked 23781 _checkIfClose: function(target) { 23782 23783 if($(target).hasClass(PREVENT_CLOSE_CLASS)) { 23784 return; 23785 } 23786 23787 var closeOnContent = mfp.st.closeOnContentClick; 23788 var closeOnBg = mfp.st.closeOnBgClick; 23789 23790 if(closeOnContent && closeOnBg) { 23791 return true; 23792 } else { 23793 23794 // We close the popup if click is on close button or on preloader. Or if there is no content. 23795 if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) { 23796 return true; 23797 } 23798 23799 // if click is outside the content 23800 if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) { 23801 if(closeOnBg) { 23802 // last check, if the clicked element is in DOM, (in case it's removed onclick) 23803 if( $.contains(document, target) ) { 23804 return true; 23805 } 23806 } 23807 } else if(closeOnContent) { 23808 return true; 23809 } 23810 23811 } 23812 return false; 23813 }, 23814 _addClassToMFP: function(cName) { 23815 mfp.bgOverlay.addClass(cName); 23816 mfp.wrap.addClass(cName); 23817 }, 23818 _removeClassFromMFP: function(cName) { 23819 this.bgOverlay.removeClass(cName); 23820 mfp.wrap.removeClass(cName); 23821 }, 23822 _hasScrollBar: function(winHeight) { 23823 return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) ); 23824 }, 23825 _setFocus: function() { 23826 (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus(); 23827 }, 23828 _onFocusIn: function(e) { 23829 if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) { 23830 mfp._setFocus(); 23831 return false; 23832 } 23833 }, 23834 _parseMarkup: function(template, values, item) { 23835 var arr; 23836 if(item.data) { 23837 values = $.extend(item.data, values); 23838 } 23839 _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] ); 23840 23841 $.each(values, function(key, value) { 23842 if(value === undefined || value === false) { 23843 return true; 23844 } 23845 arr = key.split('_'); 23846 if(arr.length > 1) { 23847 var el = template.find(EVENT_NS + '-'+arr[0]); 23848 23849 if(el.length > 0) { 23850 var attr = arr[1]; 23851 if(attr === 'replaceWith') { 23852 if(el[0] !== value[0]) { 23853 el.replaceWith(value); 23854 } 23855 } else if(attr === 'img') { 23856 if(el.is('img')) { 23857 el.attr('src', value); 23858 } else { 23859 el.replaceWith( $('<img>').attr('src', value).attr('class', el.attr('class')) ); 23860 } 23861 } else { 23862 el.attr(arr[1], value); 23863 } 23864 } 23865 23866 } else { 23867 template.find(EVENT_NS + '-'+key).html(value); 23868 } 23869 }); 23870 }, 23871 23872 _getScrollbarSize: function() { 23873 // thx David 23874 if(mfp.scrollbarSize === undefined) { 23875 var scrollDiv = document.createElement("div"); 23876 scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; 23877 document.body.appendChild(scrollDiv); 23878 mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth; 23879 document.body.removeChild(scrollDiv); 23880 } 23881 return mfp.scrollbarSize; 23882 } 23883 23884}; /* MagnificPopup core prototype end */ 23885 23886 23887 23888 23889/** 23890 * Public static functions 23891 */ 23892$.magnificPopup = { 23893 instance: null, 23894 proto: MagnificPopup.prototype, 23895 modules: [], 23896 23897 open: function(options, index) { 23898 _checkInstance(); 23899 23900 if(!options) { 23901 options = {}; 23902 } else { 23903 options = $.extend(true, {}, options); 23904 } 23905 23906 options.isObj = true; 23907 options.index = index || 0; 23908 return this.instance.open(options); 23909 }, 23910 23911 close: function() { 23912 return $.magnificPopup.instance && $.magnificPopup.instance.close(); 23913 }, 23914 23915 registerModule: function(name, module) { 23916 if(module.options) { 23917 $.magnificPopup.defaults[name] = module.options; 23918 } 23919 $.extend(this.proto, module.proto); 23920 this.modules.push(name); 23921 }, 23922 23923 defaults: { 23924 23925 // Info about options is in docs: 23926 // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options 23927 23928 disableOn: 0, 23929 23930 key: null, 23931 23932 midClick: false, 23933 23934 mainClass: '', 23935 23936 preloader: true, 23937 23938 focus: '', // CSS selector of input to focus after popup is opened 23939 23940 closeOnContentClick: false, 23941 23942 closeOnBgClick: true, 23943 23944 closeBtnInside: true, 23945 23946 showCloseBtn: true, 23947 23948 enableEscapeKey: true, 23949 23950 modal: false, 23951 23952 alignTop: false, 23953 23954 removalDelay: 0, 23955 23956 prependTo: null, 23957 23958 fixedContentPos: 'auto', 23959 23960 fixedBgPos: 'auto', 23961 23962 overflowY: 'auto', 23963 23964 closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>', 23965 23966 tClose: 'Close (Esc)', 23967 23968 tLoading: 'Loading...', 23969 23970 autoFocusLast: true 23971 23972 } 23973}; 23974 23975 23976 23977$.fn.magnificPopup = function(options) { 23978 _checkInstance(); 23979 23980 var jqEl = $(this); 23981 23982 // We call some API method of first param is a string 23983 if (typeof options === "string" ) { 23984 23985 if(options === 'open') { 23986 var items, 23987 itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup, 23988 index = parseInt(arguments[1], 10) || 0; 23989 23990 if(itemOpts.items) { 23991 items = itemOpts.items[index]; 23992 } else { 23993 items = jqEl; 23994 if(itemOpts.delegate) { 23995 items = items.find(itemOpts.delegate); 23996 } 23997 items = items.eq( index ); 23998 } 23999 mfp._openClick({mfpEl:items}, jqEl, itemOpts); 24000 } else { 24001 if(mfp.isOpen) 24002 mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); 24003 } 24004 24005 } else { 24006 // clone options obj 24007 options = $.extend(true, {}, options); 24008 24009 /* 24010 * As Zepto doesn't support .data() method for objects 24011 * and it works only in normal browsers 24012 * we assign "options" object directly to the DOM element. FTW! 24013 */ 24014 if(_isJQ) { 24015 jqEl.data('magnificPopup', options); 24016 } else { 24017 jqEl[0].magnificPopup = options; 24018 } 24019 24020 mfp.addGroup(jqEl, options); 24021 24022 } 24023 return jqEl; 24024}; 24025 24026/*>>core*/ 24027 24028/*>>inline*/ 24029 24030var INLINE_NS = 'inline', 24031 _hiddenClass, 24032 _inlinePlaceholder, 24033 _lastInlineElement, 24034 _putInlineElementsBack = function() { 24035 if(_lastInlineElement) { 24036 _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach(); 24037 _lastInlineElement = null; 24038 } 24039 }; 24040 24041$.magnificPopup.registerModule(INLINE_NS, { 24042 options: { 24043 hiddenClass: 'hide', // will be appended with `mfp-` prefix 24044 markup: '', 24045 tNotFound: 'Content not found' 24046 }, 24047 proto: { 24048 24049 initInline: function() { 24050 mfp.types.push(INLINE_NS); 24051 24052 _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() { 24053 _putInlineElementsBack(); 24054 }); 24055 }, 24056 24057 getInline: function(item, template) { 24058 24059 _putInlineElementsBack(); 24060 24061 if(item.src) { 24062 var inlineSt = mfp.st.inline, 24063 el = $(item.src); 24064 24065 if(el.length) { 24066 24067 // If target element has parent - we replace it with placeholder and put it back after popup is closed 24068 var parent = el[0].parentNode; 24069 if(parent && parent.tagName) { 24070 if(!_inlinePlaceholder) { 24071 _hiddenClass = inlineSt.hiddenClass; 24072 _inlinePlaceholder = _getEl(_hiddenClass); 24073 _hiddenClass = 'mfp-'+_hiddenClass; 24074 } 24075 // replace target inline element with placeholder 24076 _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); 24077 } 24078 24079 mfp.updateStatus('ready'); 24080 } else { 24081 mfp.updateStatus('error', inlineSt.tNotFound); 24082 el = $('<div>'); 24083 } 24084 24085 item.inlineElement = el; 24086 return el; 24087 } 24088 24089 mfp.updateStatus('ready'); 24090 mfp._parseMarkup(template, {}, item); 24091 return template; 24092 } 24093 } 24094}); 24095 24096/*>>inline*/ 24097 24098/*>>ajax*/ 24099var AJAX_NS = 'ajax', 24100 _ajaxCur, 24101 _removeAjaxCursor = function() { 24102 if(_ajaxCur) { 24103 $(document.body).removeClass(_ajaxCur); 24104 } 24105 }, 24106 _destroyAjaxRequest = function() { 24107 _removeAjaxCursor(); 24108 if(mfp.req) { 24109 mfp.req.abort(); 24110 } 24111 }; 24112 24113$.magnificPopup.registerModule(AJAX_NS, { 24114 24115 options: { 24116 settings: null, 24117 cursor: 'mfp-ajax-cur', 24118 tError: '<a href="%url%">The content</a> could not be loaded.' 24119 }, 24120 24121 proto: { 24122 initAjax: function() { 24123 mfp.types.push(AJAX_NS); 24124 _ajaxCur = mfp.st.ajax.cursor; 24125 24126 _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); 24127 _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); 24128 }, 24129 getAjax: function(item) { 24130 24131 if(_ajaxCur) { 24132 $(document.body).addClass(_ajaxCur); 24133 } 24134 24135 mfp.updateStatus('loading'); 24136 24137 var opts = $.extend({ 24138 url: item.src, 24139 success: function(data, textStatus, jqXHR) { 24140 var temp = { 24141 data:data, 24142 xhr:jqXHR 24143 }; 24144 24145 _mfpTrigger('ParseAjax', temp); 24146 24147 mfp.appendContent( $(temp.data), AJAX_NS ); 24148 24149 item.finished = true; 24150 24151 _removeAjaxCursor(); 24152 24153 mfp._setFocus(); 24154 24155 setTimeout(function() { 24156 mfp.wrap.addClass(READY_CLASS); 24157 }, 16); 24158 24159 mfp.updateStatus('ready'); 24160 24161 _mfpTrigger('AjaxContentAdded'); 24162 }, 24163 error: function() { 24164 _removeAjaxCursor(); 24165 item.finished = item.loadError = true; 24166 mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); 24167 } 24168 }, mfp.st.ajax.settings); 24169 24170 mfp.req = $.ajax(opts); 24171 24172 return ''; 24173 } 24174 } 24175}); 24176 24177/*>>ajax*/ 24178 24179/*>>image*/ 24180var _imgInterval, 24181 _getTitle = function(item) { 24182 if(item.data && item.data.title !== undefined) 24183 return item.data.title; 24184 24185 var src = mfp.st.image.titleSrc; 24186 24187 if(src) { 24188 if($.isFunction(src)) { 24189 return src.call(mfp, item); 24190 } else if(item.el) { 24191 return item.el.attr(src) || ''; 24192 } 24193 } 24194 return ''; 24195 }; 24196 24197$.magnificPopup.registerModule('image', { 24198 24199 options: { 24200 markup: '<div class="mfp-figure">'+ 24201 '<div class="mfp-close"></div>'+ 24202 '<figure>'+ 24203 '<div class="mfp-img"></div>'+ 24204 '<figcaption>'+ 24205 '<div class="mfp-bottom-bar">'+ 24206 '<div class="mfp-title"></div>'+ 24207 '<div class="mfp-counter"></div>'+ 24208 '</div>'+ 24209 '</figcaption>'+ 24210 '</figure>'+ 24211 '</div>', 24212 cursor: 'mfp-zoom-out-cur', 24213 titleSrc: 'title', 24214 verticalFit: true, 24215 tError: '<a href="%url%">The image</a> could not be loaded.' 24216 }, 24217 24218 proto: { 24219 initImage: function() { 24220 var imgSt = mfp.st.image, 24221 ns = '.image'; 24222 24223 mfp.types.push('image'); 24224 24225 _mfpOn(OPEN_EVENT+ns, function() { 24226 if(mfp.currItem.type === 'image' && imgSt.cursor) { 24227 $(document.body).addClass(imgSt.cursor); 24228 } 24229 }); 24230 24231 _mfpOn(CLOSE_EVENT+ns, function() { 24232 if(imgSt.cursor) { 24233 $(document.body).removeClass(imgSt.cursor); 24234 } 24235 _window.off('resize' + EVENT_NS); 24236 }); 24237 24238 _mfpOn('Resize'+ns, mfp.resizeImage); 24239 if(mfp.isLowIE) { 24240 _mfpOn('AfterChange', mfp.resizeImage); 24241 } 24242 }, 24243 resizeImage: function() { 24244 var item = mfp.currItem; 24245 if(!item || !item.img) return; 24246 24247 if(mfp.st.image.verticalFit) { 24248 var decr = 0; 24249 // fix box-sizing in ie7/8 24250 if(mfp.isLowIE) { 24251 decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); 24252 } 24253 item.img.css('max-height', mfp.wH-decr); 24254 } 24255 }, 24256 _onImageHasSize: function(item) { 24257 if(item.img) { 24258 24259 item.hasSize = true; 24260 24261 if(_imgInterval) { 24262 clearInterval(_imgInterval); 24263 } 24264 24265 item.isCheckingImgSize = false; 24266 24267 _mfpTrigger('ImageHasSize', item); 24268 24269 if(item.imgHidden) { 24270 if(mfp.content) 24271 mfp.content.removeClass('mfp-loading'); 24272 24273 item.imgHidden = false; 24274 } 24275 24276 } 24277 }, 24278 24279 /** 24280 * Function that loops until the image has size to display elements that rely on it asap 24281 */ 24282 findImageSize: function(item) { 24283 24284 var counter = 0, 24285 img = item.img[0], 24286 mfpSetInterval = function(delay) { 24287 24288 if(_imgInterval) { 24289 clearInterval(_imgInterval); 24290 } 24291 // decelerating interval that checks for size of an image 24292 _imgInterval = setInterval(function() { 24293 if(img.naturalWidth > 0) { 24294 mfp._onImageHasSize(item); 24295 return; 24296 } 24297 24298 if(counter > 200) { 24299 clearInterval(_imgInterval); 24300 } 24301 24302 counter++; 24303 if(counter === 3) { 24304 mfpSetInterval(10); 24305 } else if(counter === 40) { 24306 mfpSetInterval(50); 24307 } else if(counter === 100) { 24308 mfpSetInterval(500); 24309 } 24310 }, delay); 24311 }; 24312 24313 mfpSetInterval(1); 24314 }, 24315 24316 getImage: function(item, template) { 24317 24318 var guard = 0, 24319 24320 // image load complete handler 24321 onLoadComplete = function() { 24322 if(item) { 24323 if (item.img[0].complete) { 24324 item.img.off('.mfploader'); 24325 24326 if(item === mfp.currItem){ 24327 mfp._onImageHasSize(item); 24328 24329 mfp.updateStatus('ready'); 24330 } 24331 24332 item.hasSize = true; 24333 item.loaded = true; 24334 24335 _mfpTrigger('ImageLoadComplete'); 24336 24337 } 24338 else { 24339 // if image complete check fails 200 times (20 sec), we assume that there was an error. 24340 guard++; 24341 if(guard < 200) { 24342 setTimeout(onLoadComplete,100); 24343 } else { 24344 onLoadError(); 24345 } 24346 } 24347 } 24348 }, 24349 24350 // image error handler 24351 onLoadError = function() { 24352 if(item) { 24353 item.img.off('.mfploader'); 24354 if(item === mfp.currItem){ 24355 mfp._onImageHasSize(item); 24356 mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) ); 24357 } 24358 24359 item.hasSize = true; 24360 item.loaded = true; 24361 item.loadError = true; 24362 } 24363 }, 24364 imgSt = mfp.st.image; 24365 24366 24367 var el = template.find('.mfp-img'); 24368 if(el.length) { 24369 var img = document.createElement('img'); 24370 img.className = 'mfp-img'; 24371 if(item.el && item.el.find('img').length) { 24372 img.alt = item.el.find('img').attr('alt'); 24373 } 24374 item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); 24375 img.src = item.src; 24376 24377 // without clone() "error" event is not firing when IMG is replaced by new IMG 24378 // TODO: find a way to avoid such cloning 24379 if(el.is('img')) { 24380 item.img = item.img.clone(); 24381 } 24382 24383 img = item.img[0]; 24384 if(img.naturalWidth > 0) { 24385 item.hasSize = true; 24386 } else if(!img.width) { 24387 item.hasSize = false; 24388 } 24389 } 24390 24391 mfp._parseMarkup(template, { 24392 title: _getTitle(item), 24393 img_replaceWith: item.img 24394 }, item); 24395 24396 mfp.resizeImage(); 24397 24398 if(item.hasSize) { 24399 if(_imgInterval) clearInterval(_imgInterval); 24400 24401 if(item.loadError) { 24402 template.addClass('mfp-loading'); 24403 mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) ); 24404 } else { 24405 template.removeClass('mfp-loading'); 24406 mfp.updateStatus('ready'); 24407 } 24408 return template; 24409 } 24410 24411 mfp.updateStatus('loading'); 24412 item.loading = true; 24413 24414 if(!item.hasSize) { 24415 item.imgHidden = true; 24416 template.addClass('mfp-loading'); 24417 mfp.findImageSize(item); 24418 } 24419 24420 return template; 24421 } 24422 } 24423}); 24424 24425/*>>image*/ 24426 24427/*>>zoom*/ 24428var hasMozTransform, 24429 getHasMozTransform = function() { 24430 if(hasMozTransform === undefined) { 24431 hasMozTransform = document.createElement('p').style.MozTransform !== undefined; 24432 } 24433 return hasMozTransform; 24434 }; 24435 24436$.magnificPopup.registerModule('zoom', { 24437 24438 options: { 24439 enabled: false, 24440 easing: 'ease-in-out', 24441 duration: 300, 24442 opener: function(element) { 24443 return element.is('img') ? element : element.find('img'); 24444 } 24445 }, 24446 24447 proto: { 24448 24449 initZoom: function() { 24450 var zoomSt = mfp.st.zoom, 24451 ns = '.zoom', 24452 image; 24453 24454 if(!zoomSt.enabled || !mfp.supportsTransition) { 24455 return; 24456 } 24457 24458 var duration = zoomSt.duration, 24459 getElToAnimate = function(image) { 24460 var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), 24461 transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, 24462 cssObj = { 24463 position: 'fixed', 24464 zIndex: 9999, 24465 left: 0, 24466 top: 0, 24467 '-webkit-backface-visibility': 'hidden' 24468 }, 24469 t = 'transition'; 24470 24471 cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition; 24472 24473 newImg.css(cssObj); 24474 return newImg; 24475 }, 24476 showMainContent = function() { 24477 mfp.content.css('visibility', 'visible'); 24478 }, 24479 openTimeout, 24480 animatedImg; 24481 24482 _mfpOn('BuildControls'+ns, function() { 24483 if(mfp._allowZoom()) { 24484 24485 clearTimeout(openTimeout); 24486 mfp.content.css('visibility', 'hidden'); 24487 24488 // Basically, all code below does is clones existing image, puts in on top of the current one and animated it 24489 24490 image = mfp._getItemToZoom(); 24491 24492 if(!image) { 24493 showMainContent(); 24494 return; 24495 } 24496 24497 animatedImg = getElToAnimate(image); 24498 24499 animatedImg.css( mfp._getOffset() ); 24500 24501 mfp.wrap.append(animatedImg); 24502 24503 openTimeout = setTimeout(function() { 24504 animatedImg.css( mfp._getOffset( true ) ); 24505 openTimeout = setTimeout(function() { 24506 24507 showMainContent(); 24508 24509 setTimeout(function() { 24510 animatedImg.remove(); 24511 image = animatedImg = null; 24512 _mfpTrigger('ZoomAnimationEnded'); 24513 }, 16); // avoid blink when switching images 24514 24515 }, duration); // this timeout equals animation duration 24516 24517 }, 16); // by adding this timeout we avoid short glitch at the beginning of animation 24518 24519 24520 // Lots of timeouts... 24521 } 24522 }); 24523 _mfpOn(BEFORE_CLOSE_EVENT+ns, function() { 24524 if(mfp._allowZoom()) { 24525 24526 clearTimeout(openTimeout); 24527 24528 mfp.st.removalDelay = duration; 24529 24530 if(!image) { 24531 image = mfp._getItemToZoom(); 24532 if(!image) { 24533 return; 24534 } 24535 animatedImg = getElToAnimate(image); 24536 } 24537 24538 animatedImg.css( mfp._getOffset(true) ); 24539 mfp.wrap.append(animatedImg); 24540 mfp.content.css('visibility', 'hidden'); 24541 24542 setTimeout(function() { 24543 animatedImg.css( mfp._getOffset() ); 24544 }, 16); 24545 } 24546 24547 }); 24548 24549 _mfpOn(CLOSE_EVENT+ns, function() { 24550 if(mfp._allowZoom()) { 24551 showMainContent(); 24552 if(animatedImg) { 24553 animatedImg.remove(); 24554 } 24555 image = null; 24556 } 24557 }); 24558 }, 24559 24560 _allowZoom: function() { 24561 return mfp.currItem.type === 'image'; 24562 }, 24563 24564 _getItemToZoom: function() { 24565 if(mfp.currItem.hasSize) { 24566 return mfp.currItem.img; 24567 } else { 24568 return false; 24569 } 24570 }, 24571 24572 // Get element postion relative to viewport 24573 _getOffset: function(isLarge) { 24574 var el; 24575 if(isLarge) { 24576 el = mfp.currItem.img; 24577 } else { 24578 el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem); 24579 } 24580 24581 var offset = el.offset(); 24582 var paddingTop = parseInt(el.css('padding-top'),10); 24583 var paddingBottom = parseInt(el.css('padding-bottom'),10); 24584 offset.top -= ( $(window).scrollTop() - paddingTop ); 24585 24586 24587 /* 24588 24589 Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa. 24590 24591 */ 24592 var obj = { 24593 width: el.width(), 24594 // fix Zepto height+padding issue 24595 height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop 24596 }; 24597 24598 // I hate to do this, but there is no another option 24599 if( getHasMozTransform() ) { 24600 obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)'; 24601 } else { 24602 obj.left = offset.left; 24603 obj.top = offset.top; 24604 } 24605 return obj; 24606 } 24607 24608 } 24609}); 24610 24611 24612 24613/*>>zoom*/ 24614 24615/*>>iframe*/ 24616 24617var IFRAME_NS = 'iframe', 24618 _emptyPage = '//about:blank', 24619 24620 _fixIframeBugs = function(isShowing) { 24621 if(mfp.currTemplate[IFRAME_NS]) { 24622 var el = mfp.currTemplate[IFRAME_NS].find('iframe'); 24623 if(el.length) { 24624 // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug 24625 if(!isShowing) { 24626 el[0].src = _emptyPage; 24627 } 24628 24629 // IE8 black screen bug fix 24630 if(mfp.isIE8) { 24631 el.css('display', isShowing ? 'block' : 'none'); 24632 } 24633 } 24634 } 24635 }; 24636 24637$.magnificPopup.registerModule(IFRAME_NS, { 24638 24639 options: { 24640 markup: '<div class="mfp-iframe-scaler">'+ 24641 '<div class="mfp-close"></div>'+ 24642 '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+ 24643 '</div>', 24644 24645 srcAction: 'iframe_src', 24646 24647 // we don't care and support only one default type of URL by default 24648 patterns: { 24649 youtube: { 24650 index: 'youtube.com', 24651 id: 'v=', 24652 src: '//www.youtube.com/embed/%id%?autoplay=1' 24653 }, 24654 vimeo: { 24655 index: 'vimeo.com/', 24656 id: '/', 24657 src: '//player.vimeo.com/video/%id%?autoplay=1' 24658 }, 24659 gmaps: { 24660 index: '//maps.google.', 24661 src: '%id%&output=embed' 24662 } 24663 } 24664 }, 24665 24666 proto: { 24667 initIframe: function() { 24668 mfp.types.push(IFRAME_NS); 24669 24670 _mfpOn('BeforeChange', function(e, prevType, newType) { 24671 if(prevType !== newType) { 24672 if(prevType === IFRAME_NS) { 24673 _fixIframeBugs(); // iframe if removed 24674 } else if(newType === IFRAME_NS) { 24675 _fixIframeBugs(true); // iframe is showing 24676 } 24677 }// else { 24678 // iframe source is switched, don't do anything 24679 //} 24680 }); 24681 24682 _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() { 24683 _fixIframeBugs(); 24684 }); 24685 }, 24686 24687 getIframe: function(item, template) { 24688 var embedSrc = item.src; 24689 var iframeSt = mfp.st.iframe; 24690 24691 $.each(iframeSt.patterns, function() { 24692 if(embedSrc.indexOf( this.index ) > -1) { 24693 if(this.id) { 24694 if(typeof this.id === 'string') { 24695 embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); 24696 } else { 24697 embedSrc = this.id.call( this, embedSrc ); 24698 } 24699 } 24700 embedSrc = this.src.replace('%id%', embedSrc ); 24701 return false; // break; 24702 } 24703 }); 24704 24705 var dataObj = {}; 24706 if(iframeSt.srcAction) { 24707 dataObj[iframeSt.srcAction] = embedSrc; 24708 } 24709 mfp._parseMarkup(template, dataObj, item); 24710 24711 mfp.updateStatus('ready'); 24712 24713 return template; 24714 } 24715 } 24716}); 24717 24718 24719 24720/*>>iframe*/ 24721 24722/*>>gallery*/ 24723/** 24724 * Get looped index depending on number of slides 24725 */ 24726var _getLoopedId = function(index) { 24727 var numSlides = mfp.items.length; 24728 if(index > numSlides - 1) { 24729 return index - numSlides; 24730 } else if(index < 0) { 24731 return numSlides + index; 24732 } 24733 return index; 24734 }, 24735 _replaceCurrTotal = function(text, curr, total) { 24736 return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); 24737 }; 24738 24739$.magnificPopup.registerModule('gallery', { 24740 24741 options: { 24742 enabled: false, 24743 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', 24744 preload: [0,2], 24745 navigateByImgClick: true, 24746 arrows: true, 24747 24748 tPrev: 'Previous (Left arrow key)', 24749 tNext: 'Next (Right arrow key)', 24750 tCounter: '%curr% of %total%' 24751 }, 24752 24753 proto: { 24754 initGallery: function() { 24755 24756 var gSt = mfp.st.gallery, 24757 ns = '.mfp-gallery'; 24758 24759 mfp.direction = true; // true - next, false - prev 24760 24761 if(!gSt || !gSt.enabled ) return false; 24762 24763 _wrapClasses += ' mfp-gallery'; 24764 24765 _mfpOn(OPEN_EVENT+ns, function() { 24766 24767 if(gSt.navigateByImgClick) { 24768 mfp.wrap.on('click'+ns, '.mfp-img', function() { 24769 if(mfp.items.length > 1) { 24770 mfp.next(); 24771 return false; 24772 } 24773 }); 24774 } 24775 24776 _document.on('keydown'+ns, function(e) { 24777 if (e.keyCode === 37) { 24778 mfp.prev(); 24779 } else if (e.keyCode === 39) { 24780 mfp.next(); 24781 } 24782 }); 24783 }); 24784 24785 _mfpOn('UpdateStatus'+ns, function(e, data) { 24786 if(data.text) { 24787 data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); 24788 } 24789 }); 24790 24791 _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) { 24792 var l = mfp.items.length; 24793 values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : ''; 24794 }); 24795 24796 _mfpOn('BuildControls' + ns, function() { 24797 if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) { 24798 var markup = gSt.arrowMarkup, 24799 arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS), 24800 arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS); 24801 24802 arrowLeft.click(function() { 24803 mfp.prev(); 24804 }); 24805 arrowRight.click(function() { 24806 mfp.next(); 24807 }); 24808 24809 mfp.container.append(arrowLeft.add(arrowRight)); 24810 } 24811 }); 24812 24813 _mfpOn(CHANGE_EVENT+ns, function() { 24814 if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); 24815 24816 mfp._preloadTimeout = setTimeout(function() { 24817 mfp.preloadNearbyImages(); 24818 mfp._preloadTimeout = null; 24819 }, 16); 24820 }); 24821 24822 24823 _mfpOn(CLOSE_EVENT+ns, function() { 24824 _document.off(ns); 24825 mfp.wrap.off('click'+ns); 24826 mfp.arrowRight = mfp.arrowLeft = null; 24827 }); 24828 24829 }, 24830 next: function() { 24831 mfp.direction = true; 24832 mfp.index = _getLoopedId(mfp.index + 1); 24833 mfp.updateItemHTML(); 24834 }, 24835 prev: function() { 24836 mfp.direction = false; 24837 mfp.index = _getLoopedId(mfp.index - 1); 24838 mfp.updateItemHTML(); 24839 }, 24840 goTo: function(newIndex) { 24841 mfp.direction = (newIndex >= mfp.index); 24842 mfp.index = newIndex; 24843 mfp.updateItemHTML(); 24844 }, 24845 preloadNearbyImages: function() { 24846 var p = mfp.st.gallery.preload, 24847 preloadBefore = Math.min(p[0], mfp.items.length), 24848 preloadAfter = Math.min(p[1], mfp.items.length), 24849 i; 24850 24851 for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) { 24852 mfp._preloadItem(mfp.index+i); 24853 } 24854 for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) { 24855 mfp._preloadItem(mfp.index-i); 24856 } 24857 }, 24858 _preloadItem: function(index) { 24859 index = _getLoopedId(index); 24860 24861 if(mfp.items[index].preloaded) { 24862 return; 24863 } 24864 24865 var item = mfp.items[index]; 24866 if(!item.parsed) { 24867 item = mfp.parseEl( index ); 24868 } 24869 24870 _mfpTrigger('LazyLoad', item); 24871 24872 if(item.type === 'image') { 24873 item.img = $('<img class="mfp-img" />').on('load.mfploader', function() { 24874 item.hasSize = true; 24875 }).on('error.mfploader', function() { 24876 item.hasSize = true; 24877 item.loadError = true; 24878 _mfpTrigger('LazyLoadError', item); 24879 }).attr('src', item.src); 24880 } 24881 24882 24883 item.preloaded = true; 24884 } 24885 } 24886}); 24887 24888/*>>gallery*/ 24889 24890/*>>retina*/ 24891 24892var RETINA_NS = 'retina'; 24893 24894$.magnificPopup.registerModule(RETINA_NS, { 24895 options: { 24896 replaceSrc: function(item) { 24897 return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; }); 24898 }, 24899 ratio: 1 // Function or number. Set to 1 to disable. 24900 }, 24901 proto: { 24902 initRetina: function() { 24903 if(window.devicePixelRatio > 1) { 24904 24905 var st = mfp.st.retina, 24906 ratio = st.ratio; 24907 24908 ratio = !isNaN(ratio) ? ratio : ratio(); 24909 24910 if(ratio > 1) { 24911 _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) { 24912 item.img.css({ 24913 'max-width': item.img[0].naturalWidth / ratio, 24914 'width': '100%' 24915 }); 24916 }); 24917 _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) { 24918 item.src = st.replaceSrc(item, ratio); 24919 }); 24920 } 24921 } 24922 24923 } 24924 } 24925}); 24926 24927/*>>retina*/ 24928 _checkInstance(); })); 24929/*! 24930 * VERSION: 2.1.2 24931 * DATE: 2019-03-01 24932 * UPDATES AND DOCS AT: http://greensock.com 24933 * 24934 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 24935 * This work is subject to the terms at http://greensock.com/standard-license or for
24936 * Club GreenSock members, the software agreement that was issued with your membership. 24937 * 24938 * @author: Jack Doyle, [email protected] 24939 */ 24940/* eslint-disable */ 24941(function(window, moduleName) { 24942 24943 "use strict"; 24944 var _exports = {}, 24945 _doc = window.document, 24946 _globals = window.GreenSockGlobals = window.GreenSockGlobals || window, 24947 existingModule = _globals[moduleName]; 24948 if (existingModule) { 24949 if (typeof(module) !== "undefined" && module.exports) { //node 24950 module.exports = existingModule; 24951 } 24952 return existingModule; //in case the core set of classes is already loaded, don't instantiate twice. 24953 } 24954 var _namespace = function(ns) { 24955 var a = ns.split("."), 24956 p = _globals, i; 24957 for (i = 0; i < a.length; i++) { 24958 p[a[i]] = p = p[a[i]] || {}; 24959 } 24960 return p; 24961 }, 24962 gs = _namespace("com.greensock"), 24963 _tinyNum = 0.00000001, 24964 _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 24965 var b = [], 24966 l = a.length, 24967 i; 24968 for (i = 0; i !== l; b.push(a[i++])) {} 24969 return b; 24970 }, 24971 _emptyFunc = function() {}, 24972 _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower) 24973 var toString = Object.prototype.toString, 24974 array = toString.call([]); 24975 return function(obj) { 24976 return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array)); 24977 }; 24978 }()), 24979 a, i, p, _ticker, _tickerActive, 24980 _defLookup = {}, 24981 24982 /** 24983 * @constructor 24984 * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition. 24985 * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is 24986 * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin 24987 * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally. 24988 * 24989 * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found, 24990 * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere, 24991 * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so 24992 * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything 24993 * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock 24994 * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could 24995 * sandbox the banner one like: 24996 * 24997 * <script> 24998 * var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever. 24999 * </script> 25000 * <script src="js/greensock/v1.7/TweenMax.js"></script> 25001 * <script> 25002 * window.GreenSockGlobals = window._gsQueue = window._gsDefine = null; //reset it back to null (along with the special _gsQueue variable) so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...) 25003 * </script> 25004 * <script src="js/greensock/v1.6/TweenMax.js"></script> 25005 * <script> 25006 * gs.TweenLite.to(...); //would use v1.7 25007 * TweenLite.to(...); //would use v1.6 25008 * </script> 25009 * 25010 * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back". 25011 * @param {!Array.<string>}
25011 dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"] 25012 * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition. 25013 * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object) 25014 */ 25015 Definition = function(ns, dependencies, func, global) { 25016 this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses 25017 _defLookup[ns] = this; 25018 this.gsClass = null; 25019 this.func = func; 25020 var _classes = []; 25021 this.check = function(init) { 25022 var i = dependencies.length, 25023 missing = i, 25024 cur, a, n, cl; 25025 while (--i > -1) { 25026 if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) { 25027 _classes[i] = cur.gsClass; 25028 missing--; 25029 } else if (init) { 25030 cur.sc.push(this); 25031 } 25032 } 25033 if (missing === 0 && func) { 25034 a = ("com.greensock." + ns).split("."); 25035 n = a.pop(); 25036 cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes); 25037 25038 //exports to multiple environments 25039 if (global) { 25040 _globals[n] = _exports[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.) 25041 if (typeof(module) !== "undefined" && module.exports) { //node 25042 if (ns === moduleName) { 25043 module.exports = _exports[moduleName] = cl; 25044 for (i in _exports) { 25045 cl[i] = _exports[i]; 25046 } 25047 } else if (_exports[moduleName]) { 25048 _exports[moduleName][n] = cl; 25049 } 25050 } else if (typeof(define) === "function" && define.amd){ //AMD 25051 define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").pop(), [], function() { return cl; }); 25052 } 25053 } 25054 for (i = 0; i < this.sc.length; i++) { 25055 this.sc[i].check(); 25056 } 25057 } 25058 }; 25059 this.check(true); 25060 }, 25061 25062 //used to create Definition instances (which basically registers a class that has dependencies). 25063 _gsDefine = window._gsDefine = function(ns, dependencies, func, global) { 25064 return new Definition(ns, dependencies, func, global); 25065 }, 25066 25067 //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class). 25068 _class = gs._class = function(ns, func, global) { 25069 func = func || function() {}; 25070 _gsDefine(ns, [], function(){ return func; }, global); 25071 return func; 25072 }; 25073 25074 _gsDefine.globals = _globals; 25075 25076 25077 25078/* 25079 * ---------------------------------------------------------------- 25080 * Ease 25081 * ---------------------------------------------------------------- 25082 */ 25083 var _baseParams = [0, 0, 1, 1], 25084 Ease = _class("easing.Ease", function(func, extraParams, type, power) { 25085 this._func = func; 25086 this._type = type || 0; 25087 this._power = power || 0; 25088 this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams; 25089 }, true), 25090 _easeMap = Ease.map = {}, 25091 _easeReg = Ease.register = function(ease, names, types, create) { 25092 var na = names.split(","), 25093 i = na.length, 25094 ta = (types || "easeIn,easeOut,easeInOut").split(","), 25095 e, name, j, type; 25096 while (--i > -1) { 25097 name = na[i]; 25098 e = create ? _class("easing."+name, null, true) : gs.easing[name] || {}; 25099 j = ta.length; 25100 while (--j > -1) { 25101 type = ta[j]; 25102 _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease(); 25103 } 25104 } 25105 }; 25106 25107 p = Ease.prototype; 25108 p._calcEnd = false;
25109 p.getRatio = function(p) { 25110 if (this._func) { 25111 this._params[0] = p; 25112 return this._func.apply(null, this._params); 25113 } 25114 var t = this._type, 25115 pw = this._power, 25116 r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2; 25117 if (pw === 1) { 25118 r *= r; 25119 } else if (pw === 2) { 25120 r *= r * r; 25121 } else if (pw === 3) { 25122 r *= r * r * r; 25123 } else if (pw === 4) { 25124 r *= r * r * r * r; 25125 } 25126 return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2); 25127 }; 25128 25129 //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut) 25130 a = ["Linear","Quad","Cubic","Quart","Quint,Strong"]; 25131 i = a.length; 25132 while (--i > -1) { 25133 p = a[i]+",Power"+i; 25134 _easeReg(new Ease(null,null,1,i), p, "easeOut", true); 25135 _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : "")); 25136 _easeReg(new Ease(null,null,3,i), p, "easeInOut"); 25137 } 25138 _easeMap.linear = gs.easing.Linear.easeIn; 25139 _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks 25140 25141 25142/* 25143 * ---------------------------------------------------------------- 25144 * EventDispatcher 25145 * ---------------------------------------------------------------- 25146 */ 25147 var EventDispatcher = _class("events.EventDispatcher", function(target) { 25148 this._listeners = {}; 25149 this._eventTarget = target || this; 25150 }); 25151 p = EventDispatcher.prototype; 25152 25153 p.addEventListener = function(type, callback, scope, useParam, priority) { 25154 priority = priority || 0; 25155 var list = this._listeners[type], 25156 index = 0, 25157 listener, i; 25158 if (this === _ticker && !_tickerActive) { 25159 _ticker.wake(); 25160 } 25161 if (list == null) { 25162 this._listeners[type] = list = []; 25163 } 25164 i = list.length; 25165 while (--i > -1) { 25166 listener = list[i]; 25167 if (listener.c === callback && listener.s === scope) { 25168 list.splice(i, 1); 25169 } else if (index === 0 && listener.pr < priority) { 25170 index = i + 1; 25171 } 25172 } 25173 list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority}); 25174 }; 25175 25176 p.removeEventListener = function(type, callback) { 25177 var list = this._listeners[type], i; 25178 if (list) { 25179 i = list.length; 25180 while (--i > -1) { 25181 if (list[i].c === callback) { 25182 list.splice(i, 1); 25183 return; 25184 } 25185 } 25186 } 25187 }; 25188 25189 p.dispatchEvent = function(type) { 25190 var list = this._listeners[type], 25191 i, t, listener; 25192 if (list) { 25193 i = list.length; 25194 if (i > 1) { 25195 list = list.slice(0); //in case addEventListener() is called from within a listener/callback (otherwise the index could change, resulting in a skip) 25196 } 25197 t = this._eventTarget; 25198 while (--i > -1) { 25199 listener = list[i]; 25200 if (listener) { 25201 if (listener.up) { 25202 listener.c.call(listener.s || t, {type:type, target:t}); 25203 } else { 25204 listener.c.call(listener.s || t); 25205 } 25206 } 25207 } 25208 } 25209 }; 25210 25211 25212/* 25213 * ---------------------------------------------------------------- 25214 * Ticker 25215 * ---------------------------------------------------------------- 25216 */ 25217 var _reqAnimFrame = window.requestAnimationFrame, 25218 _cancelAnimFrame = window.cancelAnimationFrame, 25219 _getTime = Date.now || function() {return new Date().getTime();}, 25220 _lastUpdate = _getTime(); 25221 25222 //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill. 25223 a = ["ms","moz","webkit","o"]; 25224 i = a.length; 25225 while (--i > -1 && !_reqAnimFrame) { 25226 _reqAnimFrame = window[a[i] + "RequestAnimationFrame"]; 25227 _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"]; 25228 } 25229 25230 _class("Ticker", function(fps, useRAF) { 25231 var _self = this, 25232 _startTime = _getTime(), 25233 _useRAF = (useRAF !== false && _reqAnimFrame) ? "auto" : false, 25234 _lagThreshold = 500, 25235 _adjustedLag = 33, 25236 _tickWord = "tick", //helps reduce gc burden 25237 _fps, _req, _id, _gap, _nextTime, 25238 _tick = function(manual) { 25239 var elapsed = _getTime() - _lastUpdate, 25240 overlap, dispatch; 25241 if (elapsed > _lagThreshold) { 25242 _startTime += elapsed - _adjustedLag; 25243 } 25244 _lastUpdate += elapsed; 25245 _self.time = (_lastUpdate - _startTime) / 1000; 25246 overlap = _self.time - _nextTime; 25247 if (!_fps || overlap > 0 || manual === true) { 25248 _self.frame++; 25249 _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap); 25250 dispatch = true; 25251 } 25252 if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise. 25253 _id = _req(_tick); 25254 }
25255 if (dispatch) { 25256 _self.dispatchEvent(_tickWord); 25257 } 25258 }; 25259 25260 EventDispatcher.call(_self); 25261 _self.time = _self.frame = 0; 25262 _self.tick = function() { 25263 _tick(true); 25264 }; 25265 25266 _self.lagSmoothing = function(threshold, adjustedLag) { 25267 if (!arguments.length) { //if lagSmoothing() is called with no arguments, treat it like a getter that returns a boolean indicating if it's enabled or not. This is purposely undocumented and is for internal use. 25268 return (_lagThreshold < 1 / _tinyNum); 25269 } 25270 _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited 25271 _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0); 25272 }; 25273 25274 _self.sleep = function() { 25275 if (_id == null) { 25276 return; 25277 } 25278 if (!_useRAF || !_cancelAnimFrame) { 25279 clearTimeout(_id); 25280 } else { 25281 _cancelAnimFrame(_id); 25282 } 25283 _req = _emptyFunc; 25284 _id = null; 25285 if (_self === _ticker) { 25286 _tickerActive = false; 25287 } 25288 }; 25289 25290 _self.wake = function(seamless) { 25291 if (_id !== null) { 25292 _self.sleep(); 25293 } else if (seamless) { 25294 _startTime += -_lastUpdate + (_lastUpdate = _getTime()); 25295 } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout(). 25296 _lastUpdate = _getTime() - _lagThreshold + 5; 25297 } 25298 _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame; 25299 if (_self === _ticker) { 25300 _tickerActive = true; 25301 } 25302 _tick(2); 25303 }; 25304 25305 _self.fps = function(value) { 25306 if (!arguments.length) { 25307 return _fps; 25308 } 25309 _fps = value; 25310 _gap = 1 / (_fps || 60); 25311 _nextTime = this.time + _gap; 25312 _self.wake(); 25313 }; 25314 25315 _self.useRAF = function(value) { 25316 if (!arguments.length) { 25317 return _useRAF; 25318 } 25319 _self.sleep(); 25320 _useRAF = value; 25321 _self.fps(_fps); 25322 }; 25323 _self.fps(fps); 25324 25325 //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition. 25326 setTimeout(function() { 25327 if (_useRAF === "auto" && _self.frame < 5 && (_doc || {}).visibilityState !== "hidden") { 25328 _self.useRAF(false); 25329 } 25330 }, 1500); 25331 }); 25332 25333 p = gs.Ticker.prototype = new gs.events.EventDispatcher(); 25334 p.constructor = gs.Ticker; 25335 25336 25337/* 25338 * ---------------------------------------------------------------- 25339 * Animation 25340 * ---------------------------------------------------------------- 25341 */ 25342 var Animation = _class("core.Animation", function(duration, vars) { 25343 this.vars = vars = vars || {}; 25344 this._duration = this._totalDuration = duration || 0; 25345 this._delay = Number(vars.delay) || 0; 25346 this._timeScale = 1; 25347 this._active = !!vars.immediateRender; 25348 this.data = vars.data; 25349 this._reversed = !!vars.reversed; 25350 25351 if (!_rootTimeline) { 25352 return; 25353 } 25354 if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly. 25355 _ticker.wake(); 25356 } 25357 25358 var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline; 25359 tl.add(this, tl._time); 25360 25361 if (this.vars.paused) { 25362 this.paused(true); 25363 } 25364 }); 25365 25366 _ticker = Animation.ticker = new gs.Ticker(); 25367 p = Animation.prototype; 25368 p._dirty = p._gc = p._initted = p._paused = false; 25369 p._totalTime = p._time = 0; 25370 p._rawPrevTime = -1; 25371 p._next = p._last = p._onUpdate = p._timeline = p.timeline = null; 25372 p._paused = false; 25373 25374 25375 //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker. 25376 var _checkTimeout = function() { 25377 if (_tickerActive && _getTime() - _lastUpdate > 2000 && ((_doc || {}).visibilityState !== "hidden" || !_ticker.lagSmoothing())) { //note: if the tab is hidden, we should still wake if lagSmoothing has been disabled. 25378 _ticker.wake(); 25379 } 25380 var t = setTimeout(_checkTimeout, 2000); 25381 if (t.unref) { 25382 // allows a node process to exit even if the timeoutâs callback hasn't been invoked. Without it, the node process could hang as this function is called every two seconds. 25383 t.unref(); 25384 } 25385 }; 25386 _checkTimeout(); 25387 25388 25389 p.play = function(from, suppressEvents) { 25390 if (from != null) { 25391 this.seek(from, suppressEvents); 25392 } 25393 return this.reversed(false).paused(false); 25394 }; 25395 25396 p.pause = function(atTime, suppressEvents) { 25397 if (atTime != null) { 25398 this.seek(atTime, suppressEvents); 25399 } 25400 return this.paused(true); 25401 }; 25402 25403 p.resume = function(from, suppressEvents) { 25404 if (from != null) { 25405 this.seek(from, suppressEvents); 25406 } 25407 return this.paused(false); 25408 }; 25409 25410 p.seek = function(time, suppressEvents) { 25411 return this.totalTime(Number(time), suppressEvents !== false); 25412 }; 25413 25414 p.restart = function(includeDelay, suppressEvents) { 25415 return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true); 25416 }; 25417 25418 p.reverse = function(from, suppressEvents) { 25419 if (from != null) { 25420 this.seek((from || this.totalDuration()), suppressEvents); 25421 } 25422 return this.reversed(true).paused(false); 25423 }; 25424 25425 p.render = function(time, suppressEvents, force) { 25426 //stub - we override this method in subclasses. 25427 }; 25428 25429 p.invalidate = function() { 25430 this._time = this._totalTime = 0; 25431 this._initted = this._gc = false;
25432 this._rawPrevTime = -1; 25433 if (this._gc || !this.timeline) { 25434 this._enabled(true); 25435 } 25436 return this; 25437 }; 25438 25439 p.isActive = function() { 25440 var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active. 25441 startTime = this._startTime, 25442 rawTime; 25443 return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime(true)) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale - _tinyNum)); 25444 }; 25445 25446 p._enabled = function (enabled, ignoreTimeline) { 25447 if (!_tickerActive) { 25448 _ticker.wake(); 25449 } 25450 this._gc = !enabled; 25451 this._active = this.isActive(); 25452 if (ignoreTimeline !== true) { 25453 if (enabled && !this.timeline) { 25454 this._timeline.add(this, this._startTime - this._delay); 25455 } else if (!enabled && this.timeline) { 25456 this._timeline._remove(this, true); 25457 } 25458 } 25459 return false; 25460 }; 25461 25462 25463 p._kill = function(vars, target) { 25464 return this._enabled(false, false); 25465 }; 25466 25467 p.kill = function(vars, target) { 25468 this._kill(vars, target); 25469 return this; 25470 }; 25471 25472 p._uncache = function(includeSelf) { 25473 var tween = includeSelf ? this : this.timeline; 25474 while (tween) { 25475 tween._dirty = true; 25476 tween = tween.timeline; 25477 } 25478 return this; 25479 }; 25480 25481 p._swapSelfInParams = function(params) { 25482 var i = params.length, 25483 copy = params.concat(); 25484 while (--i > -1) { 25485 if (params[i] === "{self}") { 25486 copy[i] = this; 25487 } 25488 } 25489 return copy; 25490 }; 25491 25492 p._callback = function(type) { 25493 var v = this.vars, 25494 callback = v[type], 25495 params = v[type + "Params"], 25496 scope = v[type + "Scope"] || v.callbackScope || this, 25497 l = params ? params.length : 0; 25498 switch (l) { //speed optimization; call() is faster than apply() so use it when there are only a few parameters (which is by far most common). Previously we simply did var v = this.vars; v[type].apply(v[type + "Scope"] || v.callbackScope || this, v[type + "Params"] || _blankArray); 25499 case 0: callback.call(scope); break; 25500 case 1: callback.call(scope, params[0]); break; 25501 case 2: callback.call(scope, params[0], params[1]); break; 25502 default: callback.apply(scope, params); 25503 } 25504 }; 25505 25506//----Animation getters/setters -------------------------------------------------------- 25507 25508 p.eventCallback = function(type, callback, params, scope) { 25509 if ((type || "").substr(0,2) === "on") { 25510 var v = this.vars; 25511 if (arguments.length === 1) { 25512 return v[type]; 25513 } 25514 if (callback == null) { 25515 delete v[type]; 25516 } else { 25517 v[type] = callback; 25518 v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params; 25519 v[type + "Scope"] = scope; 25520 } 25521 if (type === "onUpdate") { 25522 this._onUpdate = callback; 25523 } 25524 } 25525 return this; 25526 }; 25527 25528 p.delay = function(value) { 25529 if (!arguments.length) { 25530 return this._delay; 25531 } 25532 if (this._timeline.smoothChildTiming) { 25533 this.startTime( this._startTime + value - this._delay ); 25534 } 25535 this._delay = value; 25536 return this; 25537 }; 25538 25539 p.duration = function(value) { 25540 if (!arguments.length) { 25541 this._dirty = false; 25542 return this._duration; 25543 } 25544 this._duration = this._totalDuration = value; 25545 this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration. 25546 if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) { 25547 this.totalTime(this._totalTime * (value / this._duration), true); 25548 } 25549 return this; 25550 }; 25551 25552 p.totalDuration = function(value) { 25553 this._dirty = false; 25554 return (!arguments.length) ? this._totalDuration : this.duration(value); 25555 }; 25556 25557 p.time = function(value, suppressEvents) { 25558 if (!arguments.length) { 25559 return this._time; 25560 } 25561 if (this._dirty) { 25562 this.totalDuration(); 25563 } 25564 return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents); 25565 }; 25566 25567 p.totalTime = function(time, suppressEvents, uncapped) { 25568 if (!_tickerActive) { 25569 _ticker.wake(); 25570 } 25571 if (!arguments.length) { 25572 return this._totalTime; 25573 } 25574 if (this._timeline) { 25575 if (time < 0 && !uncapped) { 25576 time += this.totalDuration(); 25577 } 25578 if (this._timeline.smoothChildTiming) { 25579 if (this._dirty) { 25580 this.totalDuration(); 25581 } 25582 var totalDuration = this._totalDuration, 25583 tl = this._timeline; 25584 if (time > totalDuration && !uncapped) { 25585 time = totalDuration; 25586 } 25587 this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale); 25588 if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here. 25589 this._uncache(false); 25590 } 25591 //in case any of the ancestor timelines had completed but should now be enabled, we should reset the
25591ir totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed. 25592 if (tl._timeline) { 25593 while (tl._timeline) { 25594 if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) { 25595 tl.totalTime(tl._totalTime, true); 25596 } 25597 tl = tl._timeline; 25598 } 25599 } 25600 } 25601 if (this._gc) { 25602 this._enabled(true, false); 25603 } 25604 if (this._totalTime !== time || this._duration === 0) { 25605 if (_lazyTweens.length) { 25606 _lazyRender(); 25607 } 25608 this.render(time, suppressEvents, false); 25609 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render. 25610 _lazyRender(); 25611 } 25612 } 25613 } 25614 return this; 25615 }; 25616 25617 p.progress = p.totalProgress = function(value, suppressEvents) { 25618 var duration = this.duration(); 25619 return (!arguments.length) ? (duration ? this._time / duration : this.ratio) : this.totalTime(duration * value, suppressEvents); 25620 }; 25621 25622 p.startTime = function(value) { 25623 if (!arguments.length) { 25624 return this._startTime; 25625 } 25626 if (value !== this._startTime) { 25627 this._startTime = value; 25628 if (this.timeline) if (this.timeline._sortChildren) { 25629 this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct. 25630 } 25631 } 25632 return this; 25633 }; 25634 25635 p.endTime = function(includeRepeats) { 25636 return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale; 25637 }; 25638 25639 p.timeScale = function(value) { 25640 if (!arguments.length) { 25641 return this._timeScale; 25642 } 25643 var pauseTime, t; 25644 value = value || _tinyNum; //can't allow zero because it'll throw the math off 25645 if (this._timeline && this._timeline.smoothChildTiming) { 25646 pauseTime = this._pauseTime; 25647 t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime(); 25648 this._startTime = t - ((t - this._startTime) * this._timeScale / value); 25649 } 25650 this._timeScale = value; 25651 t = this.timeline; 25652 while (t && t.timeline) { //must update the duration/totalDuration of all ancestor timelines immediately in case in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though. 25653 t._dirty = true; 25654 t.totalDuration(); 25655 t = t.timeline; 25656 } 25657 return this; 25658 }; 25659 25660 p.reversed = function(value) { 25661 if (!arguments.length) { 25662 return this._reversed; 25663 } 25664 if (value != this._reversed) { 25665 this._reversed = value; 25666 this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true); 25667 } 25668 return this; 25669 }; 25670 25671 p.paused = function(value) { 25672 if (!arguments.length) { 25673 return this._paused; 25674 } 25675 var tl = this._timeline, 25676 raw, elapsed; 25677 if (value != this._paused) if (tl) { 25678 if (!_tickerActive && !value) { 25679 _ticker.wake(); 25680 } 25681 raw = tl.rawTime(); 25682 elapsed = raw - this._pauseTime; 25683 if (!value && tl.smoothChildTiming) { 25684 this._startTime += elapsed; 25685 this._uncache(false); 25686 } 25687 this._pauseTime = value ? raw : null; 25688 this._paused = value; 25689 this._active = this.isActive(); 25690 if (!value && elapsed !== 0 && this._initted && this.duration()) { 25691 raw = tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale; 25692 this.render(raw, (raw === this._totalTime), true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render. 25693 } 25694 } 25695 if (this._gc && !value) { 25696 this._enabled(true, false); 25697 } 25698 return this; 25699 }; 25700 25701
25702/* 25703 * ---------------------------------------------------------------- 25704 * SimpleTimeline 25705 * ---------------------------------------------------------------- 25706 */ 25707 var SimpleTimeline = _class("core.SimpleTimeline", function(vars) { 25708 Animation.call(this, 0, vars); 25709 this.autoRemoveChildren = this.smoothChildTiming = true; 25710 }); 25711 25712 p = SimpleTimeline.prototype = new Animation(); 25713 p.constructor = SimpleTimeline; 25714 p.kill()._gc = false; 25715 p._first = p._last = p._recent = null; 25716 p._sortChildren = false; 25717 25718 p.add = p.insert = function(child, position, align, stagger) { 25719 var prevTween, st; 25720 child._startTime = Number(position || 0) + child._delay; 25721 if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order). 25722 child._pauseTime = this.rawTime() - (child._timeline.rawTime() - child._pauseTime); 25723 } 25724 if (child.timeline) { 25725 child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one. 25726 } 25727 child.timeline = child._timeline = this; 25728 if (child._gc) { 25729 child._enabled(true, true); 25730 } 25731 prevTween = this._last; 25732 if (this._sortChildren) { 25733 st = child._startTime; 25734 while (prevTween && prevTween._startTime > st) { 25735 prevTween = prevTween._prev; 25736 } 25737 } 25738 if (prevTween) { 25739 child._next = prevTween._next; 25740 prevTween._next = child; 25741 } else { 25742 child._next = this._first; 25743 this._first = child; 25744 } 25745 if (child._next) { 25746 child._next._prev = child; 25747 } else { 25748 this._last = child; 25749 } 25750 child._prev = prevTween; 25751 this._recent = child; 25752 if (this._timeline) { 25753 this._uncache(true); 25754 } 25755 return this; 25756 }; 25757 25758 p._remove = function(tween, skipDisable) { 25759 if (tween.timeline === this) { 25760 if (!skipDisable) { 25761 tween._enabled(false, true); 25762 } 25763 25764 if (tween._prev) { 25765 tween._prev._next = tween._next; 25766 } else if (this._first === tween) { 25767 this._first = tween._next; 25768 } 25769 if (tween._next) { 25770 tween._next._prev = tween._prev; 25771 } else if (this._last === tween) { 25772 this._last = tween._prev; 25773 } 25774 tween._next = tween._prev = tween.timeline = null; 25775 if (tween === this._recent) { 25776 this._recent = this._last; 25777 } 25778 25779 if (this._timeline) { 25780 this._uncache(true); 25781 } 25782 } 25783 return this; 25784 }; 25785 25786 p.render = function(time, suppressEvents, force) { 25787 var tween = this._first, 25788 next; 25789 this._totalTime = this._time = this._rawPrevTime = time; 25790 while (tween) { 25791 next = tween._next; //record it here because the value could change after rendering... 25792 if (tween._active || (time >= tween._startTime && !tween._paused && !tween._gc)) { 25793 if (!tween._reversed) { 25794 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 25795 } else { 25796 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 25797 } 25798 } 25799 tween = next; 25800 } 25801 }; 25802 25803 p.rawTime = function() { 25804 if (!_tickerActive) { 25805 _ticker.wake(); 25806 } 25807 return this._totalTime; 25808 }; 25809 25810/* 25811 * ---------------------------------------------------------------- 25812 * TweenLite 25813 * ---------------------------------------------------------------- 25814 */ 25815 var TweenLite = _class("TweenLite", function(target, duration, vars) { 25816 Animation.call(this, duration, vars); 25817 this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method) 25818 25819 if (target == null) { 25820 throw "Cannot tween a null target."; 25821 } 25822 25823 this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target; 25824 25825 var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),
25826 overwrite = this.vars.overwrite, 25827 i, targ, targets; 25828 25829 this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite]; 25830 25831 if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") { 25832 this._targets = targets = _slice(target); //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 25833 this._propLookup = []; 25834 this._siblings = []; 25835 for (i = 0; i < targets.length; i++) { 25836 targ = targets[i]; 25837 if (!targ) { 25838 targets.splice(i--, 1); 25839 continue; 25840 } else if (typeof(targ) === "string") { 25841 targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings 25842 if (typeof(targ) === "string") { 25843 targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case) 25844 } 25845 continue; 25846 } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself. 25847 targets.splice(i--, 1); 25848 this._targets = targets = targets.concat(_slice(targ)); 25849 continue; 25850 } 25851 this._siblings[i] = _register(targ, this, false); 25852 if (overwrite === 1) if (this._siblings[i].length > 1) { 25853 _applyOverwrite(targ, this, null, 1, this._siblings[i]); 25854 } 25855 } 25856 25857 } else { 25858 this._propLookup = {}; 25859 this._siblings = _register(target, this, false); 25860 if (overwrite === 1) if (this._siblings.length > 1) { 25861 _applyOverwrite(target, this, null, 1, this._siblings); 25862 } 25863 } 25864 if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) { 25865 this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) 25866 this.render(Math.min(0, -this._delay)); //in case delay is negative 25867 } 25868 }, true), 25869 _isSelector = function(v) { 25870 return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox. 25871 }, 25872 _autoCSS = function(vars, target) { 25873 var css = {}, 25874 p; 25875 for (p in vars) { 25876 if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties. 25877 css[p] = vars[p]; 25878 delete vars[p]; 25879 } 25880 } 25881 vars.css = css; 25882 }; 25883 25884 p = TweenLite.prototype = new Animation(); 25885 p.constructor = TweenLite; 25886 p.kill()._gc = false; 25887 25888//----TweenLite defaults, overwrite management, and root updates ---------------------------------------------------- 25889 25890 p.ratio = 0; 25891 p._firstPT = p._targets = p._overwrittenProps = p._startAt = null; 25892 p._notifyPluginsOfEnabled = p._lazy = false; 25893 25894 TweenLite.version = "2.1.2"; 25895 TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1); 25896 TweenLite.defaultOverwrite = "auto"; 25897 TweenLite.ticker = _ticker; 25898 TweenLite.autoSleep = 120; 25899 TweenLite.lagSmoothing = function(threshold, adjustedLag) { 25900 _ticker.lagSmoothing(threshold, adjustedLag); 25901 }; 25902 25903 TweenLite.selector = window.$ || window.jQuery || function(e) { 25904 var selector = window.$ || window.jQuery; 25905 if (selector) { 25906 TweenLite.selector = selector; 25907 return selector(e); 25908 } 25909 if (!_doc) { //in some dev environments (like Angular 6), GSAP gets loaded before the document is defined! So re-query it here if/when necessary. 25910 _doc = window.document; 25911 } 25912 return (!_doc) ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e)); 25913 }; 25914 25915 var _lazyTweens = [], 25916 _lazyLookup = {}, 25917 _numbersExp = /(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig, 25918 _relExp = /[\+-]=-?[\.\d]/, 25919 //_nonNumbersExp = /(?:([\-+](?!(\d|=)))|[^\d\-+=e]|(e(?![\-+][\d])))+/ig, 25920 _setRatio = function(v) { 25921 var pt = this._firstPT, 25922 min = 0.000001, 25923 val; 25924 while (pt) { 25925 val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start; 25926 if (pt.m) { 25927 val = pt.m.call(this._tween, val, this._target || pt.t, this._tween); 25928 } else if (val < min) if (val >
25928 -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser 25929 val = 0; 25930 } 25931 if (!pt.f) { 25932 pt.t[pt.p] = val; 25933 } else if (pt.fp) { 25934 pt.t[pt.p](pt.fp, val); 25935 } else { 25936 pt.t[pt.p](val); 25937 } 25938 pt = pt._next; 25939 } 25940 }, 25941 _blobRound = function(v) { 25942 return (((v * 1000) | 0) / 1000) + ""; 25943 }, 25944 //compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")). 25945 _blobDif = function(start, end, filter, pt) { 25946 var a = [], 25947 charIndex = 0, 25948 s = "", 25949 color = 0, 25950 startNums, endNums, num, i, l, nonNumbers, currentNum; 25951 a.start = start; 25952 a.end = end; 25953 start = a[0] = start + ""; //ensure values are strings 25954 end = a[1] = end + ""; 25955 if (filter) { 25956 filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. 25957 start = a[0]; 25958 end = a[1]; 25959 } 25960 a.length = 0; 25961 startNums = start.match(_numbersExp) || []; 25962 endNums = end.match(_numbersExp) || []; 25963 if (pt) { 25964 pt._next = null; 25965 pt.blob = 1; 25966 a._firstPT = a._applyPT = pt; //apply last in the linked list (which means inserting it first) 25967 } 25968 l = endNums.length; 25969 for (i = 0; i < l; i++) { 25970 currentNum = endNums[i]; 25971 nonNumbers = end.substr(charIndex, end.indexOf(currentNum, charIndex)-charIndex); 25972 s += (nonNumbers || !i) ? nonNumbers : ","; //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case. 25973 charIndex += nonNumbers.length; 25974 if (color) { //sense rgba() values and round them. 25975 color = (color + 1) % 5; 25976 } else if (nonNumbers.substr(-5) === "rgba(") { 25977 color = 1; 25978 } 25979 if (currentNum === startNums[i] || startNums.length <= i) { 25980 s += currentNum; 25981 } else { 25982 if (s) { 25983 a.push(s); 25984 s = ""; 25985 } 25986 num = parseFloat(startNums[i]); 25987 a.push(num); 25988 a._firstPT = {_next: a._firstPT, t:a, p: a.length-1, s:num, c:((currentNum.charAt(1) === "=") ? parseInt(currentNum.charAt(0) + "1", 10) * parseFloat(currentNum.substr(2)) : (parseFloat(currentNum) - num)) || 0, f:0, m:(color && color < 4) ? Math.round : _blobRound}; //limiting to 3 decimal places and casting as a string can really help performance when array.join() is called! 25989 //note: we don't set _prev because we'll never need to remove individual PropTweens from this list. 25990 } 25991 charIndex += currentNum.length; 25992 } 25993 s += end.substr(charIndex); 25994 if (s) { 25995 a.push(s); 25996 } 25997 a.setRatio = _setRatio; 25998 if (_relExp.test(end)) { //if the end string contains relative values, delete it so that on the final render (in _setRatio()), we don't actually set it to the string with += or -= characters (forces it to use the calculated value). 25999 a.end = null; 26000 } 26001 return a; 26002 }, 26003 //note: "funcParam" is only necessary for function-based getters/setters that require an extra parameter like getAttribute("width") and setAttribute("width", value). In this example, funcParam would be "width". Used by AttrPlugin for example. 26004 _addPropTween = function(target, prop, start, end, overwriteProp, mod, funcParam, stringFilter, index) { 26005 if (typeof(end) === "function") { 26006 end = end(index || 0, target); 26007 } 26008 var type = typeof(target[prop]), 26009 getterName = (type !== "function") ? "" : ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3)), 26010 s = (start !== "get") ? start : !getterName ? target[prop] : funcParam ? target[getterName](funcParam) : target[getterName](), 26011 isRelative = (typeof(end) === "string" && end.charAt(1) === "="), 26012 pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, m:(!mod ? 0 : (typeof(mod) === "function") ? mod : Math.round), pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0}, 26013 blob; 26014 26015 if (typeof(s) !== "number" || (typeof(end) !== "number" && !isRelative)) { 26016 if (funcParam || isNaN(s) || (!isRelative && isNaN(end)) || typeof(s) === "boolean" || typeof(end) === "boolean") { 26017 //a blob (string that has multiple numbers in it) 26018 pt.fp = funcParam; 26019 blob = _blobDif(s, (isRelative ? (parseFloat(pt.s) + pt.c) + (pt.s + "").replace(/[0-9\-\.]/g, "") : end), stringFilter || TweenLite.defaultStringFilter, pt); 26020 pt = {t: blob, p: "setRatio", s: 0, c: 1, f: 2, pg: 0, n: overwriteProp || prop, pr: 0, m: 0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example. 26021 } else { 26022 pt.s = parseFloat(s); 26023 if (!isRelative) { 26024 pt.c = (parseFloat(end) - pt.s) || 0; 26025 } 26026 } 26027 } 26028 if (pt.c) { //only add it to the linked list if there's a change. 26029 if ((pt._next = this._firstPT)) { 26030 pt._next._prev = pt; 26031 } 26032 this._firstPT = pt; 26033 return pt; 26034 } 26035 }, 26036 _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens, blobDif:_blobDif}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object. 26037 _plugins = TweenLite._plugins = {}, 26038 _tweenLookup = _internals.tweenLookup = {}, 26039 _tweenLookupNum = 0, 26040 _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUp
26040date:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1, callbackScope:1, stringFilter:1, id:1, yoyoEase:1, stagger:1}, 26041 _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0}, 26042 _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(), 26043 _rootTimeline = Animation._rootTimeline = new SimpleTimeline(), 26044 _nextGCFrame = 30, 26045 _lazyRender = _internals.lazyRender = function() { 26046 var l = _lazyTweens.length, 26047 i, tween; 26048 _lazyLookup = {}; 26049 for (i = 0; i < l; i++) { 26050 tween = _lazyTweens[i]; 26051 if (tween && tween._lazy !== false) { 26052 tween.render(tween._lazy[0], tween._lazy[1], true); 26053 tween._lazy = false; 26054 } 26055 } 26056 _lazyTweens.length = 0; 26057 }; 26058 26059 _rootTimeline._startTime = _ticker.time; 26060 _rootFramesTimeline._startTime = _ticker.frame; 26061 _rootTimeline._active = _rootFramesTimeline._active = true; 26062 setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick". 26063 26064 Animation._updateRoot = TweenLite.render = function() { 26065 var i, a, p; 26066 if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again. 26067 _lazyRender(); 26068 } 26069 _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false); 26070 _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false); 26071 if (_lazyTweens.length) { 26072 _lazyRender(); 26073 } 26074 if (_ticker.frame >= _nextGCFrame) { //dump garbage every 120 frames or whatever the user sets TweenLite.autoSleep to 26075 _nextGCFrame = _ticker.frame + (parseInt(TweenLite.autoSleep, 10) || 120); 26076 for (p in _tweenLookup) { 26077 a = _tweenLookup[p].tweens; 26078 i = a.length; 26079 while (--i > -1) { 26080 if (a[i]._gc) { 26081 a.splice(i, 1); 26082 } 26083 } 26084 if (a.length === 0) { 26085 delete _tweenLookup[p]; 26086 } 26087 } 26088 //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly 26089 p = _rootTimeline._first; 26090 if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) { 26091 while (p && p._paused) { 26092 p = p._next; 26093 } 26094 if (!p) { 26095 _ticker.sleep(); 26096 } 26097 } 26098 } 26099 }; 26100 26101 _ticker.addEventListener("tick", Animation._updateRoot); 26102 26103 var _register = function(target, tween, scrub) { 26104 var id = target._gsTweenID, a, i; 26105 if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) { 26106 _tweenLookup[id] = {target:target, tweens:[]}; 26107 } 26108 if (tween) { 26109 a = _tweenLookup[id].tweens; 26110 a[(i = a.length)] = tween; 26111 if (scrub) { 26112 while (--i > -1) { 26113 if (a[i] === tween) { 26114 a.splice(i, 1); 26115 } 26116 } 26117 } 26118 } 26119 return _tweenLookup[id].tweens; 26120 }, 26121 _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) { 26122 var func = overwrittenTween.vars.onOverwrite, r1, r2; 26123 if (func) { 26124 r1 = func(overwrittenTween, overwritingTween, target, killedProps); 26125 } 26126 func = TweenLite.onOverwrite; 26127 if (func) { 26128 r2 = func(overwrittenTween, overwritingTween, target, killedProps); 26129 } 26130 return (r1 !== false && r2 !== false); 26131 }, 26132 _applyOverwrite = function(target, tween, props, mode, siblings) { 26133 var i, changed, curTween, l; 26134 if (mode === 1 || mode >= 4) { 26135 l = siblings.length; 26136 for (i = 0; i < l; i++) { 26137 if ((curTween = siblings[i]) !== tween) { 26138 if (!curTween._gc) { 26139 if (curTween._kill(null, target, tween)) { 26140 changed = true; 26141 } 26142 } 26143 } else if (mode === 5) { 26144 break; 26145 } 26146 } 26147 return changed; 26148 } 26149 //NOTE: Add tiny amount to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example) 26150 var startTime = tween._startTime + _tinyNum, 26151 overlaps = [], 26152 oCount = 0, 26153 zeroDur = (tween._duration === 0), 26154 globalStart; 26155 i = siblings.length; 26156 while (--i > -1) { 26157 if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) { 26158 //ignore 26159 } else if (curTween._timeline !== tween._timeline) { 26160 globalStart = globalStart || _checkOverlap(tween, 0, zeroDur); 26161 if (_checkOverlap(curTween, globalStart, zeroDur) === 0) { 26162 overlaps[oCount++] = curTween; 26163 } 26164 } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= _tinyNum * 2)) { 26165 overlaps[oCount++] = curTween; 26166 } 26167 } 26168 26169 i = oCount; 26170 while (--i > -1) { 26171 curTween = overlaps[i]; 26172 l = curTween._firstPT; //we need to discern if there were property tweens originally; if they all get removed in the next line's _kill() call, the tween should be killed. See https://github.com/greensock/GreenSock-JS/issues/278 26173 if (mode === 2) if (curTween._kill(props, target, tween)) { 26174 changed = true; 26175 } 26176 if (mode !== 2 || (!curTween._firstPT && curTween._initted && l)) { 26177 if (mode !== 2 && !_onOverwrite(curTween, tween)) { 26178 continue; 26179 } 26180 if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween. 26181 changed = true; 26182 } 26183 } 26184 } 26185 return changed; 26186 }, 26187 _checkOverlap = function(tween, reference, zeroDur) { 26188 var tl = tween._timeline, 26189 ts = tl._timeScale, 26190 t = tween._startTime; 26191 while (tl._timeline) { 26192 t += tl._startTime; 26193 ts *= tl._timeScale; 26194 if (tl._paused) { 26195 return -100; 26196 } 26197 tl = tl._timeline; 26198 } 26199 t /= ts; 26200 return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum; 26201 }; 26202 26203 26204//---- TweenLite instance methods ----------------------------------------------------------------------------- 26205 26206 p._init = function() { 26207 var v = this.vars, 26208 op = this._overwrittenProps, 26209 dur = this._duration, 26210 immediate = !!v.immediateRender, 26211 ease = v.ease, 26212 startAt = this._startAt, 26213 i, initPlugins, pt, p, startVars, l; 26214 if (v.startAt) { 26215 if (startAt) { 26216 startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change. 26217 startAt.kill(); 26218 } 26219 startVars = {}; 26220 for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from); 26221 startVars[p] = v.startAt[p]; 26222 } 26223 startVars.data = "isStart"; 26224 startVars.overwrite = false;
26225 startVars.immediateRender = true; 26226 startVars.lazy = (immediate && v.lazy !== false); 26227 startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop). 26228 startVars.onUpdate = v.onUpdate; 26229 startVars.onUpdateParams = v.onUpdateParams; 26230 startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this; 26231 this._startAt = TweenLite.to(this.target || {}, 0, startVars); 26232 if (immediate) { 26233 if (this._time > 0) { 26234 this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()). 26235 } else if (dur !== 0) { 26236 return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting. 26237 } 26238 } 26239 } else if (v.runBackwards && dur !== 0) { 26240 //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards) 26241 if (startAt) { 26242 startAt.render(-1, true); 26243 startAt.kill(); 26244 this._startAt = null; 26245 } else { 26246 if (this._time !== 0) { //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0 26247 immediate = false; 26248 } 26249 pt = {}; 26250 for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through. 26251 if (!_reservedProps[p] || p === "autoCSS") { 26252 pt[p] = v[p]; 26253 } 26254 } 26255 pt.overwrite = 0; 26256 pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in. 26257 pt.lazy = (immediate && v.lazy !== false); 26258 pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after) 26259 this._startAt = TweenLite.to(this.target, 0, pt); 26260 if (!immediate) { 26261 this._startAt._init(); //ensures that the initial values are recorded 26262 this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween. 26263 if (this.vars.immediateRender) { 26264 this._startAt = null; 26265 } 26266 } else if (this._time === 0) { 26267 return; 26268 } 26269 } 26270 } 26271 this._ease = ease = (!ease) ? TweenLite.defaultEase : (ease instanceof Ease) ? ease : (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase; 26272 if (v.easeParams instanceof Array && ease.config) { 26273 this._ease = ease.config.apply(ease, v.easeParams); 26274 } 26275 this._easeType = this._ease._type; 26276 this._easePower = this._ease._power; 26277 this._firstPT = null; 26278 26279 if (this._targets) { 26280 l = this._targets.length; 26281 for (i = 0; i < l; i++) { 26282 if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null), i) ) { 26283 initPlugins = true; 26284 } 26285 } 26286 } else { 26287 initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op, 0); 26288 } 26289 26290 if (initPlugins) { 26291 TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite 26292 } 26293 if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live. 26294 this._enabled(false, false); 26295 } 26296 if (v.runBackwards) { 26297 pt = this._firstPT; 26298 while (pt) { 26299 pt.s += pt.c; 26300 pt.c = -pt.c; 26301 pt = pt._next; 26302 } 26303 } 26304 this._onUpdate = v.onUpdate; 26305 this._initted = true; 26306 }; 26307 26308 p._initProps = function(target, propLookup, siblings, overwrittenProps, index) { 26309 var p, i, initPlugins, plugin, pt, v; 26310 if (target == null) { 26311 return false;
26312 } 26313 if (_lazyLookup[target._gsTweenID]) { 26314 _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end) 26315 } 26316 26317 if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe. 26318 _autoCSS(this.vars, target); 26319 } 26320 for (p in this.vars) { 26321 v = this.vars[p]; 26322 if (_reservedProps[p]) { 26323 if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) { 26324 this.vars[p] = v = this._swapSelfInParams(v, this); 26325 } 26326 26327 } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this, index)) { 26328 26329 //t - target [object] 26330 //p - property [string] 26331 //s - start [number] 26332 //c - change [number] 26333 //f - isFunction [boolean] 26334 //n - name [string] 26335 //pg - isPlugin [boolean] 26336 //pr - priority [number] 26337 //m - mod [function | 0] 26338 this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:1, n:p, pg:1, pr:plugin._priority, m:0}; 26339 i = plugin._overwriteProps.length; 26340 while (--i > -1) { 26341 propLookup[plugin._overwriteProps[i]] = this._firstPT; 26342 } 26343 if (plugin._priority || plugin._onInitAllProps) { 26344 initPlugins = true; 26345 } 26346 if (plugin._onDisable || plugin._onEnable) { 26347 this._notifyPluginsOfEnabled = true; 26348 } 26349 if (pt._next) { 26350 pt._next._prev = pt; 26351 } 26352 26353 } else { 26354 propLookup[p] = _addPropTween.call(this, target, p, "get", v, p, 0, null, this.vars.stringFilter, index); 26355 } 26356 } 26357 26358 if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first) 26359 return this._initProps(target, propLookup, siblings, overwrittenProps, index); 26360 } 26361 if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) { 26362 this._kill(propLookup, target); 26363 return this._initProps(target, propLookup, siblings, overwrittenProps, index); 26364 } 26365 if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does. 26366 _lazyLookup[target._gsTweenID] = true; 26367 } 26368 return initPlugins; 26369 }; 26370 26371 p.render = function(time, suppressEvents, force) { 26372 var self = this, 26373 prevTime = self._time, 26374 duration = self._duration, 26375 prevRawPrevTime = self._rawPrevTime, 26376 isComplete, callback, pt, rawPrevTime; 26377 if (time >= duration - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 26378 self._totalTime = self._time = duration; 26379 self.ratio = self._ease._calcEnd ? self._ease.getRatio(1) : 1; 26380 if (!self._reversed ) { 26381 isComplete = true; 26382 callback = "onComplete"; 26383 force = (force || self._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 26384 } 26385 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 26386 if (self._startTime === self._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent roun
26386ding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate. 26387 time = 0; 26388 } 26389 if (prevRawPrevTime < 0 || (time <= 0 && time >= -_tinyNum) || (prevRawPrevTime === _tinyNum && self.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause. 26390 force = true; 26391 if (prevRawPrevTime > _tinyNum) { 26392 callback = "onReverseComplete"; 26393 } 26394 } 26395 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 26396 } 26397 26398 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 26399 self._totalTime = self._time = 0; 26400 self.ratio = self._ease._calcEnd ? self._ease.getRatio(0) : 0; 26401 if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) { 26402 callback = "onReverseComplete"; 26403 isComplete = self._reversed; 26404 } 26405 if (time > -_tinyNum) { 26406 time = 0; 26407 } else if (time < 0) { 26408 self._active = false; 26409 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 26410 if (prevRawPrevTime >= 0 && !(prevRawPrevTime === _tinyNum && self.data === "isPause")) { 26411 force = true; 26412 } 26413 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 26414 } 26415 } 26416 if (!self._initted || (self._startAt && self._startAt.progress())) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. Also, we check progress() because if startAt has already rendered at its end, we should force a render at its beginning. Otherwise, if you put the playhead directly on top of where a fromTo({immediateRender:false}) starts, and then move it backwards, the from() won't revert its values. 26417 force = true; 26418 } 26419 } else { 26420 self._totalTime = self._time = time; 26421 26422 if (self._easeType) { 26423 var r = time / duration, type = self._easeType, pow = self._easePower; 26424 if (type === 1 || (type === 3 && r >= 0.5)) { 26425 r = 1 - r; 26426 } 26427 if (type === 3) { 26428 r *= 2; 26429 } 26430 if (pow === 1) { 26431 r *= r; 26432 } else if (pow === 2) { 26433 r *= r * r; 26434 } else if (pow === 3) { 26435 r *= r * r * r; 26436 } else if (pow === 4) { 26437 r *= r * r * r * r; 26438 } 26439 self.ratio = (type === 1) ? 1 - r : (type === 2) ? r : (time / duration < 0.5) ? r / 2 : 1 - (r / 2); 26440 } else { 26441 self.ratio = self._ease.getRatio(time / duration); 26442 } 26443 } 26444 26445 if (self._time === prevTime && !force) { 26446 return; 26447 } else if (!self._initted) { 26448 self._init(); 26449 if (!self._initted || self._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that over
26449writing occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example. 26450 return; 26451 } else if (!force && self._firstPT && ((self.vars.lazy !== false && self._duration) || (self.vars.lazy && !self._duration))) { 26452 self._time = self._totalTime = prevTime; 26453 self._rawPrevTime = prevRawPrevTime; 26454 _lazyTweens.push(self); 26455 self._lazy = [time, suppressEvents]; 26456 return; 26457 } 26458 //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently. 26459 if (self._time && !isComplete) { 26460 self.ratio = self._ease.getRatio(self._time / duration); 26461 } else if (isComplete && self._ease._calcEnd) { 26462 self.ratio = self._ease.getRatio((self._time === 0) ? 0 : 1); 26463 } 26464 } 26465 if (self._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occurring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time. 26466 self._lazy = false; 26467 } 26468 if (!self._active) if (!self._paused && self._time !== prevTime && time >= 0) { 26469 self._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done. 26470 } 26471 if (prevTime === 0) { 26472 if (self._startAt) { 26473 if (time >= 0) { 26474 self._startAt.render(time, true, force); 26475 } else if (!callback) { 26476 callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area. 26477 } 26478 } 26479 if (self.vars.onStart) if (self._time !== 0 || duration === 0) if (!suppressEvents) { 26480 self._callback("onStart"); 26481 } 26482 } 26483 pt = self._firstPT; 26484 while (pt) { 26485 if (pt.f) { 26486 pt.t[pt.p](pt.c * self.ratio + pt.s); 26487 } else { 26488 pt.t[pt.p] = pt.c * self.ratio + pt.s; 26489 } 26490 pt = pt._next; 26491 } 26492 26493 if (self._onUpdate) { 26494 if (time < 0) if (self._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. 26495 self._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete. 26496 } 26497 if (!suppressEvents) if (self._time !== prevTime || isComplete || force) { 26498 self._callback("onUpdate"); 26499 } 26500 } 26501 if (callback) if (!self._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate 26502 if (time < 0 && self._startAt && !self._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values. 26503 self._startAt.render(time, true, force); 26504 } 26505 if (isComplete) { 26506 if (self._timeline.autoRemoveChildren) { 26507 self._enabled(false, false); 26508 } 26509 self._active = false;
26510 } 26511 if (!suppressEvents && self.vars[callback]) { 26512 self._callback(callback); 26513 } 26514 if (duration === 0 && self._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless. 26515 self._rawPrevTime = 0; 26516 } 26517 } 26518 }; 26519 26520 p._kill = function(vars, target, overwritingTween) { 26521 if (vars === "all") { 26522 vars = null; 26523 } 26524 if (vars == null) if (target == null || target === this.target) { 26525 this._lazy = false; 26526 return this._enabled(false, false); 26527 } 26528 target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target; 26529 var simultaneousOverwrite = (overwritingTween && this._time && overwritingTween._startTime === this._startTime && this._timeline === overwritingTween._timeline), 26530 firstPT = this._firstPT, 26531 i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed; 26532 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") { 26533 i = target.length; 26534 while (--i > -1) { 26535 if (this._kill(vars, target[i], overwritingTween)) { 26536 changed = true; 26537 } 26538 } 26539 } else { 26540 if (this._targets) { 26541 i = this._targets.length; 26542 while (--i > -1) { 26543 if (target === this._targets[i]) { 26544 propLookup = this._propLookup[i] || {}; 26545 this._overwrittenProps = this._overwrittenProps || []; 26546 overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all"; 26547 break; 26548 } 26549 } 26550 } else if (target !== this.target) { 26551 return false; 26552 } else { 26553 propLookup = this._propLookup; 26554 overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all"; 26555 } 26556 26557 if (propLookup) { 26558 killProps = vars || propLookup; 26559 record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin) 26560 if (overwritingTween && (TweenLite.onOverwrite || this.vars.onOverwrite)) { 26561 for (p in killProps) { 26562 if (propLookup[p]) { 26563 if (!killed) { 26564 killed = []; 26565 } 26566 killed.push(p); 26567 } 26568 } 26569 if ((killed || !vars) && !_onOverwrite(this, overwritingTween, target, killed)) { //if the onOverwrite returned false, that means the user wants to override the overwriting (cancel it). 26570 return false; 26571 } 26572 } 26573 26574 for (p in killProps) { 26575 if ((pt = propLookup[p])) { 26576 if (simultaneousOverwrite) { //if another tween overwrites this one and they both start at exactly the same time, yet this tween has already rendered once (for example, at 0.001) because it's first in the queue, we should revert the values to where they were at 0 so that the starting values aren't contaminated on the overwriting tween. 26577 if (pt.f) { 26578 pt.t[pt.p](pt.s); 26579 } else { 26580 pt.t[pt.p] = pt.s; 26581 } 26582 changed = true; 26583 } 26584 if (pt.pg && pt.t._kill(killProps)) { 26585 changed = true; //some plugins need to be notified so they can perform cleanup tasks first 26586 } 26587 if (!pt.pg || pt.t._overwriteProps.length === 0) { 26588 if (pt._prev) { 26589 pt._prev._next = pt._next; 26590 } else if (pt === this._firstPT) { 26591 this._firstPT = pt._next; 26592 } 26593 if (pt._next) { 26594 pt._next._prev = pt._prev; 26595 } 26596 pt._next = pt._prev = null; 26597 } 26598 delete propLookup[p]; 26599 } 26600 if (record) { 26601 overwrittenProps[p] = 1; 26602 } 26603 } 26604 if (!this._firstPT && this._initted && firstPT) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening. 26605 this._enabled(false, false); 26606 } 26607 } 26608 } 26609 return changed; 26610 }; 26611 26612 p.invalidate = function() { 26613 if (this._notifyPluginsOfEnabled) { 26614 TweenLite._onPluginEvent("_onDisable", this); 26615 } 26616 var t = this._time; 26617 this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null; 26618 this._notifyPluginsOfEnabled = this._active = this._lazy = false;
26619 this._propLookup = (this._targets) ? {} : []; 26620 Animation.prototype.invalidate.call(this); 26621 if (this.vars.immediateRender) { 26622 this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) 26623 this.render(t, false, this.vars.lazy !== false); 26624 } 26625 return this; 26626 }; 26627 26628 p._enabled = function(enabled, ignoreTimeline) { 26629 if (!_tickerActive) { 26630 _ticker.wake(); 26631 } 26632 if (enabled && this._gc) { 26633 var targets = this._targets, 26634 i; 26635 if (targets) { 26636 i = targets.length; 26637 while (--i > -1) { 26638 this._siblings[i] = _register(targets[i], this, true); 26639 } 26640 } else { 26641 this._siblings = _register(this.target, this, true); 26642 } 26643 } 26644 Animation.prototype._enabled.call(this, enabled, ignoreTimeline); 26645 if (this._notifyPluginsOfEnabled) if (this._firstPT) { 26646 return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this); 26647 } 26648 return false; 26649 }; 26650 26651 26652//----TweenLite static methods ----------------------------------------------------- 26653 26654 TweenLite.to = function(target, duration, vars) { 26655 return new TweenLite(target, duration, vars); 26656 }; 26657 26658 TweenLite.from = function(target, duration, vars) { 26659 vars.runBackwards = true; 26660 vars.immediateRender = (vars.immediateRender != false); 26661 return new TweenLite(target, duration, vars); 26662 }; 26663 26664 TweenLite.fromTo = function(target, duration, fromVars, toVars) { 26665 toVars.startAt = fromVars; 26666 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 26667 return new TweenLite(target, duration, toVars); 26668 }; 26669 26670 TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) { 26671 return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, lazy:false, useFrames:useFrames, overwrite:0}); 26672 }; 26673 26674 TweenLite.set = function(target, vars) { 26675 return new TweenLite(target, 0, vars); 26676 }; 26677 26678 TweenLite.getTweensOf = function(target, onlyActive) { 26679 if (target == null) { return []; } 26680 target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target; 26681 var i, a, j, t; 26682 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") { 26683 i = target.length; 26684 a = []; 26685 while (--i > -1) { 26686 a = a.concat(TweenLite.getTweensOf(target[i], onlyActive)); 26687 } 26688 i = a.length; 26689 //now get rid of any duplicates (tweens of arrays of objects could cause duplicates) 26690 while (--i > -1) { 26691 t = a[i]; 26692 j = i; 26693 while (--j > -1) { 26694 if (t === a[j]) { 26695 a.splice(i, 1); 26696 } 26697 } 26698 } 26699 } else if (target._gsTweenID) { 26700 a = _register(target).concat(); 26701 i = a.length; 26702 while (--i > -1) { 26703 if (a[i]._gc || (onlyActive && !a[i].isActive())) { 26704 a.splice(i, 1); 26705 } 26706 } 26707 } 26708 return a || []; 26709 }; 26710 26711 TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) { 26712 if (typeof(onlyActive) === "object") { 26713 vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted) 26714 onlyActive = false; 26715 } 26716 var a = TweenLite.getTweensOf(target, onlyActive), 26717 i = a.length; 26718 while (--i > -1) { 26719 a[i]._kill(vars, target); 26720 } 26721 }; 26722 26723 26724 26725/* 26726 * ---------------------------------------------------------------- 26727 * TweenPlugin (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another script call before loading plugins which is easy to forget) 26728 * ---------------------------------------------------------------- 26729 */ 26730 var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) { 26731 this._overwriteProps = (props || "").split(","); 26732 this._propName = this._overwriteProps[0]; 26733 this._priority = priority || 0; 26734 this._super = TweenPlugin.prototype; 26735 }, true); 26736 26737 p = TweenPlugin.prototype; 26738 TweenPlugin.version = "1.19.0"; 26739 TweenPlugin.API = 2; 26740 p._firstPT = null; 26741 p._addTween = _addPropTween; 26742 p.setRatio = _setRatio; 26743 26744 p._kill = function(lookup) { 26745 var a = this._overwriteProps, 26746 pt = this._firstPT, 26747 i; 26748 if (lookup[this._propName] != null) { 26749 this._overwriteProps = []; 26750 } else { 26751 i = a.length; 26752 while (--i > -1) { 26753 if (lookup[a[i]] != null) { 26754 a.splice(i, 1); 26755 } 26756 } 26757 } 26758 while (pt) { 26759 if (lookup[pt.n] != null) { 26760 if (pt._next) { 26761 pt._next._prev = pt._prev; 26762 } 26763 if (pt._prev) { 26764 pt._prev._next = pt._next; 26765 pt._prev = null; 26766 } else if (this._firstPT === pt) { 26767 this._firstPT = pt._next; 26768 } 26769 } 26770 pt = pt._next; 26771 } 26772 return false;
26773 }; 26774 26775 p._mod = p._roundProps = function(lookup) { 26776 var pt = this._firstPT, 26777 val; 26778 while (pt) { 26779 val = lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ]); 26780 if (val && typeof(val) === "function") { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here. 26781 if (pt.f === 2) { 26782 pt.t._applyPT.m = val; 26783 } else { 26784 pt.m = val; 26785 } 26786 } 26787 pt = pt._next; 26788 } 26789 }; 26790 26791 TweenLite._onPluginEvent = function(type, tween) { 26792 var pt = tween._firstPT, 26793 changed, pt2, first, last, next; 26794 if (type === "_onInitAllProps") { 26795 //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame. 26796 while (pt) { 26797 next = pt._next; 26798 pt2 = first; 26799 while (pt2 && pt2.pr > pt.pr) { 26800 pt2 = pt2._next; 26801 } 26802 if ((pt._prev = pt2 ? pt2._prev : last)) { 26803 pt._prev._next = pt; 26804 } else { 26805 first = pt; 26806 } 26807 if ((pt._next = pt2)) { 26808 pt2._prev = pt; 26809 } else { 26810 last = pt; 26811 } 26812 pt = next; 26813 } 26814 pt = tween._firstPT = first; 26815 } 26816 while (pt) { 26817 if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) { 26818 changed = true; 26819 } 26820 pt = pt._next; 26821 } 26822 return changed; 26823 }; 26824 26825 TweenPlugin.activate = function(plugins) { 26826 var i = plugins.length; 26827 while (--i > -1) { 26828 if (plugins[i].API === TweenPlugin.API) { 26829 _plugins[(new plugins[i]())._propName] = plugins[i]; 26830 } 26831 } 26832 return true; 26833 }; 26834 26835 //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations. 26836 _gsDefine.plugin = function(config) { 26837 if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; } 26838 var propName = config.propName, 26839 priority = config.priority || 0, 26840 overwriteProps = config.overwriteProps, 26841 map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_mod", mod:"_mod", initAll:"_onInitAllProps"}, 26842 Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin", 26843 function() { 26844 TweenPlugin.call(this, propName, priority); 26845 this._overwriteProps = overwriteProps || []; 26846 }, (config.global === true)), 26847 p = Plugin.prototype = new TweenPlugin(propName), 26848 prop; 26849 p.constructor = Plugin; 26850 Plugin.API = config.API; 26851 for (prop in map) { 26852 if (typeof(config[prop]) === "function") { 26853 p[map[prop]] = config[prop]; 26854 } 26855 } 26856 Plugin.version = config.version; 26857 TweenPlugin.activate([Plugin]); 26858 return Plugin; 26859 }; 26860 26861 26862 //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you. 26863 a = window._gsQueue; 26864 if (a) { 26865 for (i = 0; i < a.length; i++) { 26866 a[i](); 26867 } 26868 for (p in _defLookup) { 26869 if (!_defLookup[p].func) { 26870 window.console.log("GSAP encountered missing dependency: " + p); 26871 } 26872 } 26873 } 26874 26875 _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated 26876 26877})((typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window, "TweenLite"); 26878/*! 26879 * VERSION: 2.1.2 26880 * DATE: 2019-03-01 26881 * UPDATES AND DOCS AT: http://greensock.com 26882 * 26883 * Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin 26884 * 26885 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 26886 * This work is subject to the terms at http://greensock.com/standard-license or for
26887 * Club GreenSock members, the software agreement that was issued with your membership. 26888 * 26889 * @author: Jack Doyle, [email protected] 26890 **/ 26891/* eslint-disable */ 26892var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node 26893(_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() { 26894 26895 "use strict"; 26896 26897 _gsScope._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) { 26898 26899 var _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 26900 var b = [], 26901 l = a.length, 26902 i; 26903 for (i = 0; i !== l; b.push(a[i++])); 26904 return b; 26905 }, 26906 _applyCycle = function(vars, targets, i) { 26907 var alt = vars.cycle, 26908 p, val; 26909 for (p in alt) { 26910 val = alt[p]; 26911 vars[p] = (typeof(val) === "function") ? val(i, targets[i], targets) : val[i % val.length]; 26912 } 26913 delete vars.cycle; 26914 }, 26915 //for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following 26916 _distribute = function(v) { 26917 if (typeof(v) === "function") { 26918 return v; 26919 } 26920 var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all. 26921 ease = vars.ease, 26922 from = vars.from || 0, 26923 base = vars.base || 0, 26924 cache = {}, 26925 isFromKeyword = isNaN(from), 26926 axis = vars.axis, 26927 ratio = {center:0.5, end:1}[from] || 0; 26928 return function(i, target, a) { 26929 var l = (a || vars).length, 26930 distances = cache[l], 26931 originX, originY, x, y, d, j, max, min, wrap; 26932 if (!distances) { 26933 wrap = (vars.grid === "auto") ? 0 : (vars.grid || [Infinity])[0]; 26934 if (!wrap) { 26935 max = -Infinity; 26936 while (max < (max = a[wrap++].getBoundingClientRect().left) && wrap < l) { } 26937 wrap--; 26938 } 26939 distances = cache[l] = []; 26940 originX = isFromKeyword ? (Math.min(wrap, l) * ratio) - 0.5 : from % wrap; 26941 originY = isFromKeyword ? l * ratio / wrap - 0.5 : (from / wrap) | 0; 26942 max = 0; 26943 min = Infinity; 26944 for (j = 0; j < l; j++) { 26945 x = (j % wrap) - originX; 26946 y = originY - ((j / wrap) | 0); 26947 distances[j] = d = !axis ? Math.sqrt(x * x + y * y) : Math.abs((axis === "y") ? y : x); 26948 if (d > max) { 26949 max = d; 26950 } 26951 if (d < min) { 26952 min = d; 26953 } 26954 } 26955 distances.max = max - min; 26956 distances.min = min; 26957 distances.v = l = vars.amount || (vars.each * (wrap > l ? l : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0; 26958 distances.b = (l < 0) ? base - l : base; 26959 } 26960 l = (distances[i] - distances.min) / distances.max; 26961 return distances.b + (ease ? ease.getRatio(l) : l) * distances.v; 26962 }; 26963 }, 26964 TweenMax = function(target, duration, vars) { 26965 TweenLite.call(this, target, duration, vars); 26966 this._cycle = 0; 26967 this._yoyo = (this.vars.yoyo === true || !!this.vars.yoyoEase); 26968 this._repeat = this.vars.repeat || 0; 26969 this._repeatDelay = this.vars.repeatDelay || 0; 26970 if (this._repeat) { 26971 this._uncache(true); //ensures that if there is any repeat, the totalDuration will get recalculated to accurately report it. 26972 } 26973 this.render = TweenMax.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method) 26974 }, 26975 _tinyNum = 0.00000001, 26976 TweenLiteInternals = TweenLite._internals, 26977 _isSelector = TweenLiteInternals.isSelector, 26978 _isArray = TweenLiteInternals.isArray, 26979 p = TweenMax.prototype = TweenLite.to({}, 0.1, {}), 26980 _blankArray = []; 26981 26982 TweenMax.version = "2.1.2"; 26983 p.constructor = TweenMax; 26984 p.kill()._gc = false;
26985 TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf; 26986 TweenMax.getTweensOf = TweenLite.getTweensOf; 26987 TweenMax.lagSmoothing = TweenLite.lagSmoothing; 26988 TweenMax.ticker = TweenLite.ticker; 26989 TweenMax.render = TweenLite.render; 26990 TweenMax.distribute = _distribute; 26991 26992 p.invalidate = function() { 26993 this._yoyo = (this.vars.yoyo === true || !!this.vars.yoyoEase); 26994 this._repeat = this.vars.repeat || 0; 26995 this._repeatDelay = this.vars.repeatDelay || 0; 26996 this._yoyoEase = null; 26997 this._uncache(true); 26998 return TweenLite.prototype.invalidate.call(this); 26999 }; 27000 27001 p.updateTo = function(vars, resetDuration) { 27002 var self = this, 27003 curRatio = self.ratio, 27004 immediate = self.vars.immediateRender || vars.immediateRender, 27005 p; 27006 if (resetDuration && self._startTime < self._timeline._time) { 27007 self._startTime = self._timeline._time; 27008 self._uncache(false); 27009 if (self._gc) { 27010 self._enabled(true, false); 27011 } else { 27012 self._timeline.insert(self, self._startTime - self._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct. 27013 } 27014 } 27015 for (p in vars) { 27016 self.vars[p] = vars[p]; 27017 } 27018 if (self._initted || immediate) { 27019 if (resetDuration) { 27020 self._initted = false; 27021 if (immediate) { 27022 self.render(0, true, true); 27023 } 27024 } else { 27025 if (self._gc) { 27026 self._enabled(true, false); 27027 } 27028 if (self._notifyPluginsOfEnabled && self._firstPT) { 27029 TweenLite._onPluginEvent("_onDisable", self); //in case a plugin like MotionBlur must perform some cleanup tasks 27030 } 27031 if (self._time / self._duration > 0.998) { //if the tween has finished (or come extremely close to finishing), we just need to rewind it to 0 and then render it again at the end which forces it to re-initialize (parsing the new vars). We allow tweens that are close to finishing (but haven't quite finished) to work this way too because otherwise, the values are so small when determining where to project the starting values that binary math issues creep in and can make the tween appear to render incorrectly when run backwards. 27032 var prevTime = self._totalTime; 27033 self.render(0, true, false); 27034 self._initted = false; 27035 self.render(prevTime, true, false); 27036 } else { 27037 self._initted = false; 27038 self._init(); 27039 if (self._time > 0 || immediate) { 27040 var inv = 1 / (1 - curRatio), 27041 pt = self._firstPT, endValue; 27042 while (pt) { 27043 endValue = pt.s + pt.c; 27044 pt.c *= inv; 27045 pt.s = endValue - pt.c; 27046 pt = pt._next; 27047 } 27048 } 27049 } 27050 } 27051 } 27052 return self; 27053 }; 27054 27055 p.render = function(time, suppressEvents, force) { 27056 if (!this._initted) if (this._duration === 0 && this.vars.repeat) { //zero duration tweens that render immediately have render() called from TweenLite's constructor, before TweenMax's constructor has finished setting _repeat, _repeatDelay, and _yoyo which are critical in determining totalDuration() so we need to call invalidate() which is a low-kb way to get those set properly. 27057 this.invalidate(); 27058 } 27059 var self = this, 27060 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 27061 prevTime = self._time, 27062 prevTotalTime = self._totalTime, 27063 prevCycle = self._cycle, 27064 duration = self._duration, 27065 prevRawPrevTime = self._rawPrevTime, 27066 isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime, yoyoEase; 27067 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 27068 self._totalTime = totalDur; 27069 self._cycle = self._repeat; 27070 if (self._yoyo && (self._cycle & 1) !== 0) { 27071 self._time = 0; 27072 self.ratio = self._ease._calcEnd ? self._ease.getRatio(0) : 0; 27073 } else { 27074 self._time = duration; 27075 self.ratio = self._ease._calcEnd ? self._ease.getRatio(1) : 1; 27076 } 27077 if (!self._reversed) { 27078 isComplete = true; 27079 callback = "onComplete"; 27080 force = (force || self._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 27081 } 27082 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 27083 if (self._startTime === self._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent roun
27083ding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate. 27084 time = 0; 27085 } 27086 if (prevRawPrevTime < 0 || (time <= 0 && time >= -_tinyNum) || (prevRawPrevTime === _tinyNum && self.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause. 27087 force = true; 27088 if (prevRawPrevTime > _tinyNum) { 27089 callback = "onReverseComplete"; 27090 } 27091 } 27092 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 27093 } 27094 27095 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 27096 self._totalTime = self._time = self._cycle = 0; 27097 self.ratio = self._ease._calcEnd ? self._ease.getRatio(0) : 0; 27098 if (prevTotalTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) { 27099 callback = "onReverseComplete"; 27100 isComplete = self._reversed; 27101 } 27102 if (time > -_tinyNum) { 27103 time = 0; 27104 } else if (time < 0) { 27105 self._active = false; 27106 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 27107 if (prevRawPrevTime >= 0) { 27108 force = true; 27109 } 27110 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 27111 } 27112 } 27113 if (!self._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. 27114 force = true; 27115 } 27116 } else { 27117 self._totalTime = self._time = time; 27118 if (self._repeat !== 0) { 27119 cycleDuration = duration + self._repeatDelay; 27120 self._cycle = (self._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!) 27121 if (self._cycle !== 0) if (self._cycle === self._totalTime / cycleDuration && prevTotalTime <= time) { 27122 self._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning) 27123 } 27124 self._time = self._totalTime - (self._cycle * cycleDuration); 27125 if (self._yoyo) if ((self._cycle & 1) !== 0) { 27126 self._time = duration - self._time; 27127 yoyoEase = self._yoyoEase || self.vars.yoyoEase; //note: we don't set this._yoyoEase in _init() like we do other properties because it's TweenMax-specific and doing it here allows us to optimize performance (most tweens don't have a yoyoEase). Note that we also must skip the this.ratio calculation further down right after we _init() in this function, because we're doing it here. 27128 if (yoyoEase) { 27129 if (!self._yoyoEase) { 27130 if (yoyoEase === true && !self._initted) { //if it's not initted and yoyoEase is true, this._ease won't have been populated yet so we must discern it here. 27131 yoyoEase = self.vars.ease; 27132 self._yoyoEase = yoyoEase = !yoyoEase ? TweenLite.defaultEase : (yoyoEase instanceof Ease) ? yoyoEase : (typeof(yoyoEase) === "function") ? new Ease(yoyoEase, self.vars.easeParams) : Ease.map[yoyoEase] || TweenLite.defaultEase; 27133 } else { 27134 self._yoyoEase = yoyoEase = (yoyoEase === true) ? self._ease : (yoyoEase instanceof Ease) ? yoyoEase : Ease.map[yoyoEase]; 27135 } 27136 } 27137 self.ratio = yoyoEase ? 1 - yoyoEase.getRatio((duration - self._time) / duration) : 0; 27138 } 27139 } 27140 if (self._time > duration) { 27141 self._time = duration; 27142 } else if (self._time < 0) { 27143 self._time = 0; 27144 } 27145 } 27146 if (self._easeType && !yoyoEase) { 27147 r = self._time / duration; 27148 type = self._easeType; 27149 pow = self._easePower; 27150 if (type === 1 || (type === 3 && r >= 0.5)) { 27151 r = 1 - r; 27152 } 27153 if (type === 3) { 27154 r *= 2; 27155 } 27156 if (pow === 1) { 27157 r *= r; 27158 } else if (pow === 2) { 27159 r *= r * r; 27160 } else if (pow === 3) { 27161 r *= r * r * r; 27162 } else if (pow === 4) { 27163 r *= r * r * r * r; 27164 } 27165 self.ratio = (type === 1) ? 1 - r : (type === 2) ? r : (self._time / duration < 0.5) ? r / 2 : 1 - (r / 2); 27166 27167 } else if (!yoyoEase) { 27168 self.ratio = self._ease.getRatio(self._time / duration); 27169 } 27170 27171 } 27172 27173 if (prevTime === self._time && !force && prevCycle === self._cycle) { 27174 if (prevTotalTime !== self._totalTime) if (self._onUpdate) if (!suppressEvents) { //so that onUp
27174date fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate. 27175 self._callback("onUpdate"); 27176 } 27177 return; 27178 } else if (!self._initted) { 27179 self._init(); 27180 if (!self._initted || self._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example. 27181 return; 27182 } else if (!force && self._firstPT && ((self.vars.lazy !== false && self._duration) || (self.vars.lazy && !self._duration))) { //we stick it in the queue for rendering at the very end of the tick - this is a performance optimization because browsers invalidate styles and force a recalculation if you read, write, and then read style data (so it's better to read/read/read/write/write/write than read/write/read/write/read/write). The down side, of course, is that usually you WANT things to render immediately because you may have code running right after that which depends on the change. Like imagine running TweenLite.set(...) and then immediately after that, creating a nother tween that animates the same property to another value; the starting values of that 2nd tween wouldn't be accurate if lazy is true. 27183 self._time = prevTime; 27184 self._totalTime = prevTotalTime; 27185 self._rawPrevTime = prevRawPrevTime; 27186 self._cycle = prevCycle; 27187 TweenLiteInternals.lazyTweens.push(self); 27188 self._lazy = [time, suppressEvents]; 27189 return; 27190 } 27191 //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently. 27192 if (self._time && !isComplete && !yoyoEase) { 27193 self.ratio = self._ease.getRatio(self._time / duration); 27194 } else if (isComplete && this._ease._calcEnd && !yoyoEase) { 27195 self.ratio = self._ease.getRatio((self._time === 0) ? 0 : 1); 27196 } 27197 } 27198 if (self._lazy !== false) { 27199 self._lazy = false; 27200 } 27201 27202 if (!self._active) if (!self._paused && self._time !== prevTime && time >= 0) { 27203 self._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done. 27204 } 27205 if (prevTotalTime === 0) { 27206 if (self._initted === 2 && time > 0) { 27207 self._init(); //will just apply overwriting since _initted of (2) means it was a from() tween that had immediateRender:true 27208 } 27209 if (self._startAt) { 27210 if (time >= 0) { 27211 self._startAt.render(time, true, force); 27212 } else if (!callback) { 27213 callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area. 27214 } 27215 } 27216 if (self.vars.onStart) if (self._totalTime !== 0 || duration === 0) if (!suppressEvents) { 27217 self._callback("onStart"); 27218 } 27219 } 27220 27221 pt = self._firstPT; 27222 while (pt) { 27223 if (pt.f) { 27224 pt.t[pt.p](pt.c * self.ratio + pt.s); 27225 } else { 27226 pt.t[pt.p] = pt.c * self.ratio + pt.s; 27227 } 27228 pt = pt._next; 27229 } 27230 27231 if (self._onUpdate) { 27232 if (time < 0) if (self._startAt && self._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. 27233 self._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete. 27234 } 27235 if (!suppressEvents) if (self._totalTime !== prevTotalTime || callback) {
27236 self._callback("onUpdate"); 27237 } 27238 } 27239 if (self._cycle !== prevCycle) if (!suppressEvents) if (!self._gc) if (self.vars.onRepeat) { 27240 self._callback("onRepeat"); 27241 } 27242 if (callback) if (!self._gc || force) { //check gc because there's a chance that kill() could be called in an onUpdate 27243 if (time < 0 && self._startAt && !self._onUpdate && self._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. 27244 self._startAt.render(time, true, force); 27245 } 27246 if (isComplete) { 27247 if (self._timeline.autoRemoveChildren) { 27248 self._enabled(false, false); 27249 } 27250 self._active = false; 27251 } 27252 if (!suppressEvents && self.vars[callback]) { 27253 self._callback(callback); 27254 } 27255 if (duration === 0 && self._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon sce
27255nario, but possible nonetheless. 27256 self._rawPrevTime = 0; 27257 } 27258 } 27259 }; 27260 27261//---- STATIC FUNCTIONS ----------------------------------------------------------------------------------------------------------- 27262 27263 TweenMax.to = function(target, duration, vars) { 27264 return new TweenMax(target, duration, vars); 27265 }; 27266 27267 TweenMax.from = function(target, duration, vars) { 27268 vars.runBackwards = true; 27269 vars.immediateRender = (vars.immediateRender != false); 27270 return new TweenMax(target, duration, vars); 27271 }; 27272 27273 TweenMax.fromTo = function(target, duration, fromVars, toVars) { 27274 toVars.startAt = fromVars; 27275 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 27276 return new TweenMax(target, duration, toVars); 27277 }; 27278 27279 TweenMax.staggerTo = TweenMax.allTo = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 27280 var a = [], 27281 staggerFunc = _distribute(vars.stagger || stagger), 27282 cycle = vars.cycle, 27283 fromCycle = (vars.startAt || _blankArray).cycle, 27284 l, copy, i, p; 27285 if (!_isArray(targets)) { 27286 if (typeof(targets) === "string") { 27287 targets = TweenLite.selector(targets) || targets; 27288 } 27289 if (_isSelector(targets)) { 27290 targets = _slice(targets); 27291 } 27292 } 27293 targets = targets || []; 27294 l = targets.length - 1; 27295 for (i = 0; i <= l; i++) { 27296 copy = {}; 27297 for (p in vars) { 27298 copy[p] = vars[p]; 27299 } 27300 if (cycle) { 27301 _applyCycle(copy, targets, i); 27302 if (copy.duration != null) { 27303 duration = copy.duration; 27304 delete copy.duration; 27305 } 27306 } 27307 if (fromCycle) { 27308 fromCycle = copy.startAt = {}; 27309 for (p in vars.startAt) { 27310 fromCycle[p] = vars.startAt[p]; 27311 } 27312 _applyCycle(copy.startAt, targets, i); 27313 } 27314 copy.delay = staggerFunc(i, targets[i], targets) + (copy.delay || 0); 27315 if (i === l && onCompleteAll) { 27316 copy.onComplete = function() { 27317 if (vars.onComplete) { 27318 vars.onComplete.apply(vars.onCompleteScope || this, arguments); 27319 } 27320 onCompleteAll.apply(onCompleteAllScope || vars.callbackScope || this, onCompleteAllParams || _blankArray); 27321 }; 27322 } 27323 a[i] = new TweenMax(targets[i], duration, copy); 27324 } 27325 return a; 27326 }; 27327 27328 TweenMax.staggerFrom = TweenMax.allFrom = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 27329 vars.runBackwards = true; 27330 vars.immediateRender = (vars.immediateRender != false); 27331 return TweenMax.staggerTo(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 27332 }; 27333 27334 TweenMax.staggerFromTo = TweenMax.allFromTo = function(targets, duration, fromVars, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 27335 toVars.startAt = fromVars; 27336 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 27337 return TweenMax.staggerTo(targets, duration, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 27338 }; 27339 27340 TweenMax.delayedCall = function(delay, callback, params, scope, useFrames) { 27341 return new TweenMax(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, useFrames:useFrames, overwrite:0}); 27342 }; 27343 27344 TweenMax.set = function(target, vars) { 27345 return new TweenMax(target, 0, vars); 27346 }; 27347 27348 TweenMax.isTweening = function(target) { 27349 return (TweenLite.getTweensOf(target, true).length > 0); 27350 }; 27351 27352 var _getChildrenOf = function(timeline, includeTimelines) { 27353 var a = [], 27354 cnt = 0, 27355 tween = timeline._first; 27356 while (tween) { 27357 if (tween instanceof TweenLite) { 27358 a[cnt++] = tween; 27359 } else { 27360 if (includeTimelines) { 27361 a[cnt++] = tween; 27362 } 27363 a = a.concat(_getChildrenOf(tween, includeTimelines)); 27364 cnt = a.length; 27365 } 27366 tween = tween._next; 27367 } 27368 return a; 27369 }, 27370 getAllTweens = TweenMax.getAllTweens = function(includeTimelines) { 27371 return _getChildrenOf(Animation._rootTimeline, includeTimelines).concat( _getChildrenOf(Animation._rootFramesTimeline, includeTimelines) ); 27372 }; 27373 27374 TweenMax.killAll = function(complete, tweens, delayedCalls, timelines) { 27375 if (tweens == null) { 27376 tweens = true; 27377 } 27378 if (delayedCalls == null) { 27379 delayedCalls = true; 27380 } 27381 var a = getAllTweens((timelines != false)), 27382 l = a.length, 27383 allTrue = (tweens && delayedCalls && timelines), 27384 isDC, tween, i; 27385 for (i = 0; i < l; i++) { 27386 tween = a[i]; 27387 if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) { 27388 if (complete) { 27389 tween.totalTime(tween._reversed ? 0 : tween.totalDuration()); 27390 } else { 27391 tween._enabled(false, false); 27392 } 27393 } 27394 } 27395 }; 27396 27397 TweenMax.killChildTweensOf = function(parent, complete) { 27398 if (parent == null) { 27399 return; 27400 } 27401 var tl = TweenLiteInternals.tweenLookup, 27402 a, curParent, p, i, l; 27403 if (typeof(parent) === "string") { 27404 parent = TweenLite.selector(parent) || parent; 27405 } 27406 if (_isSelector(parent)) { 27407 parent = _slice(parent); 27408 } 27409 if (_isArray(parent)) { 27410 i = parent.length; 27411 while (--i > -1) { 27412 TweenMax.killChildTweensOf(parent[i], complete); 27413 } 27414 return; 27415 } 27416 a = []; 27417 for (p in tl) { 27418 curParent = tl[p].target.parentNode; 27419 while (curParent) { 27420 if (curParent === parent) { 27421 a = a.concat(tl[p].tweens); 27422 } 27423 curParent = curParent.parentNode; 27424 } 27425 } 27426 l = a.length; 27427 for (i = 0; i < l; i++) { 27428 if (complete) { 27429 a[i].totalTime(a[i].totalDuration()); 27430 } 27431 a[i]._enabled(false, false); 27432 } 27433 }; 27434 27435 var _changePause = function(pause, tweens, delayedCalls, timelines) { 27436 tweens = (tweens !== false); 27437 delayedCalls = (delayedCalls !== false); 27438 timelines = (timelines !== false); 27439 var a = getAllTweens(timelines), 27440 allTrue = (tweens && delayedCalls && timelines), 27441 i = a.length, 27442 isDC, tween; 27443 while (--i > -1) { 27444 tween = a[i]; 27445 if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) { 27446 tween.paused(pause); 27447 } 27448 } 27449 }; 27450 27451 TweenMax.pauseAll = function(tweens, delayedCalls, timelines) { 27452 _changePause(true, tweens, delayedCalls, timelines); 27453 }; 27454
27455 TweenMax.resumeAll = function(tweens, delayedCalls, timelines) { 27456 _changePause(false, tweens, delayedCalls, timelines); 27457 }; 27458 27459 TweenMax.globalTimeScale = function(value) { 27460 var tl = Animation._rootTimeline, 27461 t = TweenLite.ticker.time; 27462 if (!arguments.length) { 27463 return tl._timeScale; 27464 } 27465 value = value || _tinyNum; //can't allow zero because it'll throw the math off 27466 tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value); 27467 tl = Animation._rootFramesTimeline; 27468 t = TweenLite.ticker.frame; 27469 tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value); 27470 tl._timeScale = Animation._rootTimeline._timeScale = value; 27471 return value; 27472 }; 27473 27474 27475//---- GETTERS / SETTERS ---------------------------------------------------------------------------------------------------------- 27476 27477 p.progress = function(value, suppressEvents) { 27478 return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents); 27479 }; 27480 27481 p.totalProgress = function(value, suppressEvents) { 27482 return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, suppressEvents); 27483 }; 27484 27485 p.time = function(value, suppressEvents) { 27486 if (!arguments.length) { 27487 return this._time; 27488 } 27489 if (this._dirty) { 27490 this.totalDuration(); 27491 } 27492 var duration = this._duration, 27493 cycle = this._cycle, 27494 cycleDur = cycle * (duration + this._repeatDelay); 27495 if (value > duration) { 27496 value = duration; 27497 } 27498 return this.totalTime((this._yoyo && (cycle & 1)) ? duration - value + cycleDur : this._repeat ? value + cycleDur : value, suppressEvents); 27499 }; 27500 27501 p.duration = function(value) { 27502 if (!arguments.length) { 27503 return this._duration; //don't set _dirty = false because there could be repeats that haven't been factored into the _totalDuration yet. Otherwise, if you create a repeated TweenMax and then immediately check its duration(), it would cache the value and the totalDuration would not be correct, thus repeats wouldn't take effect. 27504 } 27505 return Animation.prototype.duration.call(this, value); 27506 }; 27507 27508 p.totalDuration = function(value) { 27509 if (!arguments.length) { 27510 if (this._dirty) { 27511 //instead of Infinity, we use 999999999999 so that we can accommodate reverses 27512 this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat); 27513 this._dirty = false; 27514 } 27515 return this._totalDuration; 27516 } 27517 return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) ); 27518 }; 27519 27520 p.repeat = function(value) { 27521 if (!arguments.length) { 27522 return this._repeat; 27523 } 27524 this._repeat = value; 27525 return this._uncache(true); 27526 }; 27527 27528 p.repeatDelay = function(value) { 27529 if (!arguments.length) { 27530 return this._repeatDelay; 27531 } 27532 this._repeatDelay = value; 27533 return this._uncache(true); 27534 }; 27535 27536 p.yoyo = function(value) { 27537 if (!arguments.length) { 27538 return this._yoyo; 27539 } 27540 this._yoyo = value; 27541 return this; 27542 }; 27543 27544 27545 return TweenMax; 27546 27547 }, true); 27548 27549 27550 27551 27552 27553 27554 27555 27556/* 27557 * ---------------------------------------------------------------- 27558 * TimelineLite 27559 * ---------------------------------------------------------------- 27560 */ 27561 _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) { 27562 27563 var TimelineLite = function(vars) { 27564 SimpleTimeline.call(this, vars); 27565 var self = this, 27566 v = self.vars, 27567 val, p; 27568 self._labels = {}; 27569 self.autoRemoveChildren = !!v.autoRemoveChildren; 27570 self.smoothChildTiming = !!v.smoothChildTiming; 27571 self._sortChildren = true; 27572 self._onUpdate = v.onUpdate; 27573 for (p in v) { 27574 val = v[p]; 27575 if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) { 27576 v[p] = self._swapSelfInParams(val); 27577 } 27578 } 27579 if (_isArray(v.tweens)) { 27580 self.add(v.tweens, 0, v.align, v.stagger); 27581 } 27582 }, 27583 _tinyNum = 0.00000001, 27584 TweenLiteInternals = TweenLite._internals, 27585 _internals = TimelineLite._internals = {}, 27586 _isSelector = TweenLiteInternals.isSelector, 27587 _isArray = TweenLiteInternals.isArray, 27588 _lazyTweens = TweenLiteInternals.lazyTweens, 27589 _lazyRender = TweenLiteInternals.lazyRender, 27590 _globals = _gsScope._gsDefine.globals, 27591 _copy = function(vars) { 27592 var copy = {}, p; 27593 for (p in vars) { 27594 copy[p] = vars[p]; 27595 } 27596 return copy; 27597 }, 27598 _applyCycle = function(vars, targets, i) { 27599 var alt = vars.cycle, 27600 p, val; 27601 for (p in alt) { 27602 val = alt[p]; 27603 vars[p] = (typeof(val) === "function") ? val(i, targets[i], targets) : val[i % val.length]; 27604 } 27605 delete vars.cycle; 27606 }, 27607 _pauseCallback = _internals.pauseCallback = function() {}, 27608 _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 27609 var b = [], 27610 l = a.length, 27611 i; 27612 for (i = 0; i !== l; b.push(a[i++])); 27613 return b; 27614 }, 27615 _defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true 27616 var ir = "immediateRender"; 27617 if (!(ir in toVars)) { 27618 toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse); 27619 } 27620 return toVars; 27621 }, 27622 //for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following 27623 _distribute = function(v) { 27624 if (typeof(v) === "function") { 27625 return v; 27626 } 27627 var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all. 27628 ease = vars.ease, 27629 from = vars.from || 0, 27630 base = vars.base || 0, 27631 cache = {}, 27632 isFromKeyword = isNaN(from), 27633 axis = vars.axis, 27634 ratio = {center:0.5, end:1}[from] || 0; 27635 return function(i, target, a) { 27636 var l = (a || vars).length, 27637 distances = cache[l], 27638 originX, originY, x, y, d, j, max, min, wrap; 27639 if (!distances) { 27640 wrap = (vars.grid === "auto") ? 0 : (vars.grid || [Infinity])[0]; 27641 if (!wrap) { 27642 max = -Infinity; 27643 while (max < (max = a[wrap++].getBoundingClientRect().left) && wrap < l) { } 27644 wrap--; 27645 } 27646 distances = cache[l] = []; 27647 originX = isFromKeyword ? (Math.min(wrap, l) * ratio) - 0.5 : from % wrap; 27648 originY = isFromKeyword ? l * ratio / wrap - 0.5 : (from / wrap) | 0; 27649 max = 0; 27650 min = Infinity; 27651 for (j = 0; j < l; j++) { 27652 x = (j % wrap) - originX; 27653 y = originY - ((j / wrap) | 0); 27654 distances[j] = d = !axis ? Math.sqrt(x * x + y * y) : Math.abs((axis === "y") ? y : x); 27655 if (d > max) { 27656 max = d; 27657 } 27658 if (d < min) { 27659 min = d; 27660 } 27661 } 27662 distances.max = max - min; 27663 distances.min = min; 27664 distances.v = l = vars.amount || (vars.each * (wrap >
27664 l ? l : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0; 27665 distances.b = (l < 0) ? base - l : base; 27666 } 27667 l = (distances[i] - distances.min) / distances.max; 27668 return distances.b + (ease ? ease.getRatio(l) : l) * distances.v; 27669 }; 27670 }, 27671 p = TimelineLite.prototype = new SimpleTimeline(); 27672 27673 TimelineLite.version = "2.1.2"; 27674 TimelineLite.distribute = _distribute; 27675 p.constructor = TimelineLite; 27676 p.kill()._gc = p._forcingPlayhead = p._hasPause = false; 27677 27678 /* might use later... 27679 //translates a local time inside an animation to the corresponding time on the root/global timeline, factoring in all nesting and timeScales. 27680 function localToGlobal(time, animation) { 27681 while (animation) { 27682 time = (time / animation._timeScale) + animation._startTime; 27683 animation = animation.timeline; 27684 } 27685 return time; 27686 } 27687 27688 //translates the supplied time on the root/global timeline into the corresponding local time inside a particular animation, factoring in all nesting and timeScales 27689 function globalToLocal(time, animation) { 27690 var scale = 1; 27691 time -= localToGlobal(0, animation); 27692 while (animation) { 27693 scale *= animation._timeScale; 27694 animation = animation.timeline; 27695 } 27696 return time * scale; 27697 } 27698 */ 27699 27700 p.to = function(target, duration, vars, position) { 27701 var Engine = (vars.repeat && _globals.TweenMax) || TweenLite; 27702 return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position); 27703 }; 27704 27705 p.from = function(target, duration, vars, position) { 27706 return this.add( ((vars.repeat && _globals.TweenMax) || TweenLite).from(target, duration, _defaultImmediateRender(this, vars)), position); 27707 }; 27708 27709 p.fromTo = function(target, duration, fromVars, toVars, position) { 27710 var Engine = (toVars.repeat && _globals.TweenMax) || TweenLite; 27711 toVars = _defaultImmediateRender(this, toVars, fromVars); 27712 return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position); 27713 }; 27714 27715 p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 27716 var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, callbackScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}), 27717 staggerFunc = _distribute(vars.stagger || stagger), 27718 startAt = vars.startAt, 27719 cycle = vars.cycle, 27720 copy, i; 27721 if (typeof(targets) === "string") { 27722 targets = TweenLite.selector(targets) || targets; 27723 } 27724 targets = targets || []; 27725 if (_isSelector(targets)) { //if the targets object is a selector, translate it into an array. 27726 targets = _slice(targets); 27727 } 27728 for (i = 0; i < targets.length; i++) { 27729 copy = _copy(vars); 27730 if (startAt) { 27731 copy.startAt = _copy(startAt); 27732 if (startAt.cycle) { 27733 _applyCycle(copy.startAt, targets, i); 27734 } 27735 } 27736 if (cycle) { 27737 _applyCycle(copy, targets, i); 27738 if (copy.duration != null) { 27739 duration = copy.duration; 27740 delete copy.duration; 27741 } 27742 } 27743 tl.to(targets[i], duration, copy, staggerFunc(i, targets[i], targets)); 27744 } 27745 return this.add(tl, position); 27746 }; 27747 27748 p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 27749 vars.runBackwards = true; 27750 return this.staggerTo(targets, duration, _defaultImmediateRender(this, vars), stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 27751 }; 27752 27753 p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 27754 toVars.startAt = fromVars; 27755 return this.staggerTo(targets, duration, _defaultImmediateRender(this, toVars, fromVars), stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 27756 }; 27757 27758 p.call = function(callback, params, scope, position) { 27759 return this.add( TweenLite.delayedCall(0, callback, params, scope), position); 27760 }; 27761 27762 p.set = function(target, vars, position) { 27763 return this.add( new TweenLite(target, 0, _defaultImmediateRender(this, vars, null, true)), position); 27764 }; 27765 27766 TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) { 27767 vars = vars || {}; 27768 if (vars.smoothChildTiming == null) { 27769 vars.smoothChildTiming = true; 27770 } 27771 var tl = new TimelineLite(vars), 27772 root = tl._timeline, 27773 hasNegativeStart, time, tween, next; 27774 if (ignoreDelayedCalls == null) { 27775 ignoreDelayedCalls = true; 27776 } 27777 root._remove(tl, true); 27778 tl._startTime = 0; 27779 tl._rawPrevTime = tl._time = tl._totalTime = root._time; 27780 tween = root._first; 27781 while (tween) { 27782 next = tween._next; 27783 if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) { 27784 time = tween._startTime - tween._delay; 27785 if (time < 0) { 27786 hasNegativeStart = 1; 27787 } 27788 tl.add(tween, time); 27789 } 27790 tween = next; 27791 } 27792 root.add(tl, 0); 27793 if (hasNegativeStart) { //calling totalDuration() will force the adjustment necessary to shift the children forward so none of them start before zero, and moves the timeline backwards the same amount, so the playhead is still aligned where it should be globally, but the timeline doesn't have illegal children that start before zero. 27794 tl.totalDuration(); 27795 } 27796 return tl; 27797 }; 27798 27799 p.add = function(value, position, align, stagger) { 27800 var self = this, 27801 curTime, l, i, child, tl, beforeRawTime; 27802 if (typeof(position) !== "number") { 27803 position = self._parseTimeOrLabel(position, 0, true, value); 27804 } 27805 if (!(value instanceof Animation)) { 27806 if ((value instanceof Array) || (value && value.push && _isArray(value))) {
27807 align = align || "normal"; 27808 stagger = stagger || 0; 27809 curTime = position; 27810 l = value.length; 27811 for (i = 0; i < l; i++) { 27812 if (_isArray(child = value[i])) { 27813 child = new TimelineLite({tweens:child}); 27814 } 27815 self.add(child, curTime); 27816 if (typeof(child) !== "string" && typeof(child) !== "function") { 27817 if (align === "sequence") { 27818 curTime = child._startTime + (child.totalDuration() / child._timeScale); 27819 } else if (align === "start") { 27820 child._startTime -= child.delay(); 27821 } 27822 } 27823 curTime += stagger; 27824 } 27825 return self._uncache(true); 27826 } else if (typeof(value) === "string") { 27827 return self.addLabel(value, position); 27828 } else if (typeof(value) === "function") { 27829 value = TweenLite.delayedCall(0, value); 27830 } else { 27831 throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string."); 27832 } 27833 } 27834 27835 SimpleTimeline.prototype.add.call(self, value, position); 27836 27837 if (value._time || (!value._duration && value._initted)) { //in case, for example, the _startTime is moved on a tween that has already rendered. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning. 27838 curTime = (self.rawTime() - value._startTime) * value._timeScale; 27839 if (!value._duration || Math.abs(Math.max(0, Math.min(value.totalDuration(), curTime))) - value._totalTime > 0.00001) { 27840 value.render(curTime, false, false); 27841 } 27842 } 27843 27844 //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate. 27845 if (self._gc || self._time === self._duration) if (!self._paused) if (self._duration < self.duration()) { 27846 //in case any of the ancestors had completed but should now be enabled... 27847 tl = self; 27848 beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect. 27849 while (tl._timeline) { 27850 if (beforeRawTime && tl._timeline.smoothChildTiming) { 27851 tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it. 27852 } else if (tl._gc) { 27853 tl._enabled(true, false); 27854 } 27855 tl = tl._timeline; 27856 } 27857 } 27858 27859 return self; 27860 }; 27861 27862 p.remove = function(value) { 27863 if (value instanceof Animation) { 27864 this._remove(value, false); 27865 var tl = value._timeline = value.vars.useFrames ? Animation._rootFramesTimeline : Animation._rootTimeline; //now that it's removed, default it to the root timeline so that if it gets played again, it doesn't jump back into this timeline. 27866 value._startTime = (value._paused ? value._pauseTime : tl._time) - ((!value._reversed ? value._totalTime : value.totalDuration() - value._totalTime) / value._timeScale); //ensure that if it gets played again, the timing is correct. 27867 return this; 27868 } else if (value instanceof Array || (value && value.push && _isArray(value))) { 27869 var i = value.length; 27870 while (--i > -1) { 27871 this.remove(value[i]); 27872 } 27873 return this; 27874 } else if (typeof(value) === "string") { 27875 return this.removeLabel(value); 27876 } 27877 return this.kill(null, value); 27878 }; 27879 27880 p._remove = function(tween, skipDisable) { 27881 SimpleTimeline.prototype._remove.call(this, tween, skipDisable); 27882 var last = this._last; 27883 if (!last) { 27884 this._time = this._totalTime = this._duration = this._totalDuration = 0; 27885 } else if (this._time > this.duration()) { 27886 this._time = this._duration; 27887 this._totalTime = this._totalDuration; 27888 } 27889 return this; 27890 }; 27891 27892 p.append = function(value, offsetOrLabel) { 27893 return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value)); 27894 }; 27895 27896 p.insert = p.insertMultiple = function(value, position, align, stagger) { 27897 return this.add(value, position || 0, align, stagger); 27898 }; 27899 27900 p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) { 27901 return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger); 27902 }; 27903 27904 p.addLabel = function(label, position) { 27905 this._labels[label] = this._parseTimeOrLabel(position); 27906 return this; 27907 }; 27908 27909 p.addPause = function(position, callback, params, scope) { 27910 var t = TweenLite.delayedCall(0, _pauseCallback, params, scope || this); 27911 t.vars.onComplete = t.vars.onReverseComplete = callback;
27912 t.data = "isPause"; 27913 this._hasPause = true; 27914 return this.add(t, position); 27915 }; 27916 27917 p.removeLabel = function(label) { 27918 delete this._labels[label]; 27919 return this; 27920 }; 27921 27922 p.getLabelTime = function(label) { 27923 return (this._labels[label] != null) ? this._labels[label] : -1; 27924 }; 27925 27926 p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) { 27927 var clippedDuration, i; 27928 //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration(). 27929 if (ignore instanceof Animation && ignore.timeline === this) { 27930 this.remove(ignore); 27931 } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) { 27932 i = ignore.length; 27933 while (--i > -1) { 27934 if (ignore[i] instanceof Animation && ignore[i].timeline === this) { 27935 this.remove(ignore[i]); 27936 } 27937 } 27938 } 27939 clippedDuration = (typeof(timeOrLabel) === "number" && !offsetOrLabel) ? 0 : (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead. 27940 if (typeof(offsetOrLabel) === "string") { 27941 return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - clippedDuration : 0, appendIfAbsent); 27942 } 27943 offsetOrLabel = offsetOrLabel || 0; 27944 if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value). 27945 i = timeOrLabel.indexOf("="); 27946 if (i === -1) { 27947 if (this._labels[timeOrLabel] == null) { 27948 return appendIfAbsent ? (this._labels[timeOrLabel] = clippedDuration + offsetOrLabel) : offsetOrLabel; 27949 } 27950 return this._labels[timeOrLabel] + offsetOrLabel; 27951 } 27952 offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1)); 27953 timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : clippedDuration; 27954 } else if (timeOrLabel == null) { 27955 timeOrLabel = clippedDuration; 27956 } 27957 return Number(timeOrLabel) + offsetOrLabel; 27958 }; 27959 27960 p.seek = function(position, suppressEvents) { 27961 return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false)); 27962 }; 27963 27964 p.stop = function() { 27965 return this.paused(true); 27966 }; 27967 27968 p.gotoAndPlay = function(position, suppressEvents) { 27969 return this.play(position, suppressEvents); 27970 }; 27971 27972 p.gotoAndStop = function(position, suppressEvents) { 27973 return this.pause(position, suppressEvents); 27974 }; 27975 27976 p.render = function(time, suppressEvents, force) { 27977 if (this._gc) { 27978 this._enabled(true, false); 27979 } 27980 var self = this, 27981 prevTime = self._time, 27982 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 27983 prevStart = self._startTime, 27984 prevTimeScale = self._timeScale, 27985 prevPaused = self._paused, 27986 tween, isComplete, next, callback, internalForce, pauseTween, curTime, pauseTime; 27987 if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump). 27988 time += self._time - prevTime; 27989 } 27990 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 27991 self._totalTime = self._time = totalDur; 27992 if (!self._reversed) if (!self._hasPausedChild()) { 27993 isComplete = true; 27994 callback = "onComplete"; 27995 internalForce = !!self._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 27996 if (self._duration === 0) if ((time <= 0 && time >= -_tinyNum) || self._rawPrevTime < 0 || self._rawPrevTime === _tinyNum) if (self._rawPrevTime !== time && self._first) { 27997 internalForce = true; 27998 if (self._rawPrevTime > _tinyNum) { 27999 callback = "onReverseComplete"; 28000 } 28001 } 28002 } 28003 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 28004 time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. 28005 28006 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 28007 self._totalTime = self._time = 0; 28008 if (time > -_tinyNum) { 28009 time = 0; 28010 } 28011 if (prevTime !== 0 || (self._duration === 0 && self._rawPrevTime !== _tinyNum && (self._rawPrevTime > 0 || (time < 0 && self._rawPrevTime >= 0)))) { 28012 callback = "onReverseComplete"; 28013 isComplete = self._reversed; 28014 } 28015 if (time < 0) { 28016 self._active = false;
28017 if (self._timeline.autoRemoveChildren && self._reversed) { //ensures proper GC if a timeline is resumed after it's finished reversing. 28018 internalForce = isComplete = true; 28019 callback = "onReverseComplete"; 28020 } else if (self._rawPrevTime >= 0 && self._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state. 28021 internalForce = true; 28022 } 28023 self._rawPrevTime = time; 28024 } else { 28025 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 28026 if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good). 28027 tween = self._first; 28028 while (tween && tween._startTime === 0) { 28029 if (!tween._duration) { 28030 isComplete = false; 28031 } 28032 tween = tween._next; 28033 } 28034 } 28035 time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline) 28036 if (!self._initted) { 28037 internalForce = true; 28038 } 28039 } 28040 28041 } else { 28042 28043 if (self._hasPause && !self._forcingPlayhead && !suppressEvents) { 28044 if (time >= prevTime) { 28045 tween = self._first; 28046 while (tween && tween._startTime <= time && !pauseTween) { 28047 if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) { 28048 pauseTween = tween; 28049 } 28050 tween = tween._next; 28051 } 28052 } else { 28053 tween = self._last; 28054 while (tween && tween._startTime >= time && !pauseTween) { 28055 if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) { 28056 pauseTween = tween; 28057 } 28058 tween = tween._prev; 28059 } 28060 } 28061 if (pauseTween) { 28062 self._time = self._totalTime = time = pauseTween._startTime; 28063 pauseTime = self._startTime + (time / self._timeScale); 28064 } 28065 } 28066 28067 self._totalTime = self._time = self._rawPrevTime = time; 28068 } 28069 if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) { 28070 return; 28071 } else if (!self._initted) { 28072 self._initted = true; 28073 } 28074 28075 if (!self._active) if (!self._paused && self._time !== prevTime && time > 0) { 28076 self._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example. 28077 } 28078 28079 if (prevTime === 0) if (self.vars.onStart) if (self._time !== 0 || !self._duration) if (!suppressEvents) { 28080 self._callback("onStart"); 28081 } 28082 28083 curTime = self._time; 28084 if (curTime >= prevTime) { 28085 tween = self._first; 28086 while (tween) { 28087 next = tween._next; //record it here because the value could change after rendering... 28088 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 28089 break; 28090 } else if (tween._active || (tween._startTime <= curTime && !tween._paused && !tween._gc)) { 28091 if (pauseTween === tween) { 28092 self.pause(); 28093 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 28094 } 28095 if (!tween._reversed) { 28096 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 28097 } else { 28098 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 28099 } 28100 } 28101 tween = next; 28102 } 28103 } else { 28104 tween = self._last; 28105 while (tween) { 28106 next = tween._prev; //record it here because the value could change after rendering... 28107 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 28108 break; 28109 } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) { 28110 if (pauseTween === tween) { 28111 pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse. 28112 while (pauseTween && pauseTween.endTime() > self._time) { 28113 pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force); 28114 pauseTween = pauseTween._prev; 28115 } 28116 pauseTween = null; 28117 self.pause(); 28118 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 28119 } 28120 if (!tween._reversed) { 28121 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 28122 } else { 28123 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 28124 } 28125 } 28126 tween = next; 28127 } 28128 } 28129 28130 if (self._onUpdate) if (!suppressEvents) { 28131 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. 28132 _lazyRender(); 28133 }
28134 self._callback("onUpdate"); 28135 } 28136 28137 if (callback) if (!self._gc) if (prevStart === self._startTime || prevTimeScale !== self._timeScale) if (self._time === 0 || totalDur >= self.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate 28138 if (isComplete) { 28139 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values. 28140 _lazyRender(); 28141 } 28142 if (self._timeline.autoRemoveChildren) { 28143 self._enabled(false, false); 28144 } 28145 self._active = false; 28146 } 28147 if (!suppressEvents && self.vars[callback]) { 28148 self._callback(callback); 28149 } 28150 } 28151 }; 28152 28153 p._hasPausedChild = function() { 28154 var tween = this._first; 28155 while (tween) { 28156 if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) { 28157 return true; 28158 } 28159 tween = tween._next; 28160 } 28161 return false; 28162 }; 28163 28164 p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) { 28165 ignoreBeforeTime = ignoreBeforeTime || -9999999999; 28166 var a = [], 28167 tween = this._first, 28168 cnt = 0; 28169 while (tween) { 28170 if (tween._startTime < ignoreBeforeTime) { 28171 //do nothing 28172 } else if (tween instanceof TweenLite) { 28173 if (tweens !== false) { 28174 a[cnt++] = tween; 28175 } 28176 } else { 28177 if (timelines !== false) { 28178 a[cnt++] = tween; 28179 } 28180 if (nested !== false) { 28181 a = a.concat(tween.getChildren(true, tweens, timelines)); 28182 cnt = a.length; 28183 } 28184 } 28185 tween = tween._next; 28186 } 28187 return a; 28188 }; 28189 28190 p.getTweensOf = function(target, nested) { 28191 var disabled = this._gc, 28192 a = [], 28193 cnt = 0, 28194 tweens, i; 28195 if (disabled) { 28196 this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here. 28197 } 28198 tweens = TweenLite.getTweensOf(target); 28199 i = tweens.length; 28200 while (--i > -1) { 28201 if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) { 28202 a[cnt++] = tweens[i]; 28203 } 28204 } 28205 if (disabled) { 28206 this._enabled(false, true); 28207 } 28208 return a; 28209 }; 28210 28211 p.recent = function() { 28212 return this._recent; 28213 }; 28214 28215 p._contains = function(tween) { 28216 var tl = tween.timeline; 28217 while (tl) { 28218 if (tl === this) { 28219 return true; 28220 } 28221 tl = tl.timeline; 28222 } 28223 return false; 28224 }; 28225 28226 p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) { 28227 ignoreBeforeTime = ignoreBeforeTime || 0; 28228 var tween = this._first, 28229 labels = this._labels, 28230 p; 28231 while (tween) { 28232 if (tween._startTime >= ignoreBeforeTime) { 28233 tween._startTime += amount; 28234 } 28235 tween = tween._next; 28236 }
28237 if (adjustLabels) { 28238 for (p in labels) { 28239 if (labels[p] >= ignoreBeforeTime) { 28240 labels[p] += amount; 28241 } 28242 } 28243 } 28244 return this._uncache(true); 28245 }; 28246 28247 p._kill = function(vars, target) { 28248 if (!vars && !target) { 28249 return this._enabled(false, false); 28250 } 28251 var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target), 28252 i = tweens.length, 28253 changed = false; 28254 while (--i > -1) { 28255 if (tweens[i]._kill(vars, target)) { 28256 changed = true; 28257 } 28258 } 28259 return changed; 28260 }; 28261 28262 p.clear = function(labels) { 28263 var tweens = this.getChildren(false, true, true), 28264 i = tweens.length; 28265 this._time = this._totalTime = 0; 28266 while (--i > -1) { 28267 tweens[i]._enabled(false, false); 28268 } 28269 if (labels !== false) { 28270 this._labels = {}; 28271 } 28272 return this._uncache(true); 28273 }; 28274 28275 p.invalidate = function() { 28276 var tween = this._first; 28277 while (tween) { 28278 tween.invalidate(); 28279 tween = tween._next; 28280 } 28281 return Animation.prototype.invalidate.call(this);; 28282 }; 28283 28284 p._enabled = function(enabled, ignoreTimeline) { 28285 if (enabled === this._gc) { 28286 var tween = this._first; 28287 while (tween) { 28288 tween._enabled(enabled, true); 28289 tween = tween._next; 28290 } 28291 } 28292 return SimpleTimeline.prototype._enabled.call(this, enabled, ignoreTimeline); 28293 }; 28294 28295 p.totalTime = function(time, suppressEvents, uncapped) { 28296 this._forcingPlayhead = true; 28297 var val = Animation.prototype.totalTime.apply(this, arguments); 28298 this._forcingPlayhead = false; 28299 return val; 28300 }; 28301 28302 p.duration = function(value) { 28303 if (!arguments.length) { 28304 if (this._dirty) { 28305 this.totalDuration(); //just triggers recalculation 28306 } 28307 return this._duration; 28308 } 28309 if (this.duration() !== 0 && value !== 0) { 28310 this.timeScale(this._duration / value); 28311 } 28312 return this; 28313 }; 28314 28315 p.totalDuration = function(value) { 28316 if (!arguments.length) { 28317 if (this._dirty) { 28318 var max = 0, 28319 self = this, 28320 tween = self._last, 28321 prevStart = 999999999999, 28322 prev, end; 28323 while (tween) { 28324 prev = tween._prev; //record it here in case the tween changes position in the sequence... 28325 if (tween._dirty) { 28326 tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it. 28327 } 28328 if (tween._startTime > prevStart && self._sortChildren && !tween._paused && !self._calculatingDuration) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence 28329 self._calculatingDuration = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(), like _parseTimeOrLabel(). 28330 self.add(tween, tween._startTime - tween._delay); 28331 self._calculatingDuration = 0; 28332 } else { 28333 prevStart = tween._startTime; 28334 } 28335 if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found. 28336 max -= tween._startTime; 28337 if (self._timeline.smoothChildTiming) { 28338 self._startTime += tween._startTime / self._timeScale; 28339 self._time -= tween._startTime; 28340 self._totalTime -= tween._startTime; 28341 self._rawPrevTime -= tween._startTime; 28342 } 28343 self.shiftChildren(-tween._startTime, false, -9999999999); 28344 prevStart = 0; 28345 } 28346 end = tween._startTime + (tween._totalDuration / tween._timeScale); 28347 if (end > max) { 28348 max = end; 28349 } 28350 tween = prev; 28351 } 28352 self._duration = self._totalDuration = max; 28353 self._dirty = false; 28354 } 28355 return this._totalDuration; 28356 } 28357 return (value && this.totalDuration()) ? this.timeScale(this._totalDuration / value) : this; 28358 }; 28359 28360 p.paused = function(value) { 28361 if (value === false && this._paused) { //if there's a pause directly at the spot from where we're unpausing, skip it. 28362 var tween = this._first; 28363 while (tween) { 28364 if (tween._startTime === this._time && tween.data === "isPause") { 28365 tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire. 28366 } 28367 tween = tween._next; 28368 } 28369 } 28370 return Animation.prototype.paused.apply(this, arguments); 28371 }; 28372 28373 p.usesFrames = function() { 28374 var tl = this._timeline; 28375 while (tl._timeline) { 28376 tl = tl._timeline; 28377 } 28378 return (tl === Animation._rootFramesTimeline); 28379 }; 28380 28381 p.rawTime = function(wrapRepeats) { 28382 return (wrapRepeats && (this._paused || (this._repeat && this.time() > 0 && this.totalProgress() < 1))) ? this._totalTime % (this._duration + this._repeatDelay) : this._paused ? this._totalTime : (this._timeline.rawTime(wrapRepeats) - this._startTime) * this._timeScale; 28383 }; 28384 28385 return TimelineLite; 28386 28387 }, true); 28388 28389 28390 28391 28392 28393 28394 28395 28396 28397 28398 28399 28400 28401/* 28402 * ---------------------------------------------------------------- 28403 * TimelineMax 28404 * ---------------------------------------------------------------- 28405 */ 28406 _gsScope._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function(TimelineLite, TweenLite, Ease) { 28407 28408 var TimelineMax = function(vars) { 28409 TimelineLite.call(this, vars); 28410 this._repeat = this.vars.repeat || 0; 28411 this._repeatDelay = this.vars.repeatDelay || 0; 28412 this._cycle = 0; 28413 this._yoyo = !!this.vars.yoyo; 28414 this._dirty = true; 28415 }, 28416 _tinyNum = 0.00000001, 28417 TweenLiteInternals = TweenLite._internals, 28418 _lazyTweens = TweenLiteInternals.lazyTweens, 28419 _lazyRender = TweenLiteInternals.lazyRender, 28420 _globals = _gsScope._gsDefine.globals,
28421 _easeNone = new Ease(null, null, 1, 0), 28422 p = TimelineMax.prototype = new TimelineLite(); 28423 28424 p.constructor = TimelineMax; 28425 p.kill()._gc = false; 28426 TimelineMax.version = "2.1.2"; 28427 28428 p.invalidate = function() { 28429 this._yoyo = !!this.vars.yoyo; 28430 this._repeat = this.vars.repeat || 0; 28431 this._repeatDelay = this.vars.repeatDelay || 0; 28432 this._uncache(true); 28433 return TimelineLite.prototype.invalidate.call(this); 28434 }; 28435 28436 p.addCallback = function(callback, position, params, scope) { 28437 return this.add( TweenLite.delayedCall(0, callback, params, scope), position); 28438 }; 28439 28440 p.removeCallback = function(callback, position) { 28441 if (callback) { 28442 if (position == null) { 28443 this._kill(null, callback); 28444 } else { 28445 var a = this.getTweensOf(callback, false), 28446 i = a.length, 28447 time = this._parseTimeOrLabel(position); 28448 while (--i > -1) { 28449 if (a[i]._startTime === time) { 28450 a[i]._enabled(false, false); 28451 } 28452 } 28453 } 28454 } 28455 return this; 28456 }; 28457 28458 p.removePause = function(position) { 28459 return this.removeCallback(TimelineLite._internals.pauseCallback, position); 28460 }; 28461 28462 p.tweenTo = function(position, vars) { 28463 vars = vars || {}; 28464 var copy = {ease:_easeNone, useFrames:this.usesFrames(), immediateRender:false, lazy:false}, 28465 Engine = (vars.repeat && _globals.TweenMax) || TweenLite, 28466 duration, p, t; 28467 for (p in vars) { 28468 copy[p] = vars[p]; 28469 } 28470 copy.time = this._parseTimeOrLabel(position); 28471 duration = (Math.abs(Number(copy.time) - this._time) / this._timeScale) || 0.001; 28472 t = new Engine(this, duration, copy); 28473 copy.onStart = function() { 28474 t.target.paused(true); 28475 if (t.vars.time !== t.target.time() && duration === t.duration() && !t.isFromTo) { //don't make the duration zero - if it's supposed to be zero, don't worry because it's already initting the tween and will complete immediately, effectively making the duration zero anyway. If we make duration zero, the tween won't run at all. 28476 t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale ).render(t.time(), true, true); //render() right away to ensure that things look right, especially in the case of .tweenTo(0). 28477 } 28478 if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it. 28479 vars.onStart.apply(vars.onStartScope || vars.callbackScope || t, vars.onStartParams || []); //don't use t._callback("onStart") or it'll point to the copy.onStart and we'll get a recursion error. 28480 } 28481 }; 28482 return t; 28483 }; 28484 28485 p.tweenFromTo = function(fromPosition, toPosition, vars) { 28486 vars = vars || {}; 28487 fromPosition = this._parseTimeOrLabel(fromPosition); 28488 vars.startAt = {onComplete:this.seek, onCompleteParams:[fromPosition], callbackScope:this}; 28489 vars.immediateRender = (vars.immediateRender !== false); 28490 var t = this.tweenTo(toPosition, vars); 28491 t.isFromTo = 1; //to ensure we don't mess with the duration in the onStart (we've got the start and end values here, so lock it in) 28492 return t.duration((Math.abs( t.vars.time - fromPosition) / this._timeScale) || 0.001); 28493 }; 28494 28495 p.render = function(time, suppressEvents, force) { 28496 if (this._gc) { 28497 this._enabled(true, false); 28498 } 28499 var self = this, 28500 prevTime = self._time, 28501 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 28502 dur = self._duration, 28503 prevTotalTime = self._totalTime, 28504 prevStart = self._startTime, 28505 prevTimeScale = self._timeScale, 28506 prevRawPrevTime = self._rawPrevTime, 28507 prevPaused = self._paused, 28508 prevCycle = self._cycle, 28509 tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime, pauseTime; 28510 if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump). 28511 time += self._time - prevTime; 28512 } 28513 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 28514 if (!self._locked) { 28515 self._totalTime = totalDur; 28516 self._cycle = self._repeat; 28517 } 28518 if (!self._reversed) if (!self._hasPausedChild()) { 28519 isComplete = true; 28520 callback = "onComplete"; 28521 internalForce = !!self._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 28522 if (self._duration === 0) if ((time <= 0 && time >= -_tinyNum) || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && self._first) { 28523 internalForce = true; 28524 if (prevRawPrevTime > _tinyNum) { 28525 callback = "onReverseComplete"; 28526 } 28527 } 28528 } 28529 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 28530 if (self._yoyo && (self._cycle & 1)) { 28531 self._time = time = 0; 28532 } else { 28533 self._time = dur; 28534 time = dur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. We cannot do less then 0.0001 because the same issue can occur when the duration is extremely large like 999999999999 in
28534which case adding 0.00000001, for example, causes it to act like nothing was added. 28535 } 28536 28537 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 28538 if (!self._locked) { 28539 self._totalTime = self._cycle = 0; 28540 } 28541 self._time = 0; 28542 if (time > -_tinyNum) { 28543 time = 0; 28544 } 28545 if (prevTime !== 0 || (dur === 0 && prevRawPrevTime !== _tinyNum && (prevRawPrevTime > 0 || (time < 0 && prevRawPrevTime >= 0)) && !self._locked)) { //edge case for checking time < 0 && prevRawPrevTime >= 0: a zero-duration fromTo() tween inside a zero-duration timeline (yeah, very rare) 28546 callback = "onReverseComplete"; 28547 isComplete = self._reversed; 28548 } 28549 if (time < 0) { 28550 self._active = false; 28551 if (self._timeline.autoRemoveChildren && self._reversed) { 28552 internalForce = isComplete = true; 28553 callback = "onReverseComplete"; 28554 } else if (prevRawPrevTime >= 0 && self._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state. 28555 internalForce = true; 28556 } 28557 self._rawPrevTime = time; 28558 } else { 28559 self._rawPrevTime = (dur || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 28560 if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good). 28561 tween = self._first; 28562 while (tween && tween._startTime === 0) { 28563 if (!tween._duration) { 28564 isComplete = false; 28565 } 28566 tween = tween._next; 28567 } 28568 } 28569 time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline) 28570 if (!self._initted) { 28571 internalForce = true; 28572 } 28573 } 28574 28575 } else { 28576 if (dur === 0 && prevRawPrevTime < 0) { //without this, zero-duration repeating timelines (like with a simple callback nested at the very beginning and a repeatDelay) wouldn't render the first time through. 28577 internalForce = true; 28578 } 28579 self._time = self._rawPrevTime = time; 28580 if (!self._locked) { 28581 self._totalTime = time; 28582 if (self._repeat !== 0) { 28583 cycleDuration = dur + self._repeatDelay; 28584 self._cycle = (self._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!) 28585 if (self._cycle) if (self._cycle === self._totalTime / cycleDuration && prevTotalTime <= time) { 28586 self._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning) 28587 } 28588 self._time = self._totalTime - (self._cycle * cycleDuration); 28589 if (self._yoyo) if (self._cycle & 1) { 28590 self._time = dur - self._time; 28591 } 28592 if (self._time > dur) { 28593 self._time = dur; 28594 time = dur + 0.0001; //to avoid occasional floating point rounding error 28595 } else if (self._time < 0) { 28596 self._time = time = 0; 28597 } else { 28598 time = self._time; 28599 } 28600 } 28601 } 28602 28603 if (self._hasPause && !self._forcingPlayhead && !suppressEvents) { 28604 time = self._time; 28605 if (time >= prevTime || (self._repeat && prevCycle !== self._cycle)) { 28606 tween = self._first; 28607 while (tween && tween._startTime <= time && !pauseTween) { 28608 if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) { 28609 pauseTween = tween; 28610 } 28611 tween = tween._next; 28612 } 28613 } else { 28614 tween = self._last; 28615 while (tween && tween._startTime >= time && !pauseTween) { 28616 if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) { 28617 pauseTween = tween; 28618 } 28619 tween = tween._prev; 28620 } 28621 } 28622 if (pauseTween) { 28623 pauseTime = self._startTime + (pauseTween._startTime / self._timeScale); 28624 if (pauseTween._startTime < dur) { 28625 self._time = self._rawPrevTime = time = pauseTween._startTime; 28626 self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay)); 28627 } 28628 } 28629 } 28630 28631 } 28632 28633 if (self._cycle !== prevCycle) if (!self._locked) { 28634 /* 28635 make sure children at the end/beginning of the timeline are rendered properly. If, for example, 28636 a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which
28637 would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there 28638 could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So 28639 we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must 28640 ensure that zero-duration tweens at the very beginning or end of the TimelineMax work. 28641 */ 28642 var backwards = (self._yoyo && (prevCycle & 1) !== 0), 28643 wrap = (backwards === (self._yoyo && (self._cycle & 1) !== 0)), 28644 recTotalTime = self._totalTime, 28645 recCycle = self._cycle, 28646 recRawPrevTime = self._rawPrevTime, 28647 recTime = self._time; 28648 28649 self._totalTime = prevCycle * dur; 28650 if (self._cycle < prevCycle) { 28651 backwards = !backwards; 28652 } else { 28653 self._totalTime += dur; 28654 } 28655 self._time = prevTime; //temporarily revert _time so that render() renders the children in the correct order. Without this, tweens won't rewind correctly. We could arhictect things in a "cleaner" way by splitting out the rendering queue into a separate method but for performance reasons, we kept it all inside this method. 28656 28657 self._rawPrevTime = (dur === 0) ? prevRawPrevTime - 0.0001 : prevRawPrevTime; 28658 self._cycle = prevCycle; 28659 self._locked = true; //prevents changes to totalTime and skips repeat/yoyo behavior when we recursively call render() 28660 prevTime = (backwards) ? 0 : dur; 28661 self.render(prevTime, suppressEvents, (dur === 0)); 28662 if (!suppressEvents) if (!self._gc) { 28663 if (self.vars.onRepeat) { 28664 self._cycle = recCycle; //in case the onRepeat alters the playhead or invalidates(), we shouldn't stay locked or use the previous cycle. 28665 self._locked = false; 28666 self._callback("onRepeat"); 28667 } 28668 } 28669 if (prevTime !== self._time) { //in case there's a callback like onComplete in a nested tween/timeline that changes the playhead position, like via seek(), we should just abort. 28670 return; 28671 } 28672 if (wrap) { 28673 self._cycle = prevCycle; //if there's an onRepeat, we reverted this above, so make sure it's set properly again. We also unlocked in that scenario, so reset that too. 28674 self._locked = true; 28675 prevTime = (backwards) ? dur + 0.0001 : -0.0001; 28676 self.render(prevTime, true, false); 28677 } 28678 self._locked = false; 28679 if (self._paused && !prevPaused) { //if the render() triggered callback that paused this timeline, we should abort (very rare, but possible) 28680 return; 28681 } 28682 self._time = recTime; 28683 self._totalTime = recTotalTime; 28684 self._cycle = recCycle; 28685 self._rawPrevTime = recRawPrevTime; 28686 } 28687 28688 if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) { 28689 if (prevTotalTime !== self._totalTime) if (self._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate. 28690 self._callback("onUpdate"); 28691 } 28692 return; 28693 } else if (!self._initted) { 28694 self._initted = true; 28695 } 28696 28697 if (!self._active) if (!self._paused && self._totalTime !== prevTotalTime && time > 0) { 28698 self._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example. 28699 } 28700 28701 if (prevTotalTime === 0) if (self.vars.onStart) if (self._totalTime !== 0 || !self._totalDuration) if (!suppressEvents) { 28702 self._callback("onStart"); 28703 } 28704 28705 curTime = self._time; 28706 if (curTime >= prevTime) { 28707 tween = self._first; 28708 while (tween) { 28709 next = tween._next; //record it here because the value could change after rendering... 28710 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 28711 break; 28712 } else if (tween._active || (tween._startTime <= self._time && !tween._paused && !tween._gc)) { 28713 if (pauseTween === tween) { 28714 self.pause(); 28715 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 28716 } 28717 if (!tween._reversed) { 28718 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 28719 } else { 28720 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 28721 } 28722 } 28723 tween = next; 28724 } 28725 } else { 28726 tween = self._last; 28727 while (tween) { 28728 next = tween._prev; //record it here because the value could change after rendering... 28729 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 28730 break; 28731 } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) { 28732 if (pauseTween === tween) { 28733 pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse. 28734 while (pauseTween && pauseTween.endTime() > self._time) { 28735 pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force); 28736 pauseTween = pauseTween._prev; 28737 } 28738 pauseTween = null; 28739 self.pause(); 28740 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 28741 } 28742 if (!tween._reversed) { 28743 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 28744 } else { 28745 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 28746 } 28747 } 28748 tween = next; 28749 } 28750 } 28751 28752 if (self._onUpdate) if (!suppressEvents) { 28753 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. 28754 _lazyRender(); 28755 }
28756 self._callback("onUpdate"); 28757 } 28758 if (callback) if (!self._locked) if (!self._gc) if (prevStart === self._startTime || prevTimeScale !== self._timeScale) if (self._time === 0 || totalDur >= self.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate 28759 if (isComplete) { 28760 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values. 28761 _lazyRender(); 28762 } 28763 if (self._timeline.autoRemoveChildren) { 28764 self._enabled(false, false); 28765 } 28766 self._active = false; 28767 } 28768 if (!suppressEvents && self.vars[callback]) { 28769 self._callback(callback); 28770 } 28771 } 28772 }; 28773 28774 p.getActive = function(nested, tweens, timelines) { 28775 var a = [], 28776 all = this.getChildren(nested || (nested == null), tweens || (nested == null), !!timelines), 28777 cnt = 0, 28778 l = all.length, 28779 i, tween; 28780 for (i = 0; i < l; i++) { 28781 tween = all[i]; 28782 if (tween.isActive()) { 28783 a[cnt++] = tween; 28784 } 28785 } 28786 return a; 28787 }; 28788 28789 28790 p.getLabelAfter = function(time) { 28791 if (!time) if (time !== 0) { //faster than isNan() 28792 time = this._time; 28793 } 28794 var labels = this.getLabelsArray(), 28795 l = labels.length, 28796 i; 28797 for (i = 0; i < l; i++) { 28798 if (labels[i].time > time) { 28799 return labels[i].name; 28800 } 28801 } 28802 return null; 28803 }; 28804 28805 p.getLabelBefore = function(time) { 28806 if (time == null) { 28807 time = this._time; 28808 } 28809 var labels = this.getLabelsArray(), 28810 i = labels.length; 28811 while (--i > -1) { 28812 if (labels[i].time < time) { 28813 return labels[i].name; 28814 } 28815 } 28816 return null; 28817 }; 28818 28819 p.getLabelsArray = function() { 28820 var a = [], 28821 cnt = 0, 28822 p; 28823 for (p in this._labels) { 28824 a[cnt++] = {time:this._labels[p], name:p}; 28825 } 28826 a.sort(function(a,b) { 28827 return a.time - b.time; 28828 }); 28829 return a; 28830 }; 28831 28832 p.invalidate = function() { 28833 this._locked = false; //unlock and set cycle in case invalidate() is called from inside an onRepeat 28834 return TimelineLite.prototype.invalidate.call(this); 28835 }; 28836 28837 28838//---- GETTERS / SETTERS ------------------------------------------------------------------------------------------------------- 28839 28840 p.progress = function(value, suppressEvents) { 28841 return (!arguments.length) ? (this._time / this.duration()) || 0 : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents); 28842 }; 28843 28844 p.totalProgress = function(value, suppressEvents) { 28845 return (!arguments.length) ? (this._totalTime / this.totalDuration()) || 0 : this.totalTime( this.totalDuration() * value, suppressEvents); 28846 }; 28847 28848 p.totalDuration = function(value) { 28849 if (!arguments.length) { 28850 if (this._dirty) { 28851 TimelineLite.prototype.totalDuration.call(this); //just forces refresh 28852 //Instead of Infinity, we use 999999999999 so that we can accommodate reverses. 28853 this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat); 28854 } 28855 return this._totalDuration; 28856 } 28857 return (this._repeat === -1 || !value) ? this : this.timeScale( this.totalDuration() / value ); 28858 }; 28859 28860 p.time = function(value, suppressEvents) { 28861 if (!arguments.length) { 28862 return this._time; 28863 } 28864 if (this._dirty) { 28865 this.totalDuration(); 28866 } 28867 var duration = this._duration, 28868 cycle = this._cycle, 28869 cycleDur = cycle * (duration + this._repeatDelay); 28870 if (value > duration) { 28871 value = duration; 28872 } 28873 return this.totalTime((this._yoyo && (cycle & 1)) ? duration - value + cycleDur : this._repeat ? value + cycleDur : value, suppressEvents); 28874 }; 28875 28876 p.repeat = function(value) { 28877 if (!arguments.length) { 28878 return this._repeat; 28879 } 28880 this._repeat = value; 28881 return this._uncache(true); 28882 }; 28883 28884 p.repeatDelay = function(value) { 28885 if (!arguments.length) { 28886 return this._repeatDelay; 28887 } 28888 this._repeatDelay = value; 28889 return this._uncache(true); 28890 }; 28891 28892 p.yoyo = function(value) { 28893 if (!arguments.length) { 28894 return this._yoyo; 28895 } 28896 this._yoyo = value; 28897 return this; 28898 }; 28899 28900 p.currentLabel = function(value) { 28901 if (!arguments.length) { 28902 return this.getLabelBefore(this._time + _tinyNum); 28903 } 28904 return this.seek(value, true); 28905 }; 28906 28907 return TimelineMax; 28908 28909 }, true); 28910 28911 28912 28913 28914 28915 28916 28917 28918 28919 28920 28921 28922/* 28923 * ---------------------------------------------------------------- 28924 * BezierPlugin 28925 * ---------------------------------------------------------------- 28926 */ 28927 (function() { 28928 28929 var _RAD2DEG = 180 / Math.PI, 28930 _r1 = [], 28931 _r2 = [], 28932 _r3 = [], 28933 _corProps = {}, 28934 _globals = _gsScope._gsDefine.globals, 28935 Segment = function(a, b, c, d) { 28936 if (c === d) { //if c and d match, the final autoRotate value could lock at -90 degrees, so differentiate them slightly. 28937 c = d - (d - b) / 1000000; 28938 } 28939 if (a === b) { //if a and b match, the starting autoRotate value could lock at -90 degrees, so differentiate them slightly. 28940 b = a + (c - a) / 1000000; 28941 } 28942 this.a = a; 28943 this.b = b; 28944 this.c = c; 28945 this.d = d; 28946 this.da = d - a; 28947 this.ca = c - a; 28948 this.ba = b - a; 28949 }, 28950 _correlate = ",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,", 28951 cubicToQuadratic = function(a, b, c, d) { 28952 var q1 = {a:a}, 28953 q2 = {}, 28954 q3 = {}, 28955 q4 = {c:d}, 28956 mab = (a + b) / 2, 28957 mbc = (b + c) / 2, 28958 mcd = (c + d) / 2, 28959 mabc = (mab + mbc) / 2, 28960 mbcd = (mbc + mcd) / 2, 28961 m8 = (mbcd - mabc) / 8; 28962 q1.b = mab + (a - mab) / 4; 28963 q2.b = mabc + m8; 28964 q1.c = q2.a = (q1.b + q2.b) / 2; 28965 q2.c = q3.a = (mabc + mbcd) / 2; 28966 q3.b = mbcd - m8; 28967 q4.b = mcd + (d - mcd) / 4; 28968 q3.c = q4.a = (q3.b + q4.b) / 2; 28969 return [q1, q2, q3, q4]; 28970 }, 28971 _calculateControlPoints = function(a, curviness, quad, basic, correlate) { 28972 var l = a.length - 1, 28973 ii = 0, 28974 cp1 = a[0].a, 28975 i, p1, p2, p3, seg, m1, m2, mm, cp2, qb, r1, r2, tl; 28976 for (i = 0; i < l; i++) { 28977 seg = a[ii]; 28978 p1 = seg.a; 28979 p2 = seg.d; 28980 p3 = a[ii+1].d; 28981 28982 if (correlate) { 28983 r1 = _r1[i]; 28984 r2 = _r2[i]; 28985 tl = ((r2 + r1) * curviness * 0.25) / (basic ? 0.5 : _r3[i] || 0.5); 28986 m1 = p2 - (p2 - p1) * (basic ? curviness * 0.5 : (r1 !== 0 ? tl / r1 : 0)); 28987 m2 = p2 + (p3 - p2) * (basic ? curviness * 0.5 : (r2 !== 0 ? tl / r2 : 0)); 28988 mm = p2 - (m1 + (((m2 - m1) * ((r1 * 3 / (r1 + r2)) + 0.5) / 4) || 0)); 28989 } else { 28990 m1 = p2 - (p2 - p1) * curviness * 0.5; 28991 m2 = p2 + (p3 - p2) * curviness * 0.5; 28992 mm = p2 - (m1 + m2) / 2; 28993 } 28994 m1 += mm; 28995 m2 += mm; 28996 28997 seg.c = cp2 = m1; 28998 if (i !== 0) { 28999 seg.b = cp1; 29000 } else { 29001 seg.b = cp1 = seg.a + (seg.c - seg.a) * 0.6; //instead of placing b on a exactly, we move it inline with c so that if the user specifies an ease like Back.easeIn or Elastic.easeIn which goes BEYOND the beginning, it will do so smoothly. 29002 } 29003 29004 seg.da = p2 - p1; 29005 seg.ca = cp2 - p1; 29006 seg.ba = cp1 - p1; 29007 29008 if (quad) { 29009 qb = cubicToQuadratic(p1, cp1, cp2, p2); 29010 a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]); 29011 ii += 4; 29012 } else { 29013 ii++; 29014 } 29015 29016 cp1 = m2; 29017 } 29018 seg = a[ii]; 29019 seg.b = cp1; 29020 seg.c = cp1 + (seg.d - cp1) * 0.4; //instead of placing c on d exactly, we move it inline with b so that if the user specifies an ease like Back.easeOut or Elastic.easeOut which goes BEYOND the end, it will do so smoothly. 29021 seg.da = seg.d - seg.a; 29022 seg.ca = seg.c - seg.a; 29023 seg.ba = cp1 - seg.a; 29024 if (quad) { 29025 qb = cubicToQuadratic(seg.a, cp1, seg.c, seg.d); 29026 a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]); 29027 } 29028 }, 29029 _parseAnchors = function(values, p, correlate, prepend) { 29030 var a = [], 29031 l, i, p1, p2, p3, tmp; 29032 if (prepend) {
29033 values = [prepend].concat(values); 29034 i = values.length; 29035 while (--i > -1) { 29036 if (typeof( (tmp = values[i][p]) ) === "string") if (tmp.charAt(1) === "=") { 29037 values[i][p] = prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)); //accommodate relative values. Do it inline instead of breaking it out into a function for speed reasons 29038 } 29039 } 29040 } 29041 l = values.length - 2; 29042 if (l < 0) { 29043 a[0] = new Segment(values[0][p], 0, 0, values[0][p]); 29044 return a; 29045 } 29046 for (i = 0; i < l; i++) { 29047 p1 = values[i][p]; 29048 p2 = values[i+1][p]; 29049 a[i] = new Segment(p1, 0, 0, p2); 29050 if (correlate) { 29051 p3 = values[i+2][p]; 29052 _r1[i] = (_r1[i] || 0) + (p2 - p1) * (p2 - p1); 29053 _r2[i] = (_r2[i] || 0) + (p3 - p2) * (p3 - p2); 29054 } 29055 } 29056 a[i] = new Segment(values[i][p], 0, 0, values[i+1][p]); 29057 return a; 29058 }, 29059 bezierThrough = function(values, curviness, quadratic, basic, correlate, prepend) { 29060 var obj = {}, 29061 props = [], 29062 first = prepend || values[0], 29063 i, p, a, j, r, l, seamless, last; 29064 correlate = (typeof(correlate) === "string") ? ","+correlate+"," : _correlate; 29065 if (curviness == null) { 29066 curviness = 1; 29067 } 29068 for (p in values[0]) { 29069 props.push(p); 29070 } 29071 //check to see if the last and first values are identical (well, within 0.05). If so, make seamless by appending the second element to the very end of the values array and the 2nd-to-last element to the very beginning (we'll remove those segments later) 29072 if (values.length > 1) { 29073 last = values[values.length - 1]; 29074 seamless = true; 29075 i = props.length; 29076 while (--i > -1) { 29077 p = props[i]; 29078 if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors. 29079 seamless = false; 29080 break; 29081 } 29082 } 29083 if (seamless) { 29084 values = values.concat(); //duplicate the array to avoid contaminating the original which the user may be reusing for other tweens 29085 if (prepend) { 29086 values.unshift(prepend); 29087 } 29088 values.push(values[1]); 29089 prepend = values[values.length - 3]; 29090 } 29091 } 29092 _r1.length = _r2.length = _r3.length = 0; 29093 i = props.length; 29094 while (--i > -1) { 29095 p = props[i]; 29096 _corProps[p] = (correlate.indexOf(","+p+",") !== -1); 29097 obj[p] = _parseAnchors(values, p, _corProps[p], prepend); 29098 } 29099 i = _r1.length; 29100 while (--i > -1) { 29101 _r1[i] = Math.sqrt(_r1[i]); 29102 _r2[i] = Math.sqrt(_r2[i]); 29103 } 29104 if (!basic) { 29105 i = props.length; 29106 while (--i > -1) { 29107 if (_corProps[p]) { 29108 a = obj[props[i]]; 29109 l = a.length - 1; 29110 for (j = 0; j < l; j++) { 29111 r = (a[j+1].da / _r2[j] + a[j].da / _r1[j]) || 0; 29112 _r3[j] = (_r3[j] || 0) + r * r; 29113 } 29114 } 29115 } 29116 i = _r3.length; 29117 while (--i > -1) { 29118 _r3[i] = Math.sqrt(_r3[i]); 29119 } 29120 } 29121 i = props.length; 29122 j = quadratic ? 4 : 1; 29123 while (--i > -1) { 29124 p = props[i]; 29125 a = obj[p]; 29126 _calculateControlPoints(a, curviness, quadratic, basic, _corProps[p]); //this method requires that _parseAnchors() and _setSegmentRatios() ran first so that _r1, _r2, and _r3 values are populated for all properties 29127 if (seamless) { 29128 a.splice(0, j); 29129 a.splice(a.length - j, j); 29130 } 29131 } 29132 return obj; 29133 }, 29134 _parseBezierData = function(values, type, prepend) { 29135 type = type || "soft"; 29136 var obj = {}, 29137 inc = (type === "cubic") ? 3 : 2, 29138 soft = (type === "soft"), 29139 props = [], 29140 a, b, c, d, cur, i, j, l, p, cnt, tmp; 29141 if (soft && prepend) { 29142 values = [prepend].concat(values); 29143 } 29144 if (values == null || values.length < inc + 1) { throw "invalid Bezier data"; } 29145 for (p in values[0]) { 29146 props.push(p); 29147 } 29148 i = props.length; 29149 while (--i > -1) { 29150 p = props[i]; 29151 obj[p] = cur = []; 29152 cnt = 0; 29153 l = values.length; 29154 for (j = 0; j < l; j++) { 29155 a = (prepend == null) ? values[j][p] : (typeof( (tmp = values[j][p]) ) === "string" && tmp.charAt(1) === "=") ? prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)) : Number(tmp); 29156 if (soft) if (j > 1) if (j < l - 1) { 29157 cur[cnt++] = (a + cur[cnt-2]) / 2; 29158 } 29159 cur[cnt++] = a; 29160 } 29161 l = cnt - inc + 1; 29162 cnt = 0; 29163 for (j = 0; j < l; j += inc) { 29164 a = cur[j]; 29165 b = cur[j+1]; 29166 c = cur[j+2]; 29167 d = (inc === 2) ? 0 : cur[j+3]; 29168 cur[cnt++] = tmp = (inc === 3) ? new Segment(a, b, c, d) : new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c); 29169 } 29170 cur.length = cnt; 29171 } 29172 return obj; 29173 }, 29174 _addCubicLengths = function(a, steps, resolution) { 29175 var inc = 1 / resolution, 29176 j = a.length, 29177 d, d1, s, da, ca, ba, p, i, inv, bez, index; 29178 while (--j > -1) { 29179 bez = a[j]; 29180 s = bez.a; 29181 da = bez.d - s; 29182 ca = bez.c - s; 29183 ba = bez.b - s; 29184 d = d1 = 0; 29185 for (i = 1; i <= resolution; i++) { 29186 p = inc * i; 29187 inv = 1 - p; 29188 d = d1 - (d1 = (p * p * da + 3 * inv * (p * ca + inv * ba)) * p); 29189 index = j * resolution + i - 1; 29190 steps[index] = (steps[index] || 0) + d * d; 29191 } 29192 } 29193 }, 29194 _parseLengthData = function(obj, resolution) { 29195 resolution = resolution >> 0 || 6; 29196 var a = [], 29197 lengths = [], 29198 d = 0, 29199 total = 0, 29200 threshold = resolution - 1, 29201 segments = [], 29202 curLS = [], //current length segments array 29203 p, i, l, index; 29204 for (p in obj) { 29205 _addCubicLengths(obj[p], a, resolution); 29206 } 29207 l = a.length; 29208 for (i = 0; i < l; i++) { 29209 d += Math.sqrt(a[i]); 29210 index = i % resolution; 29211 curLS[index] = d; 29212 if (index === threshold) { 29213 total += d; 29214 index = (i / resolution) >> 0; 29215 segments[index] = curLS; 29216 lengths[index] = total; 29217 d = 0; 29218 curLS = []; 29219 } 29220 } 29221 return {length:total, lengths:lengths, segments:segments}; 29222 }, 29223 29224 29225 29226 BezierPlugin = _gsScope._gsDefine.plugin({ 29227 propName: "bezier", 29228 priority: -1, 29229 version: "1.3.8", 29230 API: 2, 29231 global:true, 29232 29233 //gets called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. 29234 init: function(target, vars, tween) { 29235 this._target = target; 29236 if (vars instanceof Array) { 29237 vars = {values:vars}; 29238 } 29239 this._func = {}; 29240 this._mod = {}; 29241 this._props = []; 29242 this._timeRes = (vars.timeResolution == null) ? 6 : parseInt(vars.timeResolution, 10); 29243 var values = vars.values || [], 29244 first = {}, 29245 second = values[0], 29246 autoRotate = vars.autoRotate || tween.vars.orientToBezier, 29247 p, isFunc, i, j, prepend; 29248 29249 this._autoRotate = autoRotate ? (autoRotate instanceof Array) ? autoRotate : [["x","y","rotation",((autoRotate === true) ? 0 : Number(autoRotate) || 0)]] : null; 29250 for (p in second) { 29251 this._props.push(p); 29252 } 29253 29254 i = this._props.length; 29255 while (--i > -1) { 29256 p = this._props[i]; 29257 29258 this._overwriteProps.push(p); 29259 isFunc = this._func[p] = (typeof(target[p]) === "function"); 29260 first[p] = (!isFunc) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ](); 29261 if (!prepend) if (first[p] !== values[0][p]) { 29262 prepend = first; 29263 } 29264 } 29265 this._beziers = (vars.type !== "cubic" && vars.type !== "quadratic" && vars.type !== "soft") ? bezierThrough(values, isNaN(vars.curviness) ? 1 : vars.curviness, false, (vars.type === "thruBasic"), vars.correlate, prepend) : _parseBezierData(values, vars.type, first); 29266 this._segCount = this._beziers[p].length; 29267 29268 if (this._timeRes) { 29269 var ld = _parseLengthData(this._beziers, this._timeRes); 29270 this._length = ld.length; 29271 this._lengths = ld.lengths; 29272 this._segments = ld.segments; 29273 this._l1 = this._li = this._s1 = this._si = 0; 29274 this._l2 = this._lengths[0]; 29275 this._curSeg = this._segments[0]; 29276 this._s2 = this._curSeg[0]; 29277 this._prec = 1 / this._curSeg.length; 29278 } 29279 29280 if ((autoRotate = this._autoRotate)) { 29281 this._initialRotations = []; 29282 if (!(autoRotate[0] instanceof Array)) { 29283 this._autoRotate = autoRotate = [autoRotate]; 29284 } 29285 i = autoRotate.length; 29286 while (--i > -1) { 29287 for (j = 0; j < 3; j++) { 29288 p = autoRotate[i][j]; 29289 this._func[p] = (typeof(target[p]) === "function") ? target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ] : false;
29290 } 29291 p = autoRotate[i][2]; 29292 this._initialRotations[i] = (this._func[p] ? this._func[p].call(this._target) : this._target[p]) || 0; 29293 this._overwriteProps.push(p); 29294 } 29295 } 29296 this._startRatio = tween.vars.runBackwards ? 1 : 0; //we determine the starting ratio when the tween inits which is always 0 unless the tween has runBackwards:true (indicating it's a from() tween) in which case it's 1. 29297 return true; 29298 }, 29299 29300 //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.) 29301 set: function(v) { 29302 var segments = this._segCount, 29303 func = this._func, 29304 target = this._target, 29305 notStart = (v !== this._startRatio), 29306 curIndex, inv, i, p, b, t, val, l, lengths, curSeg; 29307 if (!this._timeRes) { 29308 curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0; 29309 t = (v - (curIndex * (1 / segments))) * segments; 29310 } else { 29311 lengths = this._lengths; 29312 curSeg = this._curSeg; 29313 v *= this._length; 29314 i = this._li; 29315 //find the appropriate segment (if the currently cached one isn't correct) 29316 if (v > this._l2 && i < segments - 1) { 29317 l = segments - 1; 29318 while (i < l && (this._l2 = lengths[++i]) <= v) { } 29319 this._l1 = lengths[i-1]; 29320 this._li = i; 29321 this._curSeg = curSeg = this._segments[i]; 29322 this._s2 = curSeg[(this._s1 = this._si = 0)]; 29323 } else if (v < this._l1 && i > 0) { 29324 while (i > 0 && (this._l1 = lengths[--i]) >= v) { } 29325 if (i === 0 && v < this._l1) { 29326 this._l1 = 0; 29327 } else { 29328 i++; 29329 } 29330 this._l2 = lengths[i]; 29331 this._li = i; 29332 this._curSeg = curSeg = this._segments[i]; 29333 this._s1 = curSeg[(this._si = curSeg.length - 1) - 1] || 0; 29334 this._s2 = curSeg[this._si]; 29335 } 29336 curIndex = i; 29337 //now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one) 29338 v -= this._l1; 29339 i = this._si; 29340 if (v > this._s2 && i < curSeg.length - 1) { 29341 l = curSeg.length - 1; 29342 while (i < l && (this._s2 = curSeg[++i]) <= v) { } 29343 this._s1 = curSeg[i-1]; 29344 this._si = i; 29345 } else if (v < this._s1 && i > 0) { 29346 while (i > 0 && (this._s1 = curSeg[--i]) >= v) { } 29347 if (i === 0 && v < this._s1) { 29348 this._s1 = 0; 29349 } else { 29350 i++; 29351 } 29352 this._s2 = curSeg[i]; 29353 this._si = i; 29354 } 29355 t = ((i + (v - this._s1) / (this._s2 - this._s1)) * this._prec) || 0; 29356 } 29357 inv = 1 - t; 29358 29359 i = this._props.length; 29360 while (--i > -1) { 29361 p = this._props[i]; 29362 b = this._beziers[p][curIndex]; 29363 val = (t * t * b.da + 3 * inv * (t * b.ca + inv * b.ba)) * t + b.a; 29364 if (this._mod[p]) { 29365 val = this._mod[p](val, target); 29366 } 29367 if (func[p]) { 29368 target[p](val); 29369 } else { 29370 target[p] = val; 29371 } 29372 } 29373 29374 if (this._autoRotate) { 29375 var ar = this._autoRotate, 29376 b2, x1, y1, x2, y2, add, conv; 29377 i = ar.length; 29378 while (--i > -1) { 29379 p = ar[i][2]; 29380 add = ar[i][3] || 0; 29381 conv = (ar[i][4] === true) ? 1 : _RAD2DEG; 29382 b = this._beziers[ar[i][0]]; 29383 b2 = this._beziers[ar[i][1]]; 29384 29385 if (b && b2) { //in case one of the properties got overwritten. 29386 b = b[curIndex]; 29387 b2 = b2[curIndex]; 29388 29389 x1 = b.a + (b.b - b.a) * t; 29390 x2 = b.b + (b.c - b.b) * t; 29391 x1 += (x2 - x1) * t; 29392 x2 += ((b.c + (b.d - b.c) * t) - x2) * t; 29393 29394 y1 = b2.a + (b2.b - b2.a) * t; 29395 y2 = b2.b + (b2.c - b2.b) * t; 29396 y1 += (y2 - y1) * t; 29397 y2 += ((b2.c + (b2.d - b2.c) * t) - y2) * t; 29398 29399 val = notStart ? Math.atan2(y2 - y1, x2 - x1) * conv + add : this._initialRotations[i]; 29400 29401 if (this._mod[p]) { 29402 val = this._mod[p](val, target); //for modProps 29403 } 29404 29405 if (func[p]) { 29406 target[p](val); 29407 } else { 29408 target[p] = val; 29409 } 29410 } 29411 } 29412 } 29413 } 29414 }), 29415 p = BezierPlugin.prototype; 29416 29417 29418 BezierPlugin.bezierThrough = bezierThrough; 29419 BezierPlugin.cubicToQuadratic = cubicToQuadratic; 29420 BezierPlugin._autoCSS = true; //indicates that this plugin can be inserted into the "css" object using the autoCSS feature of TweenLite 29421 BezierPlugin.quadraticToCubic = function(a, b, c) { 29422 return new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c); 29423 }; 29424 29425 BezierPlugin._cssRegister = function() { 29426 var CSSPlugin = _globals.CSSPlugin; 29427 if (!CSSPlugin) { 29428 return; 29429 } 29430 var _internals = CSSPlugin._internals, 29431 _parseToProxy = _internals._parseToProxy, 29432 _setPluginRatio = _internals._setPluginRatio, 29433 CSSPropTween = _internals.CSSPropTween; 29434 _internals._registerComplexSpecialProp("bezier", {parser:function(t, e, prop, cssp, pt, plugin) { 29435 if (e instanceof Array) { 29436 e = {values:e}; 29437 } 29438 plugin = new BezierPlugin(); 29439 var values = e.values, 29440 l = values.length - 1, 29441 pluginValues = [], 29442 v = {}, 29443 i, p, data; 29444 if (l < 0) { 29445 return pt; 29446 } 29447 for (i = 0; i <= l; i++) { 29448 data = _parseToProxy(t, values[i], cssp, pt, plugin, (l !== i)); 29449 pluginValues[i] = data.end; 29450 } 29451 for (p in e) { 29452 v[p] = e[p]; //duplicate the vars object because we need to alter some things which w
29452ould cause problems if the user plans to reuse the same vars object for another tween. 29453 } 29454 v.values = pluginValues; 29455 pt = new CSSPropTween(t, "bezier", 0, 0, data.pt, 2); 29456 pt.data = data; 29457 pt.plugin = plugin; 29458 pt.setRatio = _setPluginRatio; 29459 if (v.autoRotate === 0) { 29460 v.autoRotate = true; 29461 } 29462 if (v.autoRotate && !(v.autoRotate instanceof Array)) { 29463 i = (v.autoRotate === true) ? 0 : Number(v.autoRotate); 29464 v.autoRotate = (data.end.left != null) ? [["left","top","rotation",i,false]] : (data.end.x != null) ? [["x","y","rotation",i,false]] : false; 29465 } 29466 if (v.autoRotate) { 29467 if (!cssp._transform) { 29468 cssp._enableTransforms(false); 29469 } 29470 data.autoRotate = cssp._target._gsTransform; 29471 data.proxy.rotation = data.autoRotate.rotation || 0; 29472 cssp._overwriteProps.push("rotation"); 29473 } 29474 plugin._onInitTween(data.proxy, v, cssp._tween); 29475 return pt; 29476 }}); 29477 }; 29478 29479 p._mod = function(lookup) { 29480 var op = this._overwriteProps, 29481 i = op.length, 29482 val; 29483 while (--i > -1) { 29484 val = lookup[op[i]]; 29485 if (val && typeof(val) === "function") { 29486 this._mod[op[i]] = val; 29487 } 29488 } 29489 }; 29490 29491 p._kill = function(lookup) { 29492 var a = this._props, 29493 p, i; 29494 for (p in this._beziers) { 29495 if (p in lookup) { 29496 delete this._beziers[p]; 29497 delete this._func[p]; 29498 i = a.length; 29499 while (--i > -1) { 29500 if (a[i] === p) { 29501 a.splice(i, 1); 29502 } 29503 } 29504 } 29505 } 29506 a = this._autoRotate; 29507 if (a) { 29508 i = a.length; 29509 while (--i > -1) { 29510 if (lookup[a[i][2]]) { 29511 a.splice(i, 1); 29512 } 29513 } 29514 } 29515 return this._super._kill.call(this, lookup); 29516 }; 29517 29518 }()); 29519 29520 29521 29522 29523 29524 29525 29526 29527 29528 29529 29530 29531 29532 29533/* 29534 * ---------------------------------------------------------------- 29535 * CSSPlugin 29536 * ---------------------------------------------------------------- 29537 */ 29538 _gsScope._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function(TweenPlugin, TweenLite) { 29539 29540 /** @constructor **/ 29541 var CSSPlugin = function() { 29542 TweenPlugin.call(this, "css"); 29543 this._overwriteProps.length = 0; 29544 this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method) 29545 }, 29546 _globals = _gsScope._gsDefine.globals, 29547 _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called. 29548 _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance 29549 _cs, //computed style (we store this in a shared variable to conserve memory and make minification tighter 29550 _overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification. 29551 _specialProps = {}, 29552 p = CSSPlugin.prototype = new TweenPlugin("css"); 29553 29554 p.constructor = CSSPlugin; 29555 CSSPlugin.version = "2.1.0"; 29556 CSSPlugin.API = 2; 29557 CSSPlugin.defaultTransformPerspective = 0; 29558 CSSPlugin.defaultSkewType = "compensated"; 29559 CSSPlugin.defaultSmoothOrigin = true; 29560 p = "px"; //we'll reuse the "p" variable to keep file size down 29561 CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""}; 29562 29563 29564 var _numExp = /(?:\-|\.|\b)(\d|\.|e\-)+/g, 29565 _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g, 29566 _valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)" 29567 _NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and += 29568 _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g, 29569 _opacityExp = /opacity *= *([^)]*)/i, 29570 _opacityValExp = /opacity:([^;]*)/i,
29571 _alphaFilterExp = /alpha\(opacity *=.+?\)/i, 29572 _rgbhslExp = /^(rgb|hsl)/, 29573 _capsExp = /([A-Z])/g, 29574 _camelExp = /-([a-z])/gi, 29575 _urlExp = /(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi, //for pulling out urls from url(...) or url("...") strings (some browsers wrap urls in quotes, some don't when reporting things like backgroundImage) 29576 _camelFunc = function(s, g) { return g.toUpperCase(); }, 29577 _horizExp = /(?:Left|Right|Width)/i, 29578 _ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi, 29579 _ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i, 29580 _commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis 29581 _complexExp = /[\s,\(]/i, //for testing a string to find if it has a space, comma, or open parenthesis (clues that it's a complex value) 29582 _DEG2RAD = Math.PI / 180, 29583 _RAD2DEG = 180 / Math.PI, 29584 _forcePT = {}, 29585 _dummyElement = {style:{}}, 29586 _doc = _gsScope.document || {createElement: function() {return _dummyElement;}}, 29587 _createElement = function(type, ns) { 29588 return (ns && _doc.createElementNS) ? _doc.createElementNS(ns, type) : _doc.createElement(type); 29589 }, 29590 _tempDiv = _createElement("div"), 29591 _tempImg = _createElement("img"), 29592 _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins 29593 _agent = (_gsScope.navigator || {}).userAgent || "", 29594 _autoRound, 29595 _reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance). 29596 29597 _isSafari, 29598 _isFirefox, //Firefox has a bug that causes 3D transformed elements to randomly disappear unless a repaint is forced after each update on each element. 29599 _isSafariLT6, //Safari (and Android 4 which uses a flavor of Safari) has a bug that prevents changes to "top" and "left" properties from rendering properly if changed on the same frame as a transform UNLESS we set the element's WebkitBackfaceVisibility to hidden (weird, I know). Doing this for Android 3 and earlier seems to actually cause other problems, though (fun!) 29600 _ieVers, 29601 _supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version. 29602 var i = _agent.indexOf("Android"), 29603 a = _createElement("a"); 29604 _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || parseFloat(_agent.substr(i+8, 2)) > 3)); 29605 _isSafariLT6 = (_isSafari && (parseFloat(_agent.substr(_agent.indexOf("Version/")+8, 2)) < 6)); 29606 _isFirefox = (_agent.indexOf("Firefox") !== -1); 29607 if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) { 29608 _ieVers = parseFloat( RegExp.$1 ); 29609 } 29610 if (!a) { 29611 return false; 29612 } 29613 a.style.cssText = "top:1px;opacity:.55;"; 29614 return /^0.55/.test(a.style.opacity); 29615 }()), 29616 _getIEOpacity = function(v) { 29617 return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1); 29618 }, 29619 _log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE. 29620 if (_gsScope.console) { 29621 console.log(s); 29622 } 29623 }, 29624 _target, //when initting a CSSPlugin, we set this variable so that we can access it from within many other functions without having to pass it around as params 29625 _index, //when initting a CSSPlugin, we set this variable so that we can access it from within many other functions without having to pass it around as params 29626 29627 _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-" 29628 _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz". 29629 29630 // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all) 29631 _checkPropPrefix = function(p, e) { 29632 e = e || _tempDiv; 29633 var s = e.style, 29634 a, i; 29635 if (s[p] !== undefined) { 29636 return p; 29637 } 29638 p = p.charAt(0).toUpperCase() + p.substr(1); 29639 a = ["O","Moz","ms","Ms","Webkit"]; 29640 i = 5; 29641 while (--i > -1 && s[a[i]+p] === undefined) { } 29642 if (i >= 0) { 29643 _prefix = (i === 3) ? "ms" : a[i]; 29644 _prefixCSS = "-" + _prefix.toLowerCase() + "-"; 29645 return _prefix + p; 29646 } 29647 return null; 29648 }, 29649 29650 _computedStyleScope = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}), 29651 _getComputedStyle = function(e) { 29652 return _computedStyleScope.getComputedStyle(e); //to avoid errors in Microsoft Edge, we need to call getComputedStyle() from a specific scope, typically window. 29653 }, 29654 29655 /** 29656 * @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do: 29657 * var currentLeft = CSSPlugin.getStyle( document.getElementById("myElement"), "left"); 29658 * 29659 * @param {!Object} t Target element whose style property you want to query 29660 * @param {!string} p Property name (like "left" or "top" or "marginTop", etc.) 29661 * @param {Object=} cs Computed style object. This just provides a way to speed processing if you're going to get several properties on the same element in quick succession - you can reuse the result of the getComputedStyle() call. 29662 * @param {boolean=} calc If true, the value will not be read directly from the element's "style" property (if it exists there), but instead the getComputedStyle() result will be used. This can be useful when you want to ensure that the browser itself is interpreting the value. 29663 * @param {string=} dflt Default value that should be returned in the place of null, "none", "auto" or "auto auto". 29664 * @return {?string} The current property value 29665 */ 29666 _getStyle = CSSPlugin.getStyle = function(t, p, cs, calc, dflt) { 29667 var rv; 29668 if (!_supportsOpacity) if (p === "opacity") { //several versions of IE don't use the standard "opacity" property - they use things like filter:alpha(opacity=50), so we parse that here. 29669 return _getIEOpacity(t); 29670 } 29671 if (!calc && t.style[p]) { 29672 rv = t.style[p]; 29673 } else if ((cs = cs || _getComputedStyle(t))) { 29674 rv = cs[p] || cs.getPropertyValue(p) || cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase()); 29675 } else if (t.currentStyle) { 29676 rv = t.currentStyle[p]; 29677 } 29678 return (dflt != null && (!rv || rv === "none" || rv === "auto" || rv === "auto auto")) ? dflt : rv; 29679 }, 29680 29681 /** 29682 * @private Pass the target element, the property name, the numeric value, and the suffix (like "%", "em", "px", etc.) and it will spit back the equivalent pixel number. 29683 * @param {!Object} t Target element 29684 * @param {!string} p Property name (like "left", "top", "marginLeft", etc.) 29685 * @param {!number} v Value 29686 * @param {string=} sfx Suffix (like "px" or "%" or "em") 29687 * @param {boolean=} recurse If true, the call is a recursive one. In some browsers (like IE7/8), occasionally the value isn't accurately reported initially, but if we run the function again it will take effect. 29688 * @return {number} value in pixels 29689 */ 29690 _convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) { 29691 if (sfx === "px" || (!sfx && p !== "lineHeight")) { return v; } 29692 if (sfx === "auto" || !v) { return 0; } 29693 var horiz = _horizExp.test(p), 29694 node = t, 29695 style = _tempDiv.style, 29696 neg = (v < 0), 29697 precise = (v === 1), 29698 pix, cache, time; 29699 if (neg) { 29700 v = -v; 29701 } 29702 if (precise) { 29703 v *= 100; 29704 } 29705 if (p === "lineHeight" && !sfx) { //special case of when a simple lineHeight (without a unit) is used. Set it to the value, read back the computed value, and then revert. 29706 cache = _getComputedStyle(t).lineHeight; 29707 t.style.lineHeight = v; 29708 pix = parseFloat(_getComputedStyle(t).lineHeight); 29709 t.style.lineHeight = cache; 29710 } else if (sfx === "%" && p.indexOf("border") !== -1) { 29711 pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight); 29712 } else { 29713 style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;"; 29714 if (sfx === "%" || !node.appendChild || sfx.charAt(0) === "v" || sfx === "rem") { 29715 node = t.parentNode || _doc.body; 29716 if (_getStyle(node, "display").indexOf("flex") !== -1) { //Edge and IE11 have a bug that causes offsetWidth to report as 0 if the container has display:flex and the child is position:relative. Switching to position: absolute solves it. 29717 style.position = "absolute"; 29718 } 29719 cache = node._gsCache; 29720 time = TweenLite.ticker.frame; 29721 if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick) 29722 return cache.width * v / 100; 29723 } 29724 style[(horiz ? "width" : "height")] = v + sfx; 29725 } else { 29726 style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx; 29727 } 29728 node.appendChild(_tempDiv); 29729 pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]); 29730 node.removeChild(_tempDiv); 29731 if (horiz && sfx === "%" && CSSPlugin.cacheWidths !== false) { 29732 cache = node._gsCache = node._gsCache || {}; 29733 cache.time = time; 29734 cache.width = pix / v * 100; 29735 } 29736 if (pix === 0 && !recurse) { 29737 pix = _convertToPixels(t, p, v, sfx, true); 29738 } 29739 } 29740 if (precise) { 29741 pix /= 100; 29742 } 29743 return neg ? -pix : pix; 29744 }, 29745 _calculateOffset = _internals.calculateOffset = function(t, p, cs) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop 29746 if (_getStyle(t, "position", cs) !== "absolute") { return 0; } 29747 var dim = ((p === "left") ? "Left" : "Top"),
29748 v = _getStyle(t, "margin" + dim, cs); 29749 return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0); 29750 }, 29751 29752 // @private returns at object containing ALL of the style properties in camelCase and their associated values. 29753 _getAllStyles = function(t, cs) { 29754 var s = {}, 29755 i, tr, p; 29756 if ((cs = cs || _getComputedStyle(t, null))) { 29757 if ((i = cs.length)) { 29758 while (--i > -1) { 29759 p = cs[i]; 29760 if (p.indexOf("-transform") === -1 || _transformPropCSS === p) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here. 29761 s[p.replace(_camelExp, _camelFunc)] = cs.getPropertyValue(p); 29762 } 29763 } 29764 } else { //some browsers behave differently - cs.length is always 0, so we must do a for...in loop. 29765 for (i in cs) { 29766 if (i.indexOf("Transform") === -1 || _transformProp === i) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here. 29767 s[i] = cs[i]; 29768 } 29769 } 29770 } 29771 } else if ((cs = t.currentStyle || t.style)) { 29772 for (i in cs) { 29773 if (typeof(i) === "string" && s[i] === undefined) { 29774 s[i.replace(_camelExp, _camelFunc)] = cs[i]; 29775 } 29776 } 29777 } 29778 if (!_supportsOpacity) { 29779 s.opacity = _getIEOpacity(t); 29780 } 29781 tr = _getTransform(t, cs, false); 29782 s.rotation = tr.rotation; 29783 s.skewX = tr.skewX; 29784 s.scaleX = tr.scaleX; 29785 s.scaleY = tr.scaleY; 29786 s.x = tr.x; 29787 s.y = tr.y; 29788 if (_supports3D) { 29789 s.z = tr.z; 29790 s.rotationX = tr.rotationX; 29791 s.rotationY = tr.rotationY; 29792 s.scaleZ = tr.scaleZ; 29793 } 29794 if (s.filters) { 29795 delete s.filters; 29796 } 29797 return s; 29798 }, 29799 29800 // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object c
29800ontaining only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details. 29801 _cssDif = function(t, s1, s2, vars, forceLookup) { 29802 var difs = {}, 29803 style = t.style, 29804 val, p, mpt; 29805 for (p in s2) { 29806 if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] !== (val = s2[p]) || (forceLookup && forceLookup[p])) if (p.indexOf("Origin") === -1) if (typeof(val) === "number" || typeof(val) === "string") { 29807 difs[p] = (val === "auto" && (p === "left" || p === "top")) ? _calculateOffset(t, p) : ((val === "" || val === "auto" || val === "none") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween. 29808 if (style[p] !== undefined) { //for className tweens, we must remember which properties already existed inline - the ones that didn't should be removed when the tween isn't in progress because they were only introduced to facilitate the transition between classes. 29809 mpt = new MiniPropTween(style, p, style[p], mpt); 29810 } 29811 } 29812 } 29813 if (vars) { 29814 for (p in vars) { //copy properties (except className) 29815 if (p !== "className") { 29816 difs[p] = vars[p]; 29817 } 29818 } 29819 } 29820 return {difs:difs, firstMPT:mpt}; 29821 }, 29822 _dimensions = {width:["Left","Right"], height:["Top","Bottom"]}, 29823 _margins = ["marginLeft","marginRight","marginTop","marginBottom"], 29824 29825 /** 29826 * @private Gets the width or height of an element 29827 * @param {!Object} t Target element 29828 * @param {!string} p Property name ("width" or "height") 29829 * @param {Object=} cs Computed style object (if one exists). Just a speed optimization. 29830 * @return {number} Dimension (in pixels) 29831 */ 29832 _getDimension = function(t, p, cs) { 29833 if ((t.nodeName + "").toLowerCase() === "svg") { //Chrome no longer supports offsetWidth/offsetHeight on SVG elements. 29834 return (cs || _getComputedStyle(t))[p] || 0; 29835 } else if (t.getCTM && _isSVG(t)) { 29836 return t.getBBox()[p] || 0; 29837 } 29838 var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight), 29839 a = _dimensions[p], 29840 i = a.length; 29841 cs = cs || _getComputedStyle(t, null); 29842 while (--i > -1) { 29843 v -= parseFloat( _getStyle(t, "padding" + a[i], cs, true) ) || 0; 29844 v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0; 29845 } 29846 return v; 29847 }, 29848 29849 // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value) 29850 _parsePosition = function(v, recObj) { 29851 if (v === "contain" || v === "auto" || v === "auto auto") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto". 29852 return v + " "; 29853 } 29854 if (v == null || v === "") { 29855 v = "0 0"; 29856 } 29857 var a = v.split(" "), 29858 x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0], 29859 y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1], 29860 i; 29861 if (a.length > 3 && !recObj) { //multiple positions 29862 a = v.split(", ").join(",").split(","); 29863 v = []; 29864 for (i = 0; i < a.length; i++) { 29865 v.push(_parsePosition(a[i])); 29866 } 29867 return v.join(","); 29868 } 29869 if (y == null) { 29870 y = (x === "center") ? "50%" : "0"; 29871 } else if (y === "center") { 29872 y = "50%"; 29873 } 29874 if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it c
29874ould be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative. 29875 x = "50%"; 29876 } 29877 v = x + " " + y + ((a.length > 2) ? " " + a[2] : ""); 29878 if (recObj) { 29879 recObj.oxp = (x.indexOf("%") !== -1); 29880 recObj.oyp = (y.indexOf("%") !== -1); 29881 recObj.oxr = (x.charAt(1) === "="); 29882 recObj.oyr = (y.charAt(1) === "="); 29883 recObj.ox = parseFloat(x.replace(_NaNExp, "")); 29884 recObj.oy = parseFloat(y.replace(_NaNExp, "")); 29885 recObj.v = v; 29886 } 29887 return recObj || v; 29888 }, 29889 29890 /** 29891 * @private Takes an ending value (typically a string, but can be a number) and a starting value and returns the change between the two, looking for relative value indicators like += and -= and it also ignores suffixes (but make sure the ending value starts with a number or +=/-= and that the starting value is a NUMBER!) 29892 * @param {(number|string)} e End value which is typically a string, but could be a number 29893 * @param {(number|string)} b Beginning value which is typically a string but could be a number 29894 * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized) 29895 */ 29896 _parseChange = function(e, b) { 29897 if (typeof(e) === "function") { 29898 e = e(_index, _target); 29899 } 29900 return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : (parseFloat(e) - parseFloat(b)) || 0; 29901 }, 29902 29903 /** 29904 * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function. 29905 * @param {Object} v Value to be parsed 29906 * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter) 29907 * @return {number} Parsed value 29908 */ 29909 _parseVal = function(v, d) { 29910 if (typeof(v) === "function") { 29911 v = v(_index, _target); 29912 } 29913 var isRelative = (typeof(v) === "string" && v.charAt(1) === "="); 29914 if (typeof(v) === "string" && v.charAt(v.length - 2) === "v") { //convert vw and vh into px-equivalents. 29915 v = (isRelative ? v.substr(0, 2) : 0) + (window["inner" + ((v.substr(-2) === "vh") ? "Height" : "Width")] * (parseFloat(isRelative ? v.substr(2) : v) / 100)); 29916 } 29917 return (v == null) ? d : isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v) || 0; 29918 }, 29919 29920 /** 29921 * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly. 29922 * @param {Object} v Value to be parsed 29923 * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter) 29924 * @param {string=} p property name for directionalEnd (optional - only used when the parsed value is directional ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation). Property name would be "rotation", "rotationX", or "rotationY" 29925 * @param {Object=} directionalEnd An object that will store the raw end values for directional angles ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation. 29926 * @return {number} parsed angle in radians 29927 */ 29928 _parseAngle = function(v, d, p, directionalEnd) { 29929 var min = 0.000001, 29930 cap, split, dif, result, isRelative; 29931 if (typeof(v) === "function") { 29932 v = v(_index, _target); 29933 } 29934 if (v == null) { 29935 result = d; 29936 } else if (typeof(v) === "number") { 29937 result = v; 29938 } else { 29939 cap = 360; 29940 split = v.split("_"); 29941 isRelative = (v.charAt(1) === "="); 29942 dif = (isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(split[0].substr(2)) : parseFloat(split[0])
29942) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - (isRelative ? 0 : d); 29943 if (split.length) { 29944 if (directionalEnd) { 29945 directionalEnd[p] = d + dif; 29946 } 29947 if (v.indexOf("short") !== -1) { 29948 dif = dif % cap; 29949 if (dif !== dif % (cap / 2)) { 29950 dif = (dif < 0) ? dif + cap : dif - cap; 29951 } 29952 } 29953 if (v.indexOf("_cw") !== -1 && dif < 0) { 29954 dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 29955 } else if (v.indexOf("ccw") !== -1 && dif > 0) { 29956 dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 29957 } 29958 } 29959 result = d + dif; 29960 } 29961 if (result < min && result > -min) { 29962 result = 0; 29963 } 29964 return result; 29965 }, 29966 29967 _colorLookup = {aqua:[0,255,255], 29968 lime:[0,255,0], 29969 silver:[192,192,192], 29970 black:[0,0,0], 29971 maroon:[128,0,0], 29972 teal:[0,128,128], 29973 blue:[0,0,255], 29974 navy:[0,0,128], 29975 white:[255,255,255], 29976 fuchsia:[255,0,255], 29977 olive:[128,128,0], 29978 yellow:[255,255,0], 29979 orange:[255,165,0], 29980 gray:[128,128,128], 29981 purple:[128,0,128], 29982 green:[0,128,0], 29983 red:[255,0,0], 29984 pink:[255,192,203], 29985 cyan:[0,255,255], 29986 transparent:[255,255,255,0]}, 29987 29988 _hue = function(h, m1, m2) { 29989 h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h; 29990 return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0; 29991 }, 29992 29993 /** 29994 * @private Parses a color (like #9F0, #FF9900, rgb(255,51,153) or hsl(108, 50%, 10%)) into an array with 3 elements for red, green, and blue or if toHSL parameter is true, it will populate the array with hue, saturation, and lightness values. If a relative value is found in an hsl() or hsla() string, it will preserve those relative prefixes and all the values in the array will be strings instead of numbers (in all other cases it will be populated with numbers). 29995 * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc. 29996 * @param {(boolean)} toHSL If true, an hsl() or hsla() value will be returned instead of rgb() or rgba() 29997 * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order, or if the toHSL parameter was true, the array will contain hue, saturation and lightness (and optionally alpha) in that order. Always numbers unless there's a relative prefix found in an hsl() or hsla() string and toHSL is true. 29998 */ 29999 _parseColor = CSSPlugin.parseColor = function(v, toHSL) { 30000 var a, r, g, b, h, s, l, max, min, d, wasHSL; 30001 if (!v) { 30002 a = _colorLookup.black; 30003 } else if (typeof(v) === "number") { 30004 a = [v >> 16, (v >> 8) & 255, v & 255]; 30005 } else { 30006 if (v.charAt(v.length - 1) === ",") { //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value. 30007 v = v.substr(0, v.length - 1); 30008 } 30009 if (_colorLookup[v]) { 30010 a = _colorLookup[v]; 30011 } else if (v.charAt(0) === "#") { 30012 if (v.length === 4) { //for shorthand like #9F0 30013 r = v.charAt(1); 30014 g = v.charAt(2); 30015 b = v.charAt(3); 30016 v = "#" + r + r + g + g + b + b; 30017 } 30018 v = parseInt(v.substr(1), 16); 30019 a = [v >> 16, (v >> 8) & 255, v & 255]; 30020 } else if (v.substr(0, 3) === "hsl") { 30021 a = wasHSL = v.match(_numExp); 30022 if (!toHSL) { 30023 h = (Number(a[0]) % 360) / 360;
30024 s = Number(a[1]) / 100; 30025 l = Number(a[2]) / 100; 30026 g = (l <= 0.5) ? l * (s + 1) : l + s - l * s; 30027 r = l * 2 - g; 30028 if (a.length > 3) { 30029 a[3] = Number(a[3]); 30030 } 30031 a[0] = _hue(h + 1 / 3, r, g); 30032 a[1] = _hue(h, r, g); 30033 a[2] = _hue(h - 1 / 3, r, g); 30034 } else if (v.indexOf("=") !== -1) { //if relative values are found, just return the raw strings with the relative prefixes in place. 30035 return v.match(_relNumExp); 30036 } 30037 } else { 30038 a = v.match(_numExp) || _colorLookup.transparent; 30039 } 30040 a[0] = Number(a[0]); 30041 a[1] = Number(a[1]); 30042 a[2] = Number(a[2]); 30043 if (a.length > 3) { 30044 a[3] = Number(a[3]); 30045 } 30046 } 30047 if (toHSL && !wasHSL) { 30048 r = a[0] / 255; 30049 g = a[1] / 255; 30050 b = a[2] / 255; 30051 max = Math.max(r, g, b); 30052 min = Math.min(r, g, b); 30053 l = (max + min) / 2; 30054 if (max === min) { 30055 h = s = 0; 30056 } else { 30057 d = max - min; 30058 s = l > 0.5 ? d / (2 - max - min) : d / (max + min); 30059 h = (max === r) ? (g - b) / d + (g < b ? 6 : 0) : (max === g) ? (b - r) / d + 2 : (r - g) / d + 4; 30060 h *= 60; 30061 } 30062 a[0] = (h + 0.5) | 0; 30063 a[1] = (s * 100 + 0.5) | 0; 30064 a[2] = (l * 100 + 0.5) | 0; 30065 } 30066 return a; 30067 }, 30068 _formatColors = function(s, toHSL) { 30069 var colors = s.match(_colorExp) || [], 30070 charIndex = 0, 30071 parsed = "", 30072 i, color, temp; 30073 if (!colors.length) { 30074 return s; 30075 } 30076 for (i = 0; i < colors.length; i++) { 30077 color = colors[i]; 30078 temp = s.substr(charIndex, s.indexOf(color, charIndex)-charIndex); 30079 charIndex += temp.length + color.length; 30080 color = _parseColor(color, toHSL); 30081 if (color.length === 3) { 30082 color.push(1); 30083 } 30084 parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")"; 30085 } 30086 return parsed + s.substr(charIndex); 30087 }, 30088 _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc. 30089 30090 for (p in _colorLookup) { 30091 _colorExp += "|" + p + "\\b"; 30092 } 30093 _colorExp = new RegExp(_colorExp+")", "gi"); 30094 30095 CSSPlugin.colorStringFilter = function(a) { 30096 var combined = a[0] + " " + a[1], 30097 toHSL; 30098 if (_colorExp.test(combined)) { 30099 toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1); 30100 a[0] = _formatColors(a[0], toHSL); 30101 a[1] = _formatColors(a[1], toHSL); 30102 } 30103 _colorExp.lastIndex = 0; 30104 }; 30105 30106 if (!TweenLite.defaultStringFilter) { 30107 TweenLite.defaultStringFilter = CSSPlugin.colorStringFilter; 30108 } 30109 30110 /** 30111 * @private Returns a formatter function that handles taking a string (or number in some cases) and returning a consistently formatted one in terms of delimiters, quantity of values, etc. For example, we may get boxShadow values defined as "0px red" or "0px 0px 10px rgb(255,0,0)" or "0px 0px 20px 20px #F00" and we need to ensure that what we get back is described with 4 numbers and a color. This allows us to feed it into the _parseComplex() method and split the values up appropriately. The neat thing about this _getFormatter() function is that the dflt defines a pattern as well as a default, so for example, _getFormatter("0px 0px 0px 0px #777", true) not only sets the default as 0px for all distances and #777 for the color, but also sets the pattern such that 4 numbers and a color will always get returned. 30112 * @param {!string} dflt The default value and pattern to follow. So "0px 0px 0px 0px #777" will ensure that 4 numbers and a color will always get returned. 30113 * @param {boolean=} clr If true, the values should be searched for color-related data. For example, boxShadow values typically contain a color whereas borderRadius don't. 30114 * @param {boolean=} collapsible If true, the value is a top/left/right/bottom style one that acts like margin or padding, where if only one value is received, it's used for all 4; if 2 are received, the first is duplicated for 3rd (bottom) and the 2nd is duplicated for the 4th spot (left), etc. 30115 * @return {Function} formatter function 30116 */ 30117 var _getFormatter = function(dflt, clr, collapsible, multi) { 30118 if (dflt == null) { 30119 return function(v) {return v;}; 30120 } 30121 var dColor = clr ? (dflt.match(_colorExp) || [""])[0] : "", 30122 dVals = dflt.split(dColor).join("").match(_valuesExp) || [], 30123 pfx = dflt.substr(0, dflt.indexOf(dVals[0])), 30124 sfx = (dflt.charAt(dflt.length - 1) === ")") ? ")" : "", 30125 delim = (dflt.indexOf(" ") !== -1) ? " " : ",", 30126 numVals = dVals.length, 30127 dSfx = (numVals > 0) ? dVals[0].replace(_numExp, "") : "", 30128 formatter; 30129 if (!numVals) { 30130 return function(v) {return v;}; 30131 } 30132 if (clr) { 30133 formatter = function(v) { 30134 var color, vals, i, a; 30135 if (typeof(v) === "number") { 30136 v += dSfx; 30137 } else if (multi && _commasOutsideParenExp.test(v)) { 30138 a = v.replace(_commasOutsideParenExp, "|").split("|"); 30139 for (i = 0; i < a.length; i++) { 30140 a[i] = formatter(a[i]); 30141 } 30142 return a.join(","); 30143 } 30144 color = (v.match(_colorExp) || [dColor])[0]; 30145 vals = v.split(color).join("").match(_valuesExp) || []; 30146 i = vals.length; 30147 if (numVals > i--) { 30148 while (++i < numVals) { 30149 vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i]; 30150 } 30151 } 30152 return pfx + vals.join(delim) + delim + color + sfx + (v.indexOf("inset") !== -1 ? " inset" : ""); 30153 }; 30154 return formatter; 30155 30156 } 30157 formatter = function(v) { 30158 var vals, a, i; 30159 if (typeof(v) === "number") { 30160 v += dSfx; 30161 } else if (multi && _commasOutsideParenExp.test(v)) { 30162 a = v.replace(_commasOutsideParenExp, "|").split("|"); 30163 for (i = 0; i < a.length; i++) { 30164 a[i] = formatter(a[i]); 30165 } 30166 return a.join(","); 30167 } 30168 vals = v.match(_valuesExp) || []; 30169 i = vals.length; 30170 if (numVals > i--) { 30171 while (++i < numVals) { 30172 vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i]; 30173 } 30174 } 30175 return pfx + vals.join(delim) + sfx; 30176 }; 30177 return formatter; 30178 }, 30179 30180 /** 30181 * @private returns a formatter function that's used for edge-related values like marginTop, marginLeft, paddingBottom, paddingRight, etc. Just pass a comma-delimited list of property names related to the edges. 30182 * @param {!string} props a comma-delimited list of property names in order from top to left, like "marginTop,marginRight,marginBottom,marginLeft" 30183 * @return {Function} a formatter function 30184 */ 30185 _getEdgeParser = function(props) { 30186 props = props.split(","); 30187 return function(t, e, p, cssp, pt, plugin, vars) { 30188 var a = (e + "").split(" "), 30189 i; 30190 vars = {}; 30191 for (i = 0; i < 4; i++) { 30192 vars[props[i]] = a[i] = a[i] || a[(((i - 1) / 2) >> 0)]; 30193 } 30194 return cssp.parse(t, vars, pt, plugin); 30195 }; 30196 }, 30197 30198 // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color. 30199 _setPluginRatio = _internals._setPluginRatio = function(v) { 30200 this.plugin.setRatio(v); 30201 var d = this.data, 30202 proxy = d.proxy, 30203 mpt = d.firstMPT, 30204 min = 0.000001, 30205 val, pt, i, str, p; 30206 while (mpt) { 30207 val = proxy[mpt.v]; 30208 if (mpt.r) { 30209 val = mpt.r(val); 30210 } else if (val < min && val > -min) { 30211 val = 0; 30212 } 30213 mpt.t[mpt.p] = val; 30214 mpt = mpt._next; 30215 } 30216 if (d.autoRotate) { 30217 d.autoRotate.rotation = d.mod ? d.mod.call(this._tween, proxy.rotation, this.t, this._tween) : proxy.rotation; //special case for ModifyPlugin to hook into an auto-rotating bezier 30218 } 30219 //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. Same for "b" at the beginning. 30220 if (v === 1 || v === 0) { 30221 mpt = d.firstMPT; 30222 p = (v === 1) ? "e" : "b"; 30223 while (mpt) { 30224 pt = mpt.t; 30225 if (!pt.type) { 30226 pt[p] = pt.s + pt.xs0; 30227 } else if (pt.type === 1) { 30228 str = pt.xs0 + pt.s + pt.xs1; 30229 for (i = 1; i < pt.l; i++) {
30230 str += pt["xn"+i] + pt["xs"+(i+1)]; 30231 } 30232 pt[p] = str; 30233 } 30234 mpt = mpt._next; 30235 } 30236 } 30237 }, 30238 30239 /** 30240 * @private @constructor Used by a few SpecialProps to hold important values for proxies. For example, _parseToProxy() creates a MiniPropTween instance for each property that must get tweened on the proxy, and we record the original property name as well as the unique one we create for the proxy, plus whether or not the value needs to be rounded plus the original value. 30241 * @param {!Object} t target object whose property we're tweening (often a CSSPropTween) 30242 * @param {!string} p property name 30243 * @param {(number|string|object)} v value 30244 * @param {MiniPropTween=} next next MiniPropTween in the linked list 30245 * @param {boolean=} r if true, the tweened value should be rounded to the nearest integer 30246 */ 30247 MiniPropTween = function(t, p, v, next, r) { 30248 this.t = t; 30249 this.p = p; 30250 this.v = v; 30251 this.r = r; 30252 if (next) { 30253 next._prev = this; 30254 this._next = next; 30255 } 30256 }, 30257 30258 /** 30259 * @private Most other plugins (like BezierPlugin and ThrowPropsPlugin and others) can only tween numeric values, but CSSPlugin must accommodate special values that have a bunch of extra data (like a suffix or strings between numeric values, etc.). For example, boxShadow has values like "10px 10px 20px 30px rgb(255,0,0)" which would utterly confuse other plugins. This method allows us to split that data apart and grab only the numeric data and attach it to uniquely-named properties of a generic proxy object ({}) so that we can feed that to virtually any plugin to have the numbers tweened. However, we must also keep track of which properties from the proxy go with which CSSPropTween values and instances. So we create a linked list of MiniPropTweens. Each one records a target (the original CSSPropTween), property (like "s" or "xn1" or "xn2") that we're tweening and the unique property name that was used for the proxy (like "boxShadow_xn1" and "boxShadow_xn2") and whether or not they need to be rounded. That way, in the _setPluginRatio() method we can simply copy the values over from the proxy to the CSSPropTween instance(s). Then, when the main CSSPlugin setRatio() method runs and applies the CSSPropTween values accordingly, they're updated nicely. So the external plugin tweens the numbers, _setPluginRatio() copies them over, and setRatio() acts normally, applying css-specific values to the element. 30260 * This method returns an object that has the following properties:
30261 * - proxy: a generic object containing the starting values for all the properties that will be tweened by the external plugin. This is what we feed to the external _onInitTween() as the target 30262 * - end: a generic object containing the ending values for all the properties that will be tweened by the external plugin. This is what we feed to the external plugin's _onInitTween() as the destination values 30263 * - firstMPT: the first MiniPropTween in the linked list 30264 * - pt: the first CSSPropTween in the linked list that was created when parsing. If shallow is true, this linked list will NOT attach to the one passed into the _parseToProxy() as the "pt" (4th) parameter. 30265 * @param {!Object} t target object to be tweened 30266 * @param {!(Object|string)} vars the object containing the information about the tweening values (typically the end/destination values) that should be parsed 30267 * @param {!CSSPlugin} cssp The CSSPlugin instance 30268 * @param {CSSPropTween=} pt the next CSSPropTween in the linked list 30269 * @param {TweenPlugin=} plugin the external TweenPlugin instance that will be handling tweening the numeric values 30270 * @param {boolean=} shallow if true, the resulting linked list from the parse will NOT be attached to the CSSPropTween that was passed in as the "pt" (4th) parameter. 30271 * @return An object containing the following properties: proxy, end, firstMPT, and pt (see above for descriptions) 30272 */ 30273 _parseToProxy = _internals._parseToProxy = function(t, vars, cssp, pt, plugin, shallow) { 30274 var bpt = pt, 30275 start = {}, 30276 end = {}, 30277 transform = cssp._transform, 30278 oldForce = _forcePT, 30279 i, p, xp, mpt, firstPT; 30280 cssp._transform = null; 30281 _forcePT = vars; 30282 pt = firstPT = cssp.parse(t, vars, pt, plugin); 30283 _forcePT = oldForce; 30284 //break off from the linked list so the new ones are isolated. 30285 if (shallow) { 30286 cssp._transform = transform; 30287 if (bpt) { 30288 bpt._prev = null; 30289 if (bpt._prev) { 30290 bpt._prev._next = null; 30291 } 30292 } 30293 } 30294 while (pt && pt !== bpt) { 30295 if (pt.type <= 1) { 30296 p = pt.p; 30297 end[p] = pt.s + pt.c; 30298 start[p] = pt.s; 30299 if (!shallow) { 30300 mpt = new MiniPropTween(pt, "s", p, mpt, pt.r); 30301 pt.c = 0; 30302 } 30303 if (pt.type === 1) { 30304 i = pt.l; 30305 while (--i > 0) { 30306 xp = "xn" + i; 30307 p = pt.p + "_" + xp; 30308 end[p] = pt.data[xp]; 30309 start[p] = pt[xp]; 30310 if (!shallow) { 30311 mpt = new MiniPropTween(pt, xp, p, mpt, pt.rxp[xp]); 30312 } 30313 } 30314 } 30315 } 30316 pt = pt._next; 30317 } 30318 return {proxy:start, end:end, firstMPT:mpt, pt:firstPT}; 30319 }, 30320 30321 30322 30323 /** 30324 * @constructor Each property that is tweened has at least one CSSPropTween associated with it. These instances store important information like the target, property, starting value, amount of change, etc. They can also optionally have a number of "extra" strings and numeric values named xs1, xn1, xs2, xn2, xs3, xn3, etc. where "s" indicates string and "n" indicates number. These can be pieced together in a complex-value tween (type:1) that has alternating types of data like a string, number, string, number, etc. For example, boxShadow could be "5px 5px 8px rgb(102, 102, 51)". In that value, there are 6 numbers that may need to tween and then pieced back together into a string again with spaces, suffixes, etc. xs0 is special in that it stores the suffix for standard (type:0) tweens, -OR- the first string (prefix) in a complex-value (type:1) CSSPropTween -OR- it can be the non-tweening value in a type:-1 CSSPropTween. We do this to conserve memory. 30325 * CSSPropTweens have the following optional properties as well (not defined through the constructor): 30326 * - l: Length in terms of the number of extra properties that the CSSPropTween has (default: 0). For example, for a boxShadow we may need to tween 5 numbers in which case l would be 5; Keep in mind that the start/end values for the first number that's tweened are always stored in the s and c properties to conserve memory. All additional values thereafter are stored in xn1, xn2, etc. 30327 * - xfirst: The first instance of any sub-CSSPropTweens that are tweening properties of this instance. For example, we may split up a boxShadow tween so that there's a main CSSPropTween of type:1 that has various xs* and xn* values associated with the h-shadow, v-shadow, blur, color, etc. Then we spawn a CSSPropTween for each of those that has a higher priority and runs BEFORE the main CSSPropTween so that the values are all set by the time it needs to re-assemble them. The xfirst gives us an easy way to identify the first one in that chain which typically ends at the main one (because they're all prepende to the linked list) 30328 * - plugin: The TweenPlugin instance that will handle the tweening of any complex values. For example, sometimes we don't want to use normal subt
30328weens (like xfirst refers to) to tween the values - we might want ThrowPropsPlugin or BezierPlugin some other plugin to do the actual tweening, so we create a plugin instance and store a reference here. We need this reference so that if we get a request to round values or disable a tween, we can pass along that request. 30329 * - data: Arbitrary data that needs to be stored with the CSSPropTween. Typically if we're going to have a plugin handle the tweening of a complex-value tween, we create a generic object that stores the END values that we're tweening to and the CSSPropTween's xs1, xs2, etc. have the starting values. We store that object as data. That way, we can simply pass that object to the plugin and use the CSSPropTween as the target. 30330 * - setRatio: Only used for type:2 tweens that require custom functionality. In this case, we call the CSSPropTween's setRatio() method and pass the ratio each time the tween updates. This isn't quite as efficient as doing things directly in the CSSPlugin's setRatio() method, but it's very convenient and flexible. 30331 * @param {!Object} t Target object whose property will be tweened. Often a DOM element, but not always. It could be anything. 30332 * @param {string} p Property to tween (name). For example, to tween element.width, p would be "width". 30333 * @param {number} s Starting numeric value 30334 * @param {number} c Change in numeric value over the course of the entire tween. For example, if element.width starts at 5 and should end at 100, c would be 95. 30335 * @param {CSSPropTween=} next The next CSSPropTween in the linked list. If one is defined, we will define its _prev as the new instance, and the new instance's _next will be pointed at it. 30336 * @param {number=} type The type of CSSPropTween where -1 = a non-tweening value, 0 = a standard simple tween, 1 = a complex value (like one that has multiple numbers in a comma- or space-delimited string like border:"1px solid red"), and 2 = one that uses a custom setRatio function that does all of the work of applying the values on each update. 30337 * @param {string=} n Name of the property that should be used for overwriting purposes which is typically the same as p but not always. For example, we may need to create a subtween for the 2nd part of a "clip:rect(...)" tween in which case "p" might be xs1 but "n" is still "clip" 30338 * @param {boolean=} r If true, the value(s) should be rounded 30339 * @param {number=} pr Priority in the linked list order. Higher priority CSSPropTweens will be updated before lower priority ones. The default priority is 0. 30340 * @param {string=} b Beginning value. We store this to ensure that it is EXACTLY what it was when the tween began without any risk of interpretation issues. 30341 * @param {string=} e Ending value. We store this to ensure that it is EXACTLY what the user defined at the end of the tween without any risk of interpretation issues. 30342 */ 30343 CSSPropTween = _internals.CSSPropTween = function(t, p, s, c, next, type, n, r, pr, b, e) { 30344 this.t = t; //target 30345 this.p = p; //property 30346 this.s = s; //starting value 30347 this.c = c; //change value 30348 this.n = n || p; //name that this CSSPropTween should be associated to (usually the same as p, but not always - n is what overwriting looks at) 30349 if (!(t instanceof CSSPropTween)) { 30350 _overwriteProps.push(this.n); 30351 } 30352 this.r = !r ? r : (typeof(r) === "function") ? r : Math.round; //round (boolean) 30353 this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the work 30354 if (pr) { 30355 this.pr = pr; 30356 _hasPriority = true; 30357 } 30358 this.b = (b === undefined) ? s : b; 30359 this.e = (e === undefined) ? s + c : e; 30360 if (next) { 30361 this._next = next; 30362 next._prev = this; 30363 } 30364 }, 30365 30366 _addNonTweeningNumericPT = function(target, prop, start, end, next, overwriteProp) { //cleans up some code redundancies and helps minification. Just a fast way to add a NUMERIC non-tweening CSSPropTween
30367 var pt = new CSSPropTween(target, prop, start, end - start, next, -1, overwriteProp); 30368 pt.b = start; 30369 pt.e = pt.xs0 = end; 30370 return pt; 30371 }, 30372 30373 /** 30374 * Takes a target, the beginning value and ending value (as strings) and parses them into a CSSPropTween (possibly with child CSSPropTweens) that accommodates multiple numbers, colors, comma-delimited values, etc. For example: 30375 * sp.parseComplex(element, "boxShadow", "5px 10px 20px rgb(255,102,51)", "0px 0px 0px red", true, "0px 0px 0px rgb(0,0,0,0)", pt); 30376 * It will walk through the beginning and ending values (which should be in the same format with the same number and type of values) and figure out which parts are numbers, what strings separate the numeric/tweenable values, and then create the CSSPropTweens accordingly. If a plugin is defined, no child CSSPropTweens will be created. Instead, the ending values will be stored in the "data" property of the returned CSSPropTween like: {s:-5, xn1:-10, xn2:-20, xn3:255, xn4:0, xn5:0} so that it can be fed to any other plugin and it'll be plain numeric tweens but the recomposition of the complex value will be handled inside CSSPlugin's setRatio(). 30377 * If a setRatio is defined, the type of the CSSPropTween will be set to 2 and recomposition of the values will be the responsibility of that method. 30378 * 30379 * @param {!Object} t Target whose property will be tweened 30380 * @param {!string} p Property that will be tweened (its name, like "left" or "backgroundColor" or "boxShadow") 30381 * @param {string} b Beginning value 30382 * @param {string} e Ending value 30383 * @param {boolean} clrs If true, the value could contain a color value like "rgb(255,0,0)" or "#F00" or "red". The default is false, so no colors will be recognized (a performance optimization) 30384 * @param {(string|number|Object)} dflt The default beginning value that should be used if no valid beginning value is defined or if the number of values inside the complex beginning and ending values don't match 30385 * @param {?CSSPropTween} pt CSSPropTween instance that is the current head of the linked list (we'll prepend to this). 30386 * @param {number=} pr Priority in the linked list order. Higher priority properties will be updated before lower priority ones. The default priority is 0. 30387 * @param {TweenPlugin=} plugin If a plugin should handle the tweening of extra properties, pass the plugin instance here. If one is defined, then NO subtweens will be created for any extra properties (the properties will be created - just not additional CSSPropTween instances to tween them) because the plugin is expected to do so. However, the end values WILL be populated in the "data" property, like {s:100, xn1:50, xn2:300} 30388 * @param {function(number)=} setRatio If values should be set in a custom function instead of being pieced together in a type:1 (complex-value) CSSPropTween, define that custom function here. 30389 * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parseComplex() call. 30390 */ 30391 _parseComplex = CSSPlugin.parseComplex = function(t, p, b, e, clrs, dflt, pt, pr, plugin, setRatio) { 30392 //DEBUG: _log("parseComplex: "+p+", b: "+b+", e: "+e); 30393 b = b || dflt || ""; 30394 if (typeof(e) === "function") { 30395 e = e(_index, _target); 30396 } 30397 pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e); 30398 e += ""; //ensures it's a string 30399 if (clrs && _colorExp.test(e + b)) { //if colors are found, normalize the formatting to rgba() or hsla(). 30400 e = [b, e]; 30401 CSSPlugin.colorStringFilter(e); 30402 b = e[0]; 30403 e = e[1]; 30404 } 30405 var ba = b.split(", ").join(",").split(" "), //beginning array 30406 ea = e.split(", ").join(",").split(" "), //ending array 30407 l = ba.length, 30408 autoRound = (_autoRound !== false), 30409 i, xi, ni, bv, ev, bnums, enums, bn, hasAlpha, temp, cv, str, useHSL; 30410 if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) { 30411 if ((e + b).indexOf("rgb") !== -1 || (e + b).indexOf("hsl") !== -1) { //keep rgb(), rgba(), hsl(), and hsla() values together! (remember, we're splitting on spaces) 30412 ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" "); 30413 ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" "); 30414 } else { 30415 ba = ba.join(" ").split(",").join(", ").split(" "); 30416 ea = ea.join(" ").split(",").join(", ").split(" "); 30417 } 30418 l = ba.length; 30419 } 30420 if (l !== ea.length) { 30421 //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")"); 30422 ba = (dflt || "").split(" "); 30423 l = ba.length; 30424 } 30425 pt.plugin = plugin; 30426 pt.setRatio = setRatio; 30427 _colorExp.lastIndex = 0; 30428 for (i = 0; i < l; i++) { 30429 bv = ba[i]; 30430 ev = ea[i] + ""; 30431 bn = parseFloat(bv); 30432 //if the value begins with a number (most common). It's fine if it has a suffix like px 30433 if (bn || bn === 0) { 30434 pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1) ? Math.round : false, true); 30435 30436 //if the value is a color 30437 } else if (clrs && _colorExp.test(bv)) { 30438 str = ev.indexOf(")") + 1; 30439 str = ")" + (str ? ev.substr(str) : ""); //if there's a comma or ) at the end, retain it. 30440 useHSL = (ev.indexOf("hsl") !== -1 && _supportsOpacity); 30441 temp = ev; //original string value so we can look for any prefix later. 30442 bv = _parseColor(bv, useHSL); 30443 ev = _parseColor(ev, useHSL); 30444 hasAlpha = (bv.length + ev.length > 6); 30445 if (hasAlpha && !_supportsOpacity && ev[3] === 0) { //older versions of IE don't support rgba(), so if the destination alpha is 0, just use "transparent" for the end color 30446 pt["xs" + pt.l] += pt.l ? " transparent" : "transparent";
30447 pt.e = pt.e.split(ea[i]).join("transparent"); 30448 } else { 30449 if (!_supportsOpacity) { //old versions of IE don't support rgba(). 30450 hasAlpha = false; 30451 } 30452 if (useHSL) { 30453 pt.appendXtra(temp.substr(0, temp.indexOf("hsl")) + (hasAlpha ? "hsla(" : "hsl("), bv[0], _parseChange(ev[0], bv[0]), ",", false, true) 30454 .appendXtra("", bv[1], _parseChange(ev[1], bv[1]), "%,", false) 30455 .appendXtra("", bv[2], _parseChange(ev[2], bv[2]), (hasAlpha ? "%," : "%" + str), false); 30456 } else { 30457 pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", Math.round, true) 30458 .appendXtra("", bv[1], ev[1] - bv[1], ",", Math.round) 30459 .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), Math.round); 30460 } 30461 30462 if (hasAlpha) { 30463 bv = (bv.length < 4) ? 1 : bv[3]; 30464 pt.appendXtra("", bv, ((ev.length < 4) ? 1 : ev[3]) - bv, str, false); 30465 } 30466 } 30467 _colorExp.lastIndex = 0; //otherwise the test() on the RegExp could move the lastIndex and taint future results. 30468 30469 } else { 30470 bnums = bv.match(_numExp); //gets each group of numbers in the beginning value string and drops them into an array 30471 30472 //if no number is found, treat it as a non-tweening value and just append the string to the current xs. 30473 if (!bnums) { 30474 pt["xs" + pt.l] += (pt.l || pt["xs" + pt.l]) ? " " + ev : ev; 30475 30476 //loop through all the numbers that are found and construct the extra values on the pt. 30477 } else { 30478 enums = ev.match(_relNumExp); //get each group of numbers in the end value string and drop them into an array. We allow relative values too, like +=50 or -=.5 30479 if (!enums || enums.length !== bnums.length) { 30480 //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")"); 30481 return pt; 30482 } 30483 ni = 0; 30484 for (xi = 0; xi < bnums.length; xi++) { 30485 cv = bnums[xi]; 30486 temp = bv.indexOf(cv, ni); 30487 pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px") ? Math.round : false, (xi === 0)); 30488 ni = temp + cv.length; 30489 } 30490 pt["xs" + pt.l] += bv.substr(ni); 30491 } 30492 } 30493 } 30494 //if there are relative values ("+=" or "-=" prefix), we need to adjust the ending value to eliminate the prefixes and combine the values properly. 30495 if (e.indexOf("=") !== -1) if (pt.data) { 30496 str = pt.xs0 + pt.data.s; 30497 for (i = 1; i < pt.l; i++) { 30498 str += pt["xs" + i] + pt.data["xn" + i]; 30499 } 30500 pt.e = str + pt["xs" + i]; 30501 } 30502 if (!pt.l) { 30503 pt.type = -1; 30504 pt.xs0 = pt.e; 30505 } 30506 return pt.xfirst || pt; 30507 }, 30508 i = 9; 30509 30510 30511 p = CSSPropTween.prototype; 30512 p.l = p.pr = 0; //length (number of extra properties like xn1, xn2, xn3, etc. 30513 while (--i > 0) { 30514 p["xn" + i] = 0; 30515 p["xs" + i] = ""; 30516 } 30517 p.xs0 = ""; 30518 p._next = p._prev = p.xfirst = p.data = p.plugin = p.setRatio = p.rxp = null; 30519 30520 30521 /** 30522 * Appends and extra tweening value to a CSSPropTween and automatically manages any prefix and suffix strings. The first extra value is stored in the s and c of the main CSSPropTween instance, but thereafter any extras are stored in the xn1, xn2, xn3, etc. The prefixes and suffixes are stored in the xs0, xs1, xs2, etc. properties. For example, if I walk through a clip value like "rect(10px, 5px, 0px, 20px)", the values would be stored like this: 30523 * xs0:"rect(", s:10, xs1:"px, ", xn1:5, xs2:"px, ", xn2:0, xs3:"px, ", xn3:20, xn4:"px)" 30524 * And they'd all get joined together when the CSSPlugin renders (in the setRatio() method). 30525 * @param {string=} pfx Prefix (if any) 30526 * @param {!number} s Starting value 30527 * @param {!number} c Change in numeric value over the course of the entire tween. For example, if the start is 5 and the end is 100, the change would be 95. 30528 * @param {string=} sfx Suffix (if any) 30529 * @param {boolean=} r Round (if true). 30530 * @param {boolean=} pad If true, this extra value should be separated by the previous one by a space. If there is no previous extra and pad is true, it will automatically drop the space. 30531 * @return {CSSPropTween} returns itself so that multiple methods can be chained together. 30532 */ 30533 p.appendXtra = function(pfx, s, c, sfx, r, pad) { 30534 var pt = this, 30535 l = pt.l; 30536 pt["xs" + l] += (pad && (l || pt["xs" + l])) ? " " + pfx : pfx || ""; 30537 if (!c) if (l !== 0 && !pt.plugin) { //typically we'll combine non-changing values right into the xs to optimize performance, but we don't combine them when there's a plugin that will be tweening the values because it may depend on the values being split apart, like for a bezier, if a value doesn't change between the first and second iteration but then it does on the 3rd, we'll run into trouble because there's no xn slot for that value! 30538 pt["xs" + l] += s + (sfx || ""); 30539 return pt; 30540 } 30541 pt.l++; 30542 pt.type = pt.setRatio ? 2 : 1; 30543 pt["xs" + pt.l] = sfx || ""; 30544 if (l > 0) { 30545 pt.data["xn" + l] = s + c; 30546 pt.rxp["xn" + l] = r; //round extra property (we need to tap into this in the _parseToProxy() method) 30547 pt["xn" + l] = s; 30548 if (!pt.plugin) { 30549 pt.xfirst = new CSSPropTween(pt, "xn" + l, s, c, pt.xfirst || pt, 0, pt.n, r, pt.pr); 30550 pt.xfirst.xs0 = 0; //just to ensure that the property stays numeric which helps modern browsers speed up processing. Remember, in the setRatio() method, we do pt.t[pt.p] = val + pt.xs0 so if pt.xs0 is "" (the default), it'll cast the end value as a string. When a property is a number sometimes and a string sometimes, it prevents the compiler from locking in the data type, slowing things down slightly. 30551 } 30552 return pt; 30553 } 30554 pt.data = {s:s + c}; 30555 pt.rxp = {}; 30556 pt.s = s; 30557 pt.c = c; 30558 pt.r = r; 30559 return pt; 30560 }; 30561 30562 /** 30563 * @constructor A SpecialProp is basically a css property that needs to be treated in a non-standard way, like if it may contain a complex value like boxShadow:"5px 10px 15px rgb(255, 102, 51)" or if it is associated with another plugin like ThrowPropsPlugin or BezierPlugin. Every SpecialProp is associated with a particular property name like "boxShadow" or "throwProps" or "bezier" and it will intercept those values in the vars object that's passed to the CSSPlugin and handle them accordingly. 30564 * @param {!string} p Property name (like "boxShadow" or "throwProps") 30565 * @param {Object=}
30565 options An object containing any of the following configuration options: 30566 * - defaultValue: the default value 30567 * - parser: A function that should be called when the associated property name is found in the vars. This function should return a CSSPropTween instance and it should ensure that it is properly inserted into the linked list. It will receive 4 paramters: 1) The target, 2) The value defined in the vars, 3) The CSSPlugin instance (whose _firstPT should be used for the linked list), and 4) A computed style object if one was calculated (this is a speed optimization that allows retrieval of starting values quicker) 30568 * - formatter: a function that formats any value received for this special property (for example, boxShadow could take "5px 5px red" and format it to "5px 5px 0px 0px red" so that both the beginning and ending values have a common order and quantity of values.) 30569 * - prefix: if true, we'll determine whether or not this property requires a vendor prefix (like Webkit or Moz or ms or O) 30570 * - color: set this to true if the value for this SpecialProp may contain color-related values like rgb(), rgba(), etc. 30571 * - priority: priority in the linked list order. Higher priority SpecialProps will be updated before lower priority ones. The default priority is 0. 30572 * - multi: if true, the formatter should accommodate a comma-delimited list of values, like boxShadow could have multiple boxShadows listed out. 30573 * - collapsible: if true, the formatter should treat the value like it's a top/right/bottom/left value that could be collapsed, like "5px" would apply to all, "5px, 10px" would use 5px for top/bottom and 10px for right/left, etc. 30574 * - keyword: a special keyword that can [optionally] be found inside the value (like "inset" for boxShadow). This allows us to validate beginning/ending values to make sure they match (if the keyword is found in one, it'll be added to the other for consistency by default). 30575 */ 30576 var SpecialProp = function(p, options) { 30577 options = options || {}; 30578 this.p = options.prefix ? _checkPropPrefix(p) || p : p; 30579 _specialProps[p] = _specialProps[this.p] = this; 30580 this.format = options.formatter || _getFormatter(options.defaultValue, options.color, options.collapsible, options.multi); 30581 if (options.parser) { 30582 this.parse = options.parser; 30583 } 30584 this.clrs = options.color; 30585 this.multi = options.multi; 30586 this.keyword = options.keyword; 30587 this.dflt = options.defaultValue; 30588 this.allowFunc = options.allowFunc; 30589 this.pr = options.priority || 0; 30590 }, 30591 30592 //shortcut for creating a new SpecialProp that can accept multiple properties as a comma-delimited list (helps minification). dflt can be an array for multiple values (we don't do a comma-delimited list because the default value may contain commas, like rect(0px,0px,0px,0px)). We attach this method to the SpecialProp class/object instead of using a private _createSpecialProp() method so that we can tap into it externally if necessary, like from another plugin. 30593 _registerComplexSpecialProp = _internals._registerComplexSpecialProp = function(p, options, defaults) { 30594 if (typeof(options) !== "object") { 30595 options = {parser:defaults}; //to make backwards compatible with older versions of BezierPlugin and ThrowPropsPlugin 30596 } 30597 var a = p.split(","), 30598 d = options.defaultValue, 30599 i, temp; 30600 defaults = defaults || [d]; 30601 for (i = 0; i < a.length; i++) { 30602 options.prefix = (i === 0 && options.prefix); 30603 options.defaultValue = defaults[i] || d; 30604 temp = new SpecialProp(a[i], options); 30605 } 30606 }, 30607 30608 //creates a placeholder special prop for a plugin so that the property gets caught the first time a tween of it is attempted, and at that time it makes the plugin register itself, thus taking over for all future tweens of that property. This allows us to not mandate that things load in a particular order and it also allows us to log() an error that informs the user when they attempt to tween an external plugin-related property without loading its .js file. 30609 _registerPluginProp = _internals._registerPluginProp = function(p) { 30610 if (!_specialProps[p]) { 30611 var pluginName = p.charAt(0).toUpperCase() + p.substr(1) + "Plugin"; 30612 _registerComplexSpecialProp(p, {parser:function(t, e, p, cssp, pt, plugin, vars) { 30613 var pluginClass = _globals.com.greensock.plugins[pluginName]; 30614 if (!pluginClass) { 30615 _log("Error: " + pluginName + " js file not loaded."); 30616 return pt; 30617 } 30618 pluginClass._cssRegister(); 30619 return _specialProps[p].parse(t, e, p, cssp, pt, plugin, vars); 30620 }}); 30621 } 30622 }; 30623 30624 30625 p = SpecialProp.prototype; 30626 30627 /** 30628 * Alias for _parseComplex() that automatically plugs in certain values for this SpecialProp, like its property name, whether or not colors should be sensed, the default value, and priority. It also looks for any keyword that the SpecialProp defines (like "inset" for boxSh
30628adow) and ensures that the beginning and ending values have the same number of values for SpecialProps where multi is true (like boxShadow and textShadow can have a comma-delimited list) 30629 * @param {!Object} t target element 30630 * @param {(string|number|object)} b beginning value 30631 * @param {(string|number|object)} e ending (destination) value 30632 * @param {CSSPropTween=} pt next CSSPropTween in the linked list 30633 * @param {TweenPlugin=} plugin If another plugin will be tweening the complex value, that TweenPlugin instance goes here. 30634 * @param {function=} setRatio If a custom setRatio() method should be used to handle this complex value, that goes here. 30635 * @return {CSSPropTween=} First CSSPropTween in the linked list 30636 */ 30637 p.parseComplex = function(t, b, e, pt, plugin, setRatio) { 30638 var kwd = this.keyword, 30639 i, ba, ea, l, bi, ei; 30640 //if this SpecialProp's value can contain a comma-delimited list of values (like boxShadow or textShadow), we must parse them in a special way, and look for a keyword (like "inset" for boxShadow) and ensure that the beginning and ending BOTH have it if the end defines it as such. We also must ensure that there are an equal number of values specified (we can't tween 1 boxShadow to 3 for example) 30641 if (this.multi) if (_commasOutsideParenExp.test(e) || _commasOutsideParenExp.test(b)) { 30642 ba = b.replace(_commasOutsideParenExp, "|").split("|"); 30643 ea = e.replace(_commasOutsideParenExp, "|").split("|"); 30644 } else if (kwd) { 30645 ba = [b]; 30646 ea = [e]; 30647 } 30648 if (ea) { 30649 l = (ea.length > ba.length) ? ea.length : ba.length; 30650 for (i = 0; i < l; i++) { 30651 b = ba[i] = ba[i] || this.dflt; 30652 e = ea[i] = ea[i] || this.dflt; 30653 if (kwd) { 30654 bi = b.indexOf(kwd); 30655 ei = e.indexOf(kwd); 30656 if (bi !== ei) { 30657 if (ei === -1) { //if the keyword isn't in the end value, remove it from the beginning one. 30658 ba[i] = ba[i].split(kwd).join(""); 30659 } else if (bi === -1) { //if the keyword isn't in the beginning, add it. 30660 ba[i] += " " + kwd; 30661 } 30662 } 30663 } 30664 } 30665 b = ba.join(", "); 30666 e = ea.join(", "); 30667 } 30668 return _parseComplex(t, this.p, b, e, this.clrs, this.dflt, pt, this.pr, plugin, setRatio); 30669 }; 30670 30671 /** 30672 * Accepts a target and end value and spits back a CSSPropTween that has been inserted into the CSSPlugin's linked list and conforms with all the conventions we use internally, like type:-1, 0, 1, or 2, setting up any extra property tweens, priority, etc. For example, if we have a boxShadow SpecialProp and call: 30673 * this._firstPT = sp.parse(element, "5px 10px 20px rgb(2550,102,51)", "boxShadow", this); 30674 * It should figure out the starting value of the element's boxShadow, compare it to the provided end value and create all the necessary CSSPropTweens of the appropriate types to tween the boxShadow. The CSSPropTween that gets spit back should already be inserted into the linked list (the 4th parameter is the current head, so prepend to that). 30675 * @param {!Object} t Target object whose property is being tweened 30676 * @param {Object} e End value as provided in the vars object (typically a string, but not always - like a throwProps would be an object). 30677 * @param {!string} p Property name 30678 * @param {!CSSPlugin} cssp The CSSPlugin instance that should be associated with this tween. 30679 * @param {?CSSPropTween} pt The CSSPropTween that is the current head of the linked list (we'll prepend to it) 30680 * @param {TweenPlugin=} plugin If a plugin will be used to tween the parsed value, this is the plugin instance. 30681 * @param {Object=} vars Original vars object that contains the data for parsing. 30682 * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parse() call. 30683 */ 30684 p.parse = function(t, e, p, cssp, pt, plugin, vars) { 30685 return this.parseComplex(t.style, this.format(_getStyle(t, this.p, _cs, false, this.dflt)), this.format(e), pt, plugin); 30686 }; 30687 30688 /** 30689 * Registers a special property that should be intercepted from any "css" objects defined in tweens. This allows you to handle them however you want without CSSPlugin doing it for you. The 2nd parameter should be a function that accepts 3 parameters: 30690 * 1) Target object whose property should be tweened (typically a DOM element) 30691 * 2) The end/destination value (could be a string, number, object, or whatever you want) 30692 * 3) The tween instance (you probably don't need to worry about this, but it can be useful for looking up information like the duration) 30693 * 30694 * Then, your function should return a function which will be called each time the tween gets rendered, passing a numeric "ratio" parameter to your function that indicates the change factor (usually between 0 and 1). For example: 30695 * 30696 * CSSPlugin.registerSpecialProp("myCustomProp", function(target, value, tween) { 30697 * var start = target.style.width;
30698 * return function(ratio) { 30699 * target.style.width = (start + value * ratio) + "px"; 30700 * console.log("set width to " + target.style.width); 30701 * } 30702 * }, 0); 30703 * 30704 * Then, when I do this tween, it will trigger my special property: 30705 * 30706 * TweenLite.to(element, 1, {css:{myCustomProp:100}}); 30707 * 30708 * In the example, of course, we're just changing the width, but you can do anything you want. 30709 * 30710 * @param {!string} name Property name (or comma-delimited list of property names) that should be intercepted and handled by your function. For example, if I define "myCustomProp", then it would handle that portion of the following tween: TweenLite.to(element, 1, {css:{myCustomProp:100}}) 30711 * @param {!function(Object, Object, Object, string):function(number)} onInitTween The function that will be called when a tween of this special property is performed. The function will receive 4 parameters: 1) Target object that should be tweened, 2) Value that was passed to the tween, 3) The tween instance itself (rarely used), and 4) The property name that's being tweened. Your function should return a function that should be called on every update of the tween. That function will receive a single parameter that is a "change factor" value (typically between 0 and 1) indicating the amount of change as a ratio. You can use this to determine how to set the values appropriately in your function. 30712 * @param {number=} priority Priority that helps the engine determine the order in which to set the properties (default: 0). Higher priority properties will be updated before lower priority ones. 30713 */ 30714 CSSPlugin.registerSpecialProp = function(name, onInitTween, priority) { 30715 _registerComplexSpecialProp(name, {parser:function(t, e, p, cssp, pt, plugin, vars) { 30716 var rv = new CSSPropTween(t, p, 0, 0, pt, 2, p, false, priority); 30717 rv.plugin = plugin; 30718 rv.setRatio = onInitTween(t, e, cssp._tween, p); 30719 return rv; 30720 }, priority:priority}); 30721 }; 30722 30723 30724 30725 30726 30727 30728 //transform-related methods and properties 30729 CSSPlugin.useSVGTransformAttr = true; //Safari and Firefox both have some rendering bugs when applying CSS transforms to SVG elements, so default to using the "transform" attribute instead (users can override this). 30730 var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent").split(","), 30731 _transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform. 30732 _transformPropCSS = _prefixCSS + "transform", 30733 _transformOriginProp = _checkPropPrefix("transformOrigin"), 30734 _supports3D = (_checkPropPrefix("perspective") !== null), 30735 Transform = _internals.Transform = function() { 30736 this.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0; 30737 this.force3D = (CSSPlugin.defaultForce3D === false || !_supports3D) ? false : CSSPlugin.defaultForce3D || "auto"; 30738 }, 30739 _SVGElement = _gsScope.SVGElement, 30740 _useSVGTransformAttr, 30741 //Some browsers (like Firefox and IE) don't honor transform-origin properly in SVG elements, so we need to manually adjust the matrix accordingly. We feature detect here rather than always doing the conversion for certain browsers because they may fix the problem at some point in the future. 30742 30743 _createSVG = function(type, container, attributes) { 30744 var element = _doc.createElementNS("http://www.w3.org/2000/svg", type), 30745 reg = /([a-z])([A-Z])/g, 30746 p; 30747 for (p in attributes) { 30748 element.setAttributeNS(null, p.replace(reg, "$1-$2").toLowerCase(), attributes[p]); 30749 } 30750 container.appendChild(element); 30751 return element; 30752 }, 30753 _docElement = _doc.documentElement || {}, 30754 _forceSVGTransformAttr = (function() { 30755 //IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element 30756 var force = _ieVers || (/Android/i.test(_agent) && !_gsScope.chrome), 30757 svg, rect, width; 30758 if (_doc.createElementNS && !force) { //IE8 and earlier doesn't support SVG anyway 30759 svg = _createSVG("svg", _docElement); 30760 rect = _createSVG("rect", svg, {width:100, height:50, x:100}); 30761 width = rect.getBoundingClientRect().width; 30762 rect.style[_transformOriginProp] = "50% 50%"; 30763 rect.style[_transformProp] = "scaleX(0.5)"; 30764 force = (width === rect.getBoundingClientRect().width && !(_is
30764Firefox && _supports3D)); //note: Firefox fails the test even though it does support CSS transforms in 3D. Since we can't push 3D stuff into the transform attribute, we force Firefox to pass the test here (as long as it does truly support 3D). 30765 _docElement.removeChild(svg); 30766 } 30767 return force; 30768 })(), 30769 _parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin, skipRecord) { 30770 var tm = e._gsTransform, 30771 m = _getMatrix(e, true), 30772 v, x, y, xOrigin, yOrigin, a, b, c, d, tx, ty, determinant, xOriginOld, yOriginOld; 30773 if (tm) { 30774 xOriginOld = tm.xOrigin; //record the original values before we alter them. 30775 yOriginOld = tm.yOrigin; 30776 } 30777 if (!absolute || (v = absolute.split(" ")).length < 2) { 30778 b = e.getBBox(); 30779 if (b.x === 0 && b.y === 0 && b.width + b.height === 0) { //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case. 30780 b = {x: parseFloat(e.hasAttribute("x") ? e.getAttribute("x") : e.hasAttribute("cx") ? e.getAttribute("cx") : 0) || 0, y: parseFloat(e.hasAttribute("y") ? e.getAttribute("y") : e.hasAttribute("cy") ? e.getAttribute("cy") : 0) || 0, width:0, height:0}; 30781 } 30782 local = _parsePosition(local).split(" "); 30783 v = [(local[0].indexOf("%") !== -1 ? parseFloat(local[0]) / 100 * b.width : parseFloat(local[0])) + b.x, 30784 (local[1].indexOf("%") !== -1 ? parseFloat(local[1]) / 100 * b.height : parseFloat(local[1])) + b.y]; 30785 } 30786 decoratee.xOrigin = xOrigin = parseFloat(v[0]); 30787 decoratee.yOrigin = yOrigin = parseFloat(v[1]); 30788 if (absolute && m !== _identity2DMatrix) { //if svgOrigin is being set, we must invert the matrix and determine where the absolute point is, factoring in the current transforms. Otherwise, the svgOrigin would be based on the element's non-transformed position on the canvas. 30789 a = m[0]; 30790 b = m[1]; 30791 c = m[2]; 30792 d = m[3]; 30793 tx = m[4]; 30794 ty = m[5]; 30795 determinant = (a * d - b * c); 30796 if (determinant) { //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero. 30797 x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + ((c * ty - d * tx) / determinant); 30798 y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - ((a * ty - b * tx) / determinant); 30799 xOrigin = decoratee.xOrigin = v[0] = x; 30800 yOrigin = decoratee.yOrigin = v[1] = y; 30801 } 30802 } 30803 if (tm) { //avoid jump when transformOrigin is changed - adjust the x/y values accordingly 30804 if (skipRecord) { 30805 decoratee.xOffset = tm.xOffset; 30806 decoratee.yOffset = tm.yOffset; 30807 tm = decoratee; 30808 } 30809 if (smoothOrigin || (smoothOrigin !== false && CSSPlugin.defaultSmoothOrigin !== false)) { 30810 x = xOrigin - xOriginOld; 30811 y = yOrigin - yOriginOld; 30812 //originally, we simply adjusted the x and y values, but that would cause problems if, for example, you created a rotational tween part-way through an x/y tween. Managing the offset in a separate variable gives us ultimate flexibility. 30813 //tm.x -= x - (x * m[0] + y * m[2]); 30814 //tm.y -= y - (x * m[1] + y * m[3]); 30815 tm.xOffset += (x * m[0] + y * m[2]) - x; 30816 tm.yOffset += (x * m[1] + y * m[3]) - y; 30817 } else { 30818 tm.xOffset = tm.yOffset = 0; 30819 } 30820 } 30821 if (!skipRecord) { 30822 e.setAttribute("data-svg-origin", v.join(" ")); 30823 } 30824 }, 30825 _getBBoxHack = function(swapIfPossible) { //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a <defs> element and/or <mask>. We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it). 30826 var svg = _createElement("svg", (this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns")) || "http://www.w3.org/2000/svg"), 30827 oldParent = this.parentNode, 30828 oldSibling = this.nextSibling, 30829 oldCSS = this.style.cssText, 30830 bbox; 30831 _docElement.appendChild(svg); 30832 svg.appendChild(this); 30833 this.style.display = "block"; 30834 if (swapIfPossible) { 30835 try { 30836 bbox = this.getBBox(); 30837 this._originalGetBBox = this.getBBox; 30838 this.getBBox = _getBBoxHack; 30839 } catch (e) { } 30840 } else if (this._originalGetBBox) { 30841 bbox = this._originalGetBBox(); 30842 } 30843 if (oldSibling) { 30844 oldParent.insertBefore(this, oldSibling); 30845 } else { 30846 oldParent.appendChild(this); 30847 } 30848 _docElement.removeChild(svg); 30849 this.style.cssText = oldCSS; 30850 return bbox; 30851 }, 30852 _getBBox = function(e) { 30853 try { 30854 return e.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118 30855 } catch (error) { 30856 return _getBBoxHack.call(e, true); 30857 } 30858 }, 30859 _isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works 30860 return !!(_SVGElement && e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e)); 30861 }, 30862 _identity2DMatrix = [1,0,0,1,0,0], 30863 _getMatrix = function(e, force2D) { 30864 var tm = e._gsTransform || new Transform(), 30865 rnd = 100000, 30866 style = e.style, 30867 isDefault, s, m, n, dec, nextSibling, parent; 30868 if (_transformProp) { 30869 s = _getStyle(e, _transformPropCSS, null, true); 30870 } else if (e.currentStyle) { 30871 //for older versions of IE, we need to interpret the filter portion that is in the format: progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand') Notice that we need to swap b and c compared to a normal matrix. 30872 s = e.currentStyle.filter.match(_ieGetMatrixExp); 30873 s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : ""; 30874 }
30875 isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)"); 30876 if (_transformProp && isDefault && !e.offsetParent) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397 30877 //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px). 30878 n = style.display; 30879 style.display = "block"; 30880 parent = e.parentNode; 30881 if (!parent || !e.offsetParent) { 30882 dec = 1; //flag 30883 nextSibling = e.nextSibling; 30884 _docElement.appendChild(e); //we must add it to the DOM in order to get values properly 30885 } 30886 s = _getStyle(e, _transformPropCSS, null, true);
30887 isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)"); 30888 if (n) { 30889 style.display = n; 30890 } else { 30891 _removeProp(style, "display"); 30892 } 30893 if (dec) { 30894 if (nextSibling) { 30895 parent.insertBefore(e, nextSibling); 30896 } else if (parent) { 30897 parent.appendChild(e); 30898 } else { 30899 _docElement.removeChild(e); 30900 } 30901 } 30902 } 30903 if (tm.svg || (e.getCTM && _isSVG(e))) { 30904 if (isDefault && (style[_transformProp] + "").indexOf("matrix") !== -1) { //some browsers (like Chrome 40) don't correctly report transforms that are applied inline on an SVG element (they don't get included in the computed style), so we double-check here and accept matrix values 30905 s = style[_transformProp]; 30906 isDefault = 0; 30907 } 30908 m = e.getAttribute("transform"); 30909 if (isDefault && m) { 30910 m = e.transform.baseVal.consolidate().matrix; //ensures that even complex values like "translate(50,60) rotate(135,0,0)" are parsed because it mashes it into a matrix. 30911 s = "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + m.e + "," + m.f + ")"; 30912 isDefault = 0; 30913 } 30914 } 30915 if (isDefault) { 30916 return _identity2DMatrix; 30917 } 30918 //split the matrix values out into an array (m for matrix) 30919 m = (s || "").match(_numExp) || []; 30920 i = m.length; 30921 while (--i > -1) { 30922 n = Number(m[i]); 30923 m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example). 30924 } 30925 return (force2D && m.length > 6) ? [m[0], m[1], m[4], m[5], m[12], m[13]] : m; 30926 }, 30927 30928 /** 30929 * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10. 30930 * @param {!Object} t target element 30931 * @param {Object=} cs computed style object (optional) 30932 * @param {boolean=} rec if true, the transform values will be recorded to the target element's _gsTransform object, like target._gsTransform = {x:0, y:0, z:0, scaleX:1...} 30933 * @param {boolean=} parse if true, we'll ignore any _gsTransform values that already exist on the element, and force a reparsing of the css (calculated style) 30934 * @return {object}
30934 object containing all of the transform properties/values like {x:0, y:0, z:0, scaleX:1...} 30935 */ 30936 _getTransform = _internals.getTransform = function(t, cs, rec, parse) { 30937 if (t._gsTransform && rec && !parse) { 30938 return t._gsTransform; //if the element already has a _gsTransform, use that. Note: some browsers don't accurately return the calculated style for the transform (particularly for SVG), so it's almost always safest to just use the values we've already applied rather than re-parsing things. 30939 } 30940 var tm = rec ? t._gsTransform || new Transform() : new Transform(), 30941 invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent. 30942 min = 0.00002, 30943 rnd = 100000, 30944 zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin || 0 : 0, 30945 defaultTransformPerspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0, 30946 m, i, scaleX, scaleY, rotation, skewX; 30947 30948 tm.svg = !!(t.getCTM && _isSVG(t)); 30949 if (tm.svg) { 30950 _parseSVGOrigin(t, _getStyle(t, _transformOriginProp, cs, false, "50% 50%") + "", tm, t.getAttribute("data-svg-origin")); 30951 _useSVGTransformAttr = CSSPlugin.useSVGTransformAttr || _forceSVGTransformAttr; 30952 } 30953 m = _getMatrix(t); 30954 if (m !== _identity2DMatrix) { 30955 30956 if (m.length === 16) { 30957 //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values) 30958 var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3], 30959 a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7], 30960 a13 = m[8], a23 = m[9], a33 = m[10], 30961 a14 = m[12], a24 = m[13], a34 = m[14], 30962 a43 = m[11], 30963 angle = Math.atan2(a32, a33), 30964 t1, t2, t3, t4, cos, sin; 30965 //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari 30966 if (tm.zOrigin) { 30967 a34 = -tm.zOrigin; 30968 a14 = a13*a34-m[12]; 30969 a24 = a23*a34-m[13]; 30970 a34 = a33*a34+tm.zOrigin-m[14]; 30971 } 30972 //note for possible future consolidation: rotationX: Math.atan2(a32, a33), rotationY: Math.atan2(-a31, Math.sqrt(a33 * a33 + a32 * a32)), rotation: Math.atan2(a21, a11), skew: Math.atan2(a12, a22). However, it doesn't seem to be quite as reliable as the full-on backwards rotation procedure. 30973 tm.rotationX = angle * _RAD2DEG; 30974 //rotationX 30975 if (angle) { 30976 cos = Math.cos(-angle); 30977 sin = Math.sin(-angle); 30978 t1 = a12*cos+a13*sin; 30979 t2 = a22*cos+a23*sin; 30980 t3 = a32*cos+a33*sin; 30981 a13 = a12*-sin+a13*cos; 30982 a23 = a22*-sin+a23*cos; 30983 a33 = a32*-sin+a33*cos; 30984 a43 = a42*-sin+a43*cos; 30985 a12 = t1; 30986 a22 = t2; 30987 a32 = t3; 30988 } 30989 //rotationY 30990 angle = Math.atan2(-a31, a33); 30991 tm.rotationY = angle * _RAD2DEG; 30992 if (angle) { 30993 cos = Math.cos(-angle); 30994 sin = Math.sin(-angle); 30995 t1 = a11*cos-a13*sin; 30996 t2 = a21*cos-a23*sin; 30997 t3 = a31*cos-a33*sin; 30998 a23 = a21*sin+a23*cos; 30999 a33 = a31*sin+a33*cos; 31000 a43 = a41*sin+a43*cos; 31001 a11 = t1; 31002 a21 = t2; 31003 a31 = t3; 31004 } 31005 //rotationZ 31006 angle = Math.atan2(a21, a11); 31007 tm.rotation = angle * _RAD2DEG; 31008 if (angle) { 31009 cos = Math.cos(angle); 31010 sin = Math.sin(angle); 31011 t1 = a11*cos+a21*sin; 31012 t2 = a12*cos+a22*sin; 31013 t3 = a13*cos+a23*sin; 31014 a21 = a21*cos-a11*sin; 31015 a22 = a22*cos-a12*sin; 31016 a23 = a23*cos-a13*sin; 31017 a11 = t1; 31018 a12 = t2; 31019 a13 = t3; 31020 } 31021 31022 if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here. 31023 tm.rotationX = tm.rotation = 0; 31024 tm.rotationY = 180 - tm.rotationY; 31025 } 31026 31027 //skewX 31028 angle = Math.atan2(a12, a22); 31029 31030 //scales 31031 tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21 + a31 * a31) * rnd + 0.5) | 0) / rnd; 31032 tm.scaleY = ((Math.sqrt(a22 * a22 + a32 * a32) * rnd + 0.5) | 0) / rnd; 31033 tm.scaleZ = ((Math.sqrt(a13 * a13 + a23 * a23 + a33 * a33) * rnd + 0.5) | 0) / rnd; 31034 a11 /= tm.scaleX; 31035 a12 /= tm.scaleY; 31036 a21 /= tm.scaleX; 31037 a22 /= tm.scaleY; 31038 if (Math.abs(angle) > min) { 31039 tm.skewX = angle * _RAD2DEG; 31040 a12 = 0;
31040 //unskews 31041 if (tm.skewType !== "simple") { 31042 tm.scaleY *= 1 / Math.cos(angle); //by default, we compensate the scale based on the skew so that the element maintains a similar proportion when skewed, so we have to alter the scaleY here accordingly to match the default (non-adjusted) skewing that CSS does (stretching more and more as it skews). 31043 } 31044 31045 } else { 31046 tm.skewX = 0; 31047 } 31048 31049 /* //for testing purposes 31050 var transform = "matrix3d(", 31051 comma = ",", 31052 zero = "0"; 31053 a13 /= tm.scaleZ; 31054 a23 /= tm.scaleZ; 31055 a31 /= tm.scaleX; 31056 a32 /= tm.scaleY; 31057 a33 /= tm.scaleZ; 31058 transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31); 31059 transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22); 31060 transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13); 31061 transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma; 31062 transform += a14 + comma + a24 + comma + a34 + comma + (tm.perspective ? (1 + (-a34 / tm.perspective)) : 1) + ")"; 31063 console.log(transform); 31064 document.querySelector(".test").style[_transformProp] = transform; 31065 */ 31066 31067 tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0; 31068 tm.x = a14; 31069 tm.y = a24; 31070 tm.z = a34; 31071 if (tm.svg) { 31072 tm.x -= tm.xOrigin - (tm.xOrigin * a11 - tm.yOrigin * a12); 31073 tm.y -= tm.yOrigin - (tm.yOrigin * a21 - tm.xOrigin * a22); 31074 } 31075 31076 } else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY))) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those. 31077 var k = (m.length >= 6), 31078 a = k ? m[0] : 1, 31079 b = m[1] || 0, 31080 c = m[2] || 0, 31081 d = k ? m[3] : 1; 31082 tm.x = m[4] || 0; 31083 tm.y = m[5] || 0; 31084 scaleX = Math.sqrt(a * a + b * b); 31085 scaleY = Math.sqrt(d * d + c * c); 31086 rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist). 31087 skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0; 31088 tm.scaleX = scaleX; 31089 tm.scaleY = scaleY; 31090 tm.rotation = rotation; 31091 tm.skewX = skewX; 31092 if (_supports3D) { 31093 tm.rotationX = tm.rotationY = tm.z = 0; 31094 tm.perspective = defaultTransformPerspective; 31095 tm.scaleZ = 1; 31096 } 31097 if (tm.svg) { 31098 tm.x -= tm.xOrigin - (tm.xOrigin * a + tm.yOrigin * c); 31099 tm.y -= tm.yOrigin - (tm.xOrigin * b + tm.yOrigin * d); 31100 } 31101 } 31102 if (Math.abs(tm.skewX) > 90 && Math.abs(tm.skewX) < 270) { 31103 if (invX) { 31104 tm.scaleX *= -1; 31105 tm.skewX += (tm.rotation <= 0) ? 180 : -180; 31106 tm.rotation += (tm.rotation <= 0) ? 180 : -180; 31107 } else { 31108 tm.scaleY *= -1; 31109 tm.skewX += (tm.skewX <= 0) ? 180 : -180; 31110 } 31111 } 31112 tm.zOrigin = zOrigin;
31113 //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate. 31114 for (i in tm) { 31115 if (tm[i] < min) if (tm[i] > -min) { 31116 tm[i] = 0; 31117 } 31118 } 31119 } 31120 //DEBUG: _log("parsed rotation of " + t.getAttribute("id")+": "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective+ ", origin: "+ tm.xOrigin+ ","+ tm.yOrigin); 31121 if (rec) { 31122 t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method) 31123 if (tm.svg) { //if we're supposed to apply transforms to the SVG element's "transform" attribute, make sure there aren't any CSS transforms applied or they'll override the attribute ones. Also clear the transform attribute if we're using CSS, just to be clean. 31124 if (_useSVGTransformAttr && t.style[_transformProp]) { 31125 TweenLite.delayedCall(0.001, function(){ //if we apply this right away (before anything has rendered), we risk there being no transforms for a brief moment and it also interferes with adjusting the transformOrigin in a tween with immediateRender:true (it'd try reading the matrix and it wouldn't have the appropriate data in place because we just removed it). 31126 _removeProp(t.style, _transformProp); 31127 }); 31128 } else if (!_useSVGTransformAttr && t.getAttribute("transform")) { 31129 TweenLite.delayedCall(0.001, function(){ 31130 t.removeAttribute("transform"); 31131 }); 31132 } 31133 } 31134 } 31135 return tm; 31136 }, 31137 31138 //for setting 2D transforms in IE6, IE7, and IE8 (must use a "filter" to emulate the behavior of modern day browser transforms) 31139 _setIETransformRatio = function(v) { 31140 var t = this.data, //refers to the element's _gsTransform object 31141 ang = -t.rotation * _DEG2RAD, 31142 skew = ang + t.skewX * _DEG2RAD, 31143 rnd = 100000, 31144 a = ((Math.cos(ang) * t.scaleX * rnd) | 0) / rnd, 31145 b = ((Math.sin(ang) * t.scaleX * rnd) | 0) / rnd, 31146 c = ((Math.sin(skew) * -t.scaleY * rnd) | 0) / rnd, 31147 d = ((Math.cos(skew) * t.scaleY * rnd) | 0) / rnd, 31148 style = this.t.style, 31149 cs = this.t.currentStyle, 31150 filters, val; 31151 if (!cs) { 31152 return; 31153 } 31154 val = b; //just for swapping the variables an inverting them (reused "val" to avoid creating another variable in memory). IE's filter matrix uses a non-standard matrix configuration (angle goes the opposite way, and b and c are reversed and inverted) 31155 b = -c; 31156 c = -val; 31157 filters = cs.filter; 31158 style.filter = ""; //remove filters so that we can accurately measure offsetWidth/offsetHeight 31159 var w = this.t.offsetWidth, 31160 h = this.t.offsetHeight, 31161 clip = (cs.position !== "absolute"), 31162 m = "progid:DXImageTransform.Microsoft.Matrix(M11=" + a + ", M12=" + b + ", M21=" + c + ", M22=" + d, 31163 ox = t.x + (w * t.xPercent / 100), 31164 oy = t.y + (h * t.yPercent / 100), 31165 dx, dy; 31166 31167 //if transformOrigin is being used, adjust the offset x and y 31168 if (t.ox != null) { 31169 dx = ((t.oxp) ? w * t.ox * 0.01 : t.ox) - w / 2; 31170 dy = ((t.oyp) ? h * t.oy * 0.01 : t.oy) - h / 2; 31171 ox += dx - (dx * a + dy * b); 31172 oy += dy - (dx * c + dy * d); 31173 } 31174 31175 if (!clip) { 31176 m += ", sizingMethod='auto expand')"; 31177 } else { 31178 dx = (w / 2); 31179 dy = (h / 2); 31180 //translate to ensure that transformations occur around the correct origin (default is center). 31181 m += ", Dx=" + (dx - (dx * a + dy * b) + ox) + ", Dy=" + (dy - (dx * c + dy * d) + oy) + ")"; 31182 } 31183 if (filters.indexOf("DXImageTransform.Microsoft.Matrix(") !== -1) { 31184 style.filter = filters.replace(_ieSetMatrixExp, m); 31185 } else { 31186 style.filter = m + " " + filters;
31186 //we must always put the transform/matrix FIRST (before alpha(opacity=xx)) to avoid an IE bug that slices part of the object when rotation is applied with alpha. 31187 } 31188 31189 //at the end or beginning of the tween, if the matrix is normal (1, 0, 0, 1) and opacity is 100 (or doesn't exist), remove the filter to improve browser performance. 31190 if (v === 0 || v === 1) if (a === 1) if (b === 0) if (c === 0) if (d === 1) if (!clip || m.indexOf("Dx=0, Dy=0") !== -1) if (!_opacityExp.test(filters) || parseFloat(RegExp.$1) === 100) if (filters.indexOf("gradient(" && filters.indexOf("Alpha")) === -1) { 31191 style.removeAttribute("filter"); 31192 } 31193 31194 //we must set the margins AFTER applying the filter in order to avoid some bugs in IE8 that could (in rare scenarios) cause them to be ignored intermittently (vibration). 31195 if (!clip) { 31196 var mult = (_ieVers < 8) ? 1 : -1, //in Internet Explorer 7 and before, the box model is broken, causing the browser to treat the width/height of the actual rotated filtered image as the width/height of the box itself, but Microsoft corrected that in IE8. We must use a negative offset in IE8 on the right/bottom 31197 marg, prop, dif; 31198 dx = t.ieOffsetX || 0; 31199 dy = t.ieOffsetY || 0; 31200 t.ieOffsetX = Math.round((w - ((a < 0 ? -a : a) * w + (b < 0 ? -b : b) * h)) / 2 + ox); 31201 t.ieOffsetY = Math.round((h - ((d < 0 ? -d : d) * h + (c < 0 ? -c : c) * w)) / 2 + oy); 31202 for (i = 0; i < 4; i++) { 31203 prop = _margins[i]; 31204 marg = cs[prop]; 31205 //we need to get the current margin in case it is being tweened separately (we want to respect that tween's changes) 31206 val = (marg.indexOf("px") !== -1) ? parseFloat(marg) : _convertToPixels(this.t, prop, parseFloat(marg), marg.replace(_suffixExp, "")) || 0; 31207 if (val !== t[prop]) { 31208 dif = (i < 2) ? -t.ieOffsetX : -t.ieOffsetY; //if another tween is controlling a margin, we cannot only apply the difference in the ieOffsets, so we essentially zero-out the dx and dy here in that case. We record the margin(s) later so that we can keep comparing them, making this code very flexible. 31209 } else { 31210 dif = (i < 2) ? dx - t.ieOffsetX : dy - t.ieOffsetY; 31211 } 31212 style[prop] = (t[prop] = Math.round( val - dif * ((i === 0 || i === 2) ? 1 : mult) )) + "px"; 31213 } 31214 } 31215 }, 31216 31217 /* translates a super small decimal to a string WITHOUT scientific notation 31218 _safeDecimal = function(n) { 31219 var s = (n < 0 ? -n : n) + "", 31220 a = s.split("e-"); 31221 return (n < 0 ? "-0." : "0.") + new Array(parseInt(a[1], 10) || 0).join("0") + a[0].split(".").join(""); 31222 }, 31223 */ 31224 31225 _setTransformRatio = _internals.set3DTransformRatio = _internals.setTransformRatio = function(v) { 31226 var t = this.data, //refers to the element's _gsTransform object 31227 style = this.t.style, 31228 angle = t.rotation, 31229 rotationX = t.rotationX, 31230 rotationY = t.rotationY, 31231 sx = t.scaleX, 31232 sy = t.scaleY, 31233 sz = t.scaleZ, 31234 x = t.x, 31235 y = t.y, 31236 z = t.z, 31237 isSVG = t.svg, 31238 perspective = t.perspective, 31239 force3D = t.force3D, 31240 skewY = t.skewY, 31241 skewX = t.skewX, 31242 t1, a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43, 31243 zOrigin, min, cos, sin, t2, transform, comma, zero, skew, rnd; 31244 if (skewY) { //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees. 31245 skewX += skewY; 31246 angle += skewY; 31247 } 31248 31249 //check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true) 31250 if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX && sz === 1) || (_useSVGTransformAttr && isSVG) || !_supports3D) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices. Check the tween's totalTime/totalDuration too in order to make sure it doesn't happen between repeats if it's a repeating tween. 31251 31252 //2D 31253 if (angle || skewX || isSVG) { 31254 angle *= _DEG2RAD; 31255 skew = skewX * _DEG2RAD; 31256 rnd = 100000; 31257 a11 = Math.cos(angle) * sx; 31258 a21 = Math.sin(angle) * sx; 31259 a12 = Math.sin(angle - skew) * -sy;
31260 a22 = Math.cos(angle - skew) * sy; 31261 if (skew && t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does 31262 t1 = Math.tan(skew - skewY * _DEG2RAD); 31263 t1 = Math.sqrt(1 + t1 * t1); 31264 a12 *= t1; 31265 a22 *= t1; 31266 if (skewY) { 31267 t1 = Math.tan(skewY * _DEG2RAD); 31268 t1 = Math.sqrt(1 + t1 * t1); 31269 a11 *= t1; 31270 a21 *= t1; 31271 } 31272 } 31273 if (isSVG) { 31274 x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset; 31275 y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset; 31276 if (_useSVGTransformAttr && (t.xPercent || t.yPercent)) { //The SVG spec doesn't support percentage-based translation in the "transform" attribute, so we merge it into the matrix to simulate it. 31277 min = this.t.getBBox(); 31278 x += t.xPercent * 0.01 * min.width; 31279 y += t.yPercent * 0.01 * min.height; 31280 } 31281 min = 0.000001; 31282 if (x < min) if (x > -min) { 31283 x = 0; 31284 } 31285 if (y < min) if (y > -min) { 31286 y = 0; 31287 } 31288 } 31289 transform = (((a11 * rnd) | 0) / rnd) + "," + (((a21 * rnd) | 0) / rnd) + "," + (((a12 * rnd) | 0) / rnd) + "," + (((a22 * rnd) | 0) / rnd) + "," + x + "," + y + ")"; 31290 if (isSVG && _useSVGTransformAttr) {
31291 this.t.setAttribute("transform", "matrix(" + transform); 31292 } else { 31293 //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places. 31294 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + transform; 31295 } 31296 } else { 31297 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")"; 31298 } 31299 return; 31300 31301 } 31302 if (_isFirefox) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue. 31303 min = 0.0001; 31304 if (sx < min && sx > -min) { 31305 sx = sz = 0.00002; 31306 } 31307 if (sy < min && sy > -min) { 31308 sy = sz = 0.00002; 31309 } 31310 if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z). 31311 perspective = 0; 31312 } 31313 } 31314 if (angle || skewX) { 31315 angle *= _DEG2RAD; 31316 cos = a11 = Math.cos(angle); 31317 sin = a21 = Math.sin(angle); 31318 if (skewX) { 31319 angle -= skewX * _DEG2RAD; 31320 cos = Math.cos(angle); 31321 sin = Math.sin(angle); 31322 if (t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does 31323 t1 = Math.tan((skewX - skewY) * _DEG2RAD); 31324 t1 = Math.sqrt(1 + t1 * t1); 31325 cos *= t1; 31326 sin *= t1; 31327 if (t.skewY) { 31328 t1 = Math.tan(skewY * _DEG2RAD); 31329 t1 = Math.sqrt(1 + t1 * t1); 31330 a11 *= t1; 31331 a21 *= t1; 31332 } 31333 } 31334 } 31335 a12 = -sin; 31336 a22 = cos; 31337 31338 } else if (!rotationY && !rotationX && sz === 1 && !perspective && !isSVG) { //if we're only translating and/or 2D scaling, this is faster... 31339 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) translate3d(" : "translate3d(") + x + "px," + y + "px," + z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : ""); 31340 return; 31341 } else { 31342 a11 = a22 = 1; 31343 a12 = a21 = 0; 31344 } 31345 // KEY INDEX AFFECTS a[row][column] 31346 // a11 0 rotation, rotationY, scaleX 31347 // a21 1 rotation, rotationY, scaleX 31348 // a31 2 rotationY, scaleX 31349 // a41 3 rotationY, scaleX 31350 // a12 4 rotation, skewX, rotationX, scaleY 31351 // a22 5 rotation, skewX, rotationX, scaleY 31352 // a32 6 rotationX, scaleY 31353 // a42 7 rotationX, scaleY 31354 // a13 8 rotationY, rotationX, scaleZ 31355 // a23 9 rotationY, rotationX, scaleZ 31356 // a33 10 rotationY, rotationX, scaleZ 31357 // a43 11 rotationY, rotationX, perspective, scaleZ 31358 // a14 12 x, zOrigin, svgOrigin 31359 // a24 13 y, zOrigin, svgOrigin 31360 // a34 14 z, zOrigin 31361 // a44 15 31362 // rotation: Math.atan2(a21, a11) 31363 // rotationY: Math.atan2(a13, a33) (or Math.atan2(a13, a11)) 31364 // rotationX: Math.atan2(a32, a33) 31365 a33 = 1; 31366 a13 = a23 = a31 = a32 = a41 = a42 = 0; 31367 a43 = (perspective) ? -1 / perspective : 0; 31368 zOrigin = t.zOrigin; 31369 min = 0.000001; //threshold below which browsers use scientific notation which won't work. 31370 comma = ","; 31371 zero = "0"; 31372 angle = rotationY * _DEG2RAD; 31373 if (angle) { 31374 cos = Math.cos(angle); 31375 sin = Math.sin(angle);
31376 a31 = -sin; 31377 a41 = a43*-sin; 31378 a13 = a11*sin; 31379 a23 = a21*sin; 31380 a33 = cos; 31381 a43 *= cos; 31382 a11 *= cos; 31383 a21 *= cos; 31384 } 31385 angle = rotationX * _DEG2RAD; 31386 if (angle) { 31387 cos = Math.cos(angle); 31388 sin = Math.sin(angle); 31389 t1 = a12*cos+a13*sin; 31390 t2 = a22*cos+a23*sin; 31391 a32 = a33*sin; 31392 a42 = a43*sin; 31393 a13 = a12*-sin+a13*cos; 31394 a23 = a22*-sin+a23*cos; 31395 a33 = a33*cos; 31396 a43 = a43*cos; 31397 a12 = t1; 31398 a22 = t2; 31399 } 31400 if (sz !== 1) { 31401 a13*=sz; 31402 a23*=sz; 31403 a33*=sz; 31404 a43*=sz; 31405 } 31406 if (sy !== 1) { 31407 a12*=sy; 31408 a22*=sy; 31409 a32*=sy; 31410 a42*=sy; 31411 } 31412 if (sx !== 1) { 31413 a11*=sx; 31414 a21*=sx; 31415 a31*=sx; 31416 a41*=sx; 31417 } 31418 31419 if (zOrigin || isSVG) { 31420 if (zOrigin) { 31421 x += a13*-zOrigin; 31422 y += a23*-zOrigin; 31423 z += a33*-zOrigin+zOrigin; 31424 } 31425 if (isSVG) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually 31426 x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset; 31427 y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset; 31428 } 31429 if (x < min && x > -min) { 31430 x = zero; 31431 } 31432 if (y < min && y > -min) { 31433 y = zero; 31434 } 31435 if (z < min && z > -min) { 31436 z = 0; //don't use string because we calculate perspective later and need the number. 31437 } 31438 } 31439 31440 //optimized way of concatenating all the values into a string. If we do it all in one shot, it's slower because of the way browsers have to create temp strings and the way it affects memory. If we do it piece-by-piece with +=, it's a bit slower too. We found that doing it in these sized chunks works best overall: 31441 transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d("); 31442 transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31); 31443 transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22); 31444 if (rotationX || rotationY || sz !== 1) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations) 31445 transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13); 31446 transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma; 31447 } else { 31448 transform += ",0,0,0,0,1,0,"; 31449 } 31450 transform += x + comma + y + comma + z + comma + (perspective ? (1 + (-z / perspective)) : 1) + ")"; 31451 31452 style[_transformProp] = transform; 31453 }; 31454 31455 p = Transform.prototype; 31456 p.x = p.y = p.z = p.skewX = p.skewY = p.rotation = p.rotationX = p.rotationY = p.zOrigin = p.xPercent = p.yPercent = p.xOffset = p.yOffset = 0; 31457 p.scaleX = p.scaleY = p.scaleZ = 1; 31458 31459 _registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin", {parser:function(t, e, parsingProp, cssp, pt, plugin, vars) { 31460 if (cssp._lastParsedTransform === vars) { return pt; } //only need to parse the transform once, and only if the browser supports it. 31461 cssp._lastParsedTransform = vars; 31462 var scaleFunc = (vars.scale && typeof(vars.scale) === "function") ? vars.scale : 0; //if there's a function-based "scale" value, swap in the resulting numeric value temporarily. Otherwise, if it's called for both scaleX and scaleY independently, they may not match (like if the function uses Math.random()). 31463 if (scaleFunc) { 31464 vars.scale = scaleFunc(_index, t); 31465 } 31466 var originalGSTransform = t._gsTransform, 31467 style = t.style, 31468 min = 0.000001, 31469 i = _transformProps.length, 31470 v = vars, 31471 endRotations = {}, 31472 transformOriginString = "transformOrigin", 31473 m1 = _getTransform(t, _cs, true, v.parseTransform), 31474 orig = v.transform && ((typeof(v.transform) === "function") ? v.transform(_index, _target) : v.transform), 31475 m2, copy, has3D, hasChange, dr, x, y, matrix, p; 31476 m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType; 31477 cssp._transform = m1; 31478 if ("rotationZ" in v) { 31479 v.rotation = v.rotationZ; 31480 } 31481 if (orig && typeof(orig) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)" 31482 copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly. 31483 copy[_transformProp] = orig; 31484 copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly. 31485 copy.position = "absolute"; 31486 if (orig.indexOf("%") !== -1) { //%-based translations will fail unless we set the width/height to match the original target... 31487 copy.width = _getStyle(t, "width");
31488 copy.height = _getStyle(t, "height"); 31489 } 31490 _doc.body.appendChild(_tempDiv); 31491 m2 = _getTransform(_tempDiv, null, false); 31492 if (m1.skewType === "simple") { //the default _getTransform() reports the skewX/scaleY as if skewType is "compensated", thus we need to adjust that here if skewType is "simple". 31493 m2.scaleY *= Math.cos(m2.skewX * _DEG2RAD); 31494 } 31495 if (m1.svg) { //if it's an SVG element, x/y part of the matrix will be affected by whatever we use as the origin and the offsets, so compensate here... 31496 x = m1.xOrigin; 31497 y = m1.yOrigin; 31498 m2.x -= m1.xOffset; 31499 m2.y -= m1.yOffset; 31500 if (v.transformOrigin || v.svgOrigin) { //if this tween is altering the origin, we must factor that in here. The actual work of recording the transformOrigin values and setting up the PropTween is done later (still inside this function) so we cannot leave the changes intact here - we only want to update the x/y accordingly. 31501 orig = {}; 31502 _parseSVGOrigin(t, _parsePosition(v.transformOrigin), orig, v.svgOrigin, v.smoothOrigin, true); 31503 x = orig.xOrigin; 31504 y = orig.yOrigin; 31505 m2.x -= orig.xOffset - m1.xOffset; 31506 m2.y -= orig.yOffset - m1.yOffset; 31507 } 31508 if (x || y) { 31509 matrix = _getMatrix(_tempDiv, true); 31510 m2.x -= x - (x * matrix[0] + y * matrix[2]); 31511 m2.y -= y - (x * matrix[1] + y * matrix[3]); 31512 } 31513 } 31514 _doc.body.removeChild(_tempDiv); 31515 if (!m2.perspective) { 31516 m2.perspective = m1.perspective; //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case. 31517 } 31518 if (v.xPercent != null) { 31519 m2.xPercent = _parseVal(v.xPercent, m1.xPercent); 31520 } 31521 if (v.yPercent != null) { 31522 m2.yPercent = _parseVal(v.yPercent, m1.yPercent); 31523 } 31524 } else if (typeof(v) === "object") { //for values like scaleX, scaleY, rotation, x, y, skewX, and skewY or transform:{...} (object) 31525 m2 = {scaleX:_parseVal((v.scaleX != null) ? v.scaleX : v.scale, m1.scaleX), 31526 scaleY:_parseVal((v.scaleY != null) ? v.scaleY : v.scale, m1.scaleY), 31527 scaleZ:_parseVal(v.scaleZ, m1.scaleZ), 31528 x:_parseVal(v.x, m1.x), 31529 y:_parseVal(v.y, m1.y), 31530 z:_parseVal(v.z, m1.z), 31531 xPercent:_parseVal(v.xPercent, m1.xPercent), 31532 yPercent:_parseVal(v.yPercent, m1.yPercent), 31533 perspective:_parseVal(v.transformPerspective, m1.perspective)}; 31534 dr = v.directionalRotation; 31535 if (dr != null) { 31536 if (typeof(dr) === "object") { 31537 for (copy in dr) { 31538 v[copy] = dr[copy]; 31539 } 31540 } else { 31541 v.rotation = dr; 31542 } 31543 } 31544 if (typeof(v.x) === "string" && v.x.indexOf("%") !== -1) { 31545 m2.x = 0; 31546 m2.xPercent = _parseVal(v.x, m1.xPercent); 31547 } 31548 if (typeof(v.y) === "string" && v.y.indexOf("%") !== -1) { 31549 m2.y = 0; 31550 m2.yPercent = _parseVal(v.y, m1.yPercent); 31551 } 31552 31553 m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : m1.rotation, m1.rotation, "rotation", endRotations); 31554 if (_supports3D) { 31555 m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations); 31556 m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations); 31557 } 31558 m2.skewX = _parseAngle(v.skewX, m1.skewX); 31559 m2.skewY = _parseAngle(v.skewY, m1.skewY); 31560 } 31561 if (_supports3D && v.force3D != null) { 31562 m1.force3D = v.force3D; 31563 hasChange = true; 31564 } 31565 31566 has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective); 31567 if (!has3D && v.scale != null) { 31568 m2.scaleZ = 1; //no need to tween scaleZ. 31569 } 31570 31571 while (--i > -1) { 31572 p = _transformProps[i]; 31573 orig = m2[p] - m1[p]; 31574 if (orig > min || orig < -min || v[p] != null || _forcePT[p] != null) { 31575 hasChange = true; 31576 pt = new CSSPropTween(m1, p, m1[p], orig, pt); 31577 if (p in endRotations) { 31578 pt.e = endRotations[p]; //directional rotations typically have compensated values during the tween, but we need to make sure they end at exactly what the user requested 31579 } 31580 pt.xs0 = 0; //ensures the value stays numeric in setRatio() 31581 pt.plugin = plugin; 31582 cssp._overwriteProps.push(pt.n); 31583 } 31584 } 31585 31586 orig = (typeof(v.transformOrigin) === "function") ? v.transformOrigin(_index, _target) : v.transformOrigin; 31587 if (m1.svg && (orig || v.svgOrigin)) { 31588 x = m1.xOffset; //when we change the origin, in order to prevent things from jumping we adjust the x/y so we must record those here so that we can create PropTweens for them and flip them at the same time as the origin 31589 y = m1.yOffset; 31590 _parseSVGOrigin(t, _parsePosition(orig), m2, v.svgOrigin, v.smoothOrigin); 31591 pt = _addNonTweeningNumericPT(m1, "xOrigin", (originalGSTransform ? m1 : m2).xOrigin, m2.xOrigin, pt, transformOriginString); //note: if there wasn't a transformOrigin defined yet, just start with the destination one; it's wasteful otherwise, and it causes problems with fromTo() tweens. For example, TweenLite.to("#wheel", 3, {rotation:180, transformOrigin:"50% 50%", delay:1}); TweenLite.fromTo("#wheel", 3, {scale:0.5, transformOrigin:"50% 50%"}, {scale:1, delay:2}); would cause a jump when the from values revert at the beginning of the 2nd tween.
31592 pt = _addNonTweeningNumericPT(m1, "yOrigin", (originalGSTransform ? m1 : m2).yOrigin, m2.yOrigin, pt, transformOriginString); 31593 if (x !== m1.xOffset || y !== m1.yOffset) { 31594 pt = _addNonTweeningNumericPT(m1, "xOffset", (originalGSTransform ? x : m1.xOffset), m1.xOffset, pt, transformOriginString); 31595 pt = _addNonTweeningNumericPT(m1, "yOffset", (originalGSTransform ? y : m1.yOffset), m1.yOffset, pt, transformOriginString); 31596 } 31597 orig = "0px 0px"; //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin 31598 } 31599 if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly). 31600 if (_transformProp) { 31601 hasChange = true; 31602 p = _transformOriginProp; 31603 if (!orig) { 31604 orig = (_getStyle(t, p, _cs, false, "50% 50%") + "").split(" "); 31605 orig = orig[0] + " " + orig[1] + " " + m1.zOrigin + "px"; 31606 } 31607 orig += ""; 31608 pt = new CSSPropTween(style, p, 0, 0, pt, -1, transformOriginString); 31609 pt.b = style[p]; 31610 pt.plugin = plugin; 31611 if (_supports3D) { 31612 copy = m1.zOrigin; 31613 orig = orig.split(" "); 31614 m1.zOrigin = ((orig.length > 2) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method. 31615 pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)! 31616 pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here) 31617 pt.b = copy; 31618 pt.xs0 = pt.e = m1.zOrigin; 31619 } else { 31620 pt.xs0 = pt.e = orig; 31621 } 31622 31623 //for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp). 31624 } else { 31625 _parsePosition(orig + "", m1); 31626 } 31627 } 31628 if (hasChange) { 31629 cssp._transformType = (!(m1.svg && _useSVGTransformAttr) && (has3D || this._transformType === 3)) ? 3 : 2; //quicker than calling cssp._enableTransforms(); 31630 } 31631 if (scaleFunc) { 31632 vars.scale = scaleFunc; 31633 } 31634 return pt; 31635 }, allowFunc:true, prefix:true}); 31636 31637 _registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"}); 31638 _registerComplexSpecialProp("clipPath", {defaultValue:"inset(0px)", prefix:true, multi:true, formatter:_getFormatter("inset(0px 0px 0px 0px)", false, true)}); 31639 31640 _registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) { 31641 e = this.format(e); 31642 var props = ["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"], 31643 style = t.style, 31644 ea1, i, es2, bs2, bs, es, bn, en, w, h, esfx, bsfx, rel, hn, vn, em; 31645 w = parseFloat(t.offsetWidth); 31646 h = parseFloat(t.offsetHeight); 31647 ea1 = e.split(" "); 31648 for (i = 0; i < props.length; i++) { //if we're dealing with percentages, we must convert things separately for the horizontal and vertical axis! 31649 if (this.p.indexOf("border")) { //older browsers used a prefix 31650 props[i] = _checkPropPrefix(props[i]); 31651 } 31652 bs = bs2 = _getStyle(t, props[i], _cs, false, "0px"); 31653 if (bs.indexOf(" ") !== -1) { 31654 bs2 = bs.split(" "); 31655 bs = bs2[0]; 31656 bs2 = bs2[1]; 31657 } 31658 es = es2 = ea1[i]; 31659 bn = parseFloat(bs); 31660 bsfx = bs.substr((bn + "").length); 31661 rel = (es.charAt(1) === "="); 31662 if (rel) { 31663 en = parseInt(es.charAt(0)+"1", 10); 31664 es = es.substr(2); 31665 en *= parseFloat(es); 31666 esfx = es.substr((en + "").length - (en < 0 ? 1 : 0)) || ""; 31667 } else { 31668 en = parseFloat(es); 31669 esfx = es.substr((en + "").length); 31670 } 31671 if (esfx === "") { 31672 esfx = _suffixMap[p] || bsfx; 31673 } 31674 if (esfx !== bsfx) { 31675 hn = _convertToPixels(t, "borderLeft", bn, bsfx); //horizontal number (we use a bogus "borderLeft" property just because the _convertToPixels() method searches for the keywords "Left", "Right", "Top", and "Bottom" to determine of it's a horizontal or vertical property, and we need "border" in the name so that it knows it should measure relative to the element itself, not its parent. 31676 vn = _convertToPixels(t, "borderTop", bn, bsfx); //vertical number 31677 if (esfx === "%") { 31678 bs = (hn / w * 100) + "%"; 31679 bs2 = (vn / h * 100) + "%"; 31680 } else if (esfx === "em") { 31681 em = _convertToPixels(t, "borderLeft", 1, "em"); 31682 bs = (hn / em) + "em"; 31683 bs2 = (vn / em) + "em"; 31684 } else { 31685 bs = hn + "px"; 31686 bs2 = vn + "px"; 31687 } 31688 if (rel) { 31689 es = (parseFloat(bs) + en) + esfx; 31690 es2 = (parseFloat(bs2) + en) + esfx; 31691 } 31692 } 31693 pt = _parseComplex(style, props[i], bs + " " + bs2, es + " " + es2, false, "0px", pt); 31694 } 31695 return pt; 31696 }, prefix:true, formatter:_getFormatter("0px 0px 0px 0px", false, true)}); 31697 _registerComplexSpecialProp("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) { 31698 return _parseComplex(t.style, p, this.format(_getStyle(t, p, _cs, false, "0px 0px")), this.format(e), false, "0px", pt); 31699 }, prefix:true, formatter:_getFormatter("0px 0px", false, true)}); 31700 _registerComplexSpecialProp("backgroundPosition", {defaultValue:"0 0", parser:function(t, e, p, cssp, pt, plugin) { 31701 var bp = "background-position", 31702 cs = (_cs || _getComputedStyle(t, null)), 31703 bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase 31704 es = this.format(e), 31705 ba, ea, i, pct, overlap, src; 31706 if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1) && es.split(",").length < 2) { 31707 src = _getStyle(t, "backgroundImage").replace(_urlExp, ""); 31708 if (src && src !== "none") { 31709 ba = bs.split(" "); 31710 ea = es.split(" "); 31711 _tempImg.setAttribute("src", src); //set the temp IMG's src to the background-image so that we can measure its width/height 31712 i = 2; 31713 while (--i > -1) { 31714 bs = ba[i]; 31715 pct = (bs.indexOf("%") !== -1); 31716 if (pct !== (ea[i].indexOf("%") !== -1)) { 31717 overlap = (i === 0) ? t.offsetWidth - _tempImg.width : t.offsetHeight - _tempImg.height; 31718 ba[i] = pct ? (parseFloat(bs) / 100 * overlap) + "px" : (parseFloat(bs) / overlap * 100) + "%"; 31719 } 31720 } 31721 bs = ba.join(" "); 31722 } 31723 } 31724 return this.parseComplex(t.style, bs, es, pt, plugin); 31725 }, formatter:_parsePosition}); 31726 _registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:function(v) { 31727 v += ""; //ensure it's a string 31728 return (v.substr(0,2) === "co") ? v : _parsePosition(v.indexOf(" ") === -1 ? v + " " + v : v); //if set to something like "100% 100%", Safari typically reports the computed style as just "100%" (no 2nd value), but we should ensure that there are two values, so copy the first one. Otherwise, it'd be interpreted as "100% 0" (wrong). Also remember that it could be "cover" or "contain" which we can't tween but should be able to set. 31729 }}); 31730 _registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true}); 31731 _registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true}); 31732 _registerComplexSpecialProp("transformStyle", {prefix:true}); 31733 _registerComplexSpecialProp("backfaceVisibility", {prefix:true}); 31734 _registerComplexSpecialProp("userSelect", {prefix:true}); 31735 _registerComplexSpecialProp("margin", {parser:_getEdgeParser("marginTop,marginRight,marginBottom,marginLeft")}); 31736 _registerComplexSpecialProp("padding", {parser:_getEdgeParser("paddingTop,paddingRight,paddingBottom,paddingLeft")}); 31737 _registerComplexSpecialProp("clip", {defaultValue:"rect(0px,0px,0px,0px)", parser:function(t, e, p, cssp, pt, plugin){ 31738 var b, cs, delim; 31739 if (_ieVers < 9) { //IE8 and earlier don't report a "clip" value in the currentStyle - instead, the values are split apart into clipTop, clipRight, clipBottom, and clipLeft. Also, in IE7 and earlier, the values inside rect() are space-delimited, not comma-delimited. 31740 cs = t.currentStyle; 31741 delim = _ieVers < 8 ? " " : ","; 31742 b = "rect(" + cs.clipTop + delim + cs.clipRight + delim + cs.clipBottom + delim + cs.clipLeft + ")"; 31743 e = this.format(e).split(",").join(delim); 31744 } else { 31745 b = this.format(_getStyle(t, this.p, _cs, false, this.dflt)); 31746 e = this.format(e); 31747 } 31748 return this.parseComplex(t.style, b, e, pt, plugin); 31749 }}); 31750 _registerComplexSpecialProp("textShadow", {defaultValue:"0px 0px 0px #999", color:true, multi:true}); 31751 _registerComplexSpecialProp("autoRound,strictUnits", {parser:function(t, e, p, cssp, pt) {return pt;}}); //just so that we can ignore these properties (not tween them) 31752 _registerComplexSpecialProp("border", {defaultValue:"0px solid #000", parser:function(t, e, p, cssp, pt, plugin) { 31753 var bw = _getStyle(t, "borderTopWidth", _cs, false, "0px"), 31754 end = this.format(e).split(" "), 31755 esfx = end[0].replace(_suffixExp, ""); 31756 if (esfx !== "px") { //if we're animating to a non-px value, we need to convert the beginning width to that unit. 31757 bw = (parseFloat(bw) / _convertToPixels(t, "borderTopWidth", 1, esfx)) + esfx; 31758 } 31759 return this.parseComplex(t.style, this.format(bw + " " + _getStyle(t, "borderTopStyle", _cs, false, "solid") + " " + _getStyle(t, "borderTopColor", _cs, false, "#000")), end.join(" "), pt, plugin); 31760 }, color:true, formatter:function(v) { 31761 var a = v.split(" "); 31762 return a[0] + " " + (a[1] || "solid") + " " + (v.match(_colorExp) || ["#000"])[0]; 31763 }}); 31764 _registerComplexSpecialProp("borderWidth", {parser:_getEdgeParser("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}); //Firefox doesn't pick up on borderWidth set in style sheets (only inline). 31765 _registerComplexSpecialProp("float,cssFloat,styleFloat", {parser:function(t, e, p, cssp, pt, plugin) { 31766 var s = t.style, 31767 prop = ("cssFloat" in s) ? "cssFloat" : "styleFloat"; 31768 return new CSSPropTween(s, prop, 0, 0, pt, -1, p, false, 0, s[prop], e); 31769 }}); 31770 31771 //opacity-related 31772 var _setIEOpacityRatio = function(v) { 31773 var t = this.t, //refers to the element's style property 31774 filters = t.filter || _getStyle(this.data, "filter") || "", 31775 val = (this.s + this.c * v) | 0, 31776 skip; 31777 if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters. 31778 if (filters.indexOf("atrix(") === -1 && filters.indexOf("radient(") === -1 && filters.indexOf("oader(") === -1) { 31779 t.removeAttribute("filter"); 31780 skip = (!_getStyle(this.data, "filter")); //if a class is applied that has an alpha filter, it will take effect (we don't want that), so re-apply our alpha filter in that case. We must first remove it and then check. 31781 } else {
31782 t.filter = filters.replace(_alphaFilterExp, ""); 31783 skip = true; 31784 } 31785 } 31786 if (!skip) { 31787 if (this.xn1) { 31788 t.filter = filters = filters || ("alpha(opacity=" + val + ")"); //works around bug in IE7/8 that prevents changes to "visibility" from being applied properly if the filter is changed to a different alpha on the same frame. 31789 } 31790 if (filters.indexOf("pacity") === -1) { //only used if browser doesn't support the standard opacity style property (IE 7 and 8). We omit the "O" to avoid case-sensitivity issues 31791 if (val !== 0 || !this.xn1) { //bugs in IE7/8 won't render the filter properly if opacity is ADDED on the same frame/render as "visibility" changes (this.xn1 is 1 if this tween is an "autoAlpha" tween) 31792 t.filter = filters + " alpha(opacity=" + val + ")"; //we round the value because otherwise, bugs in IE7/8 can prevent "visibility" changes from being applied properly. 31793 } 31794 } else { 31795 t.filter = filters.replace(_opacityExp, "opacity=" + val); 31796 } 31797 } 31798 }; 31799 _registerComplexSpecialProp("opacity,alpha,autoAlpha", {defaultValue:"1", parser:function(t, e, p, cssp, pt, plugin) { 31800 var b = parseFloat(_getStyle(t, "opacity", _cs, false, "1")), 31801 style = t.style, 31802 isAutoAlpha = (p === "autoAlpha"); 31803 if (typeof(e) === "string" && e.charAt(1) === "=") { 31804 e = ((e.charAt(0) === "-") ? -1 : 1) * parseFloat(e.substr(2)) + b; 31805 } 31806 if (isAutoAlpha && b === 1 && _getStyle(t, "visibility", _cs) === "hidden" && e !== 0) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience) 31807 b = 0; 31808 } 31809 if (_supportsOpacity) { 31810 pt = new CSSPropTween(style, "opacity", b, e - b, pt); 31811 } else { 31812 pt = new CSSPropTween(style, "opacity", b * 100, (e - b) * 100, pt); 31813 pt.xn1 = isAutoAlpha ? 1 : 0; //we need to record whether or not this is an autoAlpha so that in the setRatio(), we know to duplicate the setting of the alpha in order to work around a bug in IE7 and IE8 that prevents changes to "visibility" from taking effect if the filter is changed to a different alpha(opacity) at the same time. Setting it to the SAME value first, then the new value works around the IE7/8 bug. 31814 style.zoom = 1; //helps correct an IE issue. 31815 pt.type = 2; 31816 pt.b = "alpha(opacity=" + pt.s + ")"; 31817 pt.e = "alpha(opacity=" + (pt.s + pt.c) + ")"; 31818 pt.data = t; 31819 pt.plugin = plugin; 31820 pt.setRatio = _setIEOpacityRatio; 31821 } 31822 if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier 31823 pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit")); 31824 pt.xs0 = "inherit"; 31825 cssp._overwriteProps.push(pt.n); 31826 cssp._overwriteProps.push(p); 31827 } 31828 return pt; 31829 }}); 31830 31831 31832 var _removeProp = function(s, p) { 31833 if (p) { 31834 if (s.removeProperty) { 31835 if (p.substr(0,2) === "ms" || p.substr(0,6) === "webkit") { //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example) 31836 p = "-" + p; 31837 } 31838 s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase()); 31839 } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()" 31840 s.removeAttribute(p); 31841 } 31842 } 31843 }, 31844 _setClassNameRatio = function(v) { 31845 this.t._gsClassPT = this; 31846 if (v === 1 || v === 0) { 31847 this.t.setAttribute("class", (v === 0) ? this.b : this.e); 31848 var mpt = this.data, //first MiniPropTween 31849 s = this.t.style; 31850 while (mpt) { 31851 if (!mpt.v) { 31852 _removeProp(s, mpt.p); 31853 } else { 31854 s[mpt.p] = mpt.v; 31855 } 31856 mpt = mpt._next; 31857 } 31858 if (v === 1 && this.t._gsClassPT === this) { 31859 this.t._gsClassPT = null; 31860 } 31861 } else if (this.t.getAttribute("class") !== this.e) { 31862 this.t.setAttribute("class", this.e); 31863 } 31864 }; 31865 _registerComplexSpecialProp("className", {parser:function(t, e, p, cssp, pt, plugin, vars) { 31866 var b = t.getAttribute("class") || "", //don't use t.className because it doesn't work consistently on SVG elements; getAttribute("class") and setAttribute("class", value") is more reliable. 31867 cssText = t.style.cssText, 31868 difData, bs, cnpt, cnptLookup, mpt; 31869 pt = cssp._classNamePT = new CSSPropTween(t, p, 0, 0, pt, 2); 31870 pt.setRatio = _setClassNameRatio; 31871 pt.pr = -11; 31872 _hasPriority = true; 31873 pt.b = b; 31874 bs = _getAllStyles(t, _cs); 31875 //if there's a className tween already operating on the target, force it to its end so that the necessary inline styles are removed and the class name is applied before we determine the end state (we don't want inline styles interfer
31875ing that were there just for class-specific values) 31876 cnpt = t._gsClassPT; 31877 if (cnpt) { 31878 cnptLookup = {}; 31879 mpt = cnpt.data; //first MiniPropTween which stores the inline styles - we need to force these so that the inline styles don't contaminate things. Otherwise, there's a small chance that a tween could start and the inline values match the destination values and they never get cleaned. 31880 while (mpt) { 31881 cnptLookup[mpt.p] = 1; 31882 mpt = mpt._next; 31883 } 31884 cnpt.setRatio(1); 31885 } 31886 t._gsClassPT = pt; 31887 pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("(?:\\s|^)" + e.substr(2) + "(?![\\w-])"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : ""); 31888 t.setAttribute("class", pt.e); 31889 difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup); 31890 t.setAttribute("class", b); 31891 pt.data = difData.firstMPT; 31892 t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity). 31893 pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself) 31894 return pt; 31895 }}); 31896 31897 31898 var _setClearPropsRatio = function(v) { 31899 if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in). 31900 var s = this.t.style, 31901 transformParse = _specialProps.transform.parse, 31902 a, p, i, clearTransform, transform; 31903 if (this.e === "all") { 31904 s.cssText = ""; 31905 clearTransform = true; 31906 } else { 31907 a = this.e.split(" ").join("").split(","); 31908 i = a.length; 31909 while (--i > -1) { 31910 p = a[i]; 31911 if (_specialProps[p]) { 31912 if (_specialProps[p].parse === transformParse) { 31913 clearTransform = true; 31914 } else { 31915 p = (p === "transformOrigin") ? _transformOriginProp : _specialProps[p].p; //ensures that special properties use the proper browser-specific property name, like "scaleX" might be "-webkit-transform" or "boxShadow" might be "-moz-box-shadow" 31916 } 31917 } 31918 _removeProp(s, p); 31919 } 31920 } 31921 if (clearTransform) { 31922 _removeProp(s, _transformProp); 31923 transform = this.t._gsTransform; 31924 if (transform) { 31925 if (transform.svg) { 31926 this.t.removeAttribute("data-svg-origin"); 31927 this.t.removeAttribute("transform"); 31928 } 31929 delete this.t._gsTransform; 31930 } 31931 } 31932 31933 } 31934 }; 31935 _registerComplexSpecialProp("clearProps", {parser:function(t, e, p, cssp, pt) { 31936 pt = new CSSPropTween(t, p, 0, 0, pt, 2); 31937 pt.setRatio = _setClearPropsRatio; 31938 pt.e = e; 31939 pt.pr = -10; 31940 pt.data = cssp._tween; 31941 _hasPriority = true; 31942 return pt; 31943 }}); 31944 31945 p = "bezier,throwProps,physicsProps,physics2D".split(","); 31946 i = p.length; 31947 while (i--) { 31948 _registerPluginProp(p[i]); 31949 } 31950 31951 31952 31953 31954 31955 31956 31957 31958 p = CSSPlugin.prototype; 31959 p._firstPT = p._lastParsedTransform = p._transform = null; 31960 31961 //gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc. 31962 p._onInitTween = function(target, vars, tween, index) { 31963 if (!target.nodeType) { //css is only for dom elements 31964 return false; 31965 } 31966 this._target = _target = target; 31967 this._tween = tween; 31968 this._vars = vars; 31969 _index = index; 31970 _autoRound = vars.autoRound; 31971 _hasPriority = false;
31972 _suffixMap = vars.suffixMap || CSSPlugin.suffixMap; 31973 _cs = _getComputedStyle(target, ""); 31974 _overwriteProps = this._overwriteProps; 31975 var style = target.style, 31976 v, pt, pt2, first, last, next, zIndex, tpt, threeD; 31977 if (_reqSafariFix) if (style.zIndex === "") { 31978 v = _getStyle(target, "zIndex", _cs); 31979 if (v === "auto" || v === "") { 31980 //corrects a bug in [non-Android] Safari that prevents it from repainting elements in their new positions if they don't have a zIndex set. We also can't just apply this inside _parseTransform() because anything that's moved in any way (like using "left" or "top" instead of transforms like "x" and "y") can be affected, so it is best to ensure that anything that's tweening has a z-index. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. Plus zIndex is less memory-intensive. 31981 this._addLazySet(style, "zIndex", 0); 31982 } 31983 } 31984 31985 if (typeof(vars) === "string") { 31986 first = style.cssText; 31987 v = _getAllStyles(target, _cs); 31988 style.cssText = first + ";" + vars; 31989 v = _cssDif(target, v, _getAllStyles(target)).difs; 31990 if (!_supportsOpacity && _opacityValExp.test(vars)) { 31991 v.opacity = parseFloat( RegExp.$1 ); 31992 } 31993 vars = v; 31994 style.cssText = first; 31995 } 31996 31997 if (vars.className) { //className tweens will combine any differences they find in the css with the vars that are passed in, so {className:"myClass", scale:0.5, left:20} would work. 31998 this._firstPT = pt = _specialProps.className.parse(target, vars.className, "className", this, null, null, vars); 31999 } else { 32000 this._firstPT = pt = this.parse(target, vars, null); 32001 } 32002 32003 if (this._transformType) { 32004 threeD = (this._transformType === 3); 32005 if (!_transformProp) { 32006 style.zoom = 1; //helps correct an IE issue. 32007 } else if (_isSafari) { 32008 _reqSafariFix = true; 32009 //if zIndex isn't set, iOS Safari doesn't repaint things correctly sometimes (seemingly at random). 32010 if (style.zIndex === "") { 32011 zIndex = _getStyle(target, "zIndex", _cs); 32012 if (zIndex === "auto" || zIndex === "") { 32013 this._addLazySet(style, "zIndex", 0); 32014 } 32015 } 32016 //Setting WebkitBackfaceVisibility corrects 3 bugs: 32017 // 1) [non-Android] Safari skips rendering changes to "top" and "left" that are made on the same frame/render as a transform update. 32018 // 2) iOS Safari sometimes neglects to repaint elements in their new positions. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. 32019 // 3) Safari sometimes displayed odd artifacts when tweening the transform (or WebkitTransform) property, like ghosts of the edges of the element remained. Definitely a browser bug. 32020 //Note: we allow the user to override the auto-setting by defining WebkitBackfaceVisibility in the vars of the tween. 32021 if (_isSafariLT6) { 32022 this._addLazySet(style, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (threeD ? "visible" : "hidden")); 32023 } 32024 } 32025 pt2 = pt; 32026 while (pt2 && pt2._next) { 32027 pt2 = pt2._next; 32028 } 32029 tpt = new CSSPropTween(target, "transform", 0, 0, null, 2); 32030 this._linkCSSP(tpt, null, pt2); 32031 tpt.setRatio = _transformProp ? _setTransformRatio : _setIETransformRatio; 32032 tpt.data = this._transform || _getTransform(target, _cs, true); 32033 tpt.tween = tween; 32034 tpt.pr = -1; //ensures that the transforms get applied after the components are updated. 32035 _overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here. 32036 } 32037 32038 if (_hasPriority) { 32039 //reorders the linked list in order of pr (priority) 32040 while (pt) { 32041 next = pt._next; 32042 pt2 = first; 32043 while (pt2 && pt2.pr > pt.pr) { 32044 pt2 = pt2._next; 32045 } 32046 if ((pt._prev = pt2 ? pt2._prev : last)) { 32047 pt._prev._next = pt; 32048 } else { 32049 first = pt; 32050 } 32051 if ((pt._next = pt2)) { 32052 pt2._prev = pt; 32053 } else { 32054 last = pt; 32055 } 32056 pt = next; 32057 } 32058 this._firstPT = first; 32059 } 32060 return true; 32061 }; 32062 32063 32064 p.parse = function(target, vars, pt, plugin) { 32065 var style = target.style, 32066 p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel; 32067 for (p in vars) { 32068 es = vars[p]; //ending value string 32069 sp = _specialProps[p]; //SpecialProp lookup. 32070 if (typeof(es) === "function" && !(sp && sp.allowFunc)) { 32071 es = es(_index, _target); 32072 } 32073 if (sp) { 32074 pt = sp.parse(target, es, p, this, pt, plugin, vars); 32075 } else if (p.substr(0,2) === "--") { //for tweening CSS variables (which always start with "--"). To maximize performance and simplicity, we bypass CSSPlugin altogether and just add a normal property tween to the tween instance itself. 32076 this._tween._propLookup[p] = this._addTween.call(this._tween, target.style, "setProperty", _getComputedStyle(target).getPropertyValue(p) + "", es + "", p, false, p); 32077 continue; 32078 } else { 32079 bs = _getStyle(target, p, _cs) + ""; 32080 isStr = (typeof(es) === "string"); 32081 if (p === "color" || p === "fill" || p === "stroke" || p.indexOf("Color") !== -1 || (isStr && _rgbhslExp.test(es))) { //Opera uses background: to define color sometimes in addition to backgroundColor: 32082 if (!isStr) { 32083 es = _parseColor(es); 32084 es = ((es.length > 3) ? "rgba(" : "rgb(") + es.join(",") + ")"; 32085 } 32086 pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin); 32087 32088 } else if (isStr && _complexExp.test(es)) { 32089 pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin); 32090 32091 } else { 32092 bn = parseFloat(bs); 32093 bsfx = (bn || bn === 0) ? bs.substr((bn + "").length) : ""; //remember, bs could be non-numeric like "normal" for fontWeight, so we should default to a blank suffix in that case. 32094 32095 if (bs === "" || bs === "auto") { 32096 if (p === "width" || p === "height") { 32097 bn = _getDimension(target, p, _cs); 32098 bsfx = "px"; 32099 } else if (p === "left" || p === "top") {
32100 bn = _calculateOffset(target, p, _cs); 32101 bsfx = "px"; 32102 } else { 32103 bn = (p !== "opacity") ? 0 : 1; 32104 bsfx = ""; 32105 } 32106 } 32107 32108 rel = (isStr && es.charAt(1) === "="); 32109 if (rel) { 32110 en = parseInt(es.charAt(0) + "1", 10); 32111 es = es.substr(2); 32112 en *= parseFloat(es); 32113 esfx = es.replace(_suffixExp, ""); 32114 } else { 32115 en = parseFloat(es); 32116 esfx = isStr ? es.replace(_suffixExp, "") : ""; 32117 } 32118 32119 if (esfx === "") { 32120 esfx = (p in _suffixMap) ? _suffixMap[p] : bsfx; //populate the end suffix, prioritizing the map, then if none is found, use the beginning suffix. 32121 } 32122 32123 es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix. 32124 //if the beginning/ending suffixes don't match, normalize them... 32125 if (bsfx !== esfx) if (esfx !== "" || p === "lineHeight") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units! 32126 bn = _convertToPixels(target, p, bn, bsfx); 32127 if (esfx === "%") { 32128 bn /= _convertToPixels(target, p, 100, "%") / 100; 32129 if (vars.strictUnits !== true) { //some browsers report only "px" values instead of allowing "%" with getComputedStyle(), so we assume that if we're tweening to a %, we should start there too unless strictUnits:true is defined. This approach is particularly useful for responsive designs that use from() tweens. 32130 bs = bn + "%"; 32131 } 32132 32133 } else if (esfx === "em" || esfx === "rem" || esfx === "vw" || esfx === "vh") { 32134 bn /= _convertToPixels(target, p, 1, esfx); 32135 32136 //otherwise convert to pixels. 32137 } else if (esfx !== "px") { 32138 en = _convertToPixels(target, p, en, esfx); 32139 esfx = "px"; //we don't use bsfx after this, so we don't need to set it to px too. 32140 } 32141 if (rel) if (en || en === 0) { 32142 es = (en + bn) + esfx; //the changes we made affect relative calculations, so adjust the end value here. 32143 } 32144 } 32145 32146 if (rel) { 32147 en += bn; 32148 } 32149 32150 if ((bn || bn === 0) && (en || en === 0)) { //faster than isNaN(). Also, previously we required en !== bn but that doesn't really gain much performance and it prevents _parseToProxy() from working properly if beginning and ending values match but need to get tweened by an external plugin anyway. For example, a bezier tween where the target starts at left:0 and has these points: [{left:50},{left:0}] wouldn't work properly because when parsing the last point, it'd match the first (current) one and a non-tweening CSSPropTween would be recorded when we actually need a normal tween (type:0) so that things get updated during the tween properly. 32151 pt = new CSSPropTween(style, p, bn, en - bn, pt, 0, p, (_autoRound !== false && (esfx === "px" || p === "zIndex")), 0, bs, es); 32152 pt.xs0 = esfx; 32153 //DEBUG: _log("tween "+p+" from "+pt.b+" ("+bn+esfx+") to "+pt.e+" with suffix: "+pt.xs0); 32154 } else if (style[p] === undefined || !es && (es + "" === "NaN" || es == null)) { 32155 _log("invalid " + p + " tween value: " + vars[p]); 32156 } else { 32157 pt = new CSSPropTween(style, p, en || bn || 0, 0, pt, -1, p, false, 0, bs, es); 32158 pt.xs0 = (es === "none" && (p === "display" || p.indexOf("Style") !== -1)) ? bs : es; //intermediate value should typically be set immediately (end value) except for "display" or things like borderTopStyle, borderBottomStyle, etc. which should use the beginning value during the tween. 32159 //DEBUG: _log("non-tweening value "+p+": "+pt.xs0); 32160 } 32161 } 32162 } 32163 if (plugin) if (pt && !pt.plugin) { 32164 pt.plugin = plugin; 32165 } 32166 } 32167 return pt; 32168 }; 32169 32170 32171 //gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1. 32172 p.setRatio = function(v) { 32173 var pt = this._firstPT, 32174 min = 0.000001, 32175 val, str, i; 32176 //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards). 32177 if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) { 32178 while (pt) { 32179 if (pt.type !== 2) { 32180 if (pt.r && pt.type !== -1) { 32181 val = pt.r(pt.s + pt.c); 32182 if (!pt.type) { 32183 pt.t[pt.p] = val + pt.xs0; 32184 } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)" 32185 i = pt.l; 32186 str = pt.xs0 + val + pt.xs1; 32187 for (i = 1; i < pt.l; i++) {
32188 str += pt["xn"+i] + pt["xs"+(i+1)]; 32189 } 32190 pt.t[pt.p] = str; 32191 } 32192 } else { 32193 pt.t[pt.p] = pt.e; 32194 } 32195 } else { 32196 pt.setRatio(v); 32197 } 32198 pt = pt._next; 32199 } 32200 32201 } else if (v || !(this._tween._time === this._tween._duration || this._tween._time === 0) || this._tween._rawPrevTime === -0.000001) { 32202 while (pt) { 32203 val = pt.c * v + pt.s; 32204 if (pt.r) { 32205 val = pt.r(val); 32206 } else if (val < min) if (val > -min) { 32207 val = 0; 32208 } 32209 if (!pt.type) { 32210 pt.t[pt.p] = val + pt.xs0; 32211 } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)" 32212 i = pt.l; 32213 if (i === 2) { 32214 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2; 32215 } else if (i === 3) { 32216 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3; 32217 } else if (i === 4) { 32218 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4; 32219 } else if (i === 5) { 32220 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4 + pt.xn4 + pt.xs5; 32221 } else { 32222 str = pt.xs0 + val + pt.xs1; 32223 for (i = 1; i < pt.l; i++) { 32224 str += pt["xn"+i] + pt["xs"+(i+1)]; 32225 } 32226 pt.t[pt.p] = str; 32227 } 32228 32229 } else if (pt.type === -1) { //non-tweening value 32230 pt.t[pt.p] = pt.xs0; 32231 32232 } else if (pt.setRatio) { //custom setRatio() for things like SpecialProps, external plugins, etc. 32233 pt.setRatio(v); 32234 } 32235 pt = pt._next; 32236 } 32237 32238 //if the tween is reversed all the way back to the beginning, we need to restore the original values which may have different units (like % instead of px or em or whatever). 32239 } else { 32240 while (pt) { 32241 if (pt.type !== 2) { 32242 pt.t[pt.p] = pt.b; 32243 } else { 32244 pt.setRatio(v); 32245 } 32246 pt = pt._next; 32247 } 32248 } 32249 }; 32250 32251 /** 32252 * @private 32253 * Forces rendering of the target's transforms (rotation, scale, etc.) whenever the CSSPlugin's setRatio() is called. 32254 * Basically, this tells the CSSPlugin to create a CSSPropTween (type 2) after instantiation that runs last in the linked 32255 * list and calls the appropriate (3D or 2D) rendering function. We separate this into its own method so that we can call 32256 * it from other plugins like BezierPlugin if, for example, it needs to apply an autoRotation and this CSSPlugin 32257 * doesn't have any transform-related properties of its own. You can call this method as many times as you 32258 * want and it won't create duplicate CSSPropTweens. 32259 * 32260 * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster) 32261 */ 32262 p._enableTransforms = function(threeD) { 32263 this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values. 32264 this._transformType = (!(this._transform.svg && _useSVGTransformAttr) && (threeD || this._transformType === 3)) ? 3 : 2; 32265 }; 32266 32267 var lazySet = function(v) { 32268 this.t[this.p] = this.e; 32269 this.data._linkCSSP(this, this._next, null, true); //we purposefully keep this._next even though it'd make sense to null it, but this is a performance optimization, as this happens during the while (pt) {} loop in setRatio() at the bottom of which it sets pt = pt._next, so if we null it, the linked list will be broken in that loop. 32270 }; 32271 /** @private Gives us a way to set a value on the first render (and only the first render). **/ 32272 p._addLazySet = function(t, p, v) { 32273 var pt = this._firstPT = new CSSPropTween(t, p, 0, 0, this._firstPT, 2); 32274 pt.e = v; 32275 pt.setRatio = lazySet; 32276 pt.data = this; 32277 }; 32278 32279 /** @private **/ 32280 p._linkCSSP = function(pt, next, prev, remove) { 32281 if (pt) { 32282 if (next) { 32283 next._prev = pt; 32284 } 32285 if (pt._next) { 32286 pt._next._prev = pt._prev; 32287 } 32288 if (pt._prev) { 32289 pt._prev._next = pt._next; 32290 } else if (this._firstPT === pt) { 32291 this._firstPT = pt._next; 32292 remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed) 32293 } 32294 if (prev) { 32295 prev._next = pt; 32296 } else if (!remove && this._firstPT === null) { 32297 this._firstPT = pt; 32298 } 32299 pt._next = next; 32300 pt._prev = prev; 32301 } 32302 return pt; 32303 }; 32304 32305 p._mod = function(lookup) { 32306 var pt = this._firstPT; 32307 while (pt) { 32308 if (typeof(lookup[pt.p]) === "function") { //only gets called by RoundPropsPlugin (ModifyPlugin manages all the rendering internally for CSSPlugin properties that need modification). Remember, we handle rounding a bit differently in this plugin for performance reasons, leveraging "r" as an indicator that the value should be roun
32308ded internally. 32309 pt.r = lookup[pt.p]; 32310 } 32311 pt = pt._next; 32312 } 32313 }; 32314 32315 //we need to make sure that if alpha or autoAlpha is killed, opacity is too. And autoAlpha affects the "visibility" property. 32316 p._kill = function(lookup) { 32317 var copy = lookup, 32318 pt, p, xfirst; 32319 if (lookup.autoAlpha || lookup.alpha) { 32320 copy = {}; 32321 for (p in lookup) { //copy the lookup so that we're not changing the original which may be passed elsewhere. 32322 copy[p] = lookup[p]; 32323 } 32324 copy.opacity = 1; 32325 if (copy.autoAlpha) { 32326 copy.visibility = 1; 32327 } 32328 } 32329 if (lookup.className && (pt = this._classNamePT)) { //for className tweens, we need to kill any associated CSSPropTweens too; a linked list starts at the className's "xfirst". 32330 xfirst = pt.xfirst; 32331 if (xfirst && xfirst._prev) { 32332 this._linkCSSP(xfirst._prev, pt._next, xfirst._prev._prev); //break off the prev 32333 } else if (xfirst === this._firstPT) { 32334 this._firstPT = pt._next; 32335 } 32336 if (pt._next) { 32337 this._linkCSSP(pt._next, pt._next._next, xfirst._prev); 32338 } 32339 this._classNamePT = null; 32340 } 32341 pt = this._firstPT; 32342 while (pt) { 32343 if (pt.plugin && pt.plugin !== p && pt.plugin._kill) { //for plugins that are registered with CSSPlugin, we should notify them of the kill. 32344 pt.plugin._kill(lookup); 32345 p = pt.plugin; 32346 } 32347 pt = pt._next; 32348 } 32349 return TweenPlugin.prototype._kill.call(this, copy); 32350 }; 32351 32352 32353 32354 //used by cascadeTo() for gathering all the style properties of each child element into an array for comparison. 32355 var _getChildStyles = function(e, props, targets) { 32356 var children, i, child, type; 32357 if (e.slice) { 32358 i = e.length; 32359 while (--i > -1) { 32360 _getChildStyles(e[i], props, targets); 32361 } 32362 return; 32363 } 32364 children = e.childNodes; 32365 i = children.length; 32366 while (--i > -1) { 32367 child = children[i]; 32368 type = child.type; 32369 if (child.style) { 32370 props.push(_getAllStyles(child)); 32371 if (targets) { 32372 targets.push(child); 32373 } 32374 } 32375 if ((type === 1 || type === 9 || type === 11) && child.childNodes.length) { 32376 _getChildStyles(child, props, targets); 32377 } 32378 } 32379 }; 32380 32381 /** 32382 * Typically only useful for className tweens that may affect child elements, this method creates a TweenLite 32383 * and then compares the style properties of all the target's child elements at the tween's start and end, and 32384 * if any are different, it also creates tweens for those and returns an array containing ALL of the resulting 32385 * tweens (so that you can easily add() them to a TimelineLite, for example). The reason this functionality is 32386 * wrapped into a separate static method of CSSPlugin instead of being integrated into all regular className tweens 32387 * is because it creates entirely new tweens that may have completely different targets than the original tween, 32388 * so if they were all lumped into the original tween instance, it would be inconsistent with the rest of the API 32389 * and it would create other problems. For example: 32390 * - If I create a tween of elementA, that tween instance may suddenly change its target to include 50 other elements (unintuitive if I specifically defined the target I wanted) 32391 * - We can't just create new independent tweens because otherwise, what happens if the original/parent tween is reversed or pause or dropped into a TimelineLite for tight control? You'd expect that tween's behavior to affect all the others. 32392 * - Analyzing every style property of every child before and after the tween is an expensive operation when there are many children, so this behavior shouldn't be imposed on all className tweens by default, especially since it's probably rare that this extra functionality is needed. 32393 * 32394 * @param {Object} target object to be tweened 32395 * @param {number} Duration in seconds (or frames for frames-based tweens) 32396 * @param {Object} Object containing the end values, like {className:"newClass", ease:Linear.easeNone} 32397 * @return {Array} An array of TweenLite instances 32398 */ 32399 CSSPlugin.cascadeTo = function(target, duration, vars) { 32400 var tween = TweenLite.to(target, duration, vars), 32401 results = [tween], 32402 b = [], 32403 e = [], 32404 targets = [], 32405 _reservedProps = TweenLite._internals.reservedProps, 32406 i, difs, p, from; 32407 target = tween._targets || tween.target; 32408 _getChildStyles(target, b, targets); 32409 tween.render(duration, true, true); 32410 _getChildStyles(target, e); 32411 tween.render(0, true, true); 32412 tween._enabled(true); 32413 i = targets.length; 32414 while (--i > -1) { 32415 difs = _cssDif(targets[i], b[i], e[i]); 32416 if (difs.firstMPT) { 32417 difs = difs.difs; 32418 for (p in vars) { 32419 if (_reservedProps[p]) { 32420 difs[p] = vars[p]; 32421 } 32422 } 32423 from = {}; 32424 for (p in difs) { 32425 from[p] = b[i][p]; 32426 } 32427 results.push(TweenLite.fromTo(targets[i], duration, from, difs)); 32428 } 32429 } 32430 return results; 32431 }; 32432 32433 TweenPlugin.activate([CSSPlugin]); 32434 return CSSPlugin; 32435 32436 }, true); 32437 32438 32439 32440 32441 32442 32443 32444 32445 32446 32447 32448/* 32449 * ---------------------------------------------------------------- 32450 * RoundPropsPlugin 32451 * ---------------------------------------------------------------- 32452 */ 32453 (function() { 32454 32455 var RoundPropsPlugin = _gsScope._gsDefine.plugin({ 32456 propName: "roundProps", 32457 version: "1.7.0", 32458 priority: -1, 32459 API: 2, 32460 32461 //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. 32462 init: function(target, value, tween) { 32463 this._tween = tween; 32464 return true; 32465 } 32466 32467 }), 32468 _getRoundFunc = function(v) { //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc. 32469 var p = v < 1 ? Math.pow(10, (v + "").length - 2) : 1; //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed() 32470 return function(n) { 32471 return ((Math.round(n / v) * v * p) | 0) / p; 32472 }; 32473 }, 32474 _roundLinkedList = function(node, mod) { 32475 while (node) { 32476 if (!node.f && !node.blob) { 32477 node.m = mod || Math.round; 32478 } 32479 node = node._next; 32480 } 32481 }, 32482 p = RoundPropsPlugin.prototype; 32483 32484 p._onInitAllProps = function() { 32485 var tween = this._tween,
32486 rp = tween.vars.roundProps, 32487 lookup = {}, 32488 rpt = tween._propLookup.roundProps, 32489 pt, next, i, p; 32490 if (typeof(rp) === "object" && !rp.push) { 32491 for (p in rp) { 32492 lookup[p] = _getRoundFunc(rp[p]); 32493 } 32494 } else { 32495 if (typeof(rp) === "string") { 32496 rp = rp.split(","); 32497 } 32498 i = rp.length; 32499 while (--i > -1) { 32500 lookup[rp[i]] = Math.round; 32501 } 32502 } 32503 32504 for (p in lookup) { 32505 pt = tween._firstPT; 32506 while (pt) { 32507 next = pt._next; //record here, because it may get removed 32508 if (pt.pg) { 32509 pt.t._mod(lookup); 32510 } else if (pt.n === p) { 32511 if (pt.f === 2 && pt.t) { //a blob (text containing multiple numeric values) 32512 _roundLinkedList(pt.t._firstPT, lookup[p]); 32513 } else { 32514 this._add(pt.t, p, pt.s, pt.c, lookup[p]); 32515 //remove from linked list 32516 if (next) { 32517 next._prev = pt._prev; 32518 } 32519 if (pt._prev) { 32520 pt._prev._next = next; 32521 } else if (tween._firstPT === pt) { 32522 tween._firstPT = next; 32523 } 32524 pt._next = pt._prev = null; 32525 tween._propLookup[p] = rpt; 32526 } 32527 } 32528 pt = next; 32529 } 32530 } 32531 return false; 32532 }; 32533 32534 p._add = function(target, p, s, c, mod) { 32535 this._addTween(target, p, s, s + c, p, mod || Math.round); 32536 this._overwriteProps.push(p); 32537 }; 32538 32539 }()); 32540 32541 32542 32543 32544 32545 32546 32547 32548 32549 32550/* 32551 * ---------------------------------------------------------------- 32552 * AttrPlugin 32553 * ---------------------------------------------------------------- 32554 */ 32555 32556 (function() { 32557 32558 _gsScope._gsDefine.plugin({ 32559 propName: "attr", 32560 API: 2, 32561 version: "0.6.1", 32562 32563 //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. 32564 init: function(target, value, tween, index) { 32565 var p, end; 32566 if (typeof(target.setAttribute) !== "function") { 32567 return false; 32568 } 32569 for (p in value) { 32570 end = value[p]; 32571 if (typeof(end) === "function") { 32572 end = end(index, target); 32573 } 32574 this._addTween(target, "setAttribute", target.getAttribute(p) + "", end + "", p, false, p); 32575 this._overwriteProps.push(p); 32576 } 32577 return true; 32578 } 32579 32580 }); 32581 32582 }()); 32583 32584 32585 32586 32587 32588 32589 32590 32591 32592 32593/* 32594 * ---------------------------------------------------------------- 32595 * DirectionalRotationPlugin 32596 * ---------------------------------------------------------------- 32597 */ 32598 _gsScope._gsDefine.plugin({ 32599 propName: "directionalRotation", 32600 version: "0.3.1", 32601 API: 2, 32602 32603 //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. 32604 init: function(target, value, tween, index) { 32605 if (typeof(value) !== "object") { 32606 value = {rotation:value}; 32607 } 32608 this.finals = {}; 32609 var cap = (value.useRadians === true) ? Math.PI * 2 : 360, 32610 min = 0.000001, 32611 p, v, start, end, dif, split; 32612 for (p in value) { 32613 if (p !== "useRadians") { 32614 end = value[p]; 32615 if (typeof(end) === "function") { 32616 end = end(index, target); 32617 } 32618 split = (end + "").split("_"); 32619 v = split[0]; 32620 start = parseFloat( (typeof(target[p]) !== "function") ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() ); 32621 end = this.finals[p] = (typeof(v) === "string" && v.charAt(1) === "=") ? start + parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : Number(v) || 0; 32622 dif = end - start; 32623 if (split.length) { 32624 v = split.join("_"); 32625 if (v.indexOf("short") !== -1) { 32626 dif = dif % cap; 32627 if (dif !== dif % (cap / 2)) { 32628 dif = (dif < 0) ? dif + cap : dif - cap; 32629 } 32630 } 32631 if (v.indexOf("_cw") !== -1 && dif < 0) { 32632 dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 32633 } else if (v.indexOf("ccw") !== -1 && dif > 0) { 32634 dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 32635 } 32636 } 32637 if (dif > min || dif < -min) { 32638 this._addTween(target, p, start, start + dif, p); 32639 this._overwriteProps.push(p); 32640 } 32641 } 32642 } 32643 return true; 32644 }, 32645 32646 //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
32647 set: function(ratio) { 32648 var pt; 32649 if (ratio !== 1) { 32650 this._super.setRatio.call(this, ratio); 32651 } else { 32652 pt = this._firstPT; 32653 while (pt) { 32654 if (pt.f) { 32655 pt.t[pt.p](this.finals[pt.p]); 32656 } else { 32657 pt.t[pt.p] = this.finals[pt.p]; 32658 } 32659 pt = pt._next; 32660 } 32661 } 32662 } 32663 32664 })._autoCSS = true; 32665 32666 32667 32668 32669 32670 32671 32672 32673 32674 32675 32676/* 32677 * ---------------------------------------------------------------- 32678 * EasePack 32679 * ---------------------------------------------------------------- 32680 */ 32681 _gsScope._gsDefine("easing.Back", ["easing.Ease"], function(Ease) { 32682 32683 var w = (_gsScope.GreenSockGlobals || _gsScope), 32684 gs = w.com.greensock, 32685 _2PI = Math.PI * 2, 32686 _HALF_PI = Math.PI / 2, 32687 _class = gs._class, 32688 _create = function(n, f) { 32689 var C = _class("easing." + n, function(){}, true), 32690 p = C.prototype = new Ease(); 32691 p.constructor = C; 32692 p.getRatio = f; 32693 return C; 32694 }, 32695 _easeReg = Ease.register || function(){}, //put an empty function in place just as a safety measure in case someone loads an OLD version of TweenLite.js where Ease.register doesn't exist. 32696 _wrap = function(name, EaseOut, EaseIn, EaseInOut, aliases) { 32697 var C = _class("easing."+name, { 32698 easeOut:new EaseOut(), 32699 easeIn:new EaseIn(), 32700 easeInOut:new EaseInOut() 32701 }, true); 32702 _easeReg(C, name); 32703 return C; 32704 }, 32705 EasePoint = function(time, value, next) { 32706 this.t = time; 32707 this.v = value; 32708 if (next) { 32709 this.next = next; 32710 next.prev = this; 32711 this.c = next.v - value; 32712 this.gap = next.t - time; 32713 } 32714 }, 32715 32716 //Back 32717 _createBack = function(n, f) { 32718 var C = _class("easing." + n, function(overshoot) { 32719 this._p1 = (overshoot || overshoot === 0) ? overshoot : 1.70158; 32720 this._p2 = this._p1 * 1.525; 32721 }, true), 32722 p = C.prototype = new Ease(); 32723 p.constructor = C; 32724 p.getRatio = f; 32725 p.config = function(overshoot) { 32726 return new C(overshoot); 32727 }; 32728 return C; 32729 }, 32730 32731 Back = _wrap("Back", 32732 _createBack("BackOut", function(p) { 32733 return ((p = p - 1) * p * ((this._p1 + 1) * p + this._p1) + 1); 32734 }), 32735 _createBack("BackIn", function(p) { 32736 return p * p * ((this._p1 + 1) * p - this._p1); 32737 }), 32738 _createBack("BackInOut", function(p) { 32739 return ((p *= 2) < 1) ? 0.5 * p * p * ((this._p2 + 1) * p - this._p2) : 0.5 * ((p -= 2) * p * ((this._p2 + 1) * p + this._p2) + 2); 32740 }) 32741 ), 32742 32743 32744 //SlowMo 32745 SlowMo = _class("easing.SlowMo", function(linearRatio, power, yoyoMode) { 32746 power = (power || power === 0) ? power : 0.7; 32747 if (linearRatio == null) { 32748 linearRatio = 0.7; 32749 } else if (linearRatio > 1) { 32750 linearRatio = 1; 32751 } 32752 this._p = (linearRatio !== 1) ? power : 0; 32753 this._p1 = (1 - linearRatio) / 2; 32754 this._p2 = linearRatio; 32755 this._p3 = this._p1 + this._p2; 32756 this._calcEnd = (yoyoMode === true); 32757 }, true), 32758 p = SlowMo.prototype = new Ease(), 32759 SteppedEase, ExpoScaleEase, RoughEase, _createElastic; 32760 32761 p.constructor = SlowMo; 32762 p.getRatio = function(p) { 32763 var r = p + (0.5 - p) * this._p; 32764 if (p < this._p1) { 32765 return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r); 32766 } else if (p > this._p3) { 32767 return this._calcEnd ? (p === 1 ? 0 : 1 - (p = (p - this._p3) / this._p1) * p) : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p); //added p === 1 ? 0 to avoid floating point rounding errors from affecting the final value, like 1 - 0.7 = 0.30000000000000004 instead of 0.3 32768 } 32769 return this._calcEnd ? 1 : r; 32770 }; 32771 SlowMo.ease = new SlowMo(0.7, 0.7); 32772 32773 p.config = SlowMo.config = function(linearRatio, power, yoyoMode) { 32774 return new SlowMo(linearRatio, power, yoyoMode); 32775 }; 32776 32777 32778 //SteppedEase 32779 SteppedEase = _class("easing.SteppedEase", function(steps, immediateStart) { 32780 steps = steps || 1; 32781 this._p1 = 1 / steps; 32782 this._p2 = steps + (immediateStart ? 0 : 1); 32783 this._p3 = immediateStart ? 1 : 0; 32784 }, true); 32785 p = SteppedEase.prototype = new Ease(); 32786 p.constructor = SteppedEase; 32787 p.getRatio = function(p) { 32788 if (p < 0) { 32789 p = 0; 32790 } else if (p >= 1) { 32791 p = 0.999999999; 32792 } 32793 return (((this._p2 * p) | 0) + this._p3) * this._p1; 32794 }; 32795 p.config = SteppedEase.config = function(steps, immediateStart) { 32796 return new SteppedEase(steps, immediateStart); 32797 }; 32798 32799 //ExpoScaleEase 32800 ExpoScaleEase = _class("easing.ExpoScaleEase", function(start, end, ease) { 32801 this._p1 = Math.log(end / start); 32802 this._p2 = end - start; 32803 this._p3 = start; 32804 this._ease = ease; 32805 }, true); 32806 p = ExpoScaleEase.prototype = new Ease(); 32807 p.constructor = ExpoScaleEase; 32808 p.getRatio = function(p) { 32809 if (this._ease) { 32810 p = this._ease.getRatio(p); 32811 } 32812 return (this._p3 * Math.exp(this._p1 * p) - this._p3) / this._p2; 32813 }; 32814 p.config = ExpoScaleEase.config = function(start, end, ease) { 32815 return new ExpoScaleEase(start, end, ease); 32816 }; 32817 32818 32819 //RoughEase 32820 RoughEase = _class("easing.RoughEase", function(vars) { 32821 vars = vars || {}; 32822 var taper = vars.taper || "none", 32823 a = [], 32824 cnt = 0, 32825 points = (vars.points || 20) | 0, 32826 i = points, 32827 randomize = (vars.randomize !== false), 32828 clamp = (vars.clamp === true), 32829 template = (vars.template instanceof Ease) ? vars.template : null,
32830 strength = (typeof(vars.strength) === "number") ? vars.strength * 0.4 : 0.4, 32831 x, y, bump, invX, obj, pnt; 32832 while (--i > -1) { 32833 x = randomize ? Math.random() : (1 / points) * i; 32834 y = template ? template.getRatio(x) : x; 32835 if (taper === "none") { 32836 bump = strength; 32837 } else if (taper === "out") { 32838 invX = 1 - x; 32839 bump = invX * invX * strength; 32840 } else if (taper === "in") { 32841 bump = x * x * strength; 32842 } else if (x < 0.5) { //"both" (start) 32843 invX = x * 2; 32844 bump = invX * invX * 0.5 * strength; 32845 } else { //"both" (end) 32846 invX = (1 - x) * 2; 32847 bump = invX * invX * 0.5 * strength; 32848 } 32849 if (randomize) { 32850 y += (Math.random() * bump) - (bump * 0.5); 32851 } else if (i % 2) { 32852 y += bump * 0.5; 32853 } else { 32854 y -= bump * 0.5; 32855 } 32856 if (clamp) { 32857 if (y > 1) { 32858 y = 1; 32859 } else if (y < 0) { 32860 y = 0; 32861 } 32862 } 32863 a[cnt++] = {x:x, y:y}; 32864 } 32865 a.sort(function(a, b) { 32866 return a.x - b.x; 32867 }); 32868 32869 pnt = new EasePoint(1, 1, null); 32870 i = points; 32871 while (--i > -1) { 32872 obj = a[i]; 32873 pnt = new EasePoint(obj.x, obj.y, pnt); 32874 } 32875 32876 this._prev = new EasePoint(0, 0, (pnt.t !== 0) ? pnt : pnt.next); 32877 }, true); 32878 p = RoughEase.prototype = new Ease(); 32879 p.constructor = RoughEase; 32880 p.getRatio = function(p) { 32881 var pnt = this._prev; 32882 if (p > pnt.t) { 32883 while (pnt.next && p >= pnt.t) { 32884 pnt = pnt.next; 32885 } 32886 pnt = pnt.prev; 32887 } else { 32888 while (pnt.prev && p <= pnt.t) { 32889 pnt = pnt.prev; 32890 } 32891 } 32892 this._prev = pnt; 32893 return (pnt.v + ((p - pnt.t) / pnt.gap) * pnt.c); 32894 }; 32895 p.config = function(vars) { 32896 return new RoughEase(vars); 32897 }; 32898 RoughEase.ease = new RoughEase(); 32899 32900 32901 //Bounce 32902 _wrap("Bounce", 32903 _create("BounceOut", function(p) { 32904 if (p < 1 / 2.75) { 32905 return 7.5625 * p * p; 32906 } else if (p < 2 / 2.75) { 32907 return 7.5625 * (p -= 1.5 / 2.75) * p + 0.75; 32908 } else if (p < 2.5 / 2.75) { 32909 return 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375; 32910 } 32911 return 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375; 32912 }), 32913 _create("BounceIn", function(p) { 32914 if ((p = 1 - p) < 1 / 2.75) { 32915 return 1 - (7.5625 * p * p); 32916 } else if (p < 2 / 2.75) { 32917 return 1 - (7.5625 * (p -= 1.5 / 2.75) * p + 0.75); 32918 } else if (p < 2.5 / 2.75) { 32919 return 1 - (7.5625 * (p -= 2.25 / 2.75) * p + 0.9375); 32920 } 32921 return 1 - (7.5625 * (p -= 2.625 / 2.75) * p + 0.984375); 32922 }), 32923 _create("BounceInOut", function(p) { 32924 var invert = (p < 0.5); 32925 if (invert) { 32926 p = 1 - (p * 2); 32927 } else { 32928 p = (p * 2) - 1; 32929 } 32930 if (p < 1 / 2.75) { 32931 p = 7.5625 * p * p; 32932 } else if (p < 2 / 2.75) { 32933 p = 7.5625 * (p -= 1.5 / 2.75) * p + 0.75; 32934 } else if (p < 2.5 / 2.75) { 32935 p = 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375; 32936 } else { 32937 p = 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375; 32938 } 32939 return invert ? (1 - p) * 0.5 : p * 0.5 + 0.5; 32940 }) 32941 ); 32942 32943 32944 //CIRC 32945 _wrap("Circ", 32946 _create("CircOut", function(p) { 32947 return Math.sqrt(1 - (p = p - 1) * p); 32948 }), 32949 _create("CircIn", function(p) { 32950 return -(Math.sqrt(1 - (p * p)) - 1); 32951 }), 32952 _create("CircInOut", function(p) { 32953 return ((p*=2) < 1) ? -0.5 * (Math.sqrt(1 - p * p) - 1) : 0.5 * (Math.sqrt(1 - (p -= 2) * p) + 1); 32954 }) 32955 ); 32956 32957 32958 //Elastic 32959 _createElastic = function(n, f, def) { 32960 var C = _class("easing." + n, function(amplitude, period) { 32961 this._p1 = (amplitude >= 1) ? amplitude : 1; //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1. 32962 this._p2 = (period || def) / (amplitude < 1 ? amplitude : 1); 32963 this._p3 = this._p2 / _2PI * (Math.asin(1 / this._p1) || 0); 32964 this._p2 = _2PI / this._p2; //precalculate to optimize 32965 }, true), 32966 p = C.prototype = new Ease(); 32967 p.constructor = C; 32968 p.getRatio = f; 32969 p.config = function(amplitude, period) { 32970 return new C(amplitude, period); 32971 }; 32972 return C; 32973 }; 32974 _wrap("Elastic", 32975 _createElastic("ElasticOut", function(p) { 32976 return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) * this._p2 ) + 1; 32977 }, 0.3), 32978 _createElastic("ElasticIn", function(p) { 32979 return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2 )); 32980 }, 0.3), 32981 _createElastic("ElasticInOut", function(p) { 32982 return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2)) : this._p1 * Math.pow(2, -10 *(p -= 1)) * Math.sin( (p - this._p3) * this._p2 ) * 0.5 + 1; 32983 }, 0.45) 32984 ); 32985 32986 32987 //Expo 32988 _wrap("Expo", 32989 _create("ExpoOut", function(p) { 32990 return 1 - Math.pow(2, -10 * p); 32991 }), 32992 _create("ExpoIn", function(p) { 32993 return Math.pow(2, 10 * (p - 1)) - 0.001; 32994 }), 32995 _create("ExpoInOut", function(p) { 32996 return ((p *= 2) < 1) ? 0.5 * Math.pow(2, 10 * (p - 1)) : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); 32997 }) 32998 ); 32999 33000 33001 //Sine 33002 _wrap("Sine", 33003 _create("SineOut", function(p) { 33004 return Math.sin(p * _HALF_PI); 33005 }), 33006 _create("SineIn", function(p) { 33007 return -Math.cos(p * _HALF_PI) + 1; 33008 }), 33009 _create("SineInOut", function(p) { 33010 return -0.5 * (Math.cos(Math.PI * p) - 1); 33011 }) 33012 ); 33013 33014 _class("easing.EaseLookup", { 33015 find:function(s) { 33016 return Ease.map[s]; 33017 } 33018 }, true); 33019 33020 //register the non-standard eases 33021 _easeReg(w.SlowMo, "SlowMo", "ease,"); 33022 _easeReg(RoughEase, "RoughEase", "ease,");
33023 _easeReg(SteppedEase, "SteppedEase", "ease,"); 33024 33025 return Back; 33026 33027 }, true); 33028 33029 33030}); 33031 33032if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case TweenLite was already loaded separately. 33033 33034 33035 33036 33037 33038 33039 33040 33041 33042 33043 33044/* 33045 * ---------------------------------------------------------------- 33046 * Base classes like TweenLite, SimpleTimeline, Ease, Ticker, etc. 33047 * ---------------------------------------------------------------- 33048 */ 33049(function(window, moduleName) { 33050 33051 "use strict"; 33052 var _exports = {}, 33053 _doc = window.document, 33054 _globals = window.GreenSockGlobals = window.GreenSockGlobals || window, 33055 existingModule = _globals[moduleName]; 33056 if (existingModule) { 33057 if (typeof(module) !== "undefined" && module.exports) { //node 33058 module.exports = existingModule; 33059 } 33060 return existingModule; //in case the core set of classes is already loaded, don't instantiate twice. 33061 } 33062 var _namespace = function(ns) { 33063 var a = ns.split("."), 33064 p = _globals, i; 33065 for (i = 0; i < a.length; i++) { 33066 p[a[i]] = p = p[a[i]] || {}; 33067 } 33068 return p; 33069 }, 33070 gs = _namespace("com.greensock"), 33071 _tinyNum = 0.00000001, 33072 _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 33073 var b = [], 33074 l = a.length, 33075 i; 33076 for (i = 0; i !== l; b.push(a[i++])) {} 33077 return b; 33078 }, 33079 _emptyFunc = function() {}, 33080 _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower) 33081 var toString = Object.prototype.toString, 33082 array = toString.call([]); 33083 return function(obj) { 33084 return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array)); 33085 }; 33086 }()), 33087 a, i, p, _ticker, _tickerActive, 33088 _defLookup = {}, 33089 33090 /** 33091 * @constructor 33092 * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition. 33093 * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is 33094 * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin 33095 * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally. 33096 * 33097 * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found, 33098 * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere, 33099 * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so 33100 * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything 33101 * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock 33102 * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could 33103 * sandbox the banner one like: 33104 * 33105 * <script> 33106 * var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever. 33107 * </script> 33108 * <script src="js/greensock/v1.7/TweenMax.js"></script> 33109 * <script> 33110 * window.GreenSockGlobals = window._gsQueue = window._gsDefine = null; //reset it back to null (along with the special _gsQueue variable) so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...) 33111 * </script> 33112 * <script src="js/greensock/v1.6/TweenMax.js"></script> 33113 * <script> 33114 * gs.TweenLite.to(...); //would use v1.7 33115 * TweenLite.to(...); //would use v1.6 33116 * </script> 33117 * 33118 * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back". 33119 * @param {!Array.<string>}
33119 dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"] 33120 * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition. 33121 * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object) 33122 */ 33123 Definition = function(ns, dependencies, func, global) { 33124 this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses 33125 _defLookup[ns] = this; 33126 this.gsClass = null; 33127 this.func = func; 33128 var _classes = []; 33129 this.check = function(init) { 33130 var i = dependencies.length, 33131 missing = i, 33132 cur, a, n, cl; 33133 while (--i > -1) { 33134 if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) { 33135 _classes[i] = cur.gsClass; 33136 missing--; 33137 } else if (init) { 33138 cur.sc.push(this); 33139 } 33140 } 33141 if (missing === 0 && func) { 33142 a = ("com.greensock." + ns).split("."); 33143 n = a.pop(); 33144 cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes); 33145 33146 //exports to multiple environments 33147 if (global) { 33148 _globals[n] = _exports[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.) 33149 if (typeof(module) !== "undefined" && module.exports) { //node 33150 if (ns === moduleName) { 33151 module.exports = _exports[moduleName] = cl; 33152 for (i in _exports) { 33153 cl[i] = _exports[i]; 33154 } 33155 } else if (_exports[moduleName]) { 33156 _exports[moduleName][n] = cl; 33157 } 33158 } else if (typeof(define) === "function" && define.amd){ //AMD 33159 define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").pop(), [], function() { return cl; }); 33160 } 33161 } 33162 for (i = 0; i < this.sc.length; i++) { 33163 this.sc[i].check(); 33164 } 33165 } 33166 }; 33167 this.check(true); 33168 }, 33169 33170 //used to create Definition instances (which basically registers a class that has dependencies). 33171 _gsDefine = window._gsDefine = function(ns, dependencies, func, global) { 33172 return new Definition(ns, dependencies, func, global); 33173 }, 33174 33175 //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class). 33176 _class = gs._class = function(ns, func, global) { 33177 func = func || function() {}; 33178 _gsDefine(ns, [], function(){ return func; }, global); 33179 return func; 33180 }; 33181 33182 _gsDefine.globals = _globals; 33183 33184 33185 33186/* 33187 * ---------------------------------------------------------------- 33188 * Ease 33189 * ---------------------------------------------------------------- 33190 */ 33191 var _baseParams = [0, 0, 1, 1], 33192 Ease = _class("easing.Ease", function(func, extraParams, type, power) { 33193 this._func = func; 33194 this._type = type || 0; 33195 this._power = power || 0; 33196 this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams; 33197 }, true), 33198 _easeMap = Ease.map = {}, 33199 _easeReg = Ease.register = function(ease, names, types, create) { 33200 var na = names.split(","), 33201 i = na.length, 33202 ta = (types || "easeIn,easeOut,easeInOut").split(","), 33203 e, name, j, type; 33204 while (--i > -1) { 33205 name = na[i]; 33206 e = create ? _class("easing."+name, null, true) : gs.easing[name] || {}; 33207 j = ta.length; 33208 while (--j > -1) { 33209 type = ta[j]; 33210 _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease(); 33211 } 33212 } 33213 }; 33214 33215 p = Ease.prototype; 33216 p._calcEnd = false;
33217 p.getRatio = function(p) { 33218 if (this._func) { 33219 this._params[0] = p; 33220 return this._func.apply(null, this._params); 33221 } 33222 var t = this._type, 33223 pw = this._power, 33224 r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2; 33225 if (pw === 1) { 33226 r *= r; 33227 } else if (pw === 2) { 33228 r *= r * r; 33229 } else if (pw === 3) { 33230 r *= r * r * r; 33231 } else if (pw === 4) { 33232 r *= r * r * r * r; 33233 } 33234 return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2); 33235 }; 33236 33237 //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut) 33238 a = ["Linear","Quad","Cubic","Quart","Quint,Strong"]; 33239 i = a.length; 33240 while (--i > -1) { 33241 p = a[i]+",Power"+i; 33242 _easeReg(new Ease(null,null,1,i), p, "easeOut", true); 33243 _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : "")); 33244 _easeReg(new Ease(null,null,3,i), p, "easeInOut"); 33245 } 33246 _easeMap.linear = gs.easing.Linear.easeIn; 33247 _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks 33248 33249 33250/* 33251 * ---------------------------------------------------------------- 33252 * EventDispatcher 33253 * ---------------------------------------------------------------- 33254 */ 33255 var EventDispatcher = _class("events.EventDispatcher", function(target) { 33256 this._listeners = {}; 33257 this._eventTarget = target || this; 33258 }); 33259 p = EventDispatcher.prototype; 33260 33261 p.addEventListener = function(type, callback, scope, useParam, priority) { 33262 priority = priority || 0; 33263 var list = this._listeners[type], 33264 index = 0, 33265 listener, i; 33266 if (this === _ticker && !_tickerActive) { 33267 _ticker.wake(); 33268 } 33269 if (list == null) { 33270 this._listeners[type] = list = []; 33271 } 33272 i = list.length; 33273 while (--i > -1) { 33274 listener = list[i]; 33275 if (listener.c === callback && listener.s === scope) { 33276 list.splice(i, 1); 33277 } else if (index === 0 && listener.pr < priority) { 33278 index = i + 1; 33279 } 33280 } 33281 list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority}); 33282 }; 33283 33284 p.removeEventListener = function(type, callback) { 33285 var list = this._listeners[type], i; 33286 if (list) { 33287 i = list.length; 33288 while (--i > -1) { 33289 if (list[i].c === callback) { 33290 list.splice(i, 1); 33291 return; 33292 } 33293 } 33294 } 33295 }; 33296 33297 p.dispatchEvent = function(type) { 33298 var list = this._listeners[type], 33299 i, t, listener; 33300 if (list) { 33301 i = list.length; 33302 if (i > 1) { 33303 list = list.slice(0); //in case addEventListener() is called from within a listener/callback (otherwise the index could change, resulting in a skip) 33304 } 33305 t = this._eventTarget; 33306 while (--i > -1) { 33307 listener = list[i]; 33308 if (listener) { 33309 if (listener.up) { 33310 listener.c.call(listener.s || t, {type:type, target:t}); 33311 } else { 33312 listener.c.call(listener.s || t); 33313 } 33314 } 33315 } 33316 } 33317 }; 33318 33319 33320/* 33321 * ---------------------------------------------------------------- 33322 * Ticker 33323 * ---------------------------------------------------------------- 33324 */ 33325 var _reqAnimFrame = window.requestAnimationFrame, 33326 _cancelAnimFrame = window.cancelAnimationFrame, 33327 _getTime = Date.now || function() {return new Date().getTime();}, 33328 _lastUpdate = _getTime(); 33329 33330 //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill. 33331 a = ["ms","moz","webkit","o"]; 33332 i = a.length; 33333 while (--i > -1 && !_reqAnimFrame) { 33334 _reqAnimFrame = window[a[i] + "RequestAnimationFrame"]; 33335 _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"]; 33336 } 33337 33338 _class("Ticker", function(fps, useRAF) { 33339 var _self = this, 33340 _startTime = _getTime(), 33341 _useRAF = (useRAF !== false && _reqAnimFrame) ? "auto" : false, 33342 _lagThreshold = 500, 33343 _adjustedLag = 33, 33344 _tickWord = "tick", //helps reduce gc burden 33345 _fps, _req, _id, _gap, _nextTime, 33346 _tick = function(manual) { 33347 var elapsed = _getTime() - _lastUpdate, 33348 overlap, dispatch; 33349 if (elapsed > _lagThreshold) { 33350 _startTime += elapsed - _adjustedLag; 33351 } 33352 _lastUpdate += elapsed; 33353 _self.time = (_lastUpdate - _startTime) / 1000; 33354 overlap = _self.time - _nextTime; 33355 if (!_fps || overlap > 0 || manual === true) { 33356 _self.frame++; 33357 _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap); 33358 dispatch = true; 33359 } 33360 if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise. 33361 _id = _req(_tick); 33362 }
33363 if (dispatch) { 33364 _self.dispatchEvent(_tickWord); 33365 } 33366 }; 33367 33368 EventDispatcher.call(_self); 33369 _self.time = _self.frame = 0; 33370 _self.tick = function() { 33371 _tick(true); 33372 }; 33373 33374 _self.lagSmoothing = function(threshold, adjustedLag) { 33375 if (!arguments.length) { //if lagSmoothing() is called with no arguments, treat it like a getter that returns a boolean indicating if it's enabled or not. This is purposely undocumented and is for internal use. 33376 return (_lagThreshold < 1 / _tinyNum); 33377 } 33378 _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited 33379 _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0); 33380 }; 33381 33382 _self.sleep = function() { 33383 if (_id == null) { 33384 return; 33385 } 33386 if (!_useRAF || !_cancelAnimFrame) { 33387 clearTimeout(_id); 33388 } else { 33389 _cancelAnimFrame(_id); 33390 } 33391 _req = _emptyFunc; 33392 _id = null; 33393 if (_self === _ticker) { 33394 _tickerActive = false; 33395 } 33396 }; 33397 33398 _self.wake = function(seamless) { 33399 if (_id !== null) { 33400 _self.sleep(); 33401 } else if (seamless) { 33402 _startTime += -_lastUpdate + (_lastUpdate = _getTime()); 33403 } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout(). 33404 _lastUpdate = _getTime() - _lagThreshold + 5; 33405 } 33406 _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame; 33407 if (_self === _ticker) { 33408 _tickerActive = true; 33409 } 33410 _tick(2); 33411 }; 33412 33413 _self.fps = function(value) { 33414 if (!arguments.length) { 33415 return _fps; 33416 } 33417 _fps = value; 33418 _gap = 1 / (_fps || 60); 33419 _nextTime = this.time + _gap; 33420 _self.wake(); 33421 }; 33422 33423 _self.useRAF = function(value) { 33424 if (!arguments.length) { 33425 return _useRAF; 33426 } 33427 _self.sleep(); 33428 _useRAF = value; 33429 _self.fps(_fps); 33430 }; 33431 _self.fps(fps); 33432 33433 //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition. 33434 setTimeout(function() { 33435 if (_useRAF === "auto" && _self.frame < 5 && (_doc || {}).visibilityState !== "hidden") { 33436 _self.useRAF(false); 33437 } 33438 }, 1500); 33439 }); 33440 33441 p = gs.Ticker.prototype = new gs.events.EventDispatcher(); 33442 p.constructor = gs.Ticker; 33443 33444 33445/* 33446 * ---------------------------------------------------------------- 33447 * Animation 33448 * ---------------------------------------------------------------- 33449 */ 33450 var Animation = _class("core.Animation", function(duration, vars) { 33451 this.vars = vars = vars || {}; 33452 this._duration = this._totalDuration = duration || 0; 33453 this._delay = Number(vars.delay) || 0; 33454 this._timeScale = 1; 33455 this._active = !!vars.immediateRender; 33456 this.data = vars.data; 33457 this._reversed = !!vars.reversed; 33458 33459 if (!_rootTimeline) { 33460 return; 33461 } 33462 if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly. 33463 _ticker.wake(); 33464 } 33465 33466 var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline; 33467 tl.add(this, tl._time); 33468 33469 if (this.vars.paused) { 33470 this.paused(true); 33471 } 33472 }); 33473 33474 _ticker = Animation.ticker = new gs.Ticker(); 33475 p = Animation.prototype; 33476 p._dirty = p._gc = p._initted = p._paused = false; 33477 p._totalTime = p._time = 0; 33478 p._rawPrevTime = -1; 33479 p._next = p._last = p._onUpdate = p._timeline = p.timeline = null; 33480 p._paused = false; 33481 33482 33483 //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker. 33484 var _checkTimeout = function() { 33485 if (_tickerActive && _getTime() - _lastUpdate > 2000 && ((_doc || {}).visibilityState !== "hidden" || !_ticker.lagSmoothing())) { //note: if the tab is hidden, we should still wake if lagSmoothing has been disabled. 33486 _ticker.wake(); 33487 } 33488 var t = setTimeout(_checkTimeout, 2000); 33489 if (t.unref) { 33490 // allows a node process to exit even if the timeoutâs callback hasn't been invoked. Without it, the node process could hang as this function is called every two seconds. 33491 t.unref(); 33492 } 33493 }; 33494 _checkTimeout(); 33495 33496 33497 p.play = function(from, suppressEvents) { 33498 if (from != null) { 33499 this.seek(from, suppressEvents); 33500 } 33501 return this.reversed(false).paused(false); 33502 }; 33503 33504 p.pause = function(atTime, suppressEvents) { 33505 if (atTime != null) { 33506 this.seek(atTime, suppressEvents); 33507 } 33508 return this.paused(true); 33509 }; 33510 33511 p.resume = function(from, suppressEvents) { 33512 if (from != null) { 33513 this.seek(from, suppressEvents); 33514 } 33515 return this.paused(false); 33516 }; 33517 33518 p.seek = function(time, suppressEvents) { 33519 return this.totalTime(Number(time), suppressEvents !== false); 33520 }; 33521 33522 p.restart = function(includeDelay, suppressEvents) { 33523 return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true); 33524 }; 33525 33526 p.reverse = function(from, suppressEvents) { 33527 if (from != null) { 33528 this.seek((from || this.totalDuration()), suppressEvents); 33529 } 33530 return this.reversed(true).paused(false); 33531 }; 33532 33533 p.render = function(time, suppressEvents, force) { 33534 //stub - we override this method in subclasses. 33535 }; 33536 33537 p.invalidate = function() { 33538 this._time = this._totalTime = 0; 33539 this._initted = this._gc = false;
33540 this._rawPrevTime = -1; 33541 if (this._gc || !this.timeline) { 33542 this._enabled(true); 33543 } 33544 return this; 33545 }; 33546 33547 p.isActive = function() { 33548 var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active. 33549 startTime = this._startTime, 33550 rawTime; 33551 return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime(true)) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale - _tinyNum)); 33552 }; 33553 33554 p._enabled = function (enabled, ignoreTimeline) { 33555 if (!_tickerActive) { 33556 _ticker.wake(); 33557 } 33558 this._gc = !enabled; 33559 this._active = this.isActive(); 33560 if (ignoreTimeline !== true) { 33561 if (enabled && !this.timeline) { 33562 this._timeline.add(this, this._startTime - this._delay); 33563 } else if (!enabled && this.timeline) { 33564 this._timeline._remove(this, true); 33565 } 33566 } 33567 return false; 33568 }; 33569 33570 33571 p._kill = function(vars, target) { 33572 return this._enabled(false, false); 33573 }; 33574 33575 p.kill = function(vars, target) { 33576 this._kill(vars, target); 33577 return this; 33578 }; 33579 33580 p._uncache = function(includeSelf) { 33581 var tween = includeSelf ? this : this.timeline; 33582 while (tween) { 33583 tween._dirty = true; 33584 tween = tween.timeline; 33585 } 33586 return this; 33587 }; 33588 33589 p._swapSelfInParams = function(params) { 33590 var i = params.length, 33591 copy = params.concat(); 33592 while (--i > -1) { 33593 if (params[i] === "{self}") { 33594 copy[i] = this; 33595 } 33596 } 33597 return copy; 33598 }; 33599 33600 p._callback = function(type) { 33601 var v = this.vars, 33602 callback = v[type], 33603 params = v[type + "Params"], 33604 scope = v[type + "Scope"] || v.callbackScope || this, 33605 l = params ? params.length : 0; 33606 switch (l) { //speed optimization; call() is faster than apply() so use it when there are only a few parameters (which is by far most common). Previously we simply did var v = this.vars; v[type].apply(v[type + "Scope"] || v.callbackScope || this, v[type + "Params"] || _blankArray); 33607 case 0: callback.call(scope); break; 33608 case 1: callback.call(scope, params[0]); break; 33609 case 2: callback.call(scope, params[0], params[1]); break; 33610 default: callback.apply(scope, params); 33611 } 33612 }; 33613 33614//----Animation getters/setters -------------------------------------------------------- 33615 33616 p.eventCallback = function(type, callback, params, scope) { 33617 if ((type || "").substr(0,2) === "on") { 33618 var v = this.vars; 33619 if (arguments.length === 1) { 33620 return v[type]; 33621 } 33622 if (callback == null) { 33623 delete v[type]; 33624 } else { 33625 v[type] = callback; 33626 v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params; 33627 v[type + "Scope"] = scope; 33628 } 33629 if (type === "onUpdate") { 33630 this._onUpdate = callback; 33631 } 33632 } 33633 return this; 33634 }; 33635 33636 p.delay = function(value) { 33637 if (!arguments.length) { 33638 return this._delay; 33639 } 33640 if (this._timeline.smoothChildTiming) { 33641 this.startTime( this._startTime + value - this._delay ); 33642 } 33643 this._delay = value; 33644 return this; 33645 }; 33646 33647 p.duration = function(value) { 33648 if (!arguments.length) { 33649 this._dirty = false; 33650 return this._duration; 33651 } 33652 this._duration = this._totalDuration = value; 33653 this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration. 33654 if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) { 33655 this.totalTime(this._totalTime * (value / this._duration), true); 33656 } 33657 return this; 33658 }; 33659 33660 p.totalDuration = function(value) { 33661 this._dirty = false; 33662 return (!arguments.length) ? this._totalDuration : this.duration(value); 33663 }; 33664 33665 p.time = function(value, suppressEvents) { 33666 if (!arguments.length) { 33667 return this._time; 33668 } 33669 if (this._dirty) { 33670 this.totalDuration(); 33671 } 33672 return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents); 33673 }; 33674 33675 p.totalTime = function(time, suppressEvents, uncapped) { 33676 if (!_tickerActive) { 33677 _ticker.wake(); 33678 } 33679 if (!arguments.length) { 33680 return this._totalTime; 33681 } 33682 if (this._timeline) { 33683 if (time < 0 && !uncapped) { 33684 time += this.totalDuration(); 33685 } 33686 if (this._timeline.smoothChildTiming) { 33687 if (this._dirty) { 33688 this.totalDuration(); 33689 } 33690 var totalDuration = this._totalDuration, 33691 tl = this._timeline; 33692 if (time > totalDuration && !uncapped) { 33693 time = totalDuration; 33694 } 33695 this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale); 33696 if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here. 33697 this._uncache(false); 33698 } 33699 //in case any of the ancestor timelines had completed but should now be enabled, we should reset the
33699ir totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed. 33700 if (tl._timeline) { 33701 while (tl._timeline) { 33702 if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) { 33703 tl.totalTime(tl._totalTime, true); 33704 } 33705 tl = tl._timeline; 33706 } 33707 } 33708 } 33709 if (this._gc) { 33710 this._enabled(true, false); 33711 } 33712 if (this._totalTime !== time || this._duration === 0) { 33713 if (_lazyTweens.length) { 33714 _lazyRender(); 33715 } 33716 this.render(time, suppressEvents, false); 33717 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render. 33718 _lazyRender(); 33719 } 33720 } 33721 } 33722 return this; 33723 }; 33724 33725 p.progress = p.totalProgress = function(value, suppressEvents) { 33726 var duration = this.duration(); 33727 return (!arguments.length) ? (duration ? this._time / duration : this.ratio) : this.totalTime(duration * value, suppressEvents); 33728 }; 33729 33730 p.startTime = function(value) { 33731 if (!arguments.length) { 33732 return this._startTime; 33733 } 33734 if (value !== this._startTime) { 33735 this._startTime = value; 33736 if (this.timeline) if (this.timeline._sortChildren) { 33737 this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct. 33738 } 33739 } 33740 return this; 33741 }; 33742 33743 p.endTime = function(includeRepeats) { 33744 return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale; 33745 }; 33746 33747 p.timeScale = function(value) { 33748 if (!arguments.length) { 33749 return this._timeScale; 33750 } 33751 var pauseTime, t; 33752 value = value || _tinyNum; //can't allow zero because it'll throw the math off 33753 if (this._timeline && this._timeline.smoothChildTiming) { 33754 pauseTime = this._pauseTime; 33755 t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime(); 33756 this._startTime = t - ((t - this._startTime) * this._timeScale / value); 33757 } 33758 this._timeScale = value; 33759 t = this.timeline; 33760 while (t && t.timeline) { //must update the duration/totalDuration of all ancestor timelines immediately in case in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though. 33761 t._dirty = true; 33762 t.totalDuration(); 33763 t = t.timeline; 33764 } 33765 return this; 33766 }; 33767 33768 p.reversed = function(value) { 33769 if (!arguments.length) { 33770 return this._reversed; 33771 } 33772 if (value != this._reversed) { 33773 this._reversed = value; 33774 this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true); 33775 } 33776 return this; 33777 }; 33778 33779 p.paused = function(value) { 33780 if (!arguments.length) { 33781 return this._paused; 33782 } 33783 var tl = this._timeline, 33784 raw, elapsed; 33785 if (value != this._paused) if (tl) { 33786 if (!_tickerActive && !value) { 33787 _ticker.wake(); 33788 } 33789 raw = tl.rawTime(); 33790 elapsed = raw - this._pauseTime; 33791 if (!value && tl.smoothChildTiming) { 33792 this._startTime += elapsed; 33793 this._uncache(false); 33794 } 33795 this._pauseTime = value ? raw : null; 33796 this._paused = value; 33797 this._active = this.isActive(); 33798 if (!value && elapsed !== 0 && this._initted && this.duration()) { 33799 raw = tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale; 33800 this.render(raw, (raw === this._totalTime), true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render. 33801 } 33802 } 33803 if (this._gc && !value) { 33804 this._enabled(true, false); 33805 } 33806 return this; 33807 }; 33808 33809
33810/* 33811 * ---------------------------------------------------------------- 33812 * SimpleTimeline 33813 * ---------------------------------------------------------------- 33814 */ 33815 var SimpleTimeline = _class("core.SimpleTimeline", function(vars) { 33816 Animation.call(this, 0, vars); 33817 this.autoRemoveChildren = this.smoothChildTiming = true; 33818 }); 33819 33820 p = SimpleTimeline.prototype = new Animation(); 33821 p.constructor = SimpleTimeline; 33822 p.kill()._gc = false; 33823 p._first = p._last = p._recent = null; 33824 p._sortChildren = false; 33825 33826 p.add = p.insert = function(child, position, align, stagger) { 33827 var prevTween, st; 33828 child._startTime = Number(position || 0) + child._delay; 33829 if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order). 33830 child._pauseTime = this.rawTime() - (child._timeline.rawTime() - child._pauseTime); 33831 } 33832 if (child.timeline) { 33833 child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one. 33834 } 33835 child.timeline = child._timeline = this; 33836 if (child._gc) { 33837 child._enabled(true, true); 33838 } 33839 prevTween = this._last; 33840 if (this._sortChildren) { 33841 st = child._startTime; 33842 while (prevTween && prevTween._startTime > st) { 33843 prevTween = prevTween._prev; 33844 } 33845 } 33846 if (prevTween) { 33847 child._next = prevTween._next; 33848 prevTween._next = child; 33849 } else { 33850 child._next = this._first; 33851 this._first = child; 33852 } 33853 if (child._next) { 33854 child._next._prev = child; 33855 } else { 33856 this._last = child; 33857 } 33858 child._prev = prevTween; 33859 this._recent = child; 33860 if (this._timeline) { 33861 this._uncache(true); 33862 } 33863 return this; 33864 }; 33865 33866 p._remove = function(tween, skipDisable) { 33867 if (tween.timeline === this) { 33868 if (!skipDisable) { 33869 tween._enabled(false, true); 33870 } 33871 33872 if (tween._prev) { 33873 tween._prev._next = tween._next; 33874 } else if (this._first === tween) { 33875 this._first = tween._next; 33876 } 33877 if (tween._next) { 33878 tween._next._prev = tween._prev; 33879 } else if (this._last === tween) { 33880 this._last = tween._prev; 33881 } 33882 tween._next = tween._prev = tween.timeline = null; 33883 if (tween === this._recent) { 33884 this._recent = this._last; 33885 } 33886 33887 if (this._timeline) { 33888 this._uncache(true); 33889 } 33890 } 33891 return this; 33892 }; 33893 33894 p.render = function(time, suppressEvents, force) { 33895 var tween = this._first, 33896 next; 33897 this._totalTime = this._time = this._rawPrevTime = time; 33898 while (tween) { 33899 next = tween._next; //record it here because the value could change after rendering... 33900 if (tween._active || (time >= tween._startTime && !tween._paused && !tween._gc)) { 33901 if (!tween._reversed) { 33902 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 33903 } else { 33904 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 33905 } 33906 } 33907 tween = next; 33908 } 33909 }; 33910 33911 p.rawTime = function() { 33912 if (!_tickerActive) { 33913 _ticker.wake(); 33914 } 33915 return this._totalTime; 33916 }; 33917 33918/* 33919 * ---------------------------------------------------------------- 33920 * TweenLite 33921 * ---------------------------------------------------------------- 33922 */ 33923 var TweenLite = _class("TweenLite", function(target, duration, vars) { 33924 Animation.call(this, duration, vars); 33925 this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method) 33926 33927 if (target == null) { 33928 throw "Cannot tween a null target."; 33929 } 33930 33931 this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target; 33932 33933 var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),
33934 overwrite = this.vars.overwrite, 33935 i, targ, targets; 33936 33937 this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite]; 33938 33939 if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") { 33940 this._targets = targets = _slice(target); //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 33941 this._propLookup = []; 33942 this._siblings = []; 33943 for (i = 0; i < targets.length; i++) { 33944 targ = targets[i]; 33945 if (!targ) { 33946 targets.splice(i--, 1); 33947 continue; 33948 } else if (typeof(targ) === "string") { 33949 targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings 33950 if (typeof(targ) === "string") { 33951 targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case) 33952 } 33953 continue; 33954 } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself. 33955 targets.splice(i--, 1); 33956 this._targets = targets = targets.concat(_slice(targ)); 33957 continue; 33958 } 33959 this._siblings[i] = _register(targ, this, false); 33960 if (overwrite === 1) if (this._siblings[i].length > 1) { 33961 _applyOverwrite(targ, this, null, 1, this._siblings[i]); 33962 } 33963 } 33964 33965 } else { 33966 this._propLookup = {}; 33967 this._siblings = _register(target, this, false); 33968 if (overwrite === 1) if (this._siblings.length > 1) { 33969 _applyOverwrite(target, this, null, 1, this._siblings); 33970 } 33971 } 33972 if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) { 33973 this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) 33974 this.render(Math.min(0, -this._delay)); //in case delay is negative 33975 } 33976 }, true), 33977 _isSelector = function(v) { 33978 return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox. 33979 }, 33980 _autoCSS = function(vars, target) { 33981 var css = {}, 33982 p; 33983 for (p in vars) { 33984 if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties. 33985 css[p] = vars[p]; 33986 delete vars[p]; 33987 } 33988 } 33989 vars.css = css; 33990 }; 33991 33992 p = TweenLite.prototype = new Animation(); 33993 p.constructor = TweenLite; 33994 p.kill()._gc = false; 33995 33996//----TweenLite defaults, overwrite management, and root updates ---------------------------------------------------- 33997 33998 p.ratio = 0; 33999 p._firstPT = p._targets = p._overwrittenProps = p._startAt = null; 34000 p._notifyPluginsOfEnabled = p._lazy = false; 34001 34002 TweenLite.version = "2.1.2"; 34003 TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1); 34004 TweenLite.defaultOverwrite = "auto"; 34005 TweenLite.ticker = _ticker; 34006 TweenLite.autoSleep = 120; 34007 TweenLite.lagSmoothing = function(threshold, adjustedLag) { 34008 _ticker.lagSmoothing(threshold, adjustedLag); 34009 }; 34010 34011 TweenLite.selector = window.$ || window.jQuery || function(e) { 34012 var selector = window.$ || window.jQuery; 34013 if (selector) { 34014 TweenLite.selector = selector; 34015 return selector(e); 34016 } 34017 if (!_doc) { //in some dev environments (like Angular 6), GSAP gets loaded before the document is defined! So re-query it here if/when necessary. 34018 _doc = window.document; 34019 } 34020 return (!_doc) ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e)); 34021 }; 34022 34023 var _lazyTweens = [], 34024 _lazyLookup = {}, 34025 _numbersExp = /(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig, 34026 _relExp = /[\+-]=-?[\.\d]/, 34027 //_nonNumbersExp = /(?:([\-+](?!(\d|=)))|[^\d\-+=e]|(e(?![\-+][\d])))+/ig, 34028 _setRatio = function(v) { 34029 var pt = this._firstPT, 34030 min = 0.000001, 34031 val; 34032 while (pt) { 34033 val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start; 34034 if (pt.m) { 34035 val = pt.m.call(this._tween, val, this._target || pt.t, this._tween); 34036 } else if (val < min) if (val >
34036 -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser 34037 val = 0; 34038 } 34039 if (!pt.f) { 34040 pt.t[pt.p] = val; 34041 } else if (pt.fp) { 34042 pt.t[pt.p](pt.fp, val); 34043 } else { 34044 pt.t[pt.p](val); 34045 } 34046 pt = pt._next; 34047 } 34048 }, 34049 _blobRound = function(v) { 34050 return (((v * 1000) | 0) / 1000) + ""; 34051 }, 34052 //compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")). 34053 _blobDif = function(start, end, filter, pt) { 34054 var a = [], 34055 charIndex = 0, 34056 s = "", 34057 color = 0, 34058 startNums, endNums, num, i, l, nonNumbers, currentNum; 34059 a.start = start; 34060 a.end = end; 34061 start = a[0] = start + ""; //ensure values are strings 34062 end = a[1] = end + ""; 34063 if (filter) { 34064 filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. 34065 start = a[0]; 34066 end = a[1]; 34067 } 34068 a.length = 0; 34069 startNums = start.match(_numbersExp) || []; 34070 endNums = end.match(_numbersExp) || []; 34071 if (pt) { 34072 pt._next = null; 34073 pt.blob = 1; 34074 a._firstPT = a._applyPT = pt; //apply last in the linked list (which means inserting it first) 34075 } 34076 l = endNums.length; 34077 for (i = 0; i < l; i++) { 34078 currentNum = endNums[i]; 34079 nonNumbers = end.substr(charIndex, end.indexOf(currentNum, charIndex)-charIndex); 34080 s += (nonNumbers || !i) ? nonNumbers : ","; //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case. 34081 charIndex += nonNumbers.length; 34082 if (color) { //sense rgba() values and round them. 34083 color = (color + 1) % 5; 34084 } else if (nonNumbers.substr(-5) === "rgba(") { 34085 color = 1; 34086 } 34087 if (currentNum === startNums[i] || startNums.length <= i) { 34088 s += currentNum; 34089 } else { 34090 if (s) { 34091 a.push(s); 34092 s = ""; 34093 } 34094 num = parseFloat(startNums[i]); 34095 a.push(num); 34096 a._firstPT = {_next: a._firstPT, t:a, p: a.length-1, s:num, c:((currentNum.charAt(1) === "=") ? parseInt(currentNum.charAt(0) + "1", 10) * parseFloat(currentNum.substr(2)) : (parseFloat(currentNum) - num)) || 0, f:0, m:(color && color < 4) ? Math.round : _blobRound}; //limiting to 3 decimal places and casting as a string can really help performance when array.join() is called! 34097 //note: we don't set _prev because we'll never need to remove individual PropTweens from this list. 34098 } 34099 charIndex += currentNum.length; 34100 } 34101 s += end.substr(charIndex); 34102 if (s) { 34103 a.push(s); 34104 } 34105 a.setRatio = _setRatio; 34106 if (_relExp.test(end)) { //if the end string contains relative values, delete it so that on the final render (in _setRatio()), we don't actually set it to the string with += or -= characters (forces it to use the calculated value). 34107 a.end = null; 34108 } 34109 return a; 34110 }, 34111 //note: "funcParam" is only necessary for function-based getters/setters that require an extra parameter like getAttribute("width") and setAttribute("width", value). In this example, funcParam would be "width". Used by AttrPlugin for example. 34112 _addPropTween = function(target, prop, start, end, overwriteProp, mod, funcParam, stringFilter, index) { 34113 if (typeof(end) === "function") { 34114 end = end(index || 0, target); 34115 } 34116 var type = typeof(target[prop]), 34117 getterName = (type !== "function") ? "" : ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3)), 34118 s = (start !== "get") ? start : !getterName ? target[prop] : funcParam ? target[getterName](funcParam) : target[getterName](), 34119 isRelative = (typeof(end) === "string" && end.charAt(1) === "="), 34120 pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, m:(!mod ? 0 : (typeof(mod) === "function") ? mod : Math.round), pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0}, 34121 blob; 34122 34123 if (typeof(s) !== "number" || (typeof(end) !== "number" && !isRelative)) { 34124 if (funcParam || isNaN(s) || (!isRelative && isNaN(end)) || typeof(s) === "boolean" || typeof(end) === "boolean") { 34125 //a blob (string that has multiple numbers in it) 34126 pt.fp = funcParam; 34127 blob = _blobDif(s, (isRelative ? (parseFloat(pt.s) + pt.c) + (pt.s + "").replace(/[0-9\-\.]/g, "") : end), stringFilter || TweenLite.defaultStringFilter, pt); 34128 pt = {t: blob, p: "setRatio", s: 0, c: 1, f: 2, pg: 0, n: overwriteProp || prop, pr: 0, m: 0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example. 34129 } else { 34130 pt.s = parseFloat(s); 34131 if (!isRelative) { 34132 pt.c = (parseFloat(end) - pt.s) || 0; 34133 } 34134 } 34135 } 34136 if (pt.c) { //only add it to the linked list if there's a change. 34137 if ((pt._next = this._firstPT)) { 34138 pt._next._prev = pt; 34139 } 34140 this._firstPT = pt; 34141 return pt; 34142 } 34143 }, 34144 _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens, blobDif:_blobDif}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object. 34145 _plugins = TweenLite._plugins = {}, 34146 _tweenLookup = _internals.tweenLookup = {}, 34147 _tweenLookupNum = 0, 34148 _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUp
34148date:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1, callbackScope:1, stringFilter:1, id:1, yoyoEase:1, stagger:1}, 34149 _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0}, 34150 _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(), 34151 _rootTimeline = Animation._rootTimeline = new SimpleTimeline(), 34152 _nextGCFrame = 30, 34153 _lazyRender = _internals.lazyRender = function() { 34154 var l = _lazyTweens.length, 34155 i, tween; 34156 _lazyLookup = {}; 34157 for (i = 0; i < l; i++) { 34158 tween = _lazyTweens[i]; 34159 if (tween && tween._lazy !== false) { 34160 tween.render(tween._lazy[0], tween._lazy[1], true); 34161 tween._lazy = false; 34162 } 34163 } 34164 _lazyTweens.length = 0; 34165 }; 34166 34167 _rootTimeline._startTime = _ticker.time; 34168 _rootFramesTimeline._startTime = _ticker.frame; 34169 _rootTimeline._active = _rootFramesTimeline._active = true; 34170 setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick". 34171 34172 Animation._updateRoot = TweenLite.render = function() { 34173 var i, a, p; 34174 if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again. 34175 _lazyRender(); 34176 } 34177 _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false); 34178 _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false); 34179 if (_lazyTweens.length) { 34180 _lazyRender(); 34181 } 34182 if (_ticker.frame >= _nextGCFrame) { //dump garbage every 120 frames or whatever the user sets TweenLite.autoSleep to 34183 _nextGCFrame = _ticker.frame + (parseInt(TweenLite.autoSleep, 10) || 120); 34184 for (p in _tweenLookup) { 34185 a = _tweenLookup[p].tweens; 34186 i = a.length; 34187 while (--i > -1) { 34188 if (a[i]._gc) { 34189 a.splice(i, 1); 34190 } 34191 } 34192 if (a.length === 0) { 34193 delete _tweenLookup[p]; 34194 } 34195 } 34196 //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly 34197 p = _rootTimeline._first; 34198 if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) { 34199 while (p && p._paused) { 34200 p = p._next; 34201 } 34202 if (!p) { 34203 _ticker.sleep(); 34204 } 34205 } 34206 } 34207 }; 34208 34209 _ticker.addEventListener("tick", Animation._updateRoot); 34210 34211 var _register = function(target, tween, scrub) { 34212 var id = target._gsTweenID, a, i; 34213 if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) { 34214 _tweenLookup[id] = {target:target, tweens:[]}; 34215 } 34216 if (tween) { 34217 a = _tweenLookup[id].tweens; 34218 a[(i = a.length)] = tween; 34219 if (scrub) { 34220 while (--i > -1) { 34221 if (a[i] === tween) { 34222 a.splice(i, 1); 34223 } 34224 } 34225 } 34226 } 34227 return _tweenLookup[id].tweens; 34228 }, 34229 _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) { 34230 var func = overwrittenTween.vars.onOverwrite, r1, r2; 34231 if (func) { 34232 r1 = func(overwrittenTween, overwritingTween, target, killedProps); 34233 } 34234 func = TweenLite.onOverwrite; 34235 if (func) { 34236 r2 = func(overwrittenTween, overwritingTween, target, killedProps); 34237 } 34238 return (r1 !== false && r2 !== false); 34239 }, 34240 _applyOverwrite = function(target, tween, props, mode, siblings) { 34241 var i, changed, curTween, l; 34242 if (mode === 1 || mode >= 4) { 34243 l = siblings.length; 34244 for (i = 0; i < l; i++) { 34245 if ((curTween = siblings[i]) !== tween) { 34246 if (!curTween._gc) { 34247 if (curTween._kill(null, target, tween)) { 34248 changed = true; 34249 } 34250 } 34251 } else if (mode === 5) { 34252 break; 34253 } 34254 } 34255 return changed; 34256 } 34257 //NOTE: Add tiny amount to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example) 34258 var startTime = tween._startTime + _tinyNum, 34259 overlaps = [], 34260 oCount = 0, 34261 zeroDur = (tween._duration === 0), 34262 globalStart; 34263 i = siblings.length; 34264 while (--i > -1) { 34265 if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) { 34266 //ignore 34267 } else if (curTween._timeline !== tween._timeline) { 34268 globalStart = globalStart || _checkOverlap(tween, 0, zeroDur); 34269 if (_checkOverlap(curTween, globalStart, zeroDur) === 0) { 34270 overlaps[oCount++] = curTween; 34271 } 34272 } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= _tinyNum * 2)) { 34273 overlaps[oCount++] = curTween; 34274 } 34275 } 34276 34277 i = oCount; 34278 while (--i > -1) { 34279 curTween = overlaps[i]; 34280 l = curTween._firstPT; //we need to discern if there were property tweens originally; if they all get removed in the next line's _kill() call, the tween should be killed. See https://github.com/greensock/GreenSock-JS/issues/278 34281 if (mode === 2) if (curTween._kill(props, target, tween)) { 34282 changed = true; 34283 } 34284 if (mode !== 2 || (!curTween._firstPT && curTween._initted && l)) { 34285 if (mode !== 2 && !_onOverwrite(curTween, tween)) { 34286 continue; 34287 } 34288 if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween. 34289 changed = true; 34290 } 34291 } 34292 } 34293 return changed; 34294 }, 34295 _checkOverlap = function(tween, reference, zeroDur) { 34296 var tl = tween._timeline, 34297 ts = tl._timeScale, 34298 t = tween._startTime; 34299 while (tl._timeline) { 34300 t += tl._startTime; 34301 ts *= tl._timeScale; 34302 if (tl._paused) { 34303 return -100; 34304 } 34305 tl = tl._timeline; 34306 } 34307 t /= ts; 34308 return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum; 34309 }; 34310 34311 34312//---- TweenLite instance methods ----------------------------------------------------------------------------- 34313 34314 p._init = function() { 34315 var v = this.vars, 34316 op = this._overwrittenProps, 34317 dur = this._duration, 34318 immediate = !!v.immediateRender, 34319 ease = v.ease, 34320 startAt = this._startAt, 34321 i, initPlugins, pt, p, startVars, l; 34322 if (v.startAt) { 34323 if (startAt) { 34324 startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change. 34325 startAt.kill(); 34326 } 34327 startVars = {}; 34328 for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from); 34329 startVars[p] = v.startAt[p]; 34330 } 34331 startVars.data = "isStart"; 34332 startVars.overwrite = false;
34333 startVars.immediateRender = true; 34334 startVars.lazy = (immediate && v.lazy !== false); 34335 startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop). 34336 startVars.onUpdate = v.onUpdate; 34337 startVars.onUpdateParams = v.onUpdateParams; 34338 startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this; 34339 this._startAt = TweenLite.to(this.target || {}, 0, startVars); 34340 if (immediate) { 34341 if (this._time > 0) { 34342 this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()). 34343 } else if (dur !== 0) { 34344 return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting. 34345 } 34346 } 34347 } else if (v.runBackwards && dur !== 0) { 34348 //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards) 34349 if (startAt) { 34350 startAt.render(-1, true); 34351 startAt.kill(); 34352 this._startAt = null; 34353 } else { 34354 if (this._time !== 0) { //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0 34355 immediate = false; 34356 } 34357 pt = {}; 34358 for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through. 34359 if (!_reservedProps[p] || p === "autoCSS") { 34360 pt[p] = v[p]; 34361 } 34362 } 34363 pt.overwrite = 0; 34364 pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in. 34365 pt.lazy = (immediate && v.lazy !== false); 34366 pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after) 34367 this._startAt = TweenLite.to(this.target, 0, pt); 34368 if (!immediate) { 34369 this._startAt._init(); //ensures that the initial values are recorded 34370 this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween. 34371 if (this.vars.immediateRender) { 34372 this._startAt = null; 34373 } 34374 } else if (this._time === 0) { 34375 return; 34376 } 34377 } 34378 } 34379 this._ease = ease = (!ease) ? TweenLite.defaultEase : (ease instanceof Ease) ? ease : (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase; 34380 if (v.easeParams instanceof Array && ease.config) { 34381 this._ease = ease.config.apply(ease, v.easeParams); 34382 } 34383 this._easeType = this._ease._type; 34384 this._easePower = this._ease._power; 34385 this._firstPT = null; 34386 34387 if (this._targets) { 34388 l = this._targets.length; 34389 for (i = 0; i < l; i++) { 34390 if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null), i) ) { 34391 initPlugins = true; 34392 } 34393 } 34394 } else { 34395 initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op, 0); 34396 } 34397 34398 if (initPlugins) { 34399 TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite 34400 } 34401 if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live. 34402 this._enabled(false, false); 34403 } 34404 if (v.runBackwards) { 34405 pt = this._firstPT; 34406 while (pt) { 34407 pt.s += pt.c; 34408 pt.c = -pt.c; 34409 pt = pt._next; 34410 } 34411 } 34412 this._onUpdate = v.onUpdate; 34413 this._initted = true; 34414 }; 34415 34416 p._initProps = function(target, propLookup, siblings, overwrittenProps, index) { 34417 var p, i, initPlugins, plugin, pt, v; 34418 if (target == null) { 34419 return false;
34420 } 34421 if (_lazyLookup[target._gsTweenID]) { 34422 _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end) 34423 } 34424 34425 if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe. 34426 _autoCSS(this.vars, target); 34427 } 34428 for (p in this.vars) { 34429 v = this.vars[p]; 34430 if (_reservedProps[p]) { 34431 if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) { 34432 this.vars[p] = v = this._swapSelfInParams(v, this); 34433 } 34434 34435 } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this, index)) { 34436 34437 //t - target [object] 34438 //p - property [string] 34439 //s - start [number] 34440 //c - change [number] 34441 //f - isFunction [boolean] 34442 //n - name [string] 34443 //pg - isPlugin [boolean] 34444 //pr - priority [number] 34445 //m - mod [function | 0] 34446 this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:1, n:p, pg:1, pr:plugin._priority, m:0}; 34447 i = plugin._overwriteProps.length; 34448 while (--i > -1) { 34449 propLookup[plugin._overwriteProps[i]] = this._firstPT; 34450 } 34451 if (plugin._priority || plugin._onInitAllProps) { 34452 initPlugins = true; 34453 } 34454 if (plugin._onDisable || plugin._onEnable) { 34455 this._notifyPluginsOfEnabled = true; 34456 } 34457 if (pt._next) { 34458 pt._next._prev = pt; 34459 } 34460 34461 } else { 34462 propLookup[p] = _addPropTween.call(this, target, p, "get", v, p, 0, null, this.vars.stringFilter, index); 34463 } 34464 } 34465 34466 if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first) 34467 return this._initProps(target, propLookup, siblings, overwrittenProps, index); 34468 } 34469 if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) { 34470 this._kill(propLookup, target); 34471 return this._initProps(target, propLookup, siblings, overwrittenProps, index); 34472 } 34473 if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does. 34474 _lazyLookup[target._gsTweenID] = true; 34475 } 34476 return initPlugins; 34477 }; 34478 34479 p.render = function(time, suppressEvents, force) { 34480 var self = this, 34481 prevTime = self._time, 34482 duration = self._duration, 34483 prevRawPrevTime = self._rawPrevTime, 34484 isComplete, callback, pt, rawPrevTime; 34485 if (time >= duration - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 34486 self._totalTime = self._time = duration; 34487 self.ratio = self._ease._calcEnd ? self._ease.getRatio(1) : 1; 34488 if (!self._reversed ) { 34489 isComplete = true; 34490 callback = "onComplete"; 34491 force = (force || self._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 34492 } 34493 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 34494 if (self._startTime === self._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent roun
34494ding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate. 34495 time = 0; 34496 } 34497 if (prevRawPrevTime < 0 || (time <= 0 && time >= -_tinyNum) || (prevRawPrevTime === _tinyNum && self.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause. 34498 force = true; 34499 if (prevRawPrevTime > _tinyNum) { 34500 callback = "onReverseComplete"; 34501 } 34502 } 34503 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 34504 } 34505 34506 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 34507 self._totalTime = self._time = 0; 34508 self.ratio = self._ease._calcEnd ? self._ease.getRatio(0) : 0; 34509 if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) { 34510 callback = "onReverseComplete"; 34511 isComplete = self._reversed; 34512 } 34513 if (time > -_tinyNum) { 34514 time = 0; 34515 } else if (time < 0) { 34516 self._active = false; 34517 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 34518 if (prevRawPrevTime >= 0 && !(prevRawPrevTime === _tinyNum && self.data === "isPause")) { 34519 force = true; 34520 } 34521 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 34522 } 34523 } 34524 if (!self._initted || (self._startAt && self._startAt.progress())) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. Also, we check progress() because if startAt has already rendered at its end, we should force a render at its beginning. Otherwise, if you put the playhead directly on top of where a fromTo({immediateRender:false}) starts, and then move it backwards, the from() won't revert its values. 34525 force = true; 34526 } 34527 } else { 34528 self._totalTime = self._time = time; 34529 34530 if (self._easeType) { 34531 var r = time / duration, type = self._easeType, pow = self._easePower; 34532 if (type === 1 || (type === 3 && r >= 0.5)) { 34533 r = 1 - r; 34534 } 34535 if (type === 3) { 34536 r *= 2; 34537 } 34538 if (pow === 1) { 34539 r *= r; 34540 } else if (pow === 2) { 34541 r *= r * r; 34542 } else if (pow === 3) { 34543 r *= r * r * r; 34544 } else if (pow === 4) { 34545 r *= r * r * r * r; 34546 } 34547 self.ratio = (type === 1) ? 1 - r : (type === 2) ? r : (time / duration < 0.5) ? r / 2 : 1 - (r / 2); 34548 } else { 34549 self.ratio = self._ease.getRatio(time / duration); 34550 } 34551 } 34552 34553 if (self._time === prevTime && !force) { 34554 return; 34555 } else if (!self._initted) { 34556 self._init(); 34557 if (!self._initted || self._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that over
34557writing occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example. 34558 return; 34559 } else if (!force && self._firstPT && ((self.vars.lazy !== false && self._duration) || (self.vars.lazy && !self._duration))) { 34560 self._time = self._totalTime = prevTime; 34561 self._rawPrevTime = prevRawPrevTime; 34562 _lazyTweens.push(self); 34563 self._lazy = [time, suppressEvents]; 34564 return; 34565 } 34566 //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently. 34567 if (self._time && !isComplete) { 34568 self.ratio = self._ease.getRatio(self._time / duration); 34569 } else if (isComplete && self._ease._calcEnd) { 34570 self.ratio = self._ease.getRatio((self._time === 0) ? 0 : 1); 34571 } 34572 } 34573 if (self._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occurring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time. 34574 self._lazy = false; 34575 } 34576 if (!self._active) if (!self._paused && self._time !== prevTime && time >= 0) { 34577 self._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done. 34578 } 34579 if (prevTime === 0) { 34580 if (self._startAt) { 34581 if (time >= 0) { 34582 self._startAt.render(time, true, force); 34583 } else if (!callback) { 34584 callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area. 34585 } 34586 } 34587 if (self.vars.onStart) if (self._time !== 0 || duration === 0) if (!suppressEvents) { 34588 self._callback("onStart"); 34589 } 34590 } 34591 pt = self._firstPT; 34592 while (pt) { 34593 if (pt.f) { 34594 pt.t[pt.p](pt.c * self.ratio + pt.s); 34595 } else { 34596 pt.t[pt.p] = pt.c * self.ratio + pt.s; 34597 } 34598 pt = pt._next; 34599 } 34600 34601 if (self._onUpdate) { 34602 if (time < 0) if (self._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. 34603 self._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete. 34604 } 34605 if (!suppressEvents) if (self._time !== prevTime || isComplete || force) { 34606 self._callback("onUpdate"); 34607 } 34608 } 34609 if (callback) if (!self._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate 34610 if (time < 0 && self._startAt && !self._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values. 34611 self._startAt.render(time, true, force); 34612 } 34613 if (isComplete) { 34614 if (self._timeline.autoRemoveChildren) { 34615 self._enabled(false, false); 34616 } 34617 self._active = false;
34618 } 34619 if (!suppressEvents && self.vars[callback]) { 34620 self._callback(callback); 34621 } 34622 if (duration === 0 && self._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless. 34623 self._rawPrevTime = 0; 34624 } 34625 } 34626 }; 34627 34628 p._kill = function(vars, target, overwritingTween) { 34629 if (vars === "all") { 34630 vars = null; 34631 } 34632 if (vars == null) if (target == null || target === this.target) { 34633 this._lazy = false; 34634 return this._enabled(false, false); 34635 } 34636 target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target; 34637 var simultaneousOverwrite = (overwritingTween && this._time && overwritingTween._startTime === this._startTime && this._timeline === overwritingTween._timeline), 34638 firstPT = this._firstPT, 34639 i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed; 34640 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") { 34641 i = target.length; 34642 while (--i > -1) { 34643 if (this._kill(vars, target[i], overwritingTween)) { 34644 changed = true; 34645 } 34646 } 34647 } else { 34648 if (this._targets) { 34649 i = this._targets.length; 34650 while (--i > -1) { 34651 if (target === this._targets[i]) { 34652 propLookup = this._propLookup[i] || {}; 34653 this._overwrittenProps = this._overwrittenProps || []; 34654 overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all"; 34655 break; 34656 } 34657 } 34658 } else if (target !== this.target) { 34659 return false; 34660 } else { 34661 propLookup = this._propLookup; 34662 overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all"; 34663 } 34664 34665 if (propLookup) { 34666 killProps = vars || propLookup; 34667 record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin) 34668 if (overwritingTween && (TweenLite.onOverwrite || this.vars.onOverwrite)) { 34669 for (p in killProps) { 34670 if (propLookup[p]) { 34671 if (!killed) { 34672 killed = []; 34673 } 34674 killed.push(p); 34675 } 34676 } 34677 if ((killed || !vars) && !_onOverwrite(this, overwritingTween, target, killed)) { //if the onOverwrite returned false, that means the user wants to override the overwriting (cancel it). 34678 return false; 34679 } 34680 } 34681 34682 for (p in killProps) { 34683 if ((pt = propLookup[p])) { 34684 if (simultaneousOverwrite) { //if another tween overwrites this one and they both start at exactly the same time, yet this tween has already rendered once (for example, at 0.001) because it's first in the queue, we should revert the values to where they were at 0 so that the starting values aren't contaminated on the overwriting tween. 34685 if (pt.f) { 34686 pt.t[pt.p](pt.s); 34687 } else { 34688 pt.t[pt.p] = pt.s; 34689 } 34690 changed = true; 34691 } 34692 if (pt.pg && pt.t._kill(killProps)) { 34693 changed = true; //some plugins need to be notified so they can perform cleanup tasks first 34694 } 34695 if (!pt.pg || pt.t._overwriteProps.length === 0) { 34696 if (pt._prev) { 34697 pt._prev._next = pt._next; 34698 } else if (pt === this._firstPT) { 34699 this._firstPT = pt._next; 34700 } 34701 if (pt._next) { 34702 pt._next._prev = pt._prev; 34703 } 34704 pt._next = pt._prev = null; 34705 } 34706 delete propLookup[p]; 34707 } 34708 if (record) { 34709 overwrittenProps[p] = 1; 34710 } 34711 } 34712 if (!this._firstPT && this._initted && firstPT) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening. 34713 this._enabled(false, false); 34714 } 34715 } 34716 } 34717 return changed; 34718 }; 34719 34720 p.invalidate = function() { 34721 if (this._notifyPluginsOfEnabled) { 34722 TweenLite._onPluginEvent("_onDisable", this); 34723 } 34724 var t = this._time; 34725 this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null; 34726 this._notifyPluginsOfEnabled = this._active = this._lazy = false;
34727 this._propLookup = (this._targets) ? {} : []; 34728 Animation.prototype.invalidate.call(this); 34729 if (this.vars.immediateRender) { 34730 this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) 34731 this.render(t, false, this.vars.lazy !== false); 34732 } 34733 return this; 34734 }; 34735 34736 p._enabled = function(enabled, ignoreTimeline) { 34737 if (!_tickerActive) { 34738 _ticker.wake(); 34739 } 34740 if (enabled && this._gc) { 34741 var targets = this._targets, 34742 i; 34743 if (targets) { 34744 i = targets.length; 34745 while (--i > -1) { 34746 this._siblings[i] = _register(targets[i], this, true); 34747 } 34748 } else { 34749 this._siblings = _register(this.target, this, true); 34750 } 34751 } 34752 Animation.prototype._enabled.call(this, enabled, ignoreTimeline); 34753 if (this._notifyPluginsOfEnabled) if (this._firstPT) { 34754 return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this); 34755 } 34756 return false; 34757 }; 34758 34759 34760//----TweenLite static methods ----------------------------------------------------- 34761 34762 TweenLite.to = function(target, duration, vars) { 34763 return new TweenLite(target, duration, vars); 34764 }; 34765 34766 TweenLite.from = function(target, duration, vars) { 34767 vars.runBackwards = true; 34768 vars.immediateRender = (vars.immediateRender != false); 34769 return new TweenLite(target, duration, vars); 34770 }; 34771 34772 TweenLite.fromTo = function(target, duration, fromVars, toVars) { 34773 toVars.startAt = fromVars; 34774 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 34775 return new TweenLite(target, duration, toVars); 34776 }; 34777 34778 TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) { 34779 return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, lazy:false, useFrames:useFrames, overwrite:0}); 34780 }; 34781 34782 TweenLite.set = function(target, vars) { 34783 return new TweenLite(target, 0, vars); 34784 }; 34785 34786 TweenLite.getTweensOf = function(target, onlyActive) { 34787 if (target == null) { return []; } 34788 target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target; 34789 var i, a, j, t; 34790 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") { 34791 i = target.length; 34792 a = []; 34793 while (--i > -1) { 34794 a = a.concat(TweenLite.getTweensOf(target[i], onlyActive)); 34795 } 34796 i = a.length; 34797 //now get rid of any duplicates (tweens of arrays of objects could cause duplicates) 34798 while (--i > -1) { 34799 t = a[i]; 34800 j = i; 34801 while (--j > -1) { 34802 if (t === a[j]) { 34803 a.splice(i, 1); 34804 } 34805 } 34806 } 34807 } else if (target._gsTweenID) { 34808 a = _register(target).concat(); 34809 i = a.length; 34810 while (--i > -1) { 34811 if (a[i]._gc || (onlyActive && !a[i].isActive())) { 34812 a.splice(i, 1); 34813 } 34814 } 34815 } 34816 return a || []; 34817 }; 34818 34819 TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) { 34820 if (typeof(onlyActive) === "object") { 34821 vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted) 34822 onlyActive = false; 34823 } 34824 var a = TweenLite.getTweensOf(target, onlyActive), 34825 i = a.length; 34826 while (--i > -1) { 34827 a[i]._kill(vars, target); 34828 } 34829 }; 34830 34831 34832 34833/* 34834 * ---------------------------------------------------------------- 34835 * TweenPlugin (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another script call before loading plugins which is easy to forget) 34836 * ---------------------------------------------------------------- 34837 */ 34838 var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) { 34839 this._overwriteProps = (props || "").split(","); 34840 this._propName = this._overwriteProps[0]; 34841 this._priority = priority || 0; 34842 this._super = TweenPlugin.prototype; 34843 }, true); 34844 34845 p = TweenPlugin.prototype; 34846 TweenPlugin.version = "1.19.0"; 34847 TweenPlugin.API = 2; 34848 p._firstPT = null; 34849 p._addTween = _addPropTween; 34850 p.setRatio = _setRatio; 34851 34852 p._kill = function(lookup) { 34853 var a = this._overwriteProps, 34854 pt = this._firstPT, 34855 i; 34856 if (lookup[this._propName] != null) { 34857 this._overwriteProps = []; 34858 } else { 34859 i = a.length; 34860 while (--i > -1) { 34861 if (lookup[a[i]] != null) { 34862 a.splice(i, 1); 34863 } 34864 } 34865 } 34866 while (pt) { 34867 if (lookup[pt.n] != null) { 34868 if (pt._next) { 34869 pt._next._prev = pt._prev; 34870 } 34871 if (pt._prev) { 34872 pt._prev._next = pt._next; 34873 pt._prev = null; 34874 } else if (this._firstPT === pt) { 34875 this._firstPT = pt._next; 34876 } 34877 } 34878 pt = pt._next; 34879 } 34880 return false;
34881 }; 34882 34883 p._mod = p._roundProps = function(lookup) { 34884 var pt = this._firstPT, 34885 val; 34886 while (pt) { 34887 val = lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ]); 34888 if (val && typeof(val) === "function") { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here. 34889 if (pt.f === 2) { 34890 pt.t._applyPT.m = val; 34891 } else { 34892 pt.m = val; 34893 } 34894 } 34895 pt = pt._next; 34896 } 34897 }; 34898 34899 TweenLite._onPluginEvent = function(type, tween) { 34900 var pt = tween._firstPT, 34901 changed, pt2, first, last, next; 34902 if (type === "_onInitAllProps") { 34903 //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame. 34904 while (pt) { 34905 next = pt._next; 34906 pt2 = first; 34907 while (pt2 && pt2.pr > pt.pr) { 34908 pt2 = pt2._next; 34909 } 34910 if ((pt._prev = pt2 ? pt2._prev : last)) { 34911 pt._prev._next = pt; 34912 } else { 34913 first = pt; 34914 } 34915 if ((pt._next = pt2)) { 34916 pt2._prev = pt; 34917 } else { 34918 last = pt; 34919 } 34920 pt = next; 34921 } 34922 pt = tween._firstPT = first; 34923 } 34924 while (pt) { 34925 if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) { 34926 changed = true; 34927 } 34928 pt = pt._next; 34929 } 34930 return changed; 34931 }; 34932 34933 TweenPlugin.activate = function(plugins) { 34934 var i = plugins.length; 34935 while (--i > -1) { 34936 if (plugins[i].API === TweenPlugin.API) { 34937 _plugins[(new plugins[i]())._propName] = plugins[i]; 34938 } 34939 } 34940 return true; 34941 }; 34942 34943 //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations. 34944 _gsDefine.plugin = function(config) { 34945 if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; } 34946 var propName = config.propName, 34947 priority = config.priority || 0, 34948 overwriteProps = config.overwriteProps, 34949 map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_mod", mod:"_mod", initAll:"_onInitAllProps"}, 34950 Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin", 34951 function() { 34952 TweenPlugin.call(this, propName, priority); 34953 this._overwriteProps = overwriteProps || []; 34954 }, (config.global === true)), 34955 p = Plugin.prototype = new TweenPlugin(propName), 34956 prop; 34957 p.constructor = Plugin; 34958 Plugin.API = config.API; 34959 for (prop in map) { 34960 if (typeof(config[prop]) === "function") { 34961 p[map[prop]] = config[prop]; 34962 } 34963 } 34964 Plugin.version = config.version; 34965 TweenPlugin.activate([Plugin]); 34966 return Plugin; 34967 }; 34968 34969 34970 //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you. 34971 a = window._gsQueue; 34972 if (a) { 34973 for (i = 0; i < a.length; i++) { 34974 a[i](); 34975 } 34976 for (p in _defLookup) { 34977 if (!_defLookup[p].func) { 34978 window.console.log("GSAP encountered missing dependency: " + p); 34979 } 34980 } 34981 } 34982 34983 _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated 34984 34985})((typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window, "TweenMax"); 34986/*! 34987 * VERSION: 2.1.2 34988 * DATE: 2019-03-01 34989 * UPDATES AND DOCS AT: http://greensock.com 34990 * 34991 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 34992 * This work is subject to the terms at http://greensock.com/standard-license or for 34993 * Club GreenSock members, the software agreement that was issued with your membership. 34994 * 34995 * @author: Jack Doyle, [email protected] 34996 */ 34997/* eslint-disable */ 34998var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node 34999(_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() { 35000 35001 "use strict"; 35002 35003 _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) { 35004 35005 var TimelineLite = function(vars) { 35006 SimpleTimeline.call(this, vars); 35007 var self = this, 35008 v = self.vars, 35009 val, p; 35010 self._labels = {}; 35011 self.autoRemoveChildren = !!v.autoRemoveChildren; 35012 self.smoothChildTiming = !!v.smoothChildTiming; 35013 self._sortChildren = true; 35014 self._onUpdate = v.onUpdate; 35015 for (p in v) { 35016 val = v[p]; 35017 if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) { 35018 v[p] = self._swapSelfInParams(val); 35019 } 35020 } 35021 if (_isArray(v.tweens)) { 35022 self.add(v.tweens, 0, v.align, v.stagger); 35023 } 35024 }, 35025 _tinyNum = 0.00000001, 35026 TweenLiteInternals = TweenLite._internals, 35027 _internals = TimelineLite._internals = {}, 35028 _isSelector = TweenLiteInternals.isSelector, 35029 _isArray = TweenLiteInternals.isArray, 35030 _lazyTweens = TweenLiteInternals.lazyTweens, 35031 _lazyRender = TweenLiteInternals.lazyRender, 35032 _globals = _gsScope._gsDefine.globals, 35033 _copy = function(vars) { 35034 var copy = {}, p; 35035 for (p in vars) { 35036 copy[p] = vars[p]; 35037 } 35038 return copy; 35039 }, 35040 _applyCycle = function(vars, targets, i) { 35041 var alt = vars.cycle, 35042 p, val; 35043 for (p in alt) { 35044 val = alt[p]; 35045 vars[p] = (typeof(val) === "function") ? val(i, targets[i], targets) : val[i % val.length]; 35046 } 35047 delete vars.cycle; 35048 }, 35049 _pauseCallback = _internals.pauseCallback = function() {}, 35050 _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 35051 var b = [], 35052 l = a.length, 35053 i; 35054 for (i = 0; i !== l; b.push(a[i++])); 35055 return b; 35056 }, 35057 _defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true 35058 var ir = "immediateRender"; 35059 if (!(ir in toVars)) { 35060 toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse); 35061 } 35062 return toVars; 35063 }, 35064 //for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following 35065 _distribute = function(v) { 35066 if (typeof(v) === "function") { 35067 return v; 35068 } 35069 var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all. 35070 ease = vars.ease, 35071 from = vars.from || 0, 35072 base = vars.base || 0, 35073 cache = {}, 35074 isFromKeyword = isNaN(from), 35075 axis = vars.axis, 35076 ratio = {center:0.5, end:1}[from] || 0; 35077 return function(i, target, a) { 35078 var l = (a || vars).length, 35079 distances = cache[l], 35080 originX, originY, x, y, d, j, max, min, wrap; 35081 if (!distances) { 35082 wrap = (vars.grid === "auto") ? 0 : (vars.grid || [Infinity])[0]; 35083 if (!wrap) { 35084 max = -Infinity; 35085 while (max < (max = a[wrap++].getBoundingClientRect().left) && wrap < l) { } 35086 wrap--; 35087 } 35088 distances = cache[l] = []; 35089 originX = isFromKeyword ? (Math.min(wrap, l) * ratio) - 0.5 : from % wrap; 35090 originY = isFromKeyword ? l * ratio / wrap - 0.5 : (from / wrap) | 0; 35091 max = 0; 35092 min = Infinity; 35093 for (j = 0; j < l; j++) { 35094 x = (j % wrap) - originX; 35095 y = originY - ((j / wrap) | 0); 35096 distances[j] = d = !axis ? Math.sqrt(x * x + y * y) : Math.abs((axis === "y") ? y : x); 35097 if (d > max) { 35098 max = d; 35099 } 35100 if (d < min) { 35101 min = d; 35102 } 35103 } 35104 distances.max = max - min; 35105 distances.min = min; 35106 distances.v = l = vars.amount || (vars.each * (wrap >
35106 l ? l : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0; 35107 distances.b = (l < 0) ? base - l : base; 35108 } 35109 l = (distances[i] - distances.min) / distances.max; 35110 return distances.b + (ease ? ease.getRatio(l) : l) * distances.v; 35111 }; 35112 }, 35113 p = TimelineLite.prototype = new SimpleTimeline(); 35114 35115 TimelineLite.version = "2.1.2"; 35116 TimelineLite.distribute = _distribute; 35117 p.constructor = TimelineLite; 35118 p.kill()._gc = p._forcingPlayhead = p._hasPause = false; 35119 35120 /* might use later... 35121 //translates a local time inside an animation to the corresponding time on the root/global timeline, factoring in all nesting and timeScales. 35122 function localToGlobal(time, animation) { 35123 while (animation) { 35124 time = (time / animation._timeScale) + animation._startTime; 35125 animation = animation.timeline; 35126 } 35127 return time; 35128 } 35129 35130 //translates the supplied time on the root/global timeline into the corresponding local time inside a particular animation, factoring in all nesting and timeScales 35131 function globalToLocal(time, animation) { 35132 var scale = 1; 35133 time -= localToGlobal(0, animation); 35134 while (animation) { 35135 scale *= animation._timeScale; 35136 animation = animation.timeline; 35137 } 35138 return time * scale; 35139 } 35140 */ 35141 35142 p.to = function(target, duration, vars, position) { 35143 var Engine = (vars.repeat && _globals.TweenMax) || TweenLite; 35144 return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position); 35145 }; 35146 35147 p.from = function(target, duration, vars, position) { 35148 return this.add( ((vars.repeat && _globals.TweenMax) || TweenLite).from(target, duration, _defaultImmediateRender(this, vars)), position); 35149 }; 35150 35151 p.fromTo = function(target, duration, fromVars, toVars, position) { 35152 var Engine = (toVars.repeat && _globals.TweenMax) || TweenLite; 35153 toVars = _defaultImmediateRender(this, toVars, fromVars); 35154 return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position); 35155 }; 35156 35157 p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 35158 var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, callbackScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}), 35159 staggerFunc = _distribute(vars.stagger || stagger), 35160 startAt = vars.startAt, 35161 cycle = vars.cycle, 35162 copy, i; 35163 if (typeof(targets) === "string") { 35164 targets = TweenLite.selector(targets) || targets; 35165 } 35166 targets = targets || []; 35167 if (_isSelector(targets)) { //if the targets object is a selector, translate it into an array. 35168 targets = _slice(targets); 35169 } 35170 for (i = 0; i < targets.length; i++) { 35171 copy = _copy(vars); 35172 if (startAt) { 35173 copy.startAt = _copy(startAt); 35174 if (startAt.cycle) { 35175 _applyCycle(copy.startAt, targets, i); 35176 } 35177 } 35178 if (cycle) { 35179 _applyCycle(copy, targets, i); 35180 if (copy.duration != null) { 35181 duration = copy.duration; 35182 delete copy.duration; 35183 } 35184 } 35185 tl.to(targets[i], duration, copy, staggerFunc(i, targets[i], targets)); 35186 } 35187 return this.add(tl, position); 35188 }; 35189 35190 p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 35191 vars.runBackwards = true; 35192 return this.staggerTo(targets, duration, _defaultImmediateRender(this, vars), stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 35193 }; 35194 35195 p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 35196 toVars.startAt = fromVars; 35197 return this.staggerTo(targets, duration, _defaultImmediateRender(this, toVars, fromVars), stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 35198 }; 35199 35200 p.call = function(callback, params, scope, position) { 35201 return this.add( TweenLite.delayedCall(0, callback, params, scope), position); 35202 }; 35203 35204 p.set = function(target, vars, position) { 35205 return this.add( new TweenLite(target, 0, _defaultImmediateRender(this, vars, null, true)), position); 35206 }; 35207 35208 TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) { 35209 vars = vars || {}; 35210 if (vars.smoothChildTiming == null) { 35211 vars.smoothChildTiming = true; 35212 } 35213 var tl = new TimelineLite(vars), 35214 root = tl._timeline, 35215 hasNegativeStart, time, tween, next; 35216 if (ignoreDelayedCalls == null) { 35217 ignoreDelayedCalls = true; 35218 } 35219 root._remove(tl, true); 35220 tl._startTime = 0; 35221 tl._rawPrevTime = tl._time = tl._totalTime = root._time; 35222 tween = root._first; 35223 while (tween) { 35224 next = tween._next; 35225 if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) { 35226 time = tween._startTime - tween._delay; 35227 if (time < 0) { 35228 hasNegativeStart = 1; 35229 } 35230 tl.add(tween, time); 35231 } 35232 tween = next; 35233 } 35234 root.add(tl, 0); 35235 if (hasNegativeStart) { //calling totalDuration() will force the adjustment necessary to shift the children forward so none of them start before zero, and moves the timeline backwards the same amount, so the playhead is still aligned where it should be globally, but the timeline doesn't have illegal children that start before zero. 35236 tl.totalDuration(); 35237 } 35238 return tl; 35239 }; 35240 35241 p.add = function(value, position, align, stagger) { 35242 var self = this, 35243 curTime, l, i, child, tl, beforeRawTime; 35244 if (typeof(position) !== "number") { 35245 position = self._parseTimeOrLabel(position, 0, true, value); 35246 } 35247 if (!(value instanceof Animation)) { 35248 if ((value instanceof Array) || (value && value.push && _isArray(value))) {
35249 align = align || "normal"; 35250 stagger = stagger || 0; 35251 curTime = position; 35252 l = value.length; 35253 for (i = 0; i < l; i++) { 35254 if (_isArray(child = value[i])) { 35255 child = new TimelineLite({tweens:child}); 35256 } 35257 self.add(child, curTime); 35258 if (typeof(child) !== "string" && typeof(child) !== "function") { 35259 if (align === "sequence") { 35260 curTime = child._startTime + (child.totalDuration() / child._timeScale); 35261 } else if (align === "start") { 35262 child._startTime -= child.delay(); 35263 } 35264 } 35265 curTime += stagger; 35266 } 35267 return self._uncache(true); 35268 } else if (typeof(value) === "string") { 35269 return self.addLabel(value, position); 35270 } else if (typeof(value) === "function") { 35271 value = TweenLite.delayedCall(0, value); 35272 } else { 35273 throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string."); 35274 } 35275 } 35276 35277 SimpleTimeline.prototype.add.call(self, value, position); 35278 35279 if (value._time || (!value._duration && value._initted)) { //in case, for example, the _startTime is moved on a tween that has already rendered. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning. 35280 curTime = (self.rawTime() - value._startTime) * value._timeScale; 35281 if (!value._duration || Math.abs(Math.max(0, Math.min(value.totalDuration(), curTime))) - value._totalTime > 0.00001) { 35282 value.render(curTime, false, false); 35283 } 35284 } 35285 35286 //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate. 35287 if (self._gc || self._time === self._duration) if (!self._paused) if (self._duration < self.duration()) { 35288 //in case any of the ancestors had completed but should now be enabled... 35289 tl = self; 35290 beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect. 35291 while (tl._timeline) { 35292 if (beforeRawTime && tl._timeline.smoothChildTiming) { 35293 tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it. 35294 } else if (tl._gc) { 35295 tl._enabled(true, false); 35296 } 35297 tl = tl._timeline; 35298 } 35299 } 35300 35301 return self; 35302 }; 35303 35304 p.remove = function(value) { 35305 if (value instanceof Animation) { 35306 this._remove(value, false); 35307 var tl = value._timeline = value.vars.useFrames ? Animation._rootFramesTimeline : Animation._rootTimeline; //now that it's removed, default it to the root timeline so that if it gets played again, it doesn't jump back into this timeline. 35308 value._startTime = (value._paused ? value._pauseTime : tl._time) - ((!value._reversed ? value._totalTime : value.totalDuration() - value._totalTime) / value._timeScale); //ensure that if it gets played again, the timing is correct. 35309 return this; 35310 } else if (value instanceof Array || (value && value.push && _isArray(value))) { 35311 var i = value.length; 35312 while (--i > -1) { 35313 this.remove(value[i]); 35314 } 35315 return this; 35316 } else if (typeof(value) === "string") { 35317 return this.removeLabel(value); 35318 } 35319 return this.kill(null, value); 35320 }; 35321 35322 p._remove = function(tween, skipDisable) { 35323 SimpleTimeline.prototype._remove.call(this, tween, skipDisable); 35324 var last = this._last; 35325 if (!last) { 35326 this._time = this._totalTime = this._duration = this._totalDuration = 0; 35327 } else if (this._time > this.duration()) { 35328 this._time = this._duration; 35329 this._totalTime = this._totalDuration; 35330 } 35331 return this; 35332 }; 35333 35334 p.append = function(value, offsetOrLabel) { 35335 return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value)); 35336 }; 35337 35338 p.insert = p.insertMultiple = function(value, position, align, stagger) { 35339 return this.add(value, position || 0, align, stagger); 35340 }; 35341 35342 p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) { 35343 return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger); 35344 }; 35345 35346 p.addLabel = function(label, position) { 35347 this._labels[label] = this._parseTimeOrLabel(position); 35348 return this; 35349 }; 35350 35351 p.addPause = function(position, callback, params, scope) { 35352 var t = TweenLite.delayedCall(0, _pauseCallback, params, scope || this); 35353 t.vars.onComplete = t.vars.onReverseComplete = callback;
35354 t.data = "isPause"; 35355 this._hasPause = true; 35356 return this.add(t, position); 35357 }; 35358 35359 p.removeLabel = function(label) { 35360 delete this._labels[label]; 35361 return this; 35362 }; 35363 35364 p.getLabelTime = function(label) { 35365 return (this._labels[label] != null) ? this._labels[label] : -1; 35366 }; 35367 35368 p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) { 35369 var clippedDuration, i; 35370 //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration(). 35371 if (ignore instanceof Animation && ignore.timeline === this) { 35372 this.remove(ignore); 35373 } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) { 35374 i = ignore.length; 35375 while (--i > -1) { 35376 if (ignore[i] instanceof Animation && ignore[i].timeline === this) { 35377 this.remove(ignore[i]); 35378 } 35379 } 35380 } 35381 clippedDuration = (typeof(timeOrLabel) === "number" && !offsetOrLabel) ? 0 : (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead. 35382 if (typeof(offsetOrLabel) === "string") { 35383 return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - clippedDuration : 0, appendIfAbsent); 35384 } 35385 offsetOrLabel = offsetOrLabel || 0; 35386 if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value). 35387 i = timeOrLabel.indexOf("="); 35388 if (i === -1) { 35389 if (this._labels[timeOrLabel] == null) { 35390 return appendIfAbsent ? (this._labels[timeOrLabel] = clippedDuration + offsetOrLabel) : offsetOrLabel; 35391 } 35392 return this._labels[timeOrLabel] + offsetOrLabel; 35393 } 35394 offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1)); 35395 timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : clippedDuration; 35396 } else if (timeOrLabel == null) { 35397 timeOrLabel = clippedDuration; 35398 } 35399 return Number(timeOrLabel) + offsetOrLabel; 35400 }; 35401 35402 p.seek = function(position, suppressEvents) { 35403 return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false)); 35404 }; 35405 35406 p.stop = function() { 35407 return this.paused(true); 35408 }; 35409 35410 p.gotoAndPlay = function(position, suppressEvents) { 35411 return this.play(position, suppressEvents); 35412 }; 35413 35414 p.gotoAndStop = function(position, suppressEvents) { 35415 return this.pause(position, suppressEvents); 35416 }; 35417 35418 p.render = function(time, suppressEvents, force) { 35419 if (this._gc) { 35420 this._enabled(true, false); 35421 } 35422 var self = this, 35423 prevTime = self._time, 35424 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 35425 prevStart = self._startTime, 35426 prevTimeScale = self._timeScale, 35427 prevPaused = self._paused, 35428 tween, isComplete, next, callback, internalForce, pauseTween, curTime, pauseTime; 35429 if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump). 35430 time += self._time - prevTime; 35431 } 35432 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 35433 self._totalTime = self._time = totalDur; 35434 if (!self._reversed) if (!self._hasPausedChild()) { 35435 isComplete = true; 35436 callback = "onComplete"; 35437 internalForce = !!self._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 35438 if (self._duration === 0) if ((time <= 0 && time >= -_tinyNum) || self._rawPrevTime < 0 || self._rawPrevTime === _tinyNum) if (self._rawPrevTime !== time && self._first) { 35439 internalForce = true; 35440 if (self._rawPrevTime > _tinyNum) { 35441 callback = "onReverseComplete"; 35442 } 35443 } 35444 } 35445 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 35446 time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. 35447 35448 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 35449 self._totalTime = self._time = 0; 35450 if (time > -_tinyNum) { 35451 time = 0; 35452 } 35453 if (prevTime !== 0 || (self._duration === 0 && self._rawPrevTime !== _tinyNum && (self._rawPrevTime > 0 || (time < 0 && self._rawPrevTime >= 0)))) { 35454 callback = "onReverseComplete"; 35455 isComplete = self._reversed; 35456 } 35457 if (time < 0) { 35458 self._active = false;
35459 if (self._timeline.autoRemoveChildren && self._reversed) { //ensures proper GC if a timeline is resumed after it's finished reversing. 35460 internalForce = isComplete = true; 35461 callback = "onReverseComplete"; 35462 } else if (self._rawPrevTime >= 0 && self._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state. 35463 internalForce = true; 35464 } 35465 self._rawPrevTime = time; 35466 } else { 35467 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 35468 if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good). 35469 tween = self._first; 35470 while (tween && tween._startTime === 0) { 35471 if (!tween._duration) { 35472 isComplete = false; 35473 } 35474 tween = tween._next; 35475 } 35476 } 35477 time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline) 35478 if (!self._initted) { 35479 internalForce = true; 35480 } 35481 } 35482 35483 } else { 35484 35485 if (self._hasPause && !self._forcingPlayhead && !suppressEvents) { 35486 if (time >= prevTime) { 35487 tween = self._first; 35488 while (tween && tween._startTime <= time && !pauseTween) { 35489 if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) { 35490 pauseTween = tween; 35491 } 35492 tween = tween._next; 35493 } 35494 } else { 35495 tween = self._last; 35496 while (tween && tween._startTime >= time && !pauseTween) { 35497 if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) { 35498 pauseTween = tween; 35499 } 35500 tween = tween._prev; 35501 } 35502 } 35503 if (pauseTween) { 35504 self._time = self._totalTime = time = pauseTween._startTime; 35505 pauseTime = self._startTime + (time / self._timeScale); 35506 } 35507 } 35508 35509 self._totalTime = self._time = self._rawPrevTime = time; 35510 } 35511 if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) { 35512 return; 35513 } else if (!self._initted) { 35514 self._initted = true; 35515 } 35516 35517 if (!self._active) if (!self._paused && self._time !== prevTime && time > 0) { 35518 self._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example. 35519 } 35520 35521 if (prevTime === 0) if (self.vars.onStart) if (self._time !== 0 || !self._duration) if (!suppressEvents) { 35522 self._callback("onStart"); 35523 } 35524 35525 curTime = self._time; 35526 if (curTime >= prevTime) { 35527 tween = self._first; 35528 while (tween) { 35529 next = tween._next; //record it here because the value could change after rendering... 35530 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 35531 break; 35532 } else if (tween._active || (tween._startTime <= curTime && !tween._paused && !tween._gc)) { 35533 if (pauseTween === tween) { 35534 self.pause(); 35535 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 35536 } 35537 if (!tween._reversed) { 35538 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 35539 } else { 35540 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 35541 } 35542 } 35543 tween = next; 35544 } 35545 } else { 35546 tween = self._last; 35547 while (tween) { 35548 next = tween._prev; //record it here because the value could change after rendering... 35549 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 35550 break; 35551 } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) { 35552 if (pauseTween === tween) { 35553 pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse. 35554 while (pauseTween && pauseTween.endTime() > self._time) { 35555 pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force); 35556 pauseTween = pauseTween._prev; 35557 } 35558 pauseTween = null; 35559 self.pause(); 35560 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 35561 } 35562 if (!tween._reversed) { 35563 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 35564 } else { 35565 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 35566 } 35567 } 35568 tween = next; 35569 } 35570 } 35571 35572 if (self._onUpdate) if (!suppressEvents) { 35573 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. 35574 _lazyRender(); 35575 }
35576 self._callback("onUpdate"); 35577 } 35578 35579 if (callback) if (!self._gc) if (prevStart === self._startTime || prevTimeScale !== self._timeScale) if (self._time === 0 || totalDur >= self.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate 35580 if (isComplete) { 35581 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values. 35582 _lazyRender(); 35583 } 35584 if (self._timeline.autoRemoveChildren) { 35585 self._enabled(false, false); 35586 } 35587 self._active = false; 35588 } 35589 if (!suppressEvents && self.vars[callback]) { 35590 self._callback(callback); 35591 } 35592 } 35593 }; 35594 35595 p._hasPausedChild = function() { 35596 var tween = this._first; 35597 while (tween) { 35598 if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) { 35599 return true; 35600 } 35601 tween = tween._next; 35602 } 35603 return false; 35604 }; 35605 35606 p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) { 35607 ignoreBeforeTime = ignoreBeforeTime || -9999999999; 35608 var a = [], 35609 tween = this._first, 35610 cnt = 0; 35611 while (tween) { 35612 if (tween._startTime < ignoreBeforeTime) { 35613 //do nothing 35614 } else if (tween instanceof TweenLite) { 35615 if (tweens !== false) { 35616 a[cnt++] = tween; 35617 } 35618 } else { 35619 if (timelines !== false) { 35620 a[cnt++] = tween; 35621 } 35622 if (nested !== false) { 35623 a = a.concat(tween.getChildren(true, tweens, timelines)); 35624 cnt = a.length; 35625 } 35626 } 35627 tween = tween._next; 35628 } 35629 return a; 35630 }; 35631 35632 p.getTweensOf = function(target, nested) { 35633 var disabled = this._gc, 35634 a = [], 35635 cnt = 0, 35636 tweens, i; 35637 if (disabled) { 35638 this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here. 35639 } 35640 tweens = TweenLite.getTweensOf(target); 35641 i = tweens.length; 35642 while (--i > -1) { 35643 if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) { 35644 a[cnt++] = tweens[i]; 35645 } 35646 } 35647 if (disabled) { 35648 this._enabled(false, true); 35649 } 35650 return a; 35651 }; 35652 35653 p.recent = function() { 35654 return this._recent; 35655 }; 35656 35657 p._contains = function(tween) { 35658 var tl = tween.timeline; 35659 while (tl) { 35660 if (tl === this) { 35661 return true; 35662 } 35663 tl = tl.timeline; 35664 } 35665 return false; 35666 }; 35667 35668 p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) { 35669 ignoreBeforeTime = ignoreBeforeTime || 0; 35670 var tween = this._first, 35671 labels = this._labels, 35672 p; 35673 while (tween) { 35674 if (tween._startTime >= ignoreBeforeTime) { 35675 tween._startTime += amount; 35676 } 35677 tween = tween._next; 35678 }
35679 if (adjustLabels) { 35680 for (p in labels) { 35681 if (labels[p] >= ignoreBeforeTime) { 35682 labels[p] += amount; 35683 } 35684 } 35685 } 35686 return this._uncache(true); 35687 }; 35688 35689 p._kill = function(vars, target) { 35690 if (!vars && !target) { 35691 return this._enabled(false, false); 35692 } 35693 var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target), 35694 i = tweens.length, 35695 changed = false; 35696 while (--i > -1) { 35697 if (tweens[i]._kill(vars, target)) { 35698 changed = true; 35699 } 35700 } 35701 return changed; 35702 }; 35703 35704 p.clear = function(labels) { 35705 var tweens = this.getChildren(false, true, true), 35706 i = tweens.length; 35707 this._time = this._totalTime = 0; 35708 while (--i > -1) { 35709 tweens[i]._enabled(false, false); 35710 } 35711 if (labels !== false) { 35712 this._labels = {}; 35713 } 35714 return this._uncache(true); 35715 }; 35716 35717 p.invalidate = function() { 35718 var tween = this._first; 35719 while (tween) { 35720 tween.invalidate(); 35721 tween = tween._next; 35722 } 35723 return Animation.prototype.invalidate.call(this);; 35724 }; 35725 35726 p._enabled = function(enabled, ignoreTimeline) { 35727 if (enabled === this._gc) { 35728 var tween = this._first; 35729 while (tween) { 35730 tween._enabled(enabled, true); 35731 tween = tween._next; 35732 } 35733 } 35734 return SimpleTimeline.prototype._enabled.call(this, enabled, ignoreTimeline); 35735 }; 35736 35737 p.totalTime = function(time, suppressEvents, uncapped) { 35738 this._forcingPlayhead = true; 35739 var val = Animation.prototype.totalTime.apply(this, arguments); 35740 this._forcingPlayhead = false; 35741 return val; 35742 }; 35743 35744 p.duration = function(value) { 35745 if (!arguments.length) { 35746 if (this._dirty) { 35747 this.totalDuration(); //just triggers recalculation 35748 } 35749 return this._duration; 35750 } 35751 if (this.duration() !== 0 && value !== 0) { 35752 this.timeScale(this._duration / value); 35753 } 35754 return this; 35755 }; 35756 35757 p.totalDuration = function(value) { 35758 if (!arguments.length) { 35759 if (this._dirty) { 35760 var max = 0, 35761 self = this, 35762 tween = self._last, 35763 prevStart = 999999999999, 35764 prev, end; 35765 while (tween) { 35766 prev = tween._prev; //record it here in case the tween changes position in the sequence... 35767 if (tween._dirty) { 35768 tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it. 35769 } 35770 if (tween._startTime > prevStart && self._sortChildren && !tween._paused && !self._calculatingDuration) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence 35771 self._calculatingDuration = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(), like _parseTimeOrLabel(). 35772 self.add(tween, tween._startTime - tween._delay); 35773 self._calculatingDuration = 0; 35774 } else { 35775 prevStart = tween._startTime; 35776 } 35777 if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found. 35778 max -= tween._startTime; 35779 if (self._timeline.smoothChildTiming) { 35780 self._startTime += tween._startTime / self._timeScale; 35781 self._time -= tween._startTime; 35782 self._totalTime -= tween._startTime; 35783 self._rawPrevTime -= tween._startTime; 35784 } 35785 self.shiftChildren(-tween._startTime, false, -9999999999); 35786 prevStart = 0; 35787 } 35788 end = tween._startTime + (tween._totalDuration / tween._timeScale); 35789 if (end > max) { 35790 max = end; 35791 } 35792 tween = prev; 35793 } 35794 self._duration = self._totalDuration = max; 35795 self._dirty = false; 35796 } 35797 return this._totalDuration; 35798 } 35799 return (value && this.totalDuration()) ? this.timeScale(this._totalDuration / value) : this; 35800 }; 35801 35802 p.paused = function(value) { 35803 if (value === false && this._paused) { //if there's a pause directly at the spot from where we're unpausing, skip it. 35804 var tween = this._first; 35805 while (tween) { 35806 if (tween._startTime === this._time && tween.data === "isPause") { 35807 tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire. 35808 } 35809 tween = tween._next; 35810 } 35811 } 35812 return Animation.prototype.paused.apply(this, arguments); 35813 }; 35814 35815 p.usesFrames = function() { 35816 var tl = this._timeline; 35817 while (tl._timeline) { 35818 tl = tl._timeline; 35819 } 35820 return (tl === Animation._rootFramesTimeline); 35821 }; 35822 35823 p.rawTime = function(wrapRepeats) { 35824 return (wrapRepeats && (this._paused || (this._repeat && this.time() > 0 && this.totalProgress() < 1))) ? this._totalTime % (this._duration + this._repeatDelay) : this._paused ? this._totalTime : (this._timeline.rawTime(wrapRepeats) - this._startTime) * this._timeScale; 35825 }; 35826 35827 return TimelineLite; 35828 35829 }, true); 35830 35831 35832}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } 35833 35834//export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date) 35835(function(name) { 35836 "use strict"; 35837 var getGlobal = function() { 35838 return (_gsScope.GreenSockGlobals || _gsScope)[name]; 35839 }; 35840 if (typeof(module) !== "undefined" && module.exports) { //node 35841 require("./TweenLite.js"); //dependency 35842 module.exports = getGlobal(); 35843 } else if (typeof(define) === "function" && define.amd) { //AMD 35844 define(["TweenLite"], getGlobal); 35845 } 35846}("TimelineLite")); 35847 35848/*! 35849 * VERSION: 2.1.2 35850 * DATE: 2019-03-01 35851 * UPDATES AND DOCS AT: http://greensock.com 35852 * 35853 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 35854 * This work is subject to the terms at http://greensock.com/standard-license or for
35855 * Club GreenSock members, the software agreement that was issued with your membership. 35856 * 35857 * @author: Jack Doyle, [email protected] 35858 */ 35859/* eslint-disable */ 35860var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node 35861(_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() { 35862 35863 "use strict"; 35864 35865 _gsScope._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function(TimelineLite, TweenLite, Ease) { 35866 35867 var TimelineMax = function(vars) { 35868 TimelineLite.call(this, vars); 35869 this._repeat = this.vars.repeat || 0; 35870 this._repeatDelay = this.vars.repeatDelay || 0; 35871 this._cycle = 0; 35872 this._yoyo = !!this.vars.yoyo; 35873 this._dirty = true; 35874 }, 35875 _tinyNum = 0.00000001, 35876 TweenLiteInternals = TweenLite._internals, 35877 _lazyTweens = TweenLiteInternals.lazyTweens, 35878 _lazyRender = TweenLiteInternals.lazyRender, 35879 _globals = _gsScope._gsDefine.globals, 35880 _easeNone = new Ease(null, null, 1, 0), 35881 p = TimelineMax.prototype = new TimelineLite(); 35882 35883 p.constructor = TimelineMax; 35884 p.kill()._gc = false; 35885 TimelineMax.version = "2.1.2"; 35886 35887 p.invalidate = function() { 35888 this._yoyo = !!this.vars.yoyo; 35889 this._repeat = this.vars.repeat || 0; 35890 this._repeatDelay = this.vars.repeatDelay || 0; 35891 this._uncache(true); 35892 return TimelineLite.prototype.invalidate.call(this); 35893 }; 35894 35895 p.addCallback = function(callback, position, params, scope) { 35896 return this.add( TweenLite.delayedCall(0, callback, params, scope), position); 35897 }; 35898 35899 p.removeCallback = function(callback, position) { 35900 if (callback) { 35901 if (position == null) { 35902 this._kill(null, callback); 35903 } else { 35904 var a = this.getTweensOf(callback, false), 35905 i = a.length, 35906 time = this._parseTimeOrLabel(position); 35907 while (--i > -1) { 35908 if (a[i]._startTime === time) { 35909 a[i]._enabled(false, false); 35910 } 35911 } 35912 } 35913 } 35914 return this; 35915 }; 35916 35917 p.removePause = function(position) { 35918 return this.removeCallback(TimelineLite._internals.pauseCallback, position); 35919 }; 35920 35921 p.tweenTo = function(position, vars) { 35922 vars = vars || {}; 35923 var copy = {ease:_easeNone, useFrames:this.usesFrames(), immediateRender:false, lazy:false}, 35924 Engine = (vars.repeat && _globals.TweenMax) || TweenLite, 35925 duration, p, t; 35926 for (p in vars) { 35927 copy[p] = vars[p]; 35928 } 35929 copy.time = this._parseTimeOrLabel(position); 35930 duration = (Math.abs(Number(copy.time) - this._time) / this._timeScale) || 0.001; 35931 t = new Engine(this, duration, copy); 35932 copy.onStart = function() { 35933 t.target.paused(true); 35934 if (t.vars.time !== t.target.time() && duration === t.duration() && !t.isFromTo) { //don't make the duration zero - if it's supposed to be zero, don't worry because it's already initting the tween and will complete immediately, effectively making the duration zero anyway. If we make duration zero, the tween won't run at all. 35935 t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale ).render(t.time(), true, true); //render() right away to ensure that things look right, especially in the case of .tweenTo(0). 35936 } 35937 if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it. 35938 vars.onStart.apply(vars.onStartScope || vars.callbackScope || t, vars.onStartParams || []); //don't use t._callback("onStart") or it'll point to the copy.onStart and we'll get a recursion error. 35939 } 35940 }; 35941 return t; 35942 }; 35943 35944 p.tweenFromTo = function(fromPosition, toPosition, vars) { 35945 vars = vars || {}; 35946 fromPosition = this._parseTimeOrLabel(fromPosition); 35947 vars.startAt = {onComplete:this.seek, onCompleteParams:[fromPosition], callbackScope:this}; 35948 vars.immediateRender = (vars.immediateRender !== false); 35949 var t = this.tweenTo(toPosition, vars); 35950 t.isFromTo = 1; //to ensure we don't mess with the duration in the onStart (we've got the start and end values here, so lock it in) 35951 return t.duration((Math.abs( t.vars.time - fromPosition) / this._timeScale) || 0.001); 35952 }; 35953
35954 p.render = function(time, suppressEvents, force) { 35955 if (this._gc) { 35956 this._enabled(true, false); 35957 } 35958 var self = this, 35959 prevTime = self._time, 35960 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 35961 dur = self._duration, 35962 prevTotalTime = self._totalTime, 35963 prevStart = self._startTime, 35964 prevTimeScale = self._timeScale, 35965 prevRawPrevTime = self._rawPrevTime, 35966 prevPaused = self._paused, 35967 prevCycle = self._cycle, 35968 tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime, pauseTime; 35969 if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump). 35970 time += self._time - prevTime; 35971 } 35972 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 35973 if (!self._locked) { 35974 self._totalTime = totalDur; 35975 self._cycle = self._repeat; 35976 } 35977 if (!self._reversed) if (!self._hasPausedChild()) { 35978 isComplete = true; 35979 callback = "onComplete"; 35980 internalForce = !!self._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 35981 if (self._duration === 0) if ((time <= 0 && time >= -_tinyNum) || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && self._first) { 35982 internalForce = true; 35983 if (prevRawPrevTime > _tinyNum) { 35984 callback = "onReverseComplete"; 35985 } 35986 } 35987 } 35988 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 35989 if (self._yoyo && (self._cycle & 1)) { 35990 self._time = time = 0; 35991 } else { 35992 self._time = dur; 35993 time = dur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. We cannot do less then 0.0001 because the same issue can occur when the duration is extremely large like 999999999999 in which case adding 0.00000001, for example, causes it to act like nothing was added. 35994 } 35995 35996 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 35997 if (!self._locked) { 35998 self._totalTime = self._cycle = 0; 35999 } 36000 self._time = 0; 36001 if (time > -_tinyNum) { 36002 time = 0; 36003 } 36004 if (prevTime !== 0 || (dur === 0 && prevRawPrevTime !== _tinyNum && (prevRawPrevTime > 0 || (time < 0 && prevRawPrevTime >= 0)) && !self._locked)) { //edge case for checking time < 0 && prevRawPrevTime >= 0: a zero-duration fromTo() tween inside a zero-duration timeline (yeah, very rare) 36005 callback = "onReverseComplete"; 36006 isComplete = self._reversed; 36007 } 36008 if (time < 0) { 36009 self._active = false;
36010 if (self._timeline.autoRemoveChildren && self._reversed) { 36011 internalForce = isComplete = true; 36012 callback = "onReverseComplete"; 36013 } else if (prevRawPrevTime >= 0 && self._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state. 36014 internalForce = true; 36015 } 36016 self._rawPrevTime = time; 36017 } else { 36018 self._rawPrevTime = (dur || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 36019 if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good). 36020 tween = self._first; 36021 while (tween && tween._startTime === 0) { 36022 if (!tween._duration) { 36023 isComplete = false; 36024 } 36025 tween = tween._next; 36026 } 36027 } 36028 time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline) 36029 if (!self._initted) { 36030 internalForce = true; 36031 } 36032 } 36033 36034 } else { 36035 if (dur === 0 && prevRawPrevTime < 0) { //without this, zero-duration repeating timelines (like with a simple callback nested at the very beginning and a repeatDelay) wouldn't render the first time through. 36036 internalForce = true; 36037 } 36038 self._time = self._rawPrevTime = time; 36039 if (!self._locked) { 36040 self._totalTime = time; 36041 if (self._repeat !== 0) { 36042 cycleDuration = dur + self._repeatDelay; 36043 self._cycle = (self._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!) 36044 if (self._cycle) if (self._cycle === self._totalTime / cycleDuration && prevTotalTime <= time) { 36045 self._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning) 36046 } 36047 self._time = self._totalTime - (self._cycle * cycleDuration); 36048 if (self._yoyo) if (self._cycle & 1) { 36049 self._time = dur - self._time; 36050 } 36051 if (self._time > dur) { 36052 self._time = dur; 36053 time = dur + 0.0001; //to avoid occasional floating point rounding error 36054 } else if (self._time < 0) { 36055 self._time = time = 0; 36056 } else { 36057 time = self._time; 36058 } 36059 } 36060 } 36061 36062 if (self._hasPause && !self._forcingPlayhead && !suppressEvents) { 36063 time = self._time; 36064 if (time >= prevTime || (self._repeat && prevCycle !== self._cycle)) { 36065 tween = self._first; 36066 while (tween && tween._startTime <= time && !pauseTween) { 36067 if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) { 36068 pauseTween = tween; 36069 } 36070 tween = tween._next; 36071 } 36072 } else { 36073 tween = self._last; 36074 while (tween && tween._startTime >= time && !pauseTween) { 36075 if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) { 36076 pauseTween = tween; 36077 } 36078 tween = tween._prev; 36079 } 36080 } 36081 if (pauseTween) { 36082 pauseTime = self._startTime + (pauseTween._startTime / self._timeScale); 36083 if (pauseTween._startTime < dur) { 36084 self._time = self._rawPrevTime = time = pauseTween._startTime; 36085 self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay)); 36086 } 36087 } 36088 } 36089 36090 } 36091 36092 if (self._cycle !== prevCycle) if (!self._locked) { 36093 /* 36094 make sure children at the end/beginning of the timeline are rendered properly. If, for example, 36095 a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which
36096 would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there 36097 could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So 36098 we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must 36099 ensure that zero-duration tweens at the very beginning or end of the TimelineMax work. 36100 */ 36101 var backwards = (self._yoyo && (prevCycle & 1) !== 0), 36102 wrap = (backwards === (self._yoyo && (self._cycle & 1) !== 0)), 36103 recTotalTime = self._totalTime, 36104 recCycle = self._cycle, 36105 recRawPrevTime = self._rawPrevTime, 36106 recTime = self._time; 36107 36108 self._totalTime = prevCycle * dur; 36109 if (self._cycle < prevCycle) { 36110 backwards = !backwards; 36111 } else { 36112 self._totalTime += dur; 36113 } 36114 self._time = prevTime; //temporarily revert _time so that render() renders the children in the correct order. Without this, tweens won't rewind correctly. We could arhictect things in a "cleaner" way by splitting out the rendering queue into a separate method but for performance reasons, we kept it all inside this method. 36115 36116 self._rawPrevTime = (dur === 0) ? prevRawPrevTime - 0.0001 : prevRawPrevTime; 36117 self._cycle = prevCycle; 36118 self._locked = true; //prevents changes to totalTime and skips repeat/yoyo behavior when we recursively call render() 36119 prevTime = (backwards) ? 0 : dur; 36120 self.render(prevTime, suppressEvents, (dur === 0)); 36121 if (!suppressEvents) if (!self._gc) { 36122 if (self.vars.onRepeat) { 36123 self._cycle = recCycle; //in case the onRepeat alters the playhead or invalidates(), we shouldn't stay locked or use the previous cycle. 36124 self._locked = false; 36125 self._callback("onRepeat"); 36126 } 36127 } 36128 if (prevTime !== self._time) { //in case there's a callback like onComplete in a nested tween/timeline that changes the playhead position, like via seek(), we should just abort. 36129 return; 36130 } 36131 if (wrap) { 36132 self._cycle = prevCycle; //if there's an onRepeat, we reverted this above, so make sure it's set properly again. We also unlocked in that scenario, so reset that too. 36133 self._locked = true; 36134 prevTime = (backwards) ? dur + 0.0001 : -0.0001; 36135 self.render(prevTime, true, false); 36136 } 36137 self._locked = false; 36138 if (self._paused && !prevPaused) { //if the render() triggered callback that paused this timeline, we should abort (very rare, but possible) 36139 return; 36140 } 36141 self._time = recTime; 36142 self._totalTime = recTotalTime; 36143 self._cycle = recCycle; 36144 self._rawPrevTime = recRawPrevTime; 36145 } 36146 36147 if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) { 36148 if (prevTotalTime !== self._totalTime) if (self._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate. 36149 self._callback("onUpdate"); 36150 } 36151 return; 36152 } else if (!self._initted) { 36153 self._initted = true; 36154 } 36155 36156 if (!self._active) if (!self._paused && self._totalTime !== prevTotalTime && time > 0) { 36157 self._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example. 36158 } 36159 36160 if (prevTotalTime === 0) if (self.vars.onStart) if (self._totalTime !== 0 || !self._totalDuration) if (!suppressEvents) { 36161 self._callback("onStart"); 36162 } 36163 36164 curTime = self._time; 36165 if (curTime >= prevTime) { 36166 tween = self._first; 36167 while (tween) { 36168 next = tween._next; //record it here because the value could change after rendering... 36169 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 36170 break; 36171 } else if (tween._active || (tween._startTime <= self._time && !tween._paused && !tween._gc)) { 36172 if (pauseTween === tween) { 36173 self.pause(); 36174 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 36175 } 36176 if (!tween._reversed) { 36177 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 36178 } else { 36179 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 36180 } 36181 } 36182 tween = next; 36183 } 36184 } else { 36185 tween = self._last; 36186 while (tween) { 36187 next = tween._prev; //record it here because the value could change after rendering... 36188 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 36189 break; 36190 } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) { 36191 if (pauseTween === tween) { 36192 pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse. 36193 while (pauseTween && pauseTween.endTime() > self._time) { 36194 pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force); 36195 pauseTween = pauseTween._prev; 36196 } 36197 pauseTween = null; 36198 self.pause(); 36199 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 36200 } 36201 if (!tween._reversed) { 36202 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 36203 } else { 36204 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 36205 } 36206 } 36207 tween = next; 36208 } 36209 } 36210 36211 if (self._onUpdate) if (!suppressEvents) { 36212 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. 36213 _lazyRender(); 36214 }
36215 self._callback("onUpdate"); 36216 } 36217 if (callback) if (!self._locked) if (!self._gc) if (prevStart === self._startTime || prevTimeScale !== self._timeScale) if (self._time === 0 || totalDur >= self.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate 36218 if (isComplete) { 36219 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values. 36220 _lazyRender(); 36221 } 36222 if (self._timeline.autoRemoveChildren) { 36223 self._enabled(false, false); 36224 } 36225 self._active = false; 36226 } 36227 if (!suppressEvents && self.vars[callback]) { 36228 self._callback(callback); 36229 } 36230 } 36231 }; 36232 36233 p.getActive = function(nested, tweens, timelines) { 36234 var a = [], 36235 all = this.getChildren(nested || (nested == null), tweens || (nested == null), !!timelines), 36236 cnt = 0, 36237 l = all.length, 36238 i, tween; 36239 for (i = 0; i < l; i++) { 36240 tween = all[i]; 36241 if (tween.isActive()) { 36242 a[cnt++] = tween; 36243 } 36244 } 36245 return a; 36246 }; 36247 36248 36249 p.getLabelAfter = function(time) { 36250 if (!time) if (time !== 0) { //faster than isNan() 36251 time = this._time; 36252 } 36253 var labels = this.getLabelsArray(), 36254 l = labels.length, 36255 i; 36256 for (i = 0; i < l; i++) { 36257 if (labels[i].time > time) { 36258 return labels[i].name; 36259 } 36260 } 36261 return null; 36262 }; 36263 36264 p.getLabelBefore = function(time) { 36265 if (time == null) { 36266 time = this._time; 36267 } 36268 var labels = this.getLabelsArray(), 36269 i = labels.length; 36270 while (--i > -1) { 36271 if (labels[i].time < time) { 36272 return labels[i].name; 36273 } 36274 } 36275 return null; 36276 }; 36277 36278 p.getLabelsArray = function() { 36279 var a = [], 36280 cnt = 0, 36281 p; 36282 for (p in this._labels) { 36283 a[cnt++] = {time:this._labels[p], name:p}; 36284 } 36285 a.sort(function(a,b) { 36286 return a.time - b.time; 36287 }); 36288 return a; 36289 }; 36290 36291 p.invalidate = function() { 36292 this._locked = false; //unlock and set cycle in case invalidate() is called from inside an onRepeat 36293 return TimelineLite.prototype.invalidate.call(this); 36294 }; 36295 36296 36297//---- GETTERS / SETTERS ------------------------------------------------------------------------------------------------------- 36298 36299 p.progress = function(value, suppressEvents) { 36300 return (!arguments.length) ? (this._time / this.duration()) || 0 : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents); 36301 }; 36302 36303 p.totalProgress = function(value, suppressEvents) { 36304 return (!arguments.length) ? (this._totalTime / this.totalDuration()) || 0 : this.totalTime( this.totalDuration() * value, suppressEvents); 36305 }; 36306 36307 p.totalDuration = function(value) { 36308 if (!arguments.length) { 36309 if (this._dirty) { 36310 TimelineLite.prototype.totalDuration.call(this); //just forces refresh 36311 //Instead of Infinity, we use 999999999999 so that we can accommodate reverses. 36312 this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat); 36313 } 36314 return this._totalDuration; 36315 } 36316 return (this._repeat === -1 || !value) ? this : this.timeScale( this.totalDuration() / value ); 36317 }; 36318 36319 p.time = function(value, suppressEvents) { 36320 if (!arguments.length) { 36321 return this._time; 36322 } 36323 if (this._dirty) { 36324 this.totalDuration(); 36325 } 36326 var duration = this._duration, 36327 cycle = this._cycle, 36328 cycleDur = cycle * (duration + this._repeatDelay); 36329 if (value > duration) { 36330 value = duration; 36331 } 36332 return this.totalTime((this._yoyo && (cycle & 1)) ? duration - value + cycleDur : this._repeat ? value + cycleDur : value, suppressEvents); 36333 }; 36334
36335 p.repeat = function(value) { 36336 if (!arguments.length) { 36337 return this._repeat; 36338 } 36339 this._repeat = value; 36340 return this._uncache(true); 36341 }; 36342 36343 p.repeatDelay = function(value) { 36344 if (!arguments.length) { 36345 return this._repeatDelay; 36346 } 36347 this._repeatDelay = value; 36348 return this._uncache(true); 36349 }; 36350 36351 p.yoyo = function(value) { 36352 if (!arguments.length) { 36353 return this._yoyo; 36354 } 36355 this._yoyo = value; 36356 return this; 36357 }; 36358 36359 p.currentLabel = function(value) { 36360 if (!arguments.length) { 36361 return this.getLabelBefore(this._time + _tinyNum); 36362 } 36363 return this.seek(value, true); 36364 }; 36365 36366 return TimelineMax; 36367 36368 }, true); 36369 36370 36371 36372 36373 36374 36375 36376/* 36377 * ---------------------------------------------------------------- 36378 * TimelineLite 36379 * ---------------------------------------------------------------- 36380 */ 36381 36382 _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) { 36383 36384 var TimelineLite = function(vars) { 36385 SimpleTimeline.call(this, vars); 36386 var self = this, 36387 v = self.vars, 36388 val, p; 36389 self._labels = {}; 36390 self.autoRemoveChildren = !!v.autoRemoveChildren; 36391 self.smoothChildTiming = !!v.smoothChildTiming; 36392 self._sortChildren = true; 36393 self._onUpdate = v.onUpdate; 36394 for (p in v) { 36395 val = v[p]; 36396 if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) { 36397 v[p] = self._swapSelfInParams(val); 36398 } 36399 } 36400 if (_isArray(v.tweens)) { 36401 self.add(v.tweens, 0, v.align, v.stagger); 36402 } 36403 }, 36404 _tinyNum = 0.00000001, 36405 TweenLiteInternals = TweenLite._internals, 36406 _internals = TimelineLite._internals = {}, 36407 _isSelector = TweenLiteInternals.isSelector, 36408 _isArray = TweenLiteInternals.isArray, 36409 _lazyTweens = TweenLiteInternals.lazyTweens, 36410 _lazyRender = TweenLiteInternals.lazyRender, 36411 _globals = _gsScope._gsDefine.globals, 36412 _copy = function(vars) { 36413 var copy = {}, p; 36414 for (p in vars) { 36415 copy[p] = vars[p]; 36416 } 36417 return copy; 36418 }, 36419 _applyCycle = function(vars, targets, i) { 36420 var alt = vars.cycle, 36421 p, val; 36422 for (p in alt) { 36423 val = alt[p]; 36424 vars[p] = (typeof(val) === "function") ? val(i, targets[i], targets) : val[i % val.length]; 36425 } 36426 delete vars.cycle; 36427 }, 36428 _pauseCallback = _internals.pauseCallback = function() {}, 36429 _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 36430 var b = [], 36431 l = a.length, 36432 i; 36433 for (i = 0; i !== l; b.push(a[i++])); 36434 return b; 36435 }, 36436 _defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true 36437 var ir = "immediateRender"; 36438 if (!(ir in toVars)) { 36439 toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse); 36440 } 36441 return toVars; 36442 }, 36443 //for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following 36444 _distribute = function(v) { 36445 if (typeof(v) === "function") { 36446 return v; 36447 } 36448 var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all. 36449 ease = vars.ease, 36450 from = vars.from || 0, 36451 base = vars.base || 0, 36452 cache = {}, 36453 isFromKeyword = isNaN(from), 36454 axis = vars.axis, 36455 ratio = {center:0.5, end:1}[from] || 0; 36456 return function(i, target, a) { 36457 var l = (a || vars).length, 36458 distances = cache[l], 36459 originX, originY, x, y, d, j, max, min, wrap; 36460 if (!distances) { 36461 wrap = (vars.grid === "auto") ? 0 : (vars.grid || [Infinity])[0]; 36462 if (!wrap) { 36463 max = -Infinity; 36464 while (max < (max = a[wrap++].getBoundingClientRect().left) && wrap < l) { } 36465 wrap--; 36466 } 36467 distances = cache[l] = []; 36468 originX = isFromKeyword ? (Math.min(wrap, l) * ratio) - 0.5 : from % wrap; 36469 originY = isFromKeyword ? l * ratio / wrap - 0.5 : (from / wrap) | 0; 36470 max = 0; 36471 min = Infinity; 36472 for (j = 0; j < l; j++) { 36473 x = (j % wrap) - originX; 36474 y = originY - ((j / wrap) | 0); 36475 distances[j] = d = !axis ? Math.sqrt(x * x + y * y) : Math.abs((axis === "y") ? y : x); 36476 if (d > max) { 36477 max = d; 36478 } 36479 if (d < min) { 36480 min = d; 36481 } 36482 } 36483 distances.max = max - min; 36484 distances.min = min; 36485 distances.v = l = vars.amount || (vars.each * (wrap >
36485 l ? l : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0; 36486 distances.b = (l < 0) ? base - l : base; 36487 } 36488 l = (distances[i] - distances.min) / distances.max; 36489 return distances.b + (ease ? ease.getRatio(l) : l) * distances.v; 36490 }; 36491 }, 36492 p = TimelineLite.prototype = new SimpleTimeline(); 36493 36494 TimelineLite.version = "2.1.2"; 36495 TimelineLite.distribute = _distribute; 36496 p.constructor = TimelineLite; 36497 p.kill()._gc = p._forcingPlayhead = p._hasPause = false; 36498 36499 /* might use later... 36500 //translates a local time inside an animation to the corresponding time on the root/global timeline, factoring in all nesting and timeScales. 36501 function localToGlobal(time, animation) { 36502 while (animation) { 36503 time = (time / animation._timeScale) + animation._startTime; 36504 animation = animation.timeline; 36505 } 36506 return time; 36507 } 36508 36509 //translates the supplied time on the root/global timeline into the corresponding local time inside a particular animation, factoring in all nesting and timeScales 36510 function globalToLocal(time, animation) { 36511 var scale = 1; 36512 time -= localToGlobal(0, animation); 36513 while (animation) { 36514 scale *= animation._timeScale; 36515 animation = animation.timeline; 36516 } 36517 return time * scale; 36518 } 36519 */ 36520 36521 p.to = function(target, duration, vars, position) { 36522 var Engine = (vars.repeat && _globals.TweenMax) || TweenLite; 36523 return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position); 36524 }; 36525 36526 p.from = function(target, duration, vars, position) { 36527 return this.add( ((vars.repeat && _globals.TweenMax) || TweenLite).from(target, duration, _defaultImmediateRender(this, vars)), position); 36528 }; 36529 36530 p.fromTo = function(target, duration, fromVars, toVars, position) { 36531 var Engine = (toVars.repeat && _globals.TweenMax) || TweenLite; 36532 toVars = _defaultImmediateRender(this, toVars, fromVars); 36533 return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position); 36534 }; 36535 36536 p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 36537 var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, callbackScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}), 36538 staggerFunc = _distribute(vars.stagger || stagger), 36539 startAt = vars.startAt, 36540 cycle = vars.cycle, 36541 copy, i; 36542 if (typeof(targets) === "string") { 36543 targets = TweenLite.selector(targets) || targets; 36544 } 36545 targets = targets || []; 36546 if (_isSelector(targets)) { //if the targets object is a selector, translate it into an array. 36547 targets = _slice(targets); 36548 } 36549 for (i = 0; i < targets.length; i++) { 36550 copy = _copy(vars); 36551 if (startAt) { 36552 copy.startAt = _copy(startAt); 36553 if (startAt.cycle) { 36554 _applyCycle(copy.startAt, targets, i); 36555 } 36556 } 36557 if (cycle) { 36558 _applyCycle(copy, targets, i); 36559 if (copy.duration != null) { 36560 duration = copy.duration; 36561 delete copy.duration; 36562 } 36563 } 36564 tl.to(targets[i], duration, copy, staggerFunc(i, targets[i], targets)); 36565 } 36566 return this.add(tl, position); 36567 }; 36568 36569 p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 36570 vars.runBackwards = true; 36571 return this.staggerTo(targets, duration, _defaultImmediateRender(this, vars), stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 36572 }; 36573 36574 p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 36575 toVars.startAt = fromVars; 36576 return this.staggerTo(targets, duration, _defaultImmediateRender(this, toVars, fromVars), stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 36577 }; 36578 36579 p.call = function(callback, params, scope, position) { 36580 return this.add( TweenLite.delayedCall(0, callback, params, scope), position); 36581 }; 36582 36583 p.set = function(target, vars, position) { 36584 return this.add( new TweenLite(target, 0, _defaultImmediateRender(this, vars, null, true)), position); 36585 }; 36586 36587 TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) { 36588 vars = vars || {}; 36589 if (vars.smoothChildTiming == null) { 36590 vars.smoothChildTiming = true; 36591 } 36592 var tl = new TimelineLite(vars), 36593 root = tl._timeline, 36594 hasNegativeStart, time, tween, next; 36595 if (ignoreDelayedCalls == null) { 36596 ignoreDelayedCalls = true; 36597 } 36598 root._remove(tl, true); 36599 tl._startTime = 0; 36600 tl._rawPrevTime = tl._time = tl._totalTime = root._time; 36601 tween = root._first; 36602 while (tween) { 36603 next = tween._next; 36604 if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) { 36605 time = tween._startTime - tween._delay; 36606 if (time < 0) { 36607 hasNegativeStart = 1; 36608 } 36609 tl.add(tween, time); 36610 } 36611 tween = next; 36612 } 36613 root.add(tl, 0); 36614 if (hasNegativeStart) { //calling totalDuration() will force the adjustment necessary to shift the children forward so none of them start before zero, and moves the timeline backwards the same amount, so the playhead is still aligned where it should be globally, but the timeline doesn't have illegal children that start before zero. 36615 tl.totalDuration(); 36616 } 36617 return tl; 36618 }; 36619 36620 p.add = function(value, position, align, stagger) { 36621 var self = this, 36622 curTime, l, i, child, tl, beforeRawTime; 36623 if (typeof(position) !== "number") { 36624 position = self._parseTimeOrLabel(position, 0, true, value); 36625 } 36626 if (!(value instanceof Animation)) { 36627 if ((value instanceof Array) || (value && value.push && _isArray(value))) {
36628 align = align || "normal"; 36629 stagger = stagger || 0; 36630 curTime = position; 36631 l = value.length; 36632 for (i = 0; i < l; i++) { 36633 if (_isArray(child = value[i])) { 36634 child = new TimelineLite({tweens:child}); 36635 } 36636 self.add(child, curTime); 36637 if (typeof(child) !== "string" && typeof(child) !== "function") { 36638 if (align === "sequence") { 36639 curTime = child._startTime + (child.totalDuration() / child._timeScale); 36640 } else if (align === "start") { 36641 child._startTime -= child.delay(); 36642 } 36643 } 36644 curTime += stagger; 36645 } 36646 return self._uncache(true); 36647 } else if (typeof(value) === "string") { 36648 return self.addLabel(value, position); 36649 } else if (typeof(value) === "function") { 36650 value = TweenLite.delayedCall(0, value); 36651 } else { 36652 throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string."); 36653 } 36654 } 36655 36656 SimpleTimeline.prototype.add.call(self, value, position); 36657 36658 if (value._time || (!value._duration && value._initted)) { //in case, for example, the _startTime is moved on a tween that has already rendered. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning. 36659 curTime = (self.rawTime() - value._startTime) * value._timeScale; 36660 if (!value._duration || Math.abs(Math.max(0, Math.min(value.totalDuration(), curTime))) - value._totalTime > 0.00001) { 36661 value.render(curTime, false, false); 36662 } 36663 } 36664 36665 //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate. 36666 if (self._gc || self._time === self._duration) if (!self._paused) if (self._duration < self.duration()) { 36667 //in case any of the ancestors had completed but should now be enabled... 36668 tl = self; 36669 beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect. 36670 while (tl._timeline) { 36671 if (beforeRawTime && tl._timeline.smoothChildTiming) { 36672 tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it. 36673 } else if (tl._gc) { 36674 tl._enabled(true, false); 36675 } 36676 tl = tl._timeline; 36677 } 36678 } 36679 36680 return self; 36681 }; 36682 36683 p.remove = function(value) { 36684 if (value instanceof Animation) { 36685 this._remove(value, false); 36686 var tl = value._timeline = value.vars.useFrames ? Animation._rootFramesTimeline : Animation._rootTimeline; //now that it's removed, default it to the root timeline so that if it gets played again, it doesn't jump back into this timeline. 36687 value._startTime = (value._paused ? value._pauseTime : tl._time) - ((!value._reversed ? value._totalTime : value.totalDuration() - value._totalTime) / value._timeScale); //ensure that if it gets played again, the timing is correct. 36688 return this; 36689 } else if (value instanceof Array || (value && value.push && _isArray(value))) { 36690 var i = value.length; 36691 while (--i > -1) { 36692 this.remove(value[i]); 36693 } 36694 return this; 36695 } else if (typeof(value) === "string") { 36696 return this.removeLabel(value); 36697 } 36698 return this.kill(null, value); 36699 }; 36700 36701 p._remove = function(tween, skipDisable) { 36702 SimpleTimeline.prototype._remove.call(this, tween, skipDisable); 36703 var last = this._last; 36704 if (!last) { 36705 this._time = this._totalTime = this._duration = this._totalDuration = 0; 36706 } else if (this._time > this.duration()) { 36707 this._time = this._duration; 36708 this._totalTime = this._totalDuration; 36709 } 36710 return this; 36711 }; 36712 36713 p.append = function(value, offsetOrLabel) { 36714 return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value)); 36715 }; 36716 36717 p.insert = p.insertMultiple = function(value, position, align, stagger) { 36718 return this.add(value, position || 0, align, stagger); 36719 }; 36720 36721 p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) { 36722 return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger); 36723 }; 36724 36725 p.addLabel = function(label, position) { 36726 this._labels[label] = this._parseTimeOrLabel(position); 36727 return this; 36728 }; 36729 36730 p.addPause = function(position, callback, params, scope) { 36731 var t = TweenLite.delayedCall(0, _pauseCallback, params, scope || this); 36732 t.vars.onComplete = t.vars.onReverseComplete = callback;
36733 t.data = "isPause"; 36734 this._hasPause = true; 36735 return this.add(t, position); 36736 }; 36737 36738 p.removeLabel = function(label) { 36739 delete this._labels[label]; 36740 return this; 36741 }; 36742 36743 p.getLabelTime = function(label) { 36744 return (this._labels[label] != null) ? this._labels[label] : -1; 36745 }; 36746 36747 p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) { 36748 var clippedDuration, i; 36749 //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration(). 36750 if (ignore instanceof Animation && ignore.timeline === this) { 36751 this.remove(ignore); 36752 } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) { 36753 i = ignore.length; 36754 while (--i > -1) { 36755 if (ignore[i] instanceof Animation && ignore[i].timeline === this) { 36756 this.remove(ignore[i]); 36757 } 36758 } 36759 } 36760 clippedDuration = (typeof(timeOrLabel) === "number" && !offsetOrLabel) ? 0 : (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead. 36761 if (typeof(offsetOrLabel) === "string") { 36762 return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - clippedDuration : 0, appendIfAbsent); 36763 } 36764 offsetOrLabel = offsetOrLabel || 0; 36765 if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value). 36766 i = timeOrLabel.indexOf("="); 36767 if (i === -1) { 36768 if (this._labels[timeOrLabel] == null) { 36769 return appendIfAbsent ? (this._labels[timeOrLabel] = clippedDuration + offsetOrLabel) : offsetOrLabel; 36770 } 36771 return this._labels[timeOrLabel] + offsetOrLabel; 36772 } 36773 offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1)); 36774 timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : clippedDuration; 36775 } else if (timeOrLabel == null) { 36776 timeOrLabel = clippedDuration; 36777 } 36778 return Number(timeOrLabel) + offsetOrLabel; 36779 }; 36780 36781 p.seek = function(position, suppressEvents) { 36782 return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false)); 36783 }; 36784 36785 p.stop = function() { 36786 return this.paused(true); 36787 }; 36788 36789 p.gotoAndPlay = function(position, suppressEvents) { 36790 return this.play(position, suppressEvents); 36791 }; 36792 36793 p.gotoAndStop = function(position, suppressEvents) { 36794 return this.pause(position, suppressEvents); 36795 }; 36796 36797 p.render = function(time, suppressEvents, force) { 36798 if (this._gc) { 36799 this._enabled(true, false); 36800 } 36801 var self = this, 36802 prevTime = self._time, 36803 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 36804 prevStart = self._startTime, 36805 prevTimeScale = self._timeScale, 36806 prevPaused = self._paused, 36807 tween, isComplete, next, callback, internalForce, pauseTween, curTime, pauseTime; 36808 if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump). 36809 time += self._time - prevTime; 36810 } 36811 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 36812 self._totalTime = self._time = totalDur; 36813 if (!self._reversed) if (!self._hasPausedChild()) { 36814 isComplete = true; 36815 callback = "onComplete"; 36816 internalForce = !!self._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 36817 if (self._duration === 0) if ((time <= 0 && time >= -_tinyNum) || self._rawPrevTime < 0 || self._rawPrevTime === _tinyNum) if (self._rawPrevTime !== time && self._first) { 36818 internalForce = true; 36819 if (self._rawPrevTime > _tinyNum) { 36820 callback = "onReverseComplete"; 36821 } 36822 } 36823 } 36824 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 36825 time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. 36826 36827 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 36828 self._totalTime = self._time = 0; 36829 if (time > -_tinyNum) { 36830 time = 0; 36831 } 36832 if (prevTime !== 0 || (self._duration === 0 && self._rawPrevTime !== _tinyNum && (self._rawPrevTime > 0 || (time < 0 && self._rawPrevTime >= 0)))) { 36833 callback = "onReverseComplete"; 36834 isComplete = self._reversed; 36835 } 36836 if (time < 0) { 36837 self._active = false;
36838 if (self._timeline.autoRemoveChildren && self._reversed) { //ensures proper GC if a timeline is resumed after it's finished reversing. 36839 internalForce = isComplete = true; 36840 callback = "onReverseComplete"; 36841 } else if (self._rawPrevTime >= 0 && self._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state. 36842 internalForce = true; 36843 } 36844 self._rawPrevTime = time; 36845 } else { 36846 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 36847 if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good). 36848 tween = self._first; 36849 while (tween && tween._startTime === 0) { 36850 if (!tween._duration) { 36851 isComplete = false; 36852 } 36853 tween = tween._next; 36854 } 36855 } 36856 time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline) 36857 if (!self._initted) { 36858 internalForce = true; 36859 } 36860 } 36861 36862 } else { 36863 36864 if (self._hasPause && !self._forcingPlayhead && !suppressEvents) { 36865 if (time >= prevTime) { 36866 tween = self._first; 36867 while (tween && tween._startTime <= time && !pauseTween) { 36868 if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) { 36869 pauseTween = tween; 36870 } 36871 tween = tween._next; 36872 } 36873 } else { 36874 tween = self._last; 36875 while (tween && tween._startTime >= time && !pauseTween) { 36876 if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) { 36877 pauseTween = tween; 36878 } 36879 tween = tween._prev; 36880 } 36881 } 36882 if (pauseTween) { 36883 self._time = self._totalTime = time = pauseTween._startTime; 36884 pauseTime = self._startTime + (time / self._timeScale); 36885 } 36886 } 36887 36888 self._totalTime = self._time = self._rawPrevTime = time; 36889 } 36890 if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) { 36891 return; 36892 } else if (!self._initted) { 36893 self._initted = true; 36894 } 36895 36896 if (!self._active) if (!self._paused && self._time !== prevTime && time > 0) { 36897 self._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example. 36898 } 36899 36900 if (prevTime === 0) if (self.vars.onStart) if (self._time !== 0 || !self._duration) if (!suppressEvents) { 36901 self._callback("onStart"); 36902 } 36903 36904 curTime = self._time; 36905 if (curTime >= prevTime) { 36906 tween = self._first; 36907 while (tween) { 36908 next = tween._next; //record it here because the value could change after rendering... 36909 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 36910 break; 36911 } else if (tween._active || (tween._startTime <= curTime && !tween._paused && !tween._gc)) { 36912 if (pauseTween === tween) { 36913 self.pause(); 36914 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 36915 } 36916 if (!tween._reversed) { 36917 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 36918 } else { 36919 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 36920 } 36921 } 36922 tween = next; 36923 } 36924 } else { 36925 tween = self._last; 36926 while (tween) { 36927 next = tween._prev; //record it here because the value could change after rendering... 36928 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 36929 break; 36930 } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) { 36931 if (pauseTween === tween) { 36932 pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse. 36933 while (pauseTween && pauseTween.endTime() > self._time) { 36934 pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force); 36935 pauseTween = pauseTween._prev; 36936 } 36937 pauseTween = null; 36938 self.pause(); 36939 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 36940 } 36941 if (!tween._reversed) { 36942 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 36943 } else { 36944 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 36945 } 36946 } 36947 tween = next; 36948 } 36949 } 36950 36951 if (self._onUpdate) if (!suppressEvents) { 36952 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. 36953 _lazyRender(); 36954 }
36955 self._callback("onUpdate"); 36956 } 36957 36958 if (callback) if (!self._gc) if (prevStart === self._startTime || prevTimeScale !== self._timeScale) if (self._time === 0 || totalDur >= self.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate 36959 if (isComplete) { 36960 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values. 36961 _lazyRender(); 36962 } 36963 if (self._timeline.autoRemoveChildren) { 36964 self._enabled(false, false); 36965 } 36966 self._active = false; 36967 } 36968 if (!suppressEvents && self.vars[callback]) { 36969 self._callback(callback); 36970 } 36971 } 36972 }; 36973 36974 p._hasPausedChild = function() { 36975 var tween = this._first; 36976 while (tween) { 36977 if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) { 36978 return true; 36979 } 36980 tween = tween._next; 36981 } 36982 return false; 36983 }; 36984 36985 p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) { 36986 ignoreBeforeTime = ignoreBeforeTime || -9999999999; 36987 var a = [], 36988 tween = this._first, 36989 cnt = 0; 36990 while (tween) { 36991 if (tween._startTime < ignoreBeforeTime) { 36992 //do nothing 36993 } else if (tween instanceof TweenLite) { 36994 if (tweens !== false) { 36995 a[cnt++] = tween; 36996 } 36997 } else { 36998 if (timelines !== false) { 36999 a[cnt++] = tween; 37000 } 37001 if (nested !== false) { 37002 a = a.concat(tween.getChildren(true, tweens, timelines)); 37003 cnt = a.length; 37004 } 37005 } 37006 tween = tween._next; 37007 } 37008 return a; 37009 }; 37010 37011 p.getTweensOf = function(target, nested) { 37012 var disabled = this._gc, 37013 a = [], 37014 cnt = 0, 37015 tweens, i; 37016 if (disabled) { 37017 this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here. 37018 } 37019 tweens = TweenLite.getTweensOf(target); 37020 i = tweens.length; 37021 while (--i > -1) { 37022 if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) { 37023 a[cnt++] = tweens[i]; 37024 } 37025 } 37026 if (disabled) { 37027 this._enabled(false, true); 37028 } 37029 return a; 37030 }; 37031 37032 p.recent = function() { 37033 return this._recent; 37034 }; 37035 37036 p._contains = function(tween) { 37037 var tl = tween.timeline; 37038 while (tl) { 37039 if (tl === this) { 37040 return true; 37041 } 37042 tl = tl.timeline; 37043 } 37044 return false; 37045 }; 37046 37047 p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) { 37048 ignoreBeforeTime = ignoreBeforeTime || 0; 37049 var tween = this._first, 37050 labels = this._labels, 37051 p; 37052 while (tween) { 37053 if (tween._startTime >= ignoreBeforeTime) { 37054 tween._startTime += amount; 37055 } 37056 tween = tween._next; 37057 }
37058 if (adjustLabels) { 37059 for (p in labels) { 37060 if (labels[p] >= ignoreBeforeTime) { 37061 labels[p] += amount; 37062 } 37063 } 37064 } 37065 return this._uncache(true); 37066 }; 37067 37068 p._kill = function(vars, target) { 37069 if (!vars && !target) { 37070 return this._enabled(false, false); 37071 } 37072 var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target), 37073 i = tweens.length, 37074 changed = false; 37075 while (--i > -1) { 37076 if (tweens[i]._kill(vars, target)) { 37077 changed = true; 37078 } 37079 } 37080 return changed; 37081 }; 37082 37083 p.clear = function(labels) { 37084 var tweens = this.getChildren(false, true, true), 37085 i = tweens.length; 37086 this._time = this._totalTime = 0; 37087 while (--i > -1) { 37088 tweens[i]._enabled(false, false); 37089 } 37090 if (labels !== false) { 37091 this._labels = {}; 37092 } 37093 return this._uncache(true); 37094 }; 37095 37096 p.invalidate = function() { 37097 var tween = this._first; 37098 while (tween) { 37099 tween.invalidate(); 37100 tween = tween._next; 37101 } 37102 return Animation.prototype.invalidate.call(this);; 37103 }; 37104 37105 p._enabled = function(enabled, ignoreTimeline) { 37106 if (enabled === this._gc) { 37107 var tween = this._first; 37108 while (tween) { 37109 tween._enabled(enabled, true); 37110 tween = tween._next; 37111 } 37112 } 37113 return SimpleTimeline.prototype._enabled.call(this, enabled, ignoreTimeline); 37114 }; 37115 37116 p.totalTime = function(time, suppressEvents, uncapped) { 37117 this._forcingPlayhead = true; 37118 var val = Animation.prototype.totalTime.apply(this, arguments); 37119 this._forcingPlayhead = false; 37120 return val; 37121 }; 37122 37123 p.duration = function(value) { 37124 if (!arguments.length) { 37125 if (this._dirty) { 37126 this.totalDuration(); //just triggers recalculation 37127 } 37128 return this._duration; 37129 } 37130 if (this.duration() !== 0 && value !== 0) { 37131 this.timeScale(this._duration / value); 37132 } 37133 return this; 37134 }; 37135 37136 p.totalDuration = function(value) { 37137 if (!arguments.length) { 37138 if (this._dirty) { 37139 var max = 0, 37140 self = this, 37141 tween = self._last, 37142 prevStart = 999999999999, 37143 prev, end; 37144 while (tween) { 37145 prev = tween._prev; //record it here in case the tween changes position in the sequence... 37146 if (tween._dirty) { 37147 tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it. 37148 } 37149 if (tween._startTime > prevStart && self._sortChildren && !tween._paused && !self._calculatingDuration) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence 37150 self._calculatingDuration = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(), like _parseTimeOrLabel(). 37151 self.add(tween, tween._startTime - tween._delay); 37152 self._calculatingDuration = 0; 37153 } else { 37154 prevStart = tween._startTime; 37155 } 37156 if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found. 37157 max -= tween._startTime; 37158 if (self._timeline.smoothChildTiming) { 37159 self._startTime += tween._startTime / self._timeScale; 37160 self._time -= tween._startTime; 37161 self._totalTime -= tween._startTime; 37162 self._rawPrevTime -= tween._startTime; 37163 } 37164 self.shiftChildren(-tween._startTime, false, -9999999999); 37165 prevStart = 0; 37166 } 37167 end = tween._startTime + (tween._totalDuration / tween._timeScale); 37168 if (end > max) { 37169 max = end; 37170 } 37171 tween = prev; 37172 } 37173 self._duration = self._totalDuration = max; 37174 self._dirty = false; 37175 } 37176 return this._totalDuration; 37177 } 37178 return (value && this.totalDuration()) ? this.timeScale(this._totalDuration / value) : this; 37179 }; 37180 37181 p.paused = function(value) { 37182 if (value === false && this._paused) { //if there's a pause directly at the spot from where we're unpausing, skip it. 37183 var tween = this._first; 37184 while (tween) { 37185 if (tween._startTime === this._time && tween.data === "isPause") { 37186 tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire. 37187 } 37188 tween = tween._next; 37189 } 37190 } 37191 return Animation.prototype.paused.apply(this, arguments); 37192 }; 37193 37194 p.usesFrames = function() { 37195 var tl = this._timeline; 37196 while (tl._timeline) { 37197 tl = tl._timeline; 37198 } 37199 return (tl === Animation._rootFramesTimeline); 37200 }; 37201 37202 p.rawTime = function(wrapRepeats) { 37203 return (wrapRepeats && (this._paused || (this._repeat && this.time() > 0 && this.totalProgress() < 1))) ? this._totalTime % (this._duration + this._repeatDelay) : this._paused ? this._totalTime : (this._timeline.rawTime(wrapRepeats) - this._startTime) * this._timeScale; 37204 }; 37205 37206 return TimelineLite; 37207 37208 }, true); 37209 37210}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } 37211 37212//export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date) 37213(function(name) { 37214 "use strict"; 37215 var getGlobal = function() { 37216 return (_gsScope.GreenSockGlobals || _gsScope)[name]; 37217 }; 37218 if (typeof(module) !== "undefined" && module.exports) { //node 37219 require("./TweenLite.js"); //dependency 37220 module.exports = getGlobal(); 37221 } else if (typeof(define) === "function" && define.amd) { //AMD 37222 define(["TweenLite"], getGlobal); 37223 } 37224}("TimelineMax")); 37225/*! 37226 * ScrollMagic v2.0.6 (2018-10-08) 37227 * The javascript library for magical scroll interactions. 37228 * (c) 2018 Jan Paepke (@janpaepke) 37229 * Project Website: http://scrollmagic.io 37230 * 37231 * @version 2.0.6 37232 * @license Dual licensed under MIT license and GPL. 37233 * @author Jan Paepke - [email protected] 37234 * 37235 * @file ScrollMagic main library. 37236 */ 37237/** 37238 * @namespace ScrollMagic 37239 */ 37240(function (root, factory) { 37241 if (typeof define === 'function' && define.amd) { 37242 // AMD. Register as an anonymous module. 37243 define(factory); 37244 } else if (typeof exports === 'object') { 37245 // CommonJS 37246 module.exports = factory(); 37247 } else { 37248 // Browser global 37249 root.ScrollMagic = factory(); 37250 } 37251}(this, function () { 37252 "use strict"; 37253 37254 var ScrollMagic = function () { 37255 _util.log(2, '(COMPATIBILITY NOTICE) -> As of ScrollMagic 2.0.0 you need to use \'new ScrollMagic.Controller()\' to create a new controller instance. Use \'new ScrollMagic.Scene()\' to instance a scene.'); 37256 }; 37257 37258 ScrollMagic.version = "2.0.6"; 37259 37260 // TODO: temporary workaround for chrome's scroll jitter bug 37261 window.addEventListener("mousewheel", function () {}); 37262 37263 // global const 37264 var PIN_SPACER_ATTRIBUTE = "data-scrollmagic-pin-spacer"; 37265 37266 /** 37267 * The main class that is needed once per scroll container. 37268 * 37269 * @class 37270 * 37271 * @example 37272 * // basic initialization 37273 * var controller = new ScrollMagic.Controller(); 37274 * 37275 * // passing options 37276 * var controller = new ScrollMagic.Controller({container: "#myContainer", loglevel: 3}); 37277 * 37278 * @param {object}
37278 [options] - An object containing one or more options for the controller. 37279 * @param {(string|object)} [options.container=window] - A selector, DOM object that references the main container for scrolling. 37280 * @param {boolean} [options.vertical=true] - Sets the scroll mode to vertical (`true`) or horizontal (`false`) scrolling. 37281 * @param {object} [options.globalSceneOptions={}] - These options will be passed to every Scene that is added to the controller using the addScene method. For more information on Scene options see {@link ScrollMagic.Scene}. 37282 * @param {number} [options.loglevel=2] Loglevel for debugging. Note that logging is disabled in the minified version of ScrollMagic. 37283 ** `0` => silent 37284 ** `1` => errors 37285 ** `2` => errors, warnings 37286 ** `3` => errors, warnings, debuginfo 37287 * @param {boolean} [options.refreshInterval=100] - Some changes don't call events by default, like changing the container size or moving a scene trigger element. 37288 This interval polls these parameters to fire the necessary events. 37289 If you don't use custom containers, trigger elements or have static layouts, where the positions of the trigger elements don't change, you can set this to 0 disable interval checking and improve performance. 37290 * 37291 */ 37292 ScrollMagic.Controller = function (options) { 37293/* 37294 * ---------------------------------------------------------------- 37295 * settings 37296 * ---------------------------------------------------------------- 37297 */ 37298 var 37299 NAMESPACE = 'ScrollMagic.Controller', 37300 SCROLL_DIRECTION_FORWARD = 'FORWARD', 37301 SCROLL_DIRECTION_REVERSE = 'REVERSE', 37302 SCROLL_DIRECTION_PAUSED = 'PAUSED', 37303 DEFAULT_OPTIONS = CONTROLLER_OPTIONS.defaults; 37304 37305/* 37306 * ---------------------------------------------------------------- 37307 * private vars 37308 * ---------------------------------------------------------------- 37309 */ 37310 var 37311 Controller = this, 37312 _options = _util.extend({}, DEFAULT_OPTIONS, options), 37313 _sceneObjects = [], 37314 _updateScenesOnNextCycle = false, 37315 // can be boolean (true => all scenes) or an array of scenes to be updated 37316 _scrollPos = 0, 37317 _scrollDirection = SCROLL_DIRECTION_PAUSED, 37318 _isDocument = true, 37319 _viewPortSize = 0, 37320 _enabled = true, 37321 _updateTimeout, _refreshTimeout; 37322 37323/* 37324 * ---------------------------------------------------------------- 37325 * private functions 37326 * ---------------------------------------------------------------- 37327 */ 37328 37329 /** 37330 * Internal constructor function of the ScrollMagic Controller 37331 * @private 37332 */ 37333 var construct = function () { 37334 for (var key in _options) { 37335 if (!DEFAULT_OPTIONS.hasOwnProperty(key)) { 37336 log(2, "WARNING: Unknown option \"" + key + "\""); 37337 delete _options[key]; 37338 } 37339 } 37340 _options.container = _util.get.elements(_options.container)[0];
37341 // check ScrollContainer 37342 if (!_options.container) { 37343 log(1, "ERROR creating object " + NAMESPACE + ": No valid scroll container supplied"); 37344 throw NAMESPACE + " init failed."; // cancel 37345 } 37346 _isDocument = _options.container === window || _options.container === document.body || !document.body.contains(_options.container); 37347 // normalize to window 37348 if (_isDocument) { 37349 _options.container = window; 37350 } 37351 // update container size immediately 37352 _viewPortSize = getViewportSize(); 37353 // set event handlers 37354 _options.container.addEventListener("resize", onChange); 37355 _options.container.addEventListener("scroll", onChange); 37356 37357 var ri = parseInt(_options.refreshInterval, 10); 37358 _options.refreshInterval = _util.type.Number(ri) ? ri : DEFAULT_OPTIONS.refreshInterval; 37359 scheduleRefresh(); 37360 37361 log(3, "added new " + NAMESPACE + " controller (v" + ScrollMagic.version + ")"); 37362 }; 37363 37364 /** 37365 * Schedule the next execution of the refresh function 37366 * @private 37367 */ 37368 var scheduleRefresh = function () { 37369 if (_options.refreshInterval > 0) { 37370 _refreshTimeout = window.setTimeout(refresh, _options.refreshInterval); 37371 } 37372 }; 37373 37374 /** 37375 * Default function to get scroll pos - overwriteable using `Controller.scrollPos(newFunction)` 37376 * @private 37377 */ 37378 var getScrollPos = function () { 37379 return _options.vertical ? _util.get.scrollTop(_options.container) : _util.get.scrollLeft(_options.container); 37380 }; 37381 37382 /** 37383 * Returns the current viewport Size (width vor horizontal, height for vertical) 37384 * @private 37385 */ 37386 var getViewportSize = function () { 37387 return _options.vertical ? _util.get.height(_options.container) : _util.get.width(_options.container); 37388 }; 37389 37390 /** 37391 * Default function to set scroll pos - overwriteable using `Controller.scrollTo(newFunction)` 37392 * Make available publicly for pinned mousewheel workaround. 37393 * @private 37394 */ 37395 var setScrollPos = this._setScrollPos = function (pos) { 37396 if (_options.vertical) { 37397 if (_isDocument) { 37398 window.scrollTo(_util.get.scrollLeft(), pos); 37399 } else { 37400 _options.container.scrollTop = pos; 37401 } 37402 } else { 37403 if (_isDocument) { 37404 window.scrollTo(pos, _util.get.scrollTop()); 37405 } else { 37406 _options.container.scrollLeft = pos; 37407 } 37408 } 37409 }; 37410 37411 /** 37412 * Handle updates in cycles instead of on scroll (performance) 37413 * @private 37414 */ 37415 var updateScenes = function () { 37416 if (_enabled && _updateScenesOnNextCycle) { 37417 // determine scenes to update 37418 var scenesToUpdate = _util.type.Array(_updateScenesOnNextCycle) ? _updateScenesOnNextCycle : _sceneObjects.slice(0); 37419 // reset scenes 37420 _updateScenesOnNextCycle = false; 37421 var oldScrollPos = _scrollPos; 37422 // update scroll pos now instead of onChange, as it might have changed since scheduling (i.e. in-browser smooth scroll) 37423 _scrollPos = Controller.scrollPos(); 37424 var deltaScroll = _scrollPos - oldScrollPos; 37425 if (deltaScroll !== 0) { // scroll position changed? 37426 _scrollDirection = (deltaScroll > 0) ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_REVERSE; 37427 } 37428 // reverse order of scenes if scrolling reverse 37429 if (_scrollDirection === SCROLL_DIRECTION_REVERSE) { 37430 scenesToUpdate.reverse(); 37431 } 37432 // update scenes 37433 scenesToUpdate.forEach(function (scene, index) { 37434 log(3, "updating Scene " + (index + 1) + "/" + scenesToUpdate.length + " (" + _sceneObjects.length + " total)"); 37435 scene.update(true); 37436 }); 37437 if (scenesToUpdate.length === 0 && _options.loglevel >= 3) { 37438 log(3, "updating 0 Scenes (nothing added to controller)"); 37439 } 37440 } 37441 }; 37442 37443 /** 37444 * Initializes rAF callback 37445 * @private 37446 */ 37447 var debounceUpdate = function () { 37448 _updateTimeout = _util.rAF(updateScenes); 37449 }; 37450 37451 /** 37452 * Handles Container changes 37453 * @private 37454 */ 37455 var onChange = function (e) { 37456 log(3, "event fired causing an update:", e.type); 37457 if (e.type == "resize") { 37458 // resize 37459 _viewPortSize = getViewportSize(); 37460 _scrollDirection = SCROLL_DIRECTION_PAUSED; 37461 } 37462 // schedule update 37463 if (_updateScenesOnNextCycle !== true) { 37464 _updateScenesOnNextCycle = true; 37465 debounceUpdate(); 37466 } 37467 }; 37468 37469 var refresh = function () { 37470 if (!_isDocument) { 37471 // simulate resize event. Only works for viewport relevant param (performance) 37472 if (_viewPortSize != getViewportSize()) { 37473 var resizeEvent; 37474 try { 37475 resizeEvent = new Event('resize', { 37476 bubbles: false, 37477 cancelable: false 37478 }); 37479 } catch (e) { // stupid IE 37480 resizeEvent = document.createEvent("Event"); 37481 resizeEvent.initEvent("resize", false, false); 37482 }
37483 _options.container.dispatchEvent(resizeEvent); 37484 } 37485 } 37486 _sceneObjects.forEach(function (scene, index) { // refresh all scenes 37487 scene.refresh(); 37488 }); 37489 scheduleRefresh(); 37490 }; 37491 37492 /** 37493 * Send a debug message to the console. 37494 * provided publicly with _log for plugins 37495 * @private 37496 * 37497 * @param {number} loglevel - The loglevel required to initiate output for the message. 37498 * @param {...mixed} output - One or more variables that should be passed to the console. 37499 */ 37500 var log = this._log = function (loglevel, output) { 37501 if (_options.loglevel >= loglevel) { 37502 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ") ->"); 37503 _util.log.apply(window, arguments); 37504 } 37505 }; 37506 // for scenes we have getters for each option, but for the controller we don't, so we need to make it available externally for plugins 37507 this._options = _options; 37508 37509 /** 37510 * Sort scenes in ascending order of their start offset. 37511 * @private 37512 * 37513 * @param {array} ScenesArray - an array of ScrollMagic Scenes that should be sorted 37514 * @return {array} The sorted array of Scenes. 37515 */ 37516 var sortScenes = function (ScenesArray) { 37517 if (ScenesArray.length <= 1) { 37518 return ScenesArray; 37519 } else { 37520 var scenes = ScenesArray.slice(0); 37521 scenes.sort(function (a, b) { 37522 return a.scrollOffset() > b.scrollOffset() ? 1 : -1; 37523 }); 37524 return scenes; 37525 } 37526 }; 37527 37528 /** 37529 * ---------------------------------------------------------------- 37530 * public functions 37531 * ---------------------------------------------------------------- 37532 */ 37533 37534 /** 37535 * Add one ore more scene(s) to the controller. 37536 * This is the equivalent to `Scene.addTo(controller)`. 37537 * @public 37538 * @example 37539 * // with a previously defined scene 37540 * controller.addScene(scene); 37541 * 37542 * // with a newly created scene. 37543 * controller.addScene(new ScrollMagic.Scene({duration : 0})); 37544 * 37545 * // adding multiple scenes 37546 * controller.addScene([scene, scene2, new ScrollMagic.Scene({duration : 0})]); 37547 * 37548 * @param {(ScrollMagic.Scene|array)} newScene - ScrollMagic Scene or Array of Scenes to be added to the controller. 37549 * @return {Controller} Parent object for chaining. 37550 */ 37551 this.addScene = function (newScene) { 37552 if (_util.type.Array(newScene)) { 37553 newScene.forEach(function (scene, index) { 37554 Controller.addScene(scene); 37555 }); 37556 } else if (newScene instanceof ScrollMagic.Scene) { 37557 if (newScene.controller() !== Controller) { 37558 newScene.addTo(Controller); 37559 } else if (_sceneObjects.indexOf(newScene) < 0) { 37560 // new scene 37561 _sceneObjects.push(newScene); // add to array 37562 _sceneObjects = sortScenes(_sceneObjects); // sort 37563 newScene.on("shift.controller_sort", function () { // resort whenever scene moves 37564 _sceneObjects = sortScenes(_sceneObjects); 37565 }); 37566 // insert Global defaults. 37567 for (var key in _options.globalSceneOptions) { 37568 if (newScene[key]) { 37569 newScene[key].call(newScene, _options.globalSceneOptions[key]); 37570 } 37571 } 37572 log(3, "adding Scene (now " + _sceneObjects.length + " total)"); 37573 } 37574 } else { 37575 log(1, "ERROR: invalid argument supplied for '.addScene()'"); 37576 } 37577 return Controller; 37578 }; 37579 37580 /** 37581 * Remove one ore more scene(s) from the controller. 37582 * This is the equivalent to `Scene.remove()`. 37583 * @public 37584 * @example 37585 * // remove a scene from the controller 37586 * controller.removeScene(scene); 37587 * 37588 * // remove multiple scenes from the controller 37589 * controller.removeScene([scene, scene2, scene3]); 37590 * 37591 * @param {(ScrollMagic.Scene|array)} Scene - ScrollMagic Scene or Array of Scenes to be removed from the controller. 37592 * @returns {Controller} Parent object for chaining. 37593 */ 37594 this.removeScene = function (Scene) { 37595 if (_util.type.Array(Scene)) { 37596 Scene.forEach(function (scene, index) { 37597 Controller.removeScene(scene); 37598 }); 37599 } else { 37600 var index = _sceneObjects.indexOf(Scene); 37601 if (index > -1) { 37602 Scene.off("shift.controller_sort"); 37603 _sceneObjects.splice(index, 1); 37604 log(3, "removing Scene (now " + _sceneObjects.length + " left)"); 37605 Scene.remove(); 37606 } 37607 } 37608 return Controller; 37609 }; 37610 37611 /** 37612 * Update one ore more scene(s) according to the scroll position of the container.
37613 * This is the equivalent to `Scene.update()`. 37614 * The update method calculates the scene's start and end position (based on the trigger element, trigger hook, duration and offset) and checks it against the current scroll position of the container. 37615 * It then updates the current scene state accordingly (or does nothing, if the state is already correct) â Pins will be set to their correct position and tweens will be updated to their correct progress. 37616 * _**Note:** This method gets called constantly whenever Controller detects a change. The only application for you is if you change something outside of the realm of ScrollMagic, like moving the trigger or changing tween parameters._ 37617 * @public 37618 * @example 37619 * // update a specific scene on next cycle 37620 * controller.updateScene(scene); 37621 * 37622 * // update a specific scene immediately 37623 * controller.updateScene(scene, true); 37624 * 37625 * // update multiple scenes scene on next cycle 37626 * controller.updateScene([scene1, scene2, scene3]); 37627 * 37628 * @param {ScrollMagic.Scene} Scene - ScrollMagic Scene or Array of Scenes that is/are supposed to be updated. 37629 * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle. 37630 This is useful when changing multiple properties of the scene - this way it will only be updated once all new properties are set (updateScenes). 37631 * @return {Controller} Parent object for chaining. 37632 */ 37633 this.updateScene = function (Scene, immediately) { 37634 if (_util.type.Array(Scene)) { 37635 Scene.forEach(function (scene, index) { 37636 Controller.updateScene(scene, immediately); 37637 }); 37638 } else { 37639 if (immediately) { 37640 Scene.update(true); 37641 } else if (_updateScenesOnNextCycle !== true && Scene instanceof ScrollMagic.Scene) { // if _updateScenesOnNextCycle is true, all connected scenes are already scheduled for update 37642 // prep array for next update cycle 37643 _updateScenesOnNextCycle = _updateScenesOnNextCycle || []; 37644 if (_updateScenesOnNextCycle.indexOf(Scene) == -1) { 37645 _updateScenesOnNextCycle.push(Scene); 37646 } 37647 _updateScenesOnNextCycle = sortScenes(_updateScenesOnNextCycle); // sort 37648 debounceUpdate(); 37649 } 37650 } 37651 return Controller; 37652 }; 37653 37654 /** 37655 * Updates the controller params and calls updateScene on every scene, that is attached to the controller. 37656 * See `Controller.updateScene()` for more information about what this means. 37657 * In most cases you will not need this function, as it is called constantly, whenever ScrollMagic detects a state change event, like resize or scroll. 37658 * The only application for this method is when ScrollMagic fails to detect these events. 37659 * One application is with some external scroll libraries (like iScroll) that move an internal container to a negative offset instead of actually scrolling. In this case the update on the controller needs to be called whenever the child container's position changes. 37660 * For this case there will also be the need to provide a custom function to calculate the correct scroll position. See `Controller.scrollPos()` for details. 37661 * @public 37662 * @example 37663 * // update the controller on next cycle (saves performance due to elimination of redundant updates) 37664 * controller.update(); 37665 * 37666 * // update the controller immediately 37667 * controller.update(true); 37668 * 37669 * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle (better performance) 37670 * @return {Controller} Parent object for chaining. 37671 */ 37672 this.update = function (immediately) { 37673 onChange({ 37674 type: "resize" 37675 }); // will update size and set _updateScenesOnNextCycle to true 37676 if (immediately) { 37677 updateScenes(); 37678 } 37679 return Controller; 37680 }; 37681 37682 /** 37683 * Scroll to a numeric scroll offset, a DOM element, the start of a scene or provide an alternate method for scrolling. 37684 * For vertical controllers it will change the top scroll offset and for horizontal applications it will change the left offset. 37685 * @public 37686 * 37687 * @since 1.1.0 37688 * @example 37689 * // scroll to an offset of 100 37690 * controller.scrollTo(100); 37691 * 37692 * // scroll to a DOM element 37693 * controller.scrollTo("#anchor"); 37694 * 37695 * // scroll to the beginning of a scene 37696 * var scene = new ScrollMagic.Scene({offset: 200}); 37697 * controller.scrollTo(scene); 37698 * 37699 * // define a new scroll position modification function (jQuery animate instead of jump) 37700 * controller.scrollTo(function (newScrollPos) { 37701 * $("html, body").animate({scrollTop: newScrollPos}); 37702 * }); 37703 * controller.scrollTo(100); // call as usual, but the new function will be used instead 37704 * 37705 * // define a new scroll function with an additional parameter 37706 * controller.scrollTo(function (newScrollPos, message) { 37707 * console.log(message); 37708 * $(this).animate({scrollTop: newScrollPos}); 37709 * }); 37710 * // call as usual, but supply an extra parameter to the defined custom function 37711 * controller.scrollTo(100, "my message"); 37712 * 37713 * // define a new scroll function with an additional parameter containing multiple variables 37714 * controller.scrollTo(function (newScrollPos, options) { 37715 * someGlobalVar = options.a + options.b; 37716 * $(this).animate({scrollTop: newScrollPos}); 37717 * }); 37718 * // call as usual, but supply an extra parameter containing multiple options 37719 * controller.scrollTo(100, {a: 1, b: 2}); 37720 * 37721 * // define a new scroll function with a callback supplied as an additional parameter 37722 * controller.scrollTo(function (newScrollPos, callback) { 37723 * $(this).animate({scrollTop: newScrollPos}, 400, "swing", callback); 37724 * }); 37725 * // call as usual, but supply an extra parameter, which is used as a callback in the previously defined custom scroll function 37726 * controller.scrollTo(100, function() { 37727 * console.log("scroll has finished."); 37728 * }); 37729 * 37730 * @param {mixed} scrollTarget - The supplied argument can be one of these types: 37731 * 1. `number` -> The container will scroll to this new scroll offset. 37732 * 2. `string` or `object` -> Can be a selector or a DOM object. 37733 * The container will scroll to the position of this element. 37734 * 3. `ScrollMagic Scene` -> The container will scroll to the start of this scene. 37735 * 4. `function` -> This function will be used for future scroll position modifications. 37736 * This provides a way for you to change the behaviour of scrolling and adding new behaviour like animation. The function receives the new scroll position as a parameter and a reference to the container element using `this`.
37737 * It may also optionally receive an optional additional parameter (see below) 37738 * _**NOTE:** 37739 * All other options will still work as expected, using the new function to scroll._ 37740 * @param {mixed} [additionalParameter] - If a custom scroll function was defined (see above 4.), you may want to supply additional parameters to it, when calling it. You can do this using this parameter â see examples for details. Please note, that this parameter will have no effect, if you use the default scrolling function. 37741 * @returns {Controller} Parent object for chaining. 37742 */ 37743 this.scrollTo = function (scrollTarget, additionalParameter) { 37744 if (_util.type.Number(scrollTarget)) { // excecute 37745 setScrollPos.call(_options.container, scrollTarget, additionalParameter); 37746 } else if (scrollTarget instanceof ScrollMagic.Scene) { // scroll to scene 37747 if (scrollTarget.controller() === Controller) { // check if the controller is associated with this scene 37748 Controller.scrollTo(scrollTarget.scrollOffset(), additionalParameter); 37749 } else { 37750 log(2, "scrollTo(): The supplied scene does not belong to this controller. Scroll cancelled.", scrollTarget); 37751 } 37752 } else if (_util.type.Function(scrollTarget)) { // assign new scroll function 37753 setScrollPos = scrollTarget; 37754 } else { // scroll to element 37755 var elem = _util.get.elements(scrollTarget)[0]; 37756 if (elem) { 37757 // if parent is pin spacer, use spacer position instead so correct start position is returned for pinned elements. 37758 while (elem.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) { 37759 elem = elem.parentNode; 37760 } 37761 37762 var 37763 param = _options.vertical ? "top" : "left", 37764 // which param is of interest ? 37765 containerOffset = _util.get.offset(_options.container), 37766 // container position is needed because element offset is returned in relation to document, not in relation to container. 37767 elementOffset = _util.get.offset(elem); 37768 37769 if (!_isDocument) { // container is not the document root, so substract scroll Position to get correct trigger element position relative to scrollcontent 37770 containerOffset[param] -= Controller.scrollPos(); 37771 } 37772 37773 Controller.scrollTo(elementOffset[param] - containerOffset[param], additionalParameter); 37774 } else { 37775 log(2, "scrollTo(): The supplied argument is invalid. Scroll cancelled.", scrollTarget); 37776 } 37777 } 37778 return Controller; 37779 }; 37780 37781 /** 37782 * **Get** the current scrollPosition or **Set** a new method to calculate it. 37783 * -> **GET**: 37784 * When used as a getter this function will return the current scroll position. 37785 * To get a cached value use Controller.info("scrollPos"), which will be updated in the update cycle. 37786 * For vertical controllers it will return the top scroll offset and for horizontal applications it will return the left offset. 37787 * 37788 * -> **SET**: 37789 * When used as a setter this method prodes a way to permanently overwrite the controller's scroll position calculation. 37790 * A typical usecase is when the scroll position is not reflected by the containers scrollTop or scrollLeft values, but for example by the inner offset of a child container. 37791 * Moving a child container inside a parent is a commonly used method for several scrolling frameworks, including iScroll. 37792 * By providing an alternate calculation function you can make sure ScrollMagic receives the correct scroll position. 37793 * Please also bear in mind that your function should return y values for vertical scrolls an x for horizontals. 37794 * 37795 * To change the current scroll position please use `Controller.scrollTo()`. 37796 * @public 37797 * 37798 * @example 37799 * // get the current scroll Position 37800 * var scrollPos = controller.scrollPos(); 37801 * 37802 * // set a new scroll position calculation method 37803 * controller.scrollPos(function () { 37804 * return this.info("vertical") ? -mychildcontainer.y : -mychildcontainer.x 37805 * }); 37806 * 37807 * @param {function} [scrollPosMethod] - The function to be used for the scroll position calculation of the container. 37808 * @returns {(number|Controller)} Current scroll position or parent object for chaining. 37809 */ 37810 this.scrollPos = function (scrollPosMethod) { 37811 if (!arguments.length) { // get 37812 return getScrollPos.call(Controller); 37813 } else { // set 37814 if (_util.type.Function(scrollPosMethod)) { 37815 getScrollPos = scrollPosMethod; 37816 } else { 37817 log(2, "Provided value for method 'scrollPos' is not a function. To change the current scroll position use 'scrollTo()'."); 37818 } 37819 } 37820 return Controller; 37821 }; 37822 37823 /** 37824 * **Get** all infos or one in particular about the controller. 37825 * @public 37826 * @example 37827 * // returns the current scroll position (number) 37828 * var scrollPos = controller.info("scrollPos"); 37829 * 37830 * // returns all infos as an object 37831 * var infos = controller.info(); 37832 * 37833 * @param {string} [about] - If passed only this info will be returned instead of an object c
37833ontaining all. 37834 Valid options are: 37835 ** `"size"` => the current viewport size of the container 37836 ** `"vertical"` => true if vertical scrolling, otherwise false 37837 ** `"scrollPos"` => the current scroll position 37838 ** `"scrollDirection"` => the last known direction of the scroll 37839 ** `"container"` => the container element 37840 ** `"isDocument"` => true if container element is the document. 37841 * @returns {(mixed|object)} The requested info(s). 37842 */ 37843 this.info = function (about) { 37844 var values = { 37845 size: _viewPortSize, 37846 // contains height or width (in regard to orientation); 37847 vertical: _options.vertical, 37848 scrollPos: _scrollPos, 37849 scrollDirection: _scrollDirection, 37850 container: _options.container, 37851 isDocument: _isDocument 37852 }; 37853 if (!arguments.length) { // get all as an object 37854 return values; 37855 } else if (values[about] !== undefined) { 37856 return values[about]; 37857 } else { 37858 log(1, "ERROR: option \"" + about + "\" is not available"); 37859 return; 37860 } 37861 }; 37862 37863 /** 37864 * **Get** or **Set** the current loglevel option value. 37865 * @public 37866 * 37867 * @example 37868 * // get the current value 37869 * var loglevel = controller.loglevel(); 37870 * 37871 * // set a new value 37872 * controller.loglevel(3); 37873 * 37874 * @param {number} [newLoglevel] - The new loglevel setting of the Controller. `[0-3]` 37875 * @returns {(number|Controller)} Current loglevel or parent object for chaining. 37876 */ 37877 this.loglevel = function (newLoglevel) { 37878 if (!arguments.length) { // get 37879 return _options.loglevel; 37880 } else if (_options.loglevel != newLoglevel) { // set 37881 _options.loglevel = newLoglevel; 37882 } 37883 return Controller; 37884 }; 37885 37886 /** 37887 * **Get** or **Set** the current enabled state of the controller. 37888 * This can be used to disable all Scenes connected to the controller without destroying or removing them. 37889 * @public 37890 * 37891 * @example 37892 * // get the current value 37893 * var enabled = controller.enabled(); 37894 * 37895 * // disable the controller 37896 * controller.enabled(false); 37897 * 37898 * @param {boolean} [newState] - The new enabled state of the controller `true` or `false`. 37899 * @returns {(boolean|Controller)} Current enabled state or parent object for chaining. 37900 */ 37901 this.enabled = function (newState) { 37902 if (!arguments.length) { // get 37903 return _enabled; 37904 } else if (_enabled != newState) { // set 37905 _enabled = !! newState; 37906 Controller.updateScene(_sceneObjects, true); 37907 } 37908 return Controller; 37909 }; 37910 37911 /** 37912 * Destroy the Controller, all Scenes and everything. 37913 * @public 37914 * 37915 * @example 37916 * // without resetting the scenes 37917 * controller = controller.destroy(); 37918 * 37919 * // with scene reset 37920 * controller = controller.destroy(true); 37921 * 37922 * @param {boolean} [resetScenes=false] - If `true` the pins and tweens (if existent) of all scenes will be reset. 37923 * @returns {null} Null to unset handler variables. 37924 */ 37925 this.destroy = function (resetScenes) { 37926 window.clearTimeout(_refreshTimeout); 37927 var i = _sceneObjects.length; 37928 while (i--) { 37929 _sceneObjects[i].destroy(resetScenes); 37930 } 37931 _options.container.removeEventListener("resize", onChange); 37932 _options.container.removeEventListener("scroll", onChange); 37933 _util.cAF(_updateTimeout); 37934 log(3, "destroyed " + NAMESPACE + " (reset: " + (resetScenes ? "true" : "false") + ")"); 37935 return null; 37936 }; 37937 37938 // INIT 37939 construct(); 37940 return Controller; 37941 }; 37942 37943 // store pagewide controller options 37944 var CONTROLLER_OPTIONS = { 37945 defaults: { 37946 container: window, 37947 vertical: true, 37948 globalSceneOptions: {}, 37949 loglevel: 2, 37950 refreshInterval: 100 37951 } 37952 }; 37953/* 37954 * method used to add an option to ScrollMagic Scenes. 37955 */ 37956 ScrollMagic.Controller.addOption = function (name, defaultValue) { 37957 CONTROLLER_OPTIONS.defaults[name] = defaultValue; 37958 }; 37959 // instance extension function for plugins 37960 ScrollMagic.Controller.extend = function (extension) { 37961 var oldClass = this; 37962 ScrollMagic.Controller = function () { 37963 oldClass.apply(this, arguments); 37964 this.$super = _util.extend({}, this); // copy parent state 37965 return extension.apply(this, arguments) || this; 37966 }; 37967 _util.extend(ScrollMagic.Controller, oldClass); // copy properties 37968 ScrollMagic.Controller.prototype = oldClass.prototype; // copy prototype 37969 ScrollMagic.Controller.prototype.constructor = ScrollMagic.Controller; // restore constructor 37970 }; 37971 37972 37973 /** 37974 * A Scene defines where the controller should react and how. 37975 * 37976 * @class 37977 * 37978 * @example 37979 * // create a standard scene and add it to a controller 37980 * new ScrollMagic.Scene() 37981 * .addTo(controller); 37982 * 37983 * // create a scene with custom options and assign a handler to it. 37984 * var scene = new ScrollMagic.Scene({ 37985 * duration: 100, 37986 * offset: 200, 37987 * triggerHook: "onEnter", 37988 * reverse: false 37989 * }); 37990 * 37991 * @param {object} [options] - Options for the Scene. The options can be updated at any time. 37992 Instead of setting the options for each scene individually you can also set them globally in the controller as the controllers `globalSceneOptions` option. The object accepts the same properties as the ones below. 37993 When a scene is added to the controller the options defined using the Scene constructor will be overwritten by those set in `globalSceneOptions`. 37994 * @param {(number|function)} [options.duration=0] - The duration of the scene. 37995 If `0` tweens will auto-play when reaching the scene start point, pins will be pinned indefinetly starting at the start position. 37996 A function retuning the duration value is also supported. Please see `Scene.duration()` for details. 37997 * @param {number} [options.offset=0] - Offset Value for the Trigger Position. If no triggerElement is defined this will be the scroll distance from the start of the page, after which the scene will start. 37998 * @param {(string|object)} [options.triggerElement=null] - Selector or DOM object that defines the start of the scene. If undefined the scene will start right at the start of the page (unless an offset is set). 37999 * @param {(number|string)} [options.triggerHook="onCenter"] - Can be a number between 0 and 1 defining the position of the trigger Hook in relation to the viewport.
38000 Can also be defined using a string: 38001 ** `"onEnter"` => `1` 38002 ** `"onCenter"` => `0.5` 38003 ** `"onLeave"` => `0` 38004 * @param {boolean} [options.reverse=true] - Should the scene reverse, when scrolling up? 38005 * @param {number} [options.loglevel=2] - Loglevel for debugging. Note that logging is disabled in the minified version of ScrollMagic. 38006 ** `0` => silent 38007 ** `1` => errors 38008 ** `2` => errors, warnings 38009 ** `3` => errors, warnings, debuginfo 38010 * 38011 */ 38012 ScrollMagic.Scene = function (options) { 38013 38014/* 38015 * ---------------------------------------------------------------- 38016 * settings 38017 * ---------------------------------------------------------------- 38018 */ 38019 38020 var 38021 NAMESPACE = 'ScrollMagic.Scene', 38022 SCENE_STATE_BEFORE = 'BEFORE', 38023 SCENE_STATE_DURING = 'DURING', 38024 SCENE_STATE_AFTER = 'AFTER', 38025 DEFAULT_OPTIONS = SCENE_OPTIONS.defaults; 38026 38027/* 38028 * ---------------------------------------------------------------- 38029 * private vars 38030 * ---------------------------------------------------------------- 38031 */ 38032 38033 var 38034 Scene = this, 38035 _options = _util.extend({}, DEFAULT_OPTIONS, options), 38036 _state = SCENE_STATE_BEFORE, 38037 _progress = 0, 38038 _scrollOffset = { 38039 start: 0, 38040 end: 0 38041 }, 38042 // reflects the controllers's scroll position for the start and end of the scene respectively 38043 _triggerPos = 0, 38044 _enabled = true, 38045 _durationUpdateMethod, _controller; 38046 38047 /** 38048 * Internal constructor function of the ScrollMagic Scene 38049 * @private 38050 */ 38051 var construct = function () { 38052 for (var key in _options) { // check supplied options 38053 if (!DEFAULT_OPTIONS.hasOwnProperty(key)) { 38054 log(2, "WARNING: Unknown option \"" + key + "\""); 38055 delete _options[key]; 38056 } 38057 } 38058 // add getters/setters for all possible options 38059 for (var optionName in DEFAULT_OPTIONS) { 38060 addSceneOption(optionName); 38061 } 38062 // validate all options 38063 validateOption(); 38064 }; 38065 38066/* 38067 * ---------------------------------------------------------------- 38068 * Event Management 38069 * ---------------------------------------------------------------- 38070 */ 38071 38072 var _listeners = {}; 38073 /** 38074 * Scene start event. 38075 * Fires whenever the scroll position its the starting point of the scene. 38076 * It will also fire when scrolling back up going over the start position of the scene. If you want something to happen only when scrolling down/right, use the scrollDirection parameter passed to the callback. 38077 * 38078 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 38079 * 38080 * @event ScrollMagic.Scene#start 38081 * 38082 * @example 38083 * scene.on("start", function (event) { 38084 * console.log("Hit start point of scene."); 38085 * }); 38086 * 38087 * @property {object} event - The event Object passed to each callback 38088 * @property {string} event.type - The name of the event 38089 * @property {Scene} event.target - The Scene object that triggered this event 38090 * @property {number} event.progress - Reflects the current progress of the scene 38091 * @property {string} event.state - The current state of the scene `"BEFORE"` or `"DURING"` 38092 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 38093 */ 38094 /** 38095 * Scene end event. 38096 * Fires whenever the scroll position its the ending point of the scene. 38097 * It will also fire when scrolling back up from after the scene and going over its end position. If you want something to happen only when scrolling down/right, use the scrollDirection parameter passed to the callback. 38098 * 38099 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 38100 * 38101 * @event ScrollMagic.Scene#end 38102 * 38103 * @example 38104 * scene.on("end", function (event) { 38105 * console.log("Hit end point of scene."); 38106 * }); 38107 * 38108 * @property {object} event - The event Object passed to each callback 38109 * @property {string} event.type - The name of the event 38110 * @property {Scene} event.target - The Scene object that triggered this event 38111 * @property {number} event.progress - Reflects the current progress of the scene 38112 * @property {string} event.state - The current state of the scene `"DURING"` or `"AFTER"` 38113 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 38114 */ 38115 /** 38116 * Scene enter event. 38117 * Fires whenever the scene enters the "DURING" state. 38118 * Keep in mind that it doesn't matter if the scene plays forward or backward: This event al
38118ways fires when the scene enters its active scroll timeframe, regardless of the scroll-direction. 38119 * 38120 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 38121 * 38122 * @event ScrollMagic.Scene#enter 38123 * 38124 * @example 38125 * scene.on("enter", function (event) { 38126 * console.log("Scene entered."); 38127 * }); 38128 * 38129 * @property {object} event - The event Object passed to each callback 38130 * @property {string} event.type - The name of the event 38131 * @property {Scene} event.target - The Scene object that triggered this event 38132 * @property {number} event.progress - Reflects the current progress of the scene 38133 * @property {string} event.state - The current state of the scene - always `"DURING"` 38134 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 38135 */ 38136 /** 38137 * Scene leave event. 38138 * Fires whenever the scene's state goes from "DURING" to either "BEFORE" or "AFTER". 38139 * Keep in mind that it doesn't matter if the scene plays forward or backward: This event always fires when the scene leaves its active scroll timeframe, regardless of the scroll-direction. 38140 * 38141 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 38142 * 38143 * @event ScrollMagic.Scene#leave 38144 * 38145 * @example 38146 * scene.on("leave", function (event) { 38147 * console.log("Scene left."); 38148 * }); 38149 * 38150 * @property {object} event - The event Object passed to each callback 38151 * @property {string} event.type - The name of the event 38152 * @property {Scene} event.target - The Scene object that triggered this event 38153 * @property {number} event.progress - Reflects the current progress of the scene 38154 * @property {string} event.state - The current state of the scene `"BEFORE"` or `"AFTER"` 38155 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 38156 */ 38157 /** 38158 * Scene update event. 38159 * Fires whenever the scene is updated (but not necessarily changes the progress). 38160 * 38161 * @event ScrollMagic.Scene#update 38162 * 38163 * @example 38164 * scene.on("update", function (event) { 38165 * console.log("Scene updated."); 38166 * }); 38167 * 38168 * @property {object} event - The event Object passed to each callback 38169 * @property {string} event.type - The name of the event 38170 * @property {Scene} event.target - The Scene object that triggered this event 38171 * @property {number} event.startPos - The starting position of the scene (in relation to the conainer) 38172 * @property {number} event.endPos - The ending position of the scene (in relation to the conainer) 38173 * @property {number} event.scrollPos - The current scroll position of the container 38174 */ 38175 /** 38176 * Scene progress event. 38177 * Fires whenever the progress of the scene changes. 38178 * 38179 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 38180 * 38181 * @event ScrollMagic.Scene#progress 38182 * 38183 * @example 38184 * scene.on("progress", function (event) { 38185 * console.log("Scene progress changed to " + event.progress); 38186 * }); 38187 * 38188 * @property {object} event - The event Object passed to each callback 38189 * @property {string} event.type - The name of the event 38190 * @property {Scene} event.target - The Scene object that triggered this event 38191 * @property {number} event.progress - Reflects the current progress of the scene 38192 * @property {string} event.state - The current state of the scene `"BEFORE"`, `"DURING"` or `"AFTER"` 38193 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 38194 */ 38195 /** 38196 * Scene change event. 38197 * Fires whenvever a property of the scene is changed. 38198 * 38199 * @event ScrollMagic.Scene#change 38200 * 38201 * @example 38202 * scene.on("change", function (event) { 38203 * console.log("Scene Property \"" + event.what + "\" changed to " + event.newval); 38204 * }); 38205 * 38206 * @property {object} event - The event Object passed to each callback 38207 * @property {string} event.type - The name of the event 38208 * @property {Scene} event.target - The Scene object that triggered this event 38209 * @property {string} event.what - Indicates what value has been changed 38210 * @property {mixed} event.newval - The new value of the changed property 38211 */ 38212 /** 38213 * Scene shift event. 38214 * Fires whenvever the start or end **scroll offset** of the scene change. 38215 * This happens explicitely, when one of these values change: `offset`, `duration` or `triggerHook`. 38216 * It will fire implicitly when the `triggerElement` changes, if the new element has a different position (most cases). 38217 * It will also fire implicitly when the size of the container changes and the triggerHook is anything other than `onLeave`. 38218 * 38219 * @event ScrollMagic.Scene#shift 38220 * @since 1.1.0 38221 * 38222 * @example 38223 * scene.on("shift", function (event) { 38224 * console.log("Scene moved, because the " + event.reason + " has changed.)"); 38225 * }); 38226 * 38227 * @property {object} event - The event Object passed to each callback 38228 * @property {string} event.type - The name of the event 38229 * @property {Scene} event.target - The Scene object that triggered this event 38230 * @property {string} event.reason - Indicates why the scene has shifted 38231 */ 38232 /** 38233 * Scene destroy event. 38234 * Fires whenvever the scene is destroyed. 38235 * This can be used to tidy up custom behaviour used in events. 38236 * 38237 * @event ScrollMagic.Scene#destroy 38238 * @since 1.1.0 38239 * 38240 * @example 38241 * scene.on("enter", function (event) { 38242 * // add custom action 38243 * $("#my-elem").left("200"); 38244 * }) 38245 * .on("destroy", function (event) { 38246 * // reset my element to start position 38247 * if (event.reset) { 38248 * $("#my-elem").left("0"); 38249 * } 38250 * }); 38251 * 38252 * @property {object} event - The event Object passed to each callback 38253 * @property {string} event.type - The name of the event 38254 * @property {Scene} event.target - The Scene object that triggered this event 38255 * @property {boolean} event.reset - Indicates if the destroy method was called with reset `true` or `false`. 38256 */ 38257 /** 38258 * Scene add event. 38259 * Fires when the scene is added to a controller. 38260 * This is mostly used by plugins to know that change might be due. 38261 * 38262 * @event ScrollMagic.Scene#add 38263 * @since 2.0.0 38264 * 38265 * @example 38266 * scene.on("add", function (event) { 38267 * console.log('Scene was added to a new controller.'); 38268 * }); 38269 * 38270 * @property {object} event - The event Object passed to each callback 38271 * @property {string} event.type - The name of the event 38272 * @property {Scene} event.target - The Scene object that triggered this event 38273 * @property {boolean} event.controller - The controller object the scene was added to. 38274 */ 38275 /** 38276 * Scene remove event. 38277 * Fires when the scene is removed from a controller. 38278 * This is mostly used by plugins to know that change might be due. 38279 * 38280 * @event ScrollMagic.Scene#remove 38281 * @since 2.0.0 38282 * 38283 * @example 38284 * scene.on("remove", function (event) { 38285 * console.log('Scene was removed from its controller.'); 38286 * }); 38287 * 38288 * @property {object} event - The event Object passed to each callback 38289 * @property {string} event.type - The name of the event 38290 * @property {Scene} event.target - The Scene object that triggered this event 38291 */ 38292 38293 /** 38294 * Add one ore more event listener. 38295 * The callback function will be fired at the respective event, and an object c
38295ontaining relevant data will be passed to the callback. 38296 * @method ScrollMagic.Scene#on 38297 * 38298 * @example 38299 * function callback (event) { 38300 * console.log("Event fired! (" + event.type + ")"); 38301 * } 38302 * // add listeners 38303 * scene.on("change update progress start end enter leave", callback); 38304 * 38305 * @param {string} names - The name or names of the event the callback should be attached to. 38306 * @param {function} callback - A function that should be executed, when the event is dispatched. An event object will be passed to the callback. 38307 * @returns {Scene} Parent object for chaining. 38308 */ 38309 this.on = function (names, callback) { 38310 if (_util.type.Function(callback)) { 38311 names = names.trim().split(' '); 38312 names.forEach(function (fullname) { 38313 var 38314 nameparts = fullname.split('.'), 38315 eventname = nameparts[0], 38316 namespace = nameparts[1]; 38317 if (eventname != "*") { // disallow wildcards 38318 if (!_listeners[eventname]) { 38319 _listeners[eventname] = []; 38320 } 38321 _listeners[eventname].push({ 38322 namespace: namespace || '', 38323 callback: callback 38324 }); 38325 } 38326 }); 38327 } else { 38328 log(1, "ERROR when calling '.on()': Supplied callback for '" + names + "' is not a valid function!"); 38329 } 38330 return Scene; 38331 }; 38332 38333 /** 38334 * Remove one or more event listener. 38335 * @method ScrollMagic.Scene#off 38336 * 38337 * @example 38338 * function callback (event) { 38339 * console.log("Event fired! (" + event.type + ")"); 38340 * } 38341 * // add listeners 38342 * scene.on("change update", callback); 38343 * // remove listeners 38344 * scene.off("change update", callback); 38345 * 38346 * @param {string} names - The name or names of the event that should be removed. 38347 * @param {function} [callback] - A specific callback function that should be removed. If none is passed all callbacks to the event listener will be removed. 38348 * @returns {Scene} Parent object for chaining. 38349 */ 38350 this.off = function (names, callback) { 38351 if (!names) { 38352 log(1, "ERROR: Invalid event name supplied."); 38353 return Scene; 38354 } 38355 names = names.trim().split(' '); 38356 names.forEach(function (fullname, key) { 38357 var 38358 nameparts = fullname.split('.'), 38359 eventname = nameparts[0], 38360 namespace = nameparts[1] || '', 38361 removeList = eventname === '*' ? Object.keys(_listeners) : [eventname]; 38362 removeList.forEach(function (remove) { 38363 var 38364 list = _listeners[remove] || [], 38365 i = list.length; 38366 while (i--) { 38367 var listener = list[i]; 38368 if (listener && (namespace === listener.namespace || namespace === '*') && (!callback || callback == listener.callback)) { 38369 list.splice(i, 1); 38370 } 38371 } 38372 if (!list.length) { 38373 delete _listeners[remove]; 38374 } 38375 }); 38376 }); 38377 return Scene; 38378 }; 38379 38380 /** 38381 * Trigger an event. 38382 * @method ScrollMagic.Scene#trigger 38383 * 38384 * @example 38385 * this.trigger("change"); 38386 * 38387 * @param {string} name - The name of the event that should be triggered. 38388 * @param {object} [vars] - An object containing info that should be passed to the callback. 38389 * @returns {Scene} Parent object for chaining. 38390 */ 38391 this.trigger = function (name, vars) { 38392 if (name) { 38393 var 38394 nameparts = name.trim().split('.'), 38395 eventname = nameparts[0], 38396 namespace = nameparts[1], 38397 listeners = _listeners[eventname]; 38398 log(3, 'event fired:', eventname, vars ? "->" : '', vars || ''); 38399 if (listeners) { 38400 listeners.forEach(function (listener, key) { 38401 if (!namespace || namespace === listener.namespace) { 38402 listener.callback.call(Scene, new ScrollMagic.Event(eventname, listener.namespace, Scene, vars)); 38403 } 38404 }); 38405 } 38406 } else { 38407 log(1, "ERROR: Invalid event name supplied."); 38408 } 38409 return Scene; 38410 }; 38411 38412 // set event listeners 38413 Scene.on("change.internal", function (e) { 38414 if (e.what !== "loglevel" && e.what !== "tweenChanges") { // no need for a scene update scene with these options... 38415 if (e.what === "triggerElement") { 38416 updateTriggerElementPosition(); 38417 } else if (e.what === "reverse") { // the only property left that may have an impact on the current scene state. Everything else is handled by the shift event.
38418 Scene.update(); 38419 } 38420 } 38421 }).on("shift.internal", function (e) { 38422 updateScrollOffset(); 38423 Scene.update(); // update scene to reflect new position 38424 }); 38425 38426 /** 38427 * Send a debug message to the console. 38428 * @private 38429 * but provided publicly with _log for plugins 38430 * 38431 * @param {number} loglevel - The loglevel required to initiate output for the message. 38432 * @param {...mixed} output - One or more variables that should be passed to the console. 38433 */ 38434 var log = this._log = function (loglevel, output) { 38435 if (_options.loglevel >= loglevel) { 38436 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ") ->"); 38437 _util.log.apply(window, arguments); 38438 } 38439 }; 38440 38441 /** 38442 * Add the scene to a controller. 38443 * This is the equivalent to `Controller.addScene(scene)`. 38444 * @method ScrollMagic.Scene#addTo 38445 * 38446 * @example 38447 * // add a scene to a ScrollMagic Controller 38448 * scene.addTo(controller); 38449 * 38450 * @param {ScrollMagic.Controller} controller - The controller to which the scene should be added. 38451 * @returns {Scene} Parent object for chaining. 38452 */ 38453 this.addTo = function (controller) { 38454 if (!(controller instanceof ScrollMagic.Controller)) { 38455 log(1, "ERROR: supplied argument of 'addTo()' is not a valid ScrollMagic Controller"); 38456 } else if (_controller != controller) { 38457 // new controller 38458 if (_controller) { // was associated to a different controller before, so remove it... 38459 _controller.removeScene(Scene); 38460 } 38461 _controller = controller; 38462 validateOption(); 38463 updateDuration(true); 38464 updateTriggerElementPosition(true); 38465 updateScrollOffset(); 38466 _controller.info("container").addEventListener('resize', onContainerResize); 38467 controller.addScene(Scene); 38468 Scene.trigger("add", { 38469 controller: _controller 38470 }); 38471 log(3, "added " + NAMESPACE + " to controller"); 38472 Scene.update(); 38473 } 38474 return Scene; 38475 }; 38476 38477 /** 38478 * **Get** or **Set** the current enabled state of the scene. 38479 * This can be used to disable this scene without removing or destroying it. 38480 * @method ScrollMagic.Scene#enabled 38481 * 38482 * @example 38483 * // get the current value 38484 * var enabled = scene.enabled(); 38485 * 38486 * // disable the scene 38487 * scene.enabled(false); 38488 * 38489 * @param {boolean} [newState] - The new enabled state of the scene `true` or `false`. 38490 * @returns {(boolean|Scene)} Current enabled state or parent object for chaining. 38491 */ 38492 this.enabled = function (newState) { 38493 if (!arguments.length) { // get 38494 return _enabled; 38495 } else if (_enabled != newState) { // set 38496 _enabled = !! newState; 38497 Scene.update(true); 38498 } 38499 return Scene; 38500 }; 38501 38502 /** 38503 * Remove the scene from the controller. 38504 * This is the equivalent to `Controller.removeScene(scene)`. 38505 * The scene will not be updated anymore until you readd it to a controller. 38506 * To remove the pin or the tween you need to call removeTween() or removePin() respectively. 38507 * @method ScrollMagic.Scene#remove 38508 * @example 38509 * // remove the scene from its controller 38510 * scene.remove(); 38511 * 38512 * @returns {Scene} Parent object for chaining. 38513 */ 38514 this.remove = function () { 38515 if (_controller) { 38516 _controller.info("container").removeEventListener('resize', onContainerResize); 38517 var tmpParent = _controller; 38518 _controller = undefined; 38519 tmpParent.removeScene(Scene); 38520 Scene.trigger("remove"); 38521 log(3, "removed " + NAMESPACE + " from controller"); 38522 } 38523 return Scene; 38524 }; 38525 38526 /** 38527 * Destroy the scene and everything. 38528 * @method ScrollMagic.Scene#destroy 38529 * @example 38530 * // destroy the scene without resetting the pin and tween to their initial positions 38531 * scene = scene.destroy(); 38532 * 38533 * // destroy the scene and reset the pin and tween 38534 * scene = scene.destroy(true); 38535 * 38536 * @param {boolean} [reset=false] - If `true` the pin and tween (if existent) will be reset. 38537 * @returns {null} Null to unset handler variables. 38538 */ 38539 this.destroy = function (reset) { 38540 Scene.trigger("destroy", { 38541 reset: reset 38542 }); 38543 Scene.remove(); 38544 Scene.off("*.*"); 38545 log(3, "destroyed " + NAMESPACE + " (reset: " + (reset ? "true" : "false") + ")"); 38546 return null; 38547 }; 38548 38549 38550 /** 38551 * Updates the Scene to reflect the current state. 38552 * This is the equivalent to `Controller.updateScene(scene, immediately)`. 38553 * The update method calculates the scene's start and end position (based on the trigger element, trigger hook, duration and offset) and checks it against the current scroll position of the container. 38554 * It then updates the current scene state accordingly (or does nothing, if the state is already correct) â Pins will be set to their correct position and tweens will be updated to their correct progress. 38555 * This means an update doesn't necessarily result in a progress change. The `progress` event will be fired if the progress has indeed changed between this update and the last. 38556 * _**NOTE:** This method gets called constantly whenever ScrollMagic detects a change. The only application for you is
38556if you change something outside of the realm of ScrollMagic, like moving the trigger or changing tween parameters._ 38557 * @method ScrollMagic.Scene#update 38558 * @example 38559 * // update the scene on next tick 38560 * scene.update(); 38561 * 38562 * // update the scene immediately 38563 * scene.update(true); 38564 * 38565 * @fires Scene.update 38566 * 38567 * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle (better performance). 38568 * @returns {Scene} Parent object for chaining. 38569 */ 38570 this.update = function (immediately) { 38571 if (_controller) { 38572 if (immediately) { 38573 if (_controller.enabled() && _enabled) { 38574 var 38575 scrollPos = _controller.info("scrollPos"), 38576 newProgress; 38577 38578 if (_options.duration > 0) { 38579 newProgress = (scrollPos - _scrollOffset.start) / (_scrollOffset.end - _scrollOffset.start); 38580 } else { 38581 newProgress = scrollPos >= _scrollOffset.start ? 1 : 0; 38582 } 38583 38584 Scene.trigger("update", { 38585 startPos: _scrollOffset.start, 38586 endPos: _scrollOffset.end, 38587 scrollPos: scrollPos 38588 }); 38589 38590 Scene.progress(newProgress); 38591 } else if (_pin && _state === SCENE_STATE_DURING) { 38592 updatePinState(true); // unpin in position 38593 } 38594 } else { 38595 _controller.updateScene(Scene, false); 38596 } 38597 } 38598 return Scene; 38599 }; 38600 38601 /** 38602 * Updates dynamic scene variables like the trigger element position or the duration. 38603 * This method is automatically called in regular intervals from the controller. See {@link ScrollMagic.Controller} option `refreshInterval`. 38604 * 38605 * You can call it to minimize lag, for example when you intentionally change the position of the triggerElement. 38606 * If you don't it will simply be updated in the next refresh interval of the container, which is usually sufficient. 38607 * 38608 * @method ScrollMagic.Scene#refresh 38609 * @since 1.1.0 38610 * @example 38611 * scene = new ScrollMagic.Scene({triggerElement: "#trigger"}); 38612 * 38613 * // change the position of the trigger 38614 * $("#trigger").css("top", 500); 38615 * // immediately let the scene know of this change 38616 * scene.refresh(); 38617 * 38618 * @fires {@link Scene.shift}, if the trigger element position or the duration changed 38619 * @fires {@link Scene.change}, if the duration changed 38620 * 38621 * @returns {Scene} Parent object for chaining. 38622 */ 38623 this.refresh = function () { 38624 updateDuration(); 38625 updateTriggerElementPosition(); 38626 // update trigger element position 38627 return Scene; 38628 }; 38629 38630 /** 38631 * **Get** or **Set** the scene's progress. 38632 * Usually it shouldn't be necessary to use this as a setter, as it is set automatically by scene.update(). 38633 * The order in which the events are fired depends on the duration of the scene: 38634 * 1. Scenes with `duration == 0`: 38635 * Scenes that have no duration by definition have no ending. Thus the `end` event will never be fired. 38636 * When the trigger position of the scene is passed the events are always fired in this order: 38637 * `enter`, `start`, `progress` when scrolling forward 38638 * and 38639 * `progress`, `start`, `leave` when scrolling in reverse 38640 * 2. Scenes with `duration > 0`: 38641 * Scenes with a set duration have a defined start and end point. 38642 * When scrolling past the start position of the scene it will fire these events in this order: 38643 * `enter`, `start`, `progress` 38644 * When continuing to scroll and passing the end point it will fire these events: 38645 * `progress`, `end`, `leave` 38646 * When reversing through the end point these events are fired: 38647 * `enter`, `end`, `progress` 38648 * And when continuing to scroll past the start position in reverse it will fire: 38649 * `progress`, `start`, `leave` 38650 * In between start and end the `progress` event will be called constantly, whenever the progress changes. 38651 * 38652 * In short: 38653 * `enter` events will always trigger **before** the progress update and `leave` envents will trigger **after** the progress update. 38654 * `start` and `end` will always trigger at their respective position. 38655 * 38656 * Please review the event descriptions for details on the events and the event object that is passed to the callback. 38657 * 38658 * @method ScrollMagic.Scene#progress 38659 * @example 38660 * // get the current scene progress 38661 * var progress = scene.progress(); 38662 * 38663 * // set new scene progress 38664 * scene.progress(0.3); 38665 * 38666 * @fires {@link Scene.enter}, when used as setter 38667 * @fires {@link Scene.start}, when used as setter 38668 * @fires {@link Scene.progress}, when used as setter 38669 * @fires {@link Scene.end}, when used as setter 38670 * @fires {@link Scene.leave}, when used as setter 38671 * 38672 * @param {number} [progress] - The new progress value of the scene `[0-1]`. 38673 * @returns {number} `get` - Current scene progress. 38674 * @returns {Scene} `set` - Parent object for chaining. 38675 */ 38676 this.progress = function (progress) { 38677 if (!arguments.length) { // get 38678 return _progress; 38679 } else { // set 38680 var 38681 doUpdate = false, 38682 oldState = _state, 38683 scrollDirection = _controller ? _controller.info("scrollDirection") : 'PAUSED', 38684 reverseOrForward = _options.reverse || progress >= _progress; 38685 if (_options.duration === 0) { 38686 // zero duration scenes 38687 doUpdate = _progress != progress; 38688 _progress = progress < 1 && reverseOrForward ? 0 : 1; 38689 _state = _progress === 0 ? SCENE_STATE_BEFORE : SCENE_STATE_DURING; 38690 } else { 38691 // scenes with start and end 38692 if (progress < 0 && _state !== SCENE_STATE_BEFORE && reverseOrForward) { 38693 // go back to initial state 38694 _progress = 0; 38695 _state = SCENE_STATE_BEFORE; 38696 doUpdate = true; 38697 } else if (progress >= 0 && progress < 1 && reverseOrForward) { 38698 _progress = progress; 38699 _state = SCENE_STATE_DURING; 38700 doUpdate = true; 38701 } else if (progress >= 1 && _state !== SCENE_STATE_AFTER) { 38702 _progress = 1; 38703 _state = SCENE_STATE_AFTER; 38704 doUpdate = true; 38705 } else if (_state === SCENE_STATE_DURING && !reverseOrForward) { 38706 updatePinState(); // in case we scrolled backwards mid-scene and reverse is disabled => update the pin position, so it doesn't move back as well. 38707 } 38708 } 38709 if (doUpdate) { 38710 // fire events 38711 var 38712 eventVars = { 38713 progress: _progress, 38714 state: _state, 38715 scrollDirection: scrollDirection 38716 }, 38717 stateChanged = _state != oldState; 38718 38719 var trigger = function (eventName) { // tmp helper to simplify code 38720 Scene.trigger(eventName, eventVars); 38721 }; 38722 38723 if (stateChanged) { // enter events 38724 if (oldState !== SCENE_STATE_DURING) { 38725 trigger("enter"); 38726 trigger(oldState === SCENE_STATE_BEFORE ? "start" : "end"); 38727 } 38728 } 38729 trigger("progress"); 38730 if (stateChanged) { // leave events 38731 if (_state !== SCENE_STATE_DURING) { 38732 trigger(_state === SCENE_STATE_BEFORE ? "start" : "end"); 38733 trigger("leave"); 38734 } 38735 } 38736 } 38737 38738 return Scene; 38739 } 38740 }; 38741 38742 38743 /** 38744 * Update the start and end scrollOffset of the container. 38745 * The positions reflect what the controller's scroll position will be at the start and end respectively. 38746 * Is called, when: 38747 * - Scene event "change" is called with: offset, triggerHook, duration 38748 * - scroll container event "resize" is called 38749 * - the position of the triggerElement changes 38750 * - the controller changes -> addTo() 38751 * @private 38752 */ 38753 var updateScrollOffset = function () { 38754 _scrollOffset = { 38755 start: _triggerPos + _options.offset 38756 }; 38757 if (_controller && _options.triggerElement) { 38758 // take away triggerHook portion to get relative to top 38759 _scrollOffset.start -= _controller.info("size") * _options.triggerHook; 38760 } 38761 _scrollOffset.end = _scrollOffset.start + _options.duration; 38762 }; 38763 38764 /** 38765 * Updates the duration if set to a dynamic function. 38766 * This method is called when the scene is added to a controller and in regular intervals from the controller through scene.refresh(). 38767 * 38768 * @fires {@link Scene.change}, if the duration changed 38769 * @fires {@link Scene.shift}, if the duration changed 38770 * 38771 * @param {boolean} [suppressEvents=false] - If true the shift event will be suppressed. 38772 * @private 38773 */ 38774 var updateDuration = function (suppressEvents) { 38775 // update duration 38776 if (_durationUpdateMethod) { 38777 var varname = "duration"; 38778 if (changeOption(varname, _durationUpdateMethod.call(Scene)) && !suppressEvents) { // set 38779 Scene.trigger("change", { 38780 what: varname, 38781 newval: _options[varname] 38782 }); 38783 Scene.trigger("shift", { 38784 reason: varname 38785 }); 38786 } 38787 } 38788 }; 38789 38790 /** 38791 * Updates the position of the triggerElement, if present. 38792 * This method is called ... 38793 * - ... when the triggerElement is changed 38794 * - ... when the scene is added to a (new) controller 38795 * - ... in regular intervals from the controller through scene.refresh(). 38796 * 38797 * @fires {@link Scene.shift}, if the position changed 38798 * 38799 * @param {boolean} [suppressEvents=false] - If true the shift event will be suppressed. 38800 * @private 38801 */ 38802 var updateTriggerElementPosition = function (suppressEvents) { 38803 var 38804 elementPos = 0, 38805 telem = _options.triggerElement; 38806 if (_controller && (telem || _triggerPos > 0)) { // either an element exists or was removed and the triggerPos is still > 0 38807 if (telem) { // there currently a triggerElement set 38808 if (telem.parentNode) { // check if element is still attached to DOM 38809 var 38810 controllerInfo = _controller.info(), 38811 containerOffset = _util.get.offset(controllerInfo.container), 38812 // container position is needed because element offset is returned in relation to document, not in relation to container. 38813 param = controllerInfo.vertical ? "top" : "left"; // which param is of interest ? 38814 // if parent is spacer, use spacer position instead so correct start position is returned for pinned elements. 38815 while (telem.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) { 38816 telem = telem.parentNode; 38817 } 38818 38819 var elementOffset = _util.get.offset(telem); 38820 38821 if (!controllerInfo.isDocument) { // container is not the document root, so substract scroll Position to get correct trigger element position relative to scrollcontent 38822 containerOffset[param] -= _controller.scrollPos(); 38823 } 38824 38825 elementPos = elementOffset[param] - containerOffset[param]; 38826 38827 } else { // there was an element, but it was removed from DOM 38828 log(2, "WARNING: triggerElement was removed from DOM and will be reset to", undefined); 38829 Scene.triggerElement(undefined); // unset, so a change event is triggered 38830 } 38831 } 38832 38833 var changed = elementPos != _triggerPos; 38834 _triggerPos = elementPos; 38835 if (changed && !suppressEvents) { 38836 Scene.trigger("shift", { 38837 reason: "triggerElementPosition" 38838 }); 38839 } 38840 } 38841 }; 38842 38843 /** 38844 * Trigger a shift event, when the container is resized and the triggerHook is > 1. 38845 * @private 38846 */ 38847 var onContainerResize = function (e) { 38848 if (_options.triggerHook > 0) { 38849 Scene.trigger("shift", { 38850 reason: "containerResize" 38851 }); 38852 } 38853 }; 38854 38855 38856 var _validate = _util.extend(SCENE_OPTIONS.validate, { 38857 // validation for duration handled internally for reference to private var _durationMethod 38858 duration: function (val) { 38859 if (_util.type.String(val) && val.match(/^(\.|\d)*\d+%$/)) { 38860 // percentage value 38861 var perc = parseFloat(val) / 100; 38862 val = function () { 38863 return _controller ? _controller.info("size") * perc : 0; 38864 }; 38865 } 38866 if (_util.type.Function(val)) { 38867 // function 38868 _durationUpdateMethod = val; 38869 try { 38870 val = parseFloat(_durationUpdateMethod()); 38871 } catch (e) { 38872 val = -1; // will cause error below 38873 } 38874 } 38875 // val has to be float 38876 val = parseFloat(val); 38877 if (!_util.type.Number(val) || val < 0) { 38878 if (_durationUpdateMethod) { 38879 _durationUpdateMethod = undefined; 38880 throw ["Invalid return value of supplied function for option \"duration\":", val]; 38881 } else { 38882 throw ["Invalid value for option \"duration\":", val]; 38883 } 38884 } 38885 return val; 38886 } 38887 }); 38888 38889 /** 38890 * Checks the validity of a specific or all options and reset to default if neccessary. 38891 * @private 38892 */
38893 var validateOption = function (check) { 38894 check = arguments.length ? [check] : Object.keys(_validate); 38895 check.forEach(function (optionName, key) { 38896 var value; 38897 if (_validate[optionName]) { // there is a validation method for this option 38898 try { // validate value 38899 value = _validate[optionName](_options[optionName]); 38900 } catch (e) { // validation failed -> reset to default 38901 value = DEFAULT_OPTIONS[optionName]; 38902 var logMSG = _util.type.String(e) ? [e] : e; 38903 if (_util.type.Array(logMSG)) { 38904 logMSG[0] = "ERROR: " + logMSG[0]; 38905 logMSG.unshift(1); // loglevel 1 for error msg 38906 log.apply(this, logMSG); 38907 } else { 38908 log(1, "ERROR: Problem executing validation callback for option '" + optionName + "':", e.message); 38909 } 38910 } finally { 38911 _options[optionName] = value; 38912 } 38913 } 38914 }); 38915 }; 38916 38917 /** 38918 * Helper used by the setter/getters for scene options 38919 * @private 38920 */ 38921 var changeOption = function (varname, newval) { 38922 var 38923 changed = false, 38924 oldval = _options[varname]; 38925 if (_options[varname] != newval) { 38926 _options[varname] = newval; 38927 validateOption(varname); // resets to default if necessary 38928 changed = oldval != _options[varname]; 38929 } 38930 return changed; 38931 }; 38932 38933 // generate getters/setters for all options 38934 var addSceneOption = function (optionName) { 38935 if (!Scene[optionName]) { 38936 Scene[optionName] = function (newVal) { 38937 if (!arguments.length) { // get 38938 return _options[optionName]; 38939 } else { 38940 if (optionName === "duration") { // new duration is set, so any previously set function must be unset 38941 _durationUpdateMethod = undefined; 38942 } 38943 if (changeOption(optionName, newVal)) { // set 38944 Scene.trigger("change", { 38945 what: optionName, 38946 newval: _options[optionName] 38947 }); 38948 if (SCENE_OPTIONS.shifts.indexOf(optionName) > -1) { 38949 Scene.trigger("shift", { 38950 reason: optionName 38951 }); 38952 } 38953 } 38954 } 38955 return Scene; 38956 }; 38957 } 38958 }; 38959 38960 /** 38961 * **Get** or **Set** the duration option value. 38962 * As a setter it also accepts a function returning a numeric value. 38963 * This is particularly useful for responsive setups. 38964 * 38965 * The duration is updated using the supplied function every time `Scene.refresh()` is called, which happens periodically from the controller (see ScrollMagic.Controller option `refreshInterval`). 38966 * _**NOTE:** Be aware that it's an easy way to kill performance, if you supply a function that has high CPU demand. 38967 * Even for size and position calculations it is recommended to use a variable to cache the value. (see example) 38968 * This counts double if you use the same function for multiple scenes._ 38969 * 38970 * @method ScrollMagic.Scene#duration 38971 * @example 38972 * // get the current duration value 38973 * var duration = scene.duration(); 38974 * 38975 * // set a new duration 38976 * scene.duration(300); 38977 * 38978 * // use a function to automatically adjust the duration to the window height. 38979 * var durationValueCache; 38980 * function getDuration () { 38981 * return durationValueCache; 38982 * } 38983 * function updateDuration (e) { 38984 * durationValueCache = window.innerHeight; 38985 * } 38986 * $(window).on("resize", updateDuration); // update the duration when the window size changes 38987 * $(window).triggerHandler("resize"); // set to initial value 38988 * scene.duration(getDuration); // supply duration method 38989 * 38990 * @fires {@link Scene.change}, when used as setter 38991 * @fires {@link Scene.shift}, when used as setter 38992 * @param {(number|function)} [newDuration] - The new duration of the scene. 38993 * @returns {number} `get` - Current scene duration. 38994 * @returns {Scene} `set` - Parent object for chaining. 38995 */ 38996 38997 /** 38998 * **Get** or **Set** the offset option value. 38999 * @method ScrollMagic.Scene#offset 39000 * @example 39001 * // get the current offset 39002 * var offset = scene.offset(); 39003 * 39004 * // set a new offset 39005 * scene.offset(100); 39006 * 39007 * @fires {@link Scene.change}, when used as setter 39008 * @fires {@link Scene.shift}, when used as setter 39009 * @param {number} [newOffset] - The new offset of the scene. 39010 * @returns {number} `get` - Current scene offset. 39011 * @returns {Scene} `set` - Parent object for chaining. 39012 */ 39013 39014 /** 39015 * **Get** or **Set** the triggerElement option value. 39016 * Does **not** fire `Scene.shift`, because changing the trigger Element doesn't necessarily mean the start position changes. This will be determined in `Scene.refresh()`, which is automatically triggered. 39017 * @method ScrollMagic.Scene#triggerElement 39018 * @example 39019 * // get the current triggerElement 39020 * var triggerElement = scene.triggerElement(); 39021 * 39022 * // set a new triggerElement using a selector 39023 * scene.triggerElement("#trigger"); 39024 * // set a new triggerElement using a DOM object 39025 * scene.triggerElement(document.getElementById("trigger")); 39026 * 39027 * @fires {@link Scene.change}, when used as setter 39028 * @param {(string|object)} [newTriggerElement] - The new trigger element for the scene. 39029 * @returns {(string|object)} `get` - Current triggerElement. 39030 * @returns {Scene} `set` - Parent object for chaining. 39031 */ 39032 39033 /** 39034 * **Get** or **Set** the triggerHook option value. 39035 * @method ScrollMagic.Scene#triggerHook 39036 * @example 39037 * // get the current triggerHook value 39038 * var triggerHook = scene.triggerHook(); 39039 * 39040 * // set a new triggerHook using a string 39041 * scene.triggerHook("onLeave"); 39042 * // set a new triggerHook using a number 39043 * scene.triggerHook(0.7); 39044 * 39045 * @fires {@link Scene.change}, when used as setter 39046 * @fires {@link Scene.shift}, when used as setter 39047 * @param {(number|string)} [newTriggerHook] - The new triggerHook of the scene. See {@link Scene} parameter description for value options. 39048 * @returns {number} `get` - Current triggerHook (ALWAYS numerical). 39049 * @returns {Scene} `set` - Parent object for chaining. 39050 */ 39051 39052 /** 39053 * **Get** or **Set** the reverse option value. 39054 * @method ScrollMagic.Scene#reverse 39055 * @example 39056 * // get the current reverse option 39057 * var reverse = scene.reverse(); 39058 * 39059 * // set new reverse option 39060 * scene.reverse(false); 39061 * 39062 * @fires {@link Scene.change}, when used as setter 39063 * @param {boolean} [newReverse] - The new reverse setting of the scene. 39064 * @returns {boolean} `get` - Current reverse option value. 39065 * @returns {Scene} `set` - Parent object for chaining. 39066 */ 39067 39068 /** 39069 * **Get** or **Set** the loglevel option value. 39070 * @method ScrollMagic.Scene#loglevel 39071 * @example 39072 * // get the current loglevel 39073 * var loglevel = scene.loglevel(); 39074 * 39075 * // set new loglevel 39076 * scene.loglevel(3); 39077 * 39078 * @fires {@link Scene.change}, when used as setter 39079 * @param {number} [newLoglevel] - The new loglevel setting of the scene. `[0-3]` 39080 * @returns {number} `get` - Current loglevel. 39081 * @returns {Scene} `set` - Parent object for chaining. 39082 */ 39083 39084 /** 39085 * **Get** the associated controller. 39086 * @method ScrollMagic.Scene#controller 39087 * @example 39088 * // get the controller of a scene 39089 * var controller = scene.controller(); 39090 * 39091 * @returns {ScrollMagic.Controller} Parent controller or `undefined` 39092 */ 39093 this.controller = function () { 39094 return _controller; 39095 }; 39096 39097 /** 39098 * **Get** the current state. 39099 * @method ScrollMagic.Scene#state 39100 * @example 39101 * // get the current state 39102 * var state = scene.state(); 39103 * 39104 * @returns {string} `"BEFORE"`, `"DURING"` or `"AFTER"` 39105 */ 39106 this.state = function () { 39107 return _state; 39108 }; 39109 39110 /** 39111 * **Get** the current scroll offset for the start of the scene. 39112 * Mind, that the scrollOffset is related to the size of the container, if `triggerHook` is bigger than `0` (or `"onLeave"`). 39113 * This means, that resizing the container or changing the `triggerHook` will influence the scene's start offset. 39114 * @method ScrollMagic.Scene#scrollOffset 39115 * @example 39116 * // get the current scroll offset for the start and end of the scene. 39117 * var start = scene.scrollOffset(); 39118 * var end = scene.scrollOffset() + scene.duration(); 39119 * console.log("the scene starts at", start, "and ends at", end); 39120 * 39121 * @returns {number} The scroll offset (of the container) at which the scene will trigger. Y value for vertical and X value for horizontal scrolls. 39122 */ 39123 this.scrollOffset = function () { 39124 return _scrollOffset.start; 39125 }; 39126 39127 /** 39128 * **Get** the trigger position of the scene (including the value of the `offset` option). 39129 * @method ScrollMagic.Scene#triggerPosition 39130 * @example 39131 * // get the scene's trigger position 39132 * var triggerPosition = scene.triggerPosition(); 39133 * 39134 * @returns {number} Start position of the scene. Top position value for vertical and left position value for horizontal scrolls. 39135 */ 39136 this.triggerPosition = function () { 39137 var pos = _options.offset; // the offset is the basis 39138 if (_controller) { 39139 // get the trigger position 39140 if (_options.triggerElement) { 39141 // Element as trigger 39142 pos += _triggerPos; 39143 } else { 39144 // return the height of the triggerHook to start at the beginning 39145 pos += _controller.info("size") * Scene.triggerHook(); 39146 } 39147 } 39148 return pos; 39149 }; 39150 39151 var
39152 _pin, _pinOptions; 39153 39154 Scene.on("shift.internal", function (e) { 39155 var durationChanged = e.reason === "duration"; 39156 if ((_state === SCENE_STATE_AFTER && durationChanged) || (_state === SCENE_STATE_DURING && _options.duration === 0)) { 39157 // if [duration changed after a scene (inside scene progress updates pin position)] or [duration is 0, we are in pin phase and some other value changed]. 39158 updatePinState(); 39159 } 39160 if (durationChanged) { 39161 updatePinDimensions(); 39162 } 39163 }).on("progress.internal", function (e) { 39164 updatePinState(); 39165 }).on("add.internal", function (e) { 39166 updatePinDimensions(); 39167 }).on("destroy.internal", function (e) { 39168 Scene.removePin(e.reset); 39169 }); 39170 /** 39171 * Update the pin state. 39172 * @private 39173 */ 39174 var updatePinState = function (forceUnpin) { 39175 if (_pin && _controller) { 39176 var 39177 containerInfo = _controller.info(), 39178 pinTarget = _pinOptions.spacer.firstChild; // may be pin element or another spacer, if cascading pins 39179 if (!forceUnpin && _state === SCENE_STATE_DURING) { // during scene or if duration is 0 and we are past the trigger 39180 // pinned state 39181 if (_util.css(pinTarget, "position") != "fixed") { 39182 // change state before updating pin spacer (position changes due to fixed collapsing might occur.) 39183 _util.css(pinTarget, { 39184 "position": "fixed" 39185 }); 39186 // update pin spacer 39187 updatePinDimensions(); 39188 } 39189 39190 var 39191 fixedPos = _util.get.offset(_pinOptions.spacer, true), 39192 // get viewport position of spacer 39193 scrollDistance = _options.reverse || _options.duration === 0 ? containerInfo.scrollPos - _scrollOffset.start // quicker 39194 : Math.round(_progress * _options.duration * 10) / 10; // if no reverse and during pin the position needs to be recalculated using the progress 39195 // add scrollDistance 39196 fixedPos[containerInfo.vertical ? "top" : "left"] += scrollDistance; 39197 39198 // set new values 39199 _util.css(_pinOptions.spacer.firstChild, { 39200 top: fixedPos.top, 39201 left: fixedPos.left 39202 }); 39203 } else { 39204 // unpinned state 39205 var 39206 newCSS = { 39207 position: _pinOptions.inFlow ? "relative" : "absolute", 39208 top: 0, 39209 left: 0 39210 }, 39211 change = _util.css(pinTarget, "position") != newCSS.position; 39212 39213 if (!_pinOptions.pushFollowers) { 39214 newCSS[containerInfo.vertical ? "top" : "left"] = _options.duration * _progress; 39215 } else if (_options.duration > 0) { // only concerns scenes with duration 39216 if (_state === SCENE_STATE_AFTER && parseFloat(_util.css(_pinOptions.spacer, "padding-top")) === 0) { 39217 change = true; // if in after state but havent updated spacer yet (jumped past pin) 39218 } else if (_state === SCENE_STATE_BEFORE && parseFloat(_util.css(_pinOptions.spacer, "padding-bottom")) === 0) { // before 39219 change = true; // jumped past fixed state upward direction 39220 } 39221 } 39222 // set new values 39223 _util.css(pinTarget, newCSS); 39224 if (change) { 39225 // update pin spacer if state changed 39226 updatePinDimensions(); 39227 } 39228 } 39229 } 39230 }; 39231 39232 /** 39233 * Update the pin spacer and/or element size. 39234 * The size of the spacer needs to be updated whenever the duration of the scene changes, if it is to push down following elements. 39235 * @private 39236 */ 39237 var updatePinDimensions = function () { 39238 if (_pin && _controller && _pinOptions.inFlow) { // no spacerresize, if original position is absolute 39239 var 39240 after = (_state === SCENE_STATE_AFTER), 39241 before = (_state === SCENE_STATE_BEFORE), 39242 during = (_state === SCENE_STATE_DURING), 39243 vertical = _controller.info("vertical"), 39244 pinTarget = _pinOptions.spacer.firstChild, 39245 // usually the pined element but can also be another spacer (cascaded pins) 39246 marginCollapse = _util.isMarginCollapseType(_util.css(_pinOptions.spacer, "display")), 39247 css = {}; 39248 39249 // set new size 39250 // if relsize: spacer -> pin | else: pin -> spacer 39251 if (_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) { 39252 if (during) { 39253 _util.css(_pin, { 39254 "width": _util.get.width(_pinOptions.spacer) 39255 }); 39256 } else { 39257 _util.css(_pin, { 39258 "width": "100%" 39259 }); 39260 } 39261 } else { 39262 // minwidth is needed for cascaded pins. 39263 css["min-width"] = _util.get.width(vertical ? _pin : pinTarget, true, true); 39264 css.width = during ? css["min-width"] : "auto"; 39265 } 39266 if (_pinOptions.relSize.height) { 39267 if (during) { 39268 // the only padding the spacer should ever include is the duration (if pushFollowers = true), so we need to substract that. 39269 _util.css(_pin, { 39270 "height": _util.get.height(_pinOptions.spacer) - (_pinOptions.pushFollowers ? _options.duration : 0) 39271 }); 39272 } else { 39273 _util.css(_pin, { 39274 "height": "100%" 39275 }); 39276 } 39277 } else { 39278 // margin is only included if it's a cascaded pin to resolve an IE9 bug 39279 css["min-height"] = _util.get.height(vertical ? pinTarget : _pin, true, !marginCollapse); // needed for cascading pins 39280 css.height = during ? css["min-height"] : "auto"; 39281 } 39282 39283 // add space for duration if pushFollowers is true 39284 if (_pinOptions.pushFollowers) { 39285 css["padding" + (vertical ? "Top" : "Left")] = _options.duration * _progress; 39286 css["padding" + (vertical ? "Bottom" : "Right")] = _options.duration * (1 - _progress); 39287 } 39288 _util.css(_pinOptions.spacer, css); 39289 } 39290 }; 39291 39292 /** 39293 * Updates the Pin state (in certain scenarios) 39294 * If the controller container is not the document and we are mid-pin-phase scrolling or resizing the main document can result to wrong pin positions. 39295 * So this function is called on resize and scroll of the document. 39296 * @private 39297 */ 39298 var updatePinInContainer = function () { 39299 if (_controller && _pin && _state === SCENE_STATE_DURING && !_controller.info("isDocument")) { 39300 updatePinState(); 39301 } 39302 }; 39303 39304 /** 39305 * Updates the Pin spacer size state (in certain scenarios) 39306 * If container is resized during pin and relatively sized the size of the pin might need to be updated... 39307 * So this function is called on resize of the container. 39308 * @private 39309 */ 39310 var updateRelativePinSpacer = function () { 39311 if (_controller && _pin && // well, duh 39312 _state === SCENE_STATE_DURING && // element in pinned state? 39313 ( // is width or height relatively sized, but not in relation to body? then we need to recalc. 39314 ((_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) && _util.get.width(window) != _util.get.width(_pinOptions.spacer.parentNode)) || (_pinOptions.relSize.height && _util.get.height(window) != _util.get.height(_pinOptions.spacer.parentNode)))) { 39315 updatePinDimensions(); 39316 } 39317 }; 39318 39319 /** 39320 * Is called, when the mousewhel is used while over a pinned element inside a div container. 39321 * If the scene is in fixed state scroll events would be counted towards the body. This forwards the event to the scroll container. 39322 * @private 39323 */ 39324 var onMousewheelOverPin = function (e) { 39325 if (_controller && _pin && _state === SCENE_STATE_DURING && !_controller.info("isDocument")) { // in pin
39325state 39326 e.preventDefault(); 39327 _controller._setScrollPos(_controller.info("scrollPos") - ((e.wheelDelta || e[_controller.info("vertical") ? "wheelDeltaY" : "wheelDeltaX"]) / 3 || -e.detail * 30)); 39328 } 39329 }; 39330 39331 /** 39332 * Pin an element for the duration of the tween. 39333 * If the scene duration is 0 the element will only be unpinned, if the user scrolls back past the start position. 39334 * Make sure only one pin is applied to an element at the same time. 39335 * An element can be pinned multiple times, but only successively. 39336 * _**NOTE:** The option `pushFollowers` has no effect, when the scene duration is 0._ 39337 * @method ScrollMagic.Scene#setPin 39338 * @example 39339 * // pin element and push all following elements down by the amount of the pin duration. 39340 * scene.setPin("#pin"); 39341 * 39342 * // pin element and keeping all following elements in their place. The pinned element will move past them. 39343 * scene.setPin("#pin", {pushFollowers: false}); 39344 * 39345 * @param {(string|object)} element - A Selector targeting an element or a DOM object that is supposed to be pinned. 39346 * @param {object} [settings] - settings for the pin 39347 * @param {boolean} [settings.pushFollowers=true] - If `true` following elements will be "pushed" down for the duration of the pin, if `false` the pinned element will just scroll past them. 39348 Ignored, when duration is `0`. 39349 * @param {string} [settings.spacerClass="scrollmagic-pin-spacer"] - Classname of the pin spacer element, which is used to replace the element. 39350 * 39351 * @returns {Scene} Parent object for chaining. 39352 */ 39353 this.setPin = function (element, settings) { 39354 var 39355 defaultSettings = { 39356 pushFollowers: true, 39357 spacerClass: "scrollmagic-pin-spacer" 39358 }; 39359 settings = _util.extend({}, defaultSettings, settings); 39360 39361 // validate Element 39362 element = _util.get.elements(element)[0]; 39363 if (!element) { 39364 log(1, "ERROR calling method 'setPin()': Invalid pin element supplied."); 39365 return Scene; // cancel 39366 } else if (_util.css(element, "position") === "fixed") { 39367 log(1, "ERROR calling method 'setPin()': Pin does not work with elements that are positioned 'fixed'."); 39368 return Scene; // cancel 39369 } 39370 39371 if (_pin) { // preexisting pin? 39372 if (_pin === element) { 39373 // same pin we already have -> do nothing 39374 return Scene; // cancel 39375 } else { 39376 // kill old pin 39377 Scene.removePin(); 39378 } 39379 39380 } 39381 _pin = element; 39382 39383 var 39384 parentDisplay = _pin.parentNode.style.display, 39385 boundsParams = ["top", "left", "bottom", "right", "margin", "marginLeft", "marginRight", "marginTop", "marginBottom"]; 39386 39387 _pin.parentNode.style.display = 'none'; // hack start to force css to return stylesheet values instead of calculated px values. 39388 var 39389 inFlow = _util.css(_pin, "position") != "absolute", 39390 pinCSS = _util.css(_pin, boundsParams.concat(["display"])), 39391 sizeCSS = _util.css(_pin, ["width", "height"]); 39392 _pin.parentNode.style.display = parentDisplay; // hack end. 39393 if (!inFlow && settings.pushFollowers) { 39394 log(2, "WARNING: If the pinned element is positioned absolutely pushFollowers will be disabled."); 39395 settings.pushFollowers = false; 39396 } 39397 window.setTimeout(function () { // wait until all finished, because with responsive duration it will only be set after scene is added to controller 39398 if (_pin && _options.duration === 0 && settings.pushFollowers) { 39399 log(2, "WARNING: pushFollowers =", true, "has no effect, when scene duration is 0."); 39400 } 39401 }, 0); 39402 39403 // create spacer and insert 39404 var 39405 spacer = _pin.parentNode.insertBefore(document.createElement('div'), _pin), 39406 spacerCSS = _util.extend(pinCSS, { 39407 position: inFlow ? "relative" : "absolute", 39408 boxSizing: "content-box", 39409 mozBoxSizing: "content-box", 39410 webkitBoxSizing: "content-box" 39411 }); 39412 39413 if (!inFlow) { // copy size if positioned absolutely, to work for bottom/right positioned elements. 39414 _util.extend(spacerCSS, _util.css(_pin, ["width", "height"])); 39415 } 39416 39417 _util.css(spacer, spacerCSS); 39418 spacer.setAttribute(PIN_SPACER_ATTRIBUTE, ""); 39419 _util.addClass(spacer, settings.spacerClass); 39420 39421 // set the pin Options 39422 _pinOptions = { 39423 spacer: spacer, 39424 relSize: { // save if size is defined using % values. if so, handle spacer resize differently... 39425 width: sizeCSS.width.slice(-1) === "%", 39426 height: sizeCSS.height.slice(-1) === "%",
39427 autoFullWidth: sizeCSS.width === "auto" && inFlow && _util.isMarginCollapseType(pinCSS.display) 39428 }, 39429 pushFollowers: settings.pushFollowers, 39430 inFlow: inFlow, 39431 // stores if the element takes up space in the document flow 39432 }; 39433 39434 if (!_pin.___origStyle) { 39435 _pin.___origStyle = {}; 39436 var 39437 pinInlineCSS = _pin.style, 39438 copyStyles = boundsParams.concat(["width", "height", "position", "boxSizing", "mozBoxSizing", "webkitBoxSizing"]); 39439 copyStyles.forEach(function (val) { 39440 _pin.___origStyle[val] = pinInlineCSS[val] || ""; 39441 }); 39442 } 39443 39444 // if relative size, transfer it to spacer and make pin calculate it... 39445 if (_pinOptions.relSize.width) { 39446 _util.css(spacer, { 39447 width: sizeCSS.width 39448 }); 39449 } 39450 if (_pinOptions.relSize.height) { 39451 _util.css(spacer, { 39452 height: sizeCSS.height 39453 }); 39454 } 39455 39456 // now place the pin element inside the spacer 39457 spacer.appendChild(_pin); 39458 // and set new css 39459 _util.css(_pin, { 39460 position: inFlow ? "relative" : "absolute", 39461 margin: "auto", 39462 top: "auto", 39463 left: "auto", 39464 bottom: "auto", 39465 right: "auto" 39466 }); 39467 39468 if (_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) { 39469 _util.css(_pin, { 39470 boxSizing: "border-box", 39471 mozBoxSizing: "border-box", 39472 webkitBoxSizing: "border-box" 39473 }); 39474 } 39475 39476 // add listener to document to update pin position in case controller is not the document. 39477 window.addEventListener('scroll', updatePinInContainer); 39478 window.addEventListener('resize', updatePinInContainer); 39479 window.addEventListener('resize', updateRelativePinSpacer); 39480 // add mousewheel listener to catch scrolls over fixed elements 39481 _pin.addEventListener("mousewheel", onMousewheelOverPin); 39482 _pin.addEventListener("DOMMouseScroll", onMousewheelOverPin); 39483 39484 log(3, "added pin"); 39485 39486 // finally update the pin to init 39487 updatePinState(); 39488 39489 return Scene; 39490 }; 39491 39492 /** 39493 * Remove the pin from the scene. 39494 * @method ScrollMagic.Scene#removePin 39495 * @example 39496 * // remove the pin from the scene without resetting it (the spacer is not removed) 39497 * scene.removePin(); 39498 * 39499 * // remove the pin from the scene and reset the pin element to its initial position (spacer is removed) 39500 * scene.removePin(true); 39501 * 39502 * @param {boolean} [reset=false] - If `false` the spacer will not be removed and the element's position will not be reset. 39503 * @returns {Scene} Parent object for chaining. 39504 */ 39505 this.removePin = function (reset) { 39506 if (_pin) { 39507 if (_state === SCENE_STATE_DURING) { 39508 updatePinState(true); // force unpin at position 39509 } 39510 if (reset || !_controller) { // if there's no controller no progress was made anyway... 39511 var pinTarget = _pinOptions.spacer.firstChild; // usually the pin element, but may be another spacer (cascaded pins)... 39512 if (pinTarget.hasAttribute(PIN_SPACER_ATTRIBUTE)) { // copy margins to child spacer 39513 var 39514 style = _pinOptions.spacer.style, 39515 values = ["margin", "marginLeft", "marginRight", "marginTop", "marginBottom"], 39516 margins = {}; 39517 values.forEach(function (val) { 39518 margins[val] = style[val] || ""; 39519 }); 39520 _util.css(pinTarget, margins); 39521 } 39522 _pinOptions.spacer.parentNode.insertBefore(pinTarget, _pinOptions.spacer); 39523 _pinOptions.spacer.parentNode.removeChild(_pinOptions.spacer); 39524 if (!_pin.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) { // if it's the last pin for this element -> restore inline styles 39525 // TODO: only correctly set for first pin (when cascading) - how to fix? 39526 _util.css(_pin, _pin.___origStyle); 39527 delete _pin.___origStyle; 39528 } 39529 } 39530 window.removeEventListener('scroll', updatePinInContainer); 39531 window.removeEventListener('resize', updatePinInContainer); 39532 window.removeEventListener('resize', updateRelativePinSpacer); 39533 _pin.removeEventListener("mousewheel", onMousewheelOverPin); 39534 _pin.removeEventListener("DOMMouseScroll", onMousewheelOverPin); 39535 _pin = undefined; 39536 log(3, "removed pin (reset: " + (reset ? "true" : "false") + ")"); 39537 } 39538 return Scene; 39539 }; 39540 39541 39542 var
39543 _cssClasses, _cssClassElems = []; 39544 39545 Scene.on("destroy.internal", function (e) { 39546 Scene.removeClassToggle(e.reset); 39547 }); 39548 /** 39549 * Define a css class modification while the scene is active. 39550 * When the scene triggers the classes will be added to the supplied element and removed, when the scene is over. 39551 * If the scene duration is 0 the classes will only be removed if the user scrolls back past the start position. 39552 * @method ScrollMagic.Scene#setClassToggle 39553 * @example 39554 * // add the class 'myclass' to the element with the id 'my-elem' for the duration of the scene 39555 * scene.setClassToggle("#my-elem", "myclass"); 39556 * 39557 * // add multiple classes to multiple elements defined by the selector '.classChange' 39558 * scene.setClassToggle(".classChange", "class1 class2 class3"); 39559 * 39560 * @param {(string|object)} element - A Selector targeting one or more elements or a DOM object that is supposed to be modified. 39561 * @param {string} classes - One or more Classnames (separated by space) that should be added to the element during the scene. 39562 * 39563 * @returns {Scene} Parent object for chaining. 39564 */ 39565 this.setClassToggle = function (element, classes) { 39566 var elems = _util.get.elements(element); 39567 if (elems.length === 0 || !_util.type.String(classes)) { 39568 log(1, "ERROR calling method 'setClassToggle()': Invalid " + (elems.length === 0 ? "element" : "classes") + " supplied."); 39569 return Scene; 39570 } 39571 if (_cssClassElems.length > 0) { 39572 // remove old ones 39573 Scene.removeClassToggle(); 39574 } 39575 _cssClasses = classes; 39576 _cssClassElems = elems; 39577 Scene.on("enter.internal_class leave.internal_class", function (e) { 39578 var toggle = e.type === "enter" ? _util.addClass : _util.removeClass; 39579 _cssClassElems.forEach(function (elem, key) {
39580 toggle(elem, _cssClasses); 39581 }); 39582 }); 39583 return Scene; 39584 }; 39585 39586 /** 39587 * Remove the class binding from the scene. 39588 * @method ScrollMagic.Scene#removeClassToggle 39589 * @example 39590 * // remove class binding from the scene without reset 39591 * scene.removeClassToggle(); 39592 * 39593 * // remove class binding and remove the changes it caused 39594 * scene.removeClassToggle(true); 39595 * 39596 * @param {boolean} [reset=false] - If `false` and the classes are currently active, they will remain on the element. If `true` they will be removed. 39597 * @returns {Scene} Parent object for chaining. 39598 */ 39599 this.removeClassToggle = function (reset) { 39600 if (reset) { 39601 _cssClassElems.forEach(function (elem, key) { 39602 _util.removeClass(elem, _cssClasses); 39603 }); 39604 } 39605 Scene.off("start.internal_class end.internal_class"); 39606 _cssClasses = undefined; 39607 _cssClassElems = []; 39608 return Scene; 39609 }; 39610 39611 // INIT 39612 construct(); 39613 return Scene; 39614 }; 39615 39616 // store pagewide scene options 39617 var SCENE_OPTIONS = { 39618 defaults: { 39619 duration: 0, 39620 offset: 0, 39621 triggerElement: undefined, 39622 triggerHook: 0.5, 39623 reverse: true, 39624 loglevel: 2 39625 }, 39626 validate: { 39627 offset: function (val) { 39628 val = parseFloat(val); 39629 if (!_util.type.Number(val)) { 39630 throw ["Invalid value for option \"offset\":", val]; 39631 } 39632 return val; 39633 }, 39634 triggerElement: function (val) { 39635 val = val || undefined; 39636 if (val) { 39637 var elem = _util.get.elements(val)[0]; 39638 if (elem && elem.parentNode) { 39639 val = elem; 39640 } else { 39641 throw ["Element defined in option \"triggerElement\" was not found:", val]; 39642 } 39643 } 39644 return val; 39645 }, 39646 triggerHook: function (val) { 39647 var translate = { 39648 "onCenter": 0.5, 39649 "onEnter": 1, 39650 "onLeave": 0 39651 }; 39652 if (_util.type.Number(val)) { 39653 val = Math.max(0, Math.min(parseFloat(val), 1)); // make sure its betweeen 0 and 1 39654 } else if (val in translate) { 39655 val = translate[val]; 39656 } else { 39657 throw ["Invalid value for option \"triggerHook\": ", val]; 39658 } 39659 return val; 39660 }, 39661 reverse: function (val) { 39662 return !!val; // force boolean 39663 }, 39664 loglevel: function (val) { 39665 val = parseInt(val); 39666 if (!_util.type.Number(val) || val < 0 || val > 3) { 39667 throw ["Invalid value for option \"loglevel\":", val]; 39668 } 39669 return val; 39670 } 39671 }, 39672 // holder for validation methods. duration validation is handled in 'getters-setters.js' 39673 shifts: ["duration", "offset", "triggerHook"], 39674 // list of options that trigger a `shift` event 39675 }; 39676/* 39677 * method used to add an option to ScrollMagic Scenes. 39678 * TODO: DOC (private for dev) 39679 */ 39680 ScrollMagic.Scene.addOption = function (name, defaultValue, validationCallback, shifts) { 39681 if (!(name in SCENE_OPTIONS.defaults)) { 39682 SCENE_OPTIONS.defaults[name] = defaultValue; 39683 SCENE_OPTIONS.validate[name] = validationCallback; 39684 if (shifts) { 39685 SCENE_OPTIONS.shifts.push(name); 39686 } 39687 } else { 39688 ScrollMagic._util.log(1, "[static] ScrollMagic.Scene -> Cannot add Scene option '" + name + "', because it already exists."); 39689 } 39690 }; 39691 // instance extension function for plugins 39692 // TODO: DOC (private for dev) 39693 ScrollMagic.Scene.extend = function (extension) { 39694 var oldClass = this; 39695 ScrollMagic.Scene = function () { 39696 oldClass.apply(this, arguments); 39697 this.$super = _util.extend({}, this); // copy parent state 39698 return extension.apply(this, arguments) || this; 39699 }; 39700 _util.extend(ScrollMagic.Scene, oldClass); // copy properties 39701 ScrollMagic.Scene.prototype = oldClass.prototype; // copy prototype 39702 ScrollMagic.Scene.prototype.constructor = ScrollMagic.Scene; // restore constructor 39703 }; 39704 39705 39706 39707 /** 39708 * TODO: DOCS (private for dev) 39709 * @class 39710 * @private 39711 */ 39712 39713 ScrollMagic.Event = function (type, namespace, target, vars) { 39714 vars = vars || {}; 39715 for (var key in vars) { 39716 this[key] = vars[key]; 39717 } 39718 this.type = type; 39719 this.target = this.currentTarget = target; 39720 this.namespace = namespace || ''; 39721 this.timeStamp = this.timestamp = Date.now(); 39722 return this; 39723 }; 39724 39725/* 39726 * TODO: DOCS (private for dev) 39727 */ 39728 39729 var _util = ScrollMagic._util = (function (window) { 39730 var U = {}, 39731 i; 39732 39733 /** 39734 * ------------------------------ 39735 * internal helpers 39736 * ------------------------------ 39737 */ 39738 39739 // parse float and fall back to 0. 39740 var floatval = function (number) { 39741 return parseFloat(number) || 0; 39742 }; 39743 // get current style IE safe (otherwise IE would return calculated values for 'auto') 39744 var _getComputedStyle = function (elem) { 39745 return elem.currentStyle ? elem.currentStyle : window.getComputedStyle(elem); 39746 }; 39747 39748 // get element dimension (width or height) 39749 var _dimension = function (which, elem, outer, includeMargin) { 39750 elem = (elem === document) ? window : elem; 39751 if (elem === window) { 39752 includeMargin = false;
39753 } else if (!_type.DomElement(elem)) { 39754 return 0; 39755 } 39756 which = which.charAt(0).toUpperCase() + which.substr(1).toLowerCase(); 39757 var dimension = (outer ? elem['offset' + which] || elem['outer' + which] : elem['client' + which] || elem['inner' + which]) || 0; 39758 if (outer && includeMargin) { 39759 var style = _getComputedStyle(elem); 39760 dimension += which === 'Height' ? floatval(style.marginTop) + floatval(style.marginBottom) : floatval(style.marginLeft) + floatval(style.marginRight); 39761 } 39762 return dimension; 39763 }; 39764 // converts 'margin-top' into 'marginTop' 39765 var _camelCase = function (str) { 39766 return str.replace(/^[^a-z]+([a-z])/g, '$1').replace(/-([a-z])/g, function (g) { 39767 return g[1].toUpperCase(); 39768 }); 39769 }; 39770 39771 /** 39772 * ------------------------------ 39773 * external helpers 39774 * ------------------------------ 39775 */ 39776 39777 // extend obj â same as jQuery.extend({}, objA, objB) 39778 U.extend = function (obj) { 39779 obj = obj || {}; 39780 for (i = 1; i < arguments.length; i++) { 39781 if (!arguments[i]) { 39782 continue; 39783 } 39784 for (var key in arguments[i]) { 39785 if (arguments[i].hasOwnProperty(key)) { 39786 obj[key] = arguments[i][key]; 39787 } 39788 } 39789 } 39790 return obj; 39791 }; 39792 39793 // check if a css display type results in margin-collapse or not 39794 U.isMarginCollapseType = function (str) { 39795 return ["block", "flex", "list-item", "table", "-webkit-box"].indexOf(str) > -1; 39796 }; 39797 39798 // implementation of requestAnimationFrame 39799 // based on https://gist.github.com/paulirish/1579671 39800 var 39801 lastTime = 0, 39802 vendors = ['ms', 'moz', 'webkit', 'o']; 39803 var _requestAnimationFrame = window.requestAnimationFrame; 39804 var _cancelAnimationFrame = window.cancelAnimationFrame; 39805 // try vendor prefixes if the above doesn't work 39806 for (i = 0; !_requestAnimationFrame && i < vendors.length; ++i) { 39807 _requestAnimationFrame = window[vendors[i] + 'RequestAnimationFrame']; 39808 _cancelAnimationFrame = window[vendors[i] + 'CancelAnimationFrame'] || window[vendors[i] + 'CancelRequestAnimationFrame']; 39809 } 39810 39811 // fallbacks 39812 if (!_requestAnimationFrame) { 39813 _requestAnimationFrame = function (callback) { 39814 var 39815 currTime = new Date().getTime(), 39816 timeToCall = Math.max(0, 16 - (currTime - lastTime)), 39817 id = window.setTimeout(function () { 39818 callback(currTime + timeToCall); 39819 }, timeToCall); 39820 lastTime = currTime + timeToCall; 39821 return id; 39822 }; 39823 } 39824 if (!_cancelAnimationFrame) { 39825 _cancelAnimationFrame = function (id) { 39826 window.clearTimeout(id); 39827 }; 39828 } 39829 U.rAF = _requestAnimationFrame.bind(window); 39830 U.cAF = _cancelAnimationFrame.bind(window); 39831 39832 var 39833 loglevels = ["error", "warn", "log"], 39834 console = window.console || {}; 39835 39836 console.log = console.log || 39837 function () {}; // no console log, well - do nothing then... 39838 // make sure methods for all levels exist. 39839 for (i = 0; i < loglevels.length; i++) { 39840 var method = loglevels[i]; 39841 if (!console[method]) { 39842 console[method] = console.log; // prefer .log over nothing 39843 } 39844 } 39845 U.log = function (loglevel) { 39846 if (loglevel > loglevels.length || loglevel <= 0) loglevel = loglevels.length; 39847 var now = new Date(), 39848 time = ("0" + now.getHours()).slice(-2) + ":" + ("0" + now.getMinutes()).slice(-2) + ":" + ("0" + now.getSeconds()).slice(-2) + ":" + ("00" + now.getMilliseconds()).slice(-3), 39849 method = loglevels[loglevel - 1], 39850 args = Array.prototype.splice.call(arguments, 1), 39851 func = Function.prototype.bind.call(console[method], console); 39852 args.unshift(time); 39853 func.apply(console, args); 39854 }; 39855 39856 /** 39857 * ------------------------------ 39858 * type testing 39859 * ------------------------------ 39860 */ 39861 39862 var _type = U.type = function (v) { 39863 return Object.prototype.toString.call(v).replace(/^\[object (.+)\]$/, "$1").toLowerCase(); 39864 }; 39865 _type.String = function (v) { 39866 return _type(v) === 'string'; 39867 }; 39868 _type.Function = function (v) { 39869 return _type(v) === 'function'; 39870 }; 39871 _type.Array = function (v) { 39872 return Array.isArray(v); 39873 }; 39874 _type.Number = function (v) { 39875 return !_type.Array(v) && (v - parseFloat(v) + 1) >= 0; 39876 }; 39877 _type.DomElement = function (o) { 39878 return ( 39879 typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2 39880 o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string"); 39881 }; 39882 39883 /** 39884 * ------------------------------ 39885 * DOM Element info 39886 * ------------------------------ 39887 */ 39888 // always returns a list of matching DOM elements, from a selector, a DOM element or an list of elements or even an array of selectors 39889 var _get = U.get = {}; 39890 _get.elements = function (selector) { 39891 var arr = []; 39892 if (_type.String(selector)) { 39893 try { 39894 selector = document.querySelectorAll(selector); 39895 } catch (e) { // invalid selector 39896 return arr; 39897 } 39898 } 39899 if (_type(selector) === 'nodelist' || _type.Array(selector)) { 39900 for (var i = 0, ref = arr.length = selector.length; i < ref; i++) { // list of elements 39901 var elem = selector[i]; 39902 arr[i] = _type.DomElement(elem) ? elem : _get.elements(elem); // if not an element, try to resolve recursively 39903 } 39904 } else if (_type.DomElement(selector) || selector === document || selector === window) { 39905 arr = [selector]; // only the element 39906 } 39907 return arr; 39908 }; 39909 // get scroll top value 39910 _get.scrollTop = function (elem) { 39911 return (elem && typeof elem.scrollTop === 'number') ? elem.scrollTop : window.pageYOffset || 0; 39912 }; 39913 // get scroll left value 39914 _get.scrollLeft = function (elem) { 39915 return (elem && typeof elem.scrollLeft === 'number') ? elem.scrollLeft : window.pageXOffset || 0; 39916 }; 39917 // get element height 39918 _get.width = function (elem, outer, includeMargin) { 39919 return _dimension('width', elem, outer, includeMargin); 39920 }; 39921 // get element width 39922 _get.height = function (elem, outer, includeMargin) { 39923 return _dimension('height', elem, outer, includeMargin); 39924 }; 39925 39926 // get element position (optionally relative to viewport) 39927 _get.offset = function (elem, relativeToViewport) { 39928 var offset = { 39929 top: 0, 39930 left: 0 39931 }; 39932 if (elem && elem.getBoundingClientRect) { // check if available 39933 var rect = elem.getBoundingClientRect(); 39934 offset.top = rect.top; 39935 offset.left = rect.left; 39936 if (!relativeToViewport) { // clientRect is by default relative to viewport... 39937 offset.top += _get.scrollTop(); 39938 offset.left += _get.scrollLeft(); 39939 } 39940 } 39941 return offset; 39942 }; 39943 39944 /** 39945 * ------------------------------ 39946 * DOM Element manipulation 39947 * ------------------------------ 39948 */ 39949 39950 U.addClass = function (elem, classname) { 39951 if (classname) { 39952 if (elem.classList) elem.classList.add(classname); 39953 else elem.className += ' ' + classname; 39954 } 39955 }; 39956 U.removeClass = function (elem, classname) { 39957 if (classname) { 39958 if (elem.classList) elem.classList.remove(classname); 39959 else elem.className = elem.className.replace(new RegExp('(^|\\b)' + classname.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); 39960 } 39961 }; 39962 // if options is string -> returns css value 39963 // if options is array -> returns object with css value pairs 39964 // if options is object -> set new css values 39965 U.css = function (elem, options) { 39966 if (_type.String(options)) { 39967 return _getComputedStyle(elem)[_camelCase(options)]; 39968 } else if (_type.Array(options)) { 39969 var 39970 obj = {}, 39971 style = _getComputedStyle(elem); 39972 options.forEach(function (option, key) { 39973 obj[option] = style[_camelCase(option)]; 39974 }); 39975 return obj; 39976 } else { 39977 for (var option in options) { 39978 var val = options[option]; 39979 if (val == parseFloat(val)) { // assume pixel for seemingly numerical values 39980 val += 'px'; 39981 } 39982 elem.style[_camelCase(option)] = val; 39983 } 39984 } 39985 }; 39986 39987 return U; 39988 }(window || {})); 39989 39990 ScrollMagic.Scene.prototype.addIndicators = function () { 39991 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling addIndicators() due to missing Plugin \'debug.addIndicators\'. Please make sure to include plugins/debug.addIndicators.js'); 39992 return this; 39993 } 39994 ScrollMagic.Scene.prototype.removeIndicators = function () { 39995 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeIndicators() due to missing Plugin \'debug.addIndicators\'. Please make sure to include plugins/debug.addIndicators.js'); 39996 return this; 39997 } 39998 ScrollMagic.Scene.prototype.setTween = function () { 39999 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin \'animation.gsap\'. Please make sure to include plugins/animation.gsap.js'); 40000 return this; 40001 } 40002 ScrollMagic.Scene.prototype.removeTween = function () { 40003 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeTween() due to missing Plugin \'animation.gsap\'. Please make sure to include plugins/animation.gsap.js'); 40004 return this; 40005 } 40006 ScrollMagic.Scene.prototype.setVelocity = function () { 40007 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling setVelocity() due to missing Plugin \'animation.velocity\'. Please make sure to include plugins/animation.velocity.js'); 40008 return this; 40009 } 40010 ScrollMagic.Scene.prototype.removeVelocity = function () { 40011 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeVelocity() due to missing Plugin \'animation.velocity\'. Please make sure to include plugins/animation.velocity.js'); 40012 return this; 40013 } 40014 40015 return ScrollMagic; 40016})); 40017/*! 40018 * ScrollMagic v2.0.6 (2018-10-08) 40019 * The javascript library for magical scroll interactions. 40020 * (c) 2018 Jan Paepke (@janpaepke) 40021 * Project Website: http://scrollmagic.io 40022 * 40023 * @version 2.0.6 40024 * @license Dual licensed under MIT license and GPL. 40025 * @author Jan Paepke - [email protected] 40026 * 40027 * @file ScrollMagic GSAP Animation Plugin. 40028 * 40029 * requires: GSAP ~1.14 40030 * Powered by the Greensock Animation Platform (GSAP): http://www.greensock.com/js 40031 * Greensock License info at http://www.greensock.com/licensing/ 40032 */ 40033/** 40034 * This plugin is meant to be used in conjunction with the Greensock Animation Plattform. 40035 * It offers an easy API to trigger Tweens or synchronize them to the scrollbar movement. 40036 * 40037 * Both the `lite` and the `max` versions of the GSAP library are supported. 40038 * The most basic requirement is `TweenLite`. 40039 * 40040 * To have access to this extension, please include `plugins/animation.gsap.js`. 40041 * @requires {@link http://greensock.com/gsap|GSAP ~1.14.x} 40042 * @mixin animation.GSAP 40043 */ 40044(function (root, factory) { 40045 if (typeof define === 'function' && define.amd) { 40046 // AMD. Register as an anonymous module. 40047 define(['ScrollMagic', 'TweenMax', 'TimelineMax'], factory); 40048 } else if (typeof exports === 'object') { 40049 // CommonJS 40050 // Loads whole gsap package onto global scope. 40051 require('gsap'); 40052 factory(require('scrollmagic'), TweenMax, TimelineMax); 40053 } else { 40054 // Browser globals 40055 factory(root.ScrollMagic || (root.jQuery && root.jQuery.ScrollMagic), root.TweenMax || root.TweenLite, root.TimelineMax || root.TimelineLite); 40056 } 40057}(this, function (ScrollMagic, Tween, Timeline) { 40058 "use strict"; 40059 var NAMESPACE = "animation.gsap"; 40060 40061 var 40062 console = window.console || {}, 40063 err = Function.prototype.bind.call(console.error || console.log || 40064 function () {}, console); 40065 if (!ScrollMagic) { 40066 err("(" + NAMESPACE + ") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs."); 40067 } 40068 if (!Tween) { 40069 err("(" + NAMESPACE + ") -> ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs."); 40070 } 40071 40072/* 40073 * ---------------------------------------------------------------- 40074 * Extensions for Scene 40075 * ---------------------------------------------------------------- 40076 */ 40077 /** 40078 * Every instance of ScrollMagic.Scene now accepts an additional option. 40079 * See {@link ScrollMagic.Scene} for a complete list of the standard options. 40080 * @memberof! animation.GSAP# 40081 * @method new ScrollMagic.Scene(options) 40082 * @example 40083 * var scene = new ScrollMagic.Scene({tweenChanges: true}); 40084 * 40085 * @param {object} [options] - Options for the Scene. The options can be updated at any time. 40086 * @param {boolean} [options.tweenChanges=false] - Tweens Animation to the progress target instead of setting it. 40087 Does not affect animations where duration is `0`. 40088 */ 40089 /** 40090 * **Get** or **Set** the tweenChanges option value. 40091 * This only affects scenes with a duration. If `tweenChanges` is `true`, the progress update when scrolling will not be immediate, but instead the animation will smoothly animate to the target state. 40092 * For a better understanding, try enabling and disabling this option in the [Scene Manipulation Example](../examples/basic/scene_manipulation.html). 40093 * @memberof! animation.GSAP# 40094 * @method Scene.tweenChanges 40095 * 40096 * @example 40097 * // get the current tweenChanges option 40098 * var tweenChanges = scene.tweenChanges(); 40099 * 40100 * // set new tweenChanges option 40101 * scene.tweenChanges(true); 40102 * 40103 * @fires {@link Scene.change}, when used as setter 40104 * @param {boolean} [newTweenChanges] - The new tweenChanges setting of the scene. 40105 * @returns {boolean} `get` - Current tweenChanges option value. 40106 * @returns {Scene} `set` - Parent object for chaining. 40107 */ 40108 // add option (TODO: DOC (private for dev)) 40109 ScrollMagic.Scene.addOption("tweenChanges", // name 40110 false, // default 40111 40112 40113 function (val) { // validation callback 40114 return !!val; 40115 }); 40116 // extend scene 40117 ScrollMagic.Scene.extend(function () { 40118 var Scene = this, 40119 _tween; 40120 40121 var log = function () { 40122 if (Scene._log) { // not available, when main source minified 40123 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->"); 40124 Scene._log.apply(this, arguments); 40125 } 40126 }; 40127 40128 // set listeners 40129 Scene.on("progress.plugin_gsap", function () { 40130 updateTweenProgress(); 40131 }); 40132 Scene.on("destroy.plugin_gsap", function (e) { 40133 Scene.removeTween(e.reset); 40134 }); 40135 40136 /** 40137 * Update the tween progress to current position. 40138 * @private 40139 */ 40140 var updateTweenProgress = function () { 40141 if (_tween) { 40142 var 40143 progress = Scene.progress(), 40144 state = Scene.state(); 40145 if (_tween.repeat && _tween.repeat() === -1) { 40146 // infinite loop, so not in relation to progress 40147 if (state === 'DURING' && _tween.paused()) { 40148 _tween.play(); 40149 } else if (state !== 'DURING' && !_tween.paused()) { 40150 _tween.pause(); 40151 } 40152 } else if (progress != _tween.progress()) { // do we even need to update the progress? 40153 // no infinite loop - so should we just play or go to a specific point in t
40153ime? 40154 if (Scene.duration() === 0) { 40155 // play the animation 40156 if (progress > 0) { // play from 0 to 1 40157 _tween.play(); 40158 } else { // play from 1 to 0 40159 _tween.reverse(); 40160 } 40161 } else { 40162 // go to a specific point in time 40163 if (Scene.tweenChanges() && _tween.tweenTo) { 40164 // go smooth 40165 _tween.tweenTo(progress * _tween.duration()); 40166 } else { 40167 // just hard set it 40168 _tween.progress(progress).pause(); 40169 } 40170 } 40171 } 40172 } 40173 }; 40174 40175 /** 40176 * Add a tween to the scene. 40177 * If you want to add multiple tweens, add them into a GSAP Timeline object and supply it instead (see example below). 40178 * 40179 * If the scene has a duration, the tween's duration will be projected to the scroll distance of the scene, meaning its progress will be synced to scrollbar movement. 40180 * For a scene with a duration of `0`, the tween will be triggered when scrolling forward past the scene's trigger position and reversed, when scrolling back. 40181 * To gain better understanding, check out the [Simple Tweening example](../examples/basic/simple_tweening.html). 40182 * 40183 * Instead of supplying a tween this method can also be used as a shorthand for `TweenMax.to()` (see example below). 40184 * @memberof! animation.GSAP# 40185 * 40186 * @example 40187 * // add a single tween directly 40188 * scene.setTween(TweenMax.to("obj"), 1, {x: 100}); 40189 * 40190 * // add a single tween via variable 40191 * var tween = TweenMax.to("obj"), 1, {x: 100}; 40192 * scene.setTween(tween); 40193 * 40194 * // add multiple tweens, wrapped in a timeline. 40195 * var timeline = new TimelineMax(); 40196 * var tween1 = TweenMax.from("obj1", 1, {x: 100}); 40197 * var tween2 = TweenMax.to("obj2", 1, {y: 100}); 40198 * timeline 40199 * .add(tween1) 40200 * .add(tween2); 40201 * scene.addTween(timeline); 40202 * 40203 * // short hand to add a TweenMax.to() tween 40204 * scene.setTween("obj3", 0.5, {y: 100}); 40205 * 40206 * // short hand to add a TweenMax.to() tween for 1 second 40207 * // this is useful, when the scene has a duration and the tween duration isn't important anyway 40208 * scene.setTween("obj3", {y: 100}); 40209 * 40210 * @param {(object|string)} TweenObject - A TweenMax, TweenLite, TimelineMax or TimelineLite object that should be animated in the scene. Can also be a Dom Element or Selector, when using direct tween definition (see examples). 40211 * @param {(number|object)} duration - A duration for the tween, or tween parameters. If an object containing parameters are supplied, a default duration of 1 will be used. 40212 * @param {object} params - The parameters for the tween 40213 * @returns {Scene} Parent object for chaining. 40214 */ 40215 Scene.setTween = function (TweenObject, duration, params) { 40216 var newTween; 40217 if (arguments.length > 1) { 40218 if (arguments.length < 3) { 40219 params = duration; 40220 duration = 1; 40221 } 40222 TweenObject = Tween.to(TweenObject, duration, params); 40223 } 40224 try { 40225 // wrap Tween into a Timeline Object if available to include delay and repeats in the duration and standardize methods. 40226 if (Timeline) { 40227 newTween = new Timeline({ 40228 smoothChildTiming: true 40229 }).add(TweenObject); 40230 } else { 40231 newTween = TweenObject; 40232 } 40233 newTween.pause(); 40234 } catch (e) { 40235 log(1, "ERROR calling method 'setTween()': Supplied argument is not a valid TweenObject"); 40236 return Scene; 40237 } 40238 if (_tween) { // kill old tween? 40239 Scene.removeTween(); 40240 } 40241 _tween = newTween; 40242 40243 // some properties need to be transferred it to the wrapper, otherwise they would get lost. 40244 if (TweenObject.repeat && TweenObject.repeat() === -1) { // TweenMax or TimelineMax Object? 40245 _tween.repeat(-1); 40246 _tween.yoyo(TweenObject.yoyo()); 40247 } 40248 // Some tween validations and debugging helpers 40249 if (Scene.tweenChanges() && !_tween.tweenTo) { 40250 log(2, "WARNING: tweenChanges will only work if the TimelineMax object is available for ScrollMagic."); 40251 } 40252 40253 // check if there are position tweens defined for the trigger and warn about it :) 40254 if (_tween && Scene.controller() && Scene.triggerElement() && Scene.loglevel() >= 2) { // controller is needed to know scroll direction. 40255 var 40256 triggerTweens = Tween.getTweensOf(Scene.triggerElement()),
40257 vertical = Scene.controller().info("vertical"); 40258 triggerTweens.forEach(function (value, index) { 40259 var 40260 tweenvars = value.vars.css || value.vars, 40261 condition = vertical ? (tweenvars.top !== undefined || tweenvars.bottom !== undefined) : (tweenvars.left !== undefined || tweenvars.right !== undefined); 40262 if (condition) { 40263 log(2, "WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!"); 40264 return false; 40265 } 40266 }); 40267 } 40268 40269 // warn about tween overwrites, when an element is tweened multiple times 40270 if (parseFloat(TweenLite.version) >= 1.14) { // onOverwrite only present since GSAP v1.14.0 40271 var 40272 list = _tween.getChildren ? _tween.getChildren(true, true, false) : [_tween], 40273 // get all nested tween objects 40274 newCallback = function () { 40275 log(2, "WARNING: tween was overwritten by another. To learn how to avoid this issue see here: https://github.com/janpaepke/ScrollMagic/wiki/WARNING:-tween-was-overwritten-by-another"); 40276 }; 40277 for (var i = 0, thisTween, oldCallback; i < list.length; i++) { /*jshint loopfunc: true */ 40278 thisTween = list[i]; 40279 if (oldCallback !== newCallback) { // if tweens is added more than once 40280 oldCallback = thisTween.vars.onOverwrite; 40281 thisTween.vars.onOverwrite = function () { 40282 if (oldCallback) { 40283 oldCallback.apply(this, arguments); 40284 } 40285 newCallback.apply(this, arguments); 40286 }; 40287 } 40288 } 40289 } 40290 log(3, "added tween"); 40291 40292 updateTweenProgress(); 40293 return Scene; 40294 }; 40295 40296 /** 40297 * Remove the tween from the scene. 40298 * This will terminate the control of the Scene over the tween. 40299 * 40300 * Using the reset option you can decide if the tween should remain in the current state or be rewound to set the target elements back to the state they were in before the tween was added to the scene. 40301 * @memberof! animation.GSAP# 40302 * 40303 * @example 40304 * // remove the tween from the scene without resetting it 40305 * scene.removeTween(); 40306 * 40307 * // remove the tween from the scene and reset it to initial position 40308 * scene.removeTween(true); 40309 * 40310 * @param {boolean} [reset=false] - If `true` the tween will be reset to its initial values. 40311 * @returns {Scene} Parent object for chaining. 40312 */ 40313 Scene.removeTween = function (reset) { 40314 if (_tween) { 40315 if (reset) { 40316 _tween.progress(0).pause(); 40317 } 40318 _tween.kill(); 40319 _tween = undefined; 40320 log(3, "removed tween (reset: " + (reset ? "true" : "false") + ")"); 40321 } 40322 return Scene; 40323 }; 40324 40325 }); 40326})); 40327/*! 40328 * ScrollMagic v2.0.6 (2018-10-08) 40329 * The javascript library for magical scroll interactions. 40330 * (c) 2018 Jan Paepke (@janpaepke) 40331 * Project Website: http://scrollmagic.io 40332 * 40333 * @version 2.0.6 40334 * @license Dual licensed under MIT license and GPL. 40335 * @author Jan Paepke - [email protected] 40336 * 40337 * @file Debug Extension for ScrollMagic. 40338 */ 40339/** 40340 * This plugin was formerly known as the ScrollMagic debug extension. 40341 * 40342 * It enables you to add visual indicators to your page, to be able to see exactly when a scene is triggered. 40343 * 40344 * To have access to this extension, please include `plugins/debug.addIndicators.js`. 40345 * @mixin debug.addIndicators 40346 */ 40347(function (root, factory) { 40348 if (typeof define === 'function' && define.amd) { 40349 // AMD. Register as an anonymous module. 40350 define(['ScrollMagic'], factory); 40351 } else if (typeof exports === 'object') { 40352 // CommonJS 40353 factory(require('scrollmagic')); 40354 } else { 40355 // no browser global export needed, just execute 40356 factory(root.ScrollMagic || (root.jQuery && root.jQuery.ScrollMagic)); 40357 } 40358}(this, function (ScrollMagic) { 40359 "use strict"; 40360 var NAMESPACE = "debug.addIndicators"; 40361 40362 var 40363 console = window.console || {}, 40364 err = Function.prototype.bind.call(console.error || console.log || 40365 function () {}, console); 40366 if (!ScrollMagic) { 40367 err("(" + NAMESPACE + ") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs."); 40368 } 40369 40370 // plugin settings 40371 var 40372 FONT_SIZE = "0.85em", 40373 ZINDEX = "9999", 40374 EDGE_OFFSET = 15; // minimum edge distance, added to indentation 40375 40376 // overall vars 40377 var 40378 _util = ScrollMagic._util, 40379 _autoindex = 0; 40380 40381 40382 40383 ScrollMagic.Scene.extend(function () { 40384 var 40385 Scene = this, 40386 _indicator; 40387 40388 var log = function () { 40389 if (Scene._log) { // not available, when main source minified 40390 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->"); 40391 Scene._log.apply(this, arguments); 40392 } 40393 }; 40394 40395 /** 40396 * Add visual indicators for a ScrollMagic.Scene. 40397 * @memberof! debug.addIndicators# 40398 * 40399 * @example 40400 * // add basic indicators 40401 * scene.addIndicators() 40402 * 40403 * // passing options 40404 * scene.addIndicators({name: "pin scene", colorEnd: "#FFFFFF"}); 40405 * 40406 * @param {object}
40406 [options] - An object containing one or more options for the indicators. 40407 * @param {(string|object)} [options.parent=undefined] - A selector, DOM Object or a jQuery object that the indicators should be added to. 40408 If undefined, the controller's container will be used. 40409 * @param {number} [options.name=""] - This string will be displayed at the start and end indicators of the scene for identification purposes. If no name is supplied an automatic index will be used. 40410 * @param {number} [options.indent=0] - Additional position offset for the indicators (useful, when having multiple scenes starting at the same position). 40411 * @param {string} [options.colorStart=green] - CSS color definition for the start indicator. 40412 * @param {string} [options.colorEnd=red] - CSS color definition for the end indicator. 40413 * @param {string} [options.colorTrigger=blue] - CSS color definition for the trigger indicator. 40414 */ 40415 Scene.addIndicators = function (options) { 40416 if (!_indicator) { 40417 var 40418 DEFAULT_OPTIONS = { 40419 name: "", 40420 indent: 0, 40421 parent: undefined, 40422 colorStart: "green", 40423 colorEnd: "red", 40424 colorTrigger: "blue", 40425 }; 40426 40427 options = _util.extend({}, DEFAULT_OPTIONS, options); 40428 40429 _autoindex++; 40430 _indicator = new Indicator(Scene, options); 40431 40432 Scene.on("add.plugin_addIndicators", _indicator.add); 40433 Scene.on("remove.plugin_addIndicators", _indicator.remove); 40434 Scene.on("destroy.plugin_addIndicators", Scene.removeIndicators); 40435 40436 // it the scene already has a controller we can start right away. 40437 if (Scene.controller()) { 40438 _indicator.add(); 40439 } 40440 } 40441 return Scene; 40442 }; 40443 40444 /** 40445 * Removes visual indicators from a ScrollMagic.Scene. 40446 * @memberof! debug.addIndicators# 40447 * 40448 * @example 40449 * // remove previously added indicators 40450 * scene.removeIndicators() 40451 * 40452 */ 40453 Scene.removeIndicators = function () { 40454 if (_indicator) { 40455 _indicator.remove(); 40456 this.off("*.plugin_addIndicators"); 40457 _indicator = undefined; 40458 } 40459 return Scene; 40460 }; 40461 40462 }); 40463 40464 40465/* 40466 * ---------------------------------------------------------------- 40467 * Extension for controller to store and update related indicators 40468 * ---------------------------------------------------------------- 40469 */ 40470 // add option to globally auto-add indicators to scenes 40471 /** 40472 * Every ScrollMagic.Controller instance now accepts an additional option. 40473 * See {@link ScrollMagic.Controller} for a complete list of the standard options. 40474 * @memberof! debug.addIndicators# 40475 * @method new ScrollMagic.Controller(options) 40476 * @example 40477 * // make a controller and add indicators to all scenes attached 40478 * var controller = new ScrollMagic.Controller({addIndicators: true}); 40479 * // this scene will automatically have indicators added to it 40480 * new ScrollMagic.Scene() 40481 * .addTo(controller); 40482 * 40483 * @param {object} [options] - Options for the Controller. 40484 * @param {boolean} [options.addIndicators=false] - If set to `true` every scene that is added to the controller will automatically get indicators added to it. 40485 */ 40486 ScrollMagic.Controller.addOption("addIndicators", false); 40487 // extend Controller 40488 ScrollMagic.Controller.extend(function () { 40489 var 40490 Controller = this, 40491 _info = Controller.info(), 40492 _container = _info.container, 40493 _isDocument = _info.isDocument, 40494 _vertical = _info.vertical, 40495 _indicators = { // container for all indicators and methods 40496 groups: [] 40497 }; 40498 40499 var log = function () { 40500 if (Controller._log) { // not available, when main source minified 40501 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->"); 40502 Controller._log.apply(this, arguments); 40503 } 40504 }; 40505 if (Controller._indicators) {
40506 log(2, "WARNING: Scene already has a property '_indicators', which will be overwritten by plugin."); 40507 } 40508 40509 // add indicators container 40510 this._indicators = _indicators; 40511/* 40512 needed updates: 40513 +++++++++++++++ 40514 start/end position on scene shift (handled in Indicator class) 40515 trigger parameters on triggerHook value change (handled in Indicator class) 40516 bounds position on container scroll or resize (to keep alignment to bottom/right) 40517 trigger position on container resize, window resize (if container isn't document) and window scroll (if container isn't document) 40518 */ 40519 40520 // event handler for when associated bounds markers need to be repositioned 40521 var handleBoundsPositionChange = function () { 40522 _indicators.updateBoundsPositions(); 40523 }; 40524 40525 // event handler for when associated trigger groups need to be repositioned 40526 var handleTriggerPositionChange = function () { 40527 _indicators.updateTriggerGroupPositions(); 40528 }; 40529 40530 _container.addEventListener("resize", handleTriggerPositionChange); 40531 if (!_isDocument) { 40532 window.addEventListener("resize", handleTriggerPositionChange); 40533 window.addEventListener("scroll", handleTriggerPositionChange); 40534 } 40535 // update all related bounds containers 40536 _container.addEventListener("resize", handleBoundsPositionChange); 40537 _container.addEventListener("scroll", handleBoundsPositionChange); 40538 40539 40540 // updates the position of the bounds container to aligned to the right for vertical containers and to the bottom for horizontal 40541 this._indicators.updateBoundsPositions = function (specificIndicator) { 40542 var // constant for all bounds 40543 groups = specificIndicator ? [_util.extend({}, specificIndicator.triggerGroup, { 40544 members: [specificIndicator] 40545 })] : // create a group with only one element 40546 _indicators.groups, 40547 // use all 40548 g = groups.length, 40549 css = {}, 40550 paramPos = _vertical ? "left" : "top", 40551 paramDimension = _vertical ? "width" : "height", 40552 edge = _vertical ? _util.get.scrollLeft(_container) + _util.get.width(_container) - EDGE_OFFSET : _util.get.scrollTop(_container) + _util.get.height(_container) - EDGE_OFFSET, 40553 b, triggerSize, group; 40554 while (g--) { // group loop 40555 group = groups[g]; 40556 b = group.members.length; 40557 triggerSize = _util.get[paramDimension](group.element.firstChild); 40558 while (b--) { // indicators loop 40559 css[paramPos] = edge - triggerSize; 40560 _util.css(group.members[b].bounds, css); 40561 } 40562 } 40563 }; 40564 40565 // updates the positions of all trigger groups attached to a controller or a specific one, if provided 40566 this._indicators.updateTriggerGroupPositions = function (specificGroup) { 40567 var // constant vars 40568 groups = specificGroup ? [specificGroup] : _indicators.groups, 40569 i = groups.length, 40570 container = _isDocument ? document.body : _container, 40571 containerOffset = _isDocument ? { 40572 top: 0, 40573 left: 0 40574 } : _util.get.offset(container, true), 40575 edge = _vertical ? _util.get.width(_container) - EDGE_OFFSET : _util.get.height(_container) - EDGE_OFFSET, 40576 paramDimension = _vertical ? "width" : "height", 40577 paramTransform = _vertical ? "Y" : "X"; 40578 var // changing vars 40579 group, elem, pos, elemSize, transform; 40580 while (i--) { 40581 group = groups[i]; 40582 elem = group.element; 40583 pos = group.triggerHook * Controller.info("size"); 40584 elemSize = _util.get[paramDimension](elem.firstChild.firstChild); 40585 transform = pos > elemSize ? "translate" + paramTransform + "(-100%)" : ""; 40586 40587 _util.css(elem, { 40588 top: containerOffset.top + (_vertical ? pos : edge - group.members[0].options.indent), 40589 left: containerOffset.left + (_vertical ? edge - group.members[0].options.indent : pos) 40590 }); 40591 _util.css(elem.firstChild.firstChild, { 40592 "-ms-transform": transform, 40593 "-webkit-transform": transform, 40594 "transform": transform 40595 }); 40596 } 40597 }; 40598 40599 // updates the label for the group to contain the name, if it only has one member 40600 this._indicators.updateTriggerGroupLabel = function (group) { 40601 var 40602 text = "trigger" + (group.members.length > 1 ? "" : " " + group.members[0].options.name), 40603 elem = group.element.firstChild.firstChild, 40604 doUpdate = elem.textContent !== text; 40605 if (doUpdate) { 40606 elem.textContent = text; 40607 if (_vertical) { // bounds position is dependent on text length, so update 40608 _indicators.updateBoundsPositions(); 40609 } 40610 } 40611 }; 40612 40613 // add indicators if global option is set 40614 this.addScene = function (newScene) { 40615 40616 if (this._options.addIndicators && newScene instanceof ScrollMagic.Scene && newScene.controller() === Controller) { 40617 newScene.addIndicators(); 40618 } 40619 // call original destroy method 40620 this.$super.addScene.apply(this, arguments); 40621 }; 40622 40623 // remove all previously set listeners on destroy 40624 this.destroy = function () { 40625 _container.removeEventListener("resize", handleTriggerPositionChange); 40626 if (!_isDocument) { 40627 window.removeEventListener("resize", handleTriggerPositionChange); 40628 window.removeEventListener("scroll", handleTriggerPositionChange); 40629 } 40630 _container.removeEventListener("resize", handleBoundsPositionChange); 40631 _container.removeEventListener("scroll", handleBoundsPositionChange); 40632 // call original destroy method 40633 this.$super.destroy.apply(this, arguments); 40634 }; 40635 return Controller; 40636 40637 }); 40638 40639/* 40640 * ----------------------------------------------------------------
40641 * Internal class for the construction of Indicators 40642 * ---------------------------------------------------------------- 40643 */ 40644 var Indicator = function (Scene, options) { 40645 var 40646 Indicator = this, 40647 _elemBounds = TPL.bounds(), 40648 _elemStart = TPL.start(options.colorStart), 40649 _elemEnd = TPL.end(options.colorEnd), 40650 _boundsContainer = options.parent && _util.get.elements(options.parent)[0], 40651 _vertical, _ctrl; 40652 40653 var log = function () { 40654 if (Scene._log) { // not available, when main source minified 40655 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->"); 40656 Scene._log.apply(this, arguments); 40657 } 40658 }; 40659 40660 options.name = options.name || _autoindex; 40661 40662 // prepare bounds elements 40663 _elemStart.firstChild.textContent += " " + options.name; 40664 _elemEnd.textContent += " " + options.name; 40665 _elemBounds.appendChild(_elemStart); 40666 _elemBounds.appendChild(_elemEnd); 40667 40668 // set public variables 40669 Indicator.options = options; 40670 Indicator.bounds = _elemBounds; 40671 // will be set later 40672 Indicator.triggerGroup = undefined; 40673 40674 // add indicators to DOM 40675 this.add = function () { 40676 _ctrl = Scene.controller(); 40677 _vertical = _ctrl.info("vertical"); 40678 40679 var isDocument = _ctrl.info("isDocument"); 40680 40681 if (!_boundsContainer) { 40682 // no parent supplied or doesnt exist 40683 _boundsContainer = isDocument ? document.body : _ctrl.info("container"); // check if window/document (then use body) 40684 } 40685 if (!isDocument && _util.css(_boundsContainer, "position") === 'static') {
40686 // position mode needed for correct positioning of indicators 40687 _util.css(_boundsContainer, { 40688 position: "relative" 40689 }); 40690 } 40691 40692 // add listeners for updates 40693 Scene.on("change.plugin_addIndicators", handleTriggerParamsChange); 40694 Scene.on("shift.plugin_addIndicators", handleBoundsParamsChange); 40695 40696 // updates trigger & bounds (will add elements if needed) 40697 updateTriggerGroup(); 40698 updateBounds(); 40699 40700 setTimeout(function () { // do after all execution is finished otherwise sometimes size calculations are off 40701 _ctrl._indicators.updateBoundsPositions(Indicator); 40702 }, 0); 40703 40704 log(3, "added indicators"); 40705 }; 40706 40707 // remove indicators from DOM 40708 this.remove = function () { 40709 if (Indicator.triggerGroup) { // if not set there's nothing to remove 40710 Scene.off("change.plugin_addIndicators", handleTriggerParamsChange); 40711 Scene.off("shift.plugin_addIndicators", handleBoundsParamsChange); 40712 40713 if (Indicator.triggerGroup.members.length > 1) { 40714 // just remove from memberlist of old group 40715 var group = Indicator.triggerGroup; 40716 group.members.splice(group.members.indexOf(Indicator), 1); 40717 _ctrl._indicators.updateTriggerGroupLabel(group); 40718 _ctrl._indicators.updateTriggerGroupPositions(group); 40719 Indicator.triggerGroup = undefined; 40720 } else { 40721 // remove complete group 40722 removeTriggerGroup(); 40723 } 40724 removeBounds(); 40725 40726 log(3, "removed indicators"); 40727 } 40728 }; 40729 40730/* 40731 * ---------------------------------------------------------------- 40732 * internal Event Handlers 40733 * ---------------------------------------------------------------- 40734 */ 40735 40736 // event handler for when bounds params change 40737 var handleBoundsParamsChange = function () { 40738 updateBounds(); 40739 }; 40740 40741 // event handler for when trigger params change 40742 var handleTriggerParamsChange = function (e) { 40743 if (e.what === "triggerHook") { 40744 updateTriggerGroup(); 40745 } 40746 }; 40747 40748/* 40749 * ---------------------------------------------------------------- 40750 * Bounds (start / stop) management 40751 * ---------------------------------------------------------------- 40752 */ 40753 40754 // adds an new bounds elements to the array and to the DOM 40755 var addBounds = function () { 40756 var v = _ctrl.info("vertical"); 40757 // apply stuff we didn't know before... 40758 _util.css(_elemStart.firstChild, { 40759 "border-bottom-width": v ? 1 : 0, 40760 "border-right-width": v ? 0 : 1, 40761 "bottom": v ? -1 : options.indent, 40762 "right": v ? options.indent : -1, 40763 "padding": v ? "0 8px" : "2px 4px", 40764 }); 40765 _util.css(_elemEnd, { 40766 "border-top-width": v ? 1 : 0, 40767 "border-left-width": v ? 0 : 1, 40768 "top": v ? "100%" : "", 40769 "right": v ? options.indent : "", 40770 "bottom": v ? "" : options.indent, 40771 "left": v ? "" : "100%", 40772 "padding": v ? "0 8px" : "2px 4px" 40773 }); 40774 // append 40775 _boundsContainer.appendChild(_elemBounds); 40776 }; 40777 40778 // remove bounds from list and DOM 40779 var removeBounds = function () { 40780 _elemBounds.parentNode.removeChild(_elemBounds); 40781 }; 40782 40783 // update the start and end positions of the scene 40784 var updateBounds = function () { 40785 if (_elemBounds.parentNode !== _boundsContainer) { 40786 addBounds(); // Add Bounds elements (start/end) 40787 } 40788 var css = {}; 40789 css[_vertical ? "top" : "left"] = Scene.triggerPosition(); 40790 css[_vertical ? "height" : "width"] = Scene.duration(); 40791 _util.css(_elemBounds, css); 40792 _util.css(_elemEnd, { 40793 display: Scene.duration() > 0 ? "" : "none" 40794 }); 40795 }; 40796 40797/* 40798 * ---------------------------------------------------------------- 40799 * trigger and trigger group management 40800 * ---------------------------------------------------------------- 40801 */ 40802 40803 // adds an new trigger group to the array and to the DOM 40804 var addTriggerGroup = function () { 40805 var triggerElem = TPL.trigger(options.colorTrigger); // new trigger element 40806 var css = {}; 40807 css[_vertical ? "right" : "bottom"] = 0; 40808 css[_vertical ? "border-top-width" : "border-left-width"] = 1; 40809 _util.css(triggerElem.firstChild, css); 40810 _util.css(triggerElem.firstChild.firstChild, { 40811 padding: _vertical ? "0 8px 3px 8px" : "3px 4px" 40812 }); 40813 document.body.appendChild(triggerElem); // directly add to body 40814 var newGroup = { 40815 triggerHook: Scene.triggerHook(), 40816 element: triggerElem, 40817 members: [Indicator] 40818 }; 40819 _ctrl._indicators.groups.push(newGroup); 40820 Indicator.triggerGroup = newGroup; 40821 // update right away 40822 _ctrl._indicators.updateTriggerGroupLabel(newGroup); 40823 _ctrl._indicators.updateTriggerGroupPositions(newGroup); 40824 }; 40825 40826 var removeTriggerGroup = function () { 40827 _ctrl._indicators.groups.splice(_ctrl._indicators.groups.indexOf(Indicator.triggerGroup), 1); 40828 Indicator.triggerGroup.element.parentNode.removeChild(Indicator.triggerGroup.element); 40829 Indicator.triggerGroup = undefined; 40830 }; 40831 40832 // updates the trigger group -> either join existing or add new one 40833/* 40834 * Logic: 40835 * 1 if a trigger group exist, check if it's in sync with Scene settings â if so, nothing else needs to happen 40836 * 2 try to find an existing one that matches Scene parameters 40837 * 2.1 If a match is found check if already assigned to an existing group 40838 * If so: 40839 * A: it was the last member of existing group -> kill whole group 40840 * B: the existing group has other members -> just remove from member list 40841 * 2.2 Assign to matching group 40842 * 3 if no new match could be found, check if assigned to existing group 40843 * A: yes, and it's the only member -> just update parameters and positions and keep using this group 40844 * B: yes but there are other members -> remove from member list and create a new one 40845 * C: no, so create a new one 40846 */ 40847 var updateTriggerGroup = function () { 40848 var 40849 triggerHook = Scene.triggerHook(), 40850 closeEnough = 0.0001; 40851 40852 // Have a group, check if it still matches 40853 if (Indicator.triggerGroup) { 40854 if (Math.abs(Indicator.triggerGroup.triggerHook - triggerHook) < closeEnough) { 40855 // _util.log(0, "trigger", options.name, "->", "no need to change, still in sync"); 40856 return; // all good 40857 } 40858 } 40859 // Don't have a group, check if a matching one exists 40860 // _util.log(0, "trigger", options.name, "->", "out of sync!"); 40861 var 40862 groups = _ctrl._indicators.groups, 40863 group, i = groups.length; 40864 while (i--) { 40865 group = groups[i]; 40866 if (Math.abs(group.triggerHook - triggerHook) < closeEnough) { 40867 // found a match! 40868 // _util.log(0, "trigger", options.name, "->", "found match"); 40869 if (Indicator.triggerGroup) { // do I have an old group that is out of sync? 40870 if (Indicator.triggerGroup.members.length === 1) { // is it the only remaining group? 40871 // _util.log(0, "trigger", options.name, "->", "kill"); 40872 // was the last member, remove the whole group 40873 removeTriggerGroup(); 40874 } else { 40875 Indicator.triggerGroup.members.splice(Indicator.triggerGroup.members.indexOf(Indicator), 1); // just remove from memberlist of old group 40876 _ctrl._indicators.updateTriggerGroupLabel(Indicator.triggerGroup); 40877 _ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup); 40878 // _util.log(0, "trigger", options.name, "->", "removing from previous member list"); 40879 } 40880 } 40881 // join new group 40882 group.members.push(Indicator); 40883 Indicator.triggerGroup = group; 40884 _ctrl._indicators.updateTriggerGroupLabel(group); 40885 return; 40886 } 40887 } 40888 40889 // at this point I am obviously out of sync and don't match any other group 40890 if (Indicator.triggerGroup) { 40891 if (Indicator.triggerGroup.members.length === 1) { 40892 // _util.log(0, "trigger", options.name, "->", "updating existing"); 40893 // out of sync but i'm the only member => just change and update 40894 Indicator.triggerGroup.triggerHook = triggerHook; 40895 _ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup); 40896 return; 40897 } else { 40898 // _util.log(0, "trigger", options.name, "->", "removing from previous member list"); 40899 Indicator.triggerGroup.members.splice(Indicator.triggerGroup.members.indexOf(Indicator), 1); // just remove from memberlist of old group 40900 _ctrl._indicators.updateTriggerGroupLabel(Indicator.triggerGroup); 40901 _ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup); 40902 Indicator.triggerGroup = undefined; // need a brand new group... 40903 } 40904 } 40905 // _util.log(0, "trigger", options.name, "->", "add a new one"); 40906 // did not find any match, make new trigger group 40907 addTriggerGroup(); 40908 }; 40909 }; 40910 40911/* 40912 * ---------------------------------------------------------------- 40913 * Templates for the indicators 40914 * ---------------------------------------------------------------- 40915 */ 40916 var TPL = { 40917 start: function (color) { 40918 // inner element (for bottom offset -1, while keeping top position 0) 40919 var inner = document.createElement("div"); 40920 inner.textContent = "start"; 40921 _util.css(inner, { 40922 position: "absolute", 40923 overflow: "visible", 40924 "border-width": 0, 40925 "border-style": "solid", 40926 color: color, 40927 "border-color": color 40928 }); 40929 var e = document.createElement('div'); 40930 // wrapper 40931 _util.css(e, { 40932 position: "absolute", 40933 overflow: "visible", 40934 width: 0, 40935 height: 0 40936 }); 40937 e.appendChild(inner); 40938 return e; 40939 }, 40940 end: function (color) { 40941 var e = document.createElement('div'); 40942 e.textContent = "end"; 40943 _util.css(e, { 40944 position: "absolute", 40945 overflow: "visible", 40946 "border-width": 0, 40947 "border-style": "solid", 40948 color: color, 40949 "border-color": color 40950 }); 40951 return e; 40952 }, 40953 bounds: function () { 40954 var e = document.createElement('div'); 40955 _util.css(e, { 40956 position: "absolute", 40957 overflow: "visible", 40958 "white-space": "nowrap", 40959 "pointer-events": "none", 40960 "font-size": FONT_SIZE 40961 }); 40962 e.style.zIndex = ZINDEX; 40963 return e; 40964 }, 40965 trigger: function (color) { 40966 // inner to be above or below line but keep position 40967 var inner = document.createElement('div'); 40968 inner.textContent = "trigger"; 40969 _util.css(inner, { 40970 position: "relative", 40971 }); 40972 // inner wrapper for right: 0 and main element has no size 40973 var w = document.createElement('div'); 40974 _util.css(w, { 40975 position: "absolute", 40976 overflow: "visible", 40977 "border-width": 0, 40978 "border-style": "solid", 40979 color: color, 40980 "border-color": color 40981 }); 40982 w.appendChild(inner); 40983 // wrapper 40984 var e = document.createElement('div'); 40985 _util.css(e, { 40986 position: "fixed", 40987 overflow: "visible", 40988 "white-space": "nowrap", 40989 "pointer-events": "none", 40990 "font-size": FONT_SIZE 40991 }); 40992 e.style.zIndex = ZINDEX; 40993 e.appendChild(w); 40994 return e; 40995 }, 40996 }; 40997 40998})); 40999!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exp
vendor: 7,038 bytes, line 40999
40999orts.AOS=t():e.AOS=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=n(1),a=(o(r),n(6)),u=o(a),c=n(7),f=o(c),s=n(8),d=o(s),l=n(9),p=o(l),m=n(10),b=o(m),v=n(11),y=o(v),g=n(14),h=o(g),w=[],k=!1,x={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&(k=!0),k)return w=(0,y.default)(w,x),(0,b.default)(w,x.once),w},O=function(){w=(0,h.default)(),j()},_=function(){w.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},S=function(e){return e===!0||"mobile"===e&&p.default.mobile()||"phone"===e&&p.default.phone()||"tablet"===e&&p.default.tablet()||"function"==typeof e&&e()===!0},z=function(e){x=i(x,e),w=(0,h.default)();var t=document.all&&!window.atob;return S(x.disable)||t?_():(document.querySelector("body").setAttribute("data-aos-easing",x.easing),document.querySelector("body").setAttribute("data-aos-duration",x.duration),document.querySelector("body").setAttribute("data-aos-delay",x.delay),"DOMContentLoaded"===x.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?j(!0):"load"===x.startEvent?window.addEventListener(x.startEvent,function(){j(!0)}):document.addEventListener(x.startEvent,function(){j(!0)}),window.addEventListener("resize",(0,f.default)(j,x.debounceDelay,!0)),window.addEventListener("orientationchange",(0,f.default)(j,x.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,b.default)(w,x.once)},x.throttleDelay)),x.disableMutationObserver||(0,d.default)("[data-aos]",O),w)};e.exports={init:z,refresh:j,refreshHard:O}},function(e,t){},,,,,function(e,t){(function(t){"use strict";function n(e,t,n){function o(t){var n=b,o=v;return b=v=void 0,k=t,g=e.apply(o,n)}function r(e){return k=e,h=setTimeout(s,t),_?o(e):g}function a(e){var n=e-w,o=e-k,i=t-n;return S?j(i,y-o):i}function c(e){var n=e-w,o=e-k;return void 0===w||n>=t||n<0||S&&o>=y}function s(){var e=O();return c(e)?d(e):void(h=setTimeout(s,a(e)))}function d(e){return h=void 0,z&&b?o(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),k=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(O())}function m(){var e=O(),n=c(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(s,t),o(w)}return void 0===h&&(h=setTimeout(s,t)),g}var b,v,y,g,h,w,k=0,_=!1,S=!1,z=!0;if("function"!=typeof e)throw new TypeError(f);return t=u(t)||0,i(n)&&(_=!!n.leading,S="maxWait"in n,y=S?x(u(n.maxWait)||0,t):y,z="trailing"in n?!!n.trailing:z),m.cancel=l,m.flush=p,m}function o(e,t,o){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(f);return i(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),n(e,t,{leading:r,maxWait:t,trailing:a})}function i(e){var t="undefined"==typeof e?"undefined":c(e);return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==("undefined"==typeof e?"undefined":c(e))}function a(e){return"symbol"==("undefined"==typeof e?"undefined":c(e))||r(e)&&k.call(e)==d}function u(e){if("number"==typeof e)return e;if(a(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=m.test(e);return n||b.test(e)?v(e.slice(2),n?2:8):p.test(e)?s:+e}var c="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},f="Expected a function",s=NaN,d="[object Symbol]",l=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,b=/^0o[0-7]+$/i,v=parseInt,y="object"==("undefined"==typeof t?"undefined":c(t))&&t&&t.Object===Object&&t,g="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,h=y||g||Function("return this")(),w=Object.prototype,k=w.toString,x=Math.max,j=Math.min,O=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";function n(e,t,n){function i(t){var n=b,o=v;return b=v=void 0,O=t,g=e.apply(o,n)}function r(e){return O=e,h=setTimeout(s,t),_?i(e):g}function u(e){var n=e-w,o=e-O,i=t-n;return S?x(i,y-o):i}function f(e){var n=e-w,o=e-O;return void 0===w||n>=t||n<0||S&&o>=y}function s(){var e=j();return f(e)?d(e):void(h=setTimeout(s,u(e)))}function d(e){return h=void 0,z&&b?i(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),O=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(j())}function m(){var e=j(),n=f(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(s,t),i(w)}return void 0===h&&(h=setTimeout(s,t)),g}var b,v,y,g,h,w,O=0,_=!1,S=!1,z=!0;if("function"!=typeof e)throw new TypeError(c);return t=a(t)||0,o(n)&&(_=!!n.leading,S="maxWait"in n,y=S?k(a(n.maxWait)||0,t):y,z="trailing"in n?!!n.trailing:z),m.cancel=l,m.flush=p,m}function o(e){var t="undefined"==typeof e?"undefined":u(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==("undefined"==typeof e?"undefined":u(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":u(e))||i(e)&&w.call(e)==s}function a(e){if("number"==typeof e)return e;if(r(e))return f;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=p.test(e);return n||m.test(e)?b(e.slice(2),n?2:8):l.test(e)?f:+e}var u="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},c="Expected a function",f=NaN,s="[object Symbol]",d=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,v="object"==("undefined"==typeof t?"undefined":u(t))&&t&&t.Object===Object&&t,y="object"==("undefined"==typeof self?"undefined":u(self))&&self&&self.Object===Object&&self,g=v||y||Function("return this")(),h=Object.prototype,w=h.toString,k=Math.max,x=Math.min,j=function(){return g.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";function n(e,t){var n=window.document,r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,a=new r(o);i=t,a.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function o(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),n=Array.prototype.slice.call(e.removedNodes
40999),o=t.concat(n).filter(function(e){return e.hasAttribute&&e.hasAttribute("data-aos")}).length;o&&i()})}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){};t.default=n},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+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|xda|xiino/i,a=/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,u=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+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|xda|xiino|android|ipad|playbook|silk/i,c=/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 )|
40999sy(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,f=function(){function e(){n(this,e)}return i(e,[{key:"phone",value:function(){var e=o();return!(!r.test(e)&&!a.test(e.substr(0,4)))}},{key:"mobile",value:function(){var e=o();return!(!u.test(e)&&!c.test(e.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),e}();t.default=new f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){var o=e.node.getAttribute("data-aos-once");t>e.position?e.node.classList.add("aos-animate"):"undefined"!=typeof o&&("false"===o||!n&&"true"!==o)&&e.node.classList.remove("aos-animate")},o=function(e,t){var o=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,r){n(e,i+o,t)})};t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),r=o(i),a=function(e,t){return e.forEach(function(e,n){e.node.classList.add("aos-init"),e.position=(0,r.default)(e.node,t.offset)}),e};t.default=a},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=o(i),a=function(e,t){var n=0,o=0,i=window.innerHeight,a={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(a.offset&&!isNaN(a.offset)&&(o=parseInt(a.offset)),a.anchor&&document.querySelectorAll(a.anchor)&&(e=document.querySelectorAll(a.anchor)[0]),n=(0,r.default)(e).top,a.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=e.offsetHeight/2;break;case"bottom-bottom":n+=e.offsetHeight;break;case"top-center":n+=i/2;break;case"bottom-center":n+=i/2+e.offsetHeight;break;case"center-center":n+=i/2+e.offsetHeight/2;break;case"top-top":n+=i;break;case"bottom-top":n+=e.offsetHeight+i;break;case"center-top":n+=e.offsetHeight/2+i}return a.anchorPlacement||a.offset||isNaN(t)||(o=t),n+o};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e=e||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(e,function(e){return{node:e}})};t.default=n}])});
vendor: 12,620 bytes, lines 40999-41438
40999 41000const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 41001 41002/** Bootstring parameters */ 41003const base = 36; 41004const tMin = 1; 41005const tMax = 26; 41006const skew = 38; 41007const damp = 700; 41008const initialBias = 72; 41009const initialN = 128; // 0x80 41010const delimiter = '-'; // '\x2D' 41011 41012/** Regular expressions */ 41013const regexPunycode = /^xn--/; 41014const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. 41015const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators 41016 41017/** Error messages */ 41018const errors = { 41019 'overflow': 'Overflow: input needs wider integers to process', 41020 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', 41021 'invalid-input': 'Invalid input' 41022}; 41023 41024/** Convenience shortcuts */ 41025const baseMinusTMin = base - tMin; 41026const floor = Math.floor; 41027const stringFromCharCode = String.fromCharCode; 41028 41029/*--------------------------------------------------------------------------*/ 41030 41031/** 41032 * A generic error utility function. 41033 * @private 41034 * @param {String} type The error type. 41035 * @returns {Error} Throws a `RangeError` with the applicable error message. 41036 */ 41037function error(type) { 41038 throw new RangeError(errors[type]); 41039} 41040 41041/** 41042 * A generic `Array#map` utility function. 41043 * @private 41044 * @param {Array} array The array to iterate over. 41045 * @param {Function} callback The function that gets called for every array 41046 * item. 41047 * @returns {Array} A new array of values returned by the callback function. 41048 */ 41049function map(array, callback) { 41050 const result = []; 41051 let length = array.length; 41052 while (length--) { 41053 result[length] = callback(array[length]); 41054 } 41055 return result; 41056} 41057 41058/** 41059 * A simple `Array#map`-like wrapper to work with domain name strings or email 41060 * addresses. 41061 * @private 41062 * @param {String} domain The domain name or email address. 41063 * @param {Function} callback The function that gets called for every 41064 * character. 41065 * @returns {String} A new string of characters returned by the callback 41066 * function. 41067 */ 41068function mapDomain(domain, callback) { 41069 const parts = domain.split('@'); 41070 let result = ''; 41071 if (parts.length > 1) { 41072 // In email addresses, only the domain name should be punycoded. Leave 41073 // the local part (i.e. everything up to `@`) intact. 41074 result = parts[0] + '@'; 41075 domain = parts[1]; 41076 } 41077 // Avoid `split(regex)` for IE8 compatibility. See #17. 41078 domain = domain.replace(regexSeparators, '\x2E'); 41079 const labels = domain.split('.'); 41080 const encoded = map(labels, callback).join('.'); 41081 return result + encoded; 41082} 41083 41084/** 41085 * Creates an array containing the numeric code points of each Unicode 41086 * character in the string. While JavaScript uses UCS-2 internally, 41087 * this function will convert a pair of surrogate halves (each of which 41088 * UCS-2 exposes as separate characters) into a single code point, 41089 * matching UTF-16. 41090 * @see `punycode.ucs2.encode` 41091 * @see <https://mathiasbynens.be/notes/javascript-encoding> 41092 * @memberOf punycode.ucs2 41093 * @name decode 41094 * @param {String} string The Unicode input string (UCS-2). 41095 * @returns {Array} The new array of code points. 41096 */ 41097function ucs2decode(string) { 41098 const output = []; 41099 let counter = 0; 41100 const length = string.length; 41101 while (counter < length) { 41102 const value = string.charCodeAt(counter++); 41103 if (value >= 0xD800 && value <= 0xDBFF && counter < length) { 41104 // It's a high surrogate, and there is a next character. 41105 const extra = string.charCodeAt(counter++); 41106 if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. 41107 output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); 41108 } else { 41109 // It's an unmatched surrogate; only append this code unit, in case the 41110 // next code unit is the high surrogate of a surrogate pair. 41111 output.push(value); 41112 counter--; 41113 } 41114 } else { 41115 output.push(value); 41116 } 41117 } 41118 return output; 41119} 41120 41121/** 41122 * Creates a string based on an array of numeric code points. 41123 * @see `punycode.ucs2.decode` 41124 * @memberOf punycode.ucs2 41125 * @name encode 41126 * @param {Array} codePoints The array of numeric code points. 41127 * @returns {String} The new Unicode string (UCS-2). 41128 */ 41129const ucs2encode = codePoints => String.fromCodePoint(...codePoints); 41130 41131/** 41132 * Converts a basic code point into a digit/integer. 41133 * @see `digitToBasic()` 41134 * @private 41135 * @param {Number} codePoint The basic numeric code point value. 41136 * @returns {Number} The numeric value of a basic code point (for use in 41137 * representing integers) in the range `0` to `base - 1`, or `base` if 41138 * the code point does not represent a value. 41139 */ 41140const basicToDigit = function(codePoint) { 41141 if (codePoint >= 0x30 && codePoint < 0x3A) { 41142 return 26 + (codePoint - 0x30); 41143 } 41144 if (codePoint >= 0x41 && codePoint < 0x5B) { 41145 return codePoint - 0x41; 41146 } 41147 if (codePoint >= 0x61 && codePoint < 0x7B) { 41148 return codePoint - 0x61; 41149 } 41150 return base; 41151}; 41152 41153/** 41154 * Converts a digit/integer into a basic code point. 41155 * @see `basicToDigit()` 41156 * @private 41157 * @param {Number} digit The numeric value of a basic code point. 41158 * @returns {Number} The basic code point whose value (when used for 41159 * representing integers) is `digit`, which needs to be in the range 41160 * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is 41161 * used; else, the lowercase form is used. The behavior is undefined 41162 * if `flag` is non-zero and `digit` has no uppercase form. 41163 */ 41164const digitToBasic = function(digit, flag) { 41165 // 0..25 map to ASCII a..z or A..Z 41166 // 26..35 map to ASCII 0..9 41167 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); 41168}; 41169 41170/** 41171 * Bias adaptation function as per section 3.4 of RFC 3492. 41172 * https://tools.ietf.org/html/rfc3492#section-3.4 41173 * @private 41174 */ 41175const adapt = function(delta, numPoints, firstTime) { 41176 let k = 0; 41177 delta = firstTime ? floor(delta / damp) : delta >> 1; 41178 delta += floor(delta / numPoints); 41179 for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { 41180 delta = floor(delta / baseMinusTMin); 41181 } 41182 return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); 41183}; 41184 41185/** 41186 * Converts a Punycode string of ASCII-only symbols to a string of Unicode 41187 * symbols. 41188 * @memberOf punycode 41189 * @param {String} input The Punycode string of ASCII-only symbols. 41190 * @returns {String} The resulting string of Unicode symbols. 41191 */ 41192const decode = function(input) { 41193 // Don't use UCS-2. 41194 const output = []; 41195 const inputLength = input.length; 41196 let i = 0; 41197 let n = initialN; 41198 let bias = initialBias; 41199 41200 // Handle the basic code points: let `basic` be the number of input code 41201 // points before the last delimiter, or `0` if there is none, then copy 41202 // the first basic code points to the output. 41203 41204 let basic = input.lastIndexOf(delimiter); 41205 if (basic < 0) { 41206 basic = 0; 41207 } 41208 41209 for (let j = 0; j < basic; ++j) { 41210 // if it's not a basic code point 41211 if (input.charCodeAt(j) >= 0x80) { 41212 error('not-basic'); 41213 } 41214 output.push(input.charCodeAt(j)); 41215 } 41216 41217 // Main decoding loop: start just after the last delimiter if any basic code 41218 // points were copied; start at the beginning otherwise. 41219 41220 for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { 41221 41222 // `index` is the index of the next character to be consumed. 41223 // Decode a generalized variable-length integer into `delta`, 41224 // which gets added to `i`. The overflow checking is easier 41225 // if we increase `i` as we go, then subtract off its starting 41226 // value at the end to obtain `delta`. 41227 const oldi = i; 41228 for (let w = 1, k = base; /* no condition */; k += base) { 41229 41230 if (index >= inputLength) { 41231 error('invalid-input'); 41232 } 41233 41234 const digit = basicToDigit(input.charCodeAt(index++)); 41235 41236 if (digit >= base) { 41237 error('invalid-input'); 41238 } 41239 if (digit > floor((maxInt - i) / w)) { 41240 error('overflow'); 41241 } 41242 41243 i += digit * w; 41244 const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); 41245 41246 if (digit < t) { 41247 break; 41248 } 41249 41250 const baseMinusT = base - t; 41251 if (w > floor(maxInt / baseMinusT)) { 41252 error('overflow'); 41253 } 41254 41255 w *= baseMinusT; 41256 41257 } 41258 41259 const out = output.length + 1; 41260 bias = adapt(i - oldi, out, oldi == 0); 41261 41262 // `i` was supposed to wrap around from `out` to `0`, 41263 // incrementing `n` each time, so we'll fix that now: 41264 if (floor(i / out) > maxInt - n) { 41265 error('overflow'); 41266 } 41267 41268 n += floor(i / out); 41269 i %= out; 41270 41271 // Insert `n` at position `i` of the output. 41272 output.splice(i++, 0, n); 41273 41274 } 41275 41276 return String.fromCodePoint(...output); 41277}; 41278 41279/** 41280 * Converts a string of Unicode symbols (e.g. a domain name label) to a 41281 * Punycode string of ASCII-only symbols. 41282 * @memberOf punycode 41283 * @param {String} input The string of Unicode symbols. 41284 * @returns {String} The resulting Punycode string of ASCII-only symbols. 41285 */ 41286const encode = function(input) { 41287 const output = []; 41288 41289 // Convert the input in UCS-2 to an array of Unicode code points. 41290 input = ucs2decode(input); 41291 41292 // Cache the length. 41293 const inputLength = input.length; 41294 41295 // Initialize the state. 41296 let n = initialN; 41297 let delta = 0; 41298 let bias = initialBias; 41299 41300 // Handle the basic code points. 41301 for (const currentValue of input) { 41302 if (currentValue < 0x80) { 41303 output.push(stringFromCharCode(currentValue)); 41304 } 41305 } 41306 41307 const basicLength = output.length; 41308 let handledCPCount = basicLength; 41309 41310 // `handledCPCount` is the number of code points that have been handled; 41311 // `basicLength` is the number of basic code points. 41312 41313 // Finish the basic string with a delimiter unless it's empty. 41314 if (basicLength) { 41315 output.push(delimiter); 41316 } 41317 41318 // Main encoding loop: 41319 while (handledCPCount < inputLength) { 41320 41321 // All non-basic code points < n have been handled already. Find the next 41322 // larger one: 41323 let m = maxInt; 41324 for (const currentValue of input) { 41325 if (currentValue >= n && currentValue < m) { 41326 m = currentValue; 41327 } 41328 } 41329 41330 // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, 41331 // but guard against overflow. 41332 const handledCPCountPlusOne = handledCPCount + 1; 41333 if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { 41334 error('overflow'); 41335 } 41336 41337 delta += (m - n) * handledCPCountPlusOne; 41338 n = m; 41339 41340 for (const currentValue of input) { 41341 if (currentValue < n && ++delta > maxInt) { 41342 error('overflow'); 41343 } 41344 if (currentValue === n) { 41345 // Represent delta as a generalized variable-length integer. 41346 let q = delta; 41347 for (let k = base; /* no condition */; k += base) { 41348 const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); 41349 if (q < t) { 41350 break; 41351 } 41352 const qMinusT = q - t; 41353 const baseMinusT = base - t; 41354 output.push( 41355 stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) 41356 ); 41357 q = floor(qMinusT / baseMinusT); 41358 } 41359 41360 output.push(stringFromCharCode(digitToBasic(q, 0))); 41361 bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); 41362 delta = 0; 41363 ++handledCPCount; 41364 } 41365 } 41366 41367 ++delta; 41368 ++n; 41369 41370 } 41371 return output.join(''); 41372}; 41373 41374/** 41375 * Converts a Punycode string representing a domain name or an email address 41376 * to Unicode. Only the Punycoded parts of the input will be converted, i.e. 41377 * it doesn't matter if you call it on a string that has already been 41378 * converted to Unicode. 41379 * @memberOf punycode 41380 * @param {String} input The Punycoded domain name or email address to 41381 * convert to Unicode. 41382 * @returns {String} The Unicode representation of the given Punycode 41383 * string. 41384 */ 41385const toUnicode = function(input) { 41386 return mapDomain(input, function(string) { 41387 return regexPunycode.test(string) 41388 ? decode(string.slice(4).toLowerCase()) 41389 : string; 41390 }); 41391}; 41392 41393/** 41394 * Converts a Unicode string representing a domain name or an email address to 41395 * Punycode. Only the non-ASCII parts of the domain name will be converted, 41396 * i.e. it doesn't matter if you call it with a domain that's already in 41397 * ASCII. 41398 * @memberOf punycode 41399 * @param {String} input The domain name or email address to convert, as a 41400 * Unicode string. 41401 * @returns {String} The Punycode representation of the given domain name or 41402 * email address. 41403 */ 41404const toASCII = function(input) { 41405 return mapDomain(input, function(string) { 41406 return regexNonASCII.test(string) 41407 ? 'xn--' + encode(string) 41408 : string; 41409 }); 41410}; 41411 41412/*--------------------------------------------------------------------------*/ 41413 41414/** Define the public API */ 41415const punycode = { 41416 /** 41417 * A string representing the current Punycode.js version number. 41418 * @memberOf punycode 41419 * @type String 41420 */ 41421 'version': '2.3.1', 41422 /** 41423 * An object of methods to convert from JavaScript's internal character 41424 * representation (UCS-2) to Unicode code points, and back. 41425 * @see <https://mathiasbynens.be/notes/javascript-encoding> 41426 * @memberOf punycode 41427 * @type Object 41428 */ 41429 'ucs2': { 41430 'decode': ucs2decode, 41431 'encode': ucs2encode 41432 }, 41433 'decode': decode, 41434 'encode': encode, 41435 'toASCII': toASCII, 41436 'toUnicode': toUnicode 41437}; 41438
41439class ItcCustomSelect { 41440 static EL = 'form__select'; 41441 static EL_SHOW = 'form__select-show'; 41442 static EL_OPTION = 'form__select-option'; 41443 static EL_OPTION_SELECTED = 'form__select-option_selected'; 41444 static DATA = '[data-select]'; 41445 static DATA_TOGGLE = '[data-select="toggle"]'; 41446 41447 static template(params) { 41448 const { name, options, targetValue } = params; 41449 const items = []; 41450 let selectedIndex = -1; 41451 let selectedValue = ''; 41452 let selectedContent = 'ÐÑбеÑиÑе из ÑпиÑка'; 41453 options.forEach((option, index) => { 41454 let selectedClass = ''; 41455 if (option[0] === targetValue) { 41456 selectedClass = ` ${this.EL_OPTION_SELECTED}`; 41457 selectedIndex = index; 41458 selectedValue = option[0]; 41459 selectedContent = option[1]; 41460 } 41461 items.push(`<li class="form__select-option${selectedClass}" data-select="option" 41462 data-value="${option[0]}" data-index="${index}">${option[1]}</li>`); 41463 }); 41464 return `<button type="button" class="form__select-toggle" name="${name}" 41465 value="${selectedValue}" data-select="toggle" data-index="${selectedIndex}"> 41466 ${selectedContent}</button><div class="form__select-dropdown"> 41467 <ul class="form__select-options">${items.join('')}</ul></div>`; 41468 } 41469 41470 static hideOpenSelect() { 41471 document.addEventListener('click', (e) => { 41472 if (!e.target.closest(`.${this.EL}`)) { 41473 const elsActive = document.querySelectorAll(`.${this.EL_SHOW}`); 41474 elsActive.forEach((el) => { 41475 el.classList.remove(this.EL_SHOW); 41476 }); 41477 } 41478 }); 41479 } 41480 static create(target, params) { 41481 this._el = typeof target === 'string' ? document.querySelector(target) : target; 41482 if (this._el) { 41483 return new this(target, params); 41484 } 41485 return null; 41486 } 41487 constructor(target, params) { 41488 this._el = typeof target === 'string' ? document.querySelector(target) : target; 41489 this._params = params || {}; 41490 this._onClickFn = this._onClick.bind(this); 41491 if (this._params.options) { 41492 this._el.innerHTML = this.constructor.template(this._params); 41493 this._el.classList.add(this.constructor.EL); 41494 } 41495 this._elToggle = this._el.querySelector(this.constructor.DATA_TOGGLE); 41496 this._el.addEventListener('click', this._onClickFn); 41497 this._input = this._el.querySelector('input') 41498 } 41499 41500 _onClick(e) { 41501 e?.stopPropagation(); 41502 const { target } = e; 41503 const type = target.closest(this.constructor.DATA).dataset.select; 41504 if (type === 'toggle') { 41505 this.toggle(); 41506 } else if (type === 'option') { 41507 this._changeValue(target); 41508 } 41509 } 41510 41511 _updateOption(el) { 41512 if (!this._el.classList.contains('form__select-filled')) { 41513 this._el.classList.add('form__select-filled') 41514 } 41515 const elOption = el.closest(`.${this.constructor.EL_OPTION}`);
vendor: 17,277 bytes, lines 41516-41617
41516 const elOptionSel = this._el.querySelector(`.${this.constructor.EL_OPTION_SELECTED}`); 41517 if (elOptionSel) { 41518 elOptionSel.classList.remove(this.constructor.EL_OPTION_SELECTED); 41519 } 41520 elOption.classList.add(this.constructor.EL_OPTION_SELECTED); 41521 this._elToggle.textContent = elOption.textContent; 41522 this._elToggle.value = elOption.dataset.value; 41523 this._elToggle.dataset.index = elOption.dataset.index; 41524 this._el.dispatchEvent(new CustomEvent('itc.select.change')); 41525 this._params.onSelected ? this._params.onSelected(this, elOption) : null; 41526 41527 if (this._input) { 41528 this._input.value = elOption.dataset.value 41529 } 41530 if (this._input.classList.contains('error')) { 41531 this._input.classList.remove('error') 41532 } 41533 41534 const error = this._el?.querySelector('.error') 41535 if (error) { 41536 error.style.display = 'none' 41537 } 41538 41539 return elOption.dataset.value; 41540 } 41541 41542 _reset() { 41543 const selected = this._el.querySelector(`.${this.constructor.EL_OPTION_SELECTED}`); 41544 if (selected) { 41545 selected.classList.remove(this.constructor.EL_OPTION_SELECTED); 41546 } 41547 this._elToggle.textContent = 'ÐÑбеÑиÑе из ÑпиÑка'; 41548 this._elToggle.value = ''; 41549 this._elToggle.dataset.index = '-1'; 41550 this._el.dispatchEvent(new CustomEvent('itc.select.change')); 41551 this._params.onSelected ? this._params.onSelected(this, null) : null; 41552 return ''; 41553 } 41554 41555 _changeValue(el) { 41556 if (el.classList.contains(this.constructor.EL_OPTION_SELECTED)) { 41557 return; 41558 } 41559 this._updateOption(el); 41560 this.hide(); 41561 } 41562 41563 show() { 41564 document.querySelectorAll(this.constructor.EL_SHOW) 41565 .forEach((el) => { 41566 el.classList.remove(this.constructor.EL_SHOW); 41567 }); 41568 this._el.classList.add(`${this.constructor.EL_SHOW}`); 41569 } 41570 41571 hide() { 41572 this._el.classList.remove(this.constructor.EL_SHOW); 41573 } 41574 41575 toggle() { 41576 this._el.classList.contains(this.constructor.EL_SHOW) ? this.hide() : this.show(); 41577 } 41578 41579 dispose() { 41580 this._el.removeEventListener('click', this._onClickFn); 41581 } 41582 41583 get value() { 41584 return this._elToggle.value; 41585 } 41586 41587 set value(value) { 41588 let isExists = false; 41589 this._el.querySelectorAll('.select__option') 41590 .forEach((option) => { 41591 if (option.dataset.value === value) { 41592 isExists = true; 41593 this._updateOption(option); 41594 } 41595 }); 41596 if (!isExists) { 41597 this._reset(); 41598 } 41599 } 41600 41601 get selectedIndex() { 41602 return this._elToggle.dataset.index; 41603 } 41604 41605 set selectedIndex(index) { 41606 const option = this._el.querySelector(`.select__option[data-index="${index}"]`); 41607 if (option) { 41608 this._updateOption(option); 41609 } 41610 this._reset(); 41611 } 41612} 41613 41614ItcCustomSelect.hideOpenSelect(); 41615 41616/*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 41617!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(t){var e,n,s,p,r,o,h,f,g,m,y,v,i,a,_,s=((u=t&&t.fn&&t.fn.select2&&t.fn.select2.amd?t.fn.select2.amd:u)&&u.requirejs||(u?n=u:u={},g={},m={},y={},v={},i=Object.prototype.hasOwnProperty,a=[].slice,_=/\.js$/,h=function(e,t){var n,s,i=c(e),r=i[0],t=t[1];return e=i[1],r&&(n=x(r=l(r,t))),r?e=n&&n.normalize?n.normalize(e,(s=t,function(e){return l(e,s)})):l(e,t):(r=(i=c(e=l(e,t)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},f={require:function(e){return w(e)},exports:function(e){var t=g[e];return void 0!==t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},r=function(e,t,n,s){var i,r,o,a,l,c=[],u=typeof n,d=A(s=s||e);if("undefined"==u||"function"==u){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(r=(o=h(t[a],d)).f))c[a]=f.require(e);else if("exports"===r)c[a]=f.exports(e),l=!0;else if("module"===r)i=c[a]=f.module(e);else if(b(g,r)||b(m,r)||b(v,r))c[a]=x(r);else{if(!o.p)throw new Error(e+" missing "+r);o.p.load(o.n,w(s,!0),function(t){return function(e){g[t]=e}}(r),{}),c[a]=g[r]}u=n?n.apply(g[e],c):void 0,e&&(i&&i.exports!==p&&i.exports!==g[e]?g[e]=i.exports:u===p&&l||(g[e]=u))}else e&&(g[e]=n)},e=n=o=function(e,t,n,s,i){if("string"==typeof e)return f[e]?f[e](t):x(h(e,A(t)).f);if(!e.splice){if((y=e).deps&&o(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=s,s=i),s?r(p,e,t,n):setTimeout(function(){r(p,e,t,n)},4),o},o.config=function(e){return o(e)},e._defined=g,(s=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(g,e)||b(m,e)||(m[e]=[e,t,n])}).amd={jQuery:!0},u.requirejs=e,u.require=n,u.define=s),u.define("almond",function(){}),u.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),u.define("select2/utils",["jquery"],function(r){var s={};function c(e){var t,n=e.prototype,s=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&s.push(t);return s}s.Extend=function(e,t){var n,s={}.hasOwnProperty;function i(){this.constructor=e}for(n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},s.Decorate=function(s,i){var e=c(i),t=c(s);function r(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=s.prototype.constructor;0<t&&(e.call(arguments,s.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=s.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var o=t[n];r.prototype[o]=s.prototype[o]}for(var a=0;a<e.length;a++){var l=e[a];r.prototype[l]=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return r};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},0===(n=null==n?[]:n).length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,s=e.length;n<s;n++)e[n].apply(this,t)},s.Observable=e,s.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},s.bind=function(e,t){return function(){e.apply(t,arguments)}},s._convertData=function(e){for(var t in e){var n=t.split("-"),s=e;if(1!==n.length){for(var i=0;i<n.length;i++){var r=n[i];(r=r.substring(0,1).toLowerCase()+r.substring(1))in s||(s[r]={}),i==n.length-1&&(s[r]=e[t]),s=s[r]}delete e[t]}}return e},s.hasScroll=function(e,t){var n=r(t),s=t.style.overflowX,i=t.style.overflowY;return(s!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===s||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},s.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},s.__cache={};var n=0;return s.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null!=t||(t=e.id?"select2-data-"+e.id:"select2-data-"+(++n).toString()+"-"+s.generateChars(4),e.setAttribute("data-select2-id",t)),t},s.StoreData=function(e,t,n){e=s.GetUniqueElementId(e);s.__cache[e]||(s.__cache[e]={}),s.__cache[e][t]=n},s.GetData=function(e,t){var n=s.GetUniqueElementId(e);return t?s.__cache[n]&&null!=s.__cache[n][t]?s.__cache[n][t]:r(e).data(t):s.__cache[n]},s.RemoveData=function(e){var t=s.GetUniqueElementId(e);null!=s.__cache[t]&&delete s.__cache[t],e.removeAttribute("data-select2-id")},s.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0===e.indexOf("select2-")}),t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0!==e.indexOf("select2-")}),t=n.concat(t);e.setAttribute("class",t.join(" "))},s}),u.define("select2/results",["jquery","./utils"],function(d,p){function s(e,t,n){this.$element=e,this.data=n,this.options=t,s.__super__.constructor.call(this)}return p.Extend(s,p.Observable),s.prototype.render=function(){var e=d('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),s=this.options.get("translations").get(e.message);n.append(t(s(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var s=e.results[n],s=this.option(s);t.push(s)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},s.prototype.position=function(e,t){t.find(".select2-results").append(e)},s.prototype.sort=function(e){return this.options.get("sorter")(e)},s.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");(0<t.length?t:e).first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var t=this;this.data.current(function(e){var s=e.map(function(e){return e.id.toString()});t.$results.find(".select2-results__option--selectable").each(function(){var e=d(this),t=p.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<s.indexOf(n)?(this.classList.add("select2-results__option--selected"),e.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),e.attr("aria-selected","false"))})})},s.prototype.showLoading=function(e){this.hideLoading();e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},e=this.option(e);e.className+=" loading-results",this.$results.prepend(e)},s.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},s.prototype.option=function(e){var t=document.createElement("li");t.classList.add("select2-results__option"),t.classList.add("select2-results__option--selectable");var n,s={role:"option"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(n in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(s["aria-disabled"]="true",t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--disabled")),null==e.id&&t.classList.remove("select2-results__option--selectable"),null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(s.role="group",s["aria-label"]=e.text,t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--group")),s){var r=s[n];t.setAttribute(n,r)}if(e.children){var o=d(t),a=document.createElement("strong");a.className="select2-results__group",this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],u=this.option(u);l.push(u)}i=d("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});i.append(l),o.append(a),o.append(i)}else this.template(e,t);return p.StoreData(t,"data",e),t},s.prototype.bind=function(t,e){var i=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=i.getHighlightedResults();0!==t.length&&(e=p.GetData(t[0],"data"),t.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t);s<=0||(e=s-1,0===t.length&&(e=0),(s=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=s.offset().top,s=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(s))}),t.on("results:next",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t)+1;s>=n.length||((e=n.eq(s)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===s?i.$results.scrollTop(0):t<n&&i.$results.scrollTop(e))}),t.on("results:focus",function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")}),t.on("results:message",function(e){i.displayMessage(e)}),d.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=i.$results.height();t?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option--selectable",function(e){var t=d(this),n=p.GetData(this,"data");t.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:e,data:n}):i.trigger("close",{}):i.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option--selectable",function(e){var t=p.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:t,element:d(this)})})},s.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},s.prototype.destroy=function(){this.$results.remove()},s.prototype.ensureHighlightVisible=function(){var e,t,n,s,i=this.getHighlightedResults();0!==i.length&&(e=this.$results.find(".select2-results__option--selectable").index(i),s=this.$results.offset().top,t=i.offset().top,n=this.$results.scrollTop()+(t-s),s=t-s,n-=2*i.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(n))},s.prototype.template=function(e,t){var n=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=s(e):d(t).append(e)},s}),u.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),u.define("select2/selection/base",["jquery","../utils","../keys"],function(n,s,i){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return s.Extend(r,s.Observable),r.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=s.GetData(this.$element[0],"old-tabindex")?this._tabindex=s.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},r.prototype.bind=function(e,t){var n=this,s=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",s),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","fal
41617se"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},r.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&s.GetData(this,"element").select2("close")})})},r.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},r.prototype.position=function(e,t){t.find(".selection").append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),u.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,s){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("aria-controls",s),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i}),u.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,c){function r(e,t){r.__super__.constructor.apply(this,arguments)}return c.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var s=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){var t;n.isDisabled()||(t=i(this).parent(),t=c.GetData(t[0],"data"),n.trigger("unselect",{originalEvent:e,data:t}))}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){n.isDisabled()||e.stopPropagation()})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">×</span></button><span class="select2-selection__choice__display"></span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",s=0;s<e.length;s++){var i=e[s],r=this.selectionContainer(),o=this.display(i,r),a=n+c.generateChars(4)+"-";
vendor: 4,794 bytes, line 41617
41617i.id?a+=i.id:a+=c.generateChars(4),r.find(".select2-selection__choice__display").append(o).attr("id",a);var l=i.title||i.text;l&&r.attr("title",l);o=this.options.get("translations").get("removeItem"),l=r.find(".select2-selection__choice__remove");l.attr("title",o()),l.attr("aria-label",o()),l.attr("aria-describedby",a),c.StoreData(r[0],"data",i),t.push(r)}this.$selection.find(".select2-selection__rendered").append(t)}},r}),u.define("select2/selection/placeholder",[],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return t="string"==typeof t?{id:"",text:t}:t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");t=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",t),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(t)},e}),u.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,s,a){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){s._handleClear(e)}),t.on("keypress",function(e){s._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var s=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var r={data:s};if(this.trigger("clear",r),r.prevented)this.$element.val(i);else{for(var o=0;o<s.length;o++)if(r={data:s[o]},this.trigger("unselect",r),r.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=s.DELETE&&t.which!=s.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){var n,s;e.call(this,t),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),0<this.$selection.find(".select2-selection__placeholder").length||0===t.length||(n=this.$selection.find(".select2-selection__rendered").attr("id"),s=this.options.get("translations").get("removeAllItems"),(e=i('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">×</span></button>')).attr("title",s()),e.attr("aria-label",s()),e.attr("aria-describedby",n),a.StoreData(e[0],"data",t),this.$selection.prepend(e),this.$selection[0].classList.add("select2-selection--clearable"))},e}),u.define("select2/selection/search",["jquery","../utils","../keys"],function(s,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=this.options.get("translations").get("search"),n=s('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=n,this.$search=n.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",t());e=e.call(this);return this._transferTabIndex(),e.append(this.$searchContainer),e},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results",r=t.id+"-container";e.call(this,t,n),s.$search.attr("aria-describedby",r),t.on("open",function(){s.$search.attr("aria-controls",i),s.$search.trigger("focus")}),t.on("close",function(){s.$search.val(""),s.resizeSearch(),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")}),t.on("enable",function(){s.$search.prop("disabled",!1),s._transferTabIndex()}),t.on("disable",function(){s.$search.prop("disabled",!0)}),t.on("focus",function(e){s.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){s.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){s._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){var t;
vendor: 2,823 bytes, line 41617
41617e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which!==l.BACKSPACE||""!==s.$search.val()||0<(t=s.$selection.find(".select2-selection__choice").last()).length&&(t=a.GetData(t[0],"data"),s.searchRemoveChoice(t),e.preventDefault())}),this.$selection.on("click",".select2-search--inline",function(e){s.$search.val()&&e.stopPropagation()});var t=document.documentMode,o=t&&t<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o?s.$selection.off("input.search input.searchcheck"):s.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){var t;o&&"input"===e.type?s.$selection.off("input.search input.searchcheck"):(t=e.which)!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&s.handleSearch(e)})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},e}),u.define("select2/selection/selectionCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("selectionCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var s=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],r=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==i.indexOf(e)&&(t=t||{},n=o.Event("select2:"+e,{params:t}),s.$element.trigger(n),-1!==r.indexOf(e)&&(t.prevented=n.isDefaultPrevented()))})},e}),u.define("select2/translation",["jquery","require"],function(t,n){function s(e){this.dict=e||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(e){return this.dict[e]},s.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},s._cache={},s.loadPath=function(e){var t;
41617return e in s._cache||(t=n(e),s._cache[e]=t),new s(s._cache[e])},s}),u.define("select2/diacritics",[],function(){return{"â¶":"A","A":"A","Ã":"A","Ã":"A","Ã":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ä":"A","Ä":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ã":"A","Ç":"A","Ả":"A","Ã
":"A","Ǻ":"A","Ç":"A","È":"A","È":"A","Ạ":"A","Ậ":"A","Ặ":"A","á¸":"A","Ä":"A","Ⱥ":"A","Ɐ":"A","ê²":"AA","Ã":"AE","Ǽ":"AE","Ç¢":"AE","ê´":"AO","ê¶":"AU","ê¸":"AV","êº":"AV","ê¼":"AY","â·":"B","ï¼¢":"B","á¸":"B","á¸":"B","á¸":"B","É":"B","Æ":"B","Æ":"B","â¸":"C","ï¼£":"C","Ä":"C","Ä":"C","Ä":"C","Ä":"C","Ã":"C","á¸":"C","Æ":"C","È»":"C","ê¾":"C","â¹":"D","D":"D","á¸":"D","Ä":"D","á¸":"D","á¸":"D","á¸":"D","á¸":"D","Ä":"D","Æ":"D","Æ":"D","Æ":"D","ê¹":"D","DZ":"DZ","Ç":"DZ","Dz":"Dz","Ç
":"Dz","âº":"E","ï¼¥":"E","Ã":"E","Ã":"E","Ã":"E","á»":"E","Ế":"E","á»":"E","á»":"E","Ẽ":"E","Ä":"E","á¸":"E","á¸":"E","Ä":"E","Ä":"E","Ã":"E","Ẻ":"E","Ä":"E","È":"E","È":"E","Ẹ":"E","á»":"E","Ȩ":"E","á¸":"E","Ä":"E","á¸":"E","á¸":"E","Æ":"E","Æ":"E","â»":"F","F":"F","á¸":"F","Æ":"F","ê»":"F","â¼":"G","ï¼§":"G","Ç´":"G","Ä":"G","Ḡ":"G","Ä":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Æ":"G","ê ":"G","ê½":"G","ê¾":"G","â½":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","È":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","â±§":"H","â±µ":"H","ê":"H","â¾":"I","I":"I","Ã":"I","Ã":"I","Ã":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ã":"I","Ḯ":"I","á»":"I","Ç":"I","È":"I","È":"I","á»":"I","Ä®":"I","Ḭ":"I","Æ":"I","â¿":"J","J":"J","Ä´":"J","É":"J","â":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Æ":"K","Ⱪ":"K","ê":"K","ê":"K","ê":"K","ê¢":"K","â":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Å":"L","Ƚ":"L","â±¢":"L","â± ":"L","ê":"L","ê":"L","ê":"L","Ç":"LJ","Ç":"Lj","â":"M","ï¼":"M","Ḿ":"M","á¹":"M","á¹":"M","â±®":"M","Æ":"M","â":"N","ï¼®":"N","Ǹ":"N","Å":"N","Ã":"N","á¹":"N","Å":"N","á¹":"N","Å
":"N","á¹":"N","á¹":"N","È ":"N","Æ":"N","ê":"N","ê¤":"N","Ç":"NJ","Ç":"Nj","â":"O","O":"O","Ã":"O","Ã":"O","Ã":"O","á»":"O","á»":"O","á»":"O","á»":"O","Ã":"O","á¹":"O","Ȭ":"O","á¹":"O","Å":"O","á¹":"O","á¹":"O","Å":"O","È®":"O","Ȱ":"O","Ã":"O","Ȫ":"O","á»":"O","Å":"O","Ç":"O","È":"O","È":"O","Æ ":"O","á»":"O","á»":"O","á» ":"O","á»":"O","Ợ":"O","á»":"O","á»":"O","Ǫ":"O","Ǭ":"O","Ã":"O","Ǿ":"O","Æ":"O","Æ":"O","ê":"O","ê":"O","Å":"OE","Æ¢":"OI","ê":"OO","È¢":"OU","â
":"P","ï¼°":"P","á¹":"P","á¹":"P","Ƥ":"P","â±£":"P","ê":"P","ê":"P","ê":"P","â":"Q","ï¼±":"Q","ê":"Q","ê":"Q","É":"Q","â":"R","ï¼²":"R","Å":"R","á¹":"R","Å":"R","È":"R","È":"R","á¹":"R","á¹":"R","Å":"R","á¹":"R","É":"R","Ɽ":"R","ê":"R","ê¦":"R","ê":"R","â":"S","ï¼³":"S","áº":"S","Å":"S","Ṥ":"S","Å":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","È":"S","Å":"S","â±¾":"S","ê¨":"S","ê":"S","â":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","È":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","ê":"T","ê¨":"TZ","â":"U","ï¼µ":"U","Ã":"U","Ã":"U","Ã":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ã":"U","Ç":"U","Ç":"U","Ç":"U","Ç":"U","Ủ":"U","Å®":"U","Ű":"U","Ç":"U","È":"U","È":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","á¹¶":"U","á¹´":"U","É":"U","â":"V","ï¼¶":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","ê":"V","É
":"V","ê ":"VY","â":"W","ï¼·":"W","áº":"W","áº":"W","Å´":"W","áº":"W","áº":"W","áº":"W","â±²":"W","â":"X","X":"X","áº":"X","áº":"X","â":"Y","ï¼¹":"Y","Ỳ":"Y","Ã":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","áº":"Y","Ÿ":"Y","á»¶":"Y","á»´":"Y","Ƴ":"Y","É":"Y","Ỿ":"Y","â":"Z","Z":"Z","Ź":"Z","áº":"Z","Å»":"Z","Ž":"Z","áº":"Z","áº":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","ê¢":"Z","â":"a","ï½":"a","áº":"a","à ":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","Ä":"a","Ä":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","Ç":"a","ả":"a","Ã¥":"a","Ç»":"a","Ç":"a","È":"a","È":"a","ạ":"a","áº":"a","ặ":"a","á¸":"a","Ä
":"a","â±¥":"a","É":"a","ê³":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","êµ":"ao","ê·":"au","ê¹":"av","ê»":"av","ê½":"ay","â":"b","ï½":"b","á¸":"b","á¸
":"b","á¸":"b","Æ":"b","Æ":"b","É":"b","â":"c","ï½":"c","Ä":"
41617c","Ä":"c","Ä":"c","Ä":"c","ç":"c","á¸":"c","Æ":"c","ȼ":"c","ê¿":"c","â":"c","â":"d","ï½":"d","á¸":"d","Ä":"d","á¸":"d","á¸":"d","á¸":"d","á¸":"d","Ä":"d","Æ":"d","É":"d","É":"d","êº":"d","dz":"dz","Ç":"dz","â":"e","ï½
":"e","è":"e","é":"e","ê":"e","á»":"e","ế":"e","á»
":"e","á»":"e","ẽ":"e","Ä":"e","á¸":"e","á¸":"e","Ä":"e","Ä":"e","ë":"e","ẻ":"e","Ä":"e","È
":"e","È":"e","ẹ":"e","á»":"e","È©":"e","á¸":"e","Ä":"e","á¸":"e","á¸":"e","É":"e","É":"e","Ç":"e","â":"f","ï½":"f","á¸":"f","Æ":"f","ê¼":"f","â":"g","ï½":"g","ǵ":"g","Ä":"g","ḡ":"g","Ä":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","ê¡":"g","áµ¹":"g","ê¿":"g","â":"h","ï½":"h","Ä¥":"h","ḣ":"h","ḧ":"h","È":"h","ḥ":"h","ḩ":"h","ḫ":"h","áº":"h","ħ":"h","ⱨ":"h","â±¶":"h","É¥":"h","Æ":"hv","â":"i","ï½":"i","ì":"i","Ã":"i","î":"i","Ä©":"i","Ä«":"i","Ä":"i","ï":"i","ḯ":"i","á»":"i","Ç":"i","È":"i","È":"i","á»":"i","į":"i","á¸":"i","ɨ":"i","ı":"i","â":"j","ï½":"j","ĵ":"j","ǰ":"j","É":"j","â":"k","ï½":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","Æ":"k","ⱪ":"k","ê":"k","ê":"k","ê
":"k","ê£":"k","â":"l","ï½":"l","Å":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","Å":"l","Æ":"l","É«":"l","ⱡ":"l","ê":"l","ê":"l","ê":"l","Ç":"lj","â":"m","ï½":"m","ḿ":"m","á¹":"m","á¹":"m","ɱ":"m","ɯ":"m","â":"n","ï½":"n","ǹ":"n","Å":"n","ñ":"n","á¹
":"n","Å":"n","á¹":"n","Å":"n","á¹":"n","á¹":"n","Æ":"n","ɲ":"n","Å":"n","ê":"n","ê¥":"n","Ç":"nj","â":"o","ï½":"o","ò":"o","ó":"o","ô":"o","á»":"o","á»":"o","á»":"o","á»":"o","õ":"o","á¹":"o","È":"o","á¹":"o","Å":"o","á¹":"o","á¹":"o","Å":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","á»":"o","Å":"o","Ç":"o","È":"o","È":"o","Æ¡":"o","á»":"o","á»":"o","ỡ":"o","á»":"o","ợ":"o","á»":"o","á»":"o","Ç«":"o","Ç":"o","ø":"o","Ç¿":"o","É":"o","ê":"o","ê":"o","ɵ":"o","Å":"oe","Æ£":"oi","È£":"ou","ê":"oo","â":"p","ï½":"p","á¹":"p","á¹":"p","Æ¥":"p","áµ½":"p","ê":"p","ê":"p","ê":"p","â ":"q","ï½":"q","É":"q","ê":"q","ê":"q","â¡":"r","ï½":"r","Å":"r","á¹":"r","Å":"r","È":"r","È":"r","á¹":"r","á¹":"r","Å":"r","á¹":"r","É":"r","ɽ":"r","ê":"r","ê§":"r","ê":"r","â¢":"s","ï½":"s","Ã":"s","Å":"s","á¹¥":"s","Å":"s","ṡ":"s","Å¡":"s","á¹§":"s","á¹£":"s","ṩ":"s","È":"s","Å":"s","È¿":"s","ê©":"s","ê
":"s","áº":"s","â£":"t","ï½":"t","ṫ":"t","áº":"t","Å¥":"t","á¹":"t","È":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ":"t","Ê":"t","ⱦ":"t","ê":"t","ê©":"tz","â¤":"u","ï½":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å":"u","ü":"u","Ç":"u","Ç":"u","Ç":"u","Ç":"u","á»§":"u","ů":"u","ű":"u","Ç":"u","È":"u","È":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","á»":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","Ê":"u","â¥":"v","ï½":"v","á¹½":"v","ṿ":"v","Ê":"v","ê":"v","Ê":"v","ê¡":"vy","â¦":"w","ï½":"w","áº":"w","áº":"w","ŵ":"w","áº":"w","áº
":"w","áº":"w","áº":"w","â±³":"w","â§":"x","ï½":"x","áº":"x","áº":"x","â¨":"y","ï½":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","áº":"y","ÿ":"y","á»·":"y","áº":"y","ỵ":"y","Æ´":"y","É":"y","ỿ":"y","â©":"z","ï½":"z","ź":"z","áº":"z","ż":"z","ž":"z","áº":"z","áº":"z","ƶ":"z","È¥":"z","É":"z","ⱬ":"z","ê£":"z","Î":"Î","Î":"Î","Î":"Î","Î":"Î","Ϊ":"Î","Î":"Î","Î":"Î¥","Ϋ":"Î¥","Î":"Ω","ά":"α","Î":"ε","ή":"η","ί":"ι","Ï":"ι","Î":"ι","Ï":"ο","Ï":"Ï
","Ï":"Ï
","ΰ":"Ï
","Ï":"Ï","Ï":"Ï","â":"'"}}),u.define("select2/data/base",["../utils"],function(n){function s(e,t){s.__super__.constructor.call(this)}return n.Extend(s,n.Observable),s.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},s.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},s.prototype.bind=function(e,t){},s.prototype.destroy=function(){},s.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},s}),u.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(l(e))}))},n.prototype.select=function(i){var e,r=this;if(i.selected=!0,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var s=i[n].id;-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")}):(e=i.id,this.$element.val(e),this.$element.trigger("input").trigger("change"))},n.prototype.unselect=function(i){var r=this;if(this.$element.prop("multiple")){if(i.selected=!1,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var s=e[n].id;s!==i.id&&-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(t,e){var n=[],s=this;this.$element.children().each(function(){var e;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(e=l(this),e=s.item(e),null!==(e=s.matches(t,e))&&n.push(e))}),e({results:n})},n.prototype.addOptions=function(e){this.$element.append(e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);e=this._normalizeItem(e);return e.element=t,a.StoreData(t,"data",e),l(t)},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;var n=e[0];if("option"===n.tagName.toLowerCase())t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===n.tagName.toLowerCase()){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var s=e.children("option"),i=[],r=0;r<s.length;r++){var o=l(s[r]),o=this.item(o);i.push(o)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),u.define("select2/data/array",["./select","../utils","jquery"],function(e,t,c){function s(e,t){this._dataToConvert=t.get("data")||[],s.__super__.constructor.call(this,e,t)}return t.Extend(s,e),s.prototype.bind=function(e,t){s.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},s.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),s.__super__.select.call(this,n)},s.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),s=n.map(function(){return t.item(c(this)).id}).get(),i=[];for(var r=0;r<e.length;r++){var o,a,l=this._normalizeItem(e[r]);0<=s.indexOf(l.id)?(o=n.filter(function(e){return function(){return c(this).val()==e.id}}(l)),a=this.item(o),a=c.extend(!0,{},l,a),a=this.option(a),o.replaceWith(a)):(a=this.option(l),l.children&&(l=this.convertToOptions(l.children),a.append(l)),i.push(a))}return i},s}),u.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,r){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return r.extend({},e,{q:e.term})},transport:function(e,t,n){e=r.ajax(e);return e.then(t),e.fail(n),e}};return r.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(t,n){var s=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=r.extend({type:"GET"},this.ajaxOptions);function e(){var e=i.transport(i,function(e){e=s.processResults(e,t);s.options.get("debug")&&window.console&&console.error&&(e&&e.results&&Array.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){"status"in e&&(0===e.status||"0"===e.status)||s.trigger("results:message",{message:"errorLoading"})});s._request=e}"function"==typeof i.url&&(i.url=i.url.call(this.$element,t)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),u.define("select2/data/tags",["jquery"],function(t){function e(e,t,n){var s=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);i=n.get("insertTag");if(void 0!==i&&(this.insertTag=i),e.call(this,t,n),Array.isArray(s))for(var r=0;r<s.length;r++){var o=s[r],o=this._normalizeItem(o),o=this.option(o);this.$element.append(o)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var s=t.results,i=0;i<s.length;i++){var r=s[i],o=null!=r.children&&!e({results:r.children},!0);if((r.text||"").toUpperCase()===(c.term||"").toUpperCase()||o)return!n&&(t.data=s,void u(t))}if(n)return!0;var a,l=d.createTag(c);null!=l&&((a=d.option(l)).attr("data-select2-tag","true"),d.addOptions([a]),d.insertTag(s,l)),t.results=s,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){if(null==t.term)return null;t=t.term.trim();return""===t?null:{id:t,text:t}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),u.define("select2/data/tokenizer",["jquery"],function(c){function e(e,t,n){var s=n.get("tokenizer");void 0!==s&&(this.tokenizer=s),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var s=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=s._normalizeItem(e);s.$element.find("option").filter(function(){return c(this).val()===n.id}).length||((t=s.option(n)).attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([t])),t=n,s.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,s){for(var i=n.get("tokenSeparators")||[],r=t.term,o=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};o<r.length;){var l=r[o];-1!==i.indexOf(l)?(l=r.substr(0,o),null!=(l=a(c.extend({},t,{term:l})))?(s(l),r=r.substr(o+1)||"",o=0):o++):o++}return{term:r}},e}),u.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(){s._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var s=this;this._checkIfMaximumSelected(function(){e.call(s,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){e=null!=e?e.length:0;0<n.maximumSelectionLength&&e>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()})},e}),u.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),u.define("select2/dropdown/search",["jquery"],function(r){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("translations").get("search"),e=r('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t.prepend(e),t},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){s.trigger("keypress",e),s._
vendor: 4,579 bytes, line 41617
41617keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){s.handleSearch(e)}),t.on("open",function(){s.$search.attr("tabindex",0),s.$search.attr("aria-controls",i),s.$search.trigger("focus"),window.setTimeout(function(){s.$search.trigger("focus")},0)}),t.on("close",function(){s.$search.attr("tabindex",-1),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.val(""),s.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||s.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(s.showSearch(e)?s.$searchContainer[0].classList.remove("select2-search--hide"):s.$searchContainer[0].classList.add("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")})},e.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},e.prototype.showSearch=function(e,t){return!0},e}),u.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,s){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,s)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return t="string"==typeof t?{id:"",text:t}:t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),s=t.length-1;0<=s;s--){var i=t[s];this.placeholder.id===i.id&&n.splice(s,1)}return n},e}),u.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,s){this.lastParams={},e.call(this,t,n,s),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("query",function(e){s.lastParams=e,s.loading=!0}),t.on("query:append",function(e){s.lastParams=e,s.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&(e=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=e+50&&this.loadMore())},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),u.define("select2/dropdown/attachBody",["jquery","../utils"],function(u,o){function e(e,t,n){this.$dropdownParent=u(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("open",function(){s._showDropdown(),s._attachPositioningHandler(t),s._bindContainerResultHandlers(t)}),t.on("close",function(){s._hideDropdown(),s._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u("<span></span>"),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0)},e.prototype._attachPositioningHandler=function(e,t){var n=this,s="scroll.
41617select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id,t=this.$container.parents().filter(o.hasScroll);t.each(function(){o.StoreData(this,"select2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(s,function(e){var t=o.GetData(this,"select2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(s+" "+i+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,s="resize.select2."+t.id,t="orientationchange.select2."+t.id;this.$container.parents().filter(o.hasScroll).off(n),u(window).off(n+" "+s+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),s=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=i.top,r.bottom=i.top+r.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-o,e=l>i.bottom+o,a={left:i.left,top:r.bottom},l=this.$dropdownParent;"static"===l.css("position")&&(l=l.offsetParent());i={top:0,left:0};(u.contains(document.body,l[0])||l[0].isConnected)&&(i=l.offset()),a.top-=i.top,a.left-=i.left,t||n||(s="below"),e||!c||t?!c&&e&&t&&(s="below"):s="above",("above"==s||t&&"below"!==s)&&(a.top=r.top-i.top-o),null!=s&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+s),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+s)),this.$dropdownContainer.css(a)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),u.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,s){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,s)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,s=0;s<t.length;s++){var i=t[s];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),u.define("select2/dropdown/selectOnClose",["../utils"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("close",function(e){s._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}n=this.getHighlightedResults();n.length<1||(null!=(n=s.GetData(n[0],"data")).element&&n.element.selected||null==n.element&&n.selected||this.trigger("select",{data:n}))},e}),u.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(e){s._selectTriggered(e)}),t.on("unselect",function(e){s._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),u.define("select2/dropdown/dropdownCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("dropdownCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(s){function e(){}return e.prototype.highlightFirstItem=function(e){var t=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(0<t.length){var n=t.first(),t=s.GetData(n[0],"data").element;if(t&&t.getAttribute&&"true"===t.getAttribute("data-select2-tag"))return void n.trigger("mouseenter")}e.call(this)},e}),u.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more resultsâ¦"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searchingâ¦"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),u.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function(l,r,o,a,c,u,d,p,h,f,g,t,m,y,v,_,b,$,w,x,A,D,S,E,O,C,L,T,q,I,e){function n(){this.reset()}return n.prototype.apply=function(e){var t;null==(e=l.extend(!0,{},this.defaults,e)).dataAdapter&&(null!=e.ajax?e.dataAdapter=v:null!=e.data?e.dataAdapter=y:e.dataAdapter=m,0<e.minimumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,$)),0<e.maximumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,w)),0<e.maximumSelectionLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,x)),e.tags&&(e.dataAdapter=f.Decorate(e.dataAdapter,_)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=f.Decorate(e.dataAdapter,b))),null==e.resultsAdapter&&(e.resultsAdapter=r,
vendor: 1,369 bytes, line 41617
41617null!=e.ajax&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,E)),null!=e.placeholder&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,S)),e.selectOnClose&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,L)),e.tags&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter&&(e.multiple?e.dropdownAdapter=A:(t=f.Decorate(A,D),e.dropdownAdapter=t),0!==e.minimumResultsForSearch&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,C)),e.closeOnSelect&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,T)),null!=e.dropdownCssClass&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,q)),e.dropdownAdapter=f.Decorate(e.dropdownAdapter,O)),null==e.selectionAdapter&&(e.multiple?e.selectionAdapter=a:e.selectionAdapter=o,null!=e.placeholder&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,c)),e.allowClear&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,u)),e.multiple&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,d)),null!=e.selectionCssClass&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,p)),e.selectionAdapter=f.Decorate(e.selectionAdapter,h)),e.language=this._resolveLanguage(e.language),e.language.push("en");for(var n=[],s=0;s<e.language.length;s++){var i=e.language[s];-1===n.indexOf(i)&&n.push(i)}return e.language=n,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u
vendor: 9,340 bytes, line 41617
416170000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:f.escapeMarkup,language:{},matcher:function e(t,n){if(null==t.term||""===t.term.trim())return n;if(n.children&&0<n.children.length){for(var s=l.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&s.children.splice(i,1);return 0<s.children.length?s:e(t,s)}var r=a(n.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<r.indexOf(o)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,s=this.defaults.language,i=t.prop("lang"),t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(s),this._resolveLanguage(t));return e.language=t,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(l.isEmptyObject(e))return[];if(l.isPlainObject(e))return[e];for(var t,n=Array.isArray(e)?e:[e],s=[],i=0;i<n.length;i++)s.push(n[i]),"string"==typeof n[i]&&0<n[i].indexOf("-")&&(t=n[i].split("-")[0],s.push(t));return s},n.prototype._processTranslations=function(e,t){for(var n=new g,s=0;s<e.length;s++){var i=new g,r=e[s];if("string"==typeof r)try{i=g.loadPath(r)}catch(e){try{r=this.defaults.amdLanguageBase+r,i=g.loadPath(r)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+r+'" could not be automatically loaded. A fallback will be used instead.')}}else i=l.isPlainObject(r)?new g(r):r;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[l.camelCase(e)]=t;n=f._convertData(n);l.extend(!0,this.defaults,n)},new n}),u.define("select2/options",["jquery","./defaults","./utils"],function(c,n,u){function e(e,t){this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=n.applyFromElement(this.options,t)),this.options=n.apply(this.options)}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),u.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),u.StoreData(e[0],"data",u.GetData(e[0],"select2Tags")),u.StoreData(e[0],"tags",!0)),u.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",u.GetData(e[0],"ajaxUrl")),u.StoreData(e[0],"ajax-Url",u.GetData(e[0],"ajaxUrl")));var n={};function s(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var r=e[0].attributes[i].name,o="data-";r.substr(0,o.length)==o&&(r=r.substring(o.length),o=u.GetData(e[0],r),n[r.replace(/-([a-z])/g,s)]=o)}c.fn.jquery&&"1."==c.fn.jquery.substr(0,2)&&e[0].dataset&&(n=c.extend(!0,{},e[0].dataset,n));var a,l=c.extend(!0,{},u.GetData(e[0]),n);for(a in l=u._convertData(l))-1<t.indexOf(a)||(c.isPlainObject(this.options[a])?c.extend(this.options[a],l[a]):this.options[a]=l[a]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),u.define("select2/core",["jquery","./options","./utils","./keys"],function(t,i,r,s){var o=function(e,t){null!=r.GetData(e[0],"select2")&&r.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new i(t,e),o.__super__.constructor.call(this);var n=e.attr("tabindex")||0;r.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");t=this.options.get("dataAdapter");this.dataAdapter=new t(e,this.options);n=this.render();this._placeContainer(n);t=this.options.get("selectionAdapter");this.selection=new t(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,n);t=this.options.get("dropdownAdapter");this.dropdown=new t(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,n);n=this.options.get("resultsAdapter");this.results=new n(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var s=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){s.trigger("selection:update",{data:e})}),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),r.StoreData(e[0],"select2",this),e.data("select2",this)};return r.Extend(o,r.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+r.generateChars(2):r.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var s=this._resolveWidth(e,"style");return null!=s?s:this._resolveWidth(e,"element")}if("element"==t){s=e.outerWidth(!1);return s<=0?"auto":s+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;e=e.attr("style");if("string"!=typeof e)return null;for(var i=e.split(";"),r=0,o=i.length;r<o;r+=1){var a=i[r].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=r.bind(this._syncAttributes,this),this._syncS=r.bind(this._syncSubtree,this),this._observer=new window.MutationObserver(function(e){t._syncA(),t._syncS(e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},o.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerSelectionEvents=function(){var n=this,s=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===s.indexOf(e)&&n.trigger(e,t)})},o.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container[0].classList.add("select2-container--open")}),this.on("close",function(){n.$container[0].classList.remove("select2-container--open")}),this.on("enable",function(){n.$container[0].classList.remove("select2-container--disabled")}),this.on("disable",function(){n.$container[0].classList.add("select2-container--disabled")}),this.on("blur",function(){n.$container[0].classList.remove("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===s.ESC||t===s.UP&&e.altKey?(n.close(e),e.preventDefault()):t===s.ENTER||t===s.TAB?(n.trigger("results:select",{}),e.preventDefault()):t===s.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===s.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===s.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===s.ENTER||t===s.SPACE||t===s.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;
vendor: 4,479 bytes, line 41617
41617if(Array.isArray(e))return e.some(function(e){return t._isChangeMutation(e)})}return!1},o.prototype._syncSubtree=function(e){var e=this._isChangeMutation(e),t=this;e&&this.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,s={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in s){var i=s[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},o.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},o.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.');e=!(e=null==e||0===e.length?[!0]:e)[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0];Array.isArray(e)&&(e=e.map(function(e){return e.toString()})),this.$element.val(e).trigger("input").trigger("change")},o.prototype.destroy=function(){r.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",r.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),r.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),r.StoreData(e[0],"element",this.$element),e},o}),u.define("jquery-mousewheel",["jquery"],function(e){return e}),u.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,r,t,o){var a;return null==i.fn.select2&&(a=["open","close","destroy"],i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new r(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,s)}),-1<a.indexOf(t)?this:n}),null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),r}),{define:u.define,require:u.require});function b(e,t){return i.call(e,t)}function l(e,t){var n,s,i,r,o,a,l,c,u,d,p=t&&t.split("/"),h=y.map,f=h&&h["*"]||{};if(e){for(t=(e=e.split("/")).length-1,y.nodeIdCompat&&_.test(e[t])&&(e[t]=e[t].replace(_,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),c=0;c<e.length;
41617c++)"."===(d=e[c])?(e.splice(c,1),--c):".."===d&&(0===c||1===c&&".."===e[2]||".."===e[c-1]||0<c&&(e.splice(c-1,2),c-=2));e=e.join("/")}if((p||f)&&h){for(c=(n=e.split("/")).length;0<c;--c){if(s=n.slice(0,c).join("/"),p)for(u=p.length;0<u;--u)if(i=h[p.slice(0,u).join("/")],i=i&&i[s]){r=i,o=c;break}if(r)break;!a&&f&&f[s]&&(a=f[s],l=c)}!r&&a&&(r=a,o=l),r&&(n.splice(0,o,r),e=n.join("/"))}return e}function w(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(p,e.concat([t,n]))}}function x(e){var t;if(b(m,e)&&(t=m[e],delete m[e],v[e]=!0,r.apply(p,t)),!b(g,e)&&!b(v,e))throw new Error("No "+e);return g[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function A(e){return e?c(e):[]}var u=s.require("jquery.select2");return t.fn.select2.amd=s,u}); 41618/* 41619 _ _ _ _ 41620 ___| (_) ___| | __ (_)___ 41621/ __| | |/ __| |/ / | / __| 41622\__ \ | | (__| < _ | \__ \ 41623|___/_|_|\___|_|\_(_)/ |___/ 41624 |__/ 41625 41626 Version: 1.9.0 41627 Author: Ken Wheeler 41628 Website: http://kenwheeler.github.io 41629 Docs: http://kenwheeler.github.io/slick 41630 Repo: http://github.com/kenwheeler/slick 41631 Issues: http://github.com/kenwheeler/slick/issues 41632 41633 */ 41634/* global window, document, define, jQuery, setInterval, clearInterval */ 41635;(function(factory) { 41636 'use strict'; 41637 if (typeof define === 'function' && define.amd) { 41638 define(['jquery'], factory); 41639 } else if (typeof exports !== 'undefined') { 41640 module.exports = factory(require('jquery')); 41641 } else { 41642 factory(jQuery); 41643 } 41644 41645}(function($) { 41646 'use strict';
vendor: 29,656 bytes, lines 41646-42634
41646 41647 var Slick = window.Slick || {}; 41648 41649 Slick = (function() { 41650 41651 var instanceUid = 0; 41652 41653 function Slick(element, settings) { 41654 41655 var _ = this, dataSettings; 41656 41657 _.defaults = { 41658 accessibility: true, 41659 adaptiveHeight: false, 41660 appendArrows: $(element), 41661 appendDots: $(element), 41662 arrows: true, 41663 asNavFor: null, 41664 prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>', 41665 nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>', 41666 autoplay: false, 41667 autoplaySpeed: 3000, 41668 centerMode: false, 41669 centerPadding: '50px', 41670 cssEase: 'ease', 41671 customPaging: function(slider, i) { 41672 return $('<button type="button" />').text(i + 1); 41673 }, 41674 dots: false, 41675 dotsClass: 'slick-dots', 41676 draggable: true, 41677 easing: 'linear', 41678 edgeFriction: 0.35, 41679 fade: false, 41680 focusOnSelect: false, 41681 focusOnChange: false, 41682 infinite: true, 41683 initialSlide: 0, 41684 lazyLoad: 'ondemand', 41685 mobileFirst: false, 41686 pauseOnHover: true, 41687 pauseOnFocus: true, 41688 pauseOnDotsHover: false, 41689 respondTo: 'window', 41690 responsive: null, 41691 rows: 1, 41692 rtl: false, 41693 slide: '', 41694 slidesPerRow: 1, 41695 slidesToShow: 1, 41696 slidesToScroll: 1, 41697 speed: 500, 41698 swipe: true, 41699 swipeToSlide: false, 41700 touchMove: true, 41701 touchThreshold: 5, 41702 useCSS: true, 41703 useTransform: true, 41704 variableWidth: false, 41705 vertical: false, 41706 verticalSwiping: false, 41707 waitForAnimate: true, 41708 zIndex: 1000 41709 }; 41710 41711 _.initials = { 41712 animating: false, 41713 dragging: false, 41714 autoPlayTimer: null, 41715 currentDirection: 0, 41716 currentLeft: null, 41717 currentSlide: 0, 41718 direction: 1, 41719 $dots: null, 41720 listWidth: null, 41721 listHeight: null, 41722 loadIndex: 0, 41723 $nextArrow: null, 41724 $prevArrow: null, 41725 scrolling: false, 41726 slideCount: null, 41727 slideWidth: null, 41728 $slideTrack: null, 41729 $slides: null, 41730 sliding: false, 41731 slideOffset: 0, 41732 swipeLeft: null, 41733 swiping: false, 41734 $list: null, 41735 touchObject: {}, 41736 transformsEnabled: false, 41737 unslicked: false 41738 }; 41739 41740 $.extend(_, _.initials); 41741 41742 _.activeBreakpoint = null; 41743 _.animType = null; 41744 _.animProp = null; 41745 _.breakpoints = []; 41746 _.breakpointSettings = []; 41747 _.cssTransitions = false; 41748 _.focussed = false; 41749 _.interrupted = false; 41750 _.hidden = 'hidden'; 41751 _.paused = true; 41752 _.positionProp = null; 41753 _.respondTo = null; 41754 _.rowCount = 1; 41755 _.shouldClick = true; 41756 _.$slider = $(element); 41757 _.$slidesCache = null; 41758 _.transformType = null; 41759 _.transitionType = null; 41760 _.visibilityChange = 'visibilitychange'; 41761 _.windowWidth = 0; 41762 _.windowTimer = null; 41763 41764 dataSettings = $(element).data('slick') || {}; 41765 41766 _.options = $.extend({}, _.defaults, settings, dataSettings); 41767 41768 _.currentSlide = _.options.initialSlide; 41769 41770 _.originalSettings = _.options; 41771 41772 if (typeof document.mozHidden !== 'undefined') { 41773 _.hidden = 'mozHidden'; 41774 _.visibilityChange = 'mozvisibilitychange'; 41775 } else if (typeof document.webkitHidden !== 'undefined') { 41776 _.hidden = 'webkitHidden'; 41777 _.visibilityChange = 'webkitvisibilitychange'; 41778 } 41779 41780 _.autoPlay = $.proxy(_.autoPlay, _); 41781 _.autoPlayClear = $.proxy(_.autoPlayClear, _); 41782 _.autoPlayIterator = $.proxy(_.autoPlayIterator, _); 41783 _.changeSlide = $.proxy(_.changeSlide, _); 41784 _.clickHandler = $.proxy(_.clickHandler, _); 41785 _.selectHandler = $.proxy(_.selectHandler, _); 41786 _.setPosition = $.proxy(_.setPosition, _); 41787 _.swipeHandler = $.proxy(_.swipeHandler, _); 41788 _.dragHandler = $.proxy(_.dragHandler, _); 41789 _.keyHandler = $.proxy(_.keyHandler, _); 41790 41791 _.instanceUid = instanceUid++; 41792 41793 // A simple way to check for HTML strings 41794 // Strict HTML recognition (must start with <) 41795 // Extracted from jQuery v1.11 source 41796 _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/; 41797 41798 41799 _.registerBreakpoints(); 41800 _.init(true); 41801 41802 } 41803 41804 return Slick; 41805 41806 }()); 41807 41808 Slick.prototype.activateADA = function() { 41809 var _ = this; 41810 41811 _.$slideTrack.find('.slick-active').attr({ 41812 'aria-hidden': 'false' 41813 }).find('a, input, button, select').attr({ 41814 'tabindex': '0' 41815 }); 41816 41817 }; 41818 41819 Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) { 41820 41821 var _ = this; 41822 41823 if (typeof(index) === 'boolean') { 41824 addBefore = index; 41825 index = null; 41826 } else if (index < 0 || (index >= _.slideCount)) { 41827 return false; 41828 } 41829 41830 _.unload(); 41831 41832 if (typeof(index) === 'number') { 41833 if (index === 0 && _.$slides.length === 0) { 41834 $(markup).appendTo(_.$slideTrack); 41835 } else if (addBefore) { 41836 $(markup).insertBefore(_.$slides.eq(index)); 41837 } else { 41838 $(markup).insertAfter(_.$slides.eq(index)); 41839 } 41840 } else { 41841 if (addBefore === true) { 41842 $(markup).prependTo(_.$slideTrack); 41843 } else { 41844 $(markup).appendTo(_.$slideTrack); 41845 } 41846 } 41847 41848 _.$slides = _.$slideTrack.children(this.options.slide); 41849 41850 _.$slideTrack.children(this.options.slide).detach(); 41851 41852 _.$slideTrack.append(_.$slides); 41853 41854 _.$slides.each(function(index, element) { 41855 $(element).attr('data-slick-index', index); 41856 }); 41857 41858 _.$slidesCache = _.$slides; 41859 41860 _.reinit(); 41861 41862 }; 41863 41864 Slick.prototype.animateHeight = function() { 41865 var _ = this; 41866 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 41867 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 41868 _.$list.animate({ 41869 height: targetHeight 41870 }, _.options.speed); 41871 } 41872 }; 41873 41874 Slick.prototype.animateSlide = function(targetLeft, callback) { 41875 41876 var animProps = {}, 41877 _ = this; 41878 41879 _.animateHeight(); 41880 41881 if (_.options.rtl === true && _.options.vertical === false) { 41882 targetLeft = -targetLeft; 41883 } 41884 if (_.transformsEnabled === false) { 41885 if (_.options.vertical === false) { 41886 _.$slideTrack.animate({ 41887 left: targetLeft 41888 }, _.options.speed, _.options.easing, callback); 41889 } else { 41890 _.$slideTrack.animate({ 41891 top: targetLeft 41892 }, _.options.speed, _.options.easing, callback); 41893 } 41894 41895 } else { 41896 41897 if (_.cssTransitions === false) { 41898 if (_.options.rtl === true) { 41899 _.currentLeft = -(_.currentLeft); 41900 } 41901 $({ 41902 animStart: _.currentLeft 41903 }).animate({ 41904 animStart: targetLeft 41905 }, { 41906 duration: _.options.speed, 41907 easing: _.options.easing, 41908 step: function(now) { 41909 now = Math.ceil(now); 41910 if (_.options.vertical === false) { 41911 animProps[_.animType] = 'translate(' + 41912 now + 'px, 0px)'; 41913 _.$slideTrack.css(animProps); 41914 } else { 41915 animProps[_.animType] = 'translate(0px,' + 41916 now + 'px)'; 41917 _.$slideTrack.css(animProps); 41918 } 41919 }, 41920 complete: function() { 41921 if (callback) { 41922 callback.call(); 41923 } 41924 } 41925 }); 41926 41927 } else { 41928 41929 _.applyTransition(); 41930 targetLeft = Math.ceil(targetLeft); 41931 41932 if (_.options.vertical === false) { 41933 animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)'; 41934 } else { 41935 animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)'; 41936 } 41937 _.$slideTrack.css(animProps); 41938 41939 if (callback) { 41940 setTimeout(function() { 41941 41942 _.disableTransition(); 41943 41944 callback.call(); 41945 }, _.options.speed); 41946 } 41947 41948 } 41949 41950 } 41951 41952 }; 41953 41954 Slick.prototype.getNavTarget = function() { 41955 41956 var _ = this, 41957 asNavFor = _.options.asNavFor; 41958 41959 if ( asNavFor && asNavFor !== null ) { 41960 asNavFor = $(asNavFor).not(_.$slider); 41961 } 41962 41963 return asNavFor; 41964 41965 }; 41966 41967 Slick.prototype.asNavFor = function(index) { 41968 41969 var _ = this, 41970 asNavFor = _.getNavTarget(); 41971 41972 if ( asNavFor !== null && typeof asNavFor === 'object' ) { 41973 asNavFor.each(function() { 41974 var target = $(this).slick('getSlick'); 41975 if(!target.unslicked) { 41976 target.slideHandler(index, true); 41977 } 41978 }); 41979 } 41980 41981 }; 41982 41983 Slick.prototype.applyTransition = function(slide) { 41984 41985 var _ = this, 41986 transition = {}; 41987 41988 if (_.options.fade === false) { 41989 transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase; 41990 } else { 41991 transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase; 41992 } 41993 41994 if (_.options.fade === false) { 41995 _.$slideTrack.css(transition); 41996 } else { 41997 _.$slides.eq(slide).css(transition); 41998 } 41999 42000 }; 42001 42002 Slick.prototype.autoPlay = function() { 42003 42004 var _ = this; 42005 42006 _.autoPlayClear(); 42007 42008 if ( _.slideCount > _.options.slidesToShow ) { 42009 _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed ); 42010 } 42011 42012 }; 42013 42014 Slick.prototype.autoPlayClear = function() { 42015 42016 var _ = this; 42017 42018 if (_.autoPlayTimer) { 42019 clearInterval(_.autoPlayTimer); 42020 } 42021 42022 }; 42023 42024 Slick.prototype.autoPlayIterator = function() { 42025 42026 var _ = this, 42027 slideTo = _.currentSlide + _.options.slidesToScroll; 42028 42029 if ( !_.paused && !_.interrupted && !_.focussed ) { 42030 42031 if ( _.options.infinite === false ) { 42032 42033 if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) { 42034 _.direction = 0; 42035 } 42036 42037 else if ( _.direction === 0 ) { 42038 42039 slideTo = _.currentSlide - _.options.slidesToScroll; 42040 42041 if ( _.currentSlide - 1 === 0 ) { 42042 _.direction = 1; 42043 } 42044 42045 } 42046 42047 } 42048 42049 _.slideHandler( slideTo ); 42050 42051 } 42052 42053 }; 42054 42055 Slick.prototype.buildArrows = function() { 42056 42057 var _ = this; 42058 42059 if (_.options.arrows === true ) { 42060 42061 _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow'); 42062 _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow'); 42063 42064 if( _.slideCount > _.options.slidesToShow ) { 42065 42066 _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 42067 _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 42068 42069 if (_.htmlExpr.test(_.options.prevArrow)) { 42070 _.$prevArrow.prependTo(_.options.appendArrows); 42071 } 42072 42073 if (_.htmlExpr.test(_.options.nextArrow)) { 42074 _.$nextArrow.appendTo(_.options.appendArrows); 42075 } 42076 42077 if (_.options.infinite !== true) { 42078 _.$prevArrow 42079 .addClass('slick-disabled') 42080 .attr('aria-disabled', 'true'); 42081 } 42082 42083 } else { 42084 42085 _.$prevArrow.add( _.$nextArrow ) 42086 42087 .addClass('slick-hidden') 42088 .attr({ 42089 'aria-disabled': 'true', 42090 'tabindex': '-1' 42091 }); 42092 42093 } 42094 42095 } 42096 42097 }; 42098 42099 Slick.prototype.buildDots = function() { 42100 42101 var _ = this, 42102 i, dot; 42103 42104 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 42105 42106 _.$slider.addClass('slick-dotted'); 42107 42108 dot = $('<ul />').addClass(_.options.dotsClass); 42109 42110 for (i = 0; i <= _.getDotCount(); i += 1) { 42111 dot.append($('<li />').append(_.options.customPaging.call(this, _, i))); 42112 } 42113 42114 _.$dots = dot.appendTo(_.options.appendDots); 42115 42116 _.$dots.find('li').first().addClass('slick-active'); 42117 42118 } 42119 42120 }; 42121 42122 Slick.prototype.buildOut = function() { 42123 42124 var _ = this; 42125 42126 _.$slides = 42127 _.$slider 42128 .children( _.options.slide + ':not(.slick-cloned)') 42129 .addClass('slick-slide'); 42130 42131 _.slideCount = _.$slides.length; 42132 42133 _.$slides.each(function(index, element) { 42134 $(element) 42135 .attr('data-slick-index', index) 42136 .data('originalStyling', $(element).attr('style') || ''); 42137 }); 42138 42139 _.$slider.addClass('slick-slider'); 42140 42141 _.$slideTrack = (_.slideCount === 0) ? 42142 $('<div class="slick-track"/>').appendTo(_.$slider) : 42143 _.$slides.wrapAll('<div class="slick-track"/>').parent(); 42144 42145 _.$list = _.$slideTrack.wrap( 42146 '<div class="slick-list"/>').parent(); 42147 _.$slideTrack.css('opacity', 0); 42148 42149 if (_.options.centerMode === true || _.options.swipeToSlide === true) { 42150 _.options.slidesToScroll = 1; 42151 } 42152 42153 $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading'); 42154 42155 _.setupInfinite(); 42156 42157 _.buildArrows(); 42158 42159 _.buildDots(); 42160 42161 _.updateDots(); 42162 42163 42164 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 42165 42166 if (_.options.draggable === true) { 42167 _.$list.addClass('draggable'); 42168 } 42169 42170 }; 42171 42172 Slick.prototype.buildRows = function() { 42173 42174 var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection; 42175 42176 newSlides = document.createDocumentFragment(); 42177 originalSlides = _.$slider.children(); 42178 42179 if(_.options.rows > 0) { 42180 42181 slidesPerSection = _.options.slidesPerRow * _.options.rows; 42182 numOfSlides = Math.ceil( 42183 originalSlides.length / slidesPerSection 42184 ); 42185 42186 for(a = 0; a < numOfSlides; a++){ 42187 var slide = document.createElement('div'); 42188 for(b = 0; b < _.options.rows; b++) { 42189 var row = document.createElement('div'); 42190 for(c = 0; c < _.options.slidesPerRow; c++) { 42191 var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c)); 42192 if (originalSlides.get(target)) { 42193 row.appendChild(originalSlides.get(target)); 42194 } 42195 } 42196 slide.appendChild(row); 42197 } 42198 newSlides.appendChild(slide); 42199 } 42200 42201 _.$slider.empty().append(newSlides); 42202 _.$slider.children().children().children() 42203 .css({ 42204 'width':(100 / _.options.slidesPerRow) + '%', 42205 'display': 'inline-block' 42206 }); 42207 42208 } 42209 42210 }; 42211 42212 Slick.prototype.checkResponsive = function(initial, forceUpdate) { 42213 42214 var _ = this, 42215 breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false; 42216 var sliderWidth = _.$slider.width(); 42217 var windowWidth = window.innerWidth || $(window).width(); 42218 42219 if (_.respondTo === 'window') { 42220 respondToWidth = windowWidth; 42221 } else if (_.respondTo === 'slider') { 42222 respondToWidth = sliderWidth; 42223 } else if (_.respondTo === 'min') { 42224 respondToWidth = Math.min(windowWidth, sliderWidth); 42225 } 42226 42227 if ( _.options.responsive && 42228 _.options.responsive.length && 42229 _.options.responsive !== null) { 42230 42231 targetBreakpoint = null; 42232 42233 for (breakpoint in _.breakpoints) { 42234 if (_.breakpoints.hasOwnProperty(breakpoint)) { 42235 if (_.originalSettings.mobileFirst === false) { 42236 if (respondToWidth < _.breakpoints[breakpoint]) { 42237 targetBreakpoint = _.breakpoints[breakpoint]; 42238 } 42239 } else { 42240 if (respondToWidth > _.breakpoints[breakpoint]) { 42241 targetBreakpoint = _.breakpoints[breakpoint]; 42242 } 42243 } 42244 } 42245 } 42246 42247 if (targetBreakpoint !== null) { 42248 if (_.activeBreakpoint !== null) { 42249 if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) { 42250 _.activeBreakpoint = 42251 targetBreakpoint; 42252 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 42253 _.unslick(targetBreakpoint); 42254 } else { 42255 _.options = $.extend({}, _.originalSettings, 42256 _.breakpointSettings[ 42257 targetBreakpoint]); 42258 if (initial === true) { 42259 _.currentSlide = _.options.initialSlide; 42260 } 42261 _.refresh(initial); 42262 } 42263 triggerBreakpoint = targetBreakpoint; 42264 } 42265 } else { 42266 _.activeBreakpoint = targetBreakpoint; 42267 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 42268 _.unslick(targetBreakpoint); 42269 } else { 42270 _.options = $.extend({}, _.originalSettings, 42271 _.breakpointSettings[ 42272 targetBreakpoint]); 42273 if (initial === true) { 42274 _.currentSlide = _.options.initialSlide; 42275 } 42276 _.refresh(initial); 42277 } 42278 triggerBreakpoint = targetBreakpoint; 42279 } 42280 } else { 42281 if (_.activeBreakpoint !== null) { 42282 _.activeBreakpoint = null; 42283 _.options = _.originalSettings; 42284 if (initial === true) { 42285 _.currentSlide = _.options.initialSlide; 42286 } 42287 _.refresh(initial); 42288 triggerBreakpoint = targetBreakpoint; 42289 } 42290 } 42291 42292 // only trigger breakpoints during an actual break. not on initialize. 42293 if( !initial && triggerBreakpoint !== false ) { 42294 _.$slider.trigger('breakpoint', [_, triggerBreakpoint]); 42295 } 42296 } 42297 42298 }; 42299 42300 Slick.prototype.changeSlide = function(event, dontAnimate) { 42301 42302 var _ = this, 42303 $target = $(event.currentTarget), 42304 indexOffset, slideOffset, unevenOffset; 42305 42306 // If target is a link, prevent default action. 42307 if($target.is('a')) { 42308 event.preventDefault(); 42309 } 42310 42311 // If target is not the <li> element (ie: a child), find the <li>. 42312 if(!$target.is('li')) { 42313 $target = $target.closest('li'); 42314 } 42315 42316 unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0); 42317 indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll; 42318 42319 switch (event.data.message) { 42320 42321 case 'previous': 42322 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset; 42323 if (_.slideCount > _.options.slidesToShow) { 42324 _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); 42325 } 42326 break; 42327 42328 case 'next': 42329 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset; 42330 if (_.slideCount > _.options.slidesToShow) { 42331 _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate); 42332 } 42333 break; 42334 42335 case 'index': 42336 var index = event.data.index === 0 ? 0 : 42337 event.data.index || $target.index() * _.options.slidesToScroll; 42338 42339 _.slideHandler(_.checkNavigable(index), false, dontAnimate); 42340 $target.children().trigger('focus'); 42341 break; 42342 42343 default: 42344 return; 42345 } 42346 42347 }; 42348 42349 Slick.prototype.checkNavigable = function(index) { 42350 42351 var _ = this, 42352 navigables, prevNavigable; 42353 42354 navigables = _.getNavigableIndexes(); 42355 prevNavigable = 0; 42356 if (index > navigables[navigables.length - 1]) { 42357 index = navigables[navigables.length - 1]; 42358 } else { 42359 for (var n in navigables) { 42360 if (index < navigables[n]) { 42361 index = prevNavigable; 42362 break; 42363 } 42364 prevNavigable = navigables[n]; 42365 } 42366 } 42367 42368 return index; 42369 }; 42370 42371 Slick.prototype.cleanUpEvents = function() { 42372 42373 var _ = this; 42374 42375 if (_.options.dots && _.$dots !== null) { 42376 42377 $('li', _.$dots) 42378 .off('click.slick', _.changeSlide) 42379 .off('mouseenter.slick', $.proxy(_.interrupt, _, true)) 42380 .off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 42381 42382 if (_.options.accessibility === true) { 42383 _.$dots.off('keydown.slick', _.keyHandler); 42384 } 42385 } 42386 42387 _.$slider.off('focus.slick blur.slick'); 42388 42389 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 42390 _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide); 42391 _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide); 42392 42393 if (_.options.accessibility === true) { 42394 _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler); 42395 _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler); 42396 } 42397 } 42398 42399 _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler); 42400 _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler); 42401 _.$list.off('touchend.slick mouseup.slick', _.swipeHandler); 42402 _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler); 42403 42404 _.$list.off('click.slick', _.clickHandler); 42405 42406 $(document).off(_.visibilityChange, _.visibility); 42407 42408 _.cleanUpSlideEvents(); 42409 42410 if (_.options.accessibility === true) { 42411 _.$list.off('keydown.slick', _.keyHandler); 42412 } 42413 42414 if (_.options.focusOnSelect === true) { 42415 $(_.$slideTrack).children().off('click.slick', _.selectHandler); 42416 } 42417 42418 $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange); 42419 42420 $(window).off('resize.slick.slick-' + _.instanceUid, _.resize); 42421 42422 $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault); 42423 42424 $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition); 42425 42426 }; 42427 42428 Slick.prototype.cleanUpSlideEvents = function() { 42429 42430 var _ = this; 42431 42432 _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true)); 42433 _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 42434 42435 }; 42436 42437 Slick.prototype.cleanUpRows = function() { 42438 42439 var _ = this, originalSlides; 42440 42441 if(_.options.rows > 0) { 42442 originalSlides = _.$slides.children().children(); 42443 originalSlides.removeAttr('style'); 42444 _.$slider.empty().append(originalSlides); 42445 } 42446 42447 }; 42448 42449 Slick.prototype.clickHandler = function(event) { 42450 42451 var _ = this; 42452 42453 if (_.shouldClick === false) { 42454 event.stopImmediatePropagation(); 42455 event.stopPropagation(); 42456 event.preventDefault(); 42457 } 42458 42459 }; 42460 42461 Slick.prototype.destroy = function(refresh) { 42462 42463 var _ = this; 42464 42465 _.autoPlayClear(); 42466 42467 _.touchObject = {}; 42468 42469 _.cleanUpEvents(); 42470 42471 $('.slick-cloned', _.$slider).detach(); 42472 42473 if (_.$dots) { 42474 _.$dots.remove(); 42475 } 42476 42477 if ( _.$prevArrow && _.$prevArrow.length ) { 42478 42479 _.$prevArrow 42480 .removeClass('slick-disabled slick-arrow slick-hidden') 42481 .removeAttr('aria-hidden aria-disabled tabindex') 42482 .css('display',''); 42483 42484 if ( _.htmlExpr.test( _.options.prevArrow )) { 42485 _.$prevArrow.remove(); 42486 } 42487 } 42488 42489 if ( _.$nextArrow && _.$nextArrow.length ) { 42490 42491 _.$nextArrow 42492 .removeClass('slick-disabled slick-arrow slick-hidden') 42493 .removeAttr('aria-hidden aria-disabled tabindex') 42494 .css('display',''); 42495 42496 if ( _.htmlExpr.test( _.options.nextArrow )) { 42497 _.$nextArrow.remove(); 42498 } 42499 } 42500 42501 42502 if (_.$slides) { 42503 42504 _.$slides 42505 .removeClass('slick-slide slick-active slick-center slick-visible slick-current') 42506 .removeAttr('aria-hidden') 42507 .removeAttr('data-slick-index') 42508 .each(function(){ 42509 $(this).attr('style', $(this).data('originalStyling')); 42510 }); 42511 42512 _.$slideTrack.children(this.options.slide).detach(); 42513 42514 _.$slideTrack.detach(); 42515 42516 _.$list.detach(); 42517 42518 _.$slider.append(_.$slides); 42519 } 42520 42521 _.cleanUpRows(); 42522 42523 _.$slider.removeClass('slick-slider'); 42524 _.$slider.removeClass('slick-initialized'); 42525 _.$slider.removeClass('slick-dotted'); 42526 42527 _.unslicked = true; 42528 42529 if(!refresh) { 42530 _.$slider.trigger('destroy', [_]); 42531 } 42532 42533 }; 42534 42535 Slick.prototype.disableTransition = function(slide) { 42536 42537 var _ = this, 42538 transition = {}; 42539 42540 transition[_.transitionType] = ''; 42541 42542 if (_.options.fade === false) { 42543 _.$slideTrack.css(transition); 42544 } else { 42545 _.$slides.eq(slide).css(transition); 42546 } 42547 42548 }; 42549 42550 Slick.prototype.fadeSlide = function(slideIndex, callback) { 42551 42552 var _ = this; 42553 42554 if (_.cssTransitions === false) { 42555 42556 _.$slides.eq(slideIndex).css({ 42557 zIndex: _.options.zIndex 42558 }); 42559 42560 _.$slides.eq(slideIndex).animate({ 42561 opacity: 1 42562 }, _.options.speed, _.options.easing, callback); 42563 42564 } else { 42565 42566 _.applyTransition(slideIndex); 42567 42568 _.$slides.eq(slideIndex).css({ 42569 opacity: 1, 42570 zIndex: _.options.zIndex 42571 }); 42572 42573 if (callback) { 42574 setTimeout(function() { 42575 42576 _.disableTransition(slideIndex); 42577 42578 callback.call(); 42579 }, _.options.speed); 42580 } 42581 42582 } 42583 42584 }; 42585 42586 Slick.prototype.fadeSlideOut = function(slideIndex) { 42587 42588 var _ = this; 42589 42590 if (_.cssTransitions === false) { 42591 42592 _.$slides.eq(slideIndex).animate({ 42593 opacity: 0, 42594 zIndex: _.options.zIndex - 2 42595 }, _.options.speed, _.options.easing); 42596 42597 } else { 42598 42599 _.applyTransition(slideIndex); 42600 42601 _.$slides.eq(slideIndex).css({ 42602 opacity: 0, 42603 zIndex: _.options.zIndex - 2 42604 }); 42605 42606 } 42607 42608 }; 42609 42610 Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) { 42611 42612 var _ = this; 42613 42614 if (filter !== null) { 42615 42616 _.$slidesCache = _.$slides; 42617 42618 _.unload(); 42619 42620 _.$slideTrack.children(this.options.slide).detach(); 42621 42622 _.$slidesCache.filter(filter).appendTo(_.$slideTrack); 42623 42624 _.reinit(); 42625 42626 } 42627 42628 }; 42629 42630 Slick.prototype.focusHandler = function() { 42631 42632 var _ = this; 42633 42634
vendor: 3,201 bytes, lines 42634-42729
42634// If any child element receives focus within the slider we need to pause the autoplay 42635 _.$slider 42636 .off('focus.slick blur.slick') 42637 .on( 42638 'focus.slick', 42639 '*', 42640 function(event) { 42641 var $sf = $(this); 42642 42643 setTimeout(function() { 42644 if( _.options.pauseOnFocus ) { 42645 if ($sf.is(':focus')) { 42646 _.focussed = true; 42647 _.autoPlay(); 42648 } 42649 } 42650 }, 0); 42651 } 42652 ).on( 42653 'blur.slick', 42654 '*', 42655 function(event) { 42656 var $sf = $(this); 42657 42658 // When a blur occurs on any elements within the slider we become unfocused 42659 if( _.options.pauseOnFocus ) { 42660 _.focussed = false; 42661 _.autoPlay(); 42662 } 42663 } 42664 ); 42665 }; 42666 42667 Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() { 42668 42669 var _ = this; 42670 return _.currentSlide; 42671 42672 }; 42673 42674 Slick.prototype.getDotCount = function() { 42675 42676 var _ = this; 42677 42678 var breakPoint = 0; 42679 var counter = 0; 42680 var pagerQty = 0; 42681 42682 if (_.options.infinite === true) { 42683 if (_.slideCount <= _.options.slidesToShow) { 42684 ++pagerQty; 42685 } else { 42686 while (breakPoint < _.slideCount) { 42687 ++pagerQty; 42688 breakPoint = counter + _.options.slidesToScroll; 42689 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 42690 } 42691 } 42692 } else if (_.options.centerMode === true) { 42693 pagerQty = _.slideCount; 42694 } else if(!_.options.asNavFor) { 42695 pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll); 42696 }else { 42697 while (breakPoint < _.slideCount) { 42698 ++pagerQty; 42699 breakPoint = counter + _.options.slidesToScroll; 42700 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 42701 } 42702 } 42703 42704 return pagerQty - 1; 42705 42706 }; 42707 42708 Slick.prototype.getLeft = function(slideIndex) { 42709 42710 var _ = this, 42711 targetLeft, 42712 verticalHeight, 42713 verticalOffset = 0, 42714 targetSlide, 42715 coef; 42716 42717 _.slideOffset = 0; 42718 verticalHeight = _.$slides.first().outerHeight(true); 42719 42720 if (_.options.infinite === true) { 42721 if (_.slideCount > _.options.slidesToShow) { 42722 _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1; 42723 coef = -1 42724 42725 if (_.options.vertical === true && _.options.centerMode === true) { 42726 if (_.options.slidesToShow === 2) { 42727 coef = -1.5; 42728 } else if (_.options.slidesToShow === 1) { 42729 coef = -2
vendor: 4,950 bytes, lines 42729-42858
42729 42730 } 42731 } 42732 verticalOffset = (verticalHeight * _.options.slidesToShow) * coef; 42733 } 42734 if (_.slideCount % _.options.slidesToScroll !== 0) { 42735 if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) { 42736 if (slideIndex > _.slideCount) { 42737 _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1; 42738 verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1; 42739 } else { 42740 _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1; 42741 verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1; 42742 } 42743 } 42744 } 42745 } else { 42746 if (slideIndex + _.options.slidesToShow > _.slideCount) { 42747 _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth; 42748 verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight; 42749 } 42750 } 42751 42752 if (_.slideCount <= _.options.slidesToShow) { 42753 _.slideOffset = 0; 42754 verticalOffset = 0; 42755 } 42756 42757 if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) { 42758 _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2); 42759 } else if (_.options.centerMode === true && _.options.infinite === true) { 42760 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth; 42761 } else if (_.options.centerMode === true) { 42762 _.slideOffset = 0; 42763 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2); 42764 } 42765 42766 if (_.options.vertical === false) { 42767 targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset; 42768 } else { 42769 targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset; 42770 } 42771 42772 if (_.options.variableWidth === true) { 42773 42774 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 42775 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 42776 } else { 42777 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow); 42778 } 42779 42780 if (_.options.rtl === true) { 42781 if (targetSlide[0]) { 42782 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 42783 } else { 42784 targetLeft = 0; 42785 } 42786 } else { 42787 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 42788 } 42789 42790 if (_.options.centerMode === true) { 42791 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 42792 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 42793 } else { 42794 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1); 42795 } 42796 42797 if (_.options.rtl === true) { 42798 if (targetSlide[0]) { 42799 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 42800 } else { 42801 targetLeft = 0; 42802 } 42803 } else { 42804 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 42805 } 42806 42807 targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2; 42808 } 42809 } 42810 42811 return targetLeft; 42812 42813 }; 42814 42815 Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) { 42816 42817 var _ = this; 42818 42819 return _.options[option]; 42820 42821 }; 42822 42823 Slick.prototype.getNavigableIndexes = function() { 42824 42825 var _ = this, 42826 breakPoint = 0, 42827 counter = 0, 42828 indexes = [], 42829 max; 42830 42831 if (_.options.infinite === false) { 42832 max = _.slideCount; 42833 } else { 42834 breakPoint = _.options.slidesToScroll * -1; 42835 counter = _.options.slidesToScroll * -1; 42836 max = _.slideCount * 2; 42837 } 42838 42839 while (breakPoint < max) { 42840 indexes.push(breakPoint); 42841 breakPoint = counter + _.options.slidesToScroll; 42842 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 42843 } 42844 42845 return indexes; 42846 42847 }; 42848 42849 Slick.prototype.getSlick = function() { 42850 42851 return this; 42852 42853 }; 42854 42855 Slick.prototype.getSlideCount = function() { 42856 42857 var _ = this, 42858 slidesTraversed, swipedSlide,
42858swipeTarget, centerOffset; 42859 42860 centerOffset = _.options.centerMode === true ? Math.floor(_.$list.width() / 2) : 0; 42861 swipeTarget = (_.swipeLeft * -1) + centerOffset; 42862 42863 if (_.options.swipeToSlide === true) { 42864 42865 _.$slideTrack.find('.slick-slide').each(function(index, slide) { 42866 42867 var slideOuterWidth, slideOffset, slideRightBoundary; 42868 slideOuterWidth = $(slide).outerWidth(); 42869 slideOffset = slide.offsetLeft; 42870 if (_.options.centerMode !== true) { 42871 slideOffset += (slideOuterWidth / 2); 42872 } 42873 42874 slideRightBoundary = slideOffset + (slideOuterWidth); 42875 42876 if (swipeTarget < slideRightBoundary) { 42877 swipedSlide = slide; 42878 return false; 42879 } 42880 }); 42881 42882 slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1; 42883 42884 return slidesTraversed; 42885 42886 } else { 42887 return _.options.slidesToScroll; 42888 } 42889 42890 }; 42891 42892 Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) { 42893 42894 var _ = this; 42895 42896 _.changeSlide({ 42897 data: { 42898 message: 'index', 42899 index: parseInt(slide) 42900 } 42901 }, dontAnimate); 42902 42903 }; 42904 42905 Slick.prototype.init = function(creation) { 42906 42907 var _ = this; 42908 42909 if (!$(_.$slider).hasClass('slick-initialized')) { 42910 42911 $(_.$slider).addClass('slick-initialized'); 42912 42913 _.buildRows(); 42914 _.buildOut(); 42915 _.setProps(); 42916 _.startLoad(); 42917 _.loadSlider(); 42918 _.initializeEvents(); 42919 _.updateArrows(); 42920 _.updateDots(); 42921 _.checkResponsive(true); 42922 _.focusHandler(); 42923 42924 } 42925 42926 if (creation) { 42927 _.$slider.trigger('init', [_]); 42928 } 42929 42930 if (_.options.accessibility === true) { 42931 _.initADA(); 42932 } 42933 42934 if ( _.options.autoplay ) { 42935 42936 _.paused = false;
vendor: 1,103 bytes, lines 42937-42968
42937 _.autoPlay(); 42938 42939 } 42940 42941 }; 42942 42943 Slick.prototype.initADA = function() { 42944 var _ = this, 42945 numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow), 42946 tabControlIndexes = _.getNavigableIndexes().filter(function(val) { 42947 return (val >= 0) && (val < _.slideCount); 42948 }); 42949 42950 _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({ 42951 'aria-hidden': 'true', 42952 'tabindex': '-1' 42953 }).find('a, input, button, select').attr({ 42954 'tabindex': '-1' 42955 }); 42956 42957 if (_.$dots !== null) { 42958 _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) { 42959 var slideControlIndex = tabControlIndexes.indexOf(i); 42960 42961 $(this).attr({ 42962 'role': 'tabpanel', 42963 'id': 'slick-slide' + _.instanceUid + i, 42964 'tabindex': -1 42965 }); 42966 42967 if (slideControlIndex !== -1) { 42968 var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
vendor: 39,773 bytes, lines 42968-44344
42968 42969 if ($('#' + ariaButtonControl).length) { 42970 $(this).attr({ 42971 'aria-describedby': ariaButtonControl 42972 }); 42973 } 42974 } 42975 }); 42976 42977 _.$dots.attr('role', 'tablist').find('li').each(function(i) { 42978 var mappedSlideIndex = tabControlIndexes[i]; 42979 42980 $(this).attr({ 42981 'role': 'presentation' 42982 }); 42983 42984 $(this).find('button').first().attr({ 42985 'role': 'tab', 42986 'id': 'slick-slide-control' + _.instanceUid + i, 42987 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex, 42988 'aria-label': (i + 1) + ' of ' + numDotGroups, 42989 'aria-selected': null, 42990 'tabindex': '-1' 42991 }); 42992 42993 }).eq(_.currentSlide).find('button').attr({ 42994 'aria-selected': 'true', 42995 'tabindex': '0' 42996 }).end(); 42997 } 42998 42999 for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) { 43000 if (_.options.focusOnChange) { 43001 _.$slides.eq(i).attr({'tabindex': '0'}); 43002 } else { 43003 _.$slides.eq(i).removeAttr('tabindex'); 43004 } 43005 } 43006 43007 _.activateADA(); 43008 43009 }; 43010 43011 Slick.prototype.initArrowEvents = function() { 43012 43013 var _ = this; 43014 43015 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 43016 _.$prevArrow 43017 .off('click.slick') 43018 .on('click.slick', { 43019 message: 'previous' 43020 }, _.changeSlide); 43021 _.$nextArrow 43022 .off('click.slick') 43023 .on('click.slick', { 43024 message: 'next' 43025 }, _.changeSlide); 43026 43027 if (_.options.accessibility === true) { 43028 _.$prevArrow.on('keydown.slick', _.keyHandler); 43029 _.$nextArrow.on('keydown.slick', _.keyHandler); 43030 } 43031 } 43032 43033 }; 43034 43035 Slick.prototype.initDotEvents = function() { 43036 43037 var _ = this; 43038 43039 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 43040 $('li', _.$dots).on('click.slick', { 43041 message: 'index' 43042 }, _.changeSlide); 43043 43044 if (_.options.accessibility === true) { 43045 _.$dots.on('keydown.slick', _.keyHandler); 43046 } 43047 } 43048 43049 if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) { 43050 43051 $('li', _.$dots) 43052 .on('mouseenter.slick', $.proxy(_.interrupt, _, true)) 43053 .on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 43054 43055 } 43056 43057 }; 43058 43059 Slick.prototype.initSlideEvents = function() { 43060 43061 var _ = this; 43062 43063 if ( _.options.pauseOnHover ) { 43064 43065 _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true)); 43066 _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 43067 43068 } 43069 43070 }; 43071 43072 Slick.prototype.initializeEvents = function() { 43073 43074 var _ = this; 43075 43076 _.initArrowEvents(); 43077 43078 _.initDotEvents(); 43079 _.initSlideEvents(); 43080 43081 _.$list.on('touchstart.slick mousedown.slick', { 43082 action: 'start' 43083 }, _.swipeHandler); 43084 _.$list.on('touchmove.slick mousemove.slick', { 43085 action: 'move' 43086 }, _.swipeHandler); 43087 _.$list.on('touchend.slick mouseup.slick', { 43088 action: 'end' 43089 }, _.swipeHandler); 43090 _.$list.on('touchcancel.slick mouseleave.slick', { 43091 action: 'end' 43092 }, _.swipeHandler); 43093 43094 _.$list.on('click.slick', _.clickHandler); 43095 43096 $(document).on(_.visibilityChange, $.proxy(_.visibility, _)); 43097 43098 if (_.options.accessibility === true) { 43099 _.$list.on('keydown.slick', _.keyHandler); 43100 } 43101 43102 if (_.options.focusOnSelect === true) { 43103 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 43104 } 43105 43106 $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _)); 43107 43108 $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _)); 43109 43110 $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault); 43111 43112 $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition); 43113 $(_.setPosition); 43114 43115 }; 43116 43117 Slick.prototype.initUI = function() { 43118 43119 var _ = this; 43120 43121 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 43122 43123 _.$prevArrow.show(); 43124 _.$nextArrow.show(); 43125 43126 } 43127 43128 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 43129 43130 _.$dots.show(); 43131 43132 } 43133 43134 }; 43135 43136 Slick.prototype.keyHandler = function(event) { 43137 43138 var _ = this; 43139 //Dont slide if the cursor is inside the form fields and arrow keys are pressed 43140 if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) { 43141 if (event.keyCode === 37 && _.options.accessibility === true) { 43142 _.changeSlide({ 43143 data: { 43144 message: _.options.rtl === true ? 'next' : 'previous' 43145 } 43146 }); 43147 } else if (event.keyCode === 39 && _.options.accessibility === true) { 43148 _.changeSlide({ 43149 data: { 43150 message: _.options.rtl === true ? 'previous' : 'next' 43151 } 43152 }); 43153 } 43154 } 43155 43156 }; 43157 43158 Slick.prototype.lazyLoad = function() { 43159 43160 var _ = this, 43161 loadRange, cloneRange, rangeStart, rangeEnd; 43162 43163 function loadImages(imagesScope) { 43164 43165 $('img[data-lazy]', imagesScope).each(function() { 43166 43167 var image = $(this), 43168 imageSource = $(this).attr('data-lazy'), 43169 imageSrcSet = $(this).attr('data-srcset'), 43170 imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'), 43171 imageToLoad = document.createElement('img'); 43172 43173 imageToLoad.onload = function() { 43174 43175 image 43176 .animate({ opacity: 0 }, 100, function() { 43177 43178 if (imageSrcSet) { 43179 image 43180 .attr('srcset', imageSrcSet ); 43181 43182 if (imageSizes) { 43183 image 43184 .attr('sizes', imageSizes ); 43185 } 43186 } 43187 43188 image 43189 .attr('src', imageSource) 43190 .animate({ opacity: 1 }, 200, function() { 43191 image 43192 .removeAttr('data-lazy data-srcset data-sizes') 43193 .removeClass('slick-loading'); 43194 }); 43195 _.$slider.trigger('lazyLoaded', [_, image, imageSource]); 43196 }); 43197 43198 }; 43199 43200 imageToLoad.onerror = function() { 43201 43202 image 43203 .removeAttr( 'data-lazy' ) 43204 .removeClass( 'slick-loading' ) 43205 .addClass( 'slick-lazyload-error' ); 43206 43207 _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); 43208 43209 }; 43210 43211 imageToLoad.src = imageSource; 43212 43213 }); 43214 43215 } 43216 43217 if (_.options.centerMode === true) { 43218 if (_.options.infinite === true) { 43219 rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1); 43220 rangeEnd = rangeStart + _.options.slidesToShow + 2; 43221 } else { 43222 rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); 43223 rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; 43224 } 43225 } else { 43226 rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide; 43227 rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow); 43228 if (_.options.fade === true) { 43229 if (rangeStart > 0) rangeStart--; 43230 if (rangeEnd <= _.slideCount) rangeEnd++; 43231 } 43232 } 43233 43234 loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd); 43235 43236 if (_.options.lazyLoad === 'anticipated') { 43237 var prevSlide = rangeStart - 1, 43238 nextSlide = rangeEnd, 43239 $slides = _.$slider.find('.slick-slide'); 43240 43241 for (var i = 0; i < _.options.slidesToScroll; i++) { 43242 if (prevSlide < 0) prevSlide = _.slideCount - 1; 43243 loadRange = loadRange.add($slides.eq(prevSlide)); 43244 loadRange = loadRange.add($slides.eq(nextSlide)); 43245 prevSlide--; 43246 nextSlide++; 43247 } 43248 } 43249 43250 loadImages(loadRange); 43251 43252 if (_.slideCount <= _.options.slidesToShow) { 43253 cloneRange = _.$slider.find('.slick-slide'); 43254 loadImages(cloneRange); 43255 } else 43256 if (_.currentSlide >= _.slideCount - _.options.slidesToShow) { 43257 cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow); 43258 loadImages(cloneRange); 43259 } else if (_.currentSlide === 0) { 43260 cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1); 43261 loadImages(cloneRange); 43262 } 43263 43264 }; 43265 43266 Slick.prototype.loadSlider = function() { 43267 43268 var _ = this; 43269 43270 _.setPosition(); 43271 43272 _.$slideTrack.css({ 43273 opacity: 1 43274 }); 43275 43276 _.$slider.removeClass('slick-loading'); 43277 43278 _.initUI(); 43279 43280 if (_.options.lazyLoad === 'progressive') { 43281 _.progressiveLazyLoad(); 43282 } 43283 43284 }; 43285 43286 Slick.prototype.next = Slick.prototype.slickNext = function() { 43287 43288 var _ = this; 43289 43290 _.changeSlide({ 43291 data: { 43292 message: 'next' 43293 } 43294 }); 43295 43296 }; 43297 43298 Slick.prototype.orientationChange = function() { 43299 43300 var _ = this; 43301 43302 _.checkResponsive(); 43303 _.setPosition(); 43304 43305 }; 43306 43307 Slick.prototype.pause = Slick.prototype.slickPause = function() { 43308 43309 var _ = this; 43310 43311 _.autoPlayClear(); 43312 _.paused = true; 43313 43314 }; 43315 43316 Slick.prototype.play = Slick.prototype.slickPlay = function() { 43317 43318 var _ = this; 43319 43320 _.autoPlay(); 43321 _.options.autoplay = true; 43322 _.paused = false; 43323 _.focussed = false; 43324 _.interrupted = false; 43325 43326 }; 43327 43328 Slick.prototype.postSlide = function(index) { 43329 43330 var _ = this; 43331 43332 if( !_.unslicked ) { 43333 43334 _.$slider.trigger('afterChange', [_, index]); 43335 43336 _.animating = false; 43337 43338 if (_.slideCount > _.options.slidesToShow) { 43339 _.setPosition(); 43340 } 43341 43342 _.swipeLeft = null; 43343 43344 if ( _.options.autoplay ) { 43345 _.autoPlay(); 43346 } 43347 43348 if (_.options.accessibility === true) { 43349 _.initADA(); 43350 43351 if (_.options.focusOnChange) { 43352 var $currentSlide = $(_.$slides.get(_.currentSlide)); 43353 $currentSlide.attr('tabindex', 0).focus(); 43354 } 43355 } 43356 43357 } 43358 43359 }; 43360 43361 Slick.prototype.prev = Slick.prototype.slickPrev = function() { 43362 43363 var _ = this; 43364 43365 _.changeSlide({ 43366 data: { 43367 message: 'previous' 43368 } 43369 }); 43370 43371 }; 43372 43373 Slick.prototype.preventDefault = function(event) { 43374 43375 event.preventDefault(); 43376 43377 }; 43378 43379 Slick.prototype.progressiveLazyLoad = function( tryCount ) { 43380 43381 tryCount = tryCount || 1; 43382 43383 var _ = this, 43384 $imgsToLoad = $( 'img[data-lazy]', _.$slider ), 43385 image, 43386 imageSource, 43387 imageSrcSet, 43388 imageSizes, 43389 imageToLoad; 43390 43391 if ( $imgsToLoad.length ) { 43392 43393 image = $imgsToLoad.first(); 43394 imageSource = image.attr('data-lazy'); 43395 imageSrcSet = image.attr('data-srcset'); 43396 imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes'); 43397 imageToLoad = document.createElement('img'); 43398 43399 imageToLoad.onload = function() { 43400 43401 if (imageSrcSet) { 43402 image 43403 .attr('srcset', imageSrcSet ); 43404 43405 if (imageSizes) { 43406 image 43407 .attr('sizes', imageSizes ); 43408 } 43409 } 43410 43411 image 43412 .attr( 'src', imageSource ) 43413 .removeAttr('data-lazy data-srcset data-sizes') 43414 .removeClass('slick-loading'); 43415 43416 if ( _.options.adaptiveHeight === true ) { 43417 _.setPosition(); 43418 } 43419 43420 _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]); 43421 _.progressiveLazyLoad(); 43422 43423 }; 43424 43425 imageToLoad.onerror = function() { 43426 43427 if ( tryCount < 3 ) { 43428 43429 /** 43430 * try to load the image 3 times, 43431 * leave a slight delay so we don't get 43432 * servers blocking the request. 43433 */ 43434 setTimeout( function() { 43435 _.progressiveLazyLoad( tryCount + 1 ); 43436 }, 500 ); 43437 43438 } else { 43439 43440 image 43441 .removeAttr( 'data-lazy' ) 43442 .removeClass( 'slick-loading' ) 43443 .addClass( 'slick-lazyload-error' ); 43444 43445 _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); 43446 43447 _.progressiveLazyLoad(); 43448 43449 } 43450 43451 }; 43452 43453 imageToLoad.src = imageSource; 43454 43455 } else { 43456 43457 _.$slider.trigger('allImagesLoaded', [ _ ]); 43458 43459 } 43460 43461 }; 43462 43463 Slick.prototype.refresh = function( initializing ) { 43464 43465 var _ = this, currentSlide, lastVisibleIndex; 43466 43467 lastVisibleIndex = _.slideCount - _.options.slidesToShow; 43468 43469 // in non-infinite sliders, we don't want to go past the 43470 // last visible index. 43471 if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) { 43472 _.currentSlide = lastVisibleIndex; 43473 } 43474 43475 // if less slides than to show, go to start. 43476 if ( _.slideCount <= _.options.slidesToShow ) { 43477 _.currentSlide = 0; 43478 43479 } 43480 43481 currentSlide = _.currentSlide; 43482 43483 _.destroy(true); 43484 43485 $.extend(_, _.initials, { currentSlide: currentSlide }); 43486 43487 _.init(); 43488 43489 if( !initializing ) { 43490 43491 _.changeSlide({ 43492 data: { 43493 message: 'index', 43494 index: currentSlide 43495 } 43496 }, false); 43497 43498 } 43499 43500 }; 43501 43502 Slick.prototype.registerBreakpoints = function() { 43503 43504 var _ = this, breakpoint, currentBreakpoint, l, 43505 responsiveSettings = _.options.responsive || null; 43506 43507 if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) { 43508 43509 _.respondTo = _.options.respondTo || 'window'; 43510 43511 for ( breakpoint in responsiveSettings ) { 43512 43513 l = _.breakpoints.length-1; 43514 43515 if (responsiveSettings.hasOwnProperty(breakpoint)) { 43516 currentBreakpoint = responsiveSettings[breakpoint].breakpoint; 43517 43518 // loop through the breakpoints and cut out any existing 43519 // ones with the same breakpoint number, we don't want dupes. 43520 while( l >= 0 ) { 43521 if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) { 43522 _.breakpoints.splice(l,1); 43523 } 43524 l--; 43525 } 43526 43527 _.breakpoints.push(currentBreakpoint); 43528 _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings; 43529 43530 } 43531 43532 } 43533 43534 _.breakpoints.sort(function(a, b) { 43535 return ( _.options.mobileFirst ) ? a-b : b-a; 43536 }); 43537 43538 } 43539 43540 }; 43541 43542 Slick.prototype.reinit = function() { 43543 43544 var _ = this; 43545 43546 _.$slides = 43547 _.$slideTrack 43548 .children(_.options.slide) 43549 .addClass('slick-slide'); 43550 43551 _.slideCount = _.$slides.length; 43552 43553 if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) { 43554 _.currentSlide = _.currentSlide - _.options.slidesToScroll; 43555 } 43556 43557 if (_.slideCount <= _.options.slidesToShow) { 43558 _.currentSlide = 0; 43559 } 43560 43561 _.registerBreakpoints(); 43562 43563 _.setProps(); 43564 _.setupInfinite(); 43565 _.buildArrows(); 43566 _.updateArrows(); 43567 _.initArrowEvents(); 43568 _.buildDots(); 43569 _.updateDots(); 43570 _.initDotEvents(); 43571 _.cleanUpSlideEvents(); 43572 _.initSlideEvents(); 43573 43574 _.checkResponsive(false, true); 43575 43576 if (_.options.focusOnSelect === true) { 43577 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 43578 } 43579 43580 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 43581 43582 _.setPosition(); 43583 _.focusHandler(); 43584 43585 _.paused = !_.options.autoplay; 43586 _.autoPlay(); 43587 43588 _.$slider.trigger('reInit', [_]); 43589 43590 }; 43591 43592 Slick.prototype.resize = function() { 43593 43594 var _ = this; 43595 43596 if ($(window).width() !== _.windowWidth) { 43597 clearTimeout(_.windowDelay); 43598 _.windowDelay = window.setTimeout(function() { 43599 _.windowWidth = $(window).width(); 43600 _.checkResponsive(); 43601 if( !_.unslicked ) { _.setPosition(); } 43602 }, 50); 43603 } 43604 }; 43605 43606 Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) { 43607 43608 var _ = this; 43609 43610 if (typeof(index) === 'boolean') { 43611 removeBefore = index; 43612 index = removeBefore === true ? 0 : _.slideCount - 1; 43613 } else { 43614 index = removeBefore === true ? --index : index; 43615 } 43616 43617 if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) { 43618 return false; 43619 } 43620 43621 _.unload(); 43622 43623 if (removeAll === true) { 43624 _.$slideTrack.children().remove(); 43625 } else { 43626 _.$slideTrack.children(this.options.slide).eq(index).remove(); 43627 } 43628 43629 _.$slides = _.$slideTrack.children(this.options.slide); 43630 43631 _.$slideTrack.children(this.options.slide).detach(); 43632 43633 _.$slideTrack.append(_.$slides); 43634 43635 _.$slidesCache = _.$slides; 43636 43637 _.reinit(); 43638 43639 }; 43640 43641 Slick.prototype.setCSS = function(position) { 43642 43643 var _ = this, 43644 positionProps = {}, 43645 x, y; 43646 43647 if (_.options.rtl === true) { 43648 position = -position; 43649 } 43650 x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px'; 43651 y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px'; 43652 43653 positionProps[_.positionProp] = position; 43654 43655 if (_.transformsEnabled === false) { 43656 _.$slideTrack.css(positionProps); 43657 } else { 43658 positionProps = {}; 43659 if (_.cssTransitions === false) { 43660 positionProps[_.animType] = 'translate(' + x + ', ' + y + ')'; 43661 _.$slideTrack.css(positionProps); 43662 } else { 43663 positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)'; 43664 _.$slideTrack.css(positionProps); 43665 } 43666 } 43667 43668 }; 43669 43670 Slick.prototype.setDimensions = function() { 43671 43672 var _ = this; 43673 43674 if (_.options.vertical === false) { 43675 if (_.options.centerMode === true) { 43676 _.$list.css({ 43677 padding: ('0px ' + _.options.centerPadding) 43678 }); 43679 } 43680 } else { 43681 _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow); 43682 if (_.options.centerMode === true) { 43683 _.$list.css({ 43684 padding: (_.options.centerPadding + ' 0px') 43685 }); 43686 } 43687 } 43688 43689 _.listWidth = _.$list.width(); 43690 _.listHeight = _.$list.height(); 43691 43692 43693 if (_.options.vertical === false && _.options.variableWidth === false) { 43694 _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); 43695 _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length))); 43696 43697 } else if (_.options.variableWidth === true) { 43698 _.$slideTrack.width(5000 * _.slideCount); 43699 } else { 43700 _.slideWidth = Math.ceil(_.listWidth); 43701 _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length))); 43702 } 43703 43704 var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width(); 43705 if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset); 43706 43707 }; 43708 43709 Slick.prototype.setFade = function() { 43710 43711 var _ = this, 43712 targetLeft; 43713 43714 _.$slides.each(function(index, element) { 43715 targetLeft = (_.slideWidth * index) * -1; 43716 if (_.options.rtl === true) { 43717 $(element).css({ 43718 position: 'relative', 43719 right: targetLeft, 43720 top: 0, 43721 zIndex: _.options.zIndex - 2, 43722 opacity: 0 43723 }); 43724 } else { 43725 $(element).css({ 43726 position: 'relative', 43727 left: targetLeft, 43728 top: 0, 43729 zIndex: _.options.zIndex - 2, 43730 opacity: 0 43731 }); 43732 } 43733 }); 43734 43735 _.$slides.eq(_.currentSlide).css({ 43736 zIndex: _.options.zIndex - 1, 43737 opacity: 1 43738 }); 43739 43740 }; 43741 43742 Slick.prototype.setHeight = function() { 43743 43744 var _ = this; 43745 43746 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 43747 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 43748 _.$list.css('height', targetHeight); 43749 } 43750 43751 }; 43752 43753 Slick.prototype.setOption = 43754 Slick.prototype.slickSetOption = function() { 43755 43756 /** 43757 * accepts arguments in format of: 43758 * 43759 * - for changing a single option's value: 43760 * .slick("setOption", option, value, refresh ) 43761 * 43762 * - for changing a set of responsive options: 43763 * .slick("setOption", 'responsive', [{}, ...], refresh ) 43764 * 43765 * - for updating multiple values at once (not responsive) 43766 * .slick("setOption", { 'option': value, ... }, refresh ) 43767 */ 43768 43769 var _ = this, l, item, option, value, refresh = false, type; 43770 43771 if( $.type( arguments[0] ) === 'object' ) { 43772 43773 option = arguments[0]; 43774 refresh = arguments[1]; 43775 type = 'multiple'; 43776 43777 } else if ( $.type( arguments[0] ) === 'string' ) { 43778 43779 option = arguments[0]; 43780 value = arguments[1]; 43781 refresh = arguments[2]; 43782 43783 if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) { 43784 43785 type = 'responsive'; 43786 43787 } else if ( typeof arguments[1] !== 'undefined' ) { 43788 43789 type = 'single'; 43790 43791 } 43792 43793 } 43794 43795 if ( type === 'single' ) { 43796 43797 _.options[option] = value; 43798 43799 43800 } else if ( type === 'multiple' ) { 43801 43802 $.each( option , function( opt, val ) { 43803 43804 _.options[opt] = val; 43805 43806 }); 43807 43808 43809 } else if ( type === 'responsive' ) { 43810 43811 for ( item in value ) { 43812 43813 if( $.type( _.options.responsive ) !== 'array' ) { 43814 43815 _.options.responsive = [ value[item] ]; 43816 43817 } else { 43818 43819 l = _.options.responsive.length-1; 43820 43821 // loop through the responsive object and splice out duplicates. 43822 while( l >= 0 ) { 43823 43824 if( _.options.responsive[l].breakpoint === value[item].breakpoint ) { 43825 43826 _.options.responsive.splice(l,1); 43827 43828 } 43829 43830 l--; 43831 43832 } 43833 43834 _.options.responsive.push( value[item] ); 43835 43836 } 43837 43838 } 43839 43840 } 43841 43842 if ( refresh ) { 43843 43844 _.unload(); 43845 _.reinit(); 43846 43847 } 43848 43849 }; 43850 43851 Slick.prototype.setPosition = function() { 43852 43853 var _ = this; 43854 43855 _.setDimensions(); 43856 43857 _.setHeight(); 43858 43859 if (_.options.fade === false) { 43860 _.setCSS(_.getLeft(_.currentSlide)); 43861 } else { 43862 _.setFade(); 43863 } 43864 43865 _.$slider.trigger('setPosition', [_]); 43866 43867 }; 43868 43869 Slick.prototype.setProps = function() { 43870 43871 var _ = this, 43872 bodyStyle = document.body.style; 43873 43874 _.positionProp = _.options.vertical === true ? 'top' : 'left'; 43875 43876 if (_.positionProp === 'top') { 43877 _.$slider.addClass('slick-vertical'); 43878 } else { 43879 _.$slider.removeClass('slick-vertical'); 43880 } 43881 43882 if (bodyStyle.WebkitTransition !== undefined || 43883 bodyStyle.MozTransition !== undefined || 43884 bodyStyle.msTransition !== undefined) { 43885 if (_.options.useCSS === true) { 43886 _.cssTransitions = true; 43887 } 43888 } 43889 43890 if ( _.options.fade ) { 43891 if ( typeof _.options.zIndex === 'number' ) { 43892 if( _.options.zIndex < 3 ) { 43893 _.options.zIndex = 3; 43894 } 43895 } else { 43896 _.options.zIndex = _.defaults.zIndex; 43897 } 43898 } 43899 43900 if (bodyStyle.OTransform !== undefined) { 43901 _.animType = 'OTransform'; 43902 _.transformType = '-o-transform'; 43903 _.transitionType = 'OTransition'; 43904 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 43905 } 43906 if (bodyStyle.MozTransform !== undefined) { 43907 _.animType = 'MozTransform'; 43908 _.transformType = '-moz-transform'; 43909 _.transitionType = 'MozTransition'; 43910 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false; 43911 } 43912 if (bodyStyle.webkitTransform !== undefined) { 43913 _.animType = 'webkitTransform'; 43914 _.transformType = '-webkit-transform'; 43915 _.transitionType = 'webkitTransition'; 43916 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 43917 } 43918 if (bodyStyle.msTransform !== undefined) { 43919 _.animType = 'msTransform'; 43920 _.transformType = '-ms-transform'; 43921 _.transitionType = 'msTransition'; 43922 if (bodyStyle.msTransform === undefined) _.animType = false; 43923 } 43924 if (bodyStyle.transform !== undefined && _.animType !== false) { 43925 _.animType = 'transform'; 43926 _.transformType = 'transform'; 43927 _.transitionType = 'transition'; 43928 } 43929 _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false); 43930 }; 43931 43932 43933 Slick.prototype.setSlideClasses = function(index) { 43934 43935 var _ = this, 43936 centerOffset, allSlides, indexOffset, remainder; 43937 43938 allSlides = _.$slider 43939 .find('.slick-slide') 43940 .removeClass('slick-active slick-center slick-current') 43941 .attr('aria-hidden', 'true'); 43942 43943 _.$slides 43944 .eq(index) 43945 .addClass('slick-current'); 43946 43947 if (_.options.centerMode === true) { 43948 43949 var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0; 43950 43951 centerOffset = Math.floor(_.options.slidesToShow / 2); 43952 43953 if (_.options.infinite === true) { 43954 43955 if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) { 43956 _.$slides 43957 .slice(index - centerOffset + evenCoef, index + centerOffset + 1) 43958 .addClass('slick-active') 43959 .attr('aria-hidden', 'false'); 43960 43961 } else { 43962 43963 indexOffset = _.options.slidesToShow + index; 43964 allSlides 43965 .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2) 43966 .addClass('slick-active') 43967 .attr('aria-hidden', 'false'); 43968 43969 } 43970 43971 if (index === 0) { 43972 43973 allSlides 43974 .eq(allSlides.length - 1 - _.options.slidesToShow) 43975 .addClass('slick-center'); 43976 43977 } else if (index === _.slideCount - 1) { 43978 43979 allSlides 43980 .eq(_.options.slidesToShow) 43981 .addClass('slick-center'); 43982 43983 } 43984 43985 } 43986 43987 _.$slides 43988 .eq(index) 43989 .addClass('slick-center'); 43990 43991 } else { 43992 43993 if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) { 43994 43995 _.$slides 43996 .slice(index, index + _.options.slidesToShow) 43997 .addClass('slick-active') 43998 .attr('aria-hidden', 'false'); 43999 44000 } else if (allSlides.length <= _.options.slidesToShow) { 44001 44002 allSlides 44003 .addClass('slick-active') 44004 .attr('aria-hidden', 'false'); 44005 44006 } else { 44007 44008 remainder = _.slideCount % _.options.slidesToShow; 44009 indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index; 44010 44011 if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) { 44012 44013 allSlides 44014 .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder) 44015 .addClass('slick-active') 44016 .attr('aria-hidden', 'false'); 44017 44018 } else { 44019 44020 allSlides 44021 .slice(indexOffset, indexOffset + _.options.slidesToShow) 44022 .addClass('slick-active') 44023 .attr('aria-hidden', 'false'); 44024 44025 } 44026 44027 } 44028 44029 } 44030 44031 if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') { 44032 _.lazyLoad(); 44033 } 44034 }; 44035 44036 Slick.prototype.setupInfinite = function() { 44037 44038 var _ = this, 44039 i, slideIndex, infiniteCount; 44040 44041 if (_.options.fade === true) { 44042 _.options.centerMode = false; 44043 } 44044 44045 if (_.options.infinite === true && _.options.fade === false) { 44046 44047 slideIndex = null; 44048 44049 if (_.slideCount > _.options.slidesToShow) { 44050 44051 if (_.options.centerMode === true) { 44052 infiniteCount = _.options.slidesToShow + 1; 44053 } else { 44054 infiniteCount = _.options.slidesToShow; 44055 } 44056 44057 for (i = _.slideCount; i > (_.slideCount - 44058 infiniteCount); i -= 1) { 44059 slideIndex = i - 1; 44060 $(_.$slides[slideIndex]).clone(true).attr('id', '') 44061 .attr('data-slick-index', slideIndex - _.slideCount) 44062 .prependTo(_.$slideTrack).addClass('slick-cloned'); 44063 } 44064 for (i = 0; i < infiniteCount + _.slideCount; i += 1) { 44065 slideIndex = i; 44066 $(_.$slides[slideIndex]).clone(true).attr('id', '') 44067 .attr('data-slick-index', slideIndex + _.slideCount) 44068 .appendTo(_.$slideTrack).addClass('slick-cloned'); 44069 } 44070 _.$slideTrack.find('.slick-cloned').find('[id]').each(function() { 44071 $(this).attr('id', ''); 44072 }); 44073 44074 } 44075 44076 } 44077 44078 }; 44079 44080 Slick.prototype.interrupt = function( toggle ) { 44081 44082 var _ = this; 44083 44084 if( !toggle ) { 44085 _.autoPlay(); 44086 } 44087 _.interrupted = toggle; 44088 44089 }; 44090 44091 Slick.prototype.selectHandler = function(event) { 44092 44093 var _ = this; 44094 44095 var targetElement = 44096 $(event.target).is('.slick-slide') ? 44097 $(event.target) : 44098 $(event.target).parents('.slick-slide'); 44099 44100 var index = parseInt(targetElement.attr('data-slick-index')); 44101 44102 if (!index) index = 0; 44103 44104 if (_.slideCount <= _.options.slidesToShow) { 44105 44106 _.slideHandler(index, false, true); 44107 return; 44108 44109 } 44110 44111 _.slideHandler(index); 44112 44113 }; 44114 44115 Slick.prototype.slideHandler = function(index, sync, dontAnimate) { 44116 44117 var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null, 44118 _ = this, navTarget; 44119 44120 sync = sync || false; 44121 44122 if (_.animating === true && _.options.waitForAnimate === true) { 44123 return; 44124 } 44125 44126 if (_.options.fade === true && _.currentSlide === index) { 44127 return; 44128 } 44129 44130 if (sync === false) { 44131 _.asNavFor(index); 44132 } 44133 44134 targetSlide = index; 44135 targetLeft = _.getLeft(targetSlide); 44136 slideLeft = _.getLeft(_.currentSlide); 44137 44138 _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft; 44139 44140 if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) { 44141 if (_.options.fade === false) { 44142 targetSlide = _.currentSlide; 44143 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 44144 _.animateSlide(slideLeft, function() { 44145 _.postSlide(targetSlide); 44146 }); 44147 } else { 44148 _.postSlide(targetSlide); 44149 } 44150 } 44151 return; 44152 } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) { 44153 if (_.options.fade === false) { 44154 targetSlide = _.currentSlide; 44155 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 44156 _.animateSlide(slideLeft, function() { 44157 _.postSlide(targetSlide); 44158 }); 44159 } else { 44160 _.postSlide(targetSlide); 44161 } 44162 } 44163 return; 44164 } 44165 44166 if ( _.options.autoplay ) { 44167 clearInterval(_.autoPlayTimer); 44168 } 44169 44170 if (targetSlide < 0) { 44171 if (_.slideCount % _.options.slidesToScroll !== 0) { 44172 animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll); 44173 } else { 44174 animSlide = _.slideCount + targetSlide; 44175 } 44176 } else if (targetSlide >= _.slideCount) { 44177 if (_.slideCount % _.options.slidesToScroll !== 0) { 44178 animSlide = 0; 44179 } else { 44180 animSlide = targetSlide - _.slideCount; 44181 } 44182 } else { 44183 animSlide = targetSlide; 44184 } 44185 44186 _.animating = true; 44187 44188 _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]); 44189 44190 oldSlide = _.currentSlide; 44191 _.currentSlide = animSlide; 44192 44193 _.setSlideClasses(_.currentSlide); 44194 44195 if ( _.options.asNavFor ) { 44196 44197 navTarget = _.getNavTarget(); 44198 navTarget = navTarget.slick('getSlick'); 44199 44200 if ( navTarget.slideCount <= navTarget.options.slidesToShow ) { 44201 navTarget.setSlideClasses(_.currentSlide); 44202 } 44203 44204 } 44205 44206 _.updateDots(); 44207 _.updateArrows(); 44208 44209 if (_.options.fade === true) { 44210 if (dontAnimate !== true) { 44211 44212 _.fadeSlideOut(oldSlide); 44213 44214 _.fadeSlide(animSlide, function() { 44215 _.postSlide(animSlide); 44216 }); 44217 44218 } else { 44219 _.postSlide(animSlide); 44220 } 44221 _.animateHeight(); 44222 return; 44223 } 44224 44225 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 44226 _.animateSlide(targetLeft, function() { 44227 _.postSlide(animSlide); 44228 }); 44229 } else { 44230 _.postSlide(animSlide); 44231 } 44232 44233 }; 44234 44235 Slick.prototype.startLoad = function() { 44236 44237 var _ = this; 44238 44239 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 44240 44241 _.$prevArrow.hide(); 44242 _.$nextArrow.hide(); 44243 44244 } 44245 44246 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 44247 44248 _.$dots.hide(); 44249 44250 } 44251 44252 _.$slider.addClass('slick-loading'); 44253 44254 }; 44255 44256 Slick.prototype.swipeDirection = function() { 44257 44258 var xDist, yDist, r, swipeAngle, _ = this; 44259 44260 xDist = _.touchObject.startX - _.touchObject.curX; 44261 yDist = _.touchObject.startY - _.touchObject.curY; 44262 r = Math.atan2(yDist, xDist); 44263 44264 swipeAngle = Math.round(r * 180 / Math.PI); 44265 if (swipeAngle < 0) { 44266 swipeAngle = 360 - Math.abs(swipeAngle); 44267 } 44268 44269 if ((swipeAngle <= 45) && (swipeAngle >= 0)) { 44270 return (_.options.rtl === false ? 'left' : 'right'); 44271 } 44272 if ((swipeAngle <= 360) && (swipeAngle >= 315)) { 44273 return (_.options.rtl === false ? 'left' : 'right'); 44274 } 44275 if ((swipeAngle >= 135) && (swipeAngle <= 225)) { 44276 return (_.options.rtl === false ? 'right' : 'left'); 44277 } 44278 if (_.options.verticalSwiping === true) { 44279 if ((swipeAngle >= 35) && (swipeAngle <= 135)) { 44280 return 'down'; 44281 } else { 44282 return 'up'; 44283 } 44284 } 44285 44286 return 'vertical'; 44287 44288 }; 44289 44290 Slick.prototype.swipeEnd = function(event) { 44291 44292 var _ = this, 44293 slideCount, 44294 direction; 44295 44296 _.dragging = false; 44297 _.swiping = false; 44298 44299 if (_.scrolling) { 44300 _.scrolling = false; 44301 return false; 44302 } 44303 44304 _.interrupted = false; 44305 _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true; 44306 44307 if ( _.touchObject.curX === undefined ) { 44308 return false; 44309 } 44310 44311 if ( _.touchObject.edgeHit === true ) { 44312 _.$slider.trigger('edge', [_, _.swipeDirection() ]); 44313 } 44314 44315 if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) { 44316 44317 direction = _.swipeDirection(); 44318 44319 switch ( direction ) { 44320 44321 case 'left': 44322 case 'down': 44323 44324 slideCount = 44325 _.options.swipeToSlide ? 44326 _.checkNavigable( _.currentSlide + _.getSlideCount() ) : 44327 _.currentSlide + _.getSlideCount(); 44328 44329 _.currentDirection = 0; 44330 44331 break; 44332 44333 case 'right': 44334 case 'up': 44335 44336 slideCount = 44337 _.options.swipeToSlide ? 44338 _.checkNavigable( _.currentSlide - _.getSlideCount() ) : 44339 _.currentSlide - _.getSlideCount(); 44340 44341 _.currentDirection = 1; 44342 44343 break; 44344
vendor: 8,927 bytes, lines 44345-44664
44345 default: 44346 44347 44348 } 44349 44350 if( direction != 'vertical' ) { 44351 44352 _.slideHandler( slideCount ); 44353 _.touchObject = {}; 44354 _.$slider.trigger('swipe', [_, direction ]); 44355 44356 } 44357 44358 } else { 44359 44360 if ( _.touchObject.startX !== _.touchObject.curX ) { 44361 44362 _.slideHandler( _.currentSlide ); 44363 _.touchObject = {}; 44364 44365 } 44366 44367 } 44368 44369 }; 44370 44371 Slick.prototype.swipeHandler = function(event) { 44372 44373 var _ = this; 44374 44375 if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) { 44376 return; 44377 } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) { 44378 return; 44379 } 44380 44381 _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? 44382 event.originalEvent.touches.length : 1; 44383 44384 _.touchObject.minSwipe = _.listWidth / _.options 44385 .touchThreshold; 44386 44387 if (_.options.verticalSwiping === true) { 44388 _.touchObject.minSwipe = _.listHeight / _.options 44389 .touchThreshold; 44390 } 44391 44392 switch (event.data.action) { 44393 44394 case 'start': 44395 _.swipeStart(event); 44396 break; 44397 44398 case 'move': 44399 _.swipeMove(event); 44400 break; 44401 44402 case 'end': 44403 _.swipeEnd(event); 44404 break; 44405 44406 } 44407 44408 }; 44409 44410 Slick.prototype.swipeMove = function(event) { 44411 44412 var _ = this, 44413 edgeWasHit = false, 44414 curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength; 44415 44416 touches = event.originalEvent !== undefined ? event.originalEvent.touches : null; 44417 44418 if (!_.dragging || _.scrolling || touches && touches.length !== 1) { 44419 return false; 44420 } 44421 44422 curLeft = _.getLeft(_.currentSlide); 44423 44424 _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX; 44425 _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY; 44426 44427 _.touchObject.swipeLength = Math.round(Math.sqrt( 44428 Math.pow(_.touchObject.curX - _.touchObject.startX, 2))); 44429 44430 verticalSwipeLength = Math.round(Math.sqrt( 44431 Math.pow(_.touchObject.curY - _.touchObject.startY, 2))); 44432 44433 if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) { 44434 _.scrolling = true; 44435 return false; 44436 } 44437 44438 if (_.options.verticalSwiping === true) { 44439 _.touchObject.swipeLength = verticalSwipeLength; 44440 } 44441 44442 swipeDirection = _.swipeDirection(); 44443 44444 if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) { 44445 _.swiping = true; 44446 event.preventDefault(); 44447 } 44448 44449 positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1); 44450 if (_.options.verticalSwiping === true) { 44451 positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1; 44452 } 44453 44454 44455 swipeLength = _.touchObject.swipeLength; 44456 44457 _.touchObject.edgeHit = false; 44458 44459 if (_.options.infinite === false) { 44460 if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) { 44461 swipeLength = _.touchObject.swipeLength * _.options.edgeFriction; 44462 _.touchObject.edgeHit = true; 44463 } 44464 } 44465 44466 if (_.options.vertical === false) { 44467 _.swipeLeft = curLeft + swipeLength * positionOffset; 44468 } else { 44469 _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset; 44470 } 44471 if (_.options.verticalSwiping === true) { 44472 _.swipeLeft = curLeft + swipeLength * positionOffset; 44473 } 44474 44475 if (_.options.fade === true || _.options.touchMove === false) { 44476 return false; 44477 } 44478 44479 if (_.animating === true) { 44480 _.swipeLeft = null; 44481 return false; 44482 } 44483 44484 _.setCSS(_.swipeLeft); 44485 44486 }; 44487 44488 Slick.prototype.swipeStart = function(event) { 44489 44490 var _ = this, 44491 touches; 44492 44493 _.interrupted = true; 44494 44495 if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) { 44496 _.touchObject = {}; 44497 return false; 44498 } 44499 44500 if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) { 44501 touches = event.originalEvent.touches[0]; 44502 } 44503 44504 _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX; 44505 _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY; 44506 44507 _.dragging = true; 44508 44509 }; 44510 44511 Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() { 44512 44513 var _ = this; 44514 44515 if (_.$slidesCache !== null) { 44516 44517 _.unload(); 44518 44519 _.$slideTrack.children(this.options.slide).detach(); 44520 44521 _.$slidesCache.appendTo(_.$slideTrack); 44522 44523 _.reinit(); 44524 44525 } 44526 44527 }; 44528 44529 Slick.prototype.unload = function() { 44530 44531 var _ = this; 44532 44533 $('.slick-cloned', _.$slider).remove(); 44534 44535 if (_.$dots) { 44536 _.$dots.remove(); 44537 } 44538 44539 if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) { 44540 _.$prevArrow.remove(); 44541 } 44542 44543 if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) { 44544 _.$nextArrow.remove(); 44545 } 44546 44547 _.$slides 44548 .removeClass('slick-slide slick-active slick-visible slick-current') 44549 .attr('aria-hidden', 'true') 44550 .css('width', ''); 44551 44552 }; 44553 44554 Slick.prototype.unslick = function(fromBreakpoint) { 44555 44556 var _ = this; 44557 _.$slider.trigger('unslick', [_, fromBreakpoint]); 44558 _.destroy(); 44559 44560 }; 44561 44562 Slick.prototype.updateArrows = function() { 44563 44564 var _ = this, 44565 centerOffset; 44566 44567 centerOffset = Math.floor(_.options.slidesToShow / 2); 44568 44569 if ( _.options.arrows === true && 44570 _.slideCount > _.options.slidesToShow && 44571 !_.options.infinite ) { 44572 44573 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 44574 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 44575 44576 if (_.currentSlide === 0) { 44577 44578 _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 44579 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 44580 44581 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) { 44582 44583 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 44584 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 44585 44586 } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) { 44587 44588 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 44589 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 44590 44591 } 44592 44593 } 44594 44595 }; 44596 44597 Slick.prototype.updateDots = function() { 44598 44599 var _ = this; 44600 44601 if (_.$dots !== null) { 44602 44603 _.$dots 44604 .find('li') 44605 .removeClass('slick-active') 44606 .end(); 44607 44608 _.$dots 44609 .find('li') 44610 .eq(Math.floor(_.currentSlide / _.options.slidesToScroll)) 44611 .addClass('slick-active'); 44612 44613 } 44614 44615 }; 44616 44617 Slick.prototype.visibility = function() { 44618 44619 var _ = this; 44620 44621 if ( _.options.autoplay ) { 44622 44623 if ( document[_.hidden] ) { 44624 44625 _.interrupted = true; 44626 44627 } else { 44628 44629 _.interrupted = false; 44630 44631 } 44632 44633 } 44634 44635 }; 44636 44637 $.fn.slick = function() { 44638 var _ = this, 44639 opt = arguments[0], 44640 args = Array.prototype.slice.call(arguments, 1), 44641 l = _.length, 44642 i, 44643 ret; 44644 for (i = 0; i < l; i++) { 44645 if (typeof opt == 'object' || typeof opt == 'undefined') 44646 _[i].slick = new Slick(_[i], opt); 44647 else 44648 ret = _[i].slick[opt].apply(_[i].slick, args); 44649 if (typeof ret != 'undefined') return ret; 44650 } 44651 return _; 44652 }; 44653 44654})); 44655 44656(typeof navigator !== "undefined") && (function (global, factory) { 44657 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 44658 typeof define === 'function' && define.amd ? define(factory) : 44659 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory()); 44660})(this, (function () { 'use strict'; 44661 44662 var svgNS = 'http://www.w3.org/2000/svg'; 44663 var locationHref = ''; 44664 var _useWebWorker = false;
vendor: 52,742 bytes, lines 44665-46483
44665 var initialDefaultFrame = -999999; 44666 44667 var setWebWorker = function setWebWorker(flag) { 44668 _useWebWorker = !!flag; 44669 }; 44670 44671 var getWebWorker = function getWebWorker() { 44672 return _useWebWorker; 44673 }; 44674 44675 var setLocationHref = function setLocationHref(value) { 44676 locationHref = value; 44677 }; 44678 44679 var getLocationHref = function getLocationHref() { 44680 return locationHref; 44681 }; 44682 44683 function createTag(type) { 44684 // return {appendChild:function(){},setAttribute:function(){},style:{}} 44685 return document.createElement(type); 44686 } 44687 44688 function extendPrototype(sources, destination) { 44689 var i; 44690 var len = sources.length; 44691 var sourcePrototype; 44692 44693 for (i = 0; i < len; i += 1) { 44694 sourcePrototype = sources[i].prototype; 44695 44696 for (var attr in sourcePrototype) { 44697 if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr]; 44698 } 44699 } 44700 } 44701 44702 function getDescriptor(object, prop) { 44703 return Object.getOwnPropertyDescriptor(object, prop); 44704 } 44705 44706 function createProxyFunction(prototype) { 44707 function ProxyFunction() {} 44708 44709 ProxyFunction.prototype = prototype; 44710 return ProxyFunction; 44711 } 44712 44713 // import Howl from '../../3rd_party/howler'; 44714 var audioControllerFactory = function () { 44715 function AudioController(audioFactory) { 44716 this.audios = []; 44717 this.audioFactory = audioFactory; 44718 this._volume = 1; 44719 this._isMuted = false; 44720 } 44721 44722 AudioController.prototype = { 44723 addAudio: function addAudio(audio) { 44724 this.audios.push(audio); 44725 }, 44726 pause: function pause() { 44727 var i; 44728 var len = this.audios.length; 44729 44730 for (i = 0; i < len; i += 1) { 44731 this.audios[i].pause(); 44732 } 44733 }, 44734 resume: function resume() { 44735 var i; 44736 var len = this.audios.length; 44737 44738 for (i = 0; i < len; i += 1) { 44739 this.audios[i].resume(); 44740 } 44741 }, 44742 setRate: function setRate(rateValue) { 44743 var i; 44744 var len = this.audios.length; 44745 44746 for (i = 0; i < len; i += 1) { 44747 this.audios[i].setRate(rateValue); 44748 } 44749 }, 44750 createAudio: function createAudio(assetPath) { 44751 if (this.audioFactory) { 44752 return this.audioFactory(assetPath); 44753 } 44754 44755 if (window.Howl) { 44756 return new window.Howl({ 44757 src: [assetPath] 44758 }); 44759 } 44760 44761 return { 44762 isPlaying: false, 44763 play: function play() { 44764 this.isPlaying = true; 44765 }, 44766 seek: function seek() { 44767 this.isPlaying = false; 44768 }, 44769 playing: function playing() {}, 44770 rate: function rate() {}, 44771 setVolume: function setVolume() {} 44772 }; 44773 }, 44774 setAudioFactory: function setAudioFactory(audioFactory) { 44775 this.audioFactory = audioFactory; 44776 }, 44777 setVolume: function setVolume(value) { 44778 this._volume = value; 44779 44780 this._updateVolume(); 44781 }, 44782 mute: function mute() { 44783 this._isMuted = true; 44784 44785 this._updateVolume(); 44786 }, 44787 unmute: function unmute() { 44788 this._isMuted = false; 44789 44790 this._updateVolume(); 44791 }, 44792 getVolume: function getVolume() { 44793 return this._volume; 44794 }, 44795 _updateVolume: function _updateVolume() { 44796 var i; 44797 var len = this.audios.length; 44798 44799 for (i = 0; i < len; i += 1) { 44800 this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1)); 44801 } 44802 } 44803 }; 44804 return function () { 44805 return new AudioController(); 44806 }; 44807 }(); 44808 44809 var createTypedArray = function () { 44810 function createRegularArray(type, len) { 44811 var i = 0; 44812 var arr = []; 44813 var value; 44814 44815 switch (type) { 44816 case 'int16': 44817 case 'uint8c': 44818 value = 1; 44819 break; 44820 44821 default: 44822 value = 1.1; 44823 break; 44824 } 44825 44826 for (i = 0; i < len; i += 1) { 44827 arr.push(value); 44828 } 44829 44830 return arr; 44831 } 44832 44833 function createTypedArrayFactory(type, len) { 44834 if (type === 'float32') { 44835 return new Float32Array(len); 44836 } 44837 44838 if (type === 'int16') { 44839 return new Int16Array(len); 44840 } 44841 44842 if (type === 'uint8c') { 44843 return new Uint8ClampedArray(len); 44844 } 44845 44846 return createRegularArray(type, len); 44847 } 44848 44849 if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') { 44850 return createTypedArrayFactory; 44851 } 44852 44853 return createRegularArray; 44854 }(); 44855 44856 function createSizedArray(len) { 44857 return Array.apply(null, { 44858 length: len 44859 }); 44860 } 44861 44862 function _typeof$6(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$6(obj); } 44863 var subframeEnabled = true; 44864 var expressionsPlugin = null; 44865 var expressionsInterfaces = null; 44866 var idPrefix$1 = ''; 44867 var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); 44868 var _shouldRoundValues = false; 44869 var bmPow = Math.pow; 44870 var bmSqrt = Math.sqrt; 44871 var bmFloor = Math.floor; 44872 var bmMax = Math.max; 44873 var bmMin = Math.min; 44874 var BMMath = {}; 44875 44876 (function () { 44877 var propertyNames = ['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']; 44878 var i; 44879 var len = propertyNames.length; 44880 44881 for (i = 0; i < len; i += 1) { 44882 BMMath[propertyNames[i]] = Math[propertyNames[i]]; 44883 } 44884 })(); 44885 44886 function ProjectInterface$1() { 44887 return {}; 44888 } 44889 44890 BMMath.random = Math.random; 44891 44892 BMMath.abs = function (val) { 44893 var tOfVal = _typeof$6(val); 44894 44895 if (tOfVal === 'object' && val.length) { 44896 var absArr = createSizedArray(val.length); 44897 var i; 44898 var len = val.length; 44899 44900 for (i = 0; i < len; i += 1) { 44901 absArr[i] = Math.abs(val[i]); 44902 } 44903 44904 return absArr; 44905 } 44906 44907 return Math.abs(val); 44908 }; 44909 44910 var defaultCurveSegments = 150; 44911 var degToRads = Math.PI / 180; 44912 var roundCorner = 0.5519; 44913 44914 function roundValues(flag) { 44915 _shouldRoundValues = !!flag; 44916 } 44917 44918 function bmRnd(value) { 44919 if (_shouldRoundValues) { 44920 return Math.round(value); 44921 } 44922 44923 return value; 44924 } 44925 44926 function styleDiv(element) { 44927 element.style.position = 'absolute'; 44928 element.style.top = 0; 44929 element.style.left = 0; 44930 element.style.display = 'block'; 44931 element.style.transformOrigin = '0 0'; 44932 element.style.webkitTransformOrigin = '0 0'; 44933 element.style.backfaceVisibility = 'visible'; 44934 element.style.webkitBackfaceVisibility = 'visible'; 44935 element.style.transformStyle = 'preserve-3d'; 44936 element.style.webkitTransformStyle = 'preserve-3d'; 44937 element.style.mozTransformStyle = 'preserve-3d'; 44938 } 44939 44940 function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) { 44941 this.type = type; 44942 this.currentTime = currentTime; 44943 this.totalTime = totalTime; 44944 this.direction = frameMultiplier < 0 ? -1 : 1; 44945 } 44946 44947 function BMCompleteEvent(type, frameMultiplier) { 44948 this.type = type; 44949 this.direction = frameMultiplier < 0 ? -1 : 1; 44950 } 44951 44952 function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) { 44953 this.type = type; 44954 this.currentLoop = currentLoop; 44955 this.totalLoops = totalLoops; 44956 this.direction = frameMultiplier < 0 ? -1 : 1; 44957 } 44958 44959 function BMSegmentStartEvent(type, firstFrame, totalFrames) { 44960 this.type = type; 44961 this.firstFrame = firstFrame; 44962 this.totalFrames = totalFrames; 44963 } 44964 44965 function BMDestroyEvent(type, target) { 44966 this.type = type; 44967 this.target = target; 44968 } 44969 44970 function BMRenderFrameErrorEvent(nativeError, currentTime) { 44971 this.type = 'renderFrameError'; 44972 this.nativeError = nativeError; 44973 this.currentTime = currentTime; 44974 } 44975 44976 function BMConfigErrorEvent(nativeError) { 44977 this.type = 'configError'; 44978 this.nativeError = nativeError; 44979 } 44980 44981 function BMAnimationConfigErrorEvent(type, nativeError) { 44982 this.type = type; 44983 this.nativeError = nativeError; 44984 } 44985 44986 var createElementID = function () { 44987 var _count = 0; 44988 return function createID() { 44989 _count += 1; 44990 return idPrefix$1 + '__lottie_element_' + _count; 44991 }; 44992 }(); 44993 44994 function HSVtoRGB(h, s, v) { 44995 var r; 44996 var g; 44997 var b; 44998 var i; 44999 var f; 45000 var p; 45001 var q; 45002 var t; 45003 i = Math.floor(h * 6); 45004 f = h * 6 - i; 45005 p = v * (1 - s); 45006 q = v * (1 - f * s); 45007 t = v * (1 - (1 - f) * s); 45008 45009 switch (i % 6) { 45010 case 0: 45011 r = v; 45012 g = t; 45013 b = p; 45014 break; 45015 45016 case 1: 45017 r = q; 45018 g = v; 45019 b = p; 45020 break; 45021 45022 case 2: 45023 r = p; 45024 g = v; 45025 b = t; 45026 break; 45027 45028 case 3: 45029 r = p; 45030 g = q; 45031 b = v; 45032 break; 45033 45034 case 4: 45035 r = t; 45036 g = p; 45037 b = v; 45038 break; 45039 45040 case 5: 45041 r = v; 45042 g = p; 45043 b = q; 45044 break; 45045 45046 default: 45047 break; 45048 } 45049 45050 return [r, g, b]; 45051 } 45052 45053 function RGBtoHSV(r, g, b) { 45054 var max = Math.max(r, g, b); 45055 var min = Math.min(r, g, b); 45056 var d = max - min; 45057 var h; 45058 var s = max === 0 ? 0 : d / max; 45059 var v = max / 255; 45060 45061 switch (max) { 45062 case min: 45063 h = 0; 45064 break; 45065 45066 case r: 45067 h = g - b + d * (g < b ? 6 : 0); 45068 h /= 6 * d; 45069 break; 45070 45071 case g: 45072 h = b - r + d * 2; 45073 h /= 6 * d; 45074 break; 45075 45076 case b: 45077 h = r - g + d * 4; 45078 h /= 6 * d; 45079 break; 45080 45081 default: 45082 break; 45083 } 45084 45085 return [h, s, v]; 45086 } 45087 45088 function addSaturationToRGB(color, offset) { 45089 var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); 45090 hsv[1] += offset; 45091 45092 if (hsv[1] > 1) { 45093 hsv[1] = 1; 45094 } else if (hsv[1] <= 0) { 45095 hsv[1] = 0; 45096 } 45097 45098 return HSVtoRGB(hsv[0], hsv[1], hsv[2]); 45099 } 45100 45101 function addBrightnessToRGB(color, offset) { 45102 var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); 45103 hsv[2] += offset; 45104 45105 if (hsv[2] > 1) { 45106 hsv[2] = 1; 45107 } else if (hsv[2] < 0) { 45108 hsv[2] = 0; 45109 } 45110 45111 return HSVtoRGB(hsv[0], hsv[1], hsv[2]); 45112 } 45113 45114 function addHueToRGB(color, offset) { 45115 var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); 45116 hsv[0] += offset / 360; 45117 45118 if (hsv[0] > 1) { 45119 hsv[0] -= 1; 45120 } else if (hsv[0] < 0) { 45121 hsv[0] += 1; 45122 } 45123 45124 return HSVtoRGB(hsv[0], hsv[1], hsv[2]); 45125 } 45126 45127 var rgbToHex = function () { 45128 var colorMap = []; 45129 var i; 45130 var hex; 45131 45132 for (i = 0; i < 256; i += 1) { 45133 hex = i.toString(16); 45134 colorMap[i] = hex.length === 1 ? '0' + hex : hex; 45135 } 45136 45137 return function (r, g, b) { 45138 if (r < 0) { 45139 r = 0; 45140 } 45141 45142 if (g < 0) { 45143 g = 0; 45144 } 45145 45146 if (b < 0) { 45147 b = 0; 45148 } 45149 45150 return '#' + colorMap[r] + colorMap[g] + colorMap[b]; 45151 }; 45152 }(); 45153 45154 var setSubframeEnabled = function setSubframeEnabled(flag) { 45155 subframeEnabled = !!flag; 45156 }; 45157 45158 var getSubframeEnabled = function getSubframeEnabled() { 45159 return subframeEnabled; 45160 }; 45161 45162 var setExpressionsPlugin = function setExpressionsPlugin(value) { 45163 expressionsPlugin = value; 45164 }; 45165 45166 var getExpressionsPlugin = function getExpressionsPlugin() { 45167 return expressionsPlugin; 45168 }; 45169 45170 var setExpressionInterfaces = function setExpressionInterfaces(value) { 45171 expressionsInterfaces = value; 45172 }; 45173 45174 var getExpressionInterfaces = function getExpressionInterfaces() { 45175 return expressionsInterfaces; 45176 }; 45177 45178 var setDefaultCurveSegments = function setDefaultCurveSegments(value) { 45179 defaultCurveSegments = value; 45180 }; 45181 45182 var getDefaultCurveSegments = function getDefaultCurveSegments() { 45183 return defaultCurveSegments; 45184 }; 45185 45186 var setIdPrefix = function setIdPrefix(value) { 45187 idPrefix$1 = value; 45188 }; 45189 45190 var getIdPrefix = function getIdPrefix() { 45191 return idPrefix$1; 45192 }; 45193 45194 function createNS(type) { 45195 // return {appendChild:function(){},setAttribute:function(){},style:{}} 45196 return document.createElementNS(svgNS, type); 45197 } 45198 45199 function _typeof$5(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$5(obj); } 45200 45201 var dataManager = function () { 45202 var _counterId = 1; 45203 var processes = []; 45204 var workerFn; 45205 var workerInstance; 45206 var workerProxy = { 45207 onmessage: function onmessage() {}, 45208 postMessage: function postMessage(path) { 45209 workerFn({ 45210 data: path 45211 }); 45212 } 45213 }; 45214 var _workerSelf = { 45215 postMessage: function postMessage(data) { 45216 workerProxy.onmessage({ 45217 data: data 45218 }); 45219 } 45220 }; 45221 45222 function createWorker(fn) { 45223 if (window.Worker && window.Blob && getWebWorker()) { 45224 var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { 45225 type: 'text/javascript' 45226 }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' }); 45227 45228 var url = URL.createObjectURL(blob); 45229 return new Worker(url); 45230 } 45231 45232 workerFn = fn; 45233 return workerProxy; 45234 } 45235 45236 function setupWorker() { 45237 if (!workerInstance) { 45238 workerInstance = createWorker(function workerStart(e) { 45239 function dataFunctionManager() { 45240 function completeLayers(layers, comps) { 45241 var layerData; 45242 var i; 45243 var len = layers.length; 45244 var j; 45245 var jLen; 45246 var k; 45247 var kLen; 45248 45249 for (i = 0; i < len; i += 1) { 45250 layerData = layers[i]; 45251 45252 if ('ks' in layerData && !layerData.completed) { 45253 layerData.completed = true; 45254 45255 if (layerData.hasMask) { 45256 var maskProps = layerData.masksProperties; 45257 jLen = maskProps.length; 45258 45259 for (j = 0; j < jLen; j += 1) { 45260 if (maskProps[j].pt.k.i) { 45261 convertPathsToAbsoluteValues(maskProps[j].pt.k); 45262 } else { 45263 kLen = maskProps[j].pt.k.length; 45264 45265 for (k = 0; k < kLen; k += 1) { 45266 if (maskProps[j].pt.k[k].s) { 45267 convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]); 45268 } 45269 45270 if (maskProps[j].pt.k[k].e) { 45271 convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]); 45272 } 45273 } 45274 } 45275 } 45276 } 45277 45278 if (layerData.ty === 0) { 45279 layerData.layers = findCompLayers(layerData.refId, comps); 45280 completeLayers(layerData.layers, comps); 45281 } else if (layerData.ty === 4) { 45282 completeShapes(layerData.shapes); 45283 } else if (layerData.ty === 5) { 45284 completeText(layerData); 45285 } 45286 } 45287 } 45288 } 45289 45290 function completeChars(chars, assets) { 45291 if (chars) { 45292 var i = 0; 45293 var len = chars.length; 45294 45295 for (i = 0; i < len; i += 1) { 45296 if (chars[i].t === 1) { 45297 // var compData = findComp(chars[i].data.refId, assets); 45298 chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0; 45299 // chars[i].data.op = 99999; 45300 // chars[i].data.st = 0; 45301 // chars[i].data.sr = 1; 45302 // chars[i].w = compData.w; 45303 // chars[i].data.ks = { 45304 // a: { k: [0, 0, 0], a: 0 }, 45305 // p: { k: [0, -compData.h, 0], a: 0 }, 45306 // r: { k: 0, a: 0 }, 45307 // s: { k: [100, 100], a: 0 }, 45308 // o: { k: 100, a: 0 }, 45309 // }; 45310 45311 completeLayers(chars[i].data.layers, assets); 45312 } 45313 } 45314 } 45315 } 45316 45317 function findComp(id, comps) { 45318 var i = 0; 45319 var len = comps.length; 45320 45321 while (i < len) { 45322 if (comps[i].id === id) { 45323 return comps[i]; 45324 } 45325 45326 i += 1; 45327 } 45328 45329 return null; 45330 } 45331 45332 function findCompLayers(id, comps) { 45333 var comp = findComp(id, comps); 45334 45335 if (comp) { 45336 if (!comp.layers.__used) { 45337 comp.layers.__used = true; 45338 return comp.layers; 45339 } 45340 45341 return JSON.parse(JSON.stringify(comp.layers)); 45342 } 45343 45344 return null; 45345 } 45346 45347 function completeShapes(arr) { 45348 var i; 45349 var len = arr.length; 45350 var j; 45351 var jLen; 45352 45353 for (i = len - 1; i >= 0; i -= 1) { 45354 if (arr[i].ty === 'sh') { 45355 if (arr[i].ks.k.i) { 45356 convertPathsToAbsoluteValues(arr[i].ks.k); 45357 } else { 45358 jLen = arr[i].ks.k.length; 45359 45360 for (j = 0; j < jLen; j += 1) { 45361 if (arr[i].ks.k[j].s) { 45362 convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]); 45363 } 45364 45365 if (arr[i].ks.k[j].e) { 45366 convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]); 45367 } 45368 } 45369 } 45370 } else if (arr[i].ty === 'gr') { 45371 completeShapes(arr[i].it); 45372 } 45373 } 45374 } 45375 45376 function convertPathsToAbsoluteValues(path) { 45377 var i; 45378 var len = path.i.length; 45379 45380 for (i = 0; i < len; i += 1) { 45381 path.i[i][0] += path.v[i][0]; 45382 path.i[i][1] += path.v[i][1]; 45383 path.o[i][0] += path.v[i][0]; 45384 path.o[i][1] += path.v[i][1]; 45385 } 45386 } 45387 45388 function checkVersion(minimum, animVersionString) { 45389 var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100]; 45390 45391 if (minimum[0] > animVersion[0]) { 45392 return true; 45393 } 45394 45395 if (animVersion[0] > minimum[0]) { 45396 return false; 45397 } 45398 45399 if (minimum[1] > animVersion[1]) { 45400 return true; 45401 } 45402 45403 if (animVersion[1] > minimum[1]) { 45404 return false; 45405 } 45406 45407 if (minimum[2] > animVersion[2]) { 45408 return true; 45409 } 45410 45411 if (animVersion[2] > minimum[2]) { 45412 return false; 45413 } 45414 45415 return null; 45416 } 45417 45418 var checkText = function () { 45419 var minimumVersion = [4, 4, 14]; 45420 45421 function updateTextLayer(textLayer) { 45422 var documentData = textLayer.t.d; 45423 textLayer.t.d = { 45424 k: [{ 45425 s: documentData, 45426 t: 0 45427 }] 45428 }; 45429 } 45430 45431 function iterateLayers(layers) { 45432 var i; 45433 var len = layers.length; 45434 45435 for (i = 0; i < len; i += 1) { 45436 if (layers[i].ty === 5) { 45437 updateTextLayer(layers[i]); 45438 } 45439 } 45440 } 45441 45442 return function (animationData) { 45443 if (checkVersion(minimumVersion, animationData.v)) { 45444 iterateLayers(animationData.layers); 45445 45446 if (animationData.assets) { 45447 var i; 45448 var len = animationData.assets.length; 45449 45450 for (i = 0; i < len; i += 1) { 45451 if (animationData.assets[i].layers) { 45452 iterateLayers(animationData.assets[i].layers); 45453 } 45454 } 45455 } 45456 } 45457 }; 45458 }(); 45459 45460 var checkChars = function () { 45461 var minimumVersion = [4, 7, 99]; 45462 return function (animationData) { 45463 if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) { 45464 var i; 45465 var len = animationData.chars.length; 45466 45467 for (i = 0; i < len; i += 1) { 45468 var charData = animationData.chars[i]; 45469 45470 if (charData.data && charData.data.shapes) { 45471 completeShapes(charData.data.shapes); 45472 charData.data.ip = 0; 45473 charData.data.op = 99999; 45474 charData.data.st = 0; 45475 charData.data.sr = 1; 45476 charData.data.ks = { 45477 p: { 45478 k: [0, 0], 45479 a: 0 45480 }, 45481 s: { 45482 k: [100, 100], 45483 a: 0 45484 }, 45485 a: { 45486 k: [0, 0], 45487 a: 0 45488 }, 45489 r: { 45490 k: 0, 45491 a: 0 45492 }, 45493 o: { 45494 k: 100, 45495 a: 0 45496 } 45497 }; 45498 45499 if (!animationData.chars[i].t) { 45500 charData.data.shapes.push({ 45501 ty: 'no' 45502 }); 45503 charData.data.shapes[0].it.push({ 45504 p: { 45505 k: [0, 0], 45506 a: 0 45507 }, 45508 s: { 45509 k: [100, 100], 45510 a: 0 45511 }, 45512 a: { 45513 k: [0, 0], 45514 a: 0 45515 }, 45516 r: { 45517 k: 0, 45518 a: 0 45519 }, 45520 o: { 45521 k: 100, 45522 a: 0 45523 }, 45524 sk: { 45525 k: 0, 45526 a: 0 45527 }, 45528 sa: { 45529 k: 0, 45530 a: 0 45531 }, 45532 ty: 'tr' 45533 }); 45534 } 45535 } 45536 } 45537 } 45538 }; 45539 }(); 45540 45541 var checkPathProperties = function () { 45542 var minimumVersion = [5, 7, 15]; 45543 45544 function updateTextLayer(textLayer) { 45545 var pathData = textLayer.t.p; 45546 45547 if (typeof pathData.a === 'number') { 45548 pathData.a = { 45549 a: 0, 45550 k: pathData.a 45551 }; 45552 } 45553 45554 if (typeof pathData.p === 'number') { 45555 pathData.p = { 45556 a: 0, 45557 k: pathData.p 45558 }; 45559 } 45560 45561 if (typeof pathData.r === 'number') { 45562 pathData.r = { 45563 a: 0, 45564 k: pathData.r 45565 }; 45566 } 45567 } 45568 45569 function iterateLayers(layers) { 45570 var i; 45571 var len = layers.length; 45572 45573 for (i = 0; i < len; i += 1) { 45574 if (layers[i].ty === 5) { 45575 updateTextLayer(layers[i]); 45576 } 45577 } 45578 } 45579 45580 return function (animationData) { 45581 if (checkVersion(minimumVersion, animationData.v)) { 45582 iterateLayers(animationData.layers); 45583 45584 if (animationData.assets) { 45585 var i; 45586 var len = animationData.assets.length; 45587 45588 for (i = 0; i < len; i += 1) { 45589 if (animationData.assets[i].layers) { 45590 iterateLayers(animationData.assets[i].layers); 45591 } 45592 } 45593 } 45594 } 45595 }; 45596 }(); 45597 45598 var checkColors = function () { 45599 var minimumVersion = [4, 1, 9]; 45600 45601 function iterateShapes(shapes) { 45602 var i; 45603 var len = shapes.length; 45604 var j; 45605 var jLen; 45606 45607 for (i = 0; i < len; i += 1) { 45608 if (shapes[i].ty === 'gr') { 45609 iterateShapes(shapes[i].it); 45610 } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') { 45611 if (shapes[i].c.k && shapes[i].c.k[0].i) { 45612 jLen = shapes[i].c.k.length; 45613 45614 for (j = 0; j < jLen; j += 1) { 45615 if (shapes[i].c.k[j].s) { 45616 shapes[i].c.k[j].s[0] /= 255; 45617 shapes[i].c.k[j].s[1] /= 255; 45618 shapes[i].c.k[j].s[2] /= 255; 45619 shapes[i].c.k[j].s[3] /= 255; 45620 } 45621 45622 if (shapes[i].c.k[j].e) { 45623 shapes[i].c.k[j].e[0] /= 255; 45624 shapes[i].c.k[j].e[1] /= 255; 45625 shapes[i].c.k[j].e[2] /= 255; 45626 shapes[i].c.k[j].e[3] /= 255; 45627 } 45628 } 45629 } else { 45630 shapes[i].c.k[0] /= 255; 45631 shapes[i].c.k[1] /= 255; 45632 shapes[i].c.k[2] /= 255; 45633 shapes[i].c.k[3] /= 255; 45634 } 45635 } 45636 } 45637 } 45638 45639 function iterateLayers(layers) { 45640 var i; 45641 var len = layers.length; 45642 45643 for (i = 0; i < len; i += 1) { 45644 if (layers[i].ty === 4) { 45645 iterateShapes(layers[i].shapes); 45646 } 45647 } 45648 } 45649 45650 return function (animationData) { 45651 if (checkVersion(minimumVersion, animationData.v)) { 45652 iterateLayers(animationData.layers); 45653 45654 if (animationData.assets) { 45655 var i; 45656 var len = animationData.assets.length; 45657 45658 for (i = 0; i < len; i += 1) { 45659 if (animationData.assets[i].layers) { 45660 iterateLayers(animationData.assets[i].layers); 45661 } 45662 } 45663 } 45664 } 45665 }; 45666 }(); 45667 45668 var checkShapes = function () { 45669 var minimumVersion = [4, 4, 18]; 45670 45671 function completeClosingShapes(arr) { 45672 var i; 45673 var len = arr.length; 45674 var j; 45675 var jLen; 45676 45677 for (i = len - 1; i >= 0; i -= 1) { 45678 if (arr[i].ty === 'sh') { 45679 if (arr[i].ks.k.i) { 45680 arr[i].ks.k.c = arr[i].closed; 45681 } else { 45682 jLen = arr[i].ks.k.length; 45683 45684 for (j = 0; j < jLen; j += 1) { 45685 if (arr[i].ks.k[j].s) { 45686 arr[i].ks.k[j].s[0].c = arr[i].closed; 45687 } 45688 45689 if (arr[i].ks.k[j].e) { 45690 arr[i].ks.k[j].e[0].c = arr[i].closed; 45691 } 45692 } 45693 } 45694 } else if (arr[i].ty === 'gr') { 45695 completeClosingShapes(arr[i].it); 45696 } 45697 } 45698 } 45699 45700 function iterateLayers(layers) { 45701 var layerData; 45702 var i; 45703 var len = layers.length; 45704 var j; 45705 var jLen; 45706 var k; 45707 var kLen; 45708 45709 for (i = 0; i < len; i += 1) { 45710 layerData = layers[i]; 45711 45712 if (layerData.hasMask) { 45713 var maskProps = layerData.masksProperties; 45714 jLen = maskProps.length; 45715 45716 for (j = 0; j < jLen; j += 1) { 45717 if (maskProps[j].pt.k.i) { 45718 maskProps[j].pt.k.c = maskProps[j].cl; 45719 } else { 45720 kLen = maskProps[j].pt.k.length; 45721 45722 for (k = 0; k < kLen; k += 1) { 45723 if (maskProps[j].pt.k[k].s) { 45724 maskProps[j].pt.k[k].s[0].c = maskProps[j].cl; 45725 } 45726 45727 if (maskProps[j].pt.k[k].e) { 45728 maskProps[j].pt.k[k].e[0].c = maskProps[j].cl; 45729 } 45730 } 45731 } 45732 } 45733 } 45734 45735 if (layerData.ty === 4) { 45736 completeClosingShapes(layerData.shapes); 45737 } 45738 } 45739 } 45740 45741 return function (animationData) { 45742 if (checkVersion(minimumVersion, animationData.v)) { 45743 iterateLayers(animationData.layers); 45744 45745 if (animationData.assets) { 45746 var i; 45747 var len = animationData.assets.length; 45748 45749 for (i = 0; i < len; i += 1) { 45750 if (animationData.assets[i].layers) { 45751 iterateLayers(animationData.assets[i].layers); 45752 } 45753 } 45754 } 45755 } 45756 }; 45757 }(); 45758 45759 function completeData(animationData) { 45760 if (animationData.__complete) { 45761 return; 45762 } 45763 45764 checkColors(animationData); 45765 checkText(animationData); 45766 checkChars(animationData); 45767 checkPathProperties(animationData); 45768 checkShapes(animationData); 45769 completeLayers(animationData.layers, animationData.assets); 45770 completeChars(animationData.chars, animationData.assets); 45771 animationData.__complete = true; 45772 } 45773 45774 function completeText(data) { 45775 if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true; 45776 } 45777 } 45778 45779 var moduleOb = {}; 45780 moduleOb.completeData = completeData; 45781 moduleOb.checkColors = checkColors; 45782 moduleOb.checkChars = checkChars; 45783 moduleOb.checkPathProperties = checkPathProperties; 45784 moduleOb.checkShapes = checkShapes; 45785 moduleOb.completeLayers = completeLayers; 45786 return moduleOb; 45787 } 45788 45789 if (!_workerSelf.dataManager) { 45790 _workerSelf.dataManager = dataFunctionManager(); 45791 } 45792 45793 if (!_workerSelf.assetLoader) { 45794 _workerSelf.assetLoader = function () { 45795 function formatResponse(xhr) { 45796 // using typeof doubles the time of execution of this method, 45797 // so if available, it's better to use the header to validate the type 45798 var contentTypeHeader = xhr.getResponseHeader('content-type'); 45799 45800 if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) { 45801 return xhr.response; 45802 } 45803 45804 if (xhr.response && _typeof$5(xhr.response) === 'object') { 45805 return xhr.response; 45806 } 45807 45808 if (xhr.response && typeof xhr.response === 'string') { 45809 return JSON.parse(xhr.response); 45810 } 45811 45812 if (xhr.responseText) { 45813 return JSON.parse(xhr.responseText); 45814 } 45815 45816 return null; 45817 } 45818 45819 function loadAsset(path, fullPath, callback, errorCallback) { 45820 var response; 45821 var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break. 45822 45823 try { 45824 // This crashes on Android WebView prior to KitKat 45825 xhr.responseType = 'json'; 45826 } catch (err) {} // eslint-disable-line no-empty 45827 45828 45829 xhr.onreadystatechange = function () { 45830 if (xhr.readyState === 4) { 45831 if (xhr.status === 200) { 45832 response = formatResponse(xhr); 45833 callback(response); 45834 } else { 45835 try { 45836 response = formatResponse(xhr); 45837 callback(response); 45838 } catch (err) { 45839 if (errorCallback) { 45840 errorCallback(err); 45841 } 45842 } 45843 } 45844 } 45845 }; 45846 45847 try { 45848 // Hack to workaround banner validation 45849 xhr.open(['G', 'E', 'T'].join(''), path, true); 45850 } catch (error) { 45851 // Hack to workaround banner validation 45852 xhr.open(['G', 'E', 'T'].join(''), fullPath + '/' + path, true); 45853 } 45854 45855 xhr.send(); 45856 } 45857 45858 return { 45859 load: loadAsset 45860 }; 45861 }(); 45862 } 45863 45864 if (e.data.type === 'loadAnimation') { 45865 _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) { 45866 _workerSelf.dataManager.completeData(data); 45867 45868 _workerSelf.postMessage({ 45869 id: e.data.id, 45870 payload: data, 45871 status: 'success' 45872 }); 45873 }, function () { 45874 _workerSelf.postMessage({ 45875 id: e.data.id, 45876 status: 'error' 45877 }); 45878 }); 45879 } else if (e.data.type === 'complete') { 45880 var animation = e.data.animation; 45881 45882 _workerSelf.dataManager.completeData(animation); 45883 45884 _workerSelf.postMessage({ 45885 id: e.data.id, 45886 payload: animation, 45887 status: 'success' 45888 }); 45889 } else if (e.data.type === 'loadData') { 45890 _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) { 45891 _workerSelf.postMessage({ 45892 id: e.data.id, 45893 payload: data, 45894 status: 'success' 45895 }); 45896 }, function () { 45897 _workerSelf.postMessage({ 45898 id: e.data.id, 45899 status: 'error' 45900 }); 45901 }); 45902 } 45903 }); 45904 45905 workerInstance.onmessage = function (event) { 45906 var data = event.data; 45907 var id = data.id; 45908 var process = processes[id]; 45909 processes[id] = null; 45910 45911 if (data.status === 'success') { 45912 process.onComplete(data.payload); 45913 } else if (process.onError) { 45914 process.onError(); 45915 } 45916 }; 45917 } 45918 } 45919 45920 function createProcess(onComplete, onError) { 45921 _counterId += 1; 45922 var id = 'processId_' + _counterId; 45923 processes[id] = { 45924 onComplete: onComplete, 45925 onError: onError 45926 }; 45927 return id; 45928 } 45929 45930 function loadAnimation(path, onComplete, onError) { 45931 setupWorker(); 45932 var processId = createProcess(onComplete, onError); 45933 workerInstance.postMessage({ 45934 type: 'loadAnimation', 45935 path: path, 45936 fullPath: window.location.origin + window.location.pathname, 45937 id: processId 45938 }); 45939 } 45940 45941 function loadData(path, onComplete, onError) { 45942 setupWorker(); 45943 var processId = createProcess(onComplete, onError); 45944 workerInstance.postMessage({ 45945 type: 'loadData', 45946 path: path, 45947 fullPath: window.location.origin + window.location.pathname, 45948 id: processId 45949 }); 45950 } 45951 45952 function completeAnimation(anim, onComplete, onError) { 45953 setupWorker(); 45954 var processId = createProcess(onComplete, onError); 45955 workerInstance.postMessage({ 45956 type: 'complete', 45957 animation: anim, 45958 id: processId 45959 }); 45960 } 45961 45962 return { 45963 loadAnimation: loadAnimation, 45964 loadData: loadData, 45965 completeAnimation: completeAnimation 45966 }; 45967 }(); 45968 45969 var ImagePreloader = function () { 45970 var proxyImage = function () { 45971 var canvas = createTag('canvas'); 45972 canvas.width = 1; 45973 canvas.height = 1; 45974 var ctx = canvas.getContext('2d'); 45975 ctx.fillStyle = 'rgba(0,0,0,0)'; 45976 ctx.fillRect(0, 0, 1, 1); 45977 return canvas; 45978 }(); 45979 45980 function imageLoaded() { 45981 this.loadedAssets += 1; 45982 45983 if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) { 45984 if (this.imagesLoadedCb) { 45985 this.imagesLoadedCb(null); 45986 } 45987 } 45988 } 45989 45990 function footageLoaded() { 45991 this.loadedFootagesCount += 1; 45992 45993 if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) { 45994 if (this.imagesLoadedCb) { 45995 this.imagesLoadedCb(null); 45996 } 45997 } 45998 } 45999 46000 function getAssetsPath(assetData, assetsPath, originalPath) { 46001 var path = ''; 46002 46003 if (assetData.e) { 46004 path = assetData.p; 46005 } else if (assetsPath) { 46006 var imagePath = assetData.p; 46007 46008 if (imagePath.indexOf('images/') !== -1) { 46009 imagePath = imagePath.split('/')[1]; 46010 } 46011 46012 path = assetsPath + imagePath; 46013 } else { 46014 path = originalPath; 46015 path += assetData.u ? assetData.u : ''; 46016 path += assetData.p; 46017 } 46018 46019 return path; 46020 } 46021 46022 function testImageLoaded(img) { 46023 var _count = 0; 46024 var intervalId = setInterval(function () { 46025 var box = img.getBBox(); 46026 46027 if (box.width || _count > 500) { 46028 this._imageLoaded(); 46029 46030 clearInterval(intervalId); 46031 } 46032 46033 _count += 1; 46034 }.bind(this), 50); 46035 } 46036 46037 function createImageData(assetData) { 46038 var path = getAssetsPath(assetData, this.assetsPath, this.path); 46039 var img = createNS('image'); 46040 46041 if (isSafari) { 46042 this.testImageLoaded(img); 46043 } else { 46044 img.addEventListener('load', this._imageLoaded, false); 46045 } 46046 46047 img.addEventListener('error', function () { 46048 ob.img = proxyImage; 46049 46050 this._imageLoaded(); 46051 }.bind(this), false); 46052 img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path); 46053 46054 if (this._elementHelper.append) { 46055 this._elementHelper.append(img); 46056 } else { 46057 this._elementHelper.appendChild(img); 46058 } 46059 46060 var ob = { 46061 img: img, 46062 assetData: assetData 46063 }; 46064 return ob; 46065 } 46066 46067 function createImgData(assetData) { 46068 var path = getAssetsPath(assetData, this.assetsPath, this.path); 46069 var img = createTag('img'); 46070 img.crossOrigin = 'anonymous'; 46071 img.addEventListener('load', this._imageLoaded, false); 46072 img.addEventListener('error', function () { 46073 ob.img = proxyImage; 46074 46075 this._imageLoaded(); 46076 }.bind(this), false); 46077 img.src = path; 46078 var ob = { 46079 img: img, 46080 assetData: assetData 46081 }; 46082 return ob; 46083 } 46084 46085 function createFootageData(data) { 46086 var ob = { 46087 assetData: data 46088 }; 46089 var path = getAssetsPath(data, this.assetsPath, this.path); 46090 dataManager.loadData(path, function (footageData) { 46091 ob.img = footageData; 46092 46093 this._footageLoaded(); 46094 }.bind(this), function () { 46095 ob.img = {}; 46096 46097 this._footageLoaded(); 46098 }.bind(this)); 46099 return ob; 46100 } 46101 46102 function loadAssets(assets, cb) { 46103 this.imagesLoadedCb = cb; 46104 var i; 46105 var len = assets.length; 46106 46107 for (i = 0; i < len; i += 1) { 46108 if (!assets[i].layers) { 46109 if (!assets[i].t || assets[i].t === 'seq') { 46110 this.totalImages += 1; 46111 this.images.push(this._createImageData(assets[i])); 46112 } else if (assets[i].t === 3) { 46113 this.totalFootages += 1; 46114 this.images.push(this.createFootageData(assets[i])); 46115 } 46116 } 46117 } 46118 } 46119 46120 function setPath(path) { 46121 this.path = path || ''; 46122 } 46123 46124 function setAssetsPath(path) { 46125 this.assetsPath = path || ''; 46126 } 46127 46128 function getAsset(assetData) { 46129 var i = 0; 46130 var len = this.images.length; 46131 46132 while (i < len) { 46133 if (this.images[i].assetData === assetData) { 46134 return this.images[i].img; 46135 } 46136 46137 i += 1; 46138 } 46139 46140 return null; 46141 } 46142 46143 function destroy() { 46144 this.imagesLoadedCb = null; 46145 this.images.length = 0; 46146 } 46147 46148 function loadedImages() { 46149 return this.totalImages === this.loadedAssets; 46150 } 46151 46152 function loadedFootages() { 46153 return this.totalFootages === this.loadedFootagesCount; 46154 } 46155 46156 function setCacheType(type, elementHelper) { 46157 if (type === 'svg') { 46158 this._elementHelper = elementHelper; 46159 this._createImageData = this.createImageData.bind(this); 46160 } else { 46161 this._createImageData = this.createImgData.bind(this); 46162 } 46163 } 46164 46165 function ImagePreloaderFactory() { 46166 this._imageLoaded = imageLoaded.bind(this); 46167 this._footageLoaded = footageLoaded.bind(this); 46168 this.testImageLoaded = testImageLoaded.bind(this); 46169 this.createFootageData = createFootageData.bind(this); 46170 this.assetsPath = ''; 46171 this.path = ''; 46172 this.totalImages = 0; 46173 this.totalFootages = 0; 46174 this.loadedAssets = 0; 46175 this.loadedFootagesCount = 0; 46176 this.imagesLoadedCb = null; 46177 this.images = []; 46178 } 46179 46180 ImagePreloaderFactory.prototype = { 46181 loadAssets: loadAssets, 46182 setAssetsPath: setAssetsPath, 46183 setPath: setPath, 46184 loadedImages: loadedImages, 46185 loadedFootages: loadedFootages, 46186 destroy: destroy, 46187 getAsset: getAsset, 46188 createImgData: createImgData, 46189 createImageData: createImageData, 46190 imageLoaded: imageLoaded, 46191 footageLoaded: footageLoaded, 46192 setCacheType: setCacheType 46193 }; 46194 return ImagePreloaderFactory; 46195 }(); 46196 46197 function BaseEvent() {} 46198 46199 BaseEvent.prototype = { 46200 triggerEvent: function triggerEvent(eventName, args) { 46201 if (this._cbs[eventName]) { 46202 var callbacks = this._cbs[eventName]; 46203 46204 for (var i = 0; i < callbacks.length; i += 1) { 46205 callbacks[i](args); 46206 } 46207 } 46208 }, 46209 addEventListener: function addEventListener(eventName, callback) { 46210 if (!this._cbs[eventName]) { 46211 this._cbs[eventName] = []; 46212 } 46213 46214 this._cbs[eventName].push(callback); 46215 46216 return function () { 46217 this.removeEventListener(eventName, callback); 46218 }.bind(this); 46219 }, 46220 removeEventListener: function removeEventListener(eventName, callback) { 46221 if (!callback) { 46222 this._cbs[eventName] = null; 46223 } else if (this._cbs[eventName]) { 46224 var i = 0; 46225 var len = this._cbs[eventName].length; 46226 46227 while (i < len) { 46228 if (this._cbs[eventName][i] === callback) { 46229 this._cbs[eventName].splice(i, 1); 46230 46231 i -= 1; 46232 len -= 1; 46233 } 46234 46235 i += 1; 46236 } 46237 46238 if (!this._cbs[eventName].length) { 46239 this._cbs[eventName] = null; 46240 } 46241 } 46242 } 46243 }; 46244 46245 var markerParser = function () { 46246 function parsePayloadLines(payload) { 46247 var lines = payload.split('\r\n'); 46248 var keys = {}; 46249 var line; 46250 var keysCount = 0; 46251 46252 for (var i = 0; i < lines.length; i += 1) { 46253 line = lines[i].split(':'); 46254 46255 if (line.length === 2) { 46256 keys[line[0]] = line[1].trim(); 46257 keysCount += 1; 46258 } 46259 } 46260 46261 if (keysCount === 0) { 46262 throw new Error(); 46263 } 46264 46265 return keys; 46266 } 46267 46268 return function (_markers) { 46269 var markers = []; 46270 46271 for (var i = 0; i < _markers.length; i += 1) { 46272 var _marker = _markers[i]; 46273 var markerData = { 46274 time: _marker.tm, 46275 duration: _marker.dr 46276 }; 46277 46278 try { 46279 markerData.payload = JSON.parse(_markers[i].cm); 46280 } catch (_) { 46281 try { 46282 markerData.payload = parsePayloadLines(_markers[i].cm); 46283 } catch (__) { 46284 markerData.payload = { 46285 name: _markers[i].cm 46286 }; 46287 } 46288 } 46289 46290 markers.push(markerData); 46291 } 46292 46293 return markers; 46294 }; 46295 }(); 46296 46297 var ProjectInterface = function () { 46298 function registerComposition(comp) { 46299 this.compositions.push(comp); 46300 } 46301 46302 return function () { 46303 function _thisProjectFunction(name) { 46304 var i = 0; 46305 var len = this.compositions.length; 46306 46307 while (i < len) { 46308 if (this.compositions[i].data && this.compositions[i].data.nm === name) { 46309 if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) { 46310 this.compositions[i].prepareFrame(this.currentFrame); 46311 } 46312 46313 return this.compositions[i].compInterface; 46314 } 46315 46316 i += 1; 46317 } 46318 46319 return null; 46320 } 46321 46322 _thisProjectFunction.compositions = []; 46323 _thisProjectFunction.currentFrame = 0; 46324 _thisProjectFunction.registerComposition = registerComposition; 46325 return _thisProjectFunction; 46326 }; 46327 }(); 46328 46329 var renderers = {}; 46330 46331 var registerRenderer = function registerRenderer(key, value) { 46332 renderers[key] = value; 46333 }; 46334 46335 function getRenderer(key) { 46336 return renderers[key]; 46337 } 46338 46339 function getRegisteredRenderer() { 46340 // Returns canvas by default for compatibility 46341 if (renderers.canvas) { 46342 return 'canvas'; 46343 } // Returns any renderer that is registered 46344 46345 46346 for (var key in renderers) { 46347 if (renderers[key]) { 46348 return key; 46349 } 46350 } 46351 46352 return ''; 46353 } 46354 46355 function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); } 46356 46357 var AnimationItem = function AnimationItem() { 46358 this._cbs = []; 46359 this.name = ''; 46360 this.path = ''; 46361 this.isLoaded = false; 46362 this.currentFrame = 0; 46363 this.currentRawFrame = 0; 46364 this.firstFrame = 0; 46365 this.totalFrames = 0; 46366 this.frameRate = 0; 46367 this.frameMult = 0; 46368 this.playSpeed = 1; 46369 this.playDirection = 1; 46370 this.playCount = 0; 46371 this.animationData = {}; 46372 this.assets = []; 46373 this.isPaused = true; 46374 this.autoplay = false; 46375 this.loop = true; 46376 this.renderer = null; 46377 this.animationID = createElementID(); 46378 this.assetsPath = ''; 46379 this.timeCompleted = 0; 46380 this.segmentPos = 0; 46381 this.isSubframeEnabled = getSubframeEnabled(); 46382 this.segments = []; 46383 this._idle = true; 46384 this._completedLoop = false; 46385 this.projectInterface = ProjectInterface(); 46386 this.imagePreloader = new ImagePreloader(); 46387 this.audioController = audioControllerFactory(); 46388 this.markers = []; 46389 this.configAnimation = this.configAnimation.bind(this); 46390 this.onSetupError = this.onSetupError.bind(this); 46391 this.onSegmentComplete = this.onSegmentComplete.bind(this); 46392 this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0); 46393 this.expressionsPlugin = getExpressionsPlugin(); 46394 }; 46395 46396 extendPrototype([BaseEvent], AnimationItem); 46397 46398 AnimationItem.prototype.setParams = function (params) { 46399 if (params.wrapper || params.container) { 46400 this.wrapper = params.wrapper || params.container; 46401 } 46402 46403 var animType = 'svg'; 46404 46405 if (params.animType) { 46406 animType = params.animType; 46407 } else if (params.renderer) { 46408 animType = params.renderer; 46409 } 46410 46411 var RendererClass = getRenderer(animType); 46412 this.renderer = new RendererClass(this, params.rendererSettings); 46413 this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs); 46414 this.renderer.setProjectInterface(this.projectInterface); 46415 this.animType = animType; 46416 46417 if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) { 46418 this.loop = true; 46419 } else if (params.loop === false) { 46420 this.loop = false; 46421 } else { 46422 this.loop = parseInt(params.loop, 10); 46423 } 46424 46425 this.autoplay = 'autoplay' in params ? params.autoplay : true; 46426 this.name = params.name ? params.name : ''; 46427 this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true; 46428 this.assetsPath = params.assetsPath; 46429 this.initialSegment = params.initialSegment; 46430 46431 if (params.audioFactory) { 46432 this.audioController.setAudioFactory(params.audioFactory); 46433 } 46434 46435 if (params.animationData) { 46436 this.setupAnimation(params.animationData); 46437 } else if (params.path) { 46438 if (params.path.lastIndexOf('\\') !== -1) { 46439 this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1); 46440 } else { 46441 this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1); 46442 } 46443 46444 this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1); 46445 this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json')); 46446 dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError); 46447 } 46448 }; 46449 46450 AnimationItem.prototype.onSetupError = function () { 46451 this.trigger('data_failed'); 46452 }; 46453 46454 AnimationItem.prototype.setupAnimation = function (data) { 46455 dataManager.completeAnimation(data, this.configAnimation); 46456 }; 46457 46458 AnimationItem.prototype.setData = function (wrapper, animationData) { 46459 if (animationData) { 46460 if (_typeof$4(animationData) !== 'object') { 46461 animationData = JSON.parse(animationData); 46462 } 46463 } 46464 46465 var params = { 46466 wrapper: wrapper, 46467 animationData: animationData 46468 }; 46469 var wrapperAttributes = wrapper.attributes; 46470 params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary 46471 ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary 46472 ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : ''; 46473 params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary 46474 ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary 46475 ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary 46476 ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary 46477 ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : getRegisteredRenderer() || 'canvas'; 46478 var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary 46479 ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary 46480 ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : ''; 46481 46482 if (loop === 'false') { 46483 params.loop = false;
vendor: 1,550 bytes, lines 46484-46502
46484 } else if (loop === 'true') { 46485 params.loop = true; 46486 } else if (loop !== '') { 46487 params.loop = parseInt(loop, 10); 46488 } 46489 46490 var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary 46491 ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary 46492 ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true; 46493 params.autoplay = autoplay !== 'false'; 46494 params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary 46495 ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary 46496 ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : ''; 46497 var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary 46498 ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary 46499 ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : ''; 46500 46501 if (prerender === 'false') { 46502 params.prerender = false;
vendor: 5,859 bytes, lines 46503-46710
46503 } 46504 46505 if (!params.path) { 46506 this.trigger('destroy'); 46507 } else { 46508 this.setParams(params); 46509 } 46510 }; 46511 46512 AnimationItem.prototype.includeLayers = function (data) { 46513 if (data.op > this.animationData.op) { 46514 this.animationData.op = data.op; 46515 this.totalFrames = Math.floor(data.op - this.animationData.ip); 46516 } 46517 46518 var layers = this.animationData.layers; 46519 var i; 46520 var len = layers.length; 46521 var newLayers = data.layers; 46522 var j; 46523 var jLen = newLayers.length; 46524 46525 for (j = 0; j < jLen; j += 1) { 46526 i = 0; 46527 46528 while (i < len) { 46529 if (layers[i].id === newLayers[j].id) { 46530 layers[i] = newLayers[j]; 46531 break; 46532 } 46533 46534 i += 1; 46535 } 46536 } 46537 46538 if (data.chars || data.fonts) { 46539 this.renderer.globalData.fontManager.addChars(data.chars); 46540 this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs); 46541 } 46542 46543 if (data.assets) { 46544 len = data.assets.length; 46545 46546 for (i = 0; i < len; i += 1) { 46547 this.animationData.assets.push(data.assets[i]); 46548 } 46549 } 46550 46551 this.animationData.__complete = false; 46552 dataManager.completeAnimation(this.animationData, this.onSegmentComplete); 46553 }; 46554 46555 AnimationItem.prototype.onSegmentComplete = function (data) { 46556 this.animationData = data; 46557 var expressionsPlugin = getExpressionsPlugin(); 46558 46559 if (expressionsPlugin) { 46560 expressionsPlugin.initExpressions(this); 46561 } 46562 46563 this.loadNextSegment(); 46564 }; 46565 46566 AnimationItem.prototype.loadNextSegment = function () { 46567 var segments = this.animationData.segments; 46568 46569 if (!segments || segments.length === 0 || !this.autoloadSegments) { 46570 this.trigger('data_ready'); 46571 this.timeCompleted = this.totalFrames; 46572 return; 46573 } 46574 46575 var segment = segments.shift(); 46576 this.timeCompleted = segment.time * this.frameRate; 46577 var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json'; 46578 this.segmentPos += 1; 46579 dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () { 46580 this.trigger('data_failed'); 46581 }.bind(this)); 46582 }; 46583 46584 AnimationItem.prototype.loadSegments = function () { 46585 var segments = this.animationData.segments; 46586 46587 if (!segments) { 46588 this.timeCompleted = this.totalFrames; 46589 } 46590 46591 this.loadNextSegment(); 46592 }; 46593 46594 AnimationItem.prototype.imagesLoaded = function () { 46595 this.trigger('loaded_images'); 46596 this.checkLoaded(); 46597 }; 46598 46599 AnimationItem.prototype.preloadImages = function () { 46600 this.imagePreloader.setAssetsPath(this.assetsPath); 46601 this.imagePreloader.setPath(this.path); 46602 this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this)); 46603 }; 46604 46605 AnimationItem.prototype.configAnimation = function (animData) { 46606 if (!this.renderer) { 46607 return; 46608 } 46609 46610 try { 46611 this.animationData = animData; 46612 46613 if (this.initialSegment) { 46614 this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]); 46615 this.firstFrame = Math.round(this.initialSegment[0]); 46616 } else { 46617 this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip); 46618 this.firstFrame = Math.round(this.animationData.ip); 46619 } 46620 46621 this.renderer.configAnimation(animData); 46622 46623 if (!animData.assets) { 46624 animData.assets = []; 46625 } 46626 46627 this.assets = this.animationData.assets; 46628 this.frameRate = this.animationData.fr; 46629 this.frameMult = this.animationData.fr / 1000; 46630 this.renderer.searchExtraCompositions(animData.assets); 46631 this.markers = markerParser(animData.markers || []); 46632 this.trigger('config_ready'); 46633 this.preloadImages(); 46634 this.loadSegments(); 46635 this.updaFrameModifier(); 46636 this.waitForFontsLoaded(); 46637 46638 if (this.isPaused) { 46639 this.audioController.pause(); 46640 } 46641 } catch (error) { 46642 this.triggerConfigError(error); 46643 } 46644 }; 46645 46646 AnimationItem.prototype.waitForFontsLoaded = function () { 46647 if (!this.renderer) { 46648 return; 46649 } 46650 46651 if (this.renderer.globalData.fontManager.isLoaded) { 46652 this.checkLoaded(); 46653 } else { 46654 setTimeout(this.waitForFontsLoaded.bind(this), 20); 46655 } 46656 }; 46657 46658 AnimationItem.prototype.checkLoaded = function () { 46659 if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) { 46660 this.isLoaded = true; 46661 var expressionsPlugin = getExpressionsPlugin(); 46662 46663 if (expressionsPlugin) { 46664 expressionsPlugin.initExpressions(this); 46665 } 46666 46667 this.renderer.initItems(); 46668 setTimeout(function () { 46669 this.trigger('DOMLoaded'); 46670 }.bind(this), 0); 46671 this.gotoFrame(); 46672 46673 if (this.autoplay) { 46674 this.play(); 46675 } 46676 } 46677 }; 46678 46679 AnimationItem.prototype.resize = function (width, height) { 46680 // Adding this validation for backwards compatibility in case an event object was being passed down 46681 var _width = typeof width === 'number' ? width : undefined; 46682 46683 var _height = typeof height === 'number' ? height : undefined; 46684 46685 this.renderer.updateContainerSize(_width, _height); 46686 }; 46687 46688 AnimationItem.prototype.setSubframe = function (flag) { 46689 this.isSubframeEnabled = !!flag; 46690 }; 46691 46692 AnimationItem.prototype.gotoFrame = function () { 46693 this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise 46694 46695 if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) { 46696 this.currentFrame = this.timeCompleted; 46697 } 46698 46699 this.trigger('enterFrame'); 46700 this.renderFrame(); 46701 this.trigger('drawnFrame'); 46702 }; 46703 46704 AnimationItem.prototype.renderFrame = function () { 46705 if (this.isLoaded === false || !this.renderer) { 46706 return; 46707 } 46708 46709 try { 46710 if (this.expressionsPlugin) {
vendor: 3,102 bytes, lines 46711-46842
46711 this.expressionsPlugin.resetFrame(); 46712 } 46713 46714 this.renderer.renderFrame(this.currentFrame + this.firstFrame); 46715 } catch (error) { 46716 this.triggerRenderFrameError(error); 46717 } 46718 }; 46719 46720 AnimationItem.prototype.play = function (name) { 46721 if (name && this.name !== name) { 46722 return; 46723 } 46724 46725 if (this.isPaused === true) { 46726 this.isPaused = false; 46727 this.trigger('_play'); 46728 this.audioController.resume(); 46729 46730 if (this._idle) { 46731 this._idle = false; 46732 this.trigger('_active'); 46733 } 46734 } 46735 }; 46736 46737 AnimationItem.prototype.pause = function (name) { 46738 if (name && this.name !== name) { 46739 return; 46740 } 46741 46742 if (this.isPaused === false) { 46743 this.isPaused = true; 46744 this.trigger('_pause'); 46745 this._idle = true; 46746 this.trigger('_idle'); 46747 this.audioController.pause(); 46748 } 46749 }; 46750 46751 AnimationItem.prototype.togglePause = function (name) { 46752 if (name && this.name !== name) { 46753 return; 46754 } 46755 46756 if (this.isPaused === true) { 46757 this.play(); 46758 } else { 46759 this.pause(); 46760 } 46761 }; 46762 46763 AnimationItem.prototype.stop = function (name) { 46764 if (name && this.name !== name) { 46765 return; 46766 } 46767 46768 this.pause(); 46769 this.playCount = 0; 46770 this._completedLoop = false; 46771 this.setCurrentRawFrameValue(0); 46772 }; 46773 46774 AnimationItem.prototype.getMarkerData = function (markerName) { 46775 var marker; 46776 46777 for (var i = 0; i < this.markers.length; i += 1) { 46778 marker = this.markers[i]; 46779 46780 if (marker.payload && marker.payload.name === markerName) { 46781 return marker; 46782 } 46783 } 46784 46785 return null; 46786 }; 46787 46788 AnimationItem.prototype.goToAndStop = function (value, isFrame, name) { 46789 if (name && this.name !== name) { 46790 return; 46791 } 46792 46793 var numValue = Number(value); 46794 46795 if (isNaN(numValue)) { 46796 var marker = this.getMarkerData(value); 46797 46798 if (marker) { 46799 this.goToAndStop(marker.time, true); 46800 } 46801 } else if (isFrame) { 46802 this.setCurrentRawFrameValue(value); 46803 } else { 46804 this.setCurrentRawFrameValue(value * this.frameModifier); 46805 } 46806 46807 this.pause(); 46808 }; 46809 46810 AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) { 46811 if (name && this.name !== name) { 46812 return; 46813 } 46814 46815 var numValue = Number(value); 46816 46817 if (isNaN(numValue)) { 46818 var marker = this.getMarkerData(value); 46819 46820 if (marker) { 46821 if (!marker.duration) { 46822 this.goToAndStop(marker.time, true); 46823 } else { 46824 this.playSegments([marker.time, marker.time + marker.duration], true); 46825 } 46826 } 46827 } else { 46828 this.goToAndStop(numValue, isFrame, name); 46829 } 46830 46831 this.play(); 46832 }; 46833 46834 AnimationItem.prototype.advanceTime = function (value) { 46835 if (this.isPaused === true || this.isLoaded === false) { 46836 return; 46837 } 46838 46839 var nextValue = this.currentRawFrame + value * this.frameModifier; 46840 var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations. 46841 // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop. 46842
vendor: 4,331 bytes, lines 46843-47003
46843 if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) { 46844 if (!this.loop || this.playCount === this.loop) { 46845 if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) { 46846 _isComplete = true; 46847 nextValue = this.totalFrames - 1; 46848 } 46849 } else if (nextValue >= this.totalFrames) { 46850 this.playCount += 1; 46851 46852 if (!this.checkSegments(nextValue % this.totalFrames)) { 46853 this.setCurrentRawFrameValue(nextValue % this.totalFrames); 46854 this._completedLoop = true; 46855 this.trigger('loopComplete'); 46856 } 46857 } else { 46858 this.setCurrentRawFrameValue(nextValue); 46859 } 46860 } else if (nextValue < 0) { 46861 if (!this.checkSegments(nextValue % this.totalFrames)) { 46862 if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { 46863 // eslint-disable-line no-plusplus 46864 this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames); 46865 46866 if (!this._completedLoop) { 46867 this._completedLoop = true; 46868 } else { 46869 this.trigger('loopComplete'); 46870 } 46871 } else { 46872 _isComplete = true; 46873 nextValue = 0; 46874 } 46875 } 46876 } else { 46877 this.setCurrentRawFrameValue(nextValue); 46878 } 46879 46880 if (_isComplete) { 46881 this.setCurrentRawFrameValue(nextValue); 46882 this.pause(); 46883 this.trigger('complete'); 46884 } 46885 }; 46886 46887 AnimationItem.prototype.adjustSegment = function (arr, offset) { 46888 this.playCount = 0; 46889 46890 if (arr[1] < arr[0]) { 46891 if (this.frameModifier > 0) { 46892 if (this.playSpeed < 0) { 46893 this.setSpeed(-this.playSpeed); 46894 } else { 46895 this.setDirection(-1); 46896 } 46897 } 46898 46899 this.totalFrames = arr[0] - arr[1]; 46900 this.timeCompleted = this.totalFrames; 46901 this.firstFrame = arr[1]; 46902 this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset); 46903 } else if (arr[1] > arr[0]) { 46904 if (this.frameModifier < 0) { 46905 if (this.playSpeed < 0) { 46906 this.setSpeed(-this.playSpeed); 46907 } else { 46908 this.setDirection(1); 46909 } 46910 } 46911 46912 this.totalFrames = arr[1] - arr[0]; 46913 this.timeCompleted = this.totalFrames; 46914 this.firstFrame = arr[0]; 46915 this.setCurrentRawFrameValue(0.001 + offset); 46916 } 46917 46918 this.trigger('segmentStart'); 46919 }; 46920 46921 AnimationItem.prototype.setSegment = function (init, end) { 46922 var pendingFrame = -1; 46923 46924 if (this.isPaused) { 46925 if (this.currentRawFrame + this.firstFrame < init) { 46926 pendingFrame = init; 46927 } else if (this.currentRawFrame + this.firstFrame > end) { 46928 pendingFrame = end - init; 46929 } 46930 } 46931 46932 this.firstFrame = init; 46933 this.totalFrames = end - init; 46934 this.timeCompleted = this.totalFrames; 46935 46936 if (pendingFrame !== -1) { 46937 this.goToAndStop(pendingFrame, true); 46938 } 46939 }; 46940 46941 AnimationItem.prototype.playSegments = function (arr, forceFlag) { 46942 if (forceFlag) { 46943 this.segments.length = 0; 46944 } 46945 46946 if (_typeof$4(arr[0]) === 'object') { 46947 var i; 46948 var len = arr.length; 46949 46950 for (i = 0; i < len; i += 1) { 46951 this.segments.push(arr[i]); 46952 } 46953 } else { 46954 this.segments.push(arr); 46955 } 46956 46957 if (this.segments.length && forceFlag) { 46958 this.adjustSegment(this.segments.shift(), 0); 46959 } 46960 46961 if (this.isPaused) { 46962 this.play(); 46963 } 46964 }; 46965 46966 AnimationItem.prototype.resetSegments = function (forceFlag) { 46967 this.segments.length = 0; 46968 this.segments.push([this.animationData.ip, this.animationData.op]); 46969 46970 if (forceFlag) { 46971 this.checkSegments(0); 46972 } 46973 }; 46974 46975 AnimationItem.prototype.checkSegments = function (offset) { 46976 if (this.segments.length) { 46977 this.adjustSegment(this.segments.shift(), offset); 46978 return true; 46979 } 46980 46981 return false; 46982 }; 46983 46984 AnimationItem.prototype.destroy = function (name) { 46985 if (name && this.name !== name || !this.renderer) { 46986 return; 46987 } 46988 46989 this.renderer.destroy(); 46990 this.imagePreloader.destroy(); 46991 this.trigger('destroy'); 46992 this._cbs = null; 46993 this.onEnterFrame = null; 46994 this.onLoopComplete = null; 46995 this.onComplete = null; 46996 this.onSegmentStart = null; 46997 this.onDestroy = null; 46998 this.renderer = null; 46999 this.expressionsPlugin = null; 47000 this.imagePreloader = null; 47001 this.projectInterface = null; 47002 }; 47003
vendor: 4,624 bytes, lines 47004-47172
47004 AnimationItem.prototype.setCurrentRawFrameValue = function (value) { 47005 this.currentRawFrame = value; 47006 this.gotoFrame(); 47007 }; 47008 47009 AnimationItem.prototype.setSpeed = function (val) { 47010 this.playSpeed = val; 47011 this.updaFrameModifier(); 47012 }; 47013 47014 AnimationItem.prototype.setDirection = function (val) { 47015 this.playDirection = val < 0 ? -1 : 1; 47016 this.updaFrameModifier(); 47017 }; 47018 47019 AnimationItem.prototype.setLoop = function (isLooping) { 47020 this.loop = isLooping; 47021 }; 47022 47023 AnimationItem.prototype.setVolume = function (val, name) { 47024 if (name && this.name !== name) { 47025 return; 47026 } 47027 47028 this.audioController.setVolume(val); 47029 }; 47030 47031 AnimationItem.prototype.getVolume = function () { 47032 return this.audioController.getVolume(); 47033 }; 47034 47035 AnimationItem.prototype.mute = function (name) { 47036 if (name && this.name !== name) { 47037 return; 47038 } 47039 47040 this.audioController.mute(); 47041 }; 47042 47043 AnimationItem.prototype.unmute = function (name) { 47044 if (name && this.name !== name) { 47045 return; 47046 } 47047 47048 this.audioController.unmute(); 47049 }; 47050 47051 AnimationItem.prototype.updaFrameModifier = function () { 47052 this.frameModifier = this.frameMult * this.playSpeed * this.playDirection; 47053 this.audioController.setRate(this.playSpeed * this.playDirection); 47054 }; 47055 47056 AnimationItem.prototype.getPath = function () { 47057 return this.path; 47058 }; 47059 47060 AnimationItem.prototype.getAssetsPath = function (assetData) { 47061 var path = ''; 47062 47063 if (assetData.e) { 47064 path = assetData.p; 47065 } else if (this.assetsPath) { 47066 var imagePath = assetData.p; 47067 47068 if (imagePath.indexOf('images/') !== -1) { 47069 imagePath = imagePath.split('/')[1]; 47070 } 47071 47072 path = this.assetsPath + imagePath; 47073 } else { 47074 path = this.path; 47075 path += assetData.u ? assetData.u : ''; 47076 path += assetData.p; 47077 } 47078 47079 return path; 47080 }; 47081 47082 AnimationItem.prototype.getAssetData = function (id) { 47083 var i = 0; 47084 var len = this.assets.length; 47085 47086 while (i < len) { 47087 if (id === this.assets[i].id) { 47088 return this.assets[i]; 47089 } 47090 47091 i += 1; 47092 } 47093 47094 return null; 47095 }; 47096 47097 AnimationItem.prototype.hide = function () { 47098 this.renderer.hide(); 47099 }; 47100 47101 AnimationItem.prototype.show = function () { 47102 this.renderer.show(); 47103 }; 47104 47105 AnimationItem.prototype.getDuration = function (isFrame) { 47106 return isFrame ? this.totalFrames : this.totalFrames / this.frameRate; 47107 }; 47108 47109 AnimationItem.prototype.updateDocumentData = function (path, documentData, index) { 47110 try { 47111 var element = this.renderer.getElementByPath(path); 47112 element.updateDocumentData(documentData, index); 47113 } catch (error) {// TODO: decide how to handle catch case 47114 } 47115 }; 47116 47117 AnimationItem.prototype.trigger = function (name) { 47118 if (this._cbs && this._cbs[name]) { 47119 switch (name) { 47120 case 'enterFrame': 47121 this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier)); 47122 break; 47123 47124 case 'drawnFrame': 47125 this.drawnFrameEvent.currentTime = this.currentFrame; 47126 this.drawnFrameEvent.totalTime = this.totalFrames; 47127 this.drawnFrameEvent.direction = this.frameModifier; 47128 this.triggerEvent(name, this.drawnFrameEvent); 47129 break; 47130 47131 case 'loopComplete': 47132 this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult)); 47133 break; 47134 47135 case 'complete': 47136 this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult)); 47137 break; 47138 47139 case 'segmentStart': 47140 this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames)); 47141 break; 47142 47143 case 'destroy': 47144 this.triggerEvent(name, new BMDestroyEvent(name, this)); 47145 break; 47146 47147 default: 47148 this.triggerEvent(name); 47149 } 47150 } 47151 47152 if (name === 'enterFrame' && this.onEnterFrame) { 47153 this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult)); 47154 } 47155 47156 if (name === 'loopComplete' && this.onLoopComplete) { 47157 this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult)); 47158 } 47159 47160 if (name === 'complete' && this.onComplete) { 47161 this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult)); 47162 } 47163 47164 if (name === 'segmentStart' && this.onSegmentStart) { 47165 this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames)); 47166 } 47167 47168 if (name === 'destroy' && this.onDestroy) { 47169 this.onDestroy.call(this, new BMDestroyEvent(name, this)); 47170 } 47171 }; 47172
vendor: 95,495 bytes, lines 47173-50364
47173 AnimationItem.prototype.triggerRenderFrameError = function (nativeError) { 47174 var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame); 47175 this.triggerEvent('error', error); 47176 47177 if (this.onError) { 47178 this.onError.call(this, error); 47179 } 47180 }; 47181 47182 AnimationItem.prototype.triggerConfigError = function (nativeError) { 47183 var error = new BMConfigErrorEvent(nativeError, this.currentFrame); 47184 this.triggerEvent('error', error); 47185 47186 if (this.onError) { 47187 this.onError.call(this, error); 47188 } 47189 }; 47190 47191 var animationManager = function () { 47192 var moduleOb = {}; 47193 var registeredAnimations = []; 47194 var initTime = 0; 47195 var len = 0; 47196 var playingAnimationsNum = 0; 47197 var _stopped = true; 47198 var _isFrozen = false; 47199 47200 function removeElement(ev) { 47201 var i = 0; 47202 var animItem = ev.target; 47203 47204 while (i < len) { 47205 if (registeredAnimations[i].animation === animItem) { 47206 registeredAnimations.splice(i, 1); 47207 i -= 1; 47208 len -= 1; 47209 47210 if (!animItem.isPaused) { 47211 subtractPlayingCount(); 47212 } 47213 } 47214 47215 i += 1; 47216 } 47217 } 47218 47219 function registerAnimation(element, animationData) { 47220 if (!element) { 47221 return null; 47222 } 47223 47224 var i = 0; 47225 47226 while (i < len) { 47227 if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) { 47228 return registeredAnimations[i].animation; 47229 } 47230 47231 i += 1; 47232 } 47233 47234 var animItem = new AnimationItem(); 47235 setupAnimation(animItem, element); 47236 animItem.setData(element, animationData); 47237 return animItem; 47238 } 47239 47240 function getRegisteredAnimations() { 47241 var i; 47242 var lenAnims = registeredAnimations.length; 47243 var animations = []; 47244 47245 for (i = 0; i < lenAnims; i += 1) { 47246 animations.push(registeredAnimations[i].animation); 47247 } 47248 47249 return animations; 47250 } 47251 47252 function addPlayingCount() { 47253 playingAnimationsNum += 1; 47254 activate(); 47255 } 47256 47257 function subtractPlayingCount() { 47258 playingAnimationsNum -= 1; 47259 } 47260 47261 function setupAnimation(animItem, element) { 47262 animItem.addEventListener('destroy', removeElement); 47263 animItem.addEventListener('_active', addPlayingCount); 47264 animItem.addEventListener('_idle', subtractPlayingCount); 47265 registeredAnimations.push({ 47266 elem: element, 47267 animation: animItem 47268 }); 47269 len += 1; 47270 } 47271 47272 function loadAnimation(params) { 47273 var animItem = new AnimationItem(); 47274 setupAnimation(animItem, null); 47275 animItem.setParams(params); 47276 return animItem; 47277 } 47278 47279 function setSpeed(val, animation) { 47280 var i; 47281 47282 for (i = 0; i < len; i += 1) { 47283 registeredAnimations[i].animation.setSpeed(val, animation); 47284 } 47285 } 47286 47287 function setDirection(val, animation) { 47288 var i; 47289 47290 for (i = 0; i < len; i += 1) { 47291 registeredAnimations[i].animation.setDirection(val, animation); 47292 } 47293 } 47294 47295 function play(animation) { 47296 var i; 47297 47298 for (i = 0; i < len; i += 1) { 47299 registeredAnimations[i].animation.play(animation); 47300 } 47301 } 47302 47303 function resume(nowTime) { 47304 var elapsedTime = nowTime - initTime; 47305 var i; 47306 47307 for (i = 0; i < len; i += 1) { 47308 registeredAnimations[i].animation.advanceTime(elapsedTime); 47309 } 47310 47311 initTime = nowTime; 47312 47313 if (playingAnimationsNum && !_isFrozen) { 47314 window.requestAnimationFrame(resume); 47315 } else { 47316 _stopped = true; 47317 } 47318 } 47319 47320 function first(nowTime) { 47321 initTime = nowTime; 47322 window.requestAnimationFrame(resume); 47323 } 47324 47325 function pause(animation) { 47326 var i; 47327 47328 for (i = 0; i < len; i += 1) { 47329 registeredAnimations[i].animation.pause(animation); 47330 } 47331 } 47332 47333 function goToAndStop(value, isFrame, animation) { 47334 var i; 47335 47336 for (i = 0; i < len; i += 1) { 47337 registeredAnimations[i].animation.goToAndStop(value, isFrame, animation); 47338 } 47339 } 47340 47341 function stop(animation) { 47342 var i; 47343 47344 for (i = 0; i < len; i += 1) { 47345 registeredAnimations[i].animation.stop(animation); 47346 } 47347 } 47348 47349 function togglePause(animation) { 47350 var i; 47351 47352 for (i = 0; i < len; i += 1) { 47353 registeredAnimations[i].animation.togglePause(animation); 47354 } 47355 } 47356 47357 function destroy(animation) { 47358 var i; 47359 47360 for (i = len - 1; i >= 0; i -= 1) { 47361 registeredAnimations[i].animation.destroy(animation); 47362 } 47363 } 47364 47365 function searchAnimations(animationData, standalone, renderer) { 47366 var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin'))); 47367 var i; 47368 var lenAnims = animElements.length; 47369 47370 for (i = 0; i < lenAnims; i += 1) { 47371 if (renderer) { 47372 animElements[i].setAttribute('data-bm-type', renderer); 47373 } 47374 47375 registerAnimation(animElements[i], animationData); 47376 } 47377 47378 if (standalone && lenAnims === 0) { 47379 if (!renderer) { 47380 renderer = 'svg'; 47381 } 47382 47383 var body = document.getElementsByTagName('body')[0]; 47384 body.innerText = ''; 47385 var div = createTag('div'); 47386 div.style.width = '100%'; 47387 div.style.height = '100%'; 47388 div.setAttribute('data-bm-type', renderer); 47389 body.appendChild(div); 47390 registerAnimation(div, animationData); 47391 } 47392 } 47393 47394 function resize() { 47395 var i; 47396 47397 for (i = 0; i < len; i += 1) { 47398 registeredAnimations[i].animation.resize(); 47399 } 47400 } 47401 47402 function activate() { 47403 if (!_isFrozen && playingAnimationsNum) { 47404 if (_stopped) { 47405 window.requestAnimationFrame(first); 47406 _stopped = false; 47407 } 47408 } 47409 } 47410 47411 function freeze() { 47412 _isFrozen = true; 47413 } 47414 47415 function unfreeze() { 47416 _isFrozen = false; 47417 activate(); 47418 } 47419 47420 function setVolume(val, animation) { 47421 var i; 47422 47423 for (i = 0; i < len; i += 1) { 47424 registeredAnimations[i].animation.setVolume(val, animation); 47425 } 47426 } 47427 47428 function mute(animation) { 47429 var i; 47430 47431 for (i = 0; i < len; i += 1) { 47432 registeredAnimations[i].animation.mute(animation); 47433 } 47434 } 47435 47436 function unmute(animation) { 47437 var i; 47438 47439 for (i = 0; i < len; i += 1) { 47440 registeredAnimations[i].animation.unmute(animation); 47441 } 47442 } 47443 47444 moduleOb.registerAnimation = registerAnimation; 47445 moduleOb.loadAnimation = loadAnimation; 47446 moduleOb.setSpeed = setSpeed; 47447 moduleOb.setDirection = setDirection; 47448 moduleOb.play = play; 47449 moduleOb.pause = pause; 47450 moduleOb.stop = stop; 47451 moduleOb.togglePause = togglePause; 47452 moduleOb.searchAnimations = searchAnimations; 47453 moduleOb.resize = resize; // moduleOb.start = start; 47454 47455 moduleOb.goToAndStop = goToAndStop; 47456 moduleOb.destroy = destroy; 47457 moduleOb.freeze = freeze; 47458 moduleOb.unfreeze = unfreeze; 47459 moduleOb.setVolume = setVolume; 47460 moduleOb.mute = mute; 47461 moduleOb.unmute = unmute; 47462 moduleOb.getRegisteredAnimations = getRegisteredAnimations; 47463 return moduleOb; 47464 }(); 47465 47466 /* eslint-disable */ 47467 var BezierFactory = function () { 47468 /** 47469 * BezierEasing - use bezier curve for transition easing function 47470 * by Gaëtan Renaudeau 2014 - 2015 â MIT License 47471 * 47472 * Credits: is based on Firefox's nsSMILKeySpline.cpp 47473 * Usage: 47474 * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ]) 47475 * spline.get(x) => returns the easing value | x must be in [0, 1] range 47476 * 47477 */ 47478 var ob = {}; 47479 ob.getBezierEasing = getBezierEasing; 47480 var beziers = {}; 47481 47482 function getBezierEasing(a, b, c, d, nm) { 47483 var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p'); 47484 47485 if (beziers[str]) { 47486 return beziers[str]; 47487 } 47488 47489 var bezEasing = new BezierEasing([a, b, c, d]); 47490 beziers[str] = bezEasing; 47491 return bezEasing; 47492 } // These values are established by empiricism with tests (tradeoff: performance VS precision) 47493 47494 47495 var NEWTON_ITERATIONS = 4; 47496 var NEWTON_MIN_SLOPE = 0.001; 47497 var SUBDIVISION_PRECISION = 0.0000001; 47498 var SUBDIVISION_MAX_ITERATIONS = 10; 47499 var kSplineTableSize = 11; 47500 var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); 47501 var float32ArraySupported = typeof Float32Array === 'function'; 47502 47503 function A(aA1, aA2) { 47504 return 1.0 - 3.0 * aA2 + 3.0 * aA1; 47505 } 47506 47507 function B(aA1, aA2) { 47508 return 3.0 * aA2 - 6.0 * aA1; 47509 } 47510 47511 function C(aA1) { 47512 return 3.0 * aA1; 47513 } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. 47514 47515 47516 function calcBezier(aT, aA1, aA2) { 47517 return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; 47518 } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2. 47519 47520 47521 function getSlope(aT, aA1, aA2) { 47522 return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); 47523 } 47524 47525 function binarySubdivide(aX, aA, aB, mX1, mX2) { 47526 var currentX, 47527 currentT, 47528 i = 0; 47529 47530 do { 47531 currentT = aA + (aB - aA) / 2.0; 47532 currentX = calcBezier(currentT, mX1, mX2) - aX; 47533 47534 if (currentX > 0.0) { 47535 aB = currentT; 47536 } else { 47537 aA = currentT; 47538 } 47539 } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); 47540 47541 return currentT; 47542 } 47543 47544 function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) { 47545 for (var i = 0; i < NEWTON_ITERATIONS; ++i) { 47546 var currentSlope = getSlope(aGuessT, mX1, mX2); 47547 if (currentSlope === 0.0) return aGuessT; 47548 var currentX = calcBezier(aGuessT, mX1, mX2) - aX; 47549 aGuessT -= currentX / currentSlope; 47550 } 47551 47552 return aGuessT; 47553 } 47554 /** 47555 * points is an array of [ mX1, mY1, mX2, mY2 ] 47556 */ 47557 47558 47559 function BezierEasing(points) { 47560 this._p = points; 47561 this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); 47562 this._precomputed = false; 47563 this.get = this.get.bind(this); 47564 } 47565 47566 BezierEasing.prototype = { 47567 get: function get(x) { 47568 var mX1 = this._p[0], 47569 mY1 = this._p[1], 47570 mX2 = this._p[2], 47571 mY2 = this._p[3]; 47572 if (!this._precomputed) this._precompute(); 47573 if (mX1 === mY1 && mX2 === mY2) return x; // linear 47574 // Because JavaScript number are imprecise, we should guarantee the extremes are right. 47575 47576 if (x === 0) return 0; 47577 if (x === 1) return 1; 47578 return calcBezier(this._getTForX(x), mY1, mY2); 47579 }, 47580 // Private part 47581 _precompute: function _precompute() { 47582 var mX1 = this._p[0], 47583 mY1 = this._p[1], 47584 mX2 = this._p[2], 47585 mY2 = this._p[3]; 47586 this._precomputed = true; 47587 47588 if (mX1 !== mY1 || mX2 !== mY2) { 47589 this._calcSampleValues(); 47590 } 47591 }, 47592 _calcSampleValues: function _calcSampleValues() { 47593 var mX1 = this._p[0], 47594 mX2 = this._p[2]; 47595 47596 for (var i = 0; i < kSplineTableSize; ++i) { 47597 this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); 47598 } 47599 }, 47600 47601 /** 47602 * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection. 47603 */ 47604 _getTForX: function _getTForX(aX) { 47605 var mX1 = this._p[0], 47606 mX2 = this._p[2], 47607 mSampleValues = this._mSampleValues; 47608 var intervalStart = 0.0; 47609 var currentSample = 1; 47610 var lastSample = kSplineTableSize - 1; 47611 47612 for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { 47613 intervalStart += kSampleStepSize; 47614 } 47615 47616 --currentSample; // Interpolate to provide an initial guess for t 47617 47618 var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]); 47619 var guessForT = intervalStart + dist * kSampleStepSize; 47620 var initialSlope = getSlope(guessForT, mX1, mX2); 47621 47622 if (initialSlope >= NEWTON_MIN_SLOPE) { 47623 return newtonRaphsonIterate(aX, guessForT, mX1, mX2); 47624 } 47625 47626 if (initialSlope === 0.0) { 47627 return guessForT; 47628 } 47629 47630 return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); 47631 } 47632 }; 47633 return ob; 47634 }(); 47635 47636 var pooling = function () { 47637 function _double(arr) { 47638 return arr.concat(createSizedArray(arr.length)); 47639 } 47640 47641 return { 47642 "double": _double 47643 }; 47644 }(); 47645 47646 var poolFactory = function () { 47647 return function (initialLength, _create, _release) { 47648 var _length = 0; 47649 var _maxLength = initialLength; 47650 var pool = createSizedArray(_maxLength); 47651 var ob = { 47652 newElement: newElement, 47653 release: release 47654 }; 47655 47656 function newElement() { 47657 var element; 47658 47659 if (_length) { 47660 _length -= 1; 47661 element = pool[_length]; 47662 } else { 47663 element = _create(); 47664 } 47665 47666 return element; 47667 } 47668 47669 function release(element) { 47670 if (_length === _maxLength) { 47671 pool = pooling["double"](pool); 47672 _maxLength *= 2; 47673 } 47674 47675 if (_release) { 47676 _release(element); 47677 } 47678 47679 pool[_length] = element; 47680 _length += 1; 47681 } 47682 47683 return ob; 47684 }; 47685 }(); 47686 47687 var bezierLengthPool = function () { 47688 function create() { 47689 return { 47690 addedLength: 0, 47691 percents: createTypedArray('float32', getDefaultCurveSegments()), 47692 lengths: createTypedArray('float32', getDefaultCurveSegments()) 47693 }; 47694 } 47695 47696 return poolFactory(8, create); 47697 }(); 47698 47699 var segmentsLengthPool = function () { 47700 function create() { 47701 return { 47702 lengths: [], 47703 totalLength: 0 47704 }; 47705 } 47706 47707 function release(element) { 47708 var i; 47709 var len = element.lengths.length; 47710 47711 for (i = 0; i < len; i += 1) { 47712 bezierLengthPool.release(element.lengths[i]); 47713 } 47714 47715 element.lengths.length = 0; 47716 } 47717 47718 return poolFactory(8, create, release); 47719 }(); 47720 47721 function bezFunction() { 47722 var math = Math; 47723 47724 function pointOnLine2D(x1, y1, x2, y2, x3, y3) { 47725 var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1; 47726 return det1 > -0.001 && det1 < 0.001; 47727 } 47728 47729 function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) { 47730 if (z1 === 0 && z2 === 0 && z3 === 0) { 47731 return pointOnLine2D(x1, y1, x2, y2, x3, y3); 47732 } 47733 47734 var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2)); 47735 var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2)); 47736 var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2)); 47737 var diffDist; 47738 47739 if (dist1 > dist2) { 47740 if (dist1 > dist3) { 47741 diffDist = dist1 - dist2 - dist3; 47742 } else { 47743 diffDist = dist3 - dist2 - dist1; 47744 } 47745 } else if (dist3 > dist2) { 47746 diffDist = dist3 - dist2 - dist1; 47747 } else { 47748 diffDist = dist2 - dist1 - dist3; 47749 } 47750 47751 return diffDist > -0.0001 && diffDist < 0.0001; 47752 } 47753 47754 var getBezierLength = function () { 47755 return function (pt1, pt2, pt3, pt4) { 47756 var curveSegments = getDefaultCurveSegments(); 47757 var k; 47758 var i; 47759 var len; 47760 var ptCoord; 47761 var perc; 47762 var addedLength = 0; 47763 var ptDistance; 47764 var point = []; 47765 var lastPoint = []; 47766 var lengthData = bezierLengthPool.newElement(); 47767 len = pt3.length; 47768 47769 for (k = 0; k < curveSegments; k += 1) { 47770 perc = k / (curveSegments - 1); 47771 ptDistance = 0; 47772 47773 for (i = 0; i < len; i += 1) { 47774 ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i]; 47775 point[i] = ptCoord; 47776 47777 if (lastPoint[i] !== null) { 47778 ptDistance += bmPow(point[i] - lastPoint[i], 2); 47779 } 47780 47781 lastPoint[i] = point[i]; 47782 } 47783 47784 if (ptDistance) { 47785 ptDistance = bmSqrt(ptDistance); 47786 addedLength += ptDistance; 47787 } 47788 47789 lengthData.percents[k] = perc; 47790 lengthData.lengths[k] = addedLength; 47791 } 47792 47793 lengthData.addedLength = addedLength; 47794 return lengthData; 47795 }; 47796 }(); 47797 47798 function getSegmentsLength(shapeData) { 47799 var segmentsLength = segmentsLengthPool.newElement(); 47800 var closed = shapeData.c; 47801 var pathV = shapeData.v; 47802 var pathO = shapeData.o; 47803 var pathI = shapeData.i; 47804 var i; 47805 var len = shapeData._length; 47806 var lengths = segmentsLength.lengths; 47807 var totalLength = 0; 47808 47809 for (i = 0; i < len - 1; i += 1) { 47810 lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]); 47811 totalLength += lengths[i].addedLength; 47812 } 47813 47814 if (closed && len) { 47815 lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]); 47816 totalLength += lengths[i].addedLength; 47817 } 47818 47819 segmentsLength.totalLength = totalLength; 47820 return segmentsLength; 47821 } 47822 47823 function BezierData(length) { 47824 this.segmentLength = 0; 47825 this.points = new Array(length); 47826 } 47827 47828 function PointData(partial, point) { 47829 this.partialLength = partial; 47830 this.point = point; 47831 } 47832 47833 var buildBezierData = function () { 47834 var storedData = {}; 47835 return function (pt1, pt2, pt3, pt4) { 47836 var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p'); 47837 47838 if (!storedData[bezierName]) { 47839 var curveSegments = getDefaultCurveSegments(); 47840 var k; 47841 var i; 47842 var len; 47843 var ptCoord; 47844 var perc; 47845 var addedLength = 0; 47846 var ptDistance; 47847 var point; 47848 var lastPoint = null; 47849 47850 if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) { 47851 curveSegments = 2; 47852 } 47853 47854 var bezierData = new BezierData(curveSegments); 47855 len = pt3.length; 47856 47857 for (k = 0; k < curveSegments; k += 1) { 47858 point = createSizedArray(len); 47859 perc = k / (curveSegments - 1); 47860 ptDistance = 0; 47861 47862 for (i = 0; i < len; i += 1) { 47863 ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i]; 47864 point[i] = ptCoord; 47865 47866 if (lastPoint !== null) { 47867 ptDistance += bmPow(point[i] - lastPoint[i], 2); 47868 } 47869 } 47870 47871 ptDistance = bmSqrt(ptDistance); 47872 addedLength += ptDistance; 47873 bezierData.points[k] = new PointData(ptDistance, point); 47874 lastPoint = point; 47875 } 47876 47877 bezierData.segmentLength = addedLength; 47878 storedData[bezierName] = bezierData; 47879 } 47880 47881 return storedData[bezierName]; 47882 }; 47883 }(); 47884 47885 function getDistancePerc(perc, bezierData) { 47886 var percents = bezierData.percents; 47887 var lengths = bezierData.lengths; 47888 var len = percents.length; 47889 var initPos = bmFloor((len - 1) * perc); 47890 var lengthPos = perc * bezierData.addedLength; 47891 var lPerc = 0; 47892 47893 if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) { 47894 return percents[initPos]; 47895 } 47896 47897 var dir = lengths[initPos] > lengthPos ? -1 : 1; 47898 var flag = true; 47899 47900 while (flag) { 47901 if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) { 47902 lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]); 47903 flag = false; 47904 } else { 47905 initPos += dir; 47906 } 47907 47908 if (initPos < 0 || initPos >= len - 1) { 47909 // FIX for TypedArrays that don't store floating point values with enough accuracy 47910 if (initPos === len - 1) { 47911 return percents[initPos]; 47912 } 47913 47914 flag = false; 47915 } 47916 } 47917 47918 return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc; 47919 } 47920 47921 function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) { 47922 var t1 = getDistancePerc(percent, bezierData); 47923 var u1 = 1 - t1; 47924 var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000; 47925 var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000; 47926 return [ptX, ptY]; 47927 } 47928 47929 var bezierSegmentPoints = createTypedArray('float32', 8); 47930 47931 function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) { 47932 if (startPerc < 0) { 47933 startPerc = 0; 47934 } else if (startPerc > 1) { 47935 startPerc = 1; 47936 } 47937 47938 var t0 = getDistancePerc(startPerc, bezierData); 47939 endPerc = endPerc > 1 ? 1 : endPerc; 47940 var t1 = getDistancePerc(endPerc, bezierData); 47941 var i; 47942 var len = pt1.length; 47943 var u0 = 1 - t0; 47944 var u1 = 1 - t1; 47945 var u0u0u0 = u0 * u0 * u0; 47946 var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase 47947 47948 var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase 47949 47950 var t0t0t0 = t0 * t0 * t0; // 47951 47952 var u0u0u1 = u0 * u0 * u1; 47953 var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase 47954 47955 var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase 47956 47957 var t0t0t1 = t0 * t0 * t1; // 47958 47959 var u0u1u1 = u0 * u1 * u1; 47960 var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase 47961 47962 var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase 47963 47964 var t0t1t1 = t0 * t1 * t1; // 47965 47966 var u1u1u1 = u1 * u1 * u1; 47967 var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase 47968 47969 var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase 47970 47971 var t1t1t1 = t1 * t1 * t1; 47972 47973 for (i = 0; i < len; i += 1) { 47974 bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase 47975 47976 bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase 47977 47978 bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase 47979 47980 bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase 47981 } 47982 47983 return bezierSegmentPoints; 47984 } 47985 47986 return { 47987 getSegmentsLength: getSegmentsLength, 47988 getNewSegment: getNewSegment, 47989 getPointInSegment: getPointInSegment, 47990 buildBezierData: buildBezierData, 47991 pointOnLine2D: pointOnLine2D, 47992 pointOnLine3D: pointOnLine3D 47993 }; 47994 } 47995 47996 var bez = bezFunction(); 47997 47998 var initFrame = initialDefaultFrame; 47999 var mathAbs = Math.abs; 48000 48001 function interpolateValue(frameNum, caching) { 48002 var offsetTime = this.offsetTime; 48003 var newValue; 48004 48005 if (this.propType === 'multidimensional') { 48006 newValue = createTypedArray('float32', this.pv.length); 48007 } 48008 48009 var iterationIndex = caching.lastIndex; 48010 var i = iterationIndex; 48011 var len = this.keyframes.length - 1; 48012 var flag = true; 48013 var keyData; 48014 var nextKeyData; 48015 var keyframeMetadata; 48016 48017 while (flag) { 48018 keyData = this.keyframes[i]; 48019 nextKeyData = this.keyframes[i + 1]; 48020 48021 if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) { 48022 if (keyData.h) { 48023 keyData = nextKeyData; 48024 } 48025 48026 iterationIndex = 0; 48027 break; 48028 } 48029 48030 if (nextKeyData.t - offsetTime > frameNum) { 48031 iterationIndex = i; 48032 break; 48033 } 48034 48035 if (i < len - 1) { 48036 i += 1; 48037 } else { 48038 iterationIndex = 0; 48039 flag = false; 48040 } 48041 } 48042 48043 keyframeMetadata = this.keyframesMetadata[i] || {}; 48044 var k; 48045 var kLen; 48046 var perc; 48047 var jLen; 48048 var j; 48049 var fnc; 48050 var nextKeyTime = nextKeyData.t - offsetTime; 48051 var keyTime = keyData.t - offsetTime; 48052 var endValue; 48053 48054 if (keyData.to) { 48055 if (!keyframeMetadata.bezierData) { 48056 keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti); 48057 } 48058 48059 var bezierData = keyframeMetadata.bezierData; 48060 48061 if (frameNum >= nextKeyTime || frameNum < keyTime) { 48062 var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0; 48063 kLen = bezierData.points[ind].point.length; 48064 48065 for (k = 0; k < kLen; k += 1) { 48066 newValue[k] = bezierData.points[ind].point[k]; 48067 } // caching._lastKeyframeIndex = -1; 48068 48069 } else { 48070 if (keyframeMetadata.__fnct) { 48071 fnc = keyframeMetadata.__fnct; 48072 } else { 48073 fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get; 48074 keyframeMetadata.__fnct = fnc; 48075 } 48076 48077 perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime)); 48078 var distanceInLine = bezierData.segmentLength * perc; 48079 var segmentPerc; 48080 var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0; 48081 j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0; 48082 flag = true; 48083 jLen = bezierData.points.length; 48084 48085 while (flag) { 48086 addedLength += bezierData.points[j].partialLength; 48087 48088 if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) { 48089 kLen = bezierData.points[j].point.length; 48090 48091 for (k = 0; k < kLen; k += 1) { 48092 newValue[k] = bezierData.points[j].point[k]; 48093 } 48094 48095 break; 48096 } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) { 48097 segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength; 48098 kLen = bezierData.points[j].point.length; 48099 48100 for (k = 0; k < kLen; k += 1) { 48101 newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc; 48102 } 48103 48104 break; 48105 } 48106 48107 if (j < jLen - 1) { 48108 j += 1; 48109 } else { 48110 flag = false; 48111 } 48112 } 48113 48114 caching._lastPoint = j; 48115 caching._lastAddedLength = addedLength - bezierData.points[j].partialLength; 48116 caching._lastKeyframeIndex = i; 48117 } 48118 } else { 48119 var outX; 48120 var outY; 48121 var inX; 48122 var inY; 48123 var keyValue; 48124 len = keyData.s.length; 48125 endValue = nextKeyData.s || keyData.e; 48126 48127 if (this.sh && keyData.h !== 1) { 48128 if (frameNum >= nextKeyTime) { 48129 newValue[0] = endValue[0]; 48130 newValue[1] = endValue[1]; 48131 newValue[2] = endValue[2]; 48132 } else if (frameNum <= keyTime) { 48133 newValue[0] = keyData.s[0]; 48134 newValue[1] = keyData.s[1]; 48135 newValue[2] = keyData.s[2]; 48136 } else { 48137 var quatStart = createQuaternion(keyData.s); 48138 var quatEnd = createQuaternion(endValue); 48139 var time = (frameNum - keyTime) / (nextKeyTime - keyTime); 48140 quaternionToEuler(newValue, slerp(quatStart, quatEnd, time)); 48141 } 48142 } else { 48143 for (i = 0; i < len; i += 1) { 48144 if (keyData.h !== 1) { 48145 if (frameNum >= nextKeyTime) { 48146 perc = 1; 48147 } else if (frameNum < keyTime) { 48148 perc = 0; 48149 } else { 48150 if (keyData.o.x.constructor === Array) { 48151 if (!keyframeMetadata.__fnct) { 48152 keyframeMetadata.__fnct = []; 48153 } 48154 48155 if (!keyframeMetadata.__fnct[i]) { 48156 outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i]; 48157 outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i]; 48158 inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i]; 48159 inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i]; 48160 fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get; 48161 keyframeMetadata.__fnct[i] = fnc; 48162 } else { 48163 fnc = keyframeMetadata.__fnct[i]; 48164 } 48165 } else if (!keyframeMetadata.__fnct) { 48166 outX = keyData.o.x; 48167 outY = keyData.o.y; 48168 inX = keyData.i.x; 48169 inY = keyData.i.y; 48170 fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get; 48171 keyData.keyframeMetadata = fnc; 48172 } else { 48173 fnc = keyframeMetadata.__fnct; 48174 } 48175 48176 perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime)); 48177 } 48178 } 48179 48180 endValue = nextKeyData.s || keyData.e; 48181 keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc; 48182 48183 if (this.propType === 'multidimensional') { 48184 newValue[i] = keyValue; 48185 } else { 48186 newValue = keyValue; 48187 } 48188 } 48189 } 48190 } 48191 48192 caching.lastIndex = iterationIndex; 48193 return newValue; 48194 } // based on @Toji's https://github.com/toji/gl-matrix/ 48195 48196 48197 function slerp(a, b, t) { 48198 var out = []; 48199 var ax = a[0]; 48200 var ay = a[1]; 48201 var az = a[2]; 48202 var aw = a[3]; 48203 var bx = b[0]; 48204 var by = b[1]; 48205 var bz = b[2]; 48206 var bw = b[3]; 48207 var omega; 48208 var cosom; 48209 var sinom; 48210 var scale0; 48211 var scale1; 48212 cosom = ax * bx + ay * by + az * bz + aw * bw; 48213 48214 if (cosom < 0.0) { 48215 cosom = -cosom; 48216 bx = -bx; 48217 by = -by; 48218 bz = -bz; 48219 bw = -bw; 48220 } 48221 48222 if (1.0 - cosom > 0.000001) { 48223 omega = Math.acos(cosom); 48224 sinom = Math.sin(omega); 48225 scale0 = Math.sin((1.0 - t) * omega) / sinom; 48226 scale1 = Math.sin(t * omega) / sinom; 48227 } else { 48228 scale0 = 1.0 - t; 48229 scale1 = t; 48230 } 48231 48232 out[0] = scale0 * ax + scale1 * bx; 48233 out[1] = scale0 * ay + scale1 * by; 48234 out[2] = scale0 * az + scale1 * bz; 48235 out[3] = scale0 * aw + scale1 * bw; 48236 return out; 48237 } 48238 48239 function quaternionToEuler(out, quat) { 48240 var qx = quat[0]; 48241 var qy = quat[1]; 48242 var qz = quat[2]; 48243 var qw = quat[3]; 48244 var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz); 48245 var attitude = Math.asin(2 * qx * qy + 2 * qz * qw); 48246 var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz); 48247 out[0] = heading / degToRads; 48248 out[1] = attitude / degToRads; 48249 out[2] = bank / degToRads; 48250 } 48251 48252 function createQuaternion(values) { 48253 var heading = values[0] * degToRads; 48254 var attitude = values[1] * degToRads; 48255 var bank = values[2] * degToRads; 48256 var c1 = Math.cos(heading / 2); 48257 var c2 = Math.cos(attitude / 2); 48258 var c3 = Math.cos(bank / 2); 48259 var s1 = Math.sin(heading / 2); 48260 var s2 = Math.sin(attitude / 2); 48261 var s3 = Math.sin(bank / 2); 48262 var w = c1 * c2 * c3 - s1 * s2 * s3; 48263 var x = s1 * s2 * c3 + c1 * c2 * s3; 48264 var y = s1 * c2 * c3 + c1 * s2 * s3; 48265 var z = c1 * s2 * c3 - s1 * c2 * s3; 48266 return [x, y, z, w]; 48267 } 48268 48269 function getValueAtCurrentTime() { 48270 var frameNum = this.comp.renderedFrame - this.offsetTime; 48271 var initTime = this.keyframes[0].t - this.offsetTime; 48272 var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; 48273 48274 if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) { 48275 if (this._caching.lastFrame >= frameNum) { 48276 this._caching._lastKeyframeIndex = -1; 48277 this._caching.lastIndex = 0; 48278 } 48279 48280 var renderResult = this.interpolateValue(frameNum, this._caching); 48281 this.pv = renderResult; 48282 } 48283 48284 this._caching.lastFrame = frameNum; 48285 return this.pv; 48286 } 48287 48288 function setVValue(val) { 48289 var multipliedValue; 48290 48291 if (this.propType === 'unidimensional') { 48292 multipliedValue = val * this.mult; 48293 48294 if (mathAbs(this.v - multipliedValue) > 0.00001) { 48295 this.v = multipliedValue; 48296 this._mdf = true; 48297 } 48298 } else { 48299 var i = 0; 48300 var len = this.v.length; 48301 48302 while (i < len) { 48303 multipliedValue = val[i] * this.mult; 48304 48305 if (mathAbs(this.v[i] - multipliedValue) > 0.00001) { 48306 this.v[i] = multipliedValue; 48307 this._mdf = true; 48308 } 48309 48310 i += 1; 48311 } 48312 } 48313 } 48314 48315 function processEffectsSequence() { 48316 if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) { 48317 return; 48318 } 48319 48320 if (this.lock) { 48321 this.setVValue(this.pv); 48322 return; 48323 } 48324 48325 this.lock = true; 48326 this._mdf = this._isFirstFrame; 48327 var i; 48328 var len = this.effectsSequence.length; 48329 var finalValue = this.kf ? this.pv : this.data.k; 48330 48331 for (i = 0; i < len; i += 1) { 48332 finalValue = this.effectsSequence[i](finalValue); 48333 } 48334 48335 this.setVValue(finalValue); 48336 this._isFirstFrame = false; 48337 this.lock = false; 48338 this.frameId = this.elem.globalData.frameId; 48339 } 48340 48341 function addEffect(effectFunction) { 48342 this.effectsSequence.push(effectFunction); 48343 this.container.addDynamicProperty(this); 48344 } 48345 48346 function ValueProperty(elem, data, mult, container) { 48347 this.propType = 'unidimensional'; 48348 this.mult = mult || 1; 48349 this.data = data; 48350 this.v = mult ? data.k * mult : data.k; 48351 this.pv = data.k; 48352 this._mdf = false; 48353 this.elem = elem; 48354 this.container = container; 48355 this.comp = elem.comp; 48356 this.k = false; 48357 this.kf = false; 48358 this.vel = 0; 48359 this.effectsSequence = []; 48360 this._isFirstFrame = true; 48361 this.getValue = processEffectsSequence; 48362 this.setVValue = setVValue; 48363 this.addEffect = addEffect; 48364 } 48365 48366 function MultiDimensionalProperty(elem, data, mult, container) { 48367 this.propType = 'multidimensional'; 48368 this.mult = mult || 1; 48369 this.data = data; 48370 this._mdf = false; 48371 this.elem = elem; 48372 this.container = container; 48373 this.comp = elem.comp; 48374 this.k = false; 48375 this.kf = false; 48376 this.frameId = -1; 48377 var i; 48378 var len = data.k.length; 48379 this.v = createTypedArray('float32', len); 48380 this.pv = createTypedArray('float32', len); 48381 this.vel = createTypedArray('float32', len); 48382 48383 for (i = 0; i < len; i += 1) { 48384 this.v[i] = data.k[i] * this.mult; 48385 this.pv[i] = data.k[i]; 48386 } 48387 48388 this._isFirstFrame = true; 48389 this.effectsSequence = []; 48390 this.getValue = processEffectsSequence; 48391 this.setVValue = setVValue; 48392 this.addEffect = addEffect; 48393 } 48394 48395 function KeyframedValueProperty(elem, data, mult, container) { 48396 this.propType = 'unidimensional'; 48397 this.keyframes = data.k; 48398 this.keyframesMetadata = []; 48399 this.offsetTime = elem.data.st; 48400 this.frameId = -1; 48401 this._caching = { 48402 lastFrame: initFrame, 48403 lastIndex: 0, 48404 value: 0, 48405 _lastKeyframeIndex: -1 48406 }; 48407 this.k = true; 48408 this.kf = true; 48409 this.data = data; 48410 this.mult = mult || 1; 48411 this.elem = elem; 48412 this.container = container; 48413 this.comp = elem.comp; 48414 this.v = initFrame; 48415 this.pv = initFrame; 48416 this._isFirstFrame = true; 48417 this.getValue = processEffectsSequence; 48418 this.setVValue = setVValue; 48419 this.interpolateValue = interpolateValue; 48420 this.effectsSequence = [getValueAtCurrentTime.bind(this)]; 48421 this.addEffect = addEffect; 48422 } 48423 48424 function KeyframedMultidimensionalProperty(elem, data, mult, container) { 48425 this.propType = 'multidimensional'; 48426 var i; 48427 var len = data.k.length; 48428 var s; 48429 var e; 48430 var to; 48431 var ti; 48432 48433 for (i = 0; i < len - 1; i += 1) { 48434 if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) { 48435 s = data.k[i].s; 48436 e = data.k[i + 1].s; 48437 to = data.k[i].to; 48438 ti = data.k[i].ti; 48439 48440 if (s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1]) || s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2])) { 48441 data.k[i].to = null; 48442 data.k[i].ti = null; 48443 } 48444 48445 if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) { 48446 if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) { 48447 data.k[i].to = null; 48448 data.k[i].ti = null; 48449 } 48450 } 48451 } 48452 } 48453 48454 this.effectsSequence = [getValueAtCurrentTime.bind(this)]; 48455 this.data = data; 48456 this.keyframes = data.k; 48457 this.keyframesMetadata = []; 48458 this.offsetTime = elem.data.st; 48459 this.k = true; 48460 this.kf = true; 48461 this._isFirstFrame = true; 48462 this.mult = mult || 1; 48463 this.elem = elem; 48464 this.container = container; 48465 this.comp = elem.comp; 48466 this.getValue = processEffectsSequence; 48467 this.setVValue = setVValue; 48468 this.interpolateValue = interpolateValue; 48469 this.frameId = -1; 48470 var arrLen = data.k[0].s.length; 48471 this.v = createTypedArray('float32', arrLen); 48472 this.pv = createTypedArray('float32', arrLen); 48473 48474 for (i = 0; i < arrLen; i += 1) { 48475 this.v[i] = initFrame; 48476 this.pv[i] = initFrame; 48477 } 48478 48479 this._caching = { 48480 lastFrame: initFrame, 48481 lastIndex: 0, 48482 value: createTypedArray('float32', arrLen) 48483 }; 48484 this.addEffect = addEffect; 48485 } 48486 48487 var PropertyFactory = function () { 48488 function getProp(elem, data, type, mult, container) { 48489 if (data.sid) { 48490 data = elem.globalData.slotManager.getProp(data); 48491 } 48492 48493 var p; 48494 48495 if (!data.k.length) { 48496 p = new ValueProperty(elem, data, mult, container); 48497 } else if (typeof data.k[0] === 'number') { 48498 p = new MultiDimensionalProperty(elem, data, mult, container); 48499 } else { 48500 switch (type) { 48501 case 0: 48502 p = new KeyframedValueProperty(elem, data, mult, container); 48503 break; 48504 48505 case 1: 48506 p = new KeyframedMultidimensionalProperty(elem, data, mult, container); 48507 break; 48508 48509 default: 48510 break; 48511 } 48512 } 48513 48514 if (p.effectsSequence.length) { 48515 container.addDynamicProperty(p); 48516 } 48517 48518 return p; 48519 } 48520 48521 var ob = { 48522 getProp: getProp 48523 }; 48524 return ob; 48525 }(); 48526 48527 function DynamicPropertyContainer() {} 48528 48529 DynamicPropertyContainer.prototype = { 48530 addDynamicProperty: function addDynamicProperty(prop) { 48531 if (this.dynamicProperties.indexOf(prop) === -1) { 48532 this.dynamicProperties.push(prop); 48533 this.container.addDynamicProperty(this); 48534 this._isAnimated = true; 48535 } 48536 }, 48537 iterateDynamicProperties: function iterateDynamicProperties() { 48538 this._mdf = false; 48539 var i; 48540 var len = this.dynamicProperties.length; 48541 48542 for (i = 0; i < len; i += 1) { 48543 this.dynamicProperties[i].getValue(); 48544 48545 if (this.dynamicProperties[i]._mdf) { 48546 this._mdf = true; 48547 } 48548 } 48549 }, 48550 initDynamicPropertyContainer: function initDynamicPropertyContainer(container) { 48551 this.container = container; 48552 this.dynamicProperties = []; 48553 this._mdf = false; 48554 this._isAnimated = false; 48555 } 48556 }; 48557 48558 var pointPool = function () { 48559 function create() { 48560 return createTypedArray('float32', 2); 48561 } 48562 48563 return poolFactory(8, create); 48564 }(); 48565 48566 function ShapePath() { 48567 this.c = false; 48568 this._length = 0; 48569 this._maxLength = 8; 48570 this.v = createSizedArray(this._maxLength); 48571 this.o = createSizedArray(this._maxLength); 48572 this.i = createSizedArray(this._maxLength); 48573 } 48574 48575 ShapePath.prototype.setPathData = function (closed, len) { 48576 this.c = closed; 48577 this.setLength(len); 48578 var i = 0; 48579 48580 while (i < len) { 48581 this.v[i] = pointPool.newElement(); 48582 this.o[i] = pointPool.newElement(); 48583 this.i[i] = pointPool.newElement(); 48584 i += 1; 48585 } 48586 }; 48587 48588 ShapePath.prototype.setLength = function (len) { 48589 while (this._maxLength < len) { 48590 this.doubleArrayLength(); 48591 } 48592 48593 this._length = len; 48594 }; 48595 48596 ShapePath.prototype.doubleArrayLength = function () { 48597 this.v = this.v.concat(createSizedArray(this._maxLength)); 48598 this.i = this.i.concat(createSizedArray(this._maxLength)); 48599 this.o = this.o.concat(createSizedArray(this._maxLength)); 48600 this._maxLength *= 2; 48601 }; 48602 48603 ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) { 48604 var arr; 48605 this._length = Math.max(this._length, pos + 1); 48606 48607 if (this._length >= this._maxLength) { 48608 this.doubleArrayLength(); 48609 } 48610 48611 switch (type) { 48612 case 'v': 48613 arr = this.v; 48614 break; 48615 48616 case 'i': 48617 arr = this.i; 48618 break; 48619 48620 case 'o': 48621 arr = this.o; 48622 break; 48623 48624 default: 48625 arr = []; 48626 break; 48627 } 48628 48629 if (!arr[pos] || arr[pos] && !replace) { 48630 arr[pos] = pointPool.newElement(); 48631 } 48632 48633 arr[pos][0] = x; 48634 arr[pos][1] = y; 48635 }; 48636 48637 ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) { 48638 this.setXYAt(vX, vY, 'v', pos, replace); 48639 this.setXYAt(oX, oY, 'o', pos, replace); 48640 this.setXYAt(iX, iY, 'i', pos, replace); 48641 }; 48642 48643 ShapePath.prototype.reverse = function () { 48644 var newPath = new ShapePath(); 48645 newPath.setPathData(this.c, this._length); 48646 var vertices = this.v; 48647 var outPoints = this.o; 48648 var inPoints = this.i; 48649 var init = 0; 48650 48651 if (this.c) { 48652 newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false); 48653 init = 1; 48654 } 48655 48656 var cnt = this._length - 1; 48657 var len = this._length; 48658 var i; 48659 48660 for (i = init; i < len; i += 1) { 48661 newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false); 48662 cnt -= 1; 48663 } 48664 48665 return newPath; 48666 }; 48667 48668 ShapePath.prototype.length = function () { 48669 return this._length; 48670 }; 48671 48672 var shapePool = function () { 48673 function create() { 48674 return new ShapePath(); 48675 } 48676 48677 function release(shapePath) { 48678 var len = shapePath._length; 48679 var i; 48680 48681 for (i = 0; i < len; i += 1) { 48682 pointPool.release(shapePath.v[i]); 48683 pointPool.release(shapePath.i[i]); 48684 pointPool.release(shapePath.o[i]); 48685 shapePath.v[i] = null; 48686 shapePath.i[i] = null; 48687 shapePath.o[i] = null; 48688 } 48689 48690 shapePath._length = 0; 48691 shapePath.c = false; 48692 } 48693 48694 function clone(shape) { 48695 var cloned = factory.newElement(); 48696 var i; 48697 var len = shape._length === undefined ? shape.v.length : shape._length; 48698 cloned.setLength(len); 48699 cloned.c = shape.c; 48700 48701 for (i = 0; i < len; i += 1) { 48702 cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i); 48703 } 48704 48705 return cloned; 48706 } 48707 48708 var factory = poolFactory(4, create, release); 48709 factory.clone = clone; 48710 return factory; 48711 }(); 48712 48713 function ShapeCollection() { 48714 this._length = 0; 48715 this._maxLength = 4; 48716 this.shapes = createSizedArray(this._maxLength); 48717 } 48718 48719 ShapeCollection.prototype.addShape = function (shapeData) { 48720 if (this._length === this._maxLength) { 48721 this.shapes = this.shapes.concat(createSizedArray(this._maxLength)); 48722 this._maxLength *= 2; 48723 } 48724 48725 this.shapes[this._length] = shapeData; 48726 this._length += 1; 48727 }; 48728 48729 ShapeCollection.prototype.releaseShapes = function () { 48730 var i; 48731 48732 for (i = 0; i < this._length; i += 1) { 48733 shapePool.release(this.shapes[i]); 48734 } 48735 48736 this._length = 0; 48737 }; 48738 48739 var shapeCollectionPool = function () { 48740 var ob = { 48741 newShapeCollection: newShapeCollection, 48742 release: release 48743 }; 48744 var _length = 0; 48745 var _maxLength = 4; 48746 var pool = createSizedArray(_maxLength); 48747 48748 function newShapeCollection() { 48749 var shapeCollection; 48750 48751 if (_length) { 48752 _length -= 1; 48753 shapeCollection = pool[_length]; 48754 } else { 48755 shapeCollection = new ShapeCollection(); 48756 } 48757 48758 return shapeCollection; 48759 } 48760 48761 function release(shapeCollection) { 48762 var i; 48763 var len = shapeCollection._length; 48764 48765 for (i = 0; i < len; i += 1) { 48766 shapePool.release(shapeCollection.shapes[i]); 48767 } 48768 48769 shapeCollection._length = 0; 48770 48771 if (_length === _maxLength) { 48772 pool = pooling["double"](pool); 48773 _maxLength *= 2; 48774 } 48775 48776 pool[_length] = shapeCollection; 48777 _length += 1; 48778 } 48779 48780 return ob; 48781 }(); 48782 48783 var ShapePropertyFactory = function () { 48784 var initFrame = -999999; 48785 48786 function interpolateShape(frameNum, previousValue, caching) { 48787 var iterationIndex = caching.lastIndex; 48788 var keyPropS; 48789 var keyPropE; 48790 var isHold; 48791 var j; 48792 var k; 48793 var jLen; 48794 var kLen; 48795 var perc; 48796 var vertexValue; 48797 var kf = this.keyframes; 48798 48799 if (frameNum < kf[0].t - this.offsetTime) { 48800 keyPropS = kf[0].s[0]; 48801 isHold = true; 48802 iterationIndex = 0; 48803 } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) { 48804 keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0]; 48805 /* if(kf[kf.length - 1].s){ 48806 keyPropS = kf[kf.length - 1].s[0]; 48807 }else{ 48808 keyPropS = kf[kf.length - 2].e[0]; 48809 } */ 48810 48811 isHold = true; 48812 } else { 48813 var i = iterationIndex; 48814 var len = kf.length - 1; 48815 var flag = true; 48816 var keyData; 48817 var nextKeyData; 48818 var keyframeMetadata; 48819 48820 while (flag) { 48821 keyData = kf[i]; 48822 nextKeyData = kf[i + 1]; 48823 48824 if (nextKeyData.t - this.offsetTime > frameNum) { 48825 break; 48826 } 48827 48828 if (i < len - 1) { 48829 i += 1; 48830 } else { 48831 flag = false; 48832 } 48833 } 48834 48835 keyframeMetadata = this.keyframesMetadata[i] || {}; 48836 isHold = keyData.h === 1; 48837 iterationIndex = i; 48838 48839 if (!isHold) { 48840 if (frameNum >= nextKeyData.t - this.offsetTime) { 48841 perc = 1; 48842 } else if (frameNum < keyData.t - this.offsetTime) { 48843 perc = 0; 48844 } else { 48845 var fnc; 48846 48847 if (keyframeMetadata.__fnct) { 48848 fnc = keyframeMetadata.__fnct; 48849 } else { 48850 fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get; 48851 keyframeMetadata.__fnct = fnc; 48852 } 48853 48854 perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime))); 48855 } 48856 48857 keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0]; 48858 } 48859 48860 keyPropS = keyData.s[0]; 48861 } 48862 48863 jLen = previousValue._length; 48864 kLen = keyPropS.i[0].length; 48865 caching.lastIndex = iterationIndex; 48866 48867 for (j = 0; j < jLen; j += 1) { 48868 for (k = 0; k < kLen; k += 1) { 48869 vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc; 48870 previousValue.i[j][k] = vertexValue; 48871 vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc; 48872 previousValue.o[j][k] = vertexValue; 48873 vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc; 48874 previousValue.v[j][k] = vertexValue; 48875 } 48876 } 48877 } 48878 48879 function interpolateShapeCurrentTime() { 48880 var frameNum = this.comp.renderedFrame - this.offsetTime; 48881 var initTime = this.keyframes[0].t - this.offsetTime; 48882 var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; 48883 var lastFrame = this._caching.lastFrame; 48884 48885 if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) { 48886 /// / 48887 this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0; 48888 this.interpolateShape(frameNum, this.pv, this._caching); /// / 48889 } 48890 48891 this._caching.lastFrame = frameNum; 48892 return this.pv; 48893 } 48894 48895 function resetShape() { 48896 this.paths = this.localShapeCollection; 48897 } 48898 48899 function shapesEqual(shape1, shape2) { 48900 if (shape1._length !== shape2._length || shape1.c !== shape2.c) { 48901 return false; 48902 } 48903 48904 var i; 48905 var len = shape1._length; 48906 48907 for (i = 0; i < len; i += 1) { 48908 if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) { 48909 return false; 48910 } 48911 } 48912 48913 return true; 48914 } 48915 48916 function setVValue(newPath) { 48917 if (!shapesEqual(this.v, newPath)) { 48918 this.v = shapePool.clone(newPath); 48919 this.localShapeCollection.releaseShapes(); 48920 this.localShapeCollection.addShape(this.v); 48921 this._mdf = true; 48922 this.paths = this.localShapeCollection; 48923 } 48924 } 48925 48926 function processEffectsSequence() { 48927 if (this.elem.globalData.frameId === this.frameId) { 48928 return; 48929 } 48930 48931 if (!this.effectsSequence.length) { 48932 this._mdf = false; 48933 return; 48934 } 48935 48936 if (this.lock) { 48937 this.setVValue(this.pv); 48938 return; 48939 } 48940 48941 this.lock = true; 48942 this._mdf = false; 48943 var finalValue; 48944 48945 if (this.kf) { 48946 finalValue = this.pv; 48947 } else if (this.data.ks) { 48948 finalValue = this.data.ks.k; 48949 } else { 48950 finalValue = this.data.pt.k; 48951 } 48952 48953 var i; 48954 var len = this.effectsSequence.length; 48955 48956 for (i = 0; i < len; i += 1) { 48957 finalValue = this.effectsSequence[i](finalValue); 48958 } 48959 48960 this.setVValue(finalValue); 48961 this.lock = false; 48962 this.frameId = this.elem.globalData.frameId; 48963 } 48964 48965 function ShapeProperty(elem, data, type) { 48966 this.propType = 'shape'; 48967 this.comp = elem.comp; 48968 this.container = elem; 48969 this.elem = elem; 48970 this.data = data; 48971 this.k = false; 48972 this.kf = false; 48973 this._mdf = false; 48974 var pathData = type === 3 ? data.pt.k : data.ks.k; 48975 this.v = shapePool.clone(pathData); 48976 this.pv = shapePool.clone(this.v); 48977 this.localShapeCollection = shapeCollectionPool.newShapeCollection(); 48978 this.paths = this.localShapeCollection; 48979 this.paths.addShape(this.v); 48980 this.reset = resetShape; 48981 this.effectsSequence = []; 48982 } 48983 48984 function addEffect(effectFunction) { 48985 this.effectsSequence.push(effectFunction); 48986 this.container.addDynamicProperty(this); 48987 } 48988 48989 ShapeProperty.prototype.interpolateShape = interpolateShape; 48990 ShapeProperty.prototype.getValue = processEffectsSequence; 48991 ShapeProperty.prototype.setVValue = setVValue; 48992 ShapeProperty.prototype.addEffect = addEffect; 48993 48994 function KeyframedShapeProperty(elem, data, type) { 48995 this.propType = 'shape'; 48996 this.comp = elem.comp; 48997 this.elem = elem; 48998 this.container = elem; 48999 this.offsetTime = elem.data.st; 49000 this.keyframes = type === 3 ? data.pt.k : data.ks.k; 49001 this.keyframesMetadata = []; 49002 this.k = true; 49003 this.kf = true; 49004 var len = this.keyframes[0].s[0].i.length; 49005 this.v = shapePool.newElement(); 49006 this.v.setPathData(this.keyframes[0].s[0].c, len); 49007 this.pv = shapePool.clone(this.v); 49008 this.localShapeCollection = shapeCollectionPool.newShapeCollection(); 49009 this.paths = this.localShapeCollection; 49010 this.paths.addShape(this.v); 49011 this.lastFrame = initFrame; 49012 this.reset = resetShape; 49013 this._caching = { 49014 lastFrame: initFrame, 49015 lastIndex: 0 49016 }; 49017 this.effectsSequence = [interpolateShapeCurrentTime.bind(this)]; 49018 } 49019 49020 KeyframedShapeProperty.prototype.getValue = processEffectsSequence; 49021 KeyframedShapeProperty.prototype.interpolateShape = interpolateShape; 49022 KeyframedShapeProperty.prototype.setVValue = setVValue; 49023 KeyframedShapeProperty.prototype.addEffect = addEffect; 49024 49025 var EllShapeProperty = function () { 49026 var cPoint = roundCorner; 49027 49028 function EllShapePropertyFactory(elem, data) { 49029 this.v = shapePool.newElement(); 49030 this.v.setPathData(true, 4); 49031 this.localShapeCollection = shapeCollectionPool.newShapeCollection(); 49032 this.paths = this.localShapeCollection; 49033 this.localShapeCollection.addShape(this.v); 49034 this.d = data.d; 49035 this.elem = elem; 49036 this.comp = elem.comp; 49037 this.frameId = -1; 49038 this.initDynamicPropertyContainer(elem); 49039 this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); 49040 this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this); 49041 49042 if (this.dynamicProperties.length) { 49043 this.k = true; 49044 } else { 49045 this.k = false; 49046 this.convertEllToPath(); 49047 } 49048 } 49049 49050 EllShapePropertyFactory.prototype = { 49051 reset: resetShape, 49052 getValue: function getValue() { 49053 if (this.elem.globalData.frameId === this.frameId) { 49054 return; 49055 } 49056 49057 this.frameId = this.elem.globalData.frameId; 49058 this.iterateDynamicProperties(); 49059 49060 if (this._mdf) { 49061 this.convertEllToPath(); 49062 } 49063 }, 49064 convertEllToPath: function convertEllToPath() { 49065 var p0 = this.p.v[0]; 49066 var p1 = this.p.v[1]; 49067 var s0 = this.s.v[0] / 2; 49068 var s1 = this.s.v[1] / 2; 49069 49070 var _cw = this.d !== 3; 49071 49072 var _v = this.v; 49073 _v.v[0][0] = p0; 49074 _v.v[0][1] = p1 - s1; 49075 _v.v[1][0] = _cw ? p0 + s0 : p0 - s0; 49076 _v.v[1][1] = p1; 49077 _v.v[2][0] = p0; 49078 _v.v[2][1] = p1 + s1; 49079 _v.v[3][0] = _cw ? p0 - s0 : p0 + s0; 49080 _v.v[3][1] = p1; 49081 _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint; 49082 _v.i[0][1] = p1 - s1; 49083 _v.i[1][0] = _cw ? p0 + s0 : p0 - s0; 49084 _v.i[1][1] = p1 - s1 * cPoint; 49085 _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint; 49086 _v.i[2][1] = p1 + s1; 49087 _v.i[3][0] = _cw ? p0 - s0 : p0 + s0; 49088 _v.i[3][1] = p1 + s1 * cPoint; 49089 _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint; 49090 _v.o[0][1] = p1 - s1; 49091 _v.o[1][0] = _cw ? p0 + s0 : p0 - s0; 49092 _v.o[1][1] = p1 + s1 * cPoint; 49093 _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint; 49094 _v.o[2][1] = p1 + s1; 49095 _v.o[3][0] = _cw ? p0 - s0 : p0 + s0; 49096 _v.o[3][1] = p1 - s1 * cPoint; 49097 } 49098 }; 49099 extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory); 49100 return EllShapePropertyFactory; 49101 }(); 49102 49103 var StarShapeProperty = function () { 49104 function StarShapePropertyFactory(elem, data) { 49105 this.v = shapePool.newElement(); 49106 this.v.setPathData(true, 0); 49107 this.elem = elem; 49108 this.comp = elem.comp; 49109 this.data = data; 49110 this.frameId = -1; 49111 this.d = data.d; 49112 this.initDynamicPropertyContainer(elem); 49113 49114 if (data.sy === 1) { 49115 this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this); 49116 this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this); 49117 this.convertToPath = this.convertStarToPath; 49118 } else { 49119 this.convertToPath = this.convertPolygonToPath; 49120 } 49121 49122 this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this); 49123 this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); 49124 this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this); 49125 this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this); 49126 this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this); 49127 this.localShapeCollection = shapeCollectionPool.newShapeCollection(); 49128 this.localShapeCollection.addShape(this.v); 49129 this.paths = this.localShapeCollection; 49130 49131 if (this.dynamicProperties.length) { 49132 this.k = true; 49133 } else { 49134 this.k = false; 49135 this.convertToPath(); 49136 } 49137 } 49138 49139 StarShapePropertyFactory.prototype = { 49140 reset: resetShape, 49141 getValue: function getValue() { 49142 if (this.elem.globalData.frameId === this.frameId) { 49143 return; 49144 } 49145 49146 this.frameId = this.elem.globalData.frameId; 49147 this.iterateDynamicProperties(); 49148 49149 if (this._mdf) { 49150 this.convertToPath(); 49151 } 49152 }, 49153 convertStarToPath: function convertStarToPath() { 49154 var numPts = Math.floor(this.pt.v) * 2; 49155 var angle = Math.PI * 2 / numPts; 49156 /* this.v.v.length = numPts; 49157 this.v.i.length = numPts; 49158 this.v.o.length = numPts; */ 49159 49160 var longFlag = true; 49161 var longRad = this.or.v; 49162 var shortRad = this.ir.v; 49163 var longRound = this.os.v; 49164 var shortRound = this.is.v; 49165 var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2); 49166 var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2); 49167 var i; 49168 var rad; 49169 var roundness; 49170 var perimSegment; 49171 var currentAng = -Math.PI / 2; 49172 currentAng += this.r.v; 49173 var dir = this.data.d === 3 ? -1 : 1; 49174 this.v._length = 0; 49175 49176 for (i = 0; i < numPts; i += 1) { 49177 rad = longFlag ? longRad : shortRad; 49178 roundness = longFlag ? longRound : shortRound; 49179 perimSegment = longFlag ? longPerimSegment : shortPerimSegment; 49180 var x = rad * Math.cos(currentAng); 49181 var y = rad * Math.sin(currentAng); 49182 var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y); 49183 var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y); 49184 x += +this.p.v[0]; 49185 y += +this.p.v[1]; 49186 this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true); 49187 /* this.v.v[i] = [x,y]; 49188 this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir]; 49189 this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir]; 49190 this.v._length = numPts; */ 49191 49192 longFlag = !longFlag; 49193 currentAng += angle * dir; 49194 } 49195 }, 49196 convertPolygonToPath: function convertPolygonToPath() { 49197 var numPts = Math.floor(this.pt.v); 49198 var angle = Math.PI * 2 / numPts; 49199 var rad = this.or.v; 49200 var roundness = this.os.v; 49201 var perimSegment = 2 * Math.PI * rad / (numPts * 4); 49202 var i; 49203 var currentAng = -Math.PI * 0.5; 49204 var dir = this.data.d === 3 ? -1 : 1; 49205 currentAng += this.r.v; 49206 this.v._length = 0; 49207 49208 for (i = 0; i < numPts; i += 1) { 49209 var x = rad * Math.cos(currentAng); 49210 var y = rad * Math.sin(currentAng); 49211 var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y); 49212 var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y); 49213 x += +this.p.v[0]; 49214 y += +this.p.v[1]; 49215 this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true); 49216 currentAng += angle * dir; 49217 } 49218 49219 this.paths.length = 0; 49220 this.paths[0] = this.v; 49221 } 49222 }; 49223 extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory); 49224 return StarShapePropertyFactory; 49225 }(); 49226 49227 var RectShapeProperty = function () { 49228 function RectShapePropertyFactory(elem, data) { 49229 this.v = shapePool.newElement(); 49230 this.v.c = true; 49231 this.localShapeCollection = shapeCollectionPool.newShapeCollection(); 49232 this.localShapeCollection.addShape(this.v); 49233 this.paths = this.localShapeCollection; 49234 this.elem = elem; 49235 this.comp = elem.comp; 49236 this.frameId = -1; 49237 this.d = data.d; 49238 this.initDynamicPropertyContainer(elem); 49239 this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); 49240 this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this); 49241 this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this); 49242 49243 if (this.dynamicProperties.length) { 49244 this.k = true; 49245 } else { 49246 this.k = false; 49247 this.convertRectToPath(); 49248 } 49249 } 49250 49251 RectShapePropertyFactory.prototype = { 49252 convertRectToPath: function convertRectToPath() { 49253 var p0 = this.p.v[0]; 49254 var p1 = this.p.v[1]; 49255 var v0 = this.s.v[0] / 2; 49256 var v1 = this.s.v[1] / 2; 49257 var round = bmMin(v0, v1, this.r.v); 49258 var cPoint = round * (1 - roundCorner); 49259 this.v._length = 0; 49260 49261 if (this.d === 2 || this.d === 1) { 49262 this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true); 49263 this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true); 49264 49265 if (round !== 0) { 49266 this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true); 49267 this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true); 49268 this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true); 49269 this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true); 49270 this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true); 49271 this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true); 49272 } else { 49273 this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2); 49274 this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3); 49275 } 49276 } else { 49277 this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true); 49278 49279 if (round !== 0) { 49280 this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true); 49281 this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true); 49282 this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true); 49283 this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true); 49284 this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true); 49285 this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true); 49286 this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true); 49287 } else { 49288 this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true); 49289 this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true); 49290 this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true); 49291 } 49292 } 49293 }, 49294 getValue: function getValue() { 49295 if (this.elem.globalData.frameId === this.frameId) { 49296 return; 49297 } 49298 49299 this.frameId = this.elem.globalData.frameId; 49300 this.iterateDynamicProperties(); 49301 49302 if (this._mdf) { 49303 this.convertRectToPath(); 49304 } 49305 }, 49306 reset: resetShape 49307 }; 49308 extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory); 49309 return RectShapePropertyFactory; 49310 }(); 49311 49312 function getShapeProp(elem, data, type) { 49313 var prop; 49314 49315 if (type === 3 || type === 4) { 49316 var dataProp = type === 3 ? data.pt : data.ks; 49317 var keys = dataProp.k; 49318 49319 if (keys.length) { 49320 prop = new KeyframedShapeProperty(elem, data, type); 49321 } else { 49322 prop = new ShapeProperty(elem, data, type); 49323 } 49324 } else if (type === 5) { 49325 prop = new RectShapeProperty(elem, data); 49326 } else if (type === 6) { 49327 prop = new EllShapeProperty(elem, data); 49328 } else if (type === 7) { 49329 prop = new StarShapeProperty(elem, data); 49330 } 49331 49332 if (prop.k) { 49333 elem.addDynamicProperty(prop); 49334 } 49335 49336 return prop; 49337 } 49338 49339 function getConstructorFunction() { 49340 return ShapeProperty; 49341 } 49342 49343 function getKeyframedConstructorFunction() { 49344 return KeyframedShapeProperty; 49345 } 49346 49347 var ob = {}; 49348 ob.getShapeProp = getShapeProp; 49349 ob.getConstructorFunction = getConstructorFunction; 49350 ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction; 49351 return ob; 49352 }(); 49353 49354 /*! 49355 Transformation Matrix v2.0 49356 (c) Epistemex 2014-2015 49357 www.epistemex.com 49358 By Ken Fyrstenberg 49359 Contributions by leeoniya. 49360 License: MIT, header required. 49361 */ 49362 49363 /** 49364 * 2D transformation matrix object initialized with identity matrix. 49365 * 49366 * The matrix can synchronize a canvas context by supplying the context 49367 * as an argument, or later apply current absolute transform to an 49368 * existing context. 49369 * 49370 * All values are handled as floating point values. 49371 * 49372 * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix 49373 * @prop {number} a - scale x 49374 * @prop {number} b - shear y 49375 * @prop {number} c - shear x 49376 * @prop {number} d - scale y 49377 * @prop {number} e - translate x 49378 * @prop {number} f - translate y 49379 * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context 49380 * @constructor 49381 */ 49382 49383 var Matrix = function () { 49384 var _cos = Math.cos; 49385 var _sin = Math.sin; 49386 var _tan = Math.tan; 49387 var _rnd = Math.round; 49388 49389 function reset() { 49390 this.props[0] = 1; 49391 this.props[1] = 0; 49392 this.props[2] = 0; 49393 this.props[3] = 0; 49394 this.props[4] = 0; 49395 this.props[5] = 1; 49396 this.props[6] = 0; 49397 this.props[7] = 0; 49398 this.props[8] = 0; 49399 this.props[9] = 0; 49400 this.props[10] = 1; 49401 this.props[11] = 0; 49402 this.props[12] = 0; 49403 this.props[13] = 0; 49404 this.props[14] = 0; 49405 this.props[15] = 1; 49406 return this; 49407 } 49408 49409 function rotate(angle) { 49410 if (angle === 0) { 49411 return this; 49412 } 49413 49414 var mCos = _cos(angle); 49415 49416 var mSin = _sin(angle); 49417 49418 return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); 49419 } 49420 49421 function rotateX(angle) { 49422 if (angle === 0) { 49423 return this; 49424 } 49425 49426 var mCos = _cos(angle); 49427 49428 var mSin = _sin(angle); 49429 49430 return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1); 49431 } 49432 49433 function rotateY(angle) { 49434 if (angle === 0) { 49435 return this; 49436 } 49437 49438 var mCos = _cos(angle); 49439 49440 var mSin = _sin(angle); 49441 49442 return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1); 49443 } 49444 49445 function rotateZ(angle) { 49446 if (angle === 0) { 49447 return this; 49448 } 49449 49450 var mCos = _cos(angle); 49451 49452 var mSin = _sin(angle); 49453 49454 return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); 49455 } 49456 49457 function shear(sx, sy) { 49458 return this._t(1, sy, sx, 1, 0, 0); 49459 } 49460 49461 function skew(ax, ay) { 49462 return this.shear(_tan(ax), _tan(ay)); 49463 } 49464 49465 function skewFromAxis(ax, angle) { 49466 var mCos = _cos(angle); 49467 49468 var mSin = _sin(angle); 49469 49470 return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0); 49471 } 49472 49473 function scale(sx, sy, sz) { 49474 if (!sz && sz !== 0) { 49475 sz = 1; 49476 } 49477 49478 if (sx === 1 && sy === 1 && sz === 1) { 49479 return this; 49480 } 49481 49482 return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1); 49483 } 49484 49485 function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) { 49486 this.props[0] = a; 49487 this.props[1] = b; 49488 this.props[2] = c; 49489 this.props[3] = d; 49490 this.props[4] = e; 49491 this.props[5] = f; 49492 this.props[6] = g; 49493 this.props[7] = h; 49494 this.props[8] = i; 49495 this.props[9] = j; 49496 this.props[10] = k; 49497 this.props[11] = l; 49498 this.props[12] = m; 49499 this.props[13] = n; 49500 this.props[14] = o; 49501 this.props[15] = p; 49502 return this; 49503 } 49504 49505 function translate(tx, ty, tz) { 49506 tz = tz || 0; 49507 49508 if (tx !== 0 || ty !== 0 || tz !== 0) { 49509 return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1); 49510 } 49511 49512 return this; 49513 } 49514 49515 function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) { 49516 var _p = this.props; 49517 49518 if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) { 49519 // NOTE: commenting this condition because TurboFan deoptimizes code when present 49520 // if(m2 !== 0 || n2 !== 0 || o2 !== 0){ 49521 _p[12] = _p[12] * a2 + _p[15] * m2; 49522 _p[13] = _p[13] * f2 + _p[15] * n2; 49523 _p[14] = _p[14] * k2 + _p[15] * o2; 49524 _p[15] *= p2; // } 49525 49526 this._identityCalculated = false; 49527 return this; 49528 } 49529 49530 var a1 = _p[0]; 49531 var b1 = _p[1]; 49532 var c1 = _p[2]; 49533 var d1 = _p[3]; 49534 var e1 = _p[4]; 49535 var f1 = _p[5]; 49536 var g1 = _p[6]; 49537 var h1 = _p[7]; 49538 var i1 = _p[8]; 49539 var j1 = _p[9]; 49540 var k1 = _p[10]; 49541 var l1 = _p[11]; 49542 var m1 = _p[12]; 49543 var n1 = _p[13]; 49544 var o1 = _p[14]; 49545 var p1 = _p[15]; 49546 /* matrix order (canvas compatible): 49547 * ace 49548 * bdf 49549 * 001 49550 */ 49551 49552 _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2; 49553 _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2; 49554 _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2; 49555 _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2; 49556 _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2; 49557 _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2; 49558 _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2; 49559 _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2; 49560 _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2; 49561 _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2; 49562 _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2; 49563 _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2; 49564 _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2; 49565 _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2; 49566 _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2; 49567 _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2; 49568 this._identityCalculated = false; 49569 return this; 49570 } 49571 49572 function multiply(matrix) { 49573 var matrixProps = matrix.props; 49574 return this.transform(matrixProps[0], matrixProps[1], matrixProps[2], matrixProps[3], matrixProps[4], matrixProps[5], matrixProps[6], matrixProps[7], matrixProps[8], matrixProps[9], matrixProps[10], matrixProps[11], matrixProps[12], matrixProps[13], matrixProps[14], matrixProps[15]); 49575 } 49576 49577 function isIdentity() { 49578 if (!this._identityCalculated) { 49579 this._identity = !(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); 49580 this._identityCalculated = true; 49581 } 49582 49583 return this._identity; 49584 } 49585 49586 function equals(matr) { 49587 var i = 0; 49588 49589 while (i < 16) { 49590 if (matr.props[i] !== this.props[i]) { 49591 return false; 49592 } 49593 49594 i += 1; 49595 } 49596 49597 return true; 49598 } 49599 49600 function clone(matr) { 49601 var i; 49602 49603 for (i = 0; i < 16; i += 1) { 49604 matr.props[i] = this.props[i]; 49605 } 49606 49607 return matr; 49608 } 49609 49610 function cloneFromProps(props) { 49611 var i; 49612 49613 for (i = 0; i < 16; i += 1) { 49614 this.props[i] = props[i]; 49615 } 49616 } 49617 49618 function applyToPoint(x, y, z) { 49619 return { 49620 x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], 49621 y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], 49622 z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14] 49623 }; 49624 /* return { 49625 x: x * me.a + y * me.c + me.e, 49626 y: x * me.b + y * me.d + me.f 49627 }; */ 49628 } 49629 49630 function applyToX(x, y, z) { 49631 return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12]; 49632 } 49633 49634 function applyToY(x, y, z) { 49635 return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13]; 49636 } 49637 49638 function applyToZ(x, y, z) { 49639 return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]; 49640 } 49641 49642 function getInverseMatrix() { 49643 var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4]; 49644 var a = this.props[5] / determinant; 49645 var b = -this.props[1] / determinant; 49646 var c = -this.props[4] / determinant; 49647 var d = this.props[0] / determinant; 49648 var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant; 49649 var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant; 49650 var inverseMatrix = new Matrix(); 49651 inverseMatrix.props[0] = a; 49652 inverseMatrix.props[1] = b; 49653 inverseMatrix.props[4] = c; 49654 inverseMatrix.props[5] = d; 49655 inverseMatrix.props[12] = e; 49656 inverseMatrix.props[13] = f; 49657 return inverseMatrix; 49658 } 49659 49660 function inversePoint(pt) { 49661 var inverseMatrix = this.getInverseMatrix(); 49662 return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0); 49663 } 49664 49665 function inversePoints(pts) { 49666 var i; 49667 var len = pts.length; 49668 var retPts = []; 49669 49670 for (i = 0; i < len; i += 1) { 49671 retPts[i] = inversePoint(pts[i]); 49672 } 49673 49674 return retPts; 49675 } 49676 49677 function applyToTriplePoints(pt1, pt2, pt3) { 49678 var arr = createTypedArray('float32', 6); 49679 49680 if (this.isIdentity()) { 49681 arr[0] = pt1[0]; 49682 arr[1] = pt1[1]; 49683 arr[2] = pt2[0]; 49684 arr[3] = pt2[1]; 49685 arr[4] = pt3[0]; 49686 arr[5] = pt3[1]; 49687 } else { 49688 var p0 = this.props[0]; 49689 var p1 = this.props[1]; 49690 var p4 = this.props[4]; 49691 var p5 = this.props[5]; 49692 var p12 = this.props[12]; 49693 var p13 = this.props[13]; 49694 arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12; 49695 arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13; 49696 arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12; 49697 arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13; 49698 arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12; 49699 arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13; 49700 } 49701 49702 return arr; 49703 } 49704 49705 function applyToPointArray(x, y, z) { 49706 var arr; 49707 49708 if (this.isIdentity()) { 49709 arr = [x, y, z]; 49710 } else { 49711 arr = [x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]]; 49712 } 49713 49714 return arr; 49715 } 49716 49717 function applyToPointStringified(x, y) { 49718 if (this.isIdentity()) { 49719 return x + ',' + y; 49720 } 49721 49722 var _p = this.props; 49723 return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100; 49724 } 49725 49726 function toCSS() { 49727 // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed. 49728 49729 /* if(this.isIdentity()) { 49730 return ''; 49731 } */ 49732 var i = 0; 49733 var props = this.props; 49734 var cssValue = 'matrix3d('; 49735 var v = 10000; 49736 49737 while (i < 16) { 49738 cssValue += _rnd(props[i] * v) / v; 49739 cssValue += i === 15 ? ')' : ','; 49740 i += 1; 49741 } 49742 49743 return cssValue; 49744 } 49745 49746 function roundMatrixProperty(val) { 49747 var v = 10000; 49748 49749 if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) { 49750 return _rnd(val * v) / v; 49751 } 49752 49753 return val; 49754 } 49755 49756 function to2dCSS() { 49757 // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed. 49758 49759 /* if(this.isIdentity()) { 49760 return ''; 49761 } */ 49762 var props = this.props; 49763 49764 var _a = roundMatrixProperty(props[0]); 49765 49766 var _b = roundMatrixProperty(props[1]); 49767 49768 var _c = roundMatrixProperty(props[4]); 49769 49770 var _d = roundMatrixProperty(props[5]); 49771 49772 var _e = roundMatrixProperty(props[12]); 49773 49774 var _f = roundMatrixProperty(props[13]); 49775 49776 return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')'; 49777 } 49778 49779 return function () { 49780 this.reset = reset; 49781 this.rotate = rotate; 49782 this.rotateX = rotateX; 49783 this.rotateY = rotateY; 49784 this.rotateZ = rotateZ; 49785 this.skew = skew; 49786 this.skewFromAxis = skewFromAxis; 49787 this.shear = shear; 49788 this.scale = scale; 49789 this.setTransform = setTransform; 49790 this.translate = translate; 49791 this.transform = transform; 49792 this.multiply = multiply; 49793 this.applyToPoint = applyToPoint; 49794 this.applyToX = applyToX; 49795 this.applyToY = applyToY; 49796 this.applyToZ = applyToZ; 49797 this.applyToPointArray = applyToPointArray; 49798 this.applyToTriplePoints = applyToTriplePoints; 49799 this.applyToPointStringified = applyToPointStringified; 49800 this.toCSS = toCSS; 49801 this.to2dCSS = to2dCSS; 49802 this.clone = clone; 49803 this.cloneFromProps = cloneFromProps; 49804 this.equals = equals; 49805 this.inversePoints = inversePoints; 49806 this.inversePoint = inversePoint; 49807 this.getInverseMatrix = getInverseMatrix; 49808 this._t = this.transform; 49809 this.isIdentity = isIdentity; 49810 this._identity = true; 49811 this._identityCalculated = false; 49812 this.props = createTypedArray('float32', 16); 49813 this.reset(); 49814 }; 49815 }(); 49816 49817 function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); } 49818 var lottie = {}; 49819 var standalone = '__[STANDALONE]__'; 49820 var animationData = '__[ANIMATIONDATA]__'; 49821 var renderer = ''; 49822 49823 function setLocation(href) { 49824 setLocationHref(href); 49825 } 49826 49827 function searchAnimations() { 49828 if (standalone === true) { 49829 animationManager.searchAnimations(animationData, standalone, renderer); 49830 } else { 49831 animationManager.searchAnimations(); 49832 } 49833 } 49834 49835 function setSubframeRendering(flag) { 49836 setSubframeEnabled(flag); 49837 } 49838 49839 function setPrefix(prefix) { 49840 setIdPrefix(prefix); 49841 } 49842 49843 function loadAnimation(params) { 49844 if (standalone === true) { 49845 params.animationData = JSON.parse(animationData); 49846 } 49847 49848 return animationManager.loadAnimation(params); 49849 } 49850 49851 function setQuality(value) { 49852 if (typeof value === 'string') { 49853 switch (value) { 49854 case 'high': 49855 setDefaultCurveSegments(200); 49856 break; 49857 49858 default: 49859 case 'medium': 49860 setDefaultCurveSegments(50); 49861 break; 49862 49863 case 'low': 49864 setDefaultCurveSegments(10); 49865 break; 49866 } 49867 } else if (!isNaN(value) && value > 1) { 49868 setDefaultCurveSegments(value); 49869 } 49870 49871 if (getDefaultCurveSegments() >= 50) { 49872 roundValues(false); 49873 } else { 49874 roundValues(true); 49875 } 49876 } 49877 49878 function inBrowser() { 49879 return typeof navigator !== 'undefined'; 49880 } 49881 49882 function installPlugin(type, plugin) { 49883 if (type === 'expressions') { 49884 setExpressionsPlugin(plugin); 49885 } 49886 } 49887 49888 function getFactory(name) { 49889 switch (name) { 49890 case 'propertyFactory': 49891 return PropertyFactory; 49892 49893 case 'shapePropertyFactory': 49894 return ShapePropertyFactory; 49895 49896 case 'matrix': 49897 return Matrix; 49898 49899 default: 49900 return null; 49901 } 49902 } 49903 49904 lottie.play = animationManager.play; 49905 lottie.pause = animationManager.pause; 49906 lottie.setLocationHref = setLocation; 49907 lottie.togglePause = animationManager.togglePause; 49908 lottie.setSpeed = animationManager.setSpeed; 49909 lottie.setDirection = animationManager.setDirection; 49910 lottie.stop = animationManager.stop; 49911 lottie.searchAnimations = searchAnimations; 49912 lottie.registerAnimation = animationManager.registerAnimation; 49913 lottie.loadAnimation = loadAnimation; 49914 lottie.setSubframeRendering = setSubframeRendering; 49915 lottie.resize = animationManager.resize; // lottie.start = start; 49916 49917 lottie.goToAndStop = animationManager.goToAndStop; 49918 lottie.destroy = animationManager.destroy; 49919 lottie.setQuality = setQuality; 49920 lottie.inBrowser = inBrowser; 49921 lottie.installPlugin = installPlugin; 49922 lottie.freeze = animationManager.freeze; 49923 lottie.unfreeze = animationManager.unfreeze; 49924 lottie.setVolume = animationManager.setVolume; 49925 lottie.mute = animationManager.mute; 49926 lottie.unmute = animationManager.unmute; 49927 lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations; 49928 lottie.useWebWorker = setWebWorker; 49929 lottie.setIDPrefix = setPrefix; 49930 lottie.__getFactory = getFactory; 49931 lottie.version = '5.12.2'; 49932 49933 function checkReady() { 49934 if (document.readyState === 'complete') { 49935 clearInterval(readyStateCheckInterval); 49936 searchAnimations(); 49937 } 49938 } 49939 49940 function getQueryVariable(variable) { 49941 var vars = queryString.split('&'); 49942 49943 for (var i = 0; i < vars.length; i += 1) { 49944 var pair = vars[i].split('='); 49945 49946 if (decodeURIComponent(pair[0]) == variable) { 49947 // eslint-disable-line eqeqeq 49948 return decodeURIComponent(pair[1]); 49949 } 49950 } 49951 49952 return null; 49953 } 49954 49955 var queryString = ''; 49956 49957 if (standalone) { 49958 var scripts = document.getElementsByTagName('script'); 49959 var index = scripts.length - 1; 49960 var myScript = scripts[index] || { 49961 src: '' 49962 }; 49963 queryString = myScript.src ? myScript.src.replace(/^[^\?]+\??/, '') : ''; // eslint-disable-line no-useless-escape 49964 49965 renderer = getQueryVariable('renderer'); 49966 } 49967 49968 var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility 49969 49970 try { 49971 if (!((typeof exports === "undefined" ? "undefined" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef 49972 ) { 49973 window.bodymovin = lottie; 49974 } 49975 } catch (err) {// 49976 } 49977 49978 var ShapeModifiers = function () { 49979 var ob = {}; 49980 var modifiers = {}; 49981 ob.registerModifier = registerModifier; 49982 ob.getModifier = getModifier; 49983 49984 function registerModifier(nm, factory) { 49985 if (!modifiers[nm]) { 49986 modifiers[nm] = factory; 49987 } 49988 } 49989 49990 function getModifier(nm, elem, data) { 49991 return new modifiers[nm](elem, data); 49992 } 49993 49994 return ob; 49995 }(); 49996 49997 function ShapeModifier() {} 49998 49999 ShapeModifier.prototype.initModifierProperties = function () {}; 50000 50001 ShapeModifier.prototype.addShapeToModifier = function () {}; 50002 50003 ShapeModifier.prototype.addShape = function (data) { 50004 if (!this.closed) { 50005 // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick. 50006 data.sh.container.addDynamicProperty(data.sh); 50007 var shapeData = { 50008 shape: data.sh, 50009 data: data, 50010 localShapeCollection: shapeCollectionPool.newShapeCollection() 50011 }; 50012 this.shapes.push(shapeData); 50013 this.addShapeToModifier(shapeData); 50014 50015 if (this._isAnimated) { 50016 data.setAsAnimated(); 50017 } 50018 } 50019 }; 50020 50021 ShapeModifier.prototype.init = function (elem, data) { 50022 this.shapes = []; 50023 this.elem = elem; 50024 this.initDynamicPropertyContainer(elem); 50025 this.initModifierProperties(elem, data); 50026 this.frameId = initialDefaultFrame; 50027 this.closed = false; 50028 this.k = false; 50029 50030 if (this.dynamicProperties.length) { 50031 this.k = true; 50032 } else { 50033 this.getValue(true); 50034 } 50035 }; 50036 50037 ShapeModifier.prototype.processKeys = function () { 50038 if (this.elem.globalData.frameId === this.frameId) { 50039 return; 50040 } 50041 50042 this.frameId = this.elem.globalData.frameId; 50043 this.iterateDynamicProperties(); 50044 }; 50045 50046 extendPrototype([DynamicPropertyContainer], ShapeModifier); 50047 50048 function TrimModifier() {} 50049 50050 extendPrototype([ShapeModifier], TrimModifier); 50051 50052 TrimModifier.prototype.initModifierProperties = function (elem, data) { 50053 this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this); 50054 this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this); 50055 this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this); 50056 this.sValue = 0; 50057 this.eValue = 0; 50058 this.getValue = this.processKeys; 50059 this.m = data.m; 50060 this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length; 50061 }; 50062 50063 TrimModifier.prototype.addShapeToModifier = function (shapeData) { 50064 shapeData.pathsData = []; 50065 }; 50066 50067 TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) { 50068 var segments = []; 50069 50070 if (e <= 1) { 50071 segments.push({ 50072 s: s, 50073 e: e 50074 }); 50075 } else if (s >= 1) { 50076 segments.push({ 50077 s: s - 1, 50078 e: e - 1 50079 }); 50080 } else { 50081 segments.push({ 50082 s: s, 50083 e: 1 50084 }); 50085 segments.push({ 50086 s: 0, 50087 e: e - 1 50088 }); 50089 } 50090 50091 var shapeSegments = []; 50092 var i; 50093 var len = segments.length; 50094 var segmentOb; 50095 50096 for (i = 0; i < len; i += 1) { 50097 segmentOb = segments[i]; 50098 50099 if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) { 50100 var shapeS; 50101 var shapeE; 50102 50103 if (segmentOb.s * totalModifierLength <= addedLength) { 50104 shapeS = 0; 50105 } else { 50106 shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength; 50107 } 50108 50109 if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) { 50110 shapeE = 1; 50111 } else { 50112 shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength; 50113 } 50114 50115 shapeSegments.push([shapeS, shapeE]); 50116 } 50117 } 50118 50119 if (!shapeSegments.length) { 50120 shapeSegments.push([0, 0]); 50121 } 50122 50123 return shapeSegments; 50124 }; 50125 50126 TrimModifier.prototype.releasePathsData = function (pathsData) { 50127 var i; 50128 var len = pathsData.length; 50129 50130 for (i = 0; i < len; i += 1) { 50131 segmentsLengthPool.release(pathsData[i]); 50132 } 50133 50134 pathsData.length = 0; 50135 return pathsData; 50136 }; 50137 50138 TrimModifier.prototype.processShapes = function (_isFirstFrame) { 50139 var s; 50140 var e; 50141 50142 if (this._mdf || _isFirstFrame) { 50143 var o = this.o.v % 360 / 360; 50144 50145 if (o < 0) { 50146 o += 1; 50147 } 50148 50149 if (this.s.v > 1) { 50150 s = 1 + o; 50151 } else if (this.s.v < 0) { 50152 s = 0 + o; 50153 } else { 50154 s = this.s.v + o; 50155 } 50156 50157 if (this.e.v > 1) { 50158 e = 1 + o; 50159 } else if (this.e.v < 0) { 50160 e = 0 + o; 50161 } else { 50162 e = this.e.v + o; 50163 } 50164 50165 if (s > e) { 50166 var _s = s; 50167 s = e; 50168 e = _s; 50169 } 50170 50171 s = Math.round(s * 10000) * 0.0001; 50172 e = Math.round(e * 10000) * 0.0001; 50173 this.sValue = s; 50174 this.eValue = e; 50175 } else { 50176 s = this.sValue; 50177 e = this.eValue; 50178 } 50179 50180 var shapePaths; 50181 var i; 50182 var len = this.shapes.length; 50183 var j; 50184 var jLen; 50185 var pathsData; 50186 var pathData; 50187 var totalShapeLength; 50188 var totalModifierLength = 0; 50189 50190 if (e === s) { 50191 for (i = 0; i < len; i += 1) { 50192 this.shapes[i].localShapeCollection.releaseShapes(); 50193 this.shapes[i].shape._mdf = true; 50194 this.shapes[i].shape.paths = this.shapes[i].localShapeCollection; 50195 50196 if (this._mdf) { 50197 this.shapes[i].pathsData.length = 0; 50198 } 50199 } 50200 } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) { 50201 var segments = []; 50202 var shapeData; 50203 var localShapeCollection; 50204 50205 for (i = 0; i < len; i += 1) { 50206 shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used 50207 50208 if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) { 50209 shapeData.shape.paths = shapeData.localShapeCollection; 50210 } else { 50211 shapePaths = shapeData.shape.paths; 50212 jLen = shapePaths._length; 50213 totalShapeLength = 0; 50214 50215 if (!shapeData.shape._mdf && shapeData.pathsData.length) { 50216 totalShapeLength = shapeData.totalShapeLength; 50217 } else { 50218 pathsData = this.releasePathsData(shapeData.pathsData); 50219 50220 for (j = 0; j < jLen; j += 1) { 50221 pathData = bez.getSegmentsLength(shapePaths.shapes[j]); 50222 pathsData.push(pathData); 50223 totalShapeLength += pathData.totalLength; 50224 } 50225 50226 shapeData.totalShapeLength = totalShapeLength; 50227 shapeData.pathsData = pathsData; 50228 } 50229 50230 totalModifierLength += totalShapeLength; 50231 shapeData.shape._mdf = true; 50232 } 50233 } 50234 50235 var shapeS = s; 50236 var shapeE = e; 50237 var addedLength = 0; 50238 var edges; 50239 50240 for (i = len - 1; i >= 0; i -= 1) { 50241 shapeData = this.shapes[i]; 50242 50243 if (shapeData.shape._mdf) { 50244 localShapeCollection = shapeData.localShapeCollection; 50245 localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group 50246 50247 if (this.m === 2 && len > 1) { 50248 edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength); 50249 addedLength += shapeData.totalShapeLength; 50250 } else { 50251 edges = [[shapeS, shapeE]]; 50252 } 50253 50254 jLen = edges.length; 50255 50256 for (j = 0; j < jLen; j += 1) { 50257 shapeS = edges[j][0]; 50258 shapeE = edges[j][1]; 50259 segments.length = 0; 50260 50261 if (shapeE <= 1) { 50262 segments.push({ 50263 s: shapeData.totalShapeLength * shapeS, 50264 e: shapeData.totalShapeLength * shapeE 50265 }); 50266 } else if (shapeS >= 1) { 50267 segments.push({ 50268 s: shapeData.totalShapeLength * (shapeS - 1), 50269 e: shapeData.totalShapeLength * (shapeE - 1) 50270 }); 50271 } else { 50272 segments.push({ 50273 s: shapeData.totalShapeLength * shapeS, 50274 e: shapeData.totalShapeLength 50275 }); 50276 segments.push({ 50277 s: 0, 50278 e: shapeData.totalShapeLength * (shapeE - 1) 50279 }); 50280 } 50281 50282 var newShapesData = this.addShapes(shapeData, segments[0]); 50283 50284 if (segments[0].s !== segments[0].e) { 50285 if (segments.length > 1) { 50286 var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1]; 50287 50288 if (lastShapeInCollection.c) { 50289 var lastShape = newShapesData.pop(); 50290 this.addPaths(newShapesData, localShapeCollection); 50291 newShapesData = this.addShapes(shapeData, segments[1], lastShape); 50292 } else { 50293 this.addPaths(newShapesData, localShapeCollection); 50294 newShapesData = this.addShapes(shapeData, segments[1]); 50295 } 50296 } 50297 50298 this.addPaths(newShapesData, localShapeCollection); 50299 } 50300 } 50301 50302 shapeData.shape.paths = localShapeCollection; 50303 } 50304 } 50305 } else if (this._mdf) { 50306 for (i = 0; i < len; i += 1) { 50307 // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween. 50308 // Don't remove this even if it's losing cached info. 50309 this.shapes[i].pathsData.length = 0; 50310 this.shapes[i].shape._mdf = true; 50311 } 50312 } 50313 }; 50314 50315 TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) { 50316 var i; 50317 var len = newPaths.length; 50318 50319 for (i = 0; i < len; i += 1) { 50320 localShapeCollection.addShape(newPaths[i]); 50321 } 50322 }; 50323 50324 TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) { 50325 shapePath.setXYAt(pt2[0], pt2[1], 'o', pos); 50326 shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1); 50327 50328 if (newShape) { 50329 shapePath.setXYAt(pt1[0], pt1[1], 'v', pos); 50330 } 50331 50332 shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1); 50333 }; 50334 50335 TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) { 50336 shapePath.setXYAt(points[1], points[5], 'o', pos); 50337 shapePath.setXYAt(points[2], points[6], 'i', pos + 1); 50338 50339 if (newShape) { 50340 shapePath.setXYAt(points[0], points[4], 'v', pos); 50341 } 50342 50343 shapePath.setXYAt(points[3], points[7], 'v', pos + 1); 50344 }; 50345 50346 TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) { 50347 var pathsData = shapeData.pathsData; 50348 var shapePaths = shapeData.shape.paths.shapes; 50349 var i; 50350 var len = shapeData.shape.paths._length; 50351 var j; 50352 var jLen; 50353 var addedLength = 0; 50354 var currentLengthData; 50355 var segmentCount; 50356 var lengths; 50357 var segment; 50358 var shapes = []; 50359 var initPos; 50360 var newShape = true; 50361 50362 if (!shapePath) { 50363 shapePath = shapePool.newElement(); 50364 segmentCount = 0;
vendor: 2,594 bytes, lines 50365-50417
50365 initPos = 0; 50366 } else { 50367 segmentCount = shapePath._length; 50368 initPos = shapePath._length; 50369 } 50370 50371 shapes.push(shapePath); 50372 50373 for (i = 0; i < len; i += 1) { 50374 lengths = pathsData[i].lengths; 50375 shapePath.c = shapePaths[i].c; 50376 jLen = shapePaths[i].c ? lengths.length : lengths.length + 1; 50377 50378 for (j = 1; j < jLen; j += 1) { 50379 currentLengthData = lengths[j - 1]; 50380 50381 if (addedLength + currentLengthData.addedLength < shapeSegment.s) { 50382 addedLength += currentLengthData.addedLength; 50383 shapePath.c = false; 50384 } else if (addedLength > shapeSegment.e) { 50385 shapePath.c = false; 50386 break; 50387 } else { 50388 if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) { 50389 this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape); 50390 newShape = false; 50391 } else { 50392 segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]); 50393 this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape); 50394 50395 newShape = false; 50396 shapePath.c = false; 50397 } 50398 50399 addedLength += currentLengthData.addedLength; 50400 segmentCount += 1; 50401 } 50402 } 50403 50404 if (shapePaths[i].c && lengths.length) { 50405 currentLengthData = lengths[j - 1]; 50406 50407 if (addedLength <= shapeSegment.e) { 50408 var segmentLength = lengths[j - 1].addedLength; 50409 50410 if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) { 50411 this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape); 50412 newShape = false; 50413 } else { 50414 segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]); 50415 this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape); 50416 50417 newShape = false;
vendor: 116,198 bytes, lines 50418-54162
50418 shapePath.c = false; 50419 } 50420 } else { 50421 shapePath.c = false; 50422 } 50423 50424 addedLength += currentLengthData.addedLength; 50425 segmentCount += 1; 50426 } 50427 50428 if (shapePath._length) { 50429 shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos); 50430 shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1); 50431 } 50432 50433 if (addedLength > shapeSegment.e) { 50434 break; 50435 } 50436 50437 if (i < len - 1) { 50438 shapePath = shapePool.newElement(); 50439 newShape = true; 50440 shapes.push(shapePath); 50441 segmentCount = 0; 50442 } 50443 } 50444 50445 return shapes; 50446 }; 50447 50448 function PuckerAndBloatModifier() {} 50449 50450 extendPrototype([ShapeModifier], PuckerAndBloatModifier); 50451 50452 PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) { 50453 this.getValue = this.processKeys; 50454 this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this); 50455 this._isAnimated = !!this.amount.effectsSequence.length; 50456 }; 50457 50458 PuckerAndBloatModifier.prototype.processPath = function (path, amount) { 50459 var percent = amount / 100; 50460 var centerPoint = [0, 0]; 50461 var pathLength = path._length; 50462 var i = 0; 50463 50464 for (i = 0; i < pathLength; i += 1) { 50465 centerPoint[0] += path.v[i][0]; 50466 centerPoint[1] += path.v[i][1]; 50467 } 50468 50469 centerPoint[0] /= pathLength; 50470 centerPoint[1] /= pathLength; 50471 var clonedPath = shapePool.newElement(); 50472 clonedPath.c = path.c; 50473 var vX; 50474 var vY; 50475 var oX; 50476 var oY; 50477 var iX; 50478 var iY; 50479 50480 for (i = 0; i < pathLength; i += 1) { 50481 vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent; 50482 vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent; 50483 oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent; 50484 oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent; 50485 iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent; 50486 iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent; 50487 clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i); 50488 } 50489 50490 return clonedPath; 50491 }; 50492 50493 PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) { 50494 var shapePaths; 50495 var i; 50496 var len = this.shapes.length; 50497 var j; 50498 var jLen; 50499 var amount = this.amount.v; 50500 50501 if (amount !== 0) { 50502 var shapeData; 50503 var localShapeCollection; 50504 50505 for (i = 0; i < len; i += 1) { 50506 shapeData = this.shapes[i]; 50507 localShapeCollection = shapeData.localShapeCollection; 50508 50509 if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { 50510 localShapeCollection.releaseShapes(); 50511 shapeData.shape._mdf = true; 50512 shapePaths = shapeData.shape.paths.shapes; 50513 jLen = shapeData.shape.paths._length; 50514 50515 for (j = 0; j < jLen; j += 1) { 50516 localShapeCollection.addShape(this.processPath(shapePaths[j], amount)); 50517 } 50518 } 50519 50520 shapeData.shape.paths = shapeData.localShapeCollection; 50521 } 50522 } 50523 50524 if (!this.dynamicProperties.length) { 50525 this._mdf = false; 50526 } 50527 }; 50528 50529 var TransformPropertyFactory = function () { 50530 var defaultVector = [0, 0]; 50531 50532 function applyToMatrix(mat) { 50533 var _mdf = this._mdf; 50534 this.iterateDynamicProperties(); 50535 this._mdf = this._mdf || _mdf; 50536 50537 if (this.a) { 50538 mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); 50539 } 50540 50541 if (this.s) { 50542 mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]); 50543 } 50544 50545 if (this.sk) { 50546 mat.skewFromAxis(-this.sk.v, this.sa.v); 50547 } 50548 50549 if (this.r) { 50550 mat.rotate(-this.r.v); 50551 } else { 50552 mat.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]); 50553 } 50554 50555 if (this.data.p.s) { 50556 if (this.data.p.z) { 50557 mat.translate(this.px.v, this.py.v, -this.pz.v); 50558 } else { 50559 mat.translate(this.px.v, this.py.v, 0); 50560 } 50561 } else { 50562 mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); 50563 } 50564 } 50565 50566 function processKeys(forceRender) { 50567 if (this.elem.globalData.frameId === this.frameId) { 50568 return; 50569 } 50570 50571 if (this._isDirty) { 50572 this.precalculateMatrix(); 50573 this._isDirty = false; 50574 } 50575 50576 this.iterateDynamicProperties(); 50577 50578 if (this._mdf || forceRender) { 50579 var frameRate; 50580 this.v.cloneFromProps(this.pre.props); 50581 50582 if (this.appliedTransformations < 1) { 50583 this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); 50584 } 50585 50586 if (this.appliedTransformations < 2) { 50587 this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]); 50588 } 50589 50590 if (this.sk && this.appliedTransformations < 3) { 50591 this.v.skewFromAxis(-this.sk.v, this.sa.v); 50592 } 50593 50594 if (this.r && this.appliedTransformations < 4) { 50595 this.v.rotate(-this.r.v); 50596 } else if (!this.r && this.appliedTransformations < 4) { 50597 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]); 50598 } 50599 50600 if (this.autoOriented) { 50601 var v1; 50602 var v2; 50603 frameRate = this.elem.globalData.frameRate; 50604 50605 if (this.p && this.p.keyframes && this.p.getValueAtTime) { 50606 if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) { 50607 v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0); 50608 v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0); 50609 } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) { 50610 v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0); 50611 v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0); 50612 } else { 50613 v1 = this.p.pv; 50614 v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime); 50615 } 50616 } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) { 50617 v1 = []; 50618 v2 = []; 50619 var px = this.px; 50620 var py = this.py; 50621 50622 if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) { 50623 v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0); 50624 v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0); 50625 v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0); 50626 v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0); 50627 } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) { 50628 v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0); 50629 v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0); 50630 v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0); 50631 v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0); 50632 } else { 50633 v1 = [px.pv, py.pv]; 50634 v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime); 50635 v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime); 50636 } 50637 } else { 50638 v2 = defaultVector; 50639 v1 = v2; 50640 } 50641 50642 this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0])); 50643 } 50644 50645 if (this.data.p && this.data.p.s) { 50646 if (this.data.p.z) { 50647 this.v.translate(this.px.v, this.py.v, -this.pz.v); 50648 } else { 50649 this.v.translate(this.px.v, this.py.v, 0); 50650 } 50651 } else { 50652 this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); 50653 } 50654 } 50655 50656 this.frameId = this.elem.globalData.frameId; 50657 } 50658 50659 function precalculateMatrix() { 50660 this.appliedTransformations = 0; 50661 this.pre.reset(); 50662 50663 if (!this.a.effectsSequence.length) { 50664 this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); 50665 this.appliedTransformations = 1; 50666 } else { 50667 return; 50668 } 50669 50670 if (!this.s.effectsSequence.length) { 50671 this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]); 50672 this.appliedTransformations = 2; 50673 } else { 50674 return; 50675 } 50676 50677 if (this.sk) { 50678 if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) { 50679 this.pre.skewFromAxis(-this.sk.v, this.sa.v); 50680 this.appliedTransformations = 3; 50681 } else { 50682 return; 50683 } 50684 } 50685 50686 if (this.r) { 50687 if (!this.r.effectsSequence.length) { 50688 this.pre.rotate(-this.r.v); 50689 this.appliedTransformations = 4; 50690 } 50691 } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) { 50692 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]); 50693 this.appliedTransformations = 4; 50694 } 50695 } 50696 50697 function autoOrient() {// 50698 // var prevP = this.getValueAtTime(); 50699 } 50700 50701 function addDynamicProperty(prop) { 50702 this._addDynamicProperty(prop); 50703 50704 this.elem.addDynamicProperty(prop); 50705 this._isDirty = true; 50706 } 50707 50708 function TransformProperty(elem, data, container) { 50709 this.elem = elem; 50710 this.frameId = -1; 50711 this.propType = 'transform'; 50712 this.data = data; 50713 this.v = new Matrix(); // Precalculated matrix with non animated properties 50714 50715 this.pre = new Matrix(); 50716 this.appliedTransformations = 0; 50717 this.initDynamicPropertyContainer(container || elem); 50718 50719 if (data.p && data.p.s) { 50720 this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this); 50721 this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this); 50722 50723 if (data.p.z) { 50724 this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this); 50725 } 50726 } else { 50727 this.p = PropertyFactory.getProp(elem, data.p || { 50728 k: [0, 0, 0] 50729 }, 1, 0, this); 50730 } 50731 50732 if (data.rx) { 50733 this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this); 50734 this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this); 50735 this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this); 50736 50737 if (data.or.k[0].ti) { 50738 var i; 50739 var len = data.or.k.length; 50740 50741 for (i = 0; i < len; i += 1) { 50742 data.or.k[i].to = null; 50743 data.or.k[i].ti = null; 50744 } 50745 } 50746 50747 this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180 50748 50749 this.or.sh = true; 50750 } else { 50751 this.r = PropertyFactory.getProp(elem, data.r || { 50752 k: 0 50753 }, 0, degToRads, this); 50754 } 50755 50756 if (data.sk) { 50757 this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this); 50758 this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this); 50759 } 50760 50761 this.a = PropertyFactory.getProp(elem, data.a || { 50762 k: [0, 0, 0] 50763 }, 1, 0, this); 50764 this.s = PropertyFactory.getProp(elem, data.s || { 50765 k: [100, 100, 100] 50766 }, 1, 0.01, this); // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes. 50767 50768 if (data.o) { 50769 this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem); 50770 } else { 50771 this.o = { 50772 _mdf: false, 50773 v: 1 50774 }; 50775 } 50776 50777 this._isDirty = true; 50778 50779 if (!this.dynamicProperties.length) { 50780 this.getValue(true); 50781 } 50782 } 50783 50784 TransformProperty.prototype = { 50785 applyToMatrix: applyToMatrix, 50786 getValue: processKeys, 50787 precalculateMatrix: precalculateMatrix, 50788 autoOrient: autoOrient 50789 }; 50790 extendPrototype([DynamicPropertyContainer], TransformProperty); 50791 TransformProperty.prototype.addDynamicProperty = addDynamicProperty; 50792 TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty; 50793 50794 function getTransformProperty(elem, data, container) { 50795 return new TransformProperty(elem, data, container); 50796 } 50797 50798 return { 50799 getTransformProperty: getTransformProperty 50800 }; 50801 }(); 50802 50803 function RepeaterModifier() {} 50804 50805 extendPrototype([ShapeModifier], RepeaterModifier); 50806 50807 RepeaterModifier.prototype.initModifierProperties = function (elem, data) { 50808 this.getValue = this.processKeys; 50809 this.c = PropertyFactory.getProp(elem, data.c, 0, null, this); 50810 this.o = PropertyFactory.getProp(elem, data.o, 0, null, this); 50811 this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this); 50812 this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this); 50813 this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this); 50814 this.data = data; 50815 50816 if (!this.dynamicProperties.length) { 50817 this.getValue(true); 50818 } 50819 50820 this._isAnimated = !!this.dynamicProperties.length; 50821 this.pMatrix = new Matrix(); 50822 this.rMatrix = new Matrix(); 50823 this.sMatrix = new Matrix(); 50824 this.tMatrix = new Matrix(); 50825 this.matrix = new Matrix(); 50826 }; 50827 50828 RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) { 50829 var dir = inv ? -1 : 1; 50830 var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc); 50831 var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc); 50832 pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]); 50833 rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]); 50834 rMatrix.rotate(-transform.r.v * dir * perc); 50835 rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]); 50836 sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]); 50837 sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY); 50838 sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]); 50839 }; 50840 50841 RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) { 50842 this.elem = elem; 50843 this.arr = arr; 50844 this.pos = pos; 50845 this.elemsData = elemsData; 50846 this._currentCopies = 0; 50847 this._elements = []; 50848 this._groups = []; 50849 this.frameId = -1; 50850 this.initDynamicPropertyContainer(elem); 50851 this.initModifierProperties(elem, arr[pos]); 50852 50853 while (pos > 0) { 50854 pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]); 50855 50856 this._elements.unshift(arr[pos]); 50857 } 50858 50859 if (this.dynamicProperties.length) { 50860 this.k = true; 50861 } else { 50862 this.getValue(true); 50863 } 50864 }; 50865 50866 RepeaterModifier.prototype.resetElements = function (elements) { 50867 var i; 50868 var len = elements.length; 50869 50870 for (i = 0; i < len; i += 1) { 50871 elements[i]._processed = false; 50872 50873 if (elements[i].ty === 'gr') { 50874 this.resetElements(elements[i].it); 50875 } 50876 } 50877 }; 50878 50879 RepeaterModifier.prototype.cloneElements = function (elements) { 50880 var newElements = JSON.parse(JSON.stringify(elements)); 50881 this.resetElements(newElements); 50882 return newElements; 50883 }; 50884 50885 RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) { 50886 var i; 50887 var len = elements.length; 50888 50889 for (i = 0; i < len; i += 1) { 50890 elements[i]._render = renderFlag; 50891 50892 if (elements[i].ty === 'gr') { 50893 this.changeGroupRender(elements[i].it, renderFlag); 50894 } 50895 } 50896 }; 50897 50898 RepeaterModifier.prototype.processShapes = function (_isFirstFrame) { 50899 var items; 50900 var itemsTransform; 50901 var i; 50902 var dir; 50903 var cont; 50904 var hasReloaded = false; 50905 50906 if (this._mdf || _isFirstFrame) { 50907 var copies = Math.ceil(this.c.v); 50908 50909 if (this._groups.length < copies) { 50910 while (this._groups.length < copies) { 50911 var group = { 50912 it: this.cloneElements(this._elements), 50913 ty: 'gr' 50914 }; 50915 group.it.push({ 50916 a: { 50917 a: 0, 50918 ix: 1, 50919 k: [0, 0] 50920 }, 50921 nm: 'Transform', 50922 o: { 50923 a: 0, 50924 ix: 7, 50925 k: 100 50926 }, 50927 p: { 50928 a: 0, 50929 ix: 2, 50930 k: [0, 0] 50931 }, 50932 r: { 50933 a: 1, 50934 ix: 6, 50935 k: [{ 50936 s: 0, 50937 e: 0, 50938 t: 0 50939 }, { 50940 s: 0, 50941 e: 0, 50942 t: 1 50943 }] 50944 }, 50945 s: { 50946 a: 0, 50947 ix: 3, 50948 k: [100, 100] 50949 }, 50950 sa: { 50951 a: 0, 50952 ix: 5, 50953 k: 0 50954 }, 50955 sk: { 50956 a: 0, 50957 ix: 4, 50958 k: 0 50959 }, 50960 ty: 'tr' 50961 }); 50962 this.arr.splice(0, 0, group); 50963 50964 this._groups.splice(0, 0, group); 50965 50966 this._currentCopies += 1; 50967 } 50968 50969 this.elem.reloadShapes(); 50970 hasReloaded = true; 50971 } 50972 50973 cont = 0; 50974 var renderFlag; 50975 50976 for (i = 0; i <= this._groups.length - 1; i += 1) { 50977 renderFlag = cont < copies; 50978 this._groups[i]._render = renderFlag; 50979 this.changeGroupRender(this._groups[i].it, renderFlag); 50980 50981 if (!renderFlag) { 50982 var elems = this.elemsData[i].it; 50983 var transformData = elems[elems.length - 1]; 50984 50985 if (transformData.transform.op.v !== 0) { 50986 transformData.transform.op._mdf = true; 50987 transformData.transform.op.v = 0; 50988 } else { 50989 transformData.transform.op._mdf = false; 50990 } 50991 } 50992 50993 cont += 1; 50994 } 50995 50996 this._currentCopies = copies; /// / 50997 50998 var offset = this.o.v; 50999 var offsetModulo = offset % 1; 51000 var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset); 51001 var pProps = this.pMatrix.props; 51002 var rProps = this.rMatrix.props; 51003 var sProps = this.sMatrix.props; 51004 this.pMatrix.reset(); 51005 this.rMatrix.reset(); 51006 this.sMatrix.reset(); 51007 this.tMatrix.reset(); 51008 this.matrix.reset(); 51009 var iteration = 0; 51010 51011 if (offset > 0) { 51012 while (iteration < roundOffset) { 51013 this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false); 51014 iteration += 1; 51015 } 51016 51017 if (offsetModulo) { 51018 this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false); 51019 iteration += offsetModulo; 51020 } 51021 } else if (offset < 0) { 51022 while (iteration > roundOffset) { 51023 this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true); 51024 iteration -= 1; 51025 } 51026 51027 if (offsetModulo) { 51028 this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true); 51029 iteration -= offsetModulo; 51030 } 51031 } 51032 51033 i = this.data.m === 1 ? 0 : this._currentCopies - 1; 51034 dir = this.data.m === 1 ? 1 : -1; 51035 cont = this._currentCopies; 51036 var j; 51037 var jLen; 51038 51039 while (cont) { 51040 items = this.elemsData[i].it; 51041 itemsTransform = items[items.length - 1].transform.mProps.v.props; 51042 jLen = itemsTransform.length; 51043 items[items.length - 1].transform.mProps._mdf = true; 51044 items[items.length - 1].transform.op._mdf = true; 51045 items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1)); 51046 51047 if (iteration !== 0) { 51048 if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) { 51049 this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false); 51050 } 51051 51052 this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]); 51053 this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]); 51054 this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]); 51055 51056 for (j = 0; j < jLen; j += 1) { 51057 itemsTransform[j] = this.matrix.props[j]; 51058 } 51059 51060 this.matrix.reset(); 51061 } else { 51062 this.matrix.reset(); 51063 51064 for (j = 0; j < jLen; j += 1) { 51065 itemsTransform[j] = this.matrix.props[j]; 51066 } 51067 } 51068 51069 iteration += 1; 51070 cont -= 1; 51071 i += dir; 51072 } 51073 } else { 51074 cont = this._currentCopies; 51075 i = 0; 51076 dir = 1; 51077 51078 while (cont) { 51079 items = this.elemsData[i].it; 51080 itemsTransform = items[items.length - 1].transform.mProps.v.props; 51081 items[items.length - 1].transform.mProps._mdf = false; 51082 items[items.length - 1].transform.op._mdf = false; 51083 cont -= 1; 51084 i += dir; 51085 } 51086 } 51087 51088 return hasReloaded; 51089 }; 51090 51091 RepeaterModifier.prototype.addShape = function () {}; 51092 51093 function RoundCornersModifier() {} 51094 51095 extendPrototype([ShapeModifier], RoundCornersModifier); 51096 51097 RoundCornersModifier.prototype.initModifierProperties = function (elem, data) { 51098 this.getValue = this.processKeys; 51099 this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this); 51100 this._isAnimated = !!this.rd.effectsSequence.length; 51101 }; 51102 51103 RoundCornersModifier.prototype.processPath = function (path, round) { 51104 var clonedPath = shapePool.newElement(); 51105 clonedPath.c = path.c; 51106 var i; 51107 var len = path._length; 51108 var currentV; 51109 var currentI; 51110 var currentO; 51111 var closerV; 51112 var distance; 51113 var newPosPerc; 51114 var index = 0; 51115 var vX; 51116 var vY; 51117 var oX; 51118 var oY; 51119 var iX; 51120 var iY; 51121 51122 for (i = 0; i < len; i += 1) { 51123 currentV = path.v[i]; 51124 currentO = path.o[i]; 51125 currentI = path.i[i]; 51126 51127 if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) { 51128 if ((i === 0 || i === len - 1) && !path.c) { 51129 clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index); 51130 /* clonedPath.v[index] = currentV; 51131 clonedPath.o[index] = currentO; 51132 clonedPath.i[index] = currentI; */ 51133 51134 index += 1; 51135 } else { 51136 if (i === 0) { 51137 closerV = path.v[len - 1]; 51138 } else { 51139 closerV = path.v[i - 1]; 51140 } 51141 51142 distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2)); 51143 newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0; 51144 iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc; 51145 vX = iX; 51146 iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc; 51147 vY = iY; 51148 oX = vX - (vX - currentV[0]) * roundCorner; 51149 oY = vY - (vY - currentV[1]) * roundCorner; 51150 clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index); 51151 index += 1; 51152 51153 if (i === len - 1) { 51154 closerV = path.v[0]; 51155 } else { 51156 closerV = path.v[i + 1]; 51157 } 51158 51159 distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2)); 51160 newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0; 51161 oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc; 51162 vX = oX; 51163 oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc; 51164 vY = oY; 51165 iX = vX - (vX - currentV[0]) * roundCorner; 51166 iY = vY - (vY - currentV[1]) * roundCorner; 51167 clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index); 51168 index += 1; 51169 } 51170 } else { 51171 clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index); 51172 index += 1; 51173 } 51174 } 51175 51176 return clonedPath; 51177 }; 51178 51179 RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) { 51180 var shapePaths; 51181 var i; 51182 var len = this.shapes.length; 51183 var j; 51184 var jLen; 51185 var rd = this.rd.v; 51186 51187 if (rd !== 0) { 51188 var shapeData; 51189 var localShapeCollection; 51190 51191 for (i = 0; i < len; i += 1) { 51192 shapeData = this.shapes[i]; 51193 localShapeCollection = shapeData.localShapeCollection; 51194 51195 if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { 51196 localShapeCollection.releaseShapes(); 51197 shapeData.shape._mdf = true; 51198 shapePaths = shapeData.shape.paths.shapes; 51199 jLen = shapeData.shape.paths._length; 51200 51201 for (j = 0; j < jLen; j += 1) { 51202 localShapeCollection.addShape(this.processPath(shapePaths[j], rd)); 51203 } 51204 } 51205 51206 shapeData.shape.paths = shapeData.localShapeCollection; 51207 } 51208 } 51209 51210 if (!this.dynamicProperties.length) { 51211 this._mdf = false; 51212 } 51213 }; 51214 51215 function floatEqual(a, b) { 51216 return Math.abs(a - b) * 100000 <= Math.min(Math.abs(a), Math.abs(b)); 51217 } 51218 51219 function floatZero(f) { 51220 return Math.abs(f) <= 0.00001; 51221 } 51222 51223 function lerp(p0, p1, amount) { 51224 return p0 * (1 - amount) + p1 * amount; 51225 } 51226 51227 function lerpPoint(p0, p1, amount) { 51228 return [lerp(p0[0], p1[0], amount), lerp(p0[1], p1[1], amount)]; 51229 } 51230 51231 function quadRoots(a, b, c) { 51232 // no root 51233 if (a === 0) return []; 51234 var s = b * b - 4 * a * c; // Complex roots 51235 51236 if (s < 0) return []; 51237 var singleRoot = -b / (2 * a); // 1 root 51238 51239 if (s === 0) return [singleRoot]; 51240 var delta = Math.sqrt(s) / (2 * a); // 2 roots 51241 51242 return [singleRoot - delta, singleRoot + delta]; 51243 } 51244 51245 function polynomialCoefficients(p0, p1, p2, p3) { 51246 return [-p0 + 3 * p1 - 3 * p2 + p3, 3 * p0 - 6 * p1 + 3 * p2, -3 * p0 + 3 * p1, p0]; 51247 } 51248 51249 function singlePoint(p) { 51250 return new PolynomialBezier(p, p, p, p, false); 51251 } 51252 51253 function PolynomialBezier(p0, p1, p2, p3, linearize) { 51254 if (linearize && pointEqual(p0, p1)) { 51255 p1 = lerpPoint(p0, p3, 1 / 3); 51256 } 51257 51258 if (linearize && pointEqual(p2, p3)) { 51259 p2 = lerpPoint(p0, p3, 2 / 3); 51260 } 51261 51262 var coeffx = polynomialCoefficients(p0[0], p1[0], p2[0], p3[0]); 51263 var coeffy = polynomialCoefficients(p0[1], p1[1], p2[1], p3[1]); 51264 this.a = [coeffx[0], coeffy[0]]; 51265 this.b = [coeffx[1], coeffy[1]]; 51266 this.c = [coeffx[2], coeffy[2]]; 51267 this.d = [coeffx[3], coeffy[3]]; 51268 this.points = [p0, p1, p2, p3]; 51269 } 51270 51271 PolynomialBezier.prototype.point = function (t) { 51272 return [((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1]]; 51273 }; 51274 51275 PolynomialBezier.prototype.derivative = function (t) { 51276 return [(3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1]]; 51277 }; 51278 51279 PolynomialBezier.prototype.tangentAngle = function (t) { 51280 var p = this.derivative(t); 51281 return Math.atan2(p[1], p[0]); 51282 }; 51283 51284 PolynomialBezier.prototype.normalAngle = function (t) { 51285 var p = this.derivative(t); 51286 return Math.atan2(p[0], p[1]); 51287 }; 51288 51289 PolynomialBezier.prototype.inflectionPoints = function () { 51290 var denom = this.a[1] * this.b[0] - this.a[0] * this.b[1]; 51291 if (floatZero(denom)) return []; 51292 var tcusp = -0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / denom; 51293 var square = tcusp * tcusp - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / denom; 51294 if (square < 0) return []; 51295 var root = Math.sqrt(square); 51296 51297 if (floatZero(root)) { 51298 if (root > 0 && root < 1) return [tcusp]; 51299 return []; 51300 } 51301 51302 return [tcusp - root, tcusp + root].filter(function (r) { 51303 return r > 0 && r < 1; 51304 }); 51305 }; 51306 51307 PolynomialBezier.prototype.split = function (t) { 51308 if (t <= 0) return [singlePoint(this.points[0]), this]; 51309 if (t >= 1) return [this, singlePoint(this.points[this.points.length - 1])]; 51310 var p10 = lerpPoint(this.points[0], this.points[1], t); 51311 var p11 = lerpPoint(this.points[1], this.points[2], t); 51312 var p12 = lerpPoint(this.points[2], this.points[3], t); 51313 var p20 = lerpPoint(p10, p11, t); 51314 var p21 = lerpPoint(p11, p12, t); 51315 var p3 = lerpPoint(p20, p21, t); 51316 return [new PolynomialBezier(this.points[0], p10, p20, p3, true), new PolynomialBezier(p3, p21, p12, this.points[3], true)]; 51317 }; 51318 51319 function extrema(bez, comp) { 51320 var min = bez.points[0][comp]; 51321 var max = bez.points[bez.points.length - 1][comp]; 51322 51323 if (min > max) { 51324 var e = max; 51325 max = min; 51326 min = e; 51327 } // Derivative roots to find min/max 51328 51329 51330 var f = quadRoots(3 * bez.a[comp], 2 * bez.b[comp], bez.c[comp]); 51331 51332 for (var i = 0; i < f.length; i += 1) { 51333 if (f[i] > 0 && f[i] < 1) { 51334 var val = bez.point(f[i])[comp]; 51335 if (val < min) min = val;else if (val > max) max = val; 51336 } 51337 } 51338 51339 return { 51340 min: min, 51341 max: max 51342 }; 51343 } 51344 51345 PolynomialBezier.prototype.bounds = function () { 51346 return { 51347 x: extrema(this, 0), 51348 y: extrema(this, 1) 51349 }; 51350 }; 51351 51352 PolynomialBezier.prototype.boundingBox = function () { 51353 var bounds = this.bounds(); 51354 return { 51355 left: bounds.x.min, 51356 right: bounds.x.max, 51357 top: bounds.y.min, 51358 bottom: bounds.y.max, 51359 width: bounds.x.max - bounds.x.min, 51360 height: bounds.y.max - bounds.y.min, 51361 cx: (bounds.x.max + bounds.x.min) / 2, 51362 cy: (bounds.y.max + bounds.y.min) / 2 51363 }; 51364 }; 51365 51366 function intersectData(bez, t1, t2) { 51367 var box = bez.boundingBox(); 51368 return { 51369 cx: box.cx, 51370 cy: box.cy, 51371 width: box.width, 51372 height: box.height, 51373 bez: bez, 51374 t: (t1 + t2) / 2, 51375 t1: t1, 51376 t2: t2 51377 }; 51378 } 51379 51380 function splitData(data) { 51381 var split = data.bez.split(0.5); 51382 return [intersectData(split[0], data.t1, data.t), intersectData(split[1], data.t, data.t2)]; 51383 } 51384 51385 function boxIntersect(b1, b2) { 51386 return Math.abs(b1.cx - b2.cx) * 2 < b1.width + b2.width && Math.abs(b1.cy - b2.cy) * 2 < b1.height + b2.height; 51387 } 51388 51389 function intersectsImpl(d1, d2, depth, tolerance, intersections, maxRecursion) { 51390 if (!boxIntersect(d1, d2)) return; 51391 51392 if (depth >= maxRecursion || d1.width <= tolerance && d1.height <= tolerance && d2.width <= tolerance && d2.height <= tolerance) { 51393 intersections.push([d1.t, d2.t]); 51394 return; 51395 } 51396 51397 var d1s = splitData(d1); 51398 var d2s = splitData(d2); 51399 intersectsImpl(d1s[0], d2s[0], depth + 1, tolerance, intersections, maxRecursion); 51400 intersectsImpl(d1s[0], d2s[1], depth + 1, tolerance, intersections, maxRecursion); 51401 intersectsImpl(d1s[1], d2s[0], depth + 1, tolerance, intersections, maxRecursion); 51402 intersectsImpl(d1s[1], d2s[1], depth + 1, tolerance, intersections, maxRecursion); 51403 } 51404 51405 PolynomialBezier.prototype.intersections = function (other, tolerance, maxRecursion) { 51406 if (tolerance === undefined) tolerance = 2; 51407 if (maxRecursion === undefined) maxRecursion = 7; 51408 var intersections = []; 51409 intersectsImpl(intersectData(this, 0, 1), intersectData(other, 0, 1), 0, tolerance, intersections, maxRecursion); 51410 return intersections; 51411 }; 51412 51413 PolynomialBezier.shapeSegment = function (shapePath, index) { 51414 var nextIndex = (index + 1) % shapePath.length(); 51415 return new PolynomialBezier(shapePath.v[index], shapePath.o[index], shapePath.i[nextIndex], shapePath.v[nextIndex], true); 51416 }; 51417 51418 PolynomialBezier.shapeSegmentInverted = function (shapePath, index) { 51419 var nextIndex = (index + 1) % shapePath.length(); 51420 return new PolynomialBezier(shapePath.v[nextIndex], shapePath.i[nextIndex], shapePath.o[index], shapePath.v[index], true); 51421 }; 51422 51423 function crossProduct(a, b) { 51424 return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; 51425 } 51426 51427 function lineIntersection(start1, end1, start2, end2) { 51428 var v1 = [start1[0], start1[1], 1]; 51429 var v2 = [end1[0], end1[1], 1]; 51430 var v3 = [start2[0], start2[1], 1]; 51431 var v4 = [end2[0], end2[1], 1]; 51432 var r = crossProduct(crossProduct(v1, v2), crossProduct(v3, v4)); 51433 if (floatZero(r[2])) return null; 51434 return [r[0] / r[2], r[1] / r[2]]; 51435 } 51436 51437 function polarOffset(p, angle, length) { 51438 return [p[0] + Math.cos(angle) * length, p[1] - Math.sin(angle) * length]; 51439 } 51440 51441 function pointDistance(p1, p2) { 51442 return Math.hypot(p1[0] - p2[0], p1[1] - p2[1]); 51443 } 51444 51445 function pointEqual(p1, p2) { 51446 return floatEqual(p1[0], p2[0]) && floatEqual(p1[1], p2[1]); 51447 } 51448 51449 function ZigZagModifier() {} 51450 51451 extendPrototype([ShapeModifier], ZigZagModifier); 51452 51453 ZigZagModifier.prototype.initModifierProperties = function (elem, data) { 51454 this.getValue = this.processKeys; 51455 this.amplitude = PropertyFactory.getProp(elem, data.s, 0, null, this); 51456 this.frequency = PropertyFactory.getProp(elem, data.r, 0, null, this); 51457 this.pointsType = PropertyFactory.getProp(elem, data.pt, 0, null, this); 51458 this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0; 51459 }; 51460 51461 function setPoint(outputBezier, point, angle, direction, amplitude, outAmplitude, inAmplitude) { 51462 var angO = angle - Math.PI / 2; 51463 var angI = angle + Math.PI / 2; 51464 var px = point[0] + Math.cos(angle) * direction * amplitude; 51465 var py = point[1] - Math.sin(angle) * direction * amplitude; 51466 outputBezier.setTripleAt(px, py, px + Math.cos(angO) * outAmplitude, py - Math.sin(angO) * outAmplitude, px + Math.cos(angI) * inAmplitude, py - Math.sin(angI) * inAmplitude, outputBezier.length()); 51467 } 51468 51469 function getPerpendicularVector(pt1, pt2) { 51470 var vector = [pt2[0] - pt1[0], pt2[1] - pt1[1]]; 51471 var rot = -Math.PI * 0.5; 51472 var rotatedVector = [Math.cos(rot) * vector[0] - Math.sin(rot) * vector[1], Math.sin(rot) * vector[0] + Math.cos(rot) * vector[1]]; 51473 return rotatedVector; 51474 } 51475 51476 function getProjectingAngle(path, cur) { 51477 var prevIndex = cur === 0 ? path.length() - 1 : cur - 1; 51478 var nextIndex = (cur + 1) % path.length(); 51479 var prevPoint = path.v[prevIndex]; 51480 var nextPoint = path.v[nextIndex]; 51481 var pVector = getPerpendicularVector(prevPoint, nextPoint); 51482 return Math.atan2(0, 1) - Math.atan2(pVector[1], pVector[0]); 51483 } 51484 51485 function zigZagCorner(outputBezier, path, cur, amplitude, frequency, pointType, direction) { 51486 var angle = getProjectingAngle(path, cur); 51487 var point = path.v[cur % path._length]; 51488 var prevPoint = path.v[cur === 0 ? path._length - 1 : cur - 1]; 51489 var nextPoint = path.v[(cur + 1) % path._length]; 51490 var prevDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - prevPoint[0], 2) + Math.pow(point[1] - prevPoint[1], 2)) : 0; 51491 var nextDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - nextPoint[0], 2) + Math.pow(point[1] - nextPoint[1], 2)) : 0; 51492 setPoint(outputBezier, path.v[cur % path._length], angle, direction, amplitude, nextDist / ((frequency + 1) * 2), prevDist / ((frequency + 1) * 2), pointType); 51493 } 51494 51495 function zigZagSegment(outputBezier, segment, amplitude, frequency, pointType, direction) { 51496 for (var i = 0; i < frequency; i += 1) { 51497 var t = (i + 1) / (frequency + 1); 51498 var dist = pointType === 2 ? Math.sqrt(Math.pow(segment.points[3][0] - segment.points[0][0], 2) + Math.pow(segment.points[3][1] - segment.points[0][1], 2)) : 0; 51499 var angle = segment.normalAngle(t); 51500 var point = segment.point(t); 51501 setPoint(outputBezier, point, angle, direction, amplitude, dist / ((frequency + 1) * 2), dist / ((frequency + 1) * 2), pointType); 51502 direction = -direction; 51503 } 51504 51505 return direction; 51506 } 51507 51508 ZigZagModifier.prototype.processPath = function (path, amplitude, frequency, pointType) { 51509 var count = path._length; 51510 var clonedPath = shapePool.newElement(); 51511 clonedPath.c = path.c; 51512 51513 if (!path.c) { 51514 count -= 1; 51515 } 51516 51517 if (count === 0) return clonedPath; 51518 var direction = -1; 51519 var segment = PolynomialBezier.shapeSegment(path, 0); 51520 zigZagCorner(clonedPath, path, 0, amplitude, frequency, pointType, direction); 51521 51522 for (var i = 0; i < count; i += 1) { 51523 direction = zigZagSegment(clonedPath, segment, amplitude, frequency, pointType, -direction); 51524 51525 if (i === count - 1 && !path.c) { 51526 segment = null; 51527 } else { 51528 segment = PolynomialBezier.shapeSegment(path, (i + 1) % count); 51529 } 51530 51531 zigZagCorner(clonedPath, path, i + 1, amplitude, frequency, pointType, direction); 51532 } 51533 51534 return clonedPath; 51535 }; 51536 51537 ZigZagModifier.prototype.processShapes = function (_isFirstFrame) { 51538 var shapePaths; 51539 var i; 51540 var len = this.shapes.length; 51541 var j; 51542 var jLen; 51543 var amplitude = this.amplitude.v; 51544 var frequency = Math.max(0, Math.round(this.frequency.v)); 51545 var pointType = this.pointsType.v; 51546 51547 if (amplitude !== 0) { 51548 var shapeData; 51549 var localShapeCollection; 51550 51551 for (i = 0; i < len; i += 1) { 51552 shapeData = this.shapes[i]; 51553 localShapeCollection = shapeData.localShapeCollection; 51554 51555 if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { 51556 localShapeCollection.releaseShapes(); 51557 shapeData.shape._mdf = true; 51558 shapePaths = shapeData.shape.paths.shapes; 51559 jLen = shapeData.shape.paths._length; 51560 51561 for (j = 0; j < jLen; j += 1) { 51562 localShapeCollection.addShape(this.processPath(shapePaths[j], amplitude, frequency, pointType)); 51563 } 51564 } 51565 51566 shapeData.shape.paths = shapeData.localShapeCollection; 51567 } 51568 } 51569 51570 if (!this.dynamicProperties.length) { 51571 this._mdf = false; 51572 } 51573 }; 51574 51575 function linearOffset(p1, p2, amount) { 51576 var angle = Math.atan2(p2[0] - p1[0], p2[1] - p1[1]); 51577 return [polarOffset(p1, angle, amount), polarOffset(p2, angle, amount)]; 51578 } 51579 51580 function offsetSegment(segment, amount) { 51581 var p0; 51582 var p1a; 51583 var p1b; 51584 var p2b; 51585 var p2a; 51586 var p3; 51587 var e; 51588 e = linearOffset(segment.points[0], segment.points[1], amount); 51589 p0 = e[0]; 51590 p1a = e[1]; 51591 e = linearOffset(segment.points[1], segment.points[2], amount); 51592 p1b = e[0]; 51593 p2b = e[1]; 51594 e = linearOffset(segment.points[2], segment.points[3], amount); 51595 p2a = e[0]; 51596 p3 = e[1]; 51597 var p1 = lineIntersection(p0, p1a, p1b, p2b); 51598 if (p1 === null) p1 = p1a; 51599 var p2 = lineIntersection(p2a, p3, p1b, p2b); 51600 if (p2 === null) p2 = p2a; 51601 return new PolynomialBezier(p0, p1, p2, p3); 51602 } 51603 51604 function joinLines(outputBezier, seg1, seg2, lineJoin, miterLimit) { 51605 var p0 = seg1.points[3]; 51606 var p1 = seg2.points[0]; // Bevel 51607 51608 if (lineJoin === 3) return p0; // Connected, they don't need a joint 51609 51610 if (pointEqual(p0, p1)) return p0; // Round 51611 51612 if (lineJoin === 2) { 51613 var angleOut = -seg1.tangentAngle(1); 51614 var angleIn = -seg2.tangentAngle(0) + Math.PI; 51615 var center = lineIntersection(p0, polarOffset(p0, angleOut + Math.PI / 2, 100), p1, polarOffset(p1, angleOut + Math.PI / 2, 100)); 51616 var radius = center ? pointDistance(center, p0) : pointDistance(p0, p1) / 2; 51617 var tan = polarOffset(p0, angleOut, 2 * radius * roundCorner); 51618 outputBezier.setXYAt(tan[0], tan[1], 'o', outputBezier.length() - 1); 51619 tan = polarOffset(p1, angleIn, 2 * radius * roundCorner); 51620 outputBezier.setTripleAt(p1[0], p1[1], p1[0], p1[1], tan[0], tan[1], outputBezier.length()); 51621 return p1; 51622 } // Miter 51623 51624 51625 var t0 = pointEqual(p0, seg1.points[2]) ? seg1.points[0] : seg1.points[2]; 51626 var t1 = pointEqual(p1, seg2.points[1]) ? seg2.points[3] : seg2.points[1]; 51627 var intersection = lineIntersection(t0, p0, p1, t1); 51628 51629 if (intersection && pointDistance(intersection, p0) < miterLimit) { 51630 outputBezier.setTripleAt(intersection[0], intersection[1], intersection[0], intersection[1], intersection[0], intersection[1], outputBezier.length()); 51631 return intersection; 51632 } 51633 51634 return p0; 51635 } 51636 51637 function getIntersection(a, b) { 51638 var intersect = a.intersections(b); 51639 if (intersect.length && floatEqual(intersect[0][0], 1)) intersect.shift(); 51640 if (intersect.length) return intersect[0]; 51641 return null; 51642 } 51643 51644 function pruneSegmentIntersection(a, b) { 51645 var outa = a.slice(); 51646 var outb = b.slice(); 51647 var intersect = getIntersection(a[a.length - 1], b[0]); 51648 51649 if (intersect) { 51650 outa[a.length - 1] = a[a.length - 1].split(intersect[0])[0]; 51651 outb[0] = b[0].split(intersect[1])[1]; 51652 } 51653 51654 if (a.length > 1 && b.length > 1) { 51655 intersect = getIntersection(a[0], b[b.length - 1]); 51656 51657 if (intersect) { 51658 return [[a[0].split(intersect[0])[0]], [b[b.length - 1].split(intersect[1])[1]]]; 51659 } 51660 } 51661 51662 return [outa, outb]; 51663 } 51664 51665 function pruneIntersections(segments) { 51666 var e; 51667 51668 for (var i = 1; i < segments.length; i += 1) { 51669 e = pruneSegmentIntersection(segments[i - 1], segments[i]); 51670 segments[i - 1] = e[0]; 51671 segments[i] = e[1]; 51672 } 51673 51674 if (segments.length > 1) { 51675 e = pruneSegmentIntersection(segments[segments.length - 1], segments[0]); 51676 segments[segments.length - 1] = e[0]; 51677 segments[0] = e[1]; 51678 } 51679 51680 return segments; 51681 } 51682 51683 function offsetSegmentSplit(segment, amount) { 51684 /* 51685 We split each bezier segment into smaller pieces based 51686 on inflection points, this ensures the control point 51687 polygon is convex. 51688 (A cubic bezier can have none, one, or two inflection points) 51689 */ 51690 var flex = segment.inflectionPoints(); 51691 var left; 51692 var right; 51693 var split; 51694 var mid; 51695 51696 if (flex.length === 0) { 51697 return [offsetSegment(segment, amount)]; 51698 } 51699 51700 if (flex.length === 1 || floatEqual(flex[1], 1)) { 51701 split = segment.split(flex[0]); 51702 left = split[0]; 51703 right = split[1]; 51704 return [offsetSegment(left, amount), offsetSegment(right, amount)]; 51705 } 51706 51707 split = segment.split(flex[0]); 51708 left = split[0]; 51709 var t = (flex[1] - flex[0]) / (1 - flex[0]); 51710 split = split[1].split(t); 51711 mid = split[0]; 51712 right = split[1]; 51713 return [offsetSegment(left, amount), offsetSegment(mid, amount), offsetSegment(right, amount)]; 51714 } 51715 51716 function OffsetPathModifier() {} 51717 51718 extendPrototype([ShapeModifier], OffsetPathModifier); 51719 51720 OffsetPathModifier.prototype.initModifierProperties = function (elem, data) { 51721 this.getValue = this.processKeys; 51722 this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this); 51723 this.miterLimit = PropertyFactory.getProp(elem, data.ml, 0, null, this); 51724 this.lineJoin = data.lj; 51725 this._isAnimated = this.amount.effectsSequence.length !== 0; 51726 }; 51727 51728 OffsetPathModifier.prototype.processPath = function (inputBezier, amount, lineJoin, miterLimit) { 51729 var outputBezier = shapePool.newElement(); 51730 outputBezier.c = inputBezier.c; 51731 var count = inputBezier.length(); 51732 51733 if (!inputBezier.c) { 51734 count -= 1; 51735 } 51736 51737 var i; 51738 var j; 51739 var segment; 51740 var multiSegments = []; 51741 51742 for (i = 0; i < count; i += 1) { 51743 segment = PolynomialBezier.shapeSegment(inputBezier, i); 51744 multiSegments.push(offsetSegmentSplit(segment, amount)); 51745 } 51746 51747 if (!inputBezier.c) { 51748 for (i = count - 1; i >= 0; i -= 1) { 51749 segment = PolynomialBezier.shapeSegmentInverted(inputBezier, i); 51750 multiSegments.push(offsetSegmentSplit(segment, amount)); 51751 } 51752 } 51753 51754 multiSegments = pruneIntersections(multiSegments); // Add bezier segments to the output and apply line joints 51755 51756 var lastPoint = null; 51757 var lastSeg = null; 51758 51759 for (i = 0; i < multiSegments.length; i += 1) { 51760 var multiSegment = multiSegments[i]; 51761 if (lastSeg) lastPoint = joinLines(outputBezier, lastSeg, multiSegment[0], lineJoin, miterLimit); 51762 lastSeg = multiSegment[multiSegment.length - 1]; 51763 51764 for (j = 0; j < multiSegment.length; j += 1) { 51765 segment = multiSegment[j]; 51766 51767 if (lastPoint && pointEqual(segment.points[0], lastPoint)) { 51768 outputBezier.setXYAt(segment.points[1][0], segment.points[1][1], 'o', outputBezier.length() - 1); 51769 } else { 51770 outputBezier.setTripleAt(segment.points[0][0], segment.points[0][1], segment.points[1][0], segment.points[1][1], segment.points[0][0], segment.points[0][1], outputBezier.length()); 51771 } 51772 51773 outputBezier.setTripleAt(segment.points[3][0], segment.points[3][1], segment.points[3][0], segment.points[3][1], segment.points[2][0], segment.points[2][1], outputBezier.length()); 51774 lastPoint = segment.points[3]; 51775 } 51776 } 51777 51778 if (multiSegments.length) joinLines(outputBezier, lastSeg, multiSegments[0][0], lineJoin, miterLimit); 51779 return outputBezier; 51780 }; 51781 51782 OffsetPathModifier.prototype.processShapes = function (_isFirstFrame) { 51783 var shapePaths; 51784 var i; 51785 var len = this.shapes.length; 51786 var j; 51787 var jLen; 51788 var amount = this.amount.v; 51789 var miterLimit = this.miterLimit.v; 51790 var lineJoin = this.lineJoin; 51791 51792 if (amount !== 0) { 51793 var shapeData; 51794 var localShapeCollection; 51795 51796 for (i = 0; i < len; i += 1) { 51797 shapeData = this.shapes[i]; 51798 localShapeCollection = shapeData.localShapeCollection; 51799 51800 if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { 51801 localShapeCollection.releaseShapes(); 51802 shapeData.shape._mdf = true; 51803 shapePaths = shapeData.shape.paths.shapes; 51804 jLen = shapeData.shape.paths._length; 51805 51806 for (j = 0; j < jLen; j += 1) { 51807 localShapeCollection.addShape(this.processPath(shapePaths[j], amount, lineJoin, miterLimit)); 51808 } 51809 } 51810 51811 shapeData.shape.paths = shapeData.localShapeCollection; 51812 } 51813 } 51814 51815 if (!this.dynamicProperties.length) { 51816 this._mdf = false; 51817 } 51818 }; 51819 51820 function getFontProperties(fontData) { 51821 var styles = fontData.fStyle ? fontData.fStyle.split(' ') : []; 51822 var fWeight = 'normal'; 51823 var fStyle = 'normal'; 51824 var len = styles.length; 51825 var styleName; 51826 51827 for (var i = 0; i < len; i += 1) { 51828 styleName = styles[i].toLowerCase(); 51829 51830 switch (styleName) { 51831 case 'italic': 51832 fStyle = 'italic'; 51833 break; 51834 51835 case 'bold': 51836 fWeight = '700'; 51837 break; 51838 51839 case 'black': 51840 fWeight = '900'; 51841 break; 51842 51843 case 'medium': 51844 fWeight = '500'; 51845 break; 51846 51847 case 'regular': 51848 case 'normal': 51849 fWeight = '400'; 51850 break; 51851 51852 case 'light': 51853 case 'thin': 51854 fWeight = '200'; 51855 break; 51856 51857 default: 51858 break; 51859 } 51860 } 51861 51862 return { 51863 style: fStyle, 51864 weight: fontData.fWeight || fWeight 51865 }; 51866 } 51867 51868 var FontManager = function () { 51869 var maxWaitingTime = 5000; 51870 var emptyChar = { 51871 w: 0, 51872 size: 0, 51873 shapes: [], 51874 data: { 51875 shapes: [] 51876 } 51877 }; 51878 var combinedCharacters = []; // Hindi characters 51879 51880 combinedCharacters = combinedCharacters.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]); 51881 var BLACK_FLAG_CODE_POINT = 127988; 51882 var CANCEL_TAG_CODE_POINT = 917631; 51883 var A_TAG_CODE_POINT = 917601; 51884 var Z_TAG_CODE_POINT = 917626; 51885 var VARIATION_SELECTOR_16_CODE_POINT = 65039; 51886 var ZERO_WIDTH_JOINER_CODE_POINT = 8205; 51887 var REGIONAL_CHARACTER_A_CODE_POINT = 127462; 51888 var REGIONAL_CHARACTER_Z_CODE_POINT = 127487; 51889 var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff']; 51890 51891 function trimFontOptions(font) { 51892 var familyArray = font.split(','); 51893 var i; 51894 var len = familyArray.length; 51895 var enabledFamilies = []; 51896 51897 for (i = 0; i < len; i += 1) { 51898 if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') { 51899 enabledFamilies.push(familyArray[i]); 51900 } 51901 } 51902 51903 return enabledFamilies.join(','); 51904 } 51905 51906 function setUpNode(font, family) { 51907 var parentNode = createTag('span'); // Node is invisible to screen readers. 51908 51909 parentNode.setAttribute('aria-hidden', true); 51910 parentNode.style.fontFamily = family; 51911 var node = createTag('span'); // Characters that vary significantly among different fonts 51912 51913 node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen 51914 51915 parentNode.style.position = 'absolute'; 51916 parentNode.style.left = '-10000px'; 51917 parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious 51918 51919 parentNode.style.fontSize = '300px'; // Reset any font properties 51920 51921 parentNode.style.fontVariant = 'normal'; 51922 parentNode.style.fontStyle = 'normal'; 51923 parentNode.style.fontWeight = 'normal'; 51924 parentNode.style.letterSpacing = '0'; 51925 parentNode.appendChild(node); 51926 document.body.appendChild(parentNode); // Remember width with no applied web font 51927 51928 var width = node.offsetWidth; 51929 node.style.fontFamily = trimFontOptions(font) + ', ' + family; 51930 return { 51931 node: node, 51932 w: width, 51933 parent: parentNode 51934 }; 51935 } 51936 51937 function checkLoadedFonts() { 51938 var i; 51939 var len = this.fonts.length; 51940 var node; 51941 var w; 51942 var loadedCount = len; 51943 51944 for (i = 0; i < len; i += 1) { 51945 if (this.fonts[i].loaded) { 51946 loadedCount -= 1; 51947 } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) { 51948 this.fonts[i].loaded = true; 51949 } else { 51950 node = this.fonts[i].monoCase.node; 51951 w = this.fonts[i].monoCase.w; 51952 51953 if (node.offsetWidth !== w) { 51954 loadedCount -= 1; 51955 this.fonts[i].loaded = true; 51956 } else { 51957 node = this.fonts[i].sansCase.node; 51958 w = this.fonts[i].sansCase.w; 51959 51960 if (node.offsetWidth !== w) { 51961 loadedCount -= 1; 51962 this.fonts[i].loaded = true; 51963 } 51964 } 51965 51966 if (this.fonts[i].loaded) { 51967 this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent); 51968 this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent); 51969 } 51970 } 51971 } 51972 51973 if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) { 51974 setTimeout(this.checkLoadedFontsBinded, 20); 51975 } else { 51976 setTimeout(this.setIsLoadedBinded, 10); 51977 } 51978 } 51979 51980 function createHelper(fontData, def) { 51981 var engine = document.body && def ? 'svg' : 'canvas'; 51982 var helper; 51983 var fontProps = getFontProperties(fontData); 51984 51985 if (engine === 'svg') { 51986 var tHelper = createNS('text'); 51987 tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily; 51988 51989 tHelper.setAttribute('font-family', fontData.fFamily); 51990 tHelper.setAttribute('font-style', fontProps.style); 51991 tHelper.setAttribute('font-weight', fontProps.weight); 51992 tHelper.textContent = '1'; 51993 51994 if (fontData.fClass) { 51995 tHelper.style.fontFamily = 'inherit'; 51996 tHelper.setAttribute('class', fontData.fClass); 51997 } else { 51998 tHelper.style.fontFamily = fontData.fFamily; 51999 } 52000 52001 def.appendChild(tHelper); 52002 helper = tHelper; 52003 } else { 52004 var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d'); 52005 tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily; 52006 helper = tCanvasHelper; 52007 } 52008 52009 function measure(text) { 52010 if (engine === 'svg') { 52011 helper.textContent = text; 52012 return helper.getComputedTextLength(); 52013 } 52014 52015 return helper.measureText(text).width; 52016 } 52017 52018 return { 52019 measureText: measure 52020 }; 52021 } 52022 52023 function addFonts(fontData, defs) { 52024 if (!fontData) { 52025 this.isLoaded = true; 52026 return; 52027 } 52028 52029 if (this.chars) { 52030 this.isLoaded = true; 52031 this.fonts = fontData.list; 52032 return; 52033 } 52034 52035 if (!document.body) { 52036 this.isLoaded = true; 52037 fontData.list.forEach(function (data) { 52038 data.helper = createHelper(data); 52039 data.cache = {}; 52040 }); 52041 this.fonts = fontData.list; 52042 return; 52043 } 52044 52045 var fontArr = fontData.list; 52046 var i; 52047 var len = fontArr.length; 52048 var _pendingFonts = len; 52049 52050 for (i = 0; i < len; i += 1) { 52051 var shouldLoadFont = true; 52052 var loadedSelector; 52053 var j; 52054 fontArr[i].loaded = false; 52055 fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace'); 52056 fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif'); 52057 52058 if (!fontArr[i].fPath) { 52059 fontArr[i].loaded = true; 52060 _pendingFonts -= 1; 52061 } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) { 52062 loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]'); 52063 52064 if (loadedSelector.length > 0) { 52065 shouldLoadFont = false; 52066 } 52067 52068 if (shouldLoadFont) { 52069 var s = createTag('style'); 52070 s.setAttribute('f-forigin', fontArr[i].fOrigin); 52071 s.setAttribute('f-origin', fontArr[i].origin); 52072 s.setAttribute('f-family', fontArr[i].fFamily); 52073 s.type = 'text/css'; 52074 s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}"; 52075 defs.appendChild(s); 52076 } 52077 } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) { 52078 loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'); 52079 52080 for (j = 0; j < loadedSelector.length; j += 1) { 52081 if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) { 52082 // Font is already loaded 52083 shouldLoadFont = false; 52084 } 52085 } 52086 52087 if (shouldLoadFont) { 52088 var l = createTag('link'); 52089 l.setAttribute('f-forigin', fontArr[i].fOrigin); 52090 l.setAttribute('f-origin', fontArr[i].origin); 52091 l.type = 'text/css'; 52092 l.rel = 'stylesheet'; 52093 l.href = fontArr[i].fPath; 52094 document.body.appendChild(l); 52095 } 52096 } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) { 52097 loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'); 52098 52099 for (j = 0; j < loadedSelector.length; j += 1) { 52100 if (fontArr[i].fPath === loadedSelector[j].src) { 52101 // Font is already loaded 52102 shouldLoadFont = false; 52103 } 52104 } 52105 52106 if (shouldLoadFont) { 52107 var sc = createTag('link'); 52108 sc.setAttribute('f-forigin', fontArr[i].fOrigin); 52109 sc.setAttribute('f-origin', fontArr[i].origin); 52110 sc.setAttribute('rel', 'stylesheet'); 52111 sc.setAttribute('href', fontArr[i].fPath); 52112 defs.appendChild(sc); 52113 } 52114 } 52115 52116 fontArr[i].helper = createHelper(fontArr[i], defs); 52117 fontArr[i].cache = {}; 52118 this.fonts.push(fontArr[i]); 52119 } 52120 52121 if (_pendingFonts === 0) { 52122 this.isLoaded = true; 52123 } else { 52124 // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas. 52125 // Adding this timeout seems to fix it 52126 setTimeout(this.checkLoadedFonts.bind(this), 100); 52127 } 52128 } 52129 52130 function addChars(chars) { 52131 if (!chars) { 52132 return; 52133 } 52134 52135 if (!this.chars) { 52136 this.chars = []; 52137 } 52138 52139 var i; 52140 var len = chars.length; 52141 var j; 52142 var jLen = this.chars.length; 52143 var found; 52144 52145 for (i = 0; i < len; i += 1) { 52146 j = 0; 52147 found = false; 52148 52149 while (j < jLen) { 52150 if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) { 52151 found = true; 52152 } 52153 52154 j += 1; 52155 } 52156 52157 if (!found) { 52158 this.chars.push(chars[i]); 52159 jLen += 1; 52160 } 52161 } 52162 } 52163 52164 function getCharData(_char, style, font) { 52165 var i = 0; 52166 var len = this.chars.length; 52167 52168 while (i < len) { 52169 if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) { 52170 return this.chars[i]; 52171 } 52172 52173 i += 1; 52174 } 52175 52176 if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console 52177 && !this._warned) { 52178 this._warned = true; 52179 console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console 52180 } 52181 52182 return emptyChar; 52183 } 52184 52185 function measureText(_char2, fontName, size) { 52186 var fontData = this.getFontByName(fontName); // Using the char instead of char.charCodeAt(0) 52187 // to avoid collisions between equal chars 52188 52189 var index = _char2; 52190 52191 if (!fontData.cache[index]) { 52192 var tHelper = fontData.helper; 52193 52194 if (_char2 === ' ') { 52195 var doubleSize = tHelper.measureText('|' + _char2 + '|'); 52196 var singleSize = tHelper.measureText('||'); 52197 fontData.cache[index] = (doubleSize - singleSize) / 100; 52198 } else { 52199 fontData.cache[index] = tHelper.measureText(_char2) / 100; 52200 } 52201 } 52202 52203 return fontData.cache[index] * size; 52204 } 52205 52206 function getFontByName(name) { 52207 var i = 0; 52208 var len = this.fonts.length; 52209 52210 while (i < len) { 52211 if (this.fonts[i].fName === name) { 52212 return this.fonts[i]; 52213 } 52214 52215 i += 1; 52216 } 52217 52218 return this.fonts[0]; 52219 } 52220 52221 function getCodePoint(string) { 52222 var codePoint = 0; 52223 var first = string.charCodeAt(0); 52224 52225 if (first >= 0xD800 && first <= 0xDBFF) { 52226 var second = string.charCodeAt(1); 52227 52228 if (second >= 0xDC00 && second <= 0xDFFF) { 52229 codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; 52230 } 52231 } 52232 52233 return codePoint; 52234 } // Skin tone modifiers 52235 52236 52237 function isModifier(firstCharCode, secondCharCode) { 52238 var sum = firstCharCode.toString(16) + secondCharCode.toString(16); 52239 return surrogateModifiers.indexOf(sum) !== -1; 52240 } 52241 52242 function isZeroWidthJoiner(charCode) { 52243 return charCode === ZERO_WIDTH_JOINER_CODE_POINT; 52244 } // This codepoint may change the appearance of the preceding character. 52245 // If that is a symbol, dingbat or emoji, U+FE0F forces it to be rendered 52246 // as a colorful image as compared to a monochrome text variant. 52247 52248 52249 function isVariationSelector(charCode) { 52250 return charCode === VARIATION_SELECTOR_16_CODE_POINT; 52251 } // The regional indicator symbols are a set of 26 alphabetic Unicode 52252 /// characters (AâZ) intended to be used to encode ISO 3166-1 alpha-2 52253 // two-letter country codes in a way that allows optional special treatment. 52254 52255 52256 function isRegionalCode(string) { 52257 var codePoint = getCodePoint(string); 52258 52259 if (codePoint >= REGIONAL_CHARACTER_A_CODE_POINT && codePoint <= REGIONAL_CHARACTER_Z_CODE_POINT) { 52260 return true; 52261 } 52262 52263 return false; 52264 } // Some Emoji implementations represent combinations of 52265 // two âregional indicatorâ letters as a single flag symbol. 52266 52267 52268 function isFlagEmoji(string) { 52269 return isRegionalCode(string.substr(0, 2)) && isRegionalCode(string.substr(2, 2)); 52270 } 52271 52272 function isCombinedCharacter(_char3) { 52273 return combinedCharacters.indexOf(_char3) !== -1; 52274 } // Regional flags start with a BLACK_FLAG_CODE_POINT 52275 // folowed by 5 chars in the TAG range 52276 // and end with a CANCEL_TAG_CODE_POINT 52277 52278 52279 function isRegionalFlag(text, index) { 52280 var codePoint = getCodePoint(text.substr(index, 2)); 52281 52282 if (codePoint !== BLACK_FLAG_CODE_POINT) { 52283 return false; 52284 } 52285 52286 var count = 0; 52287 index += 2; 52288 52289 while (count < 5) { 52290 codePoint = getCodePoint(text.substr(index, 2)); 52291 52292 if (codePoint < A_TAG_CODE_POINT || codePoint > Z_TAG_CODE_POINT) { 52293 return false; 52294 } 52295 52296 count += 1; 52297 index += 2; 52298 } 52299 52300 return getCodePoint(text.substr(index, 2)) === CANCEL_TAG_CODE_POINT; 52301 } 52302 52303 function setIsLoaded() { 52304 this.isLoaded = true; 52305 } 52306 52307 var Font = function Font() { 52308 this.fonts = []; 52309 this.chars = null; 52310 this.typekitLoaded = 0; 52311 this.isLoaded = false; 52312 this._warned = false; 52313 this.initTime = Date.now(); 52314 this.setIsLoadedBinded = this.setIsLoaded.bind(this); 52315 this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this); 52316 }; 52317 52318 Font.isModifier = isModifier; 52319 Font.isZeroWidthJoiner = isZeroWidthJoiner; 52320 Font.isFlagEmoji = isFlagEmoji; 52321 Font.isRegionalCode = isRegionalCode; 52322 Font.isCombinedCharacter = isCombinedCharacter; 52323 Font.isRegionalFlag = isRegionalFlag; 52324 Font.isVariationSelector = isVariationSelector; 52325 Font.BLACK_FLAG_CODE_POINT = BLACK_FLAG_CODE_POINT; 52326 var fontPrototype = { 52327 addChars: addChars, 52328 addFonts: addFonts, 52329 getCharData: getCharData, 52330 getFontByName: getFontByName, 52331 measureText: measureText, 52332 checkLoadedFonts: checkLoadedFonts, 52333 setIsLoaded: setIsLoaded 52334 }; 52335 Font.prototype = fontPrototype; 52336 return Font; 52337 }(); 52338 52339 function SlotManager(animationData) { 52340 this.animationData = animationData; 52341 } 52342 52343 SlotManager.prototype.getProp = function (data) { 52344 if (this.animationData.slots && this.animationData.slots[data.sid]) { 52345 return Object.assign(data, this.animationData.slots[data.sid].p); 52346 } 52347 52348 return data; 52349 }; 52350 52351 function slotFactory(animationData) { 52352 return new SlotManager(animationData); 52353 } 52354 52355 function RenderableElement() {} 52356 52357 RenderableElement.prototype = { 52358 initRenderable: function initRenderable() { 52359 // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange 52360 this.isInRange = false; // layer's display state 52361 52362 this.hidden = false; // If layer's transparency equals 0, it can be hidden 52363 52364 this.isTransparent = false; // list of animated components 52365 52366 this.renderableComponents = []; 52367 }, 52368 addRenderableComponent: function addRenderableComponent(component) { 52369 if (this.renderableComponents.indexOf(component) === -1) { 52370 this.renderableComponents.push(component); 52371 } 52372 }, 52373 removeRenderableComponent: function removeRenderableComponent(component) { 52374 if (this.renderableComponents.indexOf(component) !== -1) { 52375 this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1); 52376 } 52377 }, 52378 prepareRenderableFrame: function prepareRenderableFrame(num) { 52379 this.checkLayerLimits(num); 52380 }, 52381 checkTransparency: function checkTransparency() { 52382 if (this.finalTransform.mProp.o.v <= 0) { 52383 if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) { 52384 this.isTransparent = true; 52385 this.hide(); 52386 } 52387 } else if (this.isTransparent) { 52388 this.isTransparent = false; 52389 this.show(); 52390 } 52391 }, 52392 52393 /** 52394 * @function 52395 * Initializes frame related properties. 52396 * 52397 * @param {number} num 52398 * current frame number in Layer's time 52399 * 52400 */ 52401 checkLayerLimits: function checkLayerLimits(num) { 52402 if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) { 52403 if (this.isInRange !== true) { 52404 this.globalData._mdf = true; 52405 this._mdf = true; 52406 this.isInRange = true; 52407 this.show(); 52408 } 52409 } else if (this.isInRange !== false) { 52410 this.globalData._mdf = true; 52411 this.isInRange = false; 52412 this.hide(); 52413 } 52414 }, 52415 renderRenderable: function renderRenderable() { 52416 var i; 52417 var len = this.renderableComponents.length; 52418 52419 for (i = 0; i < len; i += 1) { 52420 this.renderableComponents[i].renderFrame(this._isFirstFrame); 52421 } 52422 /* this.maskManager.renderFrame(this.finalTransform.mat); 52423 this.renderableEffectsManager.renderFrame(this._isFirstFrame); */ 52424 52425 }, 52426 sourceRectAtTime: function sourceRectAtTime() { 52427 return { 52428 top: 0, 52429 left: 0, 52430 width: 100, 52431 height: 100 52432 }; 52433 }, 52434 getLayerSize: function getLayerSize() { 52435 if (this.data.ty === 5) { 52436 return { 52437 w: this.data.textData.width, 52438 h: this.data.textData.height 52439 }; 52440 } 52441 52442 return { 52443 w: this.data.width, 52444 h: this.data.height 52445 }; 52446 } 52447 }; 52448 52449 var getBlendMode = function () { 52450 var blendModeEnums = { 52451 0: 'source-over', 52452 1: 'multiply', 52453 2: 'screen', 52454 3: 'overlay', 52455 4: 'darken', 52456 5: 'lighten', 52457 6: 'color-dodge', 52458 7: 'color-burn', 52459 8: 'hard-light', 52460 9: 'soft-light', 52461 10: 'difference', 52462 11: 'exclusion', 52463 12: 'hue', 52464 13: 'saturation', 52465 14: 'color', 52466 15: 'luminosity' 52467 }; 52468 return function (mode) { 52469 return blendModeEnums[mode] || ''; 52470 }; 52471 }(); 52472 52473 function SliderEffect(data, elem, container) { 52474 this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); 52475 } 52476 52477 function AngleEffect(data, elem, container) { 52478 this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); 52479 } 52480 52481 function ColorEffect(data, elem, container) { 52482 this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container); 52483 } 52484 52485 function PointEffect(data, elem, container) { 52486 this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container); 52487 } 52488 52489 function LayerIndexEffect(data, elem, container) { 52490 this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); 52491 } 52492 52493 function MaskIndexEffect(data, elem, container) { 52494 this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); 52495 } 52496 52497 function CheckboxEffect(data, elem, container) { 52498 this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); 52499 } 52500 52501 function NoValueEffect() { 52502 this.p = {}; 52503 } 52504 52505 function EffectsManager(data, element) { 52506 var effects = data.ef || []; 52507 this.effectElements = []; 52508 var i; 52509 var len = effects.length; 52510 var effectItem; 52511 52512 for (i = 0; i < len; i += 1) { 52513 effectItem = new GroupEffect(effects[i], element); 52514 this.effectElements.push(effectItem); 52515 } 52516 } 52517 52518 function GroupEffect(data, element) { 52519 this.init(data, element); 52520 } 52521 52522 extendPrototype([DynamicPropertyContainer], GroupEffect); 52523 GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties; 52524 52525 GroupEffect.prototype.init = function (data, element) { 52526 this.data = data; 52527 this.effectElements = []; 52528 this.initDynamicPropertyContainer(element); 52529 var i; 52530 var len = this.data.ef.length; 52531 var eff; 52532 var effects = this.data.ef; 52533 52534 for (i = 0; i < len; i += 1) { 52535 eff = null; 52536 52537 switch (effects[i].ty) { 52538 case 0: 52539 eff = new SliderEffect(effects[i], element, this); 52540 break; 52541 52542 case 1: 52543 eff = new AngleEffect(effects[i], element, this); 52544 break; 52545 52546 case 2: 52547 eff = new ColorEffect(effects[i], element, this); 52548 break; 52549 52550 case 3: 52551 eff = new PointEffect(effects[i], element, this); 52552 break; 52553 52554 case 4: 52555 case 7: 52556 eff = new CheckboxEffect(effects[i], element, this); 52557 break; 52558 52559 case 10: 52560 eff = new LayerIndexEffect(effects[i], element, this); 52561 break; 52562 52563 case 11: 52564 eff = new MaskIndexEffect(effects[i], element, this); 52565 break; 52566 52567 case 5: 52568 eff = new EffectsManager(effects[i], element, this); 52569 break; 52570 // case 6: 52571 52572 default: 52573 eff = new NoValueEffect(effects[i], element, this); 52574 break; 52575 } 52576 52577 if (eff) { 52578 this.effectElements.push(eff); 52579 } 52580 } 52581 }; 52582 52583 function BaseElement() {} 52584 52585 BaseElement.prototype = { 52586 checkMasks: function checkMasks() { 52587 if (!this.data.hasMask) { 52588 return false; 52589 } 52590 52591 var i = 0; 52592 var len = this.data.masksProperties.length; 52593 52594 while (i < len) { 52595 if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) { 52596 return true; 52597 } 52598 52599 i += 1; 52600 } 52601 52602 return false; 52603 }, 52604 initExpressions: function initExpressions() { 52605 var expressionsInterfaces = getExpressionInterfaces(); 52606 52607 if (!expressionsInterfaces) { 52608 return; 52609 } 52610 52611 var LayerExpressionInterface = expressionsInterfaces('layer'); 52612 var EffectsExpressionInterface = expressionsInterfaces('effects'); 52613 var ShapeExpressionInterface = expressionsInterfaces('shape'); 52614 var TextExpressionInterface = expressionsInterfaces('text'); 52615 var CompExpressionInterface = expressionsInterfaces('comp'); 52616 this.layerInterface = LayerExpressionInterface(this); 52617 52618 if (this.data.hasMask && this.maskManager) { 52619 this.layerInterface.registerMaskInterface(this.maskManager); 52620 } 52621 52622 var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface); 52623 this.layerInterface.registerEffectsInterface(effectsInterface); 52624 52625 if (this.data.ty === 0 || this.data.xt) { 52626 this.compInterface = CompExpressionInterface(this); 52627 } else if (this.data.ty === 4) { 52628 this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface); 52629 this.layerInterface.content = this.layerInterface.shapeInterface; 52630 } else if (this.data.ty === 5) { 52631 this.layerInterface.textInterface = TextExpressionInterface(this); 52632 this.layerInterface.text = this.layerInterface.textInterface; 52633 } 52634 }, 52635 setBlendMode: function setBlendMode() { 52636 var blendModeValue = getBlendMode(this.data.bm); 52637 var elem = this.baseElement || this.layerElement; 52638 elem.style['mix-blend-mode'] = blendModeValue; 52639 }, 52640 initBaseData: function initBaseData(data, globalData, comp) { 52641 this.globalData = globalData; 52642 this.comp = comp; 52643 this.data = data; 52644 this.layerId = createElementID(); // Stretch factor for old animations missing this property. 52645 52646 if (!this.data.sr) { 52647 this.data.sr = 1; 52648 } // effects manager 52649 52650 52651 this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties); 52652 }, 52653 getType: function getType() { 52654 return this.type; 52655 }, 52656 sourceRectAtTime: function sourceRectAtTime() {} 52657 }; 52658 52659 /** 52660 * @file 52661 * Handles element's layer frame update. 52662 * Checks layer in point and out point 52663 * 52664 */ 52665 function FrameElement() {} 52666 52667 FrameElement.prototype = { 52668 /** 52669 * @function 52670 * Initializes frame related properties. 52671 * 52672 */ 52673 initFrame: function initFrame() { 52674 // set to true when inpoint is rendered 52675 this._isFirstFrame = false; // list of animated properties 52676 52677 this.dynamicProperties = []; // If layer has been modified in current tick this will be true 52678 52679 this._mdf = false; 52680 }, 52681 52682 /** 52683 * @function 52684 * Calculates all dynamic values 52685 * 52686 * @param {number} num 52687 * current frame number in Layer's time 52688 * @param {boolean} isVisible 52689 * if layers is currently in range 52690 * 52691 */ 52692 prepareProperties: function prepareProperties(num, isVisible) { 52693 var i; 52694 var len = this.dynamicProperties.length; 52695 52696 for (i = 0; i < len; i += 1) { 52697 if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') { 52698 this.dynamicProperties[i].getValue(); 52699 52700 if (this.dynamicProperties[i]._mdf) { 52701 this.globalData._mdf = true; 52702 this._mdf = true; 52703 } 52704 } 52705 } 52706 }, 52707 addDynamicProperty: function addDynamicProperty(prop) { 52708 if (this.dynamicProperties.indexOf(prop) === -1) { 52709 this.dynamicProperties.push(prop); 52710 } 52711 } 52712 }; 52713 52714 function FootageElement(data, globalData, comp) { 52715 this.initFrame(); 52716 this.initRenderable(); 52717 this.assetData = globalData.getAssetData(data.refId); 52718 this.footageData = globalData.imageLoader.getAsset(this.assetData); 52719 this.initBaseData(data, globalData, comp); 52720 } 52721 52722 FootageElement.prototype.prepareFrame = function () {}; 52723 52724 extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement); 52725 52726 FootageElement.prototype.getBaseElement = function () { 52727 return null; 52728 }; 52729 52730 FootageElement.prototype.renderFrame = function () {}; 52731 52732 FootageElement.prototype.destroy = function () {}; 52733 52734 FootageElement.prototype.initExpressions = function () { 52735 var expressionsInterfaces = getExpressionInterfaces(); 52736 52737 if (!expressionsInterfaces) { 52738 return; 52739 } 52740 52741 var FootageInterface = expressionsInterfaces('footage'); 52742 this.layerInterface = FootageInterface(this); 52743 }; 52744 52745 FootageElement.prototype.getFootageData = function () { 52746 return this.footageData; 52747 }; 52748 52749 function AudioElement(data, globalData, comp) { 52750 this.initFrame(); 52751 this.initRenderable(); 52752 this.assetData = globalData.getAssetData(data.refId); 52753 this.initBaseData(data, globalData, comp); 52754 this._isPlaying = false; 52755 this._canPlay = false; 52756 var assetPath = this.globalData.getAssetsPath(this.assetData); 52757 this.audio = this.globalData.audioController.createAudio(assetPath); 52758 this._currentTime = 0; 52759 this.globalData.audioController.addAudio(this); 52760 this._volumeMultiplier = 1; 52761 this._volume = 1; 52762 this._previousVolume = null; 52763 this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { 52764 _placeholder: true 52765 }; 52766 this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : { 52767 k: [100] 52768 }, 1, 0.01, this); 52769 } 52770 52771 AudioElement.prototype.prepareFrame = function (num) { 52772 this.prepareRenderableFrame(num, true); 52773 this.prepareProperties(num, true); 52774 52775 if (!this.tm._placeholder) { 52776 var timeRemapped = this.tm.v; 52777 this._currentTime = timeRemapped; 52778 } else { 52779 this._currentTime = num / this.data.sr; 52780 } 52781 52782 this._volume = this.lv.v[0]; 52783 var totalVolume = this._volume * this._volumeMultiplier; 52784 52785 if (this._previousVolume !== totalVolume) { 52786 this._previousVolume = totalVolume; 52787 this.audio.volume(totalVolume); 52788 } 52789 }; 52790 52791 extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement); 52792 52793 AudioElement.prototype.renderFrame = function () { 52794 if (this.isInRange && this._canPlay) { 52795 if (!this._isPlaying) { 52796 this.audio.play(); 52797 this.audio.seek(this._currentTime / this.globalData.frameRate); 52798 this._isPlaying = true; 52799 } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) { 52800 this.audio.seek(this._currentTime / this.globalData.frameRate); 52801 } 52802 } 52803 }; 52804 52805 AudioElement.prototype.show = function () {// this.audio.play() 52806 }; 52807 52808 AudioElement.prototype.hide = function () { 52809 this.audio.pause(); 52810 this._isPlaying = false; 52811 }; 52812 52813 AudioElement.prototype.pause = function () { 52814 this.audio.pause(); 52815 this._isPlaying = false; 52816 this._canPlay = false; 52817 }; 52818 52819 AudioElement.prototype.resume = function () { 52820 this._canPlay = true; 52821 }; 52822 52823 AudioElement.prototype.setRate = function (rateValue) { 52824 this.audio.rate(rateValue); 52825 }; 52826 52827 AudioElement.prototype.volume = function (volumeValue) { 52828 this._volumeMultiplier = volumeValue; 52829 this._previousVolume = volumeValue * this._volume; 52830 this.audio.volume(this._previousVolume); 52831 }; 52832 52833 AudioElement.prototype.getBaseElement = function () { 52834 return null; 52835 }; 52836 52837 AudioElement.prototype.destroy = function () {}; 52838 52839 AudioElement.prototype.sourceRectAtTime = function () {}; 52840 52841 AudioElement.prototype.initExpressions = function () {}; 52842 52843 function BaseRenderer() {} 52844 52845 BaseRenderer.prototype.checkLayers = function (num) { 52846 var i; 52847 var len = this.layers.length; 52848 var data; 52849 this.completeLayers = true; 52850 52851 for (i = len - 1; i >= 0; i -= 1) { 52852 if (!this.elements[i]) { 52853 data = this.layers[i]; 52854 52855 if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) { 52856 this.buildItem(i); 52857 } 52858 } 52859 52860 this.completeLayers = this.elements[i] ? this.completeLayers : false; 52861 } 52862 52863 this.checkPendingElements(); 52864 }; 52865 52866 BaseRenderer.prototype.createItem = function (layer) { 52867 switch (layer.ty) { 52868 case 2: 52869 return this.createImage(layer); 52870 52871 case 0: 52872 return this.createComp(layer); 52873 52874 case 1: 52875 return this.createSolid(layer); 52876 52877 case 3: 52878 return this.createNull(layer); 52879 52880 case 4: 52881 return this.createShape(layer); 52882 52883 case 5: 52884 return this.createText(layer); 52885 52886 case 6: 52887 return this.createAudio(layer); 52888 52889 case 13: 52890 return this.createCamera(layer); 52891 52892 case 15: 52893 return this.createFootage(layer); 52894 52895 default: 52896 return this.createNull(layer); 52897 } 52898 }; 52899 52900 BaseRenderer.prototype.createCamera = function () { 52901 throw new Error('You\'re using a 3d camera. Try the html renderer.'); 52902 }; 52903 52904 BaseRenderer.prototype.createAudio = function (data) { 52905 return new AudioElement(data, this.globalData, this); 52906 }; 52907 52908 BaseRenderer.prototype.createFootage = function (data) { 52909 return new FootageElement(data, this.globalData, this); 52910 }; 52911 52912 BaseRenderer.prototype.buildAllItems = function () { 52913 var i; 52914 var len = this.layers.length; 52915 52916 for (i = 0; i < len; i += 1) { 52917 this.buildItem(i); 52918 } 52919 52920 this.checkPendingElements(); 52921 }; 52922 52923 BaseRenderer.prototype.includeLayers = function (newLayers) { 52924 this.completeLayers = false; 52925 var i; 52926 var len = newLayers.length; 52927 var j; 52928 var jLen = this.layers.length; 52929 52930 for (i = 0; i < len; i += 1) { 52931 j = 0; 52932 52933 while (j < jLen) { 52934 if (this.layers[j].id === newLayers[i].id) { 52935 this.layers[j] = newLayers[i]; 52936 break; 52937 } 52938 52939 j += 1; 52940 } 52941 } 52942 }; 52943 52944 BaseRenderer.prototype.setProjectInterface = function (pInterface) { 52945 this.globalData.projectInterface = pInterface; 52946 }; 52947 52948 BaseRenderer.prototype.initItems = function () { 52949 if (!this.globalData.progressiveLoad) { 52950 this.buildAllItems(); 52951 } 52952 }; 52953 52954 BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) { 52955 var elements = this.elements; 52956 var layers = this.layers; 52957 var i = 0; 52958 var len = layers.length; 52959 52960 while (i < len) { 52961 if (layers[i].ind == parentName) { 52962 // eslint-disable-line eqeqeq 52963 if (!elements[i] || elements[i] === true) { 52964 this.buildItem(i); 52965 this.addPendingElement(element); 52966 } else { 52967 hierarchy.push(elements[i]); 52968 elements[i].setAsParent(); 52969 52970 if (layers[i].parent !== undefined) { 52971 this.buildElementParenting(element, layers[i].parent, hierarchy); 52972 } else { 52973 element.setHierarchy(hierarchy); 52974 } 52975 } 52976 } 52977 52978 i += 1; 52979 } 52980 }; 52981 52982 BaseRenderer.prototype.addPendingElement = function (element) { 52983 this.pendingElements.push(element); 52984 }; 52985 52986 BaseRenderer.prototype.searchExtraCompositions = function (assets) { 52987 var i; 52988 var len = assets.length; 52989 52990 for (i = 0; i < len; i += 1) { 52991 if (assets[i].xt) { 52992 var comp = this.createComp(assets[i]); 52993 comp.initExpressions(); 52994 this.globalData.projectInterface.registerComposition(comp); 52995 } 52996 } 52997 }; 52998 52999 BaseRenderer.prototype.getElementById = function (ind) { 53000 var i; 53001 var len = this.elements.length; 53002 53003 for (i = 0; i < len; i += 1) { 53004 if (this.elements[i].data.ind === ind) { 53005 return this.elements[i]; 53006 } 53007 } 53008 53009 return null; 53010 }; 53011 53012 BaseRenderer.prototype.getElementByPath = function (path) { 53013 var pathValue = path.shift(); 53014 var element; 53015 53016 if (typeof pathValue === 'number') { 53017 element = this.elements[pathValue]; 53018 } else { 53019 var i; 53020 var len = this.elements.length; 53021 53022 for (i = 0; i < len; i += 1) { 53023 if (this.elements[i].data.nm === pathValue) { 53024 element = this.elements[i]; 53025 break; 53026 } 53027 } 53028 } 53029 53030 if (path.length === 0) { 53031 return element; 53032 } 53033 53034 return element.getElementByPath(path); 53035 }; 53036 53037 BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) { 53038 this.globalData.fontManager = new FontManager(); 53039 this.globalData.slotManager = slotFactory(animData); 53040 this.globalData.fontManager.addChars(animData.chars); 53041 this.globalData.fontManager.addFonts(animData.fonts, fontsContainer); 53042 this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem); 53043 this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem); 53044 this.globalData.imageLoader = this.animationItem.imagePreloader; 53045 this.globalData.audioController = this.animationItem.audioController; 53046 this.globalData.frameId = 0; 53047 this.globalData.frameRate = animData.fr; 53048 this.globalData.nm = animData.nm; 53049 this.globalData.compSize = { 53050 w: animData.w, 53051 h: animData.h 53052 }; 53053 }; 53054 53055 var effectTypes = { 53056 TRANSFORM_EFFECT: 'transformEFfect' 53057 }; 53058 53059 function TransformElement() {} 53060 53061 TransformElement.prototype = { 53062 initTransform: function initTransform() { 53063 var mat = new Matrix(); 53064 this.finalTransform = { 53065 mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { 53066 o: 0 53067 }, 53068 _matMdf: false, 53069 _localMatMdf: false, 53070 _opMdf: false, 53071 mat: mat, 53072 localMat: mat, 53073 localOpacity: 1 53074 }; 53075 53076 if (this.data.ao) { 53077 this.finalTransform.mProp.autoOriented = true; 53078 } // TODO: check TYPE 11: Guided elements 53079 53080 53081 if (this.data.ty !== 11) {// this.createElements(); 53082 } 53083 }, 53084 renderTransform: function renderTransform() { 53085 this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame; 53086 this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame; 53087 53088 if (this.hierarchy) { 53089 var mat; 53090 var finalMat = this.finalTransform.mat; 53091 var i = 0; 53092 var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed. 53093 53094 if (!this.finalTransform._matMdf) { 53095 while (i < len) { 53096 if (this.hierarchy[i].finalTransform.mProp._mdf) { 53097 this.finalTransform._matMdf = true; 53098 break; 53099 } 53100 53101 i += 1; 53102 } 53103 } 53104 53105 if (this.finalTransform._matMdf) { 53106 mat = this.finalTransform.mProp.v.props; 53107 finalMat.cloneFromProps(mat); 53108 53109 for (i = 0; i < len; i += 1) { 53110 finalMat.multiply(this.hierarchy[i].finalTransform.mProp.v); 53111 } 53112 } 53113 } 53114 53115 if (this.finalTransform._matMdf) { 53116 this.finalTransform._localMatMdf = this.finalTransform._matMdf; 53117 } 53118 53119 if (this.finalTransform._opMdf) { 53120 this.finalTransform.localOpacity = this.finalTransform.mProp.o.v; 53121 } 53122 }, 53123 renderLocalTransform: function renderLocalTransform() { 53124 if (this.localTransforms) { 53125 var i = 0; 53126 var len = this.localTransforms.length; 53127 this.finalTransform._localMatMdf = this.finalTransform._matMdf; 53128 53129 if (!this.finalTransform._localMatMdf || !this.finalTransform._opMdf) { 53130 while (i < len) { 53131 if (this.localTransforms[i]._mdf) { 53132 this.finalTransform._localMatMdf = true; 53133 } 53134 53135 if (this.localTransforms[i]._opMdf && !this.finalTransform._opMdf) { 53136 this.finalTransform.localOpacity = this.finalTransform.mProp.o.v; 53137 this.finalTransform._opMdf = true; 53138 } 53139 53140 i += 1; 53141 } 53142 } 53143 53144 if (this.finalTransform._localMatMdf) { 53145 var localMat = this.finalTransform.localMat; 53146 this.localTransforms[0].matrix.clone(localMat); 53147 53148 for (i = 1; i < len; i += 1) { 53149 var lmat = this.localTransforms[i].matrix; 53150 localMat.multiply(lmat); 53151 } 53152 53153 localMat.multiply(this.finalTransform.mat); 53154 } 53155 53156 if (this.finalTransform._opMdf) { 53157 var localOp = this.finalTransform.localOpacity; 53158 53159 for (i = 0; i < len; i += 1) { 53160 localOp *= this.localTransforms[i].opacity * 0.01; 53161 } 53162 53163 this.finalTransform.localOpacity = localOp; 53164 } 53165 } 53166 }, 53167 searchEffectTransforms: function searchEffectTransforms() { 53168 if (this.renderableEffectsManager) { 53169 var transformEffects = this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT); 53170 53171 if (transformEffects.length) { 53172 this.localTransforms = []; 53173 this.finalTransform.localMat = new Matrix(); 53174 var i = 0; 53175 var len = transformEffects.length; 53176 53177 for (i = 0; i < len; i += 1) { 53178 this.localTransforms.push(transformEffects[i]); 53179 } 53180 } 53181 } 53182 }, 53183 globalToLocal: function globalToLocal(pt) { 53184 var transforms = []; 53185 transforms.push(this.finalTransform); 53186 var flag = true; 53187 var comp = this.comp; 53188 53189 while (flag) { 53190 if (comp.finalTransform) { 53191 if (comp.data.hasMask) { 53192 transforms.splice(0, 0, comp.finalTransform); 53193 } 53194 53195 comp = comp.comp; 53196 } else { 53197 flag = false; 53198 } 53199 } 53200 53201 var i; 53202 var len = transforms.length; 53203 var ptNew; 53204 53205 for (i = 0; i < len; i += 1) { 53206 ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]); 53207 53208 pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0]; 53209 } 53210 53211 return pt; 53212 }, 53213 mHelper: new Matrix() 53214 }; 53215 53216 function MaskElement(data, element, globalData) { 53217 this.data = data; 53218 this.element = element; 53219 this.globalData = globalData; 53220 this.storedData = []; 53221 this.masksProperties = this.data.masksProperties || []; 53222 this.maskElement = null; 53223 var defs = this.globalData.defs; 53224 var i; 53225 var len = this.masksProperties ? this.masksProperties.length : 0; 53226 this.viewData = createSizedArray(len); 53227 this.solidPath = ''; 53228 var path; 53229 var properties = this.masksProperties; 53230 var count = 0; 53231 var currentMasks = []; 53232 var j; 53233 var jLen; 53234 var layerId = createElementID(); 53235 var rect; 53236 var expansor; 53237 var feMorph; 53238 var x; 53239 var maskType = 'clipPath'; 53240 var maskRef = 'clip-path'; 53241 53242 for (i = 0; i < len; i += 1) { 53243 if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) { 53244 maskType = 'mask'; 53245 maskRef = 'mask'; 53246 } 53247 53248 if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) { 53249 rect = createNS('rect'); 53250 rect.setAttribute('fill', '#ffffff'); 53251 rect.setAttribute('width', this.element.comp.data.w || 0); 53252 rect.setAttribute('height', this.element.comp.data.h || 0); 53253 currentMasks.push(rect); 53254 } else { 53255 rect = null; 53256 } 53257 53258 path = createNS('path'); 53259 53260 if (properties[i].mode === 'n') { 53261 // TODO move this to a factory or to a constructor 53262 this.viewData[i] = { 53263 op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element), 53264 prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3), 53265 elem: path, 53266 lastPath: '' 53267 }; 53268 defs.appendChild(path); 53269 } else { 53270 count += 1; 53271 path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff'); 53272 path.setAttribute('clip-rule', 'nonzero'); 53273 var filterID; 53274 53275 if (properties[i].x.k !== 0) { 53276 maskType = 'mask'; 53277 maskRef = 'mask'; 53278 x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element); 53279 filterID = createElementID(); 53280 expansor = createNS('filter'); 53281 expansor.setAttribute('id', filterID); 53282 feMorph = createNS('feMorphology'); 53283 feMorph.setAttribute('operator', 'erode'); 53284 feMorph.setAttribute('in', 'SourceGraphic'); 53285 feMorph.setAttribute('radius', '0'); 53286 expansor.appendChild(feMorph); 53287 defs.appendChild(expansor); 53288 path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff'); 53289 } else { 53290 feMorph = null; 53291 x = null; 53292 } // TODO move this to a factory or to a constructor 53293 53294 53295 this.storedData[i] = { 53296 elem: path, 53297 x: x, 53298 expan: feMorph, 53299 lastPath: '', 53300 lastOperator: '', 53301 filterId: filterID, 53302 lastRadius: 0 53303 }; 53304 53305 if (properties[i].mode === 'i') { 53306 jLen = currentMasks.length; 53307 var g = createNS('g'); 53308 53309 for (j = 0; j < jLen; j += 1) { 53310 g.appendChild(currentMasks[j]); 53311 } 53312 53313 var mask = createNS('mask'); 53314 mask.setAttribute('mask-type', 'alpha'); 53315 mask.setAttribute('id', layerId + '_' + count); 53316 mask.appendChild(path); 53317 defs.appendChild(mask); 53318 g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')'); 53319 currentMasks.length = 0; 53320 currentMasks.push(g); 53321 } else { 53322 currentMasks.push(path); 53323 } 53324 53325 if (properties[i].inv && !this.solidPath) { 53326 this.solidPath = this.createLayerSolidPath(); 53327 } // TODO move this to a factory or to a constructor 53328 53329 53330 this.viewData[i] = { 53331 elem: path, 53332 lastPath: '', 53333 op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element), 53334 prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3), 53335 invRect: rect 53336 }; 53337 53338 if (!this.viewData[i].prop.k) { 53339 this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]); 53340 } 53341 } 53342 } 53343 53344 this.maskElement = createNS(maskType); 53345 len = currentMasks.length; 53346 53347 for (i = 0; i < len; i += 1) { 53348 this.maskElement.appendChild(currentMasks[i]); 53349 } 53350 53351 if (count > 0) { 53352 this.maskElement.setAttribute('id', layerId); 53353 this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')'); 53354 defs.appendChild(this.maskElement); 53355 } 53356 53357 if (this.viewData.length) { 53358 this.element.addRenderableComponent(this); 53359 } 53360 } 53361 53362 MaskElement.prototype.getMaskProperty = function (pos) { 53363 return this.viewData[pos].prop; 53364 }; 53365 53366 MaskElement.prototype.renderFrame = function (isFirstFrame) { 53367 var finalMat = this.element.finalTransform.mat; 53368 var i; 53369 var len = this.masksProperties.length; 53370 53371 for (i = 0; i < len; i += 1) { 53372 if (this.viewData[i].prop._mdf || isFirstFrame) { 53373 this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]); 53374 } 53375 53376 if (this.viewData[i].op._mdf || isFirstFrame) { 53377 this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v); 53378 } 53379 53380 if (this.masksProperties[i].mode !== 'n') { 53381 if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) { 53382 this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS()); 53383 } 53384 53385 if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) { 53386 var feMorph = this.storedData[i].expan; 53387 53388 if (this.storedData[i].x.v < 0) { 53389 if (this.storedData[i].lastOperator !== 'erode') { 53390 this.storedData[i].lastOperator = 'erode'; 53391 this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')'); 53392 } 53393 53394 feMorph.setAttribute('radius', -this.storedData[i].x.v); 53395 } else { 53396 if (this.storedData[i].lastOperator !== 'dilate') { 53397 this.storedData[i].lastOperator = 'dilate'; 53398 this.storedData[i].elem.setAttribute('filter', null); 53399 } 53400 53401 this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2); 53402 } 53403 } 53404 } 53405 } 53406 }; 53407 53408 MaskElement.prototype.getMaskelement = function () { 53409 return this.maskElement; 53410 }; 53411 53412 MaskElement.prototype.createLayerSolidPath = function () { 53413 var path = 'M0,0 '; 53414 path += ' h' + this.globalData.compSize.w; 53415 path += ' v' + this.globalData.compSize.h; 53416 path += ' h-' + this.globalData.compSize.w; 53417 path += ' v-' + this.globalData.compSize.h + ' '; 53418 return path; 53419 }; 53420 53421 MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) { 53422 var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1]; 53423 var i; 53424 var len; 53425 len = pathNodes._length; 53426 53427 for (i = 1; i < len; i += 1) { 53428 // pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[i][0]+','+pathNodes.i[i][1] + " "+pathNodes.v[i][0]+','+pathNodes.v[i][1]; 53429 pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1]; 53430 } // pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[0][0]+','+pathNodes.i[0][1] + " "+pathNodes.v[0][0]+','+pathNodes.v[0][1]; 53431 53432 53433 if (pathNodes.c && len > 1) { 53434 pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1]; 53435 } // pathNodes.__renderedString = pathString; 53436 53437 53438 if (viewData.lastPath !== pathString) { 53439 var pathShapeValue = ''; 53440 53441 if (viewData.elem) { 53442 if (pathNodes.c) { 53443 pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString; 53444 } 53445 53446 viewData.elem.setAttribute('d', pathShapeValue); 53447 } 53448 53449 viewData.lastPath = pathString; 53450 } 53451 }; 53452 53453 MaskElement.prototype.destroy = function () { 53454 this.element = null; 53455 this.globalData = null; 53456 this.maskElement = null; 53457 this.data = null; 53458 this.masksProperties = null; 53459 }; 53460 53461 var filtersFactory = function () { 53462 var ob = {}; 53463 ob.createFilter = createFilter; 53464 ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter; 53465 53466 function createFilter(filId, skipCoordinates) { 53467 var fil = createNS('filter'); 53468 fil.setAttribute('id', filId); 53469 53470 if (skipCoordinates !== true) { 53471 fil.setAttribute('filterUnits', 'objectBoundingBox'); 53472 fil.setAttribute('x', '0%'); 53473 fil.setAttribute('y', '0%'); 53474 fil.setAttribute('width', '100%'); 53475 fil.setAttribute('height', '100%'); 53476 } 53477 53478 return fil; 53479 } 53480 53481 function createAlphaToLuminanceFilter() { 53482 var feColorMatrix = createNS('feColorMatrix'); 53483 feColorMatrix.setAttribute('type', 'matrix'); 53484 feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB'); 53485 feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1'); 53486 return feColorMatrix; 53487 } 53488 53489 return ob; 53490 }(); 53491 53492 var featureSupport = function () { 53493 var ob = { 53494 maskType: true, 53495 svgLumaHidden: true, 53496 offscreenCanvas: typeof OffscreenCanvas !== 'undefined' 53497 }; 53498 53499 if (/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)) { 53500 ob.maskType = false; 53501 } 53502 53503 if (/firefox/i.test(navigator.userAgent)) { 53504 ob.svgLumaHidden = false; 53505 } 53506 53507 return ob; 53508 }(); 53509 53510 var registeredEffects$1 = {}; 53511 var idPrefix = 'filter_result_'; 53512 53513 function SVGEffects(elem) { 53514 var i; 53515 var source = 'SourceGraphic'; 53516 var len = elem.data.ef ? elem.data.ef.length : 0; 53517 var filId = createElementID(); 53518 var fil = filtersFactory.createFilter(filId, true); 53519 var count = 0; 53520 this.filters = []; 53521 var filterManager; 53522 53523 for (i = 0; i < len; i += 1) { 53524 filterManager = null; 53525 var type = elem.data.ef[i].ty; 53526 53527 if (registeredEffects$1[type]) { 53528 var Effect = registeredEffects$1[type].effect; 53529 filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source); 53530 source = idPrefix + count; 53531 53532 if (registeredEffects$1[type].countsAsEffect) { 53533 count += 1; 53534 } 53535 } 53536 53537 if (filterManager) { 53538 this.filters.push(filterManager); 53539 } 53540 } 53541 53542 if (count) { 53543 elem.globalData.defs.appendChild(fil); 53544 elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); 53545 } 53546 53547 if (this.filters.length) { 53548 elem.addRenderableComponent(this); 53549 } 53550 } 53551 53552 SVGEffects.prototype.renderFrame = function (_isFirstFrame) { 53553 var i; 53554 var len = this.filters.length; 53555 53556 for (i = 0; i < len; i += 1) { 53557 this.filters[i].renderFrame(_isFirstFrame); 53558 } 53559 }; 53560 53561 SVGEffects.prototype.getEffects = function (type) { 53562 var i; 53563 var len = this.filters.length; 53564 var effects = []; 53565 53566 for (i = 0; i < len; i += 1) { 53567 if (this.filters[i].type === type) { 53568 effects.push(this.filters[i]); 53569 } 53570 } 53571 53572 return effects; 53573 }; 53574 53575 function registerEffect$1(id, effect, countsAsEffect) { 53576 registeredEffects$1[id] = { 53577 effect: effect, 53578 countsAsEffect: countsAsEffect 53579 }; 53580 } 53581 53582 function SVGBaseElement() {} 53583 53584 SVGBaseElement.prototype = { 53585 initRendererElement: function initRendererElement() { 53586 this.layerElement = createNS('g'); 53587 }, 53588 createContainerElements: function createContainerElements() { 53589 this.matteElement = createNS('g'); 53590 this.transformedElement = this.layerElement; 53591 this.maskedElement = this.layerElement; 53592 this._sizeChanged = false; 53593 var layerElementParent = null; // If this layer acts as a mask for the following layer 53594 53595 if (this.data.td) { 53596 this.matteMasks = {}; 53597 var gg = createNS('g'); 53598 gg.setAttribute('id', this.layerId); 53599 gg.appendChild(this.layerElement); 53600 layerElementParent = gg; 53601 this.globalData.defs.appendChild(gg); 53602 } else if (this.data.tt) { 53603 this.matteElement.appendChild(this.layerElement); 53604 layerElementParent = this.matteElement; 53605 this.baseElement = this.matteElement; 53606 } else { 53607 this.baseElement = this.layerElement; 53608 } 53609 53610 if (this.data.ln) { 53611 this.layerElement.setAttribute('id', this.data.ln); 53612 } 53613 53614 if (this.data.cl) { 53615 this.layerElement.setAttribute('class', this.data.cl); 53616 } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped 53617 53618 53619 if (this.data.ty === 0 && !this.data.hd) { 53620 var cp = createNS('clipPath'); 53621 var pt = createNS('path'); 53622 pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z'); 53623 var clipId = createElementID(); 53624 cp.setAttribute('id', clipId); 53625 cp.appendChild(pt); 53626 this.globalData.defs.appendChild(cp); 53627 53628 if (this.checkMasks()) { 53629 var cpGroup = createNS('g'); 53630 cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')'); 53631 cpGroup.appendChild(this.layerElement); 53632 this.transformedElement = cpGroup; 53633 53634 if (layerElementParent) { 53635 layerElementParent.appendChild(this.transformedElement); 53636 } else { 53637 this.baseElement = this.transformedElement; 53638 } 53639 } else { 53640 this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')'); 53641 } 53642 } 53643 53644 if (this.data.bm !== 0) { 53645 this.setBlendMode(); 53646 } 53647 }, 53648 renderElement: function renderElement() { 53649 if (this.finalTransform._localMatMdf) { 53650 this.transformedElement.setAttribute('transform', this.finalTransform.localMat.to2dCSS()); 53651 } 53652 53653 if (this.finalTransform._opMdf) { 53654 this.transformedElement.setAttribute('opacity', this.finalTransform.localOpacity); 53655 } 53656 }, 53657 destroyBaseElement: function destroyBaseElement() { 53658 this.layerElement = null; 53659 this.matteElement = null; 53660 this.maskManager.destroy(); 53661 }, 53662 getBaseElement: function getBaseElement() { 53663 if (this.data.hd) { 53664 return null; 53665 } 53666 53667 return this.baseElement; 53668 }, 53669 createRenderableComponents: function createRenderableComponents() { 53670 this.maskManager = new MaskElement(this.data, this, this.globalData); 53671 this.renderableEffectsManager = new SVGEffects(this); 53672 this.searchEffectTransforms(); 53673 }, 53674 getMatte: function getMatte(matteType) { 53675 // This should not be a common case. But for backward compatibility, we'll create the matte object. 53676 // It solves animations that have two consecutive layers marked as matte masks. 53677 // Which is an undefined behavior in AE. 53678 if (!this.matteMasks) { 53679 this.matteMasks = {}; 53680 } 53681 53682 if (!this.matteMasks[matteType]) { 53683 var id = this.layerId + '_' + matteType; 53684 var filId; 53685 var fil; 53686 var useElement; 53687 var gg; 53688 53689 if (matteType === 1 || matteType === 3) { 53690 var masker = createNS('mask'); 53691 masker.setAttribute('id', id); 53692 masker.setAttribute('mask-type', matteType === 3 ? 'luminance' : 'alpha'); 53693 useElement = createNS('use'); 53694 useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId); 53695 masker.appendChild(useElement); 53696 this.globalData.defs.appendChild(masker); 53697 53698 if (!featureSupport.maskType && matteType === 1) { 53699 masker.setAttribute('mask-type', 'luminance'); 53700 filId = createElementID(); 53701 fil = filtersFactory.createFilter(filId); 53702 this.globalData.defs.appendChild(fil); 53703 fil.appendChild(filtersFactory.createAlphaToLuminanceFilter()); 53704 gg = createNS('g'); 53705 gg.appendChild(useElement); 53706 masker.appendChild(gg); 53707 gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); 53708 } 53709 } else if (matteType === 2) { 53710 var maskGroup = createNS('mask'); 53711 maskGroup.setAttribute('id', id); 53712 maskGroup.setAttribute('mask-type', 'alpha'); 53713 var maskGrouper = createNS('g'); 53714 maskGroup.appendChild(maskGrouper); 53715 filId = createElementID(); 53716 fil = filtersFactory.createFilter(filId); /// / 53717 53718 var feCTr = createNS('feComponentTransfer'); 53719 feCTr.setAttribute('in', 'SourceGraphic'); 53720 fil.appendChild(feCTr); 53721 var feFunc = createNS('feFuncA'); 53722 feFunc.setAttribute('type', 'table'); 53723 feFunc.setAttribute('tableValues', '1.0 0.0'); 53724 feCTr.appendChild(feFunc); /// / 53725 53726 this.globalData.defs.appendChild(fil); 53727 var alphaRect = createNS('rect'); 53728 alphaRect.setAttribute('width', this.comp.data.w); 53729 alphaRect.setAttribute('height', this.comp.data.h); 53730 alphaRect.setAttribute('x', '0'); 53731 alphaRect.setAttribute('y', '0'); 53732 alphaRect.setAttribute('fill', '#ffffff'); 53733 alphaRect.setAttribute('opacity', '0'); 53734 maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); 53735 maskGrouper.appendChild(alphaRect); 53736 useElement = createNS('use'); 53737 useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId); 53738 maskGrouper.appendChild(useElement); 53739 53740 if (!featureSupport.maskType) { 53741 maskGroup.setAttribute('mask-type', 'luminance'); 53742 fil.appendChild(filtersFactory.createAlphaToLuminanceFilter()); 53743 gg = createNS('g'); 53744 maskGrouper.appendChild(alphaRect); 53745 gg.appendChild(this.layerElement); 53746 maskGrouper.appendChild(gg); 53747 } 53748 53749 this.globalData.defs.appendChild(maskGroup); 53750 } 53751 53752 this.matteMasks[matteType] = id; 53753 } 53754 53755 return this.matteMasks[matteType]; 53756 }, 53757 setMatte: function setMatte(id) { 53758 if (!this.matteElement) { 53759 return; 53760 } 53761 53762 this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')'); 53763 } 53764 }; 53765 53766 /** 53767 * @file 53768 * Handles AE's layer parenting property. 53769 * 53770 */ 53771 function HierarchyElement() {} 53772 53773 HierarchyElement.prototype = { 53774 /** 53775 * @function 53776 * Initializes hierarchy properties 53777 * 53778 */ 53779 initHierarchy: function initHierarchy() { 53780 // element's parent list 53781 this.hierarchy = []; // if element is parent of another layer _isParent will be true 53782 53783 this._isParent = false; 53784 this.checkParenting(); 53785 }, 53786 53787 /** 53788 * @function 53789 * Sets layer's hierarchy. 53790 * @param {array} hierarch 53791 * layer's parent list 53792 * 53793 */ 53794 setHierarchy: function setHierarchy(hierarchy) { 53795 this.hierarchy = hierarchy; 53796 }, 53797 53798 /** 53799 * @function 53800 * Sets layer as parent. 53801 * 53802 */ 53803 setAsParent: function setAsParent() { 53804 this._isParent = true; 53805 }, 53806 53807 /** 53808 * @function 53809 * Searches layer's parenting chain 53810 * 53811 */ 53812 checkParenting: function checkParenting() { 53813 if (this.data.parent !== undefined) { 53814 this.comp.buildElementParenting(this, this.data.parent, []); 53815 } 53816 } 53817 }; 53818 53819 function RenderableDOMElement() {} 53820 53821 (function () { 53822 var _prototype = { 53823 initElement: function initElement(data, globalData, comp) { 53824 this.initFrame(); 53825 this.initBaseData(data, globalData, comp); 53826 this.initTransform(data, globalData, comp); 53827 this.initHierarchy(); 53828 this.initRenderable(); 53829 this.initRendererElement(); 53830 this.createContainerElements(); 53831 this.createRenderableComponents(); 53832 this.createContent(); 53833 this.hide(); 53834 }, 53835 hide: function hide() { 53836 // console.log('HIDE', this); 53837 if (!this.hidden && (!this.isInRange || this.isTransparent)) { 53838 var elem = this.baseElement || this.layerElement; 53839 elem.style.display = 'none'; 53840 this.hidden = true; 53841 } 53842 }, 53843 show: function show() { 53844 // console.log('SHOW', this); 53845 if (this.isInRange && !this.isTransparent) { 53846 if (!this.data.hd) { 53847 var elem = this.baseElement || this.layerElement; 53848 elem.style.display = 'block'; 53849 } 53850 53851 this.hidden = false; 53852 this._isFirstFrame = true; 53853 } 53854 }, 53855 renderFrame: function renderFrame() { 53856 // If it is exported as hidden (data.hd === true) no need to render 53857 // If it is not visible no need to render 53858 if (this.data.hd || this.hidden) { 53859 return; 53860 } 53861 53862 this.renderTransform(); 53863 this.renderRenderable(); 53864 this.renderLocalTransform(); 53865 this.renderElement(); 53866 this.renderInnerContent(); 53867 53868 if (this._isFirstFrame) { 53869 this._isFirstFrame = false; 53870 } 53871 }, 53872 renderInnerContent: function renderInnerContent() {}, 53873 prepareFrame: function prepareFrame(num) { 53874 this._mdf = false; 53875 this.prepareRenderableFrame(num); 53876 this.prepareProperties(num, this.isInRange); 53877 this.checkTransparency(); 53878 }, 53879 destroy: function destroy() { 53880 this.innerElem = null; 53881 this.destroyBaseElement(); 53882 } 53883 }; 53884 extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement); 53885 })(); 53886 53887 function IImageElement(data, globalData, comp) { 53888 this.assetData = globalData.getAssetData(data.refId); 53889 53890 if (this.assetData && this.assetData.sid) { 53891 this.assetData = globalData.slotManager.getProp(this.assetData); 53892 } 53893 53894 this.initElement(data, globalData, comp); 53895 this.sourceRect = { 53896 top: 0, 53897 left: 0, 53898 width: this.assetData.w, 53899 height: this.assetData.h 53900 }; 53901 } 53902 53903 extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement); 53904 53905 IImageElement.prototype.createContent = function () { 53906 var assetPath = this.globalData.getAssetsPath(this.assetData); 53907 this.innerElem = createNS('image'); 53908 this.innerElem.setAttribute('width', this.assetData.w + 'px'); 53909 this.innerElem.setAttribute('height', this.assetData.h + 'px'); 53910 this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio); 53911 this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath); 53912 this.layerElement.appendChild(this.innerElem); 53913 }; 53914 53915 IImageElement.prototype.sourceRectAtTime = function () { 53916 return this.sourceRect; 53917 }; 53918 53919 function ProcessedElement(element, position) { 53920 this.elem = element; 53921 this.pos = position; 53922 } 53923 53924 function IShapeElement() {} 53925 53926 IShapeElement.prototype = { 53927 addShapeToModifiers: function addShapeToModifiers(data) { 53928 var i; 53929 var len = this.shapeModifiers.length; 53930 53931 for (i = 0; i < len; i += 1) { 53932 this.shapeModifiers[i].addShape(data); 53933 } 53934 }, 53935 isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) { 53936 var i = 0; 53937 var len = this.shapeModifiers.length; 53938 53939 while (i < len) { 53940 if (this.shapeModifiers[i].isAnimatedWithShape(data)) { 53941 return true; 53942 } 53943 } 53944 53945 return false; 53946 }, 53947 renderModifiers: function renderModifiers() { 53948 if (!this.shapeModifiers.length) { 53949 return; 53950 } 53951 53952 var i; 53953 var len = this.shapes.length; 53954 53955 for (i = 0; i < len; i += 1) { 53956 this.shapes[i].sh.reset(); 53957 } 53958 53959 len = this.shapeModifiers.length; 53960 var shouldBreakProcess; 53961 53962 for (i = len - 1; i >= 0; i -= 1) { 53963 shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice 53964 // TODO: find a better solution for this 53965 53966 if (shouldBreakProcess) { 53967 break; 53968 } 53969 } 53970 }, 53971 searchProcessedElement: function searchProcessedElement(elem) { 53972 var elements = this.processedElements; 53973 var i = 0; 53974 var len = elements.length; 53975 53976 while (i < len) { 53977 if (elements[i].elem === elem) { 53978 return elements[i].pos; 53979 } 53980 53981 i += 1; 53982 } 53983 53984 return 0; 53985 }, 53986 addProcessedElement: function addProcessedElement(elem, pos) { 53987 var elements = this.processedElements; 53988 var i = elements.length; 53989 53990 while (i) { 53991 i -= 1; 53992 53993 if (elements[i].elem === elem) { 53994 elements[i].pos = pos; 53995 return; 53996 } 53997 } 53998 53999 elements.push(new ProcessedElement(elem, pos)); 54000 }, 54001 prepareFrame: function prepareFrame(num) { 54002 this.prepareRenderableFrame(num); 54003 this.prepareProperties(num, this.isInRange); 54004 } 54005 }; 54006 54007 var lineCapEnum = { 54008 1: 'butt', 54009 2: 'round', 54010 3: 'square' 54011 }; 54012 var lineJoinEnum = { 54013 1: 'miter', 54014 2: 'round', 54015 3: 'bevel' 54016 }; 54017 54018 function SVGShapeData(transformers, level, shape) { 54019 this.caches = []; 54020 this.styles = []; 54021 this.transformers = transformers; 54022 this.lStr = ''; 54023 this.sh = shape; 54024 this.lvl = level; // TODO find if there are some cases where _isAnimated can be false. 54025 // For now, since shapes add up with other shapes. They have to be calculated every time. 54026 // One way of finding out is checking if all styles associated to this shape depend only of this shape 54027 54028 this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated 54029 54030 var i = 0; 54031 var len = transformers.length; 54032 54033 while (i < len) { 54034 if (transformers[i].mProps.dynamicProperties.length) { 54035 this._isAnimated = true; 54036 break; 54037 } 54038 54039 i += 1; 54040 } 54041 } 54042 54043 SVGShapeData.prototype.setAsAnimated = function () { 54044 this._isAnimated = true; 54045 }; 54046 54047 function SVGStyleData(data, level) { 54048 this.data = data; 54049 this.type = data.ty; 54050 this.d = ''; 54051 this.lvl = level; 54052 this._mdf = false; 54053 this.closed = data.hd === true; 54054 this.pElem = createNS('path'); 54055 this.msElem = null; 54056 } 54057 54058 SVGStyleData.prototype.reset = function () { 54059 this.d = ''; 54060 this._mdf = false; 54061 }; 54062 54063 function DashProperty(elem, data, renderer, container) { 54064 this.elem = elem; 54065 this.frameId = -1; 54066 this.dataProps = createSizedArray(data.length); 54067 this.renderer = renderer; 54068 this.k = false; 54069 this.dashStr = ''; 54070 this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0); 54071 this.dashoffset = createTypedArray('float32', 1); 54072 this.initDynamicPropertyContainer(container); 54073 var i; 54074 var len = data.length || 0; 54075 var prop; 54076 54077 for (i = 0; i < len; i += 1) { 54078 prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this); 54079 this.k = prop.k || this.k; 54080 this.dataProps[i] = { 54081 n: data[i].n, 54082 p: prop 54083 }; 54084 } 54085 54086 if (!this.k) { 54087 this.getValue(true); 54088 } 54089 54090 this._isAnimated = this.k; 54091 } 54092 54093 DashProperty.prototype.getValue = function (forceRender) { 54094 if (this.elem.globalData.frameId === this.frameId && !forceRender) { 54095 return; 54096 } 54097 54098 this.frameId = this.elem.globalData.frameId; 54099 this.iterateDynamicProperties(); 54100 this._mdf = this._mdf || forceRender; 54101 54102 if (this._mdf) { 54103 var i = 0; 54104 var len = this.dataProps.length; 54105 54106 if (this.renderer === 'svg') { 54107 this.dashStr = ''; 54108 } 54109 54110 for (i = 0; i < len; i += 1) { 54111 if (this.dataProps[i].n !== 'o') { 54112 if (this.renderer === 'svg') { 54113 this.dashStr += ' ' + this.dataProps[i].p.v; 54114 } else { 54115 this.dashArray[i] = this.dataProps[i].p.v; 54116 } 54117 } else { 54118 this.dashoffset[0] = this.dataProps[i].p.v; 54119 } 54120 } 54121 } 54122 }; 54123 54124 extendPrototype([DynamicPropertyContainer], DashProperty); 54125 54126 function SVGStrokeStyleData(elem, data, styleOb) { 54127 this.initDynamicPropertyContainer(elem); 54128 this.getValue = this.iterateDynamicProperties; 54129 this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); 54130 this.w = PropertyFactory.getProp(elem, data.w, 0, null, this); 54131 this.d = new DashProperty(elem, data.d || {}, 'svg', this); 54132 this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this); 54133 this.style = styleOb; 54134 this._isAnimated = !!this._isAnimated; 54135 } 54136 54137 extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData); 54138 54139 function SVGFillStyleData(elem, data, styleOb) { 54140 this.initDynamicPropertyContainer(elem); 54141 this.getValue = this.iterateDynamicProperties; 54142 this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); 54143 this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this); 54144 this.style = styleOb; 54145 } 54146 54147 extendPrototype([DynamicPropertyContainer], SVGFillStyleData); 54148 54149 function SVGNoStyleData(elem, data, styleOb) { 54150 this.initDynamicPropertyContainer(elem); 54151 this.getValue = this.iterateDynamicProperties; 54152 this.style = styleOb; 54153 } 54154 54155 extendPrototype([DynamicPropertyContainer], SVGNoStyleData); 54156 54157 function GradientProperty(elem, data, container) { 54158 this.data = data; 54159 this.c = createTypedArray('uint8c', data.p * 4); 54160 var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4; 54161 this.o = createTypedArray('float32', cLength); 54162 this._cmdf = false;
vendor: 4,099 bytes, lines 54163-54309
54163 this._omdf = false; 54164 this._collapsable = this.checkCollapsable(); 54165 this._hasOpacity = cLength; 54166 this.initDynamicPropertyContainer(container); 54167 this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this); 54168 this.k = this.prop.k; 54169 this.getValue(true); 54170 } 54171 54172 GradientProperty.prototype.comparePoints = function (values, points) { 54173 var i = 0; 54174 var len = this.o.length / 2; 54175 var diff; 54176 54177 while (i < len) { 54178 diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]); 54179 54180 if (diff > 0.01) { 54181 return false; 54182 } 54183 54184 i += 1; 54185 } 54186 54187 return true; 54188 }; 54189 54190 GradientProperty.prototype.checkCollapsable = function () { 54191 if (this.o.length / 2 !== this.c.length / 4) { 54192 return false; 54193 } 54194 54195 if (this.data.k.k[0].s) { 54196 var i = 0; 54197 var len = this.data.k.k.length; 54198 54199 while (i < len) { 54200 if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) { 54201 return false; 54202 } 54203 54204 i += 1; 54205 } 54206 } else if (!this.comparePoints(this.data.k.k, this.data.p)) { 54207 return false; 54208 } 54209 54210 return true; 54211 }; 54212 54213 GradientProperty.prototype.getValue = function (forceRender) { 54214 this.prop.getValue(); 54215 this._mdf = false; 54216 this._cmdf = false; 54217 this._omdf = false; 54218 54219 if (this.prop._mdf || forceRender) { 54220 var i; 54221 var len = this.data.p * 4; 54222 var mult; 54223 var val; 54224 54225 for (i = 0; i < len; i += 1) { 54226 mult = i % 4 === 0 ? 100 : 255; 54227 val = Math.round(this.prop.v[i] * mult); 54228 54229 if (this.c[i] !== val) { 54230 this.c[i] = val; 54231 this._cmdf = !forceRender; 54232 } 54233 } 54234 54235 if (this.o.length) { 54236 len = this.prop.v.length; 54237 54238 for (i = this.data.p * 4; i < len; i += 1) { 54239 mult = i % 2 === 0 ? 100 : 1; 54240 val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i]; 54241 54242 if (this.o[i - this.data.p * 4] !== val) { 54243 this.o[i - this.data.p * 4] = val; 54244 this._omdf = !forceRender; 54245 } 54246 } 54247 } 54248 54249 this._mdf = !forceRender; 54250 } 54251 }; 54252 54253 extendPrototype([DynamicPropertyContainer], GradientProperty); 54254 54255 function SVGGradientFillStyleData(elem, data, styleOb) { 54256 this.initDynamicPropertyContainer(elem); 54257 this.getValue = this.iterateDynamicProperties; 54258 this.initGradientData(elem, data, styleOb); 54259 } 54260 54261 SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) { 54262 this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); 54263 this.s = PropertyFactory.getProp(elem, data.s, 1, null, this); 54264 this.e = PropertyFactory.getProp(elem, data.e, 1, null, this); 54265 this.h = PropertyFactory.getProp(elem, data.h || { 54266 k: 0 54267 }, 0, 0.01, this); 54268 this.a = PropertyFactory.getProp(elem, data.a || { 54269 k: 0 54270 }, 0, degToRads, this); 54271 this.g = new GradientProperty(elem, data.g, this); 54272 this.style = styleOb; 54273 this.stops = []; 54274 this.setGradientData(styleOb.pElem, data); 54275 this.setGradientOpacity(data, styleOb); 54276 this._isAnimated = !!this._isAnimated; 54277 }; 54278 54279 SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) { 54280 var gradientId = createElementID(); 54281 var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient'); 54282 gfill.setAttribute('id', gradientId); 54283 gfill.setAttribute('spreadMethod', 'pad'); 54284 gfill.setAttribute('gradientUnits', 'userSpaceOnUse'); 54285 var stops = []; 54286 var stop; 54287 var j; 54288 var jLen; 54289 jLen = data.g.p * 4; 54290 54291 for (j = 0; j < jLen; j += 4) { 54292 stop = createNS('stop'); 54293 gfill.appendChild(stop); 54294 stops.push(stop); 54295 } 54296 54297 pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')'); 54298 this.gf = gfill; 54299 this.cst = stops; 54300 }; 54301 54302 SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) { 54303 if (this.g._hasOpacity && !this.g._collapsable) { 54304 var stop; 54305 var j; 54306 var jLen; 54307 var mask = createNS('mask'); 54308 var maskElement = createNS('path'); 54309 mask.appendChild(maskElement);
vendor: 15,234 bytes, lines 54310-54798
54310 var opacityId = createElementID(); 54311 var maskId = createElementID(); 54312 mask.setAttribute('id', maskId); 54313 var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient'); 54314 opFill.setAttribute('id', opacityId); 54315 opFill.setAttribute('spreadMethod', 'pad'); 54316 opFill.setAttribute('gradientUnits', 'userSpaceOnUse'); 54317 jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length; 54318 var stops = this.stops; 54319 54320 for (j = data.g.p * 4; j < jLen; j += 2) { 54321 stop = createNS('stop'); 54322 stop.setAttribute('stop-color', 'rgb(255,255,255)'); 54323 opFill.appendChild(stop); 54324 stops.push(stop); 54325 } 54326 54327 maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')'); 54328 54329 if (data.ty === 'gs') { 54330 maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]); 54331 maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]); 54332 54333 if (data.lj === 1) { 54334 maskElement.setAttribute('stroke-miterlimit', data.ml); 54335 } 54336 } 54337 54338 this.of = opFill; 54339 this.ms = mask; 54340 this.ost = stops; 54341 this.maskId = maskId; 54342 styleOb.msElem = maskElement; 54343 } 54344 }; 54345 54346 extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData); 54347 54348 function SVGGradientStrokeStyleData(elem, data, styleOb) { 54349 this.initDynamicPropertyContainer(elem); 54350 this.getValue = this.iterateDynamicProperties; 54351 this.w = PropertyFactory.getProp(elem, data.w, 0, null, this); 54352 this.d = new DashProperty(elem, data.d || {}, 'svg', this); 54353 this.initGradientData(elem, data, styleOb); 54354 this._isAnimated = !!this._isAnimated; 54355 } 54356 54357 extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData); 54358 54359 function ShapeGroupData() { 54360 this.it = []; 54361 this.prevViewData = []; 54362 this.gr = createNS('g'); 54363 } 54364 54365 function SVGTransformData(mProps, op, container) { 54366 this.transform = { 54367 mProps: mProps, 54368 op: op, 54369 container: container 54370 }; 54371 this.elements = []; 54372 this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length; 54373 } 54374 54375 var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) { 54376 if (length === 0) { 54377 return ''; 54378 } 54379 54380 var _o = pathNodes.o; 54381 var _i = pathNodes.i; 54382 var _v = pathNodes.v; 54383 var i; 54384 var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]); 54385 54386 for (i = 1; i < length; i += 1) { 54387 shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]); 54388 } 54389 54390 if (closed && length) { 54391 shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]); 54392 shapeString += 'z'; 54393 } 54394 54395 return shapeString; 54396 }; 54397 54398 var SVGElementsRenderer = function () { 54399 var _identityMatrix = new Matrix(); 54400 54401 var _matrixHelper = new Matrix(); 54402 54403 var ob = { 54404 createRenderFunction: createRenderFunction 54405 }; 54406 54407 function createRenderFunction(data) { 54408 switch (data.ty) { 54409 case 'fl': 54410 return renderFill; 54411 54412 case 'gf': 54413 return renderGradient; 54414 54415 case 'gs': 54416 return renderGradientStroke; 54417 54418 case 'st': 54419 return renderStroke; 54420 54421 case 'sh': 54422 case 'el': 54423 case 'rc': 54424 case 'sr': 54425 return renderPath; 54426 54427 case 'tr': 54428 return renderContentTransform; 54429 54430 case 'no': 54431 return renderNoop; 54432 54433 default: 54434 return null; 54435 } 54436 } 54437 54438 function renderContentTransform(styleData, itemData, isFirstFrame) { 54439 if (isFirstFrame || itemData.transform.op._mdf) { 54440 itemData.transform.container.setAttribute('opacity', itemData.transform.op.v); 54441 } 54442 54443 if (isFirstFrame || itemData.transform.mProps._mdf) { 54444 itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS()); 54445 } 54446 } 54447 54448 function renderNoop() {} 54449 54450 function renderPath(styleData, itemData, isFirstFrame) { 54451 var j; 54452 var jLen; 54453 var pathStringTransformed; 54454 var redraw; 54455 var pathNodes; 54456 var l; 54457 var lLen = itemData.styles.length; 54458 var lvl = itemData.lvl; 54459 var paths; 54460 var mat; 54461 var iterations; 54462 var k; 54463 54464 for (l = 0; l < lLen; l += 1) { 54465 redraw = itemData.sh._mdf || isFirstFrame; 54466 54467 if (itemData.styles[l].lvl < lvl) { 54468 mat = _matrixHelper.reset(); 54469 iterations = lvl - itemData.styles[l].lvl; 54470 k = itemData.transformers.length - 1; 54471 54472 while (!redraw && iterations > 0) { 54473 redraw = itemData.transformers[k].mProps._mdf || redraw; 54474 iterations -= 1; 54475 k -= 1; 54476 } 54477 54478 if (redraw) { 54479 iterations = lvl - itemData.styles[l].lvl; 54480 k = itemData.transformers.length - 1; 54481 54482 while (iterations > 0) { 54483 mat.multiply(itemData.transformers[k].mProps.v); 54484 iterations -= 1; 54485 k -= 1; 54486 } 54487 } 54488 } else { 54489 mat = _identityMatrix; 54490 } 54491 54492 paths = itemData.sh.paths; 54493 jLen = paths._length; 54494 54495 if (redraw) { 54496 pathStringTransformed = ''; 54497 54498 for (j = 0; j < jLen; j += 1) { 54499 pathNodes = paths.shapes[j]; 54500 54501 if (pathNodes && pathNodes._length) { 54502 pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat); 54503 } 54504 } 54505 54506 itemData.caches[l] = pathStringTransformed; 54507 } else { 54508 pathStringTransformed = itemData.caches[l]; 54509 } 54510 54511 itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed; 54512 itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf; 54513 } 54514 } 54515 54516 function renderFill(styleData, itemData, isFirstFrame) { 54517 var styleElem = itemData.style; 54518 54519 if (itemData.c._mdf || isFirstFrame) { 54520 styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'); 54521 } 54522 54523 if (itemData.o._mdf || isFirstFrame) { 54524 styleElem.pElem.setAttribute('fill-opacity', itemData.o.v); 54525 } 54526 } 54527 54528 function renderGradientStroke(styleData, itemData, isFirstFrame) { 54529 renderGradient(styleData, itemData, isFirstFrame); 54530 renderStroke(styleData, itemData, isFirstFrame); 54531 } 54532 54533 function renderGradient(styleData, itemData, isFirstFrame) { 54534 var gfill = itemData.gf; 54535 var hasOpacity = itemData.g._hasOpacity; 54536 var pt1 = itemData.s.v; 54537 var pt2 = itemData.e.v; 54538 54539 if (itemData.o._mdf || isFirstFrame) { 54540 var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity'; 54541 itemData.style.pElem.setAttribute(attr, itemData.o.v); 54542 } 54543 54544 if (itemData.s._mdf || isFirstFrame) { 54545 var attr1 = styleData.t === 1 ? 'x1' : 'cx'; 54546 var attr2 = attr1 === 'x1' ? 'y1' : 'cy'; 54547 gfill.setAttribute(attr1, pt1[0]); 54548 gfill.setAttribute(attr2, pt1[1]); 54549 54550 if (hasOpacity && !itemData.g._collapsable) { 54551 itemData.of.setAttribute(attr1, pt1[0]); 54552 itemData.of.setAttribute(attr2, pt1[1]); 54553 } 54554 } 54555 54556 var stops; 54557 var i; 54558 var len; 54559 var stop; 54560 54561 if (itemData.g._cmdf || isFirstFrame) { 54562 stops = itemData.cst; 54563 var cValues = itemData.g.c; 54564 len = stops.length; 54565 54566 for (i = 0; i < len; i += 1) { 54567 stop = stops[i]; 54568 stop.setAttribute('offset', cValues[i * 4] + '%'); 54569 stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')'); 54570 } 54571 } 54572 54573 if (hasOpacity && (itemData.g._omdf || isFirstFrame)) { 54574 var oValues = itemData.g.o; 54575 54576 if (itemData.g._collapsable) { 54577 stops = itemData.cst; 54578 } else { 54579 stops = itemData.ost; 54580 } 54581 54582 len = stops.length; 54583 54584 for (i = 0; i < len; i += 1) { 54585 stop = stops[i]; 54586 54587 if (!itemData.g._collapsable) { 54588 stop.setAttribute('offset', oValues[i * 2] + '%'); 54589 } 54590 54591 stop.setAttribute('stop-opacity', oValues[i * 2 + 1]); 54592 } 54593 } 54594 54595 if (styleData.t === 1) { 54596 if (itemData.e._mdf || isFirstFrame) { 54597 gfill.setAttribute('x2', pt2[0]); 54598 gfill.setAttribute('y2', pt2[1]); 54599 54600 if (hasOpacity && !itemData.g._collapsable) { 54601 itemData.of.setAttribute('x2', pt2[0]); 54602 itemData.of.setAttribute('y2', pt2[1]); 54603 } 54604 } 54605 } else { 54606 var rad; 54607 54608 if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) { 54609 rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); 54610 gfill.setAttribute('r', rad); 54611 54612 if (hasOpacity && !itemData.g._collapsable) { 54613 itemData.of.setAttribute('r', rad); 54614 } 54615 } 54616 54617 if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) { 54618 if (!rad) { 54619 rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); 54620 } 54621 54622 var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]); 54623 var percent = itemData.h.v; 54624 54625 if (percent >= 1) { 54626 percent = 0.99; 54627 } else if (percent <= -1) { 54628 percent = -0.99; 54629 } 54630 54631 var dist = rad * percent; 54632 var x = Math.cos(ang + itemData.a.v) * dist + pt1[0]; 54633 var y = Math.sin(ang + itemData.a.v) * dist + pt1[1]; 54634 gfill.setAttribute('fx', x); 54635 gfill.setAttribute('fy', y); 54636 54637 if (hasOpacity && !itemData.g._collapsable) { 54638 itemData.of.setAttribute('fx', x); 54639 itemData.of.setAttribute('fy', y); 54640 } 54641 } // gfill.setAttribute('fy','200'); 54642 54643 } 54644 } 54645 54646 function renderStroke(styleData, itemData, isFirstFrame) { 54647 var styleElem = itemData.style; 54648 var d = itemData.d; 54649 54650 if (d && (d._mdf || isFirstFrame) && d.dashStr) { 54651 styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr); 54652 styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]); 54653 } 54654 54655 if (itemData.c && (itemData.c._mdf || isFirstFrame)) { 54656 styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'); 54657 } 54658 54659 if (itemData.o._mdf || isFirstFrame) { 54660 styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v); 54661 } 54662 54663 if (itemData.w._mdf || isFirstFrame) { 54664 styleElem.pElem.setAttribute('stroke-width', itemData.w.v); 54665 54666 if (styleElem.msElem) { 54667 styleElem.msElem.setAttribute('stroke-width', itemData.w.v); 54668 } 54669 } 54670 } 54671 54672 return ob; 54673 }(); 54674 54675 function SVGShapeElement(data, globalData, comp) { 54676 // List of drawable elements 54677 this.shapes = []; // Full shape data 54678 54679 this.shapesData = data.shapes; // List of styles that will be applied to shapes 54680 54681 this.stylesList = []; // List of modifiers that will be applied to shapes 54682 54683 this.shapeModifiers = []; // List of items in shape tree 54684 54685 this.itemsData = []; // List of items in previous shape tree 54686 54687 this.processedElements = []; // List of animated components 54688 54689 this.animatedContents = []; 54690 this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties. 54691 // List of elements that have been created 54692 54693 this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties. 54694 } 54695 54696 extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement); 54697 54698 SVGShapeElement.prototype.initSecondaryElement = function () {}; 54699 54700 SVGShapeElement.prototype.identityMatrix = new Matrix(); 54701 54702 SVGShapeElement.prototype.buildExpressionInterface = function () {}; 54703 54704 SVGShapeElement.prototype.createContent = function () { 54705 this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true); 54706 this.filterUniqueShapes(); 54707 }; 54708 /* 54709 This method searches for multiple shapes that affect a single element and one of them is animated 54710 */ 54711 54712 54713 SVGShapeElement.prototype.filterUniqueShapes = function () { 54714 var i; 54715 var len = this.shapes.length; 54716 var shape; 54717 var j; 54718 var jLen = this.stylesList.length; 54719 var style; 54720 var tempShapes = []; 54721 var areAnimated = false; 54722 54723 for (j = 0; j < jLen; j += 1) { 54724 style = this.stylesList[j]; 54725 areAnimated = false; 54726 tempShapes.length = 0; 54727 54728 for (i = 0; i < len; i += 1) { 54729 shape = this.shapes[i]; 54730 54731 if (shape.styles.indexOf(style) !== -1) { 54732 tempShapes.push(shape); 54733 areAnimated = shape._isAnimated || areAnimated; 54734 } 54735 } 54736 54737 if (tempShapes.length > 1 && areAnimated) { 54738 this.setShapesAsAnimated(tempShapes); 54739 } 54740 } 54741 }; 54742 54743 SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) { 54744 var i; 54745 var len = shapes.length; 54746 54747 for (i = 0; i < len; i += 1) { 54748 shapes[i].setAsAnimated(); 54749 } 54750 }; 54751 54752 SVGShapeElement.prototype.createStyleElement = function (data, level) { 54753 // TODO: prevent drawing of hidden styles 54754 var elementData; 54755 var styleOb = new SVGStyleData(data, level); 54756 var pathElement = styleOb.pElem; 54757 54758 if (data.ty === 'st') { 54759 elementData = new SVGStrokeStyleData(this, data, styleOb); 54760 } else if (data.ty === 'fl') { 54761 elementData = new SVGFillStyleData(this, data, styleOb); 54762 } else if (data.ty === 'gf' || data.ty === 'gs') { 54763 var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData; 54764 elementData = new GradientConstructor(this, data, styleOb); 54765 this.globalData.defs.appendChild(elementData.gf); 54766 54767 if (elementData.maskId) { 54768 this.globalData.defs.appendChild(elementData.ms); 54769 this.globalData.defs.appendChild(elementData.of); 54770 pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')'); 54771 } 54772 } else if (data.ty === 'no') { 54773 elementData = new SVGNoStyleData(this, data, styleOb); 54774 } 54775 54776 if (data.ty === 'st' || data.ty === 'gs') { 54777 pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]); 54778 pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]); 54779 pathElement.setAttribute('fill-opacity', '0'); 54780 54781 if (data.lj === 1) { 54782 pathElement.setAttribute('stroke-miterlimit', data.ml); 54783 } 54784 } 54785 54786 if (data.r === 2) { 54787 pathElement.setAttribute('fill-rule', 'evenodd'); 54788 } 54789 54790 if (data.ln) { 54791 pathElement.setAttribute('id', data.ln); 54792 } 54793 54794 if (data.cl) { 54795 pathElement.setAttribute('class', data.cl); 54796 } 54797 54798 if (data.bm) {
vendor: 5,422 bytes, lines 54799-54976
54799 pathElement.style['mix-blend-mode'] = getBlendMode(data.bm); 54800 } 54801 54802 this.stylesList.push(styleOb); 54803 this.addToAnimatedContents(data, elementData); 54804 return elementData; 54805 }; 54806 54807 SVGShapeElement.prototype.createGroupElement = function (data) { 54808 var elementData = new ShapeGroupData(); 54809 54810 if (data.ln) { 54811 elementData.gr.setAttribute('id', data.ln); 54812 } 54813 54814 if (data.cl) { 54815 elementData.gr.setAttribute('class', data.cl); 54816 } 54817 54818 if (data.bm) { 54819 elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm); 54820 } 54821 54822 return elementData; 54823 }; 54824 54825 SVGShapeElement.prototype.createTransformElement = function (data, container) { 54826 var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this); 54827 var elementData = new SVGTransformData(transformProperty, transformProperty.o, container); 54828 this.addToAnimatedContents(data, elementData); 54829 return elementData; 54830 }; 54831 54832 SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) { 54833 var ty = 4; 54834 54835 if (data.ty === 'rc') { 54836 ty = 5; 54837 } else if (data.ty === 'el') { 54838 ty = 6; 54839 } else if (data.ty === 'sr') { 54840 ty = 7; 54841 } 54842 54843 var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this); 54844 var elementData = new SVGShapeData(ownTransformers, level, shapeProperty); 54845 this.shapes.push(elementData); 54846 this.addShapeToModifiers(elementData); 54847 this.addToAnimatedContents(data, elementData); 54848 return elementData; 54849 }; 54850 54851 SVGShapeElement.prototype.addToAnimatedContents = function (data, element) { 54852 var i = 0; 54853 var len = this.animatedContents.length; 54854 54855 while (i < len) { 54856 if (this.animatedContents[i].element === element) { 54857 return; 54858 } 54859 54860 i += 1; 54861 } 54862 54863 this.animatedContents.push({ 54864 fn: SVGElementsRenderer.createRenderFunction(data), 54865 element: element, 54866 data: data 54867 }); 54868 }; 54869 54870 SVGShapeElement.prototype.setElementStyles = function (elementData) { 54871 var arr = elementData.styles; 54872 var j; 54873 var jLen = this.stylesList.length; 54874 54875 for (j = 0; j < jLen; j += 1) { 54876 if (!this.stylesList[j].closed) { 54877 arr.push(this.stylesList[j]); 54878 } 54879 } 54880 }; 54881 54882 SVGShapeElement.prototype.reloadShapes = function () { 54883 this._isFirstFrame = true; 54884 var i; 54885 var len = this.itemsData.length; 54886 54887 for (i = 0; i < len; i += 1) { 54888 this.prevViewData[i] = this.itemsData[i]; 54889 } 54890 54891 this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true); 54892 this.filterUniqueShapes(); 54893 len = this.dynamicProperties.length; 54894 54895 for (i = 0; i < len; i += 1) { 54896 this.dynamicProperties[i].getValue(); 54897 } 54898 54899 this.renderModifiers(); 54900 }; 54901 54902 SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) { 54903 var ownTransformers = [].concat(transformers); 54904 var i; 54905 var len = arr.length - 1; 54906 var j; 54907 var jLen; 54908 var ownStyles = []; 54909 var ownModifiers = []; 54910 var currentTransform; 54911 var modifier; 54912 var processedPos; 54913 54914 for (i = len; i >= 0; i -= 1) { 54915 processedPos = this.searchProcessedElement(arr[i]); 54916 54917 if (!processedPos) { 54918 arr[i]._render = render; 54919 } else { 54920 itemsData[i] = prevViewData[processedPos - 1]; 54921 } 54922 54923 if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') { 54924 if (!processedPos) { 54925 itemsData[i] = this.createStyleElement(arr[i], level); 54926 } else { 54927 itemsData[i].style.closed = false; 54928 } 54929 54930 if (arr[i]._render) { 54931 if (itemsData[i].style.pElem.parentNode !== container) { 54932 container.appendChild(itemsData[i].style.pElem); 54933 } 54934 } 54935 54936 ownStyles.push(itemsData[i].style); 54937 } else if (arr[i].ty === 'gr') { 54938 if (!processedPos) { 54939 itemsData[i] = this.createGroupElement(arr[i]); 54940 } else { 54941 jLen = itemsData[i].it.length; 54942 54943 for (j = 0; j < jLen; j += 1) { 54944 itemsData[i].prevViewData[j] = itemsData[i].it[j]; 54945 } 54946 } 54947 54948 this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render); 54949 54950 if (arr[i]._render) { 54951 if (itemsData[i].gr.parentNode !== container) { 54952 container.appendChild(itemsData[i].gr); 54953 } 54954 } 54955 } else if (arr[i].ty === 'tr') { 54956 if (!processedPos) { 54957 itemsData[i] = this.createTransformElement(arr[i], container); 54958 } 54959 54960 currentTransform = itemsData[i].transform; 54961 ownTransformers.push(currentTransform); 54962 } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') { 54963 if (!processedPos) { 54964 itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level); 54965 } 54966 54967 this.setElementStyles(itemsData[i]); 54968 } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') { 54969 if (!processedPos) { 54970 modifier = ShapeModifiers.getModifier(arr[i].ty); 54971 modifier.init(this, arr[i]); 54972 itemsData[i] = modifier; 54973 this.shapeModifiers.push(modifier); 54974 } else { 54975 modifier = itemsData[i]; 54976 modifier.closed = false;
vendor: 70,903 bytes, lines 54977-57227
54977 } 54978 54979 ownModifiers.push(modifier); 54980 } else if (arr[i].ty === 'rp') { 54981 if (!processedPos) { 54982 modifier = ShapeModifiers.getModifier(arr[i].ty); 54983 itemsData[i] = modifier; 54984 modifier.init(this, arr, i, itemsData); 54985 this.shapeModifiers.push(modifier); 54986 render = false; 54987 } else { 54988 modifier = itemsData[i]; 54989 modifier.closed = true; 54990 } 54991 54992 ownModifiers.push(modifier); 54993 } 54994 54995 this.addProcessedElement(arr[i], i + 1); 54996 } 54997 54998 len = ownStyles.length; 54999 55000 for (i = 0; i < len; i += 1) { 55001 ownStyles[i].closed = true; 55002 } 55003 55004 len = ownModifiers.length; 55005 55006 for (i = 0; i < len; i += 1) { 55007 ownModifiers[i].closed = true; 55008 } 55009 }; 55010 55011 SVGShapeElement.prototype.renderInnerContent = function () { 55012 this.renderModifiers(); 55013 var i; 55014 var len = this.stylesList.length; 55015 55016 for (i = 0; i < len; i += 1) { 55017 this.stylesList[i].reset(); 55018 } 55019 55020 this.renderShape(); 55021 55022 for (i = 0; i < len; i += 1) { 55023 if (this.stylesList[i]._mdf || this._isFirstFrame) { 55024 if (this.stylesList[i].msElem) { 55025 this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers 55026 55027 this.stylesList[i].d = 'M0 0' + this.stylesList[i].d; 55028 } 55029 55030 this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0'); 55031 } 55032 } 55033 }; 55034 55035 SVGShapeElement.prototype.renderShape = function () { 55036 var i; 55037 var len = this.animatedContents.length; 55038 var animatedContent; 55039 55040 for (i = 0; i < len; i += 1) { 55041 animatedContent = this.animatedContents[i]; 55042 55043 if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) { 55044 animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame); 55045 } 55046 } 55047 }; 55048 55049 SVGShapeElement.prototype.destroy = function () { 55050 this.destroyBaseElement(); 55051 this.shapesData = null; 55052 this.itemsData = null; 55053 }; 55054 55055 function LetterProps(o, sw, sc, fc, m, p) { 55056 this.o = o; 55057 this.sw = sw; 55058 this.sc = sc; 55059 this.fc = fc; 55060 this.m = m; 55061 this.p = p; 55062 this._mdf = { 55063 o: true, 55064 sw: !!sw, 55065 sc: !!sc, 55066 fc: !!fc, 55067 m: true, 55068 p: true 55069 }; 55070 } 55071 55072 LetterProps.prototype.update = function (o, sw, sc, fc, m, p) { 55073 this._mdf.o = false; 55074 this._mdf.sw = false; 55075 this._mdf.sc = false; 55076 this._mdf.fc = false; 55077 this._mdf.m = false; 55078 this._mdf.p = false; 55079 var updated = false; 55080 55081 if (this.o !== o) { 55082 this.o = o; 55083 this._mdf.o = true; 55084 updated = true; 55085 } 55086 55087 if (this.sw !== sw) { 55088 this.sw = sw; 55089 this._mdf.sw = true; 55090 updated = true; 55091 } 55092 55093 if (this.sc !== sc) { 55094 this.sc = sc; 55095 this._mdf.sc = true; 55096 updated = true; 55097 } 55098 55099 if (this.fc !== fc) { 55100 this.fc = fc; 55101 this._mdf.fc = true; 55102 updated = true; 55103 } 55104 55105 if (this.m !== m) { 55106 this.m = m; 55107 this._mdf.m = true; 55108 updated = true; 55109 } 55110 55111 if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) { 55112 this.p = p; 55113 this._mdf.p = true; 55114 updated = true; 55115 } 55116 55117 return updated; 55118 }; 55119 55120 function TextProperty(elem, data) { 55121 this._frameId = initialDefaultFrame; 55122 this.pv = ''; 55123 this.v = ''; 55124 this.kf = false; 55125 this._isFirstFrame = true; 55126 this._mdf = false; 55127 55128 if (data.d && data.d.sid) { 55129 data.d = elem.globalData.slotManager.getProp(data.d); 55130 } 55131 55132 this.data = data; 55133 this.elem = elem; 55134 this.comp = this.elem.comp; 55135 this.keysIndex = 0; 55136 this.canResize = false; 55137 this.minimumFontSize = 1; 55138 this.effectsSequence = []; 55139 this.currentData = { 55140 ascent: 0, 55141 boxWidth: this.defaultBoxWidth, 55142 f: '', 55143 fStyle: '', 55144 fWeight: '', 55145 fc: '', 55146 j: '', 55147 justifyOffset: '', 55148 l: [], 55149 lh: 0, 55150 lineWidths: [], 55151 ls: '', 55152 of: '', 55153 s: '', 55154 sc: '', 55155 sw: 0, 55156 t: 0, 55157 tr: 0, 55158 sz: 0, 55159 ps: null, 55160 fillColorAnim: false, 55161 strokeColorAnim: false, 55162 strokeWidthAnim: false, 55163 yOffset: 0, 55164 finalSize: 0, 55165 finalText: [], 55166 finalLineHeight: 0, 55167 __complete: false 55168 }; 55169 this.copyData(this.currentData, this.data.d.k[0].s); 55170 55171 if (!this.searchProperty()) { 55172 this.completeTextData(this.currentData); 55173 } 55174 } 55175 55176 TextProperty.prototype.defaultBoxWidth = [0, 0]; 55177 55178 TextProperty.prototype.copyData = function (obj, data) { 55179 for (var s in data) { 55180 if (Object.prototype.hasOwnProperty.call(data, s)) { 55181 obj[s] = data[s]; 55182 } 55183 } 55184 55185 return obj; 55186 }; 55187 55188 TextProperty.prototype.setCurrentData = function (data) { 55189 if (!data.__complete) { 55190 this.completeTextData(data); 55191 } 55192 55193 this.currentData = data; 55194 this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth; 55195 this._mdf = true; 55196 }; 55197 55198 TextProperty.prototype.searchProperty = function () { 55199 return this.searchKeyframes(); 55200 }; 55201 55202 TextProperty.prototype.searchKeyframes = function () { 55203 this.kf = this.data.d.k.length > 1; 55204 55205 if (this.kf) { 55206 this.addEffect(this.getKeyframeValue.bind(this)); 55207 } 55208 55209 return this.kf; 55210 }; 55211 55212 TextProperty.prototype.addEffect = function (effectFunction) { 55213 this.effectsSequence.push(effectFunction); 55214 this.elem.addDynamicProperty(this); 55215 }; 55216 55217 TextProperty.prototype.getValue = function (_finalValue) { 55218 if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) { 55219 return; 55220 } 55221 55222 this.currentData.t = this.data.d.k[this.keysIndex].s.t; 55223 var currentValue = this.currentData; 55224 var currentIndex = this.keysIndex; 55225 55226 if (this.lock) { 55227 this.setCurrentData(this.currentData); 55228 return; 55229 } 55230 55231 this.lock = true; 55232 this._mdf = false; 55233 var i; 55234 var len = this.effectsSequence.length; 55235 var finalValue = _finalValue || this.data.d.k[this.keysIndex].s; 55236 55237 for (i = 0; i < len; i += 1) { 55238 // Checking if index changed to prevent creating a new object every time the expression updates. 55239 if (currentIndex !== this.keysIndex) { 55240 finalValue = this.effectsSequence[i](finalValue, finalValue.t); 55241 } else { 55242 finalValue = this.effectsSequence[i](this.currentData, finalValue.t); 55243 } 55244 } 55245 55246 if (currentValue !== finalValue) { 55247 this.setCurrentData(finalValue); 55248 } 55249 55250 this.v = this.currentData; 55251 this.pv = this.v; 55252 this.lock = false; 55253 this.frameId = this.elem.globalData.frameId; 55254 }; 55255 55256 TextProperty.prototype.getKeyframeValue = function () { 55257 var textKeys = this.data.d.k; 55258 var frameNum = this.elem.comp.renderedFrame; 55259 var i = 0; 55260 var len = textKeys.length; 55261 55262 while (i <= len - 1) { 55263 if (i === len - 1 || textKeys[i + 1].t > frameNum) { 55264 break; 55265 } 55266 55267 i += 1; 55268 } 55269 55270 if (this.keysIndex !== i) { 55271 this.keysIndex = i; 55272 } 55273 55274 return this.data.d.k[this.keysIndex].s; 55275 }; 55276 55277 TextProperty.prototype.buildFinalText = function (text) { 55278 var charactersArray = []; 55279 var i = 0; 55280 var len = text.length; 55281 var charCode; 55282 var secondCharCode; 55283 var shouldCombine = false; 55284 var shouldCombineNext = false; 55285 var currentChars = ''; 55286 55287 while (i < len) { 55288 shouldCombine = shouldCombineNext; 55289 shouldCombineNext = false; 55290 charCode = text.charCodeAt(i); 55291 currentChars = text.charAt(i); 55292 55293 if (FontManager.isCombinedCharacter(charCode)) { 55294 shouldCombine = true; // It's a potential surrogate pair (this is the High surrogate) 55295 } else if (charCode >= 0xD800 && charCode <= 0xDBFF) { 55296 if (FontManager.isRegionalFlag(text, i)) { 55297 currentChars = text.substr(i, 14); 55298 } else { 55299 secondCharCode = text.charCodeAt(i + 1); // It's a surrogate pair (this is the Low surrogate) 55300 55301 if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) { 55302 if (FontManager.isModifier(charCode, secondCharCode)) { 55303 currentChars = text.substr(i, 2); 55304 shouldCombine = true; 55305 } else if (FontManager.isFlagEmoji(text.substr(i, 4))) { 55306 currentChars = text.substr(i, 4); 55307 } else { 55308 currentChars = text.substr(i, 2); 55309 } 55310 } 55311 } 55312 } else if (charCode > 0xDBFF) { 55313 secondCharCode = text.charCodeAt(i + 1); 55314 55315 if (FontManager.isVariationSelector(charCode)) { 55316 shouldCombine = true; 55317 } 55318 } else if (FontManager.isZeroWidthJoiner(charCode)) { 55319 shouldCombine = true; 55320 shouldCombineNext = true; 55321 } 55322 55323 if (shouldCombine) { 55324 charactersArray[charactersArray.length - 1] += currentChars; 55325 shouldCombine = false; 55326 } else { 55327 charactersArray.push(currentChars); 55328 } 55329 55330 i += currentChars.length; 55331 } 55332 55333 return charactersArray; 55334 }; 55335 55336 TextProperty.prototype.completeTextData = function (documentData) { 55337 documentData.__complete = true; 55338 var fontManager = this.elem.globalData.fontManager; 55339 var data = this.data; 55340 var letters = []; 55341 var i; 55342 var len; 55343 var newLineFlag; 55344 var index = 0; 55345 var val; 55346 var anchorGrouping = data.m.g; 55347 var currentSize = 0; 55348 var currentPos = 0; 55349 var currentLine = 0; 55350 var lineWidths = []; 55351 var lineWidth = 0; 55352 var maxLineWidth = 0; 55353 var j; 55354 var jLen; 55355 var fontData = fontManager.getFontByName(documentData.f); 55356 var charData; 55357 var cLength = 0; 55358 var fontProps = getFontProperties(fontData); 55359 documentData.fWeight = fontProps.weight; 55360 documentData.fStyle = fontProps.style; 55361 documentData.finalSize = documentData.s; 55362 documentData.finalText = this.buildFinalText(documentData.t); 55363 len = documentData.finalText.length; 55364 documentData.finalLineHeight = documentData.lh; 55365 var trackingOffset = documentData.tr / 1000 * documentData.finalSize; 55366 var charCode; 55367 55368 if (documentData.sz) { 55369 var flag = true; 55370 var boxWidth = documentData.sz[0]; 55371 var boxHeight = documentData.sz[1]; 55372 var currentHeight; 55373 var finalText; 55374 55375 while (flag) { 55376 finalText = this.buildFinalText(documentData.t); 55377 currentHeight = 0; 55378 lineWidth = 0; 55379 len = finalText.length; 55380 trackingOffset = documentData.tr / 1000 * documentData.finalSize; 55381 var lastSpaceIndex = -1; 55382 55383 for (i = 0; i < len; i += 1) { 55384 charCode = finalText[i].charCodeAt(0); 55385 newLineFlag = false; 55386 55387 if (finalText[i] === ' ') { 55388 lastSpaceIndex = i; 55389 } else if (charCode === 13 || charCode === 3) { 55390 lineWidth = 0; 55391 newLineFlag = true; 55392 currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2; 55393 } 55394 55395 if (fontManager.chars) { 55396 charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily); 55397 cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100; 55398 } else { 55399 // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily; 55400 cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize); 55401 } 55402 55403 if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') { 55404 if (lastSpaceIndex === -1) { 55405 len += 1; 55406 } else { 55407 i = lastSpaceIndex; 55408 } 55409 55410 currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2; 55411 finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i); 55412 55413 lastSpaceIndex = -1; 55414 lineWidth = 0; 55415 } else { 55416 lineWidth += cLength; 55417 lineWidth += trackingOffset; 55418 } 55419 } 55420 55421 currentHeight += fontData.ascent * documentData.finalSize / 100; 55422 55423 if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) { 55424 documentData.finalSize -= 1; 55425 documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s; 55426 } else { 55427 documentData.finalText = finalText; 55428 len = documentData.finalText.length; 55429 flag = false; 55430 } 55431 } 55432 } 55433 55434 lineWidth = -trackingOffset; 55435 cLength = 0; 55436 var uncollapsedSpaces = 0; 55437 var currentChar; 55438 55439 for (i = 0; i < len; i += 1) { 55440 newLineFlag = false; 55441 currentChar = documentData.finalText[i]; 55442 charCode = currentChar.charCodeAt(0); 55443 55444 if (charCode === 13 || charCode === 3) { 55445 uncollapsedSpaces = 0; 55446 lineWidths.push(lineWidth); 55447 maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth; 55448 lineWidth = -2 * trackingOffset; 55449 val = ''; 55450 newLineFlag = true; 55451 currentLine += 1; 55452 } else { 55453 val = currentChar; 55454 } 55455 55456 if (fontManager.chars) { 55457 charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily); 55458 cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100; 55459 } else { 55460 // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize); 55461 // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily; 55462 cLength = fontManager.measureText(val, documentData.f, documentData.finalSize); 55463 } // 55464 55465 55466 if (currentChar === ' ') { 55467 uncollapsedSpaces += cLength + trackingOffset; 55468 } else { 55469 lineWidth += cLength + trackingOffset + uncollapsedSpaces; 55470 uncollapsedSpaces = 0; 55471 } 55472 55473 letters.push({ 55474 l: cLength, 55475 an: cLength, 55476 add: currentSize, 55477 n: newLineFlag, 55478 anIndexes: [], 55479 val: val, 55480 line: currentLine, 55481 animatorJustifyOffset: 0 55482 }); 55483 55484 if (anchorGrouping == 2) { 55485 // eslint-disable-line eqeqeq 55486 currentSize += cLength; 55487 55488 if (val === '' || val === ' ' || i === len - 1) { 55489 if (val === '' || val === ' ') { 55490 currentSize -= cLength; 55491 } 55492 55493 while (currentPos <= i) { 55494 letters[currentPos].an = currentSize; 55495 letters[currentPos].ind = index; 55496 letters[currentPos].extra = cLength; 55497 currentPos += 1; 55498 } 55499 55500 index += 1; 55501 currentSize = 0; 55502 } 55503 } else if (anchorGrouping == 3) { 55504 // eslint-disable-line eqeqeq 55505 currentSize += cLength; 55506 55507 if (val === '' || i === len - 1) { 55508 if (val === '') { 55509 currentSize -= cLength; 55510 } 55511 55512 while (currentPos <= i) { 55513 letters[currentPos].an = currentSize; 55514 letters[currentPos].ind = index; 55515 letters[currentPos].extra = cLength; 55516 currentPos += 1; 55517 } 55518 55519 currentSize = 0; 55520 index += 1; 55521 } 55522 } else { 55523 letters[index].ind = index; 55524 letters[index].extra = 0; 55525 index += 1; 55526 } 55527 } 55528 55529 documentData.l = letters; 55530 maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth; 55531 lineWidths.push(lineWidth); 55532 55533 if (documentData.sz) { 55534 documentData.boxWidth = documentData.sz[0]; 55535 documentData.justifyOffset = 0; 55536 } else { 55537 documentData.boxWidth = maxLineWidth; 55538 55539 switch (documentData.j) { 55540 case 1: 55541 documentData.justifyOffset = -documentData.boxWidth; 55542 break; 55543 55544 case 2: 55545 documentData.justifyOffset = -documentData.boxWidth / 2; 55546 break; 55547 55548 default: 55549 documentData.justifyOffset = 0; 55550 } 55551 } 55552 55553 documentData.lineWidths = lineWidths; 55554 var animators = data.a; 55555 var animatorData; 55556 var letterData; 55557 jLen = animators.length; 55558 var based; 55559 var ind; 55560 var indexes = []; 55561 55562 for (j = 0; j < jLen; j += 1) { 55563 animatorData = animators[j]; 55564 55565 if (animatorData.a.sc) { 55566 documentData.strokeColorAnim = true; 55567 } 55568 55569 if (animatorData.a.sw) { 55570 documentData.strokeWidthAnim = true; 55571 } 55572 55573 if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) { 55574 documentData.fillColorAnim = true; 55575 } 55576 55577 ind = 0; 55578 based = animatorData.s.b; 55579 55580 for (i = 0; i < len; i += 1) { 55581 letterData = letters[i]; 55582 letterData.anIndexes[j] = ind; 55583 55584 if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) { 55585 // eslint-disable-line eqeqeq 55586 if (animatorData.s.rn === 1) { 55587 indexes.push(ind); 55588 } 55589 55590 ind += 1; 55591 } 55592 } 55593 55594 data.a[j].s.totalChars = ind; 55595 var currentInd = -1; 55596 var newInd; 55597 55598 if (animatorData.s.rn === 1) { 55599 for (i = 0; i < len; i += 1) { 55600 letterData = letters[i]; 55601 55602 if (currentInd != letterData.anIndexes[j]) { 55603 // eslint-disable-line eqeqeq 55604 currentInd = letterData.anIndexes[j]; 55605 newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0]; 55606 } 55607 55608 letterData.anIndexes[j] = newInd; 55609 } 55610 } 55611 } 55612 55613 documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2; 55614 documentData.ls = documentData.ls || 0; 55615 documentData.ascent = fontData.ascent * documentData.finalSize / 100; 55616 }; 55617 55618 TextProperty.prototype.updateDocumentData = function (newData, index) { 55619 index = index === undefined ? this.keysIndex : index; 55620 var dData = this.copyData({}, this.data.d.k[index].s); 55621 dData = this.copyData(dData, newData); 55622 this.data.d.k[index].s = dData; 55623 this.recalculate(index); 55624 this.setCurrentData(dData); 55625 this.elem.addDynamicProperty(this); 55626 }; 55627 55628 TextProperty.prototype.recalculate = function (index) { 55629 var dData = this.data.d.k[index].s; 55630 dData.__complete = false; 55631 this.keysIndex = 0; 55632 this._isFirstFrame = true; 55633 this.getValue(dData); 55634 }; 55635 55636 TextProperty.prototype.canResizeFont = function (_canResize) { 55637 this.canResize = _canResize; 55638 this.recalculate(this.keysIndex); 55639 this.elem.addDynamicProperty(this); 55640 }; 55641 55642 TextProperty.prototype.setMinimumFontSize = function (_fontValue) { 55643 this.minimumFontSize = Math.floor(_fontValue) || 1; 55644 this.recalculate(this.keysIndex); 55645 this.elem.addDynamicProperty(this); 55646 }; 55647 55648 var TextSelectorProp = function () { 55649 var max = Math.max; 55650 var min = Math.min; 55651 var floor = Math.floor; 55652 55653 function TextSelectorPropFactory(elem, data) { 55654 this._currentTextLength = -1; 55655 this.k = false; 55656 this.data = data; 55657 this.elem = elem; 55658 this.comp = elem.comp; 55659 this.finalS = 0; 55660 this.finalE = 0; 55661 this.initDynamicPropertyContainer(elem); 55662 this.s = PropertyFactory.getProp(elem, data.s || { 55663 k: 0 55664 }, 0, 0, this); 55665 55666 if ('e' in data) { 55667 this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this); 55668 } else { 55669 this.e = { 55670 v: 100 55671 }; 55672 } 55673 55674 this.o = PropertyFactory.getProp(elem, data.o || { 55675 k: 0 55676 }, 0, 0, this); 55677 this.xe = PropertyFactory.getProp(elem, data.xe || { 55678 k: 0 55679 }, 0, 0, this); 55680 this.ne = PropertyFactory.getProp(elem, data.ne || { 55681 k: 0 55682 }, 0, 0, this); 55683 this.sm = PropertyFactory.getProp(elem, data.sm || { 55684 k: 100 55685 }, 0, 0, this); 55686 this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this); 55687 55688 if (!this.dynamicProperties.length) { 55689 this.getValue(); 55690 } 55691 } 55692 55693 TextSelectorPropFactory.prototype = { 55694 getMult: function getMult(ind) { 55695 if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) { 55696 this.getValue(); 55697 } 55698 55699 var x1 = 0; 55700 var y1 = 0; 55701 var x2 = 1; 55702 var y2 = 1; 55703 55704 if (this.ne.v > 0) { 55705 x1 = this.ne.v / 100.0; 55706 } else { 55707 y1 = -this.ne.v / 100.0; 55708 } 55709 55710 if (this.xe.v > 0) { 55711 x2 = 1.0 - this.xe.v / 100.0; 55712 } else { 55713 y2 = 1.0 + this.xe.v / 100.0; 55714 } 55715 55716 var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get; 55717 var mult = 0; 55718 var s = this.finalS; 55719 var e = this.finalE; 55720 var type = this.data.sh; 55721 55722 if (type === 2) { 55723 if (e === s) { 55724 mult = ind >= e ? 1 : 0; 55725 } else { 55726 mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); 55727 } 55728 55729 mult = easer(mult); 55730 } else if (type === 3) { 55731 if (e === s) { 55732 mult = ind >= e ? 0 : 1; 55733 } else { 55734 mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); 55735 } 55736 55737 mult = easer(mult); 55738 } else if (type === 4) { 55739 if (e === s) { 55740 mult = 0; 55741 } else { 55742 mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); 55743 55744 if (mult < 0.5) { 55745 mult *= 2; 55746 } else { 55747 mult = 1 - 2 * (mult - 0.5); 55748 } 55749 } 55750 55751 mult = easer(mult); 55752 } else if (type === 5) { 55753 if (e === s) { 55754 mult = 0; 55755 } else { 55756 var tot = e - s; 55757 /* ind += 0.5; 55758 mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */ 55759 55760 ind = min(max(0, ind + 0.5 - s), e - s); 55761 var x = -tot / 2 + ind; 55762 var a = tot / 2; 55763 mult = Math.sqrt(1 - x * x / (a * a)); 55764 } 55765 55766 mult = easer(mult); 55767 } else if (type === 6) { 55768 if (e === s) { 55769 mult = 0; 55770 } else { 55771 ind = min(max(0, ind + 0.5 - s), e - s); 55772 mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line 55773 } 55774 55775 mult = easer(mult); 55776 } else { 55777 if (ind >= floor(s)) { 55778 if (ind - s < 0) { 55779 mult = max(0, min(min(e, 1) - (s - ind), 1)); 55780 } else { 55781 mult = max(0, min(e - ind, 1)); 55782 } 55783 } 55784 55785 mult = easer(mult); 55786 } // Smoothness implementation. 55787 // The smoothness represents a reduced range of the original [0; 1] range. 55788 // if smoothness is 25%, the new range will be [0.375; 0.625] 55789 // Steps are: 55790 // - find the lower value of the new range (threshold) 55791 // - if multiplier is smaller than that value, floor it to 0 55792 // - if it is larger, 55793 // - subtract the threshold 55794 // - divide it by the smoothness (this will return the range to [0; 1]) 55795 // Note: If it doesn't work on some scenarios, consider applying it before the easer. 55796 55797 55798 if (this.sm.v !== 100) { 55799 var smoothness = this.sm.v * 0.01; 55800 55801 if (smoothness === 0) { 55802 smoothness = 0.00000001; 55803 } 55804 55805 var threshold = 0.5 - smoothness * 0.5; 55806 55807 if (mult < threshold) { 55808 mult = 0; 55809 } else { 55810 mult = (mult - threshold) / smoothness; 55811 55812 if (mult > 1) { 55813 mult = 1; 55814 } 55815 } 55816 } 55817 55818 return mult * this.a.v; 55819 }, 55820 getValue: function getValue(newCharsFlag) { 55821 this.iterateDynamicProperties(); 55822 this._mdf = newCharsFlag || this._mdf; 55823 this._currentTextLength = this.elem.textProperty.currentData.l.length || 0; 55824 55825 if (newCharsFlag && this.data.r === 2) { 55826 this.e.v = this._currentTextLength; 55827 } 55828 55829 var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars; 55830 var o = this.o.v / divisor; 55831 var s = this.s.v / divisor + o; 55832 var e = this.e.v / divisor + o; 55833 55834 if (s > e) { 55835 var _s = s; 55836 s = e; 55837 e = _s; 55838 } 55839 55840 this.finalS = s; 55841 this.finalE = e; 55842 } 55843 }; 55844 extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory); 55845 55846 function getTextSelectorProp(elem, data, arr) { 55847 return new TextSelectorPropFactory(elem, data, arr); 55848 } 55849 55850 return { 55851 getTextSelectorProp: getTextSelectorProp 55852 }; 55853 }(); 55854 55855 function TextAnimatorDataProperty(elem, animatorProps, container) { 55856 var defaultData = { 55857 propType: false 55858 }; 55859 var getProp = PropertyFactory.getProp; 55860 var textAnimatorAnimatables = animatorProps.a; 55861 this.a = { 55862 r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData, 55863 rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData, 55864 ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData, 55865 sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData, 55866 sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData, 55867 s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData, 55868 a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData, 55869 o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData, 55870 p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData, 55871 sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData, 55872 sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData, 55873 fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData, 55874 fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData, 55875 fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData, 55876 fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData, 55877 t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData 55878 }; 55879 this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container); 55880 this.s.t = animatorProps.s.t; 55881 } 55882 55883 function TextAnimatorProperty(textData, renderType, elem) { 55884 this._isFirstFrame = true; 55885 this._hasMaskedPath = false; 55886 this._frameId = -1; 55887 this._textData = textData; 55888 this._renderType = renderType; 55889 this._elem = elem; 55890 this._animatorsData = createSizedArray(this._textData.a.length); 55891 this._pathData = {}; 55892 this._moreOptions = { 55893 alignment: {} 55894 }; 55895 this.renderedLetters = []; 55896 this.lettersChangedFlag = false; 55897 this.initDynamicPropertyContainer(elem); 55898 } 55899 55900 TextAnimatorProperty.prototype.searchProperties = function () { 55901 var i; 55902 var len = this._textData.a.length; 55903 var animatorProps; 55904 var getProp = PropertyFactory.getProp; 55905 55906 for (i = 0; i < len; i += 1) { 55907 animatorProps = this._textData.a[i]; 55908 this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this); 55909 } 55910 55911 if (this._textData.p && 'm' in this._textData.p) { 55912 this._pathData = { 55913 a: getProp(this._elem, this._textData.p.a, 0, 0, this), 55914 f: getProp(this._elem, this._textData.p.f, 0, 0, this), 55915 l: getProp(this._elem, this._textData.p.l, 0, 0, this), 55916 r: getProp(this._elem, this._textData.p.r, 0, 0, this), 55917 p: getProp(this._elem, this._textData.p.p, 0, 0, this), 55918 m: this._elem.maskManager.getMaskProperty(this._textData.p.m) 55919 }; 55920 this._hasMaskedPath = true; 55921 } else { 55922 this._hasMaskedPath = false; 55923 } 55924 55925 this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this); 55926 }; 55927 55928 TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) { 55929 this.lettersChangedFlag = lettersChangedFlag; 55930 55931 if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) { 55932 return; 55933 } 55934 55935 this._isFirstFrame = false; 55936 var alignment = this._moreOptions.alignment.v; 55937 var animators = this._animatorsData; 55938 var textData = this._textData; 55939 var matrixHelper = this.mHelper; 55940 var renderType = this._renderType; 55941 var renderedLettersCount = this.renderedLetters.length; 55942 var xPos; 55943 var yPos; 55944 var i; 55945 var len; 55946 var letters = documentData.l; 55947 var pathInfo; 55948 var currentLength; 55949 var currentPoint; 55950 var segmentLength; 55951 var flag; 55952 var pointInd; 55953 var segmentInd; 55954 var prevPoint; 55955 var points; 55956 var segments; 55957 var partialLength; 55958 var totalLength; 55959 var perc; 55960 var tanAngle; 55961 var mask; 55962 55963 if (this._hasMaskedPath) { 55964 mask = this._pathData.m; 55965 55966 if (!this._pathData.n || this._pathData._mdf) { 55967 var paths = mask.v; 55968 55969 if (this._pathData.r.v) { 55970 paths = paths.reverse(); 55971 } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi 55972 55973 55974 pathInfo = { 55975 tLength: 0, 55976 segments: [] 55977 }; 55978 len = paths._length - 1; 55979 var bezierData; 55980 totalLength = 0; 55981 55982 for (i = 0; i < len; i += 1) { 55983 bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]); 55984 pathInfo.tLength += bezierData.segmentLength; 55985 pathInfo.segments.push(bezierData); 55986 totalLength += bezierData.segmentLength; 55987 } 55988 55989 i = len; 55990 55991 if (mask.v.c) { 55992 bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]); 55993 pathInfo.tLength += bezierData.segmentLength; 55994 pathInfo.segments.push(bezierData); 55995 totalLength += bezierData.segmentLength; 55996 } 55997 55998 this._pathData.pi = pathInfo; 55999 } 56000 56001 pathInfo = this._pathData.pi; 56002 currentLength = this._pathData.f.v; 56003 segmentInd = 0; 56004 pointInd = 1; 56005 segmentLength = 0; 56006 flag = true; 56007 segments = pathInfo.segments; 56008 56009 if (currentLength < 0 && mask.v.c) { 56010 if (pathInfo.tLength < Math.abs(currentLength)) { 56011 currentLength = -Math.abs(currentLength) % pathInfo.tLength; 56012 } 56013 56014 segmentInd = segments.length - 1; 56015 points = segments[segmentInd].points; 56016 pointInd = points.length - 1; 56017 56018 while (currentLength < 0) { 56019 currentLength += points[pointInd].partialLength; 56020 pointInd -= 1; 56021 56022 if (pointInd < 0) { 56023 segmentInd -= 1; 56024 points = segments[segmentInd].points; 56025 pointInd = points.length - 1; 56026 } 56027 } 56028 } 56029 56030 points = segments[segmentInd].points; 56031 prevPoint = points[pointInd - 1]; 56032 currentPoint = points[pointInd]; 56033 partialLength = currentPoint.partialLength; 56034 } 56035 56036 len = letters.length; 56037 xPos = 0; 56038 yPos = 0; 56039 var yOff = documentData.finalSize * 1.2 * 0.714; 56040 var firstLine = true; 56041 var animatorProps; 56042 var animatorSelector; 56043 var j; 56044 var jLen; 56045 var letterValue; 56046 jLen = animators.length; 56047 var mult; 56048 var ind = -1; 56049 var offf; 56050 var xPathPos; 56051 var yPathPos; 56052 var initPathPos = currentLength; 56053 var initSegmentInd = segmentInd; 56054 var initPointInd = pointInd; 56055 var currentLine = -1; 56056 var elemOpacity; 56057 var sc; 56058 var sw; 56059 var fc; 56060 var k; 56061 var letterSw; 56062 var letterSc; 56063 var letterFc; 56064 var letterM = ''; 56065 var letterP = this.defaultPropsArray; 56066 var letterO; // 56067 56068 if (documentData.j === 2 || documentData.j === 1) { 56069 var animatorJustifyOffset = 0; 56070 var animatorFirstCharOffset = 0; 56071 var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1; 56072 var lastIndex = 0; 56073 var isNewLine = true; 56074 56075 for (i = 0; i < len; i += 1) { 56076 if (letters[i].n) { 56077 if (animatorJustifyOffset) { 56078 animatorJustifyOffset += animatorFirstCharOffset; 56079 } 56080 56081 while (lastIndex < i) { 56082 letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset; 56083 lastIndex += 1; 56084 } 56085 56086 animatorJustifyOffset = 0; 56087 isNewLine = true; 56088 } else { 56089 for (j = 0; j < jLen; j += 1) { 56090 animatorProps = animators[j].a; 56091 56092 if (animatorProps.t.propType) { 56093 if (isNewLine && documentData.j === 2) { 56094 animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult; 56095 } 56096 56097 animatorSelector = animators[j].s; 56098 mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); 56099 56100 if (mult.length) { 56101 animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult; 56102 } else { 56103 animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult; 56104 } 56105 } 56106 } 56107 56108 isNewLine = false; 56109 } 56110 } 56111 56112 if (animatorJustifyOffset) { 56113 animatorJustifyOffset += animatorFirstCharOffset; 56114 } 56115 56116 while (lastIndex < i) { 56117 letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset; 56118 lastIndex += 1; 56119 } 56120 } // 56121 56122 56123 for (i = 0; i < len; i += 1) { 56124 matrixHelper.reset(); 56125 elemOpacity = 1; 56126 56127 if (letters[i].n) { 56128 xPos = 0; 56129 yPos += documentData.yOffset; 56130 yPos += firstLine ? 1 : 0; 56131 currentLength = initPathPos; 56132 firstLine = false; 56133 56134 if (this._hasMaskedPath) { 56135 segmentInd = initSegmentInd; 56136 pointInd = initPointInd; 56137 points = segments[segmentInd].points; 56138 prevPoint = points[pointInd - 1]; 56139 currentPoint = points[pointInd]; 56140 partialLength = currentPoint.partialLength; 56141 segmentLength = 0; 56142 } 56143 56144 letterM = ''; 56145 letterFc = ''; 56146 letterSw = ''; 56147 letterO = ''; 56148 letterP = this.defaultPropsArray; 56149 } else { 56150 if (this._hasMaskedPath) { 56151 if (currentLine !== letters[i].line) { 56152 switch (documentData.j) { 56153 case 1: 56154 currentLength += totalLength - documentData.lineWidths[letters[i].line]; 56155 break; 56156 56157 case 2: 56158 currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2; 56159 break; 56160 56161 default: 56162 break; 56163 } 56164 56165 currentLine = letters[i].line; 56166 } 56167 56168 if (ind !== letters[i].ind) { 56169 if (letters[ind]) { 56170 currentLength += letters[ind].extra; 56171 } 56172 56173 currentLength += letters[i].an / 2; 56174 ind = letters[i].ind; 56175 } 56176 56177 currentLength += alignment[0] * letters[i].an * 0.005; 56178 var animatorOffset = 0; 56179 56180 for (j = 0; j < jLen; j += 1) { 56181 animatorProps = animators[j].a; 56182 56183 if (animatorProps.p.propType) { 56184 animatorSelector = animators[j].s; 56185 mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); 56186 56187 if (mult.length) { 56188 animatorOffset += animatorProps.p.v[0] * mult[0]; 56189 } else { 56190 animatorOffset += animatorProps.p.v[0] * mult; 56191 } 56192 } 56193 56194 if (animatorProps.a.propType) { 56195 animatorSelector = animators[j].s; 56196 mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); 56197 56198 if (mult.length) { 56199 animatorOffset += animatorProps.a.v[0] * mult[0]; 56200 } else { 56201 animatorOffset += animatorProps.a.v[0] * mult; 56202 } 56203 } 56204 } 56205 56206 flag = true; // Force alignment only works with a single line for now 56207 56208 if (this._pathData.a.v) { 56209 currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1); 56210 currentLength += this._pathData.f.v; 56211 } 56212 56213 while (flag) { 56214 if (segmentLength + partialLength >= currentLength + animatorOffset || !points) { 56215 perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength; 56216 xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc; 56217 yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc; 56218 matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01); 56219 flag = false; 56220 } else if (points) { 56221 segmentLength += currentPoint.partialLength; 56222 pointInd += 1; 56223 56224 if (pointInd >= points.length) { 56225 pointInd = 0; 56226 segmentInd += 1; 56227 56228 if (!segments[segmentInd]) { 56229 if (mask.v.c) { 56230 pointInd = 0; 56231 segmentInd = 0; 56232 points = segments[segmentInd].points; 56233 } else { 56234 segmentLength -= currentPoint.partialLength; 56235 points = null; 56236 } 56237 } else { 56238 points = segments[segmentInd].points; 56239 } 56240 } 56241 56242 if (points) { 56243 prevPoint = currentPoint; 56244 currentPoint = points[pointInd]; 56245 partialLength = currentPoint.partialLength; 56246 } 56247 } 56248 } 56249 56250 offf = letters[i].an / 2 - letters[i].add; 56251 matrixHelper.translate(-offf, 0, 0); 56252 } else { 56253 offf = letters[i].an / 2 - letters[i].add; 56254 matrixHelper.translate(-offf, 0, 0); // Grouping alignment 56255 56256 matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0); 56257 } 56258 56259 for (j = 0; j < jLen; j += 1) { 56260 animatorProps = animators[j].a; 56261 56262 if (animatorProps.t.propType) { 56263 animatorSelector = animators[j].s; 56264 mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine" 56265 56266 if (xPos !== 0 || documentData.j !== 0) { 56267 if (this._hasMaskedPath) { 56268 if (mult.length) { 56269 currentLength += animatorProps.t.v * mult[0]; 56270 } else { 56271 currentLength += animatorProps.t.v * mult; 56272 } 56273 } else if (mult.length) { 56274 xPos += animatorProps.t.v * mult[0]; 56275 } else { 56276 xPos += animatorProps.t.v * mult; 56277 } 56278 } 56279 } 56280 } 56281 56282 if (documentData.strokeWidthAnim) { 56283 sw = documentData.sw || 0; 56284 } 56285 56286 if (documentData.strokeColorAnim) { 56287 if (documentData.sc) { 56288 sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]]; 56289 } else { 56290 sc = [0, 0, 0]; 56291 } 56292 } 56293 56294 if (documentData.fillColorAnim && documentData.fc) { 56295 fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]]; 56296 } 56297 56298 for (j = 0; j < jLen; j += 1) { 56299 animatorProps = animators[j].a; 56300 56301 if (animatorProps.a.propType) { 56302 animatorSelector = animators[j].s; 56303 mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); 56304 56305 if (mult.length) { 56306 matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]); 56307 } else { 56308 matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult); 56309 } 56310 } 56311 } 56312 56313 for (j = 0; j < jLen; j += 1) { 56314 animatorProps = animators[j].a; 56315 56316 if (animatorProps.s.propType) { 56317 animatorSelector = animators[j].s; 56318 mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); 56319 56320 if (mult.length) { 56321 matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1); 56322 } else { 56323 matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1); 56324 } 56325 } 56326 } 56327 56328 for (j = 0; j < jLen; j += 1) { 56329 animatorProps = animators[j].a; 56330 animatorSelector = animators[j].s; 56331 mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); 56332 56333 if (animatorProps.sk.propType) { 56334 if (mult.length) { 56335 matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]); 56336 } else { 56337 matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult); 56338 } 56339 } 56340 56341 if (animatorProps.r.propType) { 56342 if (mult.length) { 56343 matrixHelper.rotateZ(-animatorProps.r.v * mult[2]); 56344 } else { 56345 matrixHelper.rotateZ(-animatorProps.r.v * mult); 56346 } 56347 } 56348 56349 if (animatorProps.ry.propType) { 56350 if (mult.length) { 56351 matrixHelper.rotateY(animatorProps.ry.v * mult[1]); 56352 } else { 56353 matrixHelper.rotateY(animatorProps.ry.v * mult); 56354 } 56355 } 56356 56357 if (animatorProps.rx.propType) { 56358 if (mult.length) { 56359 matrixHelper.rotateX(animatorProps.rx.v * mult[0]); 56360 } else { 56361 matrixHelper.rotateX(animatorProps.rx.v * mult); 56362 } 56363 } 56364 56365 if (animatorProps.o.propType) { 56366 if (mult.length) { 56367 elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0]; 56368 } else { 56369 elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult; 56370 } 56371 } 56372 56373 if (documentData.strokeWidthAnim && animatorProps.sw.propType) { 56374 if (mult.length) { 56375 sw += animatorProps.sw.v * mult[0]; 56376 } else { 56377 sw += animatorProps.sw.v * mult; 56378 } 56379 } 56380 56381 if (documentData.strokeColorAnim && animatorProps.sc.propType) { 56382 for (k = 0; k < 3; k += 1) { 56383 if (mult.length) { 56384 sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0]; 56385 } else { 56386 sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult; 56387 } 56388 } 56389 } 56390 56391 if (documentData.fillColorAnim && documentData.fc) { 56392 if (animatorProps.fc.propType) { 56393 for (k = 0; k < 3; k += 1) { 56394 if (mult.length) { 56395 fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0]; 56396 } else { 56397 fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult; 56398 } 56399 } 56400 } 56401 56402 if (animatorProps.fh.propType) { 56403 if (mult.length) { 56404 fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]); 56405 } else { 56406 fc = addHueToRGB(fc, animatorProps.fh.v * mult); 56407 } 56408 } 56409 56410 if (animatorProps.fs.propType) { 56411 if (mult.length) { 56412 fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]); 56413 } else { 56414 fc = addSaturationToRGB(fc, animatorProps.fs.v * mult); 56415 } 56416 } 56417 56418 if (animatorProps.fb.propType) { 56419 if (mult.length) { 56420 fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]); 56421 } else { 56422 fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult); 56423 } 56424 } 56425 } 56426 } 56427 56428 for (j = 0; j < jLen; j += 1) { 56429 animatorProps = animators[j].a; 56430 56431 if (animatorProps.p.propType) { 56432 animatorSelector = animators[j].s; 56433 mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); 56434 56435 if (this._hasMaskedPath) { 56436 if (mult.length) { 56437 matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]); 56438 } else { 56439 matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult); 56440 } 56441 } else if (mult.length) { 56442 matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]); 56443 } else { 56444 matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult); 56445 } 56446 } 56447 } 56448 56449 if (documentData.strokeWidthAnim) { 56450 letterSw = sw < 0 ? 0 : sw; 56451 } 56452 56453 if (documentData.strokeColorAnim) { 56454 letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')'; 56455 } 56456 56457 if (documentData.fillColorAnim && documentData.fc) { 56458 letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')'; 56459 } 56460 56461 if (this._hasMaskedPath) { 56462 matrixHelper.translate(0, -documentData.ls); 56463 matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0); 56464 56465 if (this._pathData.p.v) { 56466 tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]); 56467 var rot = Math.atan(tanAngle) * 180 / Math.PI; 56468 56469 if (currentPoint.point[0] < prevPoint.point[0]) { 56470 rot += 180; 56471 } 56472 56473 matrixHelper.rotate(-rot * Math.PI / 180); 56474 } 56475 56476 matrixHelper.translate(xPathPos, yPathPos, 0); 56477 currentLength -= alignment[0] * letters[i].an * 0.005; 56478 56479 if (letters[i + 1] && ind !== letters[i + 1].ind) { 56480 currentLength += letters[i].an / 2; 56481 currentLength += documentData.tr * 0.001 * documentData.finalSize; 56482 } 56483 } else { 56484 matrixHelper.translate(xPos, yPos, 0); 56485 56486 if (documentData.ps) { 56487 // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0); 56488 matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0); 56489 } 56490 56491 switch (documentData.j) { 56492 case 1: 56493 matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0); 56494 break; 56495 56496 case 2: 56497 matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0); 56498 break; 56499 56500 default: 56501 break; 56502 } 56503 56504 matrixHelper.translate(0, -documentData.ls); 56505 matrixHelper.translate(offf, 0, 0); 56506 matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0); 56507 xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize; 56508 } 56509 56510 if (renderType === 'html') { 56511 letterM = matrixHelper.toCSS(); 56512 } else if (renderType === 'svg') { 56513 letterM = matrixHelper.to2dCSS(); 56514 } else { 56515 letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]]; 56516 } 56517 56518 letterO = elemOpacity; 56519 } 56520 56521 if (renderedLettersCount <= i) { 56522 letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP); 56523 this.renderedLetters.push(letterValue); 56524 renderedLettersCount += 1; 56525 this.lettersChangedFlag = true; 56526 } else { 56527 letterValue = this.renderedLetters[i]; 56528 this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag; 56529 } 56530 } 56531 }; 56532 56533 TextAnimatorProperty.prototype.getValue = function () { 56534 if (this._elem.globalData.frameId === this._frameId) { 56535 return; 56536 } 56537 56538 this._frameId = this._elem.globalData.frameId; 56539 this.iterateDynamicProperties(); 56540 }; 56541 56542 TextAnimatorProperty.prototype.mHelper = new Matrix(); 56543 TextAnimatorProperty.prototype.defaultPropsArray = []; 56544 extendPrototype([DynamicPropertyContainer], TextAnimatorProperty); 56545 56546 function ITextElement() {} 56547 56548 ITextElement.prototype.initElement = function (data, globalData, comp) { 56549 this.lettersChangedFlag = true; 56550 this.initFrame(); 56551 this.initBaseData(data, globalData, comp); 56552 this.textProperty = new TextProperty(this, data.t, this.dynamicProperties); 56553 this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this); 56554 this.initTransform(data, globalData, comp); 56555 this.initHierarchy(); 56556 this.initRenderable(); 56557 this.initRendererElement(); 56558 this.createContainerElements(); 56559 this.createRenderableComponents(); 56560 this.createContent(); 56561 this.hide(); 56562 this.textAnimator.searchProperties(this.dynamicProperties); 56563 }; 56564 56565 ITextElement.prototype.prepareFrame = function (num) { 56566 this._mdf = false; 56567 this.prepareRenderableFrame(num); 56568 this.prepareProperties(num, this.isInRange); 56569 }; 56570 56571 ITextElement.prototype.createPathShape = function (matrixHelper, shapes) { 56572 var j; 56573 var jLen = shapes.length; 56574 var pathNodes; 56575 var shapeStr = ''; 56576 56577 for (j = 0; j < jLen; j += 1) { 56578 if (shapes[j].ty === 'sh') { 56579 pathNodes = shapes[j].ks.k; 56580 shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper); 56581 } 56582 } 56583 56584 return shapeStr; 56585 }; 56586 56587 ITextElement.prototype.updateDocumentData = function (newData, index) { 56588 this.textProperty.updateDocumentData(newData, index); 56589 }; 56590 56591 ITextElement.prototype.canResizeFont = function (_canResize) { 56592 this.textProperty.canResizeFont(_canResize); 56593 }; 56594 56595 ITextElement.prototype.setMinimumFontSize = function (_fontSize) { 56596 this.textProperty.setMinimumFontSize(_fontSize); 56597 }; 56598 56599 ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) { 56600 if (documentData.ps) { 56601 matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0); 56602 } 56603 56604 matrixHelper.translate(0, -documentData.ls, 0); 56605 56606 switch (documentData.j) { 56607 case 1: 56608 matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0); 56609 break; 56610 56611 case 2: 56612 matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0); 56613 break; 56614 56615 default: 56616 break; 56617 } 56618 56619 matrixHelper.translate(xPos, yPos, 0); 56620 }; 56621 56622 ITextElement.prototype.buildColor = function (colorData) { 56623 return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')'; 56624 }; 56625 56626 ITextElement.prototype.emptyProp = new LetterProps(); 56627 56628 ITextElement.prototype.destroy = function () {}; 56629 56630 ITextElement.prototype.validateText = function () { 56631 if (this.textProperty._mdf || this.textProperty._isFirstFrame) { 56632 this.buildNewText(); 56633 this.textProperty._isFirstFrame = false; 56634 this.textProperty._mdf = false; 56635 } 56636 }; 56637 56638 var emptyShapeData = { 56639 shapes: [] 56640 }; 56641 56642 function SVGTextLottieElement(data, globalData, comp) { 56643 this.textSpans = []; 56644 this.renderType = 'svg'; 56645 this.initElement(data, globalData, comp); 56646 } 56647 56648 extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement); 56649 56650 SVGTextLottieElement.prototype.createContent = function () { 56651 if (this.data.singleShape && !this.globalData.fontManager.chars) { 56652 this.textContainer = createNS('text'); 56653 } 56654 }; 56655 56656 SVGTextLottieElement.prototype.buildTextContents = function (textArray) { 56657 var i = 0; 56658 var len = textArray.length; 56659 var textContents = []; 56660 var currentTextContent = ''; 56661 56662 while (i < len) { 56663 if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) { 56664 textContents.push(currentTextContent); 56665 currentTextContent = ''; 56666 } else { 56667 currentTextContent += textArray[i]; 56668 } 56669 56670 i += 1; 56671 } 56672 56673 textContents.push(currentTextContent); 56674 return textContents; 56675 }; 56676 56677 SVGTextLottieElement.prototype.buildShapeData = function (data, scale) { 56678 // data should probably be cloned to apply scale separately to each instance of a text on different layers 56679 // but since text internal content gets only rendered once and then it's never rerendered, 56680 // it's probably safe not to clone data and reuse always the same instance even if the object is mutated. 56681 // Avoiding cloning is preferred since cloning each character shape data is expensive 56682 if (data.shapes && data.shapes.length) { 56683 var shape = data.shapes[0]; 56684 56685 if (shape.it) { 56686 var shapeItem = shape.it[shape.it.length - 1]; 56687 56688 if (shapeItem.s) { 56689 shapeItem.s.k[0] = scale; 56690 shapeItem.s.k[1] = scale; 56691 } 56692 } 56693 } 56694 56695 return data; 56696 }; 56697 56698 SVGTextLottieElement.prototype.buildNewText = function () { 56699 this.addDynamicProperty(this); 56700 var i; 56701 var len; 56702 var documentData = this.textProperty.currentData; 56703 this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0); 56704 56705 if (documentData.fc) { 56706 this.layerElement.setAttribute('fill', this.buildColor(documentData.fc)); 56707 } else { 56708 this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)'); 56709 } 56710 56711 if (documentData.sc) { 56712 this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc)); 56713 this.layerElement.setAttribute('stroke-width', documentData.sw); 56714 } 56715 56716 this.layerElement.setAttribute('font-size', documentData.finalSize); 56717 var fontData = this.globalData.fontManager.getFontByName(documentData.f); 56718 56719 if (fontData.fClass) { 56720 this.layerElement.setAttribute('class', fontData.fClass); 56721 } else { 56722 this.layerElement.setAttribute('font-family', fontData.fFamily); 56723 var fWeight = documentData.fWeight; 56724 var fStyle = documentData.fStyle; 56725 this.layerElement.setAttribute('font-style', fStyle); 56726 this.layerElement.setAttribute('font-weight', fWeight); 56727 } 56728 56729 this.layerElement.setAttribute('aria-label', documentData.t); 56730 var letters = documentData.l || []; 56731 var usesGlyphs = !!this.globalData.fontManager.chars; 56732 len = letters.length; 56733 var tSpan; 56734 var matrixHelper = this.mHelper; 56735 var shapeStr = ''; 56736 var singleShape = this.data.singleShape; 56737 var xPos = 0; 56738 var yPos = 0; 56739 var firstLine = true; 56740 var trackingOffset = documentData.tr * 0.001 * documentData.finalSize; 56741 56742 if (singleShape && !usesGlyphs && !documentData.sz) { 56743 var tElement = this.textContainer; 56744 var justify = 'start'; 56745 56746 switch (documentData.j) { 56747 case 1: 56748 justify = 'end'; 56749 break; 56750 56751 case 2: 56752 justify = 'middle'; 56753 break; 56754 56755 default: 56756 justify = 'start'; 56757 break; 56758 } 56759 56760 tElement.setAttribute('text-anchor', justify); 56761 tElement.setAttribute('letter-spacing', trackingOffset); 56762 var textContent = this.buildTextContents(documentData.finalText); 56763 len = textContent.length; 56764 yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0; 56765 56766 for (i = 0; i < len; i += 1) { 56767 tSpan = this.textSpans[i].span || createNS('tspan'); 56768 tSpan.textContent = textContent[i]; 56769 tSpan.setAttribute('x', 0); 56770 tSpan.setAttribute('y', yPos); 56771 tSpan.style.display = 'inherit'; 56772 tElement.appendChild(tSpan); 56773 56774 if (!this.textSpans[i]) { 56775 this.textSpans[i] = { 56776 span: null, 56777 glyph: null 56778 }; 56779 } 56780 56781 this.textSpans[i].span = tSpan; 56782 yPos += documentData.finalLineHeight; 56783 } 56784 56785 this.layerElement.appendChild(tElement); 56786 } else { 56787 var cachedSpansLength = this.textSpans.length; 56788 var charData; 56789 56790 for (i = 0; i < len; i += 1) { 56791 if (!this.textSpans[i]) { 56792 this.textSpans[i] = { 56793 span: null, 56794 childSpan: null, 56795 glyph: null 56796 }; 56797 } 56798 56799 if (!usesGlyphs || !singleShape || i === 0) { 56800 tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text'); 56801 56802 if (cachedSpansLength <= i) { 56803 tSpan.setAttribute('stroke-linecap', 'butt'); 56804 tSpan.setAttribute('stroke-linejoin', 'round'); 56805 tSpan.setAttribute('stroke-miterlimit', '4'); 56806 this.textSpans[i].span = tSpan; 56807 56808 if (usesGlyphs) { 56809 var childSpan = createNS('g'); 56810 tSpan.appendChild(childSpan); 56811 this.textSpans[i].childSpan = childSpan; 56812 } 56813 56814 this.textSpans[i].span = tSpan; 56815 this.layerElement.appendChild(tSpan); 56816 } 56817 56818 tSpan.style.display = 'inherit'; 56819 } 56820 56821 matrixHelper.reset(); 56822 56823 if (singleShape) { 56824 if (letters[i].n) { 56825 xPos = -trackingOffset; 56826 yPos += documentData.yOffset; 56827 yPos += firstLine ? 1 : 0; 56828 firstLine = false; 56829 } 56830 56831 this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos); 56832 xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset; 56833 56834 xPos += trackingOffset; 56835 } 56836 56837 if (usesGlyphs) { 56838 charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily); 56839 var glyphElement; // t === 1 means the character has been replaced with an animated shaped 56840 56841 if (charData.t === 1) { 56842 glyphElement = new SVGCompElement(charData.data, this.globalData, this); 56843 } else { 56844 var data = emptyShapeData; 56845 56846 if (charData.data && charData.data.shapes) { 56847 data = this.buildShapeData(charData.data, documentData.finalSize); 56848 } 56849 56850 glyphElement = new SVGShapeElement(data, this.globalData, this); 56851 } 56852 56853 if (this.textSpans[i].glyph) { 56854 var glyph = this.textSpans[i].glyph; 56855 this.textSpans[i].childSpan.removeChild(glyph.layerElement); 56856 glyph.destroy(); 56857 } 56858 56859 this.textSpans[i].glyph = glyphElement; 56860 glyphElement._debug = true; 56861 glyphElement.prepareFrame(0); 56862 glyphElement.renderFrame(); 56863 this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); // when using animated shapes, the layer will be scaled instead of replacing the internal scale 56864 // this might have issues with strokes and might need a different solution 56865 56866 if (charData.t === 1) { 56867 this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')'); 56868 } 56869 } else { 56870 if (singleShape) { 56871 tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')'); 56872 } 56873 56874 tSpan.textContent = letters[i].val; 56875 tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); 56876 } // 56877 56878 } 56879 56880 if (singleShape && tSpan) { 56881 tSpan.setAttribute('d', shapeStr); 56882 } 56883 } 56884 56885 while (i < this.textSpans.length) { 56886 this.textSpans[i].span.style.display = 'none'; 56887 i += 1; 56888 } 56889 56890 this._sizeChanged = true; 56891 }; 56892 56893 SVGTextLottieElement.prototype.sourceRectAtTime = function () { 56894 this.prepareFrame(this.comp.renderedFrame - this.data.st); 56895 this.renderInnerContent(); 56896 56897 if (this._sizeChanged) { 56898 this._sizeChanged = false; 56899 var textBox = this.layerElement.getBBox(); 56900 this.bbox = { 56901 top: textBox.y, 56902 left: textBox.x, 56903 width: textBox.width, 56904 height: textBox.height 56905 }; 56906 } 56907 56908 return this.bbox; 56909 }; 56910 56911 SVGTextLottieElement.prototype.getValue = function () { 56912 var i; 56913 var len = this.textSpans.length; 56914 var glyphElement; 56915 this.renderedFrame = this.comp.renderedFrame; 56916 56917 for (i = 0; i < len; i += 1) { 56918 glyphElement = this.textSpans[i].glyph; 56919 56920 if (glyphElement) { 56921 glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st); 56922 56923 if (glyphElement._mdf) { 56924 this._mdf = true; 56925 } 56926 } 56927 } 56928 }; 56929 56930 SVGTextLottieElement.prototype.renderInnerContent = function () { 56931 this.validateText(); 56932 56933 if (!this.data.singleShape || this._mdf) { 56934 this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); 56935 56936 if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) { 56937 this._sizeChanged = true; 56938 var i; 56939 var len; 56940 var renderedLetters = this.textAnimator.renderedLetters; 56941 var letters = this.textProperty.currentData.l; 56942 len = letters.length; 56943 var renderedLetter; 56944 var textSpan; 56945 var glyphElement; 56946 56947 for (i = 0; i < len; i += 1) { 56948 if (!letters[i].n) { 56949 renderedLetter = renderedLetters[i]; 56950 textSpan = this.textSpans[i].span; 56951 glyphElement = this.textSpans[i].glyph; 56952 56953 if (glyphElement) { 56954 glyphElement.renderFrame(); 56955 } 56956 56957 if (renderedLetter._mdf.m) { 56958 textSpan.setAttribute('transform', renderedLetter.m); 56959 } 56960 56961 if (renderedLetter._mdf.o) { 56962 textSpan.setAttribute('opacity', renderedLetter.o); 56963 } 56964 56965 if (renderedLetter._mdf.sw) { 56966 textSpan.setAttribute('stroke-width', renderedLetter.sw); 56967 } 56968 56969 if (renderedLetter._mdf.sc) { 56970 textSpan.setAttribute('stroke', renderedLetter.sc); 56971 } 56972 56973 if (renderedLetter._mdf.fc) { 56974 textSpan.setAttribute('fill', renderedLetter.fc); 56975 } 56976 } 56977 } 56978 } 56979 } 56980 }; 56981 56982 function ISolidElement(data, globalData, comp) { 56983 this.initElement(data, globalData, comp); 56984 } 56985 56986 extendPrototype([IImageElement], ISolidElement); 56987 56988 ISolidElement.prototype.createContent = function () { 56989 var rect = createNS('rect'); /// /rect.style.width = this.data.sw; 56990 /// /rect.style.height = this.data.sh; 56991 /// /rect.style.fill = this.data.sc; 56992 56993 rect.setAttribute('width', this.data.sw); 56994 rect.setAttribute('height', this.data.sh); 56995 rect.setAttribute('fill', this.data.sc); 56996 this.layerElement.appendChild(rect); 56997 }; 56998 56999 function NullElement(data, globalData, comp) { 57000 this.initFrame(); 57001 this.initBaseData(data, globalData, comp); 57002 this.initFrame(); 57003 this.initTransform(data, globalData, comp); 57004 this.initHierarchy(); 57005 } 57006 57007 NullElement.prototype.prepareFrame = function (num) { 57008 this.prepareProperties(num, true); 57009 }; 57010 57011 NullElement.prototype.renderFrame = function () {}; 57012 57013 NullElement.prototype.getBaseElement = function () { 57014 return null; 57015 }; 57016 57017 NullElement.prototype.destroy = function () {}; 57018 57019 NullElement.prototype.sourceRectAtTime = function () {}; 57020 57021 NullElement.prototype.hide = function () {}; 57022 57023 extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement); 57024 57025 function SVGRendererBase() {} 57026 57027 extendPrototype([BaseRenderer], SVGRendererBase); 57028 57029 SVGRendererBase.prototype.createNull = function (data) { 57030 return new NullElement(data, this.globalData, this); 57031 }; 57032 57033 SVGRendererBase.prototype.createShape = function (data) { 57034 return new SVGShapeElement(data, this.globalData, this); 57035 }; 57036 57037 SVGRendererBase.prototype.createText = function (data) { 57038 return new SVGTextLottieElement(data, this.globalData, this); 57039 }; 57040 57041 SVGRendererBase.prototype.createImage = function (data) { 57042 return new IImageElement(data, this.globalData, this); 57043 }; 57044 57045 SVGRendererBase.prototype.createSolid = function (data) { 57046 return new ISolidElement(data, this.globalData, this); 57047 }; 57048 57049 SVGRendererBase.prototype.configAnimation = function (animData) { 57050 this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); 57051 this.svgElement.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); 57052 57053 if (this.renderConfig.viewBoxSize) { 57054 this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize); 57055 } else { 57056 this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h); 57057 } 57058 57059 if (!this.renderConfig.viewBoxOnly) { 57060 this.svgElement.setAttribute('width', animData.w); 57061 this.svgElement.setAttribute('height', animData.h); 57062 this.svgElement.style.width = '100%'; 57063 this.svgElement.style.height = '100%'; 57064 this.svgElement.style.transform = 'translate3d(0,0,0)'; 57065 this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility; 57066 } 57067 57068 if (this.renderConfig.width) { 57069 this.svgElement.setAttribute('width', this.renderConfig.width); 57070 } 57071 57072 if (this.renderConfig.height) { 57073 this.svgElement.setAttribute('height', this.renderConfig.height); 57074 } 57075 57076 if (this.renderConfig.className) { 57077 this.svgElement.setAttribute('class', this.renderConfig.className); 57078 } 57079 57080 if (this.renderConfig.id) { 57081 this.svgElement.setAttribute('id', this.renderConfig.id); 57082 } 57083 57084 if (this.renderConfig.focusable !== undefined) { 57085 this.svgElement.setAttribute('focusable', this.renderConfig.focusable); 57086 } 57087 57088 this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)'; 57089 // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px"; 57090 57091 this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation 57092 57093 var defs = this.globalData.defs; 57094 this.setupGlobalData(animData, defs); 57095 this.globalData.progressiveLoad = this.renderConfig.progressiveLoad; 57096 this.data = animData; 57097 var maskElement = createNS('clipPath'); 57098 var rect = createNS('rect'); 57099 rect.setAttribute('width', animData.w); 57100 rect.setAttribute('height', animData.h); 57101 rect.setAttribute('x', 0); 57102 rect.setAttribute('y', 0); 57103 var maskId = createElementID(); 57104 maskElement.setAttribute('id', maskId); 57105 maskElement.appendChild(rect); 57106 this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')'); 57107 defs.appendChild(maskElement); 57108 this.layers = animData.layers; 57109 this.elements = createSizedArray(animData.layers.length); 57110 }; 57111 57112 SVGRendererBase.prototype.destroy = function () { 57113 if (this.animationItem.wrapper) { 57114 this.animationItem.wrapper.innerText = ''; 57115 } 57116 57117 this.layerElement = null; 57118 this.globalData.defs = null; 57119 var i; 57120 var len = this.layers ? this.layers.length : 0; 57121 57122 for (i = 0; i < len; i += 1) { 57123 if (this.elements[i] && this.elements[i].destroy) { 57124 this.elements[i].destroy(); 57125 } 57126 } 57127 57128 this.elements.length = 0; 57129 this.destroyed = true; 57130 this.animationItem = null; 57131 }; 57132 57133 SVGRendererBase.prototype.updateContainerSize = function () {}; 57134 57135 SVGRendererBase.prototype.findIndexByInd = function (ind) { 57136 var i = 0; 57137 var len = this.layers.length; 57138 57139 for (i = 0; i < len; i += 1) { 57140 if (this.layers[i].ind === ind) { 57141 return i; 57142 } 57143 } 57144 57145 return -1; 57146 }; 57147 57148 SVGRendererBase.prototype.buildItem = function (pos) { 57149 var elements = this.elements; 57150 57151 if (elements[pos] || this.layers[pos].ty === 99) { 57152 return; 57153 } 57154 57155 elements[pos] = true; 57156 var element = this.createItem(this.layers[pos]); 57157 elements[pos] = element; 57158 57159 if (getExpressionsPlugin()) { 57160 if (this.layers[pos].ty === 0) { 57161 this.globalData.projectInterface.registerComposition(element); 57162 } 57163 57164 element.initExpressions(); 57165 } 57166 57167 this.appendElementInPos(element, pos); 57168 57169 if (this.layers[pos].tt) { 57170 var elementIndex = 'tp' in this.layers[pos] ? this.findIndexByInd(this.layers[pos].tp) : pos - 1; 57171 57172 if (elementIndex === -1) { 57173 return; 57174 } 57175 57176 if (!this.elements[elementIndex] || this.elements[elementIndex] === true) { 57177 this.buildItem(elementIndex); 57178 this.addPendingElement(element); 57179 } else { 57180 var matteElement = elements[elementIndex]; 57181 var matteMask = matteElement.getMatte(this.layers[pos].tt); 57182 element.setMatte(matteMask); 57183 } 57184 } 57185 }; 57186 57187 SVGRendererBase.prototype.checkPendingElements = function () { 57188 while (this.pendingElements.length) { 57189 var element = this.pendingElements.pop(); 57190 element.checkParenting(); 57191 57192 if (element.data.tt) { 57193 var i = 0; 57194 var len = this.elements.length; 57195 57196 while (i < len) { 57197 if (this.elements[i] === element) { 57198 var elementIndex = 'tp' in element.data ? this.findIndexByInd(element.data.tp) : i - 1; 57199 var matteElement = this.elements[elementIndex]; 57200 var matteMask = matteElement.getMatte(this.layers[i].tt); 57201 element.setMatte(matteMask); 57202 break; 57203 } 57204 57205 i += 1; 57206 } 57207 } 57208 } 57209 }; 57210 57211 SVGRendererBase.prototype.renderFrame = function (num) { 57212 if (this.renderedFrame === num || this.destroyed) { 57213 return; 57214 } 57215 57216 if (num === null) { 57217 num = this.renderedFrame; 57218 } else { 57219 this.renderedFrame = num; 57220 } // console.log('-------'); 57221 // console.log('FRAME ',num); 57222 57223 57224 this.globalData.frameNum = num; 57225 this.globalData.frameId += 1; 57226 this.globalData.projectInterface.currentFrame = num; 57227 this.globalData._mdf = false;
vendor: 5,208 bytes, lines 57228-57427
57228 var i; 57229 var len = this.layers.length; 57230 57231 if (!this.completeLayers) { 57232 this.checkLayers(num); 57233 } 57234 57235 for (i = len - 1; i >= 0; i -= 1) { 57236 if (this.completeLayers || this.elements[i]) { 57237 this.elements[i].prepareFrame(num - this.layers[i].st); 57238 } 57239 } 57240 57241 if (this.globalData._mdf) { 57242 for (i = 0; i < len; i += 1) { 57243 if (this.completeLayers || this.elements[i]) { 57244 this.elements[i].renderFrame(); 57245 } 57246 } 57247 } 57248 }; 57249 57250 SVGRendererBase.prototype.appendElementInPos = function (element, pos) { 57251 var newElement = element.getBaseElement(); 57252 57253 if (!newElement) { 57254 return; 57255 } 57256 57257 var i = 0; 57258 var nextElement; 57259 57260 while (i < pos) { 57261 if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) { 57262 nextElement = this.elements[i].getBaseElement(); 57263 } 57264 57265 i += 1; 57266 } 57267 57268 if (nextElement) { 57269 this.layerElement.insertBefore(newElement, nextElement); 57270 } else { 57271 this.layerElement.appendChild(newElement); 57272 } 57273 }; 57274 57275 SVGRendererBase.prototype.hide = function () { 57276 this.layerElement.style.display = 'none'; 57277 }; 57278 57279 SVGRendererBase.prototype.show = function () { 57280 this.layerElement.style.display = 'block'; 57281 }; 57282 57283 function ICompElement() {} 57284 57285 extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement); 57286 57287 ICompElement.prototype.initElement = function (data, globalData, comp) { 57288 this.initFrame(); 57289 this.initBaseData(data, globalData, comp); 57290 this.initTransform(data, globalData, comp); 57291 this.initRenderable(); 57292 this.initHierarchy(); 57293 this.initRendererElement(); 57294 this.createContainerElements(); 57295 this.createRenderableComponents(); 57296 57297 if (this.data.xt || !globalData.progressiveLoad) { 57298 this.buildAllItems(); 57299 } 57300 57301 this.hide(); 57302 }; 57303 /* ICompElement.prototype.hide = function(){ 57304 if(!this.hidden){ 57305 this.hideElement(); 57306 var i,len = this.elements.length; 57307 for( i = 0; i < len; i+=1 ){ 57308 if(this.elements[i]){ 57309 this.elements[i].hide(); 57310 } 57311 } 57312 } 57313 }; */ 57314 57315 57316 ICompElement.prototype.prepareFrame = function (num) { 57317 this._mdf = false; 57318 this.prepareRenderableFrame(num); 57319 this.prepareProperties(num, this.isInRange); 57320 57321 if (!this.isInRange && !this.data.xt) { 57322 return; 57323 } 57324 57325 if (!this.tm._placeholder) { 57326 var timeRemapped = this.tm.v; 57327 57328 if (timeRemapped === this.data.op) { 57329 timeRemapped = this.data.op - 1; 57330 } 57331 57332 this.renderedFrame = timeRemapped; 57333 } else { 57334 this.renderedFrame = num / this.data.sr; 57335 } 57336 57337 var i; 57338 var len = this.elements.length; 57339 57340 if (!this.completeLayers) { 57341 this.checkLayers(this.renderedFrame); 57342 } // This iteration needs to be backwards because of how expressions connect between each other 57343 57344 57345 for (i = len - 1; i >= 0; i -= 1) { 57346 if (this.completeLayers || this.elements[i]) { 57347 this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st); 57348 57349 if (this.elements[i]._mdf) { 57350 this._mdf = true; 57351 } 57352 } 57353 } 57354 }; 57355 57356 ICompElement.prototype.renderInnerContent = function () { 57357 var i; 57358 var len = this.layers.length; 57359 57360 for (i = 0; i < len; i += 1) { 57361 if (this.completeLayers || this.elements[i]) { 57362 this.elements[i].renderFrame(); 57363 } 57364 } 57365 }; 57366 57367 ICompElement.prototype.setElements = function (elems) { 57368 this.elements = elems; 57369 }; 57370 57371 ICompElement.prototype.getElements = function () { 57372 return this.elements; 57373 }; 57374 57375 ICompElement.prototype.destroyElements = function () { 57376 var i; 57377 var len = this.layers.length; 57378 57379 for (i = 0; i < len; i += 1) { 57380 if (this.elements[i]) { 57381 this.elements[i].destroy(); 57382 } 57383 } 57384 }; 57385 57386 ICompElement.prototype.destroy = function () { 57387 this.destroyElements(); 57388 this.destroyBaseElement(); 57389 }; 57390 57391 function SVGCompElement(data, globalData, comp) { 57392 this.layers = data.layers; 57393 this.supports3d = true; 57394 this.completeLayers = false; 57395 this.pendingElements = []; 57396 this.elements = this.layers ? createSizedArray(this.layers.length) : []; 57397 this.initElement(data, globalData, comp); 57398 this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { 57399 _placeholder: true 57400 }; 57401 } 57402 57403 extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement); 57404 57405 SVGCompElement.prototype.createComp = function (data) { 57406 return new SVGCompElement(data, this.globalData, this); 57407 }; 57408 57409 function SVGRenderer(animationItem, config) { 57410 this.animationItem = animationItem; 57411 this.layers = null; 57412 this.renderedFrame = -1; 57413 this.svgElement = createNS('svg'); 57414 var ariaLabel = ''; 57415 57416 if (config && config.title) { 57417 var titleElement = createNS('title'); 57418 var titleId = createElementID(); 57419 titleElement.setAttribute('id', titleId); 57420 titleElement.textContent = config.title; 57421 this.svgElement.appendChild(titleElement); 57422 ariaLabel += titleId; 57423 } 57424 57425 if (config && config.description) { 57426 var descElement = createNS('desc'); 57427 var descId = createElementID();
vendor: 24,045 bytes, lines 57428-58164
57428 descElement.setAttribute('id', descId); 57429 descElement.textContent = config.description; 57430 this.svgElement.appendChild(descElement); 57431 ariaLabel += ' ' + descId; 57432 } 57433 57434 if (ariaLabel) { 57435 this.svgElement.setAttribute('aria-labelledby', ariaLabel); 57436 } 57437 57438 var defs = createNS('defs'); 57439 this.svgElement.appendChild(defs); 57440 var maskElement = createNS('g'); 57441 this.svgElement.appendChild(maskElement); 57442 this.layerElement = maskElement; 57443 this.renderConfig = { 57444 preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet', 57445 imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice', 57446 contentVisibility: config && config.contentVisibility || 'visible', 57447 progressiveLoad: config && config.progressiveLoad || false, 57448 hideOnTransparent: !(config && config.hideOnTransparent === false), 57449 viewBoxOnly: config && config.viewBoxOnly || false, 57450 viewBoxSize: config && config.viewBoxSize || false, 57451 className: config && config.className || '', 57452 id: config && config.id || '', 57453 focusable: config && config.focusable, 57454 filterSize: { 57455 width: config && config.filterSize && config.filterSize.width || '100%', 57456 height: config && config.filterSize && config.filterSize.height || '100%', 57457 x: config && config.filterSize && config.filterSize.x || '0%', 57458 y: config && config.filterSize && config.filterSize.y || '0%' 57459 }, 57460 width: config && config.width, 57461 height: config && config.height, 57462 runExpressions: !config || config.runExpressions === undefined || config.runExpressions 57463 }; 57464 this.globalData = { 57465 _mdf: false, 57466 frameNum: -1, 57467 defs: defs, 57468 renderConfig: this.renderConfig 57469 }; 57470 this.elements = []; 57471 this.pendingElements = []; 57472 this.destroyed = false; 57473 this.rendererType = 'svg'; 57474 } 57475 57476 extendPrototype([SVGRendererBase], SVGRenderer); 57477 57478 SVGRenderer.prototype.createComp = function (data) { 57479 return new SVGCompElement(data, this.globalData, this); 57480 }; 57481 57482 function ShapeTransformManager() { 57483 this.sequences = {}; 57484 this.sequenceList = []; 57485 this.transform_key_count = 0; 57486 } 57487 57488 ShapeTransformManager.prototype = { 57489 addTransformSequence: function addTransformSequence(transforms) { 57490 var i; 57491 var len = transforms.length; 57492 var key = '_'; 57493 57494 for (i = 0; i < len; i += 1) { 57495 key += transforms[i].transform.key + '_'; 57496 } 57497 57498 var sequence = this.sequences[key]; 57499 57500 if (!sequence) { 57501 sequence = { 57502 transforms: [].concat(transforms), 57503 finalTransform: new Matrix(), 57504 _mdf: false 57505 }; 57506 this.sequences[key] = sequence; 57507 this.sequenceList.push(sequence); 57508 } 57509 57510 return sequence; 57511 }, 57512 processSequence: function processSequence(sequence, isFirstFrame) { 57513 var i = 0; 57514 var len = sequence.transforms.length; 57515 var _mdf = isFirstFrame; 57516 57517 while (i < len && !isFirstFrame) { 57518 if (sequence.transforms[i].transform.mProps._mdf) { 57519 _mdf = true; 57520 break; 57521 } 57522 57523 i += 1; 57524 } 57525 57526 if (_mdf) { 57527 sequence.finalTransform.reset(); 57528 57529 for (i = len - 1; i >= 0; i -= 1) { 57530 sequence.finalTransform.multiply(sequence.transforms[i].transform.mProps.v); 57531 } 57532 } 57533 57534 sequence._mdf = _mdf; 57535 }, 57536 processSequences: function processSequences(isFirstFrame) { 57537 var i; 57538 var len = this.sequenceList.length; 57539 57540 for (i = 0; i < len; i += 1) { 57541 this.processSequence(this.sequenceList[i], isFirstFrame); 57542 } 57543 }, 57544 getNewKey: function getNewKey() { 57545 this.transform_key_count += 1; 57546 return '_' + this.transform_key_count; 57547 } 57548 }; 57549 57550 var lumaLoader = function lumaLoader() { 57551 var id = '__lottie_element_luma_buffer'; 57552 var lumaBuffer = null; 57553 var lumaBufferCtx = null; 57554 var svg = null; // This alternate solution has a slight delay before the filter is applied, resulting in a flicker on the first frame. 57555 // Keeping this here for reference, and in the future, if offscreen canvas supports url filters, this can be used. 57556 // For now, neither of them work for offscreen canvas, so canvas workers can't support the luma track matte mask. 57557 // Naming it solution 2 to mark the extra comment lines. 57558 57559 /* 57560 var svgString = [ 57561 '<svg xmlns="http://www.w3.org/2000/svg">', 57562 '<filter id="' + id + '">', 57563 '<feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="', 57564 '0.3, 0.3, 0.3, 0, 0, ', 57565 '0.3, 0.3, 0.3, 0, 0, ', 57566 '0.3, 0.3, 0.3, 0, 0, ', 57567 '0.3, 0.3, 0.3, 0, 0', 57568 '"/>', 57569 '</filter>', 57570 '</svg>', 57571 ].join(''); 57572 var blob = new Blob([svgString], { type: 'image/svg+xml' }); 57573 var url = URL.createObjectURL(blob); 57574 */ 57575 57576 function createLumaSvgFilter() { 57577 var _svg = createNS('svg'); 57578 57579 var fil = createNS('filter'); 57580 var matrix = createNS('feColorMatrix'); 57581 fil.setAttribute('id', id); 57582 matrix.setAttribute('type', 'matrix'); 57583 matrix.setAttribute('color-interpolation-filters', 'sRGB'); 57584 matrix.setAttribute('values', '0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0'); 57585 fil.appendChild(matrix); 57586 57587 _svg.appendChild(fil); 57588 57589 _svg.setAttribute('id', id + '_svg'); 57590 57591 if (featureSupport.svgLumaHidden) { 57592 _svg.style.display = 'none'; 57593 } 57594 57595 return _svg; 57596 } 57597 57598 function loadLuma() { 57599 if (!lumaBuffer) { 57600 svg = createLumaSvgFilter(); 57601 document.body.appendChild(svg); 57602 lumaBuffer = createTag('canvas'); 57603 lumaBufferCtx = lumaBuffer.getContext('2d'); // lumaBufferCtx.filter = `url('${url}#__lottie_element_luma_buffer')`; // part of solution 2 57604 57605 lumaBufferCtx.filter = 'url(#' + id + ')'; 57606 lumaBufferCtx.fillStyle = 'rgba(0,0,0,0)'; 57607 lumaBufferCtx.fillRect(0, 0, 1, 1); 57608 } 57609 } 57610 57611 function getLuma(canvas) { 57612 if (!lumaBuffer) { 57613 loadLuma(); 57614 } 57615 57616 lumaBuffer.width = canvas.width; 57617 lumaBuffer.height = canvas.height; // lumaBufferCtx.filter = `url('${url}#__lottie_element_luma_buffer')`; // part of solution 2 57618 57619 lumaBufferCtx.filter = 'url(#' + id + ')'; 57620 return lumaBuffer; 57621 } 57622 57623 return { 57624 load: loadLuma, 57625 get: getLuma 57626 }; 57627 }; 57628 57629 function createCanvas(width, height) { 57630 if (featureSupport.offscreenCanvas) { 57631 return new OffscreenCanvas(width, height); 57632 } 57633 57634 var canvas = createTag('canvas'); 57635 canvas.width = width; 57636 canvas.height = height; 57637 return canvas; 57638 } 57639 57640 var assetLoader = function () { 57641 return { 57642 loadLumaCanvas: lumaLoader.load, 57643 getLumaCanvas: lumaLoader.get, 57644 createCanvas: createCanvas 57645 }; 57646 }(); 57647 57648 var registeredEffects = {}; 57649 57650 function CVEffects(elem) { 57651 var i; 57652 var len = elem.data.ef ? elem.data.ef.length : 0; 57653 this.filters = []; 57654 var filterManager; 57655 57656 for (i = 0; i < len; i += 1) { 57657 filterManager = null; 57658 var type = elem.data.ef[i].ty; 57659 57660 if (registeredEffects[type]) { 57661 var Effect = registeredEffects[type].effect; 57662 filterManager = new Effect(elem.effectsManager.effectElements[i], elem); 57663 } 57664 57665 if (filterManager) { 57666 this.filters.push(filterManager); 57667 } 57668 } 57669 57670 if (this.filters.length) { 57671 elem.addRenderableComponent(this); 57672 } 57673 } 57674 57675 CVEffects.prototype.renderFrame = function (_isFirstFrame) { 57676 var i; 57677 var len = this.filters.length; 57678 57679 for (i = 0; i < len; i += 1) { 57680 this.filters[i].renderFrame(_isFirstFrame); 57681 } 57682 }; 57683 57684 CVEffects.prototype.getEffects = function (type) { 57685 var i; 57686 var len = this.filters.length; 57687 var effects = []; 57688 57689 for (i = 0; i < len; i += 1) { 57690 if (this.filters[i].type === type) { 57691 effects.push(this.filters[i]); 57692 } 57693 } 57694 57695 return effects; 57696 }; 57697 57698 function registerEffect(id, effect) { 57699 registeredEffects[id] = { 57700 effect: effect 57701 }; 57702 } 57703 57704 function CVMaskElement(data, element) { 57705 this.data = data; 57706 this.element = element; 57707 this.masksProperties = this.data.masksProperties || []; 57708 this.viewData = createSizedArray(this.masksProperties.length); 57709 var i; 57710 var len = this.masksProperties.length; 57711 var hasMasks = false; 57712 57713 for (i = 0; i < len; i += 1) { 57714 if (this.masksProperties[i].mode !== 'n') { 57715 hasMasks = true; 57716 } 57717 57718 this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3); 57719 } 57720 57721 this.hasMasks = hasMasks; 57722 57723 if (hasMasks) { 57724 this.element.addRenderableComponent(this); 57725 } 57726 } 57727 57728 CVMaskElement.prototype.renderFrame = function () { 57729 if (!this.hasMasks) { 57730 return; 57731 } 57732 57733 var transform = this.element.finalTransform.mat; 57734 var ctx = this.element.canvasContext; 57735 var i; 57736 var len = this.masksProperties.length; 57737 var pt; 57738 var pts; 57739 var data; 57740 ctx.beginPath(); 57741 57742 for (i = 0; i < len; i += 1) { 57743 if (this.masksProperties[i].mode !== 'n') { 57744 if (this.masksProperties[i].inv) { 57745 ctx.moveTo(0, 0); 57746 ctx.lineTo(this.element.globalData.compSize.w, 0); 57747 ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h); 57748 ctx.lineTo(0, this.element.globalData.compSize.h); 57749 ctx.lineTo(0, 0); 57750 } 57751 57752 data = this.viewData[i].v; 57753 pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0); 57754 ctx.moveTo(pt[0], pt[1]); 57755 var j; 57756 var jLen = data._length; 57757 57758 for (j = 1; j < jLen; j += 1) { 57759 pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]); 57760 ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); 57761 } 57762 57763 pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]); 57764 ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); 57765 } 57766 } 57767 57768 this.element.globalData.renderer.save(true); 57769 ctx.clip(); 57770 }; 57771 57772 CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty; 57773 57774 CVMaskElement.prototype.destroy = function () { 57775 this.element = null; 57776 }; 57777 57778 function CVBaseElement() {} 57779 57780 var operationsMap = { 57781 1: 'source-in', 57782 2: 'source-out', 57783 3: 'source-in', 57784 4: 'source-out' 57785 }; 57786 CVBaseElement.prototype = { 57787 createElements: function createElements() {}, 57788 initRendererElement: function initRendererElement() {}, 57789 createContainerElements: function createContainerElements() { 57790 // If the layer is masked we will use two buffers to store each different states of the drawing 57791 // This solution is not ideal for several reason. But unfortunately, because of the recursive 57792 // nature of the render tree, it's the only simple way to make sure one inner mask doesn't override an outer mask. 57793 // TODO: try to reduce the size of these buffers to the size of the composition contaning the layer 57794 // It might be challenging because the layer most likely is transformed in some way 57795 if (this.data.tt >= 1) { 57796 this.buffers = []; 57797 var canvasContext = this.globalData.canvasContext; 57798 var bufferCanvas = assetLoader.createCanvas(canvasContext.canvas.width, canvasContext.canvas.height); 57799 this.buffers.push(bufferCanvas); 57800 var bufferCanvas2 = assetLoader.createCanvas(canvasContext.canvas.width, canvasContext.canvas.height); 57801 this.buffers.push(bufferCanvas2); 57802 57803 if (this.data.tt >= 3 && !document._isProxy) { 57804 assetLoader.loadLumaCanvas(); 57805 } 57806 } 57807 57808 this.canvasContext = this.globalData.canvasContext; 57809 this.transformCanvas = this.globalData.transformCanvas; 57810 this.renderableEffectsManager = new CVEffects(this); 57811 this.searchEffectTransforms(); 57812 }, 57813 createContent: function createContent() {}, 57814 setBlendMode: function setBlendMode() { 57815 var globalData = this.globalData; 57816 57817 if (globalData.blendMode !== this.data.bm) { 57818 globalData.blendMode = this.data.bm; 57819 var blendModeValue = getBlendMode(this.data.bm); 57820 globalData.canvasContext.globalCompositeOperation = blendModeValue; 57821 } 57822 }, 57823 createRenderableComponents: function createRenderableComponents() { 57824 this.maskManager = new CVMaskElement(this.data, this); 57825 this.transformEffects = this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT); 57826 }, 57827 hideElement: function hideElement() { 57828 if (!this.hidden && (!this.isInRange || this.isTransparent)) { 57829 this.hidden = true; 57830 } 57831 }, 57832 showElement: function showElement() { 57833 if (this.isInRange && !this.isTransparent) { 57834 this.hidden = false; 57835 this._isFirstFrame = true; 57836 this.maskManager._isFirstFrame = true; 57837 } 57838 }, 57839 clearCanvas: function clearCanvas(canvasContext) { 57840 canvasContext.clearRect(this.transformCanvas.tx, this.transformCanvas.ty, this.transformCanvas.w * this.transformCanvas.sx, this.transformCanvas.h * this.transformCanvas.sy); 57841 }, 57842 prepareLayer: function prepareLayer() { 57843 if (this.data.tt >= 1) { 57844 var buffer = this.buffers[0]; 57845 var bufferCtx = buffer.getContext('2d'); 57846 this.clearCanvas(bufferCtx); // on the first buffer we store the current state of the global drawing 57847 57848 bufferCtx.drawImage(this.canvasContext.canvas, 0, 0); // The next four lines are to clear the canvas 57849 // TODO: Check if there is a way to clear the canvas without resetting the transform 57850 57851 this.currentTransform = this.canvasContext.getTransform(); 57852 this.canvasContext.setTransform(1, 0, 0, 1, 0, 0); 57853 this.clearCanvas(this.canvasContext); 57854 this.canvasContext.setTransform(this.currentTransform); 57855 } 57856 }, 57857 exitLayer: function exitLayer() { 57858 if (this.data.tt >= 1) { 57859 var buffer = this.buffers[1]; // On the second buffer we store the current state of the global drawing 57860 // that only contains the content of this layer 57861 // (if it is a composition, it also includes the nested layers) 57862 57863 var bufferCtx = buffer.getContext('2d'); 57864 this.clearCanvas(bufferCtx); 57865 bufferCtx.drawImage(this.canvasContext.canvas, 0, 0); // We clear the canvas again 57866 57867 this.canvasContext.setTransform(1, 0, 0, 1, 0, 0); 57868 this.clearCanvas(this.canvasContext); 57869 this.canvasContext.setTransform(this.currentTransform); // We draw the mask 57870 57871 var mask = this.comp.getElementById('tp' in this.data ? this.data.tp : this.data.ind - 1); 57872 mask.renderFrame(true); // We draw the second buffer (that contains the content of this layer) 57873 57874 this.canvasContext.setTransform(1, 0, 0, 1, 0, 0); // If the mask is a Luma matte, we need to do two extra painting operations 57875 // the _isProxy check is to avoid drawing a fake canvas in workers that will throw an error 57876 57877 if (this.data.tt >= 3 && !document._isProxy) { 57878 // We copy the painted mask to a buffer that has a color matrix filter applied to it 57879 // that applies the rgb values to the alpha channel 57880 var lumaBuffer = assetLoader.getLumaCanvas(this.canvasContext.canvas); 57881 var lumaBufferCtx = lumaBuffer.getContext('2d'); 57882 lumaBufferCtx.drawImage(this.canvasContext.canvas, 0, 0); 57883 this.clearCanvas(this.canvasContext); // we repaint the context with the mask applied to it 57884 57885 this.canvasContext.drawImage(lumaBuffer, 0, 0); 57886 } 57887 57888 this.canvasContext.globalCompositeOperation = operationsMap[this.data.tt]; 57889 this.canvasContext.drawImage(buffer, 0, 0); // We finally draw the first buffer (that contains the content of the global drawing) 57890 // We use destination-over to draw the global drawing below the current layer 57891 57892 this.canvasContext.globalCompositeOperation = 'destination-over'; 57893 this.canvasContext.drawImage(this.buffers[0], 0, 0); 57894 this.canvasContext.setTransform(this.currentTransform); // We reset the globalCompositeOperation to source-over, the standard type of operation 57895 57896 this.canvasContext.globalCompositeOperation = 'source-over'; 57897 } 57898 }, 57899 renderFrame: function renderFrame(forceRender) { 57900 if (this.hidden || this.data.hd) { 57901 return; 57902 } 57903 57904 if (this.data.td === 1 && !forceRender) { 57905 return; 57906 } 57907 57908 this.renderTransform(); 57909 this.renderRenderable(); 57910 this.renderLocalTransform(); 57911 this.setBlendMode(); 57912 var forceRealStack = this.data.ty === 0; 57913 this.prepareLayer(); 57914 this.globalData.renderer.save(forceRealStack); 57915 this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props); 57916 this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity); 57917 this.renderInnerContent(); 57918 this.globalData.renderer.restore(forceRealStack); 57919 this.exitLayer(); 57920 57921 if (this.maskManager.hasMasks) { 57922 this.globalData.renderer.restore(true); 57923 } 57924 57925 if (this._isFirstFrame) { 57926 this._isFirstFrame = false; 57927 } 57928 }, 57929 destroy: function destroy() { 57930 this.canvasContext = null; 57931 this.data = null; 57932 this.globalData = null; 57933 this.maskManager.destroy(); 57934 }, 57935 mHelper: new Matrix() 57936 }; 57937 CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement; 57938 CVBaseElement.prototype.show = CVBaseElement.prototype.showElement; 57939 57940 function CVShapeData(element, data, styles, transformsManager) { 57941 this.styledShapes = []; 57942 this.tr = [0, 0, 0, 0, 0, 0]; 57943 var ty = 4; 57944 57945 if (data.ty === 'rc') { 57946 ty = 5; 57947 } else if (data.ty === 'el') { 57948 ty = 6; 57949 } else if (data.ty === 'sr') { 57950 ty = 7; 57951 } 57952 57953 this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element); 57954 var i; 57955 var len = styles.length; 57956 var styledShape; 57957 57958 for (i = 0; i < len; i += 1) { 57959 if (!styles[i].closed) { 57960 styledShape = { 57961 transforms: transformsManager.addTransformSequence(styles[i].transforms), 57962 trNodes: [] 57963 }; 57964 this.styledShapes.push(styledShape); 57965 styles[i].elements.push(styledShape); 57966 } 57967 } 57968 } 57969 57970 CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated; 57971 57972 function CVShapeElement(data, globalData, comp) { 57973 this.shapes = []; 57974 this.shapesData = data.shapes; 57975 this.stylesList = []; 57976 this.itemsData = []; 57977 this.prevViewData = []; 57978 this.shapeModifiers = []; 57979 this.processedElements = []; 57980 this.transformsManager = new ShapeTransformManager(); 57981 this.initElement(data, globalData, comp); 57982 } 57983 57984 extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement); 57985 CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement; 57986 CVShapeElement.prototype.transformHelper = { 57987 opacity: 1, 57988 _opMdf: false 57989 }; 57990 CVShapeElement.prototype.dashResetter = []; 57991 57992 CVShapeElement.prototype.createContent = function () { 57993 this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []); 57994 }; 57995 57996 CVShapeElement.prototype.createStyleElement = function (data, transforms) { 57997 var styleElem = { 57998 data: data, 57999 type: data.ty, 58000 preTransforms: this.transformsManager.addTransformSequence(transforms), 58001 transforms: [], 58002 elements: [], 58003 closed: data.hd === true 58004 }; 58005 var elementData = {}; 58006 58007 if (data.ty === 'fl' || data.ty === 'st') { 58008 elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this); 58009 58010 if (!elementData.c.k) { 58011 styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')'; 58012 } 58013 } else if (data.ty === 'gf' || data.ty === 'gs') { 58014 elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this); 58015 elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this); 58016 elementData.h = PropertyFactory.getProp(this, data.h || { 58017 k: 0 58018 }, 0, 0.01, this); 58019 elementData.a = PropertyFactory.getProp(this, data.a || { 58020 k: 0 58021 }, 0, degToRads, this); 58022 elementData.g = new GradientProperty(this, data.g, this); 58023 } 58024 58025 elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this); 58026 58027 if (data.ty === 'st' || data.ty === 'gs') { 58028 styleElem.lc = lineCapEnum[data.lc || 2]; 58029 styleElem.lj = lineJoinEnum[data.lj || 2]; 58030 58031 if (data.lj == 1) { 58032 // eslint-disable-line eqeqeq 58033 styleElem.ml = data.ml; 58034 } 58035 58036 elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this); 58037 58038 if (!elementData.w.k) { 58039 styleElem.wi = elementData.w.v; 58040 } 58041 58042 if (data.d) { 58043 var d = new DashProperty(this, data.d, 'canvas', this); 58044 elementData.d = d; 58045 58046 if (!elementData.d.k) { 58047 styleElem.da = elementData.d.dashArray; 58048 styleElem["do"] = elementData.d.dashoffset[0]; 58049 } 58050 } 58051 } else { 58052 styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero'; 58053 } 58054 58055 this.stylesList.push(styleElem); 58056 elementData.style = styleElem; 58057 return elementData; 58058 }; 58059 58060 CVShapeElement.prototype.createGroupElement = function () { 58061 var elementData = { 58062 it: [], 58063 prevViewData: [] 58064 }; 58065 return elementData; 58066 }; 58067 58068 CVShapeElement.prototype.createTransformElement = function (data) { 58069 var elementData = { 58070 transform: { 58071 opacity: 1, 58072 _opMdf: false, 58073 key: this.transformsManager.getNewKey(), 58074 op: PropertyFactory.getProp(this, data.o, 0, 0.01, this), 58075 mProps: TransformPropertyFactory.getTransformProperty(this, data, this) 58076 } 58077 }; 58078 return elementData; 58079 }; 58080 58081 CVShapeElement.prototype.createShapeElement = function (data) { 58082 var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager); 58083 this.shapes.push(elementData); 58084 this.addShapeToModifiers(elementData); 58085 return elementData; 58086 }; 58087 58088 CVShapeElement.prototype.reloadShapes = function () { 58089 this._isFirstFrame = true; 58090 var i; 58091 var len = this.itemsData.length; 58092 58093 for (i = 0; i < len; i += 1) { 58094 this.prevViewData[i] = this.itemsData[i]; 58095 } 58096 58097 this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []); 58098 len = this.dynamicProperties.length; 58099 58100 for (i = 0; i < len; i += 1) { 58101 this.dynamicProperties[i].getValue(); 58102 } 58103 58104 this.renderModifiers(); 58105 this.transformsManager.processSequences(this._isFirstFrame); 58106 }; 58107 58108 CVShapeElement.prototype.addTransformToStyleList = function (transform) { 58109 var i; 58110 var len = this.stylesList.length; 58111 58112 for (i = 0; i < len; i += 1) { 58113 if (!this.stylesList[i].closed) { 58114 this.stylesList[i].transforms.push(transform); 58115 } 58116 } 58117 }; 58118 58119 CVShapeElement.prototype.removeTransformFromStyleList = function () { 58120 var i; 58121 var len = this.stylesList.length; 58122 58123 for (i = 0; i < len; i += 1) { 58124 if (!this.stylesList[i].closed) { 58125 this.stylesList[i].transforms.pop(); 58126 } 58127 } 58128 }; 58129 58130 CVShapeElement.prototype.closeStyles = function (styles) { 58131 var i; 58132 var len = styles.length; 58133 58134 for (i = 0; i < len; i += 1) { 58135 styles[i].closed = true; 58136 } 58137 }; 58138 58139 CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) { 58140 var i; 58141 var len = arr.length - 1; 58142 var j; 58143 var jLen; 58144 var ownStyles = []; 58145 var ownModifiers = []; 58146 var processedPos; 58147 var modifier; 58148 var currentTransform; 58149 var ownTransforms = [].concat(transforms); 58150 58151 for (i = len; i >= 0; i -= 1) { 58152 processedPos = this.searchProcessedElement(arr[i]); 58153 58154 if (!processedPos) { 58155 arr[i]._shouldRender = shouldRender; 58156 } else { 58157 itemsData[i] = prevViewData[processedPos - 1]; 58158 } 58159 58160 if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') { 58161 if (!processedPos) { 58162 itemsData[i] = this.createStyleElement(arr[i], ownTransforms); 58163 } else { 58164 itemsData[i].style.closed = false;
vendor: 1,725 bytes, lines 58165-58210
58165 } 58166 58167 ownStyles.push(itemsData[i].style); 58168 } else if (arr[i].ty === 'gr') { 58169 if (!processedPos) { 58170 itemsData[i] = this.createGroupElement(arr[i]); 58171 } else { 58172 jLen = itemsData[i].it.length; 58173 58174 for (j = 0; j < jLen; j += 1) { 58175 itemsData[i].prevViewData[j] = itemsData[i].it[j]; 58176 } 58177 } 58178 58179 this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms); 58180 } else if (arr[i].ty === 'tr') { 58181 if (!processedPos) { 58182 currentTransform = this.createTransformElement(arr[i]); 58183 itemsData[i] = currentTransform; 58184 } 58185 58186 ownTransforms.push(itemsData[i]); 58187 this.addTransformToStyleList(itemsData[i]); 58188 } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') { 58189 if (!processedPos) { 58190 itemsData[i] = this.createShapeElement(arr[i]); 58191 } 58192 } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') { 58193 if (!processedPos) { 58194 modifier = ShapeModifiers.getModifier(arr[i].ty); 58195 modifier.init(this, arr[i]); 58196 itemsData[i] = modifier; 58197 this.shapeModifiers.push(modifier); 58198 } else { 58199 modifier = itemsData[i]; 58200 modifier.closed = false; 58201 } 58202 58203 ownModifiers.push(modifier); 58204 } else if (arr[i].ty === 'rp') { 58205 if (!processedPos) { 58206 modifier = ShapeModifiers.getModifier(arr[i].ty); 58207 itemsData[i] = modifier; 58208 modifier.init(this, arr, i, itemsData); 58209 this.shapeModifiers.push(modifier); 58210 shouldRender = false;
vendor: 214,069 bytes, lines 58211-64815
58211 } else { 58212 modifier = itemsData[i]; 58213 modifier.closed = true; 58214 } 58215 58216 ownModifiers.push(modifier); 58217 } 58218 58219 this.addProcessedElement(arr[i], i + 1); 58220 } 58221 58222 this.removeTransformFromStyleList(); 58223 this.closeStyles(ownStyles); 58224 len = ownModifiers.length; 58225 58226 for (i = 0; i < len; i += 1) { 58227 ownModifiers[i].closed = true; 58228 } 58229 }; 58230 58231 CVShapeElement.prototype.renderInnerContent = function () { 58232 this.transformHelper.opacity = 1; 58233 this.transformHelper._opMdf = false; 58234 this.renderModifiers(); 58235 this.transformsManager.processSequences(this._isFirstFrame); 58236 this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true); 58237 }; 58238 58239 CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) { 58240 if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) { 58241 groupTransform.opacity = parentTransform.opacity; 58242 groupTransform.opacity *= groupTransform.op.v; 58243 groupTransform._opMdf = true; 58244 } 58245 }; 58246 58247 CVShapeElement.prototype.drawLayer = function () { 58248 var i; 58249 var len = this.stylesList.length; 58250 var j; 58251 var jLen; 58252 var k; 58253 var kLen; 58254 var elems; 58255 var nodes; 58256 var renderer = this.globalData.renderer; 58257 var ctx = this.globalData.canvasContext; 58258 var type; 58259 var currentStyle; 58260 58261 for (i = 0; i < len; i += 1) { 58262 currentStyle = this.stylesList[i]; 58263 type = currentStyle.type; // Skipping style when 58264 // Stroke width equals 0 58265 // style should not be rendered (extra unused repeaters) 58266 // current opacity equals 0 58267 // global opacity equals 0 58268 58269 if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) { 58270 renderer.save(); 58271 elems = currentStyle.elements; 58272 58273 if (type === 'st' || type === 'gs') { 58274 renderer.ctxStrokeStyle(type === 'st' ? currentStyle.co : currentStyle.grd); // ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd; 58275 58276 renderer.ctxLineWidth(currentStyle.wi); // ctx.lineWidth = currentStyle.wi; 58277 58278 renderer.ctxLineCap(currentStyle.lc); // ctx.lineCap = currentStyle.lc; 58279 58280 renderer.ctxLineJoin(currentStyle.lj); // ctx.lineJoin = currentStyle.lj; 58281 58282 renderer.ctxMiterLimit(currentStyle.ml || 0); // ctx.miterLimit = currentStyle.ml || 0; 58283 } else { 58284 renderer.ctxFillStyle(type === 'fl' ? currentStyle.co : currentStyle.grd); // ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd; 58285 } 58286 58287 renderer.ctxOpacity(currentStyle.coOp); 58288 58289 if (type !== 'st' && type !== 'gs') { 58290 ctx.beginPath(); 58291 } 58292 58293 renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props); 58294 jLen = elems.length; 58295 58296 for (j = 0; j < jLen; j += 1) { 58297 if (type === 'st' || type === 'gs') { 58298 ctx.beginPath(); 58299 58300 if (currentStyle.da) { 58301 ctx.setLineDash(currentStyle.da); 58302 ctx.lineDashOffset = currentStyle["do"]; 58303 } 58304 } 58305 58306 nodes = elems[j].trNodes; 58307 kLen = nodes.length; 58308 58309 for (k = 0; k < kLen; k += 1) { 58310 if (nodes[k].t === 'm') { 58311 ctx.moveTo(nodes[k].p[0], nodes[k].p[1]); 58312 } else if (nodes[k].t === 'c') { 58313 ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]); 58314 } else { 58315 ctx.closePath(); 58316 } 58317 } 58318 58319 if (type === 'st' || type === 'gs') { 58320 // ctx.stroke(); 58321 renderer.ctxStroke(); 58322 58323 if (currentStyle.da) { 58324 ctx.setLineDash(this.dashResetter); 58325 } 58326 } 58327 } 58328 58329 if (type !== 'st' && type !== 'gs') { 58330 // ctx.fill(currentStyle.r); 58331 this.globalData.renderer.ctxFill(currentStyle.r); 58332 } 58333 58334 renderer.restore(); 58335 } 58336 } 58337 }; 58338 58339 CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) { 58340 var i; 58341 var len = items.length - 1; 58342 var groupTransform; 58343 groupTransform = parentTransform; 58344 58345 for (i = len; i >= 0; i -= 1) { 58346 if (items[i].ty === 'tr') { 58347 groupTransform = data[i].transform; 58348 this.renderShapeTransform(parentTransform, groupTransform); 58349 } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') { 58350 this.renderPath(items[i], data[i]); 58351 } else if (items[i].ty === 'fl') { 58352 this.renderFill(items[i], data[i], groupTransform); 58353 } else if (items[i].ty === 'st') { 58354 this.renderStroke(items[i], data[i], groupTransform); 58355 } else if (items[i].ty === 'gf' || items[i].ty === 'gs') { 58356 this.renderGradientFill(items[i], data[i], groupTransform); 58357 } else if (items[i].ty === 'gr') { 58358 this.renderShape(groupTransform, items[i].it, data[i].it); 58359 } else if (items[i].ty === 'tm') {// 58360 } 58361 } 58362 58363 if (isMain) { 58364 this.drawLayer(); 58365 } 58366 }; 58367 58368 CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) { 58369 if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) { 58370 var shapeNodes = styledShape.trNodes; 58371 var paths = shape.paths; 58372 var i; 58373 var len; 58374 var j; 58375 var jLen = paths._length; 58376 shapeNodes.length = 0; 58377 var groupTransformMat = styledShape.transforms.finalTransform; 58378 58379 for (j = 0; j < jLen; j += 1) { 58380 var pathNodes = paths.shapes[j]; 58381 58382 if (pathNodes && pathNodes.v) { 58383 len = pathNodes._length; 58384 58385 for (i = 1; i < len; i += 1) { 58386 if (i === 1) { 58387 shapeNodes.push({ 58388 t: 'm', 58389 p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0) 58390 }); 58391 } 58392 58393 shapeNodes.push({ 58394 t: 'c', 58395 pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]) 58396 }); 58397 } 58398 58399 if (len === 1) { 58400 shapeNodes.push({ 58401 t: 'm', 58402 p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0) 58403 }); 58404 } 58405 58406 if (pathNodes.c && len) { 58407 shapeNodes.push({ 58408 t: 'c', 58409 pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]) 58410 }); 58411 shapeNodes.push({ 58412 t: 'z' 58413 }); 58414 } 58415 } 58416 } 58417 58418 styledShape.trNodes = shapeNodes; 58419 } 58420 }; 58421 58422 CVShapeElement.prototype.renderPath = function (pathData, itemData) { 58423 if (pathData.hd !== true && pathData._shouldRender) { 58424 var i; 58425 var len = itemData.styledShapes.length; 58426 58427 for (i = 0; i < len; i += 1) { 58428 this.renderStyledShape(itemData.styledShapes[i], itemData.sh); 58429 } 58430 } 58431 }; 58432 58433 CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) { 58434 var styleElem = itemData.style; 58435 58436 if (itemData.c._mdf || this._isFirstFrame) { 58437 styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'; 58438 } 58439 58440 if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) { 58441 styleElem.coOp = itemData.o.v * groupTransform.opacity; 58442 } 58443 }; 58444 58445 CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) { 58446 var styleElem = itemData.style; 58447 var grd; 58448 58449 if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) { 58450 var ctx = this.globalData.canvasContext; 58451 var pt1 = itemData.s.v; 58452 var pt2 = itemData.e.v; 58453 58454 if (styleData.t === 1) { 58455 grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]); 58456 } else { 58457 var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); 58458 var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]); 58459 var percent = itemData.h.v; 58460 58461 if (percent >= 1) { 58462 percent = 0.99; 58463 } else if (percent <= -1) { 58464 percent = -0.99; 58465 } 58466 58467 var dist = rad * percent; 58468 var x = Math.cos(ang + itemData.a.v) * dist + pt1[0]; 58469 var y = Math.sin(ang + itemData.a.v) * dist + pt1[1]; 58470 grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad); 58471 } 58472 58473 var i; 58474 var len = styleData.g.p; 58475 var cValues = itemData.g.c; 58476 var opacity = 1; 58477 58478 for (i = 0; i < len; i += 1) { 58479 if (itemData.g._hasOpacity && itemData.g._collapsable) { 58480 opacity = itemData.g.o[i * 2 + 1]; 58481 } 58482 58483 grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')'); 58484 } 58485 58486 styleElem.grd = grd; 58487 } 58488 58489 styleElem.coOp = itemData.o.v * groupTransform.opacity; 58490 }; 58491 58492 CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) { 58493 var styleElem = itemData.style; 58494 var d = itemData.d; 58495 58496 if (d && (d._mdf || this._isFirstFrame)) { 58497 styleElem.da = d.dashArray; 58498 styleElem["do"] = d.dashoffset[0]; 58499 } 58500 58501 if (itemData.c._mdf || this._isFirstFrame) { 58502 styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'; 58503 } 58504 58505 if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) { 58506 styleElem.coOp = itemData.o.v * groupTransform.opacity; 58507 } 58508 58509 if (itemData.w._mdf || this._isFirstFrame) { 58510 styleElem.wi = itemData.w.v; 58511 } 58512 }; 58513 58514 CVShapeElement.prototype.destroy = function () { 58515 this.shapesData = null; 58516 this.globalData = null; 58517 this.canvasContext = null; 58518 this.stylesList.length = 0; 58519 this.itemsData.length = 0; 58520 }; 58521 58522 function CVTextElement(data, globalData, comp) { 58523 this.textSpans = []; 58524 this.yOffset = 0; 58525 this.fillColorAnim = false; 58526 this.strokeColorAnim = false; 58527 this.strokeWidthAnim = false; 58528 this.stroke = false; 58529 this.fill = false; 58530 this.justifyOffset = 0; 58531 this.currentRender = null; 58532 this.renderType = 'canvas'; 58533 this.values = { 58534 fill: 'rgba(0,0,0,0)', 58535 stroke: 'rgba(0,0,0,0)', 58536 sWidth: 0, 58537 fValue: '' 58538 }; 58539 this.initElement(data, globalData, comp); 58540 } 58541 58542 extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement); 58543 CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d'); 58544 58545 CVTextElement.prototype.buildNewText = function () { 58546 var documentData = this.textProperty.currentData; 58547 this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0); 58548 var hasFill = false; 58549 58550 if (documentData.fc) { 58551 hasFill = true; 58552 this.values.fill = this.buildColor(documentData.fc); 58553 } else { 58554 this.values.fill = 'rgba(0,0,0,0)'; 58555 } 58556 58557 this.fill = hasFill; 58558 var hasStroke = false; 58559 58560 if (documentData.sc) { 58561 hasStroke = true; 58562 this.values.stroke = this.buildColor(documentData.sc); 58563 this.values.sWidth = documentData.sw; 58564 } 58565 58566 var fontData = this.globalData.fontManager.getFontByName(documentData.f); 58567 var i; 58568 var len; 58569 var letters = documentData.l; 58570 var matrixHelper = this.mHelper; 58571 this.stroke = hasStroke; 58572 this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily; 58573 len = documentData.finalText.length; // this.tHelper.font = this.values.fValue; 58574 58575 var charData; 58576 var shapeData; 58577 var k; 58578 var kLen; 58579 var shapes; 58580 var j; 58581 var jLen; 58582 var pathNodes; 58583 var commands; 58584 var pathArr; 58585 var singleShape = this.data.singleShape; 58586 var trackingOffset = documentData.tr * 0.001 * documentData.finalSize; 58587 var xPos = 0; 58588 var yPos = 0; 58589 var firstLine = true; 58590 var cnt = 0; 58591 58592 for (i = 0; i < len; i += 1) { 58593 charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily); 58594 shapeData = charData && charData.data || {}; 58595 matrixHelper.reset(); 58596 58597 if (singleShape && letters[i].n) { 58598 xPos = -trackingOffset; 58599 yPos += documentData.yOffset; 58600 yPos += firstLine ? 1 : 0; 58601 firstLine = false; 58602 } 58603 58604 shapes = shapeData.shapes ? shapeData.shapes[0].it : []; 58605 jLen = shapes.length; 58606 matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100); 58607 58608 if (singleShape) { 58609 this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos); 58610 } 58611 58612 commands = createSizedArray(jLen - 1); 58613 var commandsCounter = 0; 58614 58615 for (j = 0; j < jLen; j += 1) { 58616 if (shapes[j].ty === 'sh') { 58617 kLen = shapes[j].ks.k.i.length; 58618 pathNodes = shapes[j].ks.k; 58619 pathArr = []; 58620 58621 for (k = 1; k < kLen; k += 1) { 58622 if (k === 1) { 58623 pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0)); 58624 } 58625 58626 pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0)); 58627 } 58628 58629 pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0)); 58630 commands[commandsCounter] = pathArr; 58631 commandsCounter += 1; 58632 } 58633 } 58634 58635 if (singleShape) { 58636 xPos += letters[i].l; 58637 xPos += trackingOffset; 58638 } 58639 58640 if (this.textSpans[cnt]) { 58641 this.textSpans[cnt].elem = commands; 58642 } else { 58643 this.textSpans[cnt] = { 58644 elem: commands 58645 }; 58646 } 58647 58648 cnt += 1; 58649 } 58650 }; 58651 58652 CVTextElement.prototype.renderInnerContent = function () { 58653 this.validateText(); 58654 var ctx = this.canvasContext; 58655 ctx.font = this.values.fValue; 58656 this.globalData.renderer.ctxLineCap('butt'); // ctx.lineCap = 'butt'; 58657 58658 this.globalData.renderer.ctxLineJoin('miter'); // ctx.lineJoin = 'miter'; 58659 58660 this.globalData.renderer.ctxMiterLimit(4); // ctx.miterLimit = 4; 58661 58662 if (!this.data.singleShape) { 58663 this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); 58664 } 58665 58666 var i; 58667 var len; 58668 var j; 58669 var jLen; 58670 var k; 58671 var kLen; 58672 var renderedLetters = this.textAnimator.renderedLetters; 58673 var letters = this.textProperty.currentData.l; 58674 len = letters.length; 58675 var renderedLetter; 58676 var lastFill = null; 58677 var lastStroke = null; 58678 var lastStrokeW = null; 58679 var commands; 58680 var pathArr; 58681 var renderer = this.globalData.renderer; 58682 58683 for (i = 0; i < len; i += 1) { 58684 if (!letters[i].n) { 58685 renderedLetter = renderedLetters[i]; 58686 58687 if (renderedLetter) { 58688 renderer.save(); 58689 renderer.ctxTransform(renderedLetter.p); 58690 renderer.ctxOpacity(renderedLetter.o); 58691 } 58692 58693 if (this.fill) { 58694 if (renderedLetter && renderedLetter.fc) { 58695 if (lastFill !== renderedLetter.fc) { 58696 renderer.ctxFillStyle(renderedLetter.fc); 58697 lastFill = renderedLetter.fc; // ctx.fillStyle = renderedLetter.fc; 58698 } 58699 } else if (lastFill !== this.values.fill) { 58700 lastFill = this.values.fill; 58701 renderer.ctxFillStyle(this.values.fill); // ctx.fillStyle = this.values.fill; 58702 } 58703 58704 commands = this.textSpans[i].elem; 58705 jLen = commands.length; 58706 this.globalData.canvasContext.beginPath(); 58707 58708 for (j = 0; j < jLen; j += 1) { 58709 pathArr = commands[j]; 58710 kLen = pathArr.length; 58711 this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]); 58712 58713 for (k = 2; k < kLen; k += 6) { 58714 this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]); 58715 } 58716 } 58717 58718 this.globalData.canvasContext.closePath(); 58719 renderer.ctxFill(); // this.globalData.canvasContext.fill(); 58720 /// ctx.fillText(this.textSpans[i].val,0,0); 58721 } 58722 58723 if (this.stroke) { 58724 if (renderedLetter && renderedLetter.sw) { 58725 if (lastStrokeW !== renderedLetter.sw) { 58726 lastStrokeW = renderedLetter.sw; 58727 renderer.ctxLineWidth(renderedLetter.sw); // ctx.lineWidth = renderedLetter.sw; 58728 } 58729 } else if (lastStrokeW !== this.values.sWidth) { 58730 lastStrokeW = this.values.sWidth; 58731 renderer.ctxLineWidth(this.values.sWidth); // ctx.lineWidth = this.values.sWidth; 58732 } 58733 58734 if (renderedLetter && renderedLetter.sc) { 58735 if (lastStroke !== renderedLetter.sc) { 58736 lastStroke = renderedLetter.sc; 58737 renderer.ctxStrokeStyle(renderedLetter.sc); // ctx.strokeStyle = renderedLetter.sc; 58738 } 58739 } else if (lastStroke !== this.values.stroke) { 58740 lastStroke = this.values.stroke; 58741 renderer.ctxStrokeStyle(this.values.stroke); // ctx.strokeStyle = this.values.stroke; 58742 } 58743 58744 commands = this.textSpans[i].elem; 58745 jLen = commands.length; 58746 this.globalData.canvasContext.beginPath(); 58747 58748 for (j = 0; j < jLen; j += 1) { 58749 pathArr = commands[j]; 58750 kLen = pathArr.length; 58751 this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]); 58752 58753 for (k = 2; k < kLen; k += 6) { 58754 this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]); 58755 } 58756 } 58757 58758 this.globalData.canvasContext.closePath(); 58759 renderer.ctxStroke(); // this.globalData.canvasContext.stroke(); 58760 /// ctx.strokeText(letters[i].val,0,0); 58761 } 58762 58763 if (renderedLetter) { 58764 this.globalData.renderer.restore(); 58765 } 58766 } 58767 } 58768 }; 58769 58770 function CVImageElement(data, globalData, comp) { 58771 this.assetData = globalData.getAssetData(data.refId); 58772 this.img = globalData.imageLoader.getAsset(this.assetData); 58773 this.initElement(data, globalData, comp); 58774 } 58775 58776 extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement); 58777 CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement; 58778 CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame; 58779 58780 CVImageElement.prototype.createContent = function () { 58781 if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) { 58782 var canvas = createTag('canvas'); 58783 canvas.width = this.assetData.w; 58784 canvas.height = this.assetData.h; 58785 var ctx = canvas.getContext('2d'); 58786 var imgW = this.img.width; 58787 var imgH = this.img.height; 58788 var imgRel = imgW / imgH; 58789 var canvasRel = this.assetData.w / this.assetData.h; 58790 var widthCrop; 58791 var heightCrop; 58792 var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio; 58793 58794 if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') { 58795 heightCrop = imgH; 58796 widthCrop = heightCrop * canvasRel; 58797 } else { 58798 widthCrop = imgW; 58799 heightCrop = widthCrop / canvasRel; 58800 } 58801 58802 ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h); 58803 this.img = canvas; 58804 } 58805 }; 58806 58807 CVImageElement.prototype.renderInnerContent = function () { 58808 this.canvasContext.drawImage(this.img, 0, 0); 58809 }; 58810 58811 CVImageElement.prototype.destroy = function () { 58812 this.img = null; 58813 }; 58814 58815 function CVSolidElement(data, globalData, comp) { 58816 this.initElement(data, globalData, comp); 58817 } 58818 58819 extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement); 58820 CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement; 58821 CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame; 58822 58823 CVSolidElement.prototype.renderInnerContent = function () { 58824 // var ctx = this.canvasContext; 58825 this.globalData.renderer.ctxFillStyle(this.data.sc); // ctx.fillStyle = this.data.sc; 58826 58827 this.globalData.renderer.ctxFillRect(0, 0, this.data.sw, this.data.sh); // ctx.fillRect(0, 0, this.data.sw, this.data.sh); 58828 // 58829 }; 58830 58831 function CanvasRendererBase() {} 58832 58833 extendPrototype([BaseRenderer], CanvasRendererBase); 58834 58835 CanvasRendererBase.prototype.createShape = function (data) { 58836 return new CVShapeElement(data, this.globalData, this); 58837 }; 58838 58839 CanvasRendererBase.prototype.createText = function (data) { 58840 return new CVTextElement(data, this.globalData, this); 58841 }; 58842 58843 CanvasRendererBase.prototype.createImage = function (data) { 58844 return new CVImageElement(data, this.globalData, this); 58845 }; 58846 58847 CanvasRendererBase.prototype.createSolid = function (data) { 58848 return new CVSolidElement(data, this.globalData, this); 58849 }; 58850 58851 CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull; 58852 58853 CanvasRendererBase.prototype.ctxTransform = function (props) { 58854 if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) { 58855 return; 58856 } 58857 58858 this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]); 58859 }; 58860 58861 CanvasRendererBase.prototype.ctxOpacity = function (op) { 58862 this.canvasContext.globalAlpha *= op < 0 ? 0 : op; 58863 }; 58864 58865 CanvasRendererBase.prototype.ctxFillStyle = function (value) { 58866 this.canvasContext.fillStyle = value; 58867 }; 58868 58869 CanvasRendererBase.prototype.ctxStrokeStyle = function (value) { 58870 this.canvasContext.strokeStyle = value; 58871 }; 58872 58873 CanvasRendererBase.prototype.ctxLineWidth = function (value) { 58874 this.canvasContext.lineWidth = value; 58875 }; 58876 58877 CanvasRendererBase.prototype.ctxLineCap = function (value) { 58878 this.canvasContext.lineCap = value; 58879 }; 58880 58881 CanvasRendererBase.prototype.ctxLineJoin = function (value) { 58882 this.canvasContext.lineJoin = value; 58883 }; 58884 58885 CanvasRendererBase.prototype.ctxMiterLimit = function (value) { 58886 this.canvasContext.miterLimit = value; 58887 }; 58888 58889 CanvasRendererBase.prototype.ctxFill = function (rule) { 58890 this.canvasContext.fill(rule); 58891 }; 58892 58893 CanvasRendererBase.prototype.ctxFillRect = function (x, y, w, h) { 58894 this.canvasContext.fillRect(x, y, w, h); 58895 }; 58896 58897 CanvasRendererBase.prototype.ctxStroke = function () { 58898 this.canvasContext.stroke(); 58899 }; 58900 58901 CanvasRendererBase.prototype.reset = function () { 58902 if (!this.renderConfig.clearCanvas) { 58903 this.canvasContext.restore(); 58904 return; 58905 } 58906 58907 this.contextData.reset(); 58908 }; 58909 58910 CanvasRendererBase.prototype.save = function () { 58911 this.canvasContext.save(); 58912 }; 58913 58914 CanvasRendererBase.prototype.restore = function (actionFlag) { 58915 if (!this.renderConfig.clearCanvas) { 58916 this.canvasContext.restore(); 58917 return; 58918 } 58919 58920 if (actionFlag) { 58921 this.globalData.blendMode = 'source-over'; 58922 } 58923 58924 this.contextData.restore(actionFlag); 58925 }; 58926 58927 CanvasRendererBase.prototype.configAnimation = function (animData) { 58928 if (this.animationItem.wrapper) { 58929 this.animationItem.container = createTag('canvas'); 58930 var containerStyle = this.animationItem.container.style; 58931 containerStyle.width = '100%'; 58932 containerStyle.height = '100%'; 58933 var origin = '0px 0px 0px'; 58934 containerStyle.transformOrigin = origin; 58935 containerStyle.mozTransformOrigin = origin; 58936 containerStyle.webkitTransformOrigin = origin; 58937 containerStyle['-webkit-transform'] = origin; 58938 containerStyle.contentVisibility = this.renderConfig.contentVisibility; 58939 this.animationItem.wrapper.appendChild(this.animationItem.container); 58940 this.canvasContext = this.animationItem.container.getContext('2d'); 58941 58942 if (this.renderConfig.className) { 58943 this.animationItem.container.setAttribute('class', this.renderConfig.className); 58944 } 58945 58946 if (this.renderConfig.id) { 58947 this.animationItem.container.setAttribute('id', this.renderConfig.id); 58948 } 58949 } else { 58950 this.canvasContext = this.renderConfig.context; 58951 } 58952 58953 this.contextData.setContext(this.canvasContext); 58954 this.data = animData; 58955 this.layers = animData.layers; 58956 this.transformCanvas = { 58957 w: animData.w, 58958 h: animData.h, 58959 sx: 0, 58960 sy: 0, 58961 tx: 0, 58962 ty: 0 58963 }; 58964 this.setupGlobalData(animData, document.body); 58965 this.globalData.canvasContext = this.canvasContext; 58966 this.globalData.renderer = this; 58967 this.globalData.isDashed = false; 58968 this.globalData.progressiveLoad = this.renderConfig.progressiveLoad; 58969 this.globalData.transformCanvas = this.transformCanvas; 58970 this.elements = createSizedArray(animData.layers.length); 58971 this.updateContainerSize(); 58972 }; 58973 58974 CanvasRendererBase.prototype.updateContainerSize = function (width, height) { 58975 this.reset(); 58976 var elementWidth; 58977 var elementHeight; 58978 58979 if (width) { 58980 elementWidth = width; 58981 elementHeight = height; 58982 this.canvasContext.canvas.width = elementWidth; 58983 this.canvasContext.canvas.height = elementHeight; 58984 } else { 58985 if (this.animationItem.wrapper && this.animationItem.container) { 58986 elementWidth = this.animationItem.wrapper.offsetWidth; 58987 elementHeight = this.animationItem.wrapper.offsetHeight; 58988 } else { 58989 elementWidth = this.canvasContext.canvas.width; 58990 elementHeight = this.canvasContext.canvas.height; 58991 } 58992 58993 this.canvasContext.canvas.width = elementWidth * this.renderConfig.dpr; 58994 this.canvasContext.canvas.height = elementHeight * this.renderConfig.dpr; 58995 } 58996 58997 var elementRel; 58998 var animationRel; 58999 59000 if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) { 59001 var par = this.renderConfig.preserveAspectRatio.split(' '); 59002 var fillType = par[1] || 'meet'; 59003 var pos = par[0] || 'xMidYMid'; 59004 var xPos = pos.substr(0, 4); 59005 var yPos = pos.substr(4); 59006 elementRel = elementWidth / elementHeight; 59007 animationRel = this.transformCanvas.w / this.transformCanvas.h; 59008 59009 if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') { 59010 this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); 59011 this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); 59012 } else { 59013 this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); 59014 this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); 59015 } 59016 59017 if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) { 59018 this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr; 59019 } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) { 59020 this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr; 59021 } else { 59022 this.transformCanvas.tx = 0; 59023 } 59024 59025 if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) { 59026 this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr; 59027 } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) { 59028 this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr; 59029 } else { 59030 this.transformCanvas.ty = 0; 59031 } 59032 } else if (this.renderConfig.preserveAspectRatio === 'none') { 59033 this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); 59034 this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); 59035 this.transformCanvas.tx = 0; 59036 this.transformCanvas.ty = 0; 59037 } else { 59038 this.transformCanvas.sx = this.renderConfig.dpr; 59039 this.transformCanvas.sy = this.renderConfig.dpr; 59040 this.transformCanvas.tx = 0; 59041 this.transformCanvas.ty = 0; 59042 } 59043 59044 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]; 59045 /* var i, len = this.elements.length; 59046 for(i=0;i<len;i+=1){ 59047 if(this.elements[i] && this.elements[i].data.ty === 0){ 59048 this.elements[i].resize(this.globalData.transformCanvas); 59049 } 59050 } */ 59051 59052 this.ctxTransform(this.transformCanvas.props); 59053 this.canvasContext.beginPath(); 59054 this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h); 59055 this.canvasContext.closePath(); 59056 this.canvasContext.clip(); 59057 this.renderFrame(this.renderedFrame, true); 59058 }; 59059 59060 CanvasRendererBase.prototype.destroy = function () { 59061 if (this.renderConfig.clearCanvas && this.animationItem.wrapper) { 59062 this.animationItem.wrapper.innerText = ''; 59063 } 59064 59065 var i; 59066 var len = this.layers ? this.layers.length : 0; 59067 59068 for (i = len - 1; i >= 0; i -= 1) { 59069 if (this.elements[i] && this.elements[i].destroy) { 59070 this.elements[i].destroy(); 59071 } 59072 } 59073 59074 this.elements.length = 0; 59075 this.globalData.canvasContext = null; 59076 this.animationItem.container = null; 59077 this.destroyed = true; 59078 }; 59079 59080 CanvasRendererBase.prototype.renderFrame = function (num, forceRender) { 59081 if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) { 59082 return; 59083 } 59084 59085 this.renderedFrame = num; 59086 this.globalData.frameNum = num - this.animationItem._isFirstFrame; 59087 this.globalData.frameId += 1; 59088 this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender; 59089 this.globalData.projectInterface.currentFrame = num; // console.log('--------'); 59090 // console.log('NEW: ',num); 59091 59092 var i; 59093 var len = this.layers.length; 59094 59095 if (!this.completeLayers) { 59096 this.checkLayers(num); 59097 } 59098 59099 for (i = len - 1; i >= 0; i -= 1) { 59100 if (this.completeLayers || this.elements[i]) { 59101 this.elements[i].prepareFrame(num - this.layers[i].st); 59102 } 59103 } 59104 59105 if (this.globalData._mdf) { 59106 if (this.renderConfig.clearCanvas === true) { 59107 this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h); 59108 } else { 59109 this.save(); 59110 } 59111 59112 for (i = len - 1; i >= 0; i -= 1) { 59113 if (this.completeLayers || this.elements[i]) { 59114 this.elements[i].renderFrame(); 59115 } 59116 } 59117 59118 if (this.renderConfig.clearCanvas !== true) { 59119 this.restore(); 59120 } 59121 } 59122 }; 59123 59124 CanvasRendererBase.prototype.buildItem = function (pos) { 59125 var elements = this.elements; 59126 59127 if (elements[pos] || this.layers[pos].ty === 99) { 59128 return; 59129 } 59130 59131 var element = this.createItem(this.layers[pos], this, this.globalData); 59132 elements[pos] = element; 59133 element.initExpressions(); 59134 /* if(this.layers[pos].ty === 0){ 59135 element.resize(this.globalData.transformCanvas); 59136 } */ 59137 }; 59138 59139 CanvasRendererBase.prototype.checkPendingElements = function () { 59140 while (this.pendingElements.length) { 59141 var element = this.pendingElements.pop(); 59142 element.checkParenting(); 59143 } 59144 }; 59145 59146 CanvasRendererBase.prototype.hide = function () { 59147 this.animationItem.container.style.display = 'none'; 59148 }; 59149 59150 CanvasRendererBase.prototype.show = function () { 59151 this.animationItem.container.style.display = 'block'; 59152 }; 59153 59154 function CanvasContext() { 59155 this.opacity = -1; 59156 this.transform = createTypedArray('float32', 16); 59157 this.fillStyle = ''; 59158 this.strokeStyle = ''; 59159 this.lineWidth = ''; 59160 this.lineCap = ''; 59161 this.lineJoin = ''; 59162 this.miterLimit = ''; 59163 this.id = Math.random(); 59164 } 59165 59166 function CVContextData() { 59167 this.stack = []; 59168 this.cArrPos = 0; 59169 this.cTr = new Matrix(); 59170 var i; 59171 var len = 15; 59172 59173 for (i = 0; i < len; i += 1) { 59174 var canvasContext = new CanvasContext(); 59175 this.stack[i] = canvasContext; 59176 } 59177 59178 this._length = len; 59179 this.nativeContext = null; 59180 this.transformMat = new Matrix(); 59181 this.currentOpacity = 1; // 59182 59183 this.currentFillStyle = ''; 59184 this.appliedFillStyle = ''; // 59185 59186 this.currentStrokeStyle = ''; 59187 this.appliedStrokeStyle = ''; // 59188 59189 this.currentLineWidth = ''; 59190 this.appliedLineWidth = ''; // 59191 59192 this.currentLineCap = ''; 59193 this.appliedLineCap = ''; // 59194 59195 this.currentLineJoin = ''; 59196 this.appliedLineJoin = ''; // 59197 59198 this.appliedMiterLimit = ''; 59199 this.currentMiterLimit = ''; 59200 } 59201 59202 CVContextData.prototype.duplicate = function () { 59203 var newLength = this._length * 2; 59204 var i = 0; 59205 59206 for (i = this._length; i < newLength; i += 1) { 59207 this.stack[i] = new CanvasContext(); 59208 } 59209 59210 this._length = newLength; 59211 }; 59212 59213 CVContextData.prototype.reset = function () { 59214 this.cArrPos = 0; 59215 this.cTr.reset(); 59216 this.stack[this.cArrPos].opacity = 1; 59217 }; 59218 59219 CVContextData.prototype.restore = function (forceRestore) { 59220 this.cArrPos -= 1; 59221 var currentContext = this.stack[this.cArrPos]; 59222 var transform = currentContext.transform; 59223 var i; 59224 var arr = this.cTr.props; 59225 59226 for (i = 0; i < 16; i += 1) { 59227 arr[i] = transform[i]; 59228 } 59229 59230 if (forceRestore) { 59231 this.nativeContext.restore(); 59232 var prevStack = this.stack[this.cArrPos + 1]; 59233 this.appliedFillStyle = prevStack.fillStyle; 59234 this.appliedStrokeStyle = prevStack.strokeStyle; 59235 this.appliedLineWidth = prevStack.lineWidth; 59236 this.appliedLineCap = prevStack.lineCap; 59237 this.appliedLineJoin = prevStack.lineJoin; 59238 this.appliedMiterLimit = prevStack.miterLimit; 59239 } 59240 59241 this.nativeContext.setTransform(transform[0], transform[1], transform[4], transform[5], transform[12], transform[13]); 59242 59243 if (forceRestore || currentContext.opacity !== -1 && this.currentOpacity !== currentContext.opacity) { 59244 this.nativeContext.globalAlpha = currentContext.opacity; 59245 this.currentOpacity = currentContext.opacity; 59246 } 59247 59248 this.currentFillStyle = currentContext.fillStyle; 59249 this.currentStrokeStyle = currentContext.strokeStyle; 59250 this.currentLineWidth = currentContext.lineWidth; 59251 this.currentLineCap = currentContext.lineCap; 59252 this.currentLineJoin = currentContext.lineJoin; 59253 this.currentMiterLimit = currentContext.miterLimit; 59254 }; 59255 59256 CVContextData.prototype.save = function (saveOnNativeFlag) { 59257 if (saveOnNativeFlag) { 59258 this.nativeContext.save(); 59259 } 59260 59261 var props = this.cTr.props; 59262 59263 if (this._length <= this.cArrPos) { 59264 this.duplicate(); 59265 } 59266 59267 var currentStack = this.stack[this.cArrPos]; 59268 var i; 59269 59270 for (i = 0; i < 16; i += 1) { 59271 currentStack.transform[i] = props[i]; 59272 } 59273 59274 this.cArrPos += 1; 59275 var newStack = this.stack[this.cArrPos]; 59276 newStack.opacity = currentStack.opacity; 59277 newStack.fillStyle = currentStack.fillStyle; 59278 newStack.strokeStyle = currentStack.strokeStyle; 59279 newStack.lineWidth = currentStack.lineWidth; 59280 newStack.lineCap = currentStack.lineCap; 59281 newStack.lineJoin = currentStack.lineJoin; 59282 newStack.miterLimit = currentStack.miterLimit; 59283 }; 59284 59285 CVContextData.prototype.setOpacity = function (value) { 59286 this.stack[this.cArrPos].opacity = value; 59287 }; 59288 59289 CVContextData.prototype.setContext = function (value) { 59290 this.nativeContext = value; 59291 }; 59292 59293 CVContextData.prototype.fillStyle = function (value) { 59294 if (this.stack[this.cArrPos].fillStyle !== value) { 59295 this.currentFillStyle = value; 59296 this.stack[this.cArrPos].fillStyle = value; 59297 } 59298 }; 59299 59300 CVContextData.prototype.strokeStyle = function (value) { 59301 if (this.stack[this.cArrPos].strokeStyle !== value) { 59302 this.currentStrokeStyle = value; 59303 this.stack[this.cArrPos].strokeStyle = value; 59304 } 59305 }; 59306 59307 CVContextData.prototype.lineWidth = function (value) { 59308 if (this.stack[this.cArrPos].lineWidth !== value) { 59309 this.currentLineWidth = value; 59310 this.stack[this.cArrPos].lineWidth = value; 59311 } 59312 }; 59313 59314 CVContextData.prototype.lineCap = function (value) { 59315 if (this.stack[this.cArrPos].lineCap !== value) { 59316 this.currentLineCap = value; 59317 this.stack[this.cArrPos].lineCap = value; 59318 } 59319 }; 59320 59321 CVContextData.prototype.lineJoin = function (value) { 59322 if (this.stack[this.cArrPos].lineJoin !== value) { 59323 this.currentLineJoin = value; 59324 this.stack[this.cArrPos].lineJoin = value; 59325 } 59326 }; 59327 59328 CVContextData.prototype.miterLimit = function (value) { 59329 if (this.stack[this.cArrPos].miterLimit !== value) { 59330 this.currentMiterLimit = value; 59331 this.stack[this.cArrPos].miterLimit = value; 59332 } 59333 }; 59334 59335 CVContextData.prototype.transform = function (props) { 59336 this.transformMat.cloneFromProps(props); // Taking the last transform value from the stored stack of transforms 59337 59338 var currentTransform = this.cTr; // Applying the last transform value after the new transform to respect the order of transformations 59339 59340 this.transformMat.multiply(currentTransform); // Storing the new transformed value in the stored transform 59341 59342 currentTransform.cloneFromProps(this.transformMat.props); 59343 var trProps = currentTransform.props; // Applying the new transform to the canvas 59344 59345 this.nativeContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]); 59346 }; 59347 59348 CVContextData.prototype.opacity = function (op) { 59349 var currentOpacity = this.stack[this.cArrPos].opacity; 59350 currentOpacity *= op < 0 ? 0 : op; 59351 59352 if (this.stack[this.cArrPos].opacity !== currentOpacity) { 59353 if (this.currentOpacity !== op) { 59354 this.nativeContext.globalAlpha = op; 59355 this.currentOpacity = op; 59356 } 59357 59358 this.stack[this.cArrPos].opacity = currentOpacity; 59359 } 59360 }; 59361 59362 CVContextData.prototype.fill = function (rule) { 59363 if (this.appliedFillStyle !== this.currentFillStyle) { 59364 this.appliedFillStyle = this.currentFillStyle; 59365 this.nativeContext.fillStyle = this.appliedFillStyle; 59366 } 59367 59368 this.nativeContext.fill(rule); 59369 }; 59370 59371 CVContextData.prototype.fillRect = function (x, y, w, h) { 59372 if (this.appliedFillStyle !== this.currentFillStyle) { 59373 this.appliedFillStyle = this.currentFillStyle; 59374 this.nativeContext.fillStyle = this.appliedFillStyle; 59375 } 59376 59377 this.nativeContext.fillRect(x, y, w, h); 59378 }; 59379 59380 CVContextData.prototype.stroke = function () { 59381 if (this.appliedStrokeStyle !== this.currentStrokeStyle) { 59382 this.appliedStrokeStyle = this.currentStrokeStyle; 59383 this.nativeContext.strokeStyle = this.appliedStrokeStyle; 59384 } 59385 59386 if (this.appliedLineWidth !== this.currentLineWidth) { 59387 this.appliedLineWidth = this.currentLineWidth; 59388 this.nativeContext.lineWidth = this.appliedLineWidth; 59389 } 59390 59391 if (this.appliedLineCap !== this.currentLineCap) { 59392 this.appliedLineCap = this.currentLineCap; 59393 this.nativeContext.lineCap = this.appliedLineCap; 59394 } 59395 59396 if (this.appliedLineJoin !== this.currentLineJoin) { 59397 this.appliedLineJoin = this.currentLineJoin; 59398 this.nativeContext.lineJoin = this.appliedLineJoin; 59399 } 59400 59401 if (this.appliedMiterLimit !== this.currentMiterLimit) { 59402 this.appliedMiterLimit = this.currentMiterLimit; 59403 this.nativeContext.miterLimit = this.appliedMiterLimit; 59404 } 59405 59406 this.nativeContext.stroke(); 59407 }; 59408 59409 function CVCompElement(data, globalData, comp) { 59410 this.completeLayers = false; 59411 this.layers = data.layers; 59412 this.pendingElements = []; 59413 this.elements = createSizedArray(this.layers.length); 59414 this.initElement(data, globalData, comp); 59415 this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { 59416 _placeholder: true 59417 }; 59418 } 59419 59420 extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement); 59421 59422 CVCompElement.prototype.renderInnerContent = function () { 59423 var ctx = this.canvasContext; 59424 ctx.beginPath(); 59425 ctx.moveTo(0, 0); 59426 ctx.lineTo(this.data.w, 0); 59427 ctx.lineTo(this.data.w, this.data.h); 59428 ctx.lineTo(0, this.data.h); 59429 ctx.lineTo(0, 0); 59430 ctx.clip(); 59431 var i; 59432 var len = this.layers.length; 59433 59434 for (i = len - 1; i >= 0; i -= 1) { 59435 if (this.completeLayers || this.elements[i]) { 59436 this.elements[i].renderFrame(); 59437 } 59438 } 59439 }; 59440 59441 CVCompElement.prototype.destroy = function () { 59442 var i; 59443 var len = this.layers.length; 59444 59445 for (i = len - 1; i >= 0; i -= 1) { 59446 if (this.elements[i]) { 59447 this.elements[i].destroy(); 59448 } 59449 } 59450 59451 this.layers = null; 59452 this.elements = null; 59453 }; 59454 59455 CVCompElement.prototype.createComp = function (data) { 59456 return new CVCompElement(data, this.globalData, this); 59457 }; 59458 59459 function CanvasRenderer(animationItem, config) { 59460 this.animationItem = animationItem; 59461 this.renderConfig = { 59462 clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true, 59463 context: config && config.context || null, 59464 progressiveLoad: config && config.progressiveLoad || false, 59465 preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet', 59466 imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice', 59467 contentVisibility: config && config.contentVisibility || 'visible', 59468 className: config && config.className || '', 59469 id: config && config.id || '', 59470 runExpressions: !config || config.runExpressions === undefined || config.runExpressions 59471 }; 59472 this.renderConfig.dpr = config && config.dpr || 1; 59473 59474 if (this.animationItem.wrapper) { 59475 this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1; 59476 } 59477 59478 this.renderedFrame = -1; 59479 this.globalData = { 59480 frameNum: -1, 59481 _mdf: false, 59482 renderConfig: this.renderConfig, 59483 currentGlobalAlpha: -1 59484 }; 59485 this.contextData = new CVContextData(); 59486 this.elements = []; 59487 this.pendingElements = []; 59488 this.transformMat = new Matrix(); 59489 this.completeLayers = false; 59490 this.rendererType = 'canvas'; 59491 59492 if (this.renderConfig.clearCanvas) { 59493 this.ctxTransform = this.contextData.transform.bind(this.contextData); 59494 this.ctxOpacity = this.contextData.opacity.bind(this.contextData); 59495 this.ctxFillStyle = this.contextData.fillStyle.bind(this.contextData); 59496 this.ctxStrokeStyle = this.contextData.strokeStyle.bind(this.contextData); 59497 this.ctxLineWidth = this.contextData.lineWidth.bind(this.contextData); 59498 this.ctxLineCap = this.contextData.lineCap.bind(this.contextData); 59499 this.ctxLineJoin = this.contextData.lineJoin.bind(this.contextData); 59500 this.ctxMiterLimit = this.contextData.miterLimit.bind(this.contextData); 59501 this.ctxFill = this.contextData.fill.bind(this.contextData); 59502 this.ctxFillRect = this.contextData.fillRect.bind(this.contextData); 59503 this.ctxStroke = this.contextData.stroke.bind(this.contextData); 59504 this.save = this.contextData.save.bind(this.contextData); 59505 } 59506 } 59507 59508 extendPrototype([CanvasRendererBase], CanvasRenderer); 59509 59510 CanvasRenderer.prototype.createComp = function (data) { 59511 return new CVCompElement(data, this.globalData, this); 59512 }; 59513 59514 function HBaseElement() {} 59515 59516 HBaseElement.prototype = { 59517 checkBlendMode: function checkBlendMode() {}, 59518 initRendererElement: function initRendererElement() { 59519 this.baseElement = createTag(this.data.tg || 'div'); 59520 59521 if (this.data.hasMask) { 59522 this.svgElement = createNS('svg'); 59523 this.layerElement = createNS('g'); 59524 this.maskedElement = this.layerElement; 59525 this.svgElement.appendChild(this.layerElement); 59526 this.baseElement.appendChild(this.svgElement); 59527 } else { 59528 this.layerElement = this.baseElement; 59529 } 59530 59531 styleDiv(this.baseElement); 59532 }, 59533 createContainerElements: function createContainerElements() { 59534 this.renderableEffectsManager = new CVEffects(this); 59535 this.transformedElement = this.baseElement; 59536 this.maskedElement = this.layerElement; 59537 59538 if (this.data.ln) { 59539 this.layerElement.setAttribute('id', this.data.ln); 59540 } 59541 59542 if (this.data.cl) { 59543 this.layerElement.setAttribute('class', this.data.cl); 59544 } 59545 59546 if (this.data.bm !== 0) { 59547 this.setBlendMode(); 59548 } 59549 }, 59550 renderElement: function renderElement() { 59551 var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {}; 59552 59553 if (this.finalTransform._matMdf) { 59554 var matrixValue = this.finalTransform.mat.toCSS(); 59555 transformedElementStyle.transform = matrixValue; 59556 transformedElementStyle.webkitTransform = matrixValue; 59557 } 59558 59559 if (this.finalTransform._opMdf) { 59560 transformedElementStyle.opacity = this.finalTransform.mProp.o.v; 59561 } 59562 }, 59563 renderFrame: function renderFrame() { 59564 // If it is exported as hidden (data.hd === true) no need to render 59565 // If it is not visible no need to render 59566 if (this.data.hd || this.hidden) { 59567 return; 59568 } 59569 59570 this.renderTransform(); 59571 this.renderRenderable(); 59572 this.renderElement(); 59573 this.renderInnerContent(); 59574 59575 if (this._isFirstFrame) { 59576 this._isFirstFrame = false; 59577 } 59578 }, 59579 destroy: function destroy() { 59580 this.layerElement = null; 59581 this.transformedElement = null; 59582 59583 if (this.matteElement) { 59584 this.matteElement = null; 59585 } 59586 59587 if (this.maskManager) { 59588 this.maskManager.destroy(); 59589 this.maskManager = null; 59590 } 59591 }, 59592 createRenderableComponents: function createRenderableComponents() { 59593 this.maskManager = new MaskElement(this.data, this, this.globalData); 59594 }, 59595 addEffects: function addEffects() {}, 59596 setMatte: function setMatte() {} 59597 }; 59598 HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement; 59599 HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy; 59600 HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting; 59601 59602 function HSolidElement(data, globalData, comp) { 59603 this.initElement(data, globalData, comp); 59604 } 59605 59606 extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement); 59607 59608 HSolidElement.prototype.createContent = function () { 59609 var rect; 59610 59611 if (this.data.hasMask) { 59612 rect = createNS('rect'); 59613 rect.setAttribute('width', this.data.sw); 59614 rect.setAttribute('height', this.data.sh); 59615 rect.setAttribute('fill', this.data.sc); 59616 this.svgElement.setAttribute('width', this.data.sw); 59617 this.svgElement.setAttribute('height', this.data.sh); 59618 } else { 59619 rect = createTag('div'); 59620 rect.style.width = this.data.sw + 'px'; 59621 rect.style.height = this.data.sh + 'px'; 59622 rect.style.backgroundColor = this.data.sc; 59623 } 59624 59625 this.layerElement.appendChild(rect); 59626 }; 59627 59628 function HShapeElement(data, globalData, comp) { 59629 // List of drawable elements 59630 this.shapes = []; // Full shape data 59631 59632 this.shapesData = data.shapes; // List of styles that will be applied to shapes 59633 59634 this.stylesList = []; // List of modifiers that will be applied to shapes 59635 59636 this.shapeModifiers = []; // List of items in shape tree 59637 59638 this.itemsData = []; // List of items in previous shape tree 59639 59640 this.processedElements = []; // List of animated components 59641 59642 this.animatedContents = []; 59643 this.shapesContainer = createNS('g'); 59644 this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties. 59645 // List of elements that have been created 59646 59647 this.prevViewData = []; 59648 this.currentBBox = { 59649 x: 999999, 59650 y: -999999, 59651 h: 0, 59652 w: 0 59653 }; 59654 } 59655 59656 extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement); 59657 HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent; 59658 59659 HShapeElement.prototype.createContent = function () { 59660 var cont; 59661 this.baseElement.style.fontSize = 0; 59662 59663 if (this.data.hasMask) { 59664 this.layerElement.appendChild(this.shapesContainer); 59665 cont = this.svgElement; 59666 } else { 59667 cont = createNS('svg'); 59668 var size = this.comp.data ? this.comp.data : this.globalData.compSize; 59669 cont.setAttribute('width', size.w); 59670 cont.setAttribute('height', size.h); 59671 cont.appendChild(this.shapesContainer); 59672 this.layerElement.appendChild(cont); 59673 } 59674 59675 this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true); 59676 this.filterUniqueShapes(); 59677 this.shapeCont = cont; 59678 }; 59679 59680 HShapeElement.prototype.getTransformedPoint = function (transformers, point) { 59681 var i; 59682 var len = transformers.length; 59683 59684 for (i = 0; i < len; i += 1) { 59685 point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0); 59686 } 59687 59688 return point; 59689 }; 59690 59691 HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) { 59692 var shape = item.sh.v; 59693 var transformers = item.transformers; 59694 var i; 59695 var len = shape._length; 59696 var vPoint; 59697 var oPoint; 59698 var nextIPoint; 59699 var nextVPoint; 59700 59701 if (len <= 1) { 59702 return; 59703 } 59704 59705 for (i = 0; i < len - 1; i += 1) { 59706 vPoint = this.getTransformedPoint(transformers, shape.v[i]); 59707 oPoint = this.getTransformedPoint(transformers, shape.o[i]); 59708 nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]); 59709 nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]); 59710 this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox); 59711 } 59712 59713 if (shape.c) { 59714 vPoint = this.getTransformedPoint(transformers, shape.v[i]); 59715 oPoint = this.getTransformedPoint(transformers, shape.o[i]); 59716 nextIPoint = this.getTransformedPoint(transformers, shape.i[0]); 59717 nextVPoint = this.getTransformedPoint(transformers, shape.v[0]); 59718 this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox); 59719 } 59720 }; 59721 59722 HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) { 59723 this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint); 59724 var bounds = this.shapeBoundingBox; 59725 boundingBox.x = bmMin(bounds.left, boundingBox.x); 59726 boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax); 59727 boundingBox.y = bmMin(bounds.top, boundingBox.y); 59728 boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax); 59729 }; 59730 59731 HShapeElement.prototype.shapeBoundingBox = { 59732 left: 0, 59733 right: 0, 59734 top: 0, 59735 bottom: 0 59736 }; 59737 HShapeElement.prototype.tempBoundingBox = { 59738 x: 0, 59739 xMax: 0, 59740 y: 0, 59741 yMax: 0, 59742 width: 0, 59743 height: 0 59744 }; 59745 59746 HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) { 59747 var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]]; 59748 59749 for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) { 59750 // eslint-disable-line no-plusplus 59751 b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; 59752 a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; 59753 c = 3 * p1[i] - 3 * p0[i]; 59754 b |= 0; // eslint-disable-line no-bitwise 59755 59756 a |= 0; // eslint-disable-line no-bitwise 59757 59758 c |= 0; // eslint-disable-line no-bitwise 59759 59760 if (a === 0 && b === 0) {// 59761 } else if (a === 0) { 59762 t = -c / b; 59763 59764 if (t > 0 && t < 1) { 59765 bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i)); 59766 } 59767 } else { 59768 b2ac = b * b - 4 * c * a; 59769 59770 if (b2ac >= 0) { 59771 t1 = (-b + bmSqrt(b2ac)) / (2 * a); 59772 if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i)); 59773 t2 = (-b - bmSqrt(b2ac)) / (2 * a); 59774 if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i)); 59775 } 59776 } 59777 } 59778 59779 this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]); 59780 this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]); 59781 this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]); 59782 this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]); 59783 }; 59784 59785 HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) { 59786 return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i]; 59787 }; 59788 59789 HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) { 59790 var i; 59791 var len = itemsData.length; 59792 59793 for (i = 0; i < len; i += 1) { 59794 if (itemsData[i] && itemsData[i].sh) { 59795 this.calculateShapeBoundingBox(itemsData[i], boundingBox); 59796 } else if (itemsData[i] && itemsData[i].it) { 59797 this.calculateBoundingBox(itemsData[i].it, boundingBox); 59798 } else if (itemsData[i] && itemsData[i].style && itemsData[i].w) { 59799 this.expandStrokeBoundingBox(itemsData[i].w, boundingBox); 59800 } 59801 } 59802 }; 59803 59804 HShapeElement.prototype.expandStrokeBoundingBox = function (widthProperty, boundingBox) { 59805 var width = 0; 59806 59807 if (widthProperty.keyframes) { 59808 for (var i = 0; i < widthProperty.keyframes.length; i += 1) { 59809 var kfw = widthProperty.keyframes[i].s; 59810 59811 if (kfw > width) { 59812 width = kfw; 59813 } 59814 } 59815 59816 width *= widthProperty.mult; 59817 } else { 59818 width = widthProperty.v * widthProperty.mult; 59819 } 59820 59821 boundingBox.x -= width; 59822 boundingBox.xMax += width; 59823 boundingBox.y -= width; 59824 boundingBox.yMax += width; 59825 }; 59826 59827 HShapeElement.prototype.currentBoxContains = function (box) { 59828 return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height; 59829 }; 59830 59831 HShapeElement.prototype.renderInnerContent = function () { 59832 this._renderShapeFrame(); 59833 59834 if (!this.hidden && (this._isFirstFrame || this._mdf)) { 59835 var tempBoundingBox = this.tempBoundingBox; 59836 var max = 999999; 59837 tempBoundingBox.x = max; 59838 tempBoundingBox.xMax = -max; 59839 tempBoundingBox.y = max; 59840 tempBoundingBox.yMax = -max; 59841 this.calculateBoundingBox(this.itemsData, tempBoundingBox); 59842 tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x; 59843 tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox(); 59844 59845 if (this.currentBoxContains(tempBoundingBox)) { 59846 return; 59847 } 59848 59849 var changed = false; 59850 59851 if (this.currentBBox.w !== tempBoundingBox.width) { 59852 this.currentBBox.w = tempBoundingBox.width; 59853 this.shapeCont.setAttribute('width', tempBoundingBox.width); 59854 changed = true; 59855 } 59856 59857 if (this.currentBBox.h !== tempBoundingBox.height) { 59858 this.currentBBox.h = tempBoundingBox.height; 59859 this.shapeCont.setAttribute('height', tempBoundingBox.height); 59860 changed = true; 59861 } 59862 59863 if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) { 59864 this.currentBBox.w = tempBoundingBox.width; 59865 this.currentBBox.h = tempBoundingBox.height; 59866 this.currentBBox.x = tempBoundingBox.x; 59867 this.currentBBox.y = tempBoundingBox.y; 59868 this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h); 59869 var shapeStyle = this.shapeCont.style; 59870 var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)'; 59871 shapeStyle.transform = shapeTransform; 59872 shapeStyle.webkitTransform = shapeTransform; 59873 } 59874 } 59875 }; 59876 59877 function HTextElement(data, globalData, comp) { 59878 this.textSpans = []; 59879 this.textPaths = []; 59880 this.currentBBox = { 59881 x: 999999, 59882 y: -999999, 59883 h: 0, 59884 w: 0 59885 }; 59886 this.renderType = 'svg'; 59887 this.isMasked = false; 59888 this.initElement(data, globalData, comp); 59889 } 59890 59891 extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement); 59892 59893 HTextElement.prototype.createContent = function () { 59894 this.isMasked = this.checkMasks(); 59895 59896 if (this.isMasked) { 59897 this.renderType = 'svg'; 59898 this.compW = this.comp.data.w; 59899 this.compH = this.comp.data.h; 59900 this.svgElement.setAttribute('width', this.compW); 59901 this.svgElement.setAttribute('height', this.compH); 59902 var g = createNS('g'); 59903 this.maskedElement.appendChild(g); 59904 this.innerElem = g; 59905 } else { 59906 this.renderType = 'html'; 59907 this.innerElem = this.layerElement; 59908 } 59909 59910 this.checkParenting(); 59911 }; 59912 59913 HTextElement.prototype.buildNewText = function () { 59914 var documentData = this.textProperty.currentData; 59915 this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0); 59916 var innerElemStyle = this.innerElem.style; 59917 var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)'; 59918 innerElemStyle.fill = textColor; 59919 innerElemStyle.color = textColor; 59920 59921 if (documentData.sc) { 59922 innerElemStyle.stroke = this.buildColor(documentData.sc); 59923 innerElemStyle.strokeWidth = documentData.sw + 'px'; 59924 } 59925 59926 var fontData = this.globalData.fontManager.getFontByName(documentData.f); 59927 59928 if (!this.globalData.fontManager.chars) { 59929 innerElemStyle.fontSize = documentData.finalSize + 'px'; 59930 innerElemStyle.lineHeight = documentData.finalSize + 'px'; 59931 59932 if (fontData.fClass) { 59933 this.innerElem.className = fontData.fClass; 59934 } else { 59935 innerElemStyle.fontFamily = fontData.fFamily; 59936 var fWeight = documentData.fWeight; 59937 var fStyle = documentData.fStyle; 59938 innerElemStyle.fontStyle = fStyle; 59939 innerElemStyle.fontWeight = fWeight; 59940 } 59941 } 59942 59943 var i; 59944 var len; 59945 var letters = documentData.l; 59946 len = letters.length; 59947 var tSpan; 59948 var tParent; 59949 var tCont; 59950 var matrixHelper = this.mHelper; 59951 var shapes; 59952 var shapeStr = ''; 59953 var cnt = 0; 59954 59955 for (i = 0; i < len; i += 1) { 59956 if (this.globalData.fontManager.chars) { 59957 if (!this.textPaths[cnt]) { 59958 tSpan = createNS('path'); 59959 tSpan.setAttribute('stroke-linecap', lineCapEnum[1]); 59960 tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]); 59961 tSpan.setAttribute('stroke-miterlimit', '4'); 59962 } else { 59963 tSpan = this.textPaths[cnt]; 59964 } 59965 59966 if (!this.isMasked) { 59967 if (this.textSpans[cnt]) { 59968 tParent = this.textSpans[cnt]; 59969 tCont = tParent.children[0]; 59970 } else { 59971 tParent = createTag('div'); 59972 tParent.style.lineHeight = 0; 59973 tCont = createNS('svg'); 59974 tCont.appendChild(tSpan); 59975 styleDiv(tParent); 59976 } 59977 } 59978 } else if (!this.isMasked) { 59979 if (this.textSpans[cnt]) { 59980 tParent = this.textSpans[cnt]; 59981 tSpan = this.textPaths[cnt]; 59982 } else { 59983 tParent = createTag('span'); 59984 styleDiv(tParent); 59985 tSpan = createTag('span'); 59986 styleDiv(tSpan); 59987 tParent.appendChild(tSpan); 59988 } 59989 } else { 59990 tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text'); 59991 } // tSpan.setAttribute('visibility', 'hidden'); 59992 59993 59994 if (this.globalData.fontManager.chars) { 59995 var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily); 59996 var shapeData; 59997 59998 if (charData) { 59999 shapeData = charData.data; 60000 } else { 60001 shapeData = null; 60002 } 60003 60004 matrixHelper.reset(); 60005 60006 if (shapeData && shapeData.shapes && shapeData.shapes.length) { 60007 shapes = shapeData.shapes[0].it; 60008 matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100); 60009 shapeStr = this.createPathShape(matrixHelper, shapes); 60010 tSpan.setAttribute('d', shapeStr); 60011 } 60012 60013 if (!this.isMasked) { 60014 this.innerElem.appendChild(tParent); 60015 60016 if (shapeData && shapeData.shapes) { 60017 // document.body.appendChild is needed to get exact measure of shape 60018 document.body.appendChild(tCont); 60019 var boundingBox = tCont.getBBox(); 60020 tCont.setAttribute('width', boundingBox.width + 2); 60021 tCont.setAttribute('height', boundingBox.height + 2); 60022 tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2)); 60023 var tContStyle = tCont.style; 60024 var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)'; 60025 tContStyle.transform = tContTranslation; 60026 tContStyle.webkitTransform = tContTranslation; 60027 letters[i].yOffset = boundingBox.y - 1; 60028 } else { 60029 tCont.setAttribute('width', 1); 60030 tCont.setAttribute('height', 1); 60031 } 60032 60033 tParent.appendChild(tCont); 60034 } else { 60035 this.innerElem.appendChild(tSpan); 60036 } 60037 } else { 60038 tSpan.textContent = letters[i].val; 60039 tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); 60040 60041 if (!this.isMasked) { 60042 this.innerElem.appendChild(tParent); // 60043 60044 var tStyle = tSpan.style; 60045 var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)'; 60046 tStyle.transform = tSpanTranslation; 60047 tStyle.webkitTransform = tSpanTranslation; 60048 } else { 60049 this.innerElem.appendChild(tSpan); 60050 } 60051 } // 60052 60053 60054 if (!this.isMasked) { 60055 this.textSpans[cnt] = tParent; 60056 } else { 60057 this.textSpans[cnt] = tSpan; 60058 } 60059 60060 this.textSpans[cnt].style.display = 'block'; 60061 this.textPaths[cnt] = tSpan; 60062 cnt += 1; 60063 } 60064 60065 while (cnt < this.textSpans.length) { 60066 this.textSpans[cnt].style.display = 'none'; 60067 cnt += 1; 60068 } 60069 }; 60070 60071 HTextElement.prototype.renderInnerContent = function () { 60072 this.validateText(); 60073 var svgStyle; 60074 60075 if (this.data.singleShape) { 60076 if (!this._isFirstFrame && !this.lettersChangedFlag) { 60077 return; 60078 } 60079 60080 if (this.isMasked && this.finalTransform._matMdf) { 60081 // Todo Benchmark if using this is better than getBBox 60082 this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH); 60083 svgStyle = this.svgElement.style; 60084 var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)'; 60085 svgStyle.transform = translation; 60086 svgStyle.webkitTransform = translation; 60087 } 60088 } 60089 60090 this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); 60091 60092 if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) { 60093 return; 60094 } 60095 60096 var i; 60097 var len; 60098 var count = 0; 60099 var renderedLetters = this.textAnimator.renderedLetters; 60100 var letters = this.textProperty.currentData.l; 60101 len = letters.length; 60102 var renderedLetter; 60103 var textSpan; 60104 var textPath; 60105 60106 for (i = 0; i < len; i += 1) { 60107 if (letters[i].n) { 60108 count += 1; 60109 } else { 60110 textSpan = this.textSpans[i]; 60111 textPath = this.textPaths[i]; 60112 renderedLetter = renderedLetters[count]; 60113 count += 1; 60114 60115 if (renderedLetter._mdf.m) { 60116 if (!this.isMasked) { 60117 textSpan.style.webkitTransform = renderedLetter.m; 60118 textSpan.style.transform = renderedLetter.m; 60119 } else { 60120 textSpan.setAttribute('transform', renderedLetter.m); 60121 } 60122 } /// /textSpan.setAttribute('opacity',renderedLetter.o); 60123 60124 60125 textSpan.style.opacity = renderedLetter.o; 60126 60127 if (renderedLetter.sw && renderedLetter._mdf.sw) { 60128 textPath.setAttribute('stroke-width', renderedLetter.sw); 60129 } 60130 60131 if (renderedLetter.sc && renderedLetter._mdf.sc) { 60132 textPath.setAttribute('stroke', renderedLetter.sc); 60133 } 60134 60135 if (renderedLetter.fc && renderedLetter._mdf.fc) { 60136 textPath.setAttribute('fill', renderedLetter.fc); 60137 textPath.style.color = renderedLetter.fc; 60138 } 60139 } 60140 } 60141 60142 if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) { 60143 var boundingBox = this.innerElem.getBBox(); 60144 60145 if (this.currentBBox.w !== boundingBox.width) { 60146 this.currentBBox.w = boundingBox.width; 60147 this.svgElement.setAttribute('width', boundingBox.width); 60148 } 60149 60150 if (this.currentBBox.h !== boundingBox.height) { 60151 this.currentBBox.h = boundingBox.height; 60152 this.svgElement.setAttribute('height', boundingBox.height); 60153 } 60154 60155 var margin = 1; 60156 60157 if (this.currentBBox.w !== boundingBox.width + margin * 2 || this.currentBBox.h !== boundingBox.height + margin * 2 || this.currentBBox.x !== boundingBox.x - margin || this.currentBBox.y !== boundingBox.y - margin) { 60158 this.currentBBox.w = boundingBox.width + margin * 2; 60159 this.currentBBox.h = boundingBox.height + margin * 2; 60160 this.currentBBox.x = boundingBox.x - margin; 60161 this.currentBBox.y = boundingBox.y - margin; 60162 this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h); 60163 svgStyle = this.svgElement.style; 60164 var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)'; 60165 svgStyle.transform = svgTransform; 60166 svgStyle.webkitTransform = svgTransform; 60167 } 60168 } 60169 }; 60170 60171 function HCameraElement(data, globalData, comp) { 60172 this.initFrame(); 60173 this.initBaseData(data, globalData, comp); 60174 this.initHierarchy(); 60175 var getProp = PropertyFactory.getProp; 60176 this.pe = getProp(this, data.pe, 0, 0, this); 60177 60178 if (data.ks.p.s) { 60179 this.px = getProp(this, data.ks.p.x, 1, 0, this); 60180 this.py = getProp(this, data.ks.p.y, 1, 0, this); 60181 this.pz = getProp(this, data.ks.p.z, 1, 0, this); 60182 } else { 60183 this.p = getProp(this, data.ks.p, 1, 0, this); 60184 } 60185 60186 if (data.ks.a) { 60187 this.a = getProp(this, data.ks.a, 1, 0, this); 60188 } 60189 60190 if (data.ks.or.k.length && data.ks.or.k[0].to) { 60191 var i; 60192 var len = data.ks.or.k.length; 60193 60194 for (i = 0; i < len; i += 1) { 60195 data.ks.or.k[i].to = null; 60196 data.ks.or.k[i].ti = null; 60197 } 60198 } 60199 60200 this.or = getProp(this, data.ks.or, 1, degToRads, this); 60201 this.or.sh = true; 60202 this.rx = getProp(this, data.ks.rx, 0, degToRads, this); 60203 this.ry = getProp(this, data.ks.ry, 0, degToRads, this); 60204 this.rz = getProp(this, data.ks.rz, 0, degToRads, this); 60205 this.mat = new Matrix(); 60206 this._prevMat = new Matrix(); 60207 this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface. 60208 60209 this.finalTransform = { 60210 mProp: this 60211 }; 60212 } 60213 60214 extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement); 60215 60216 HCameraElement.prototype.setup = function () { 60217 var i; 60218 var len = this.comp.threeDElements.length; 60219 var comp; 60220 var perspectiveStyle; 60221 var containerStyle; 60222 60223 for (i = 0; i < len; i += 1) { 60224 // [perspectiveElem,container] 60225 comp = this.comp.threeDElements[i]; 60226 60227 if (comp.type === '3d') { 60228 perspectiveStyle = comp.perspectiveElem.style; 60229 containerStyle = comp.container.style; 60230 var perspective = this.pe.v + 'px'; 60231 var origin = '0px 0px 0px'; 60232 var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)'; 60233 perspectiveStyle.perspective = perspective; 60234 perspectiveStyle.webkitPerspective = perspective; 60235 containerStyle.transformOrigin = origin; 60236 containerStyle.mozTransformOrigin = origin; 60237 containerStyle.webkitTransformOrigin = origin; 60238 perspectiveStyle.transform = matrix; 60239 perspectiveStyle.webkitTransform = matrix; 60240 } 60241 } 60242 }; 60243 60244 HCameraElement.prototype.createElements = function () {}; 60245 60246 HCameraElement.prototype.hide = function () {}; 60247 60248 HCameraElement.prototype.renderFrame = function () { 60249 var _mdf = this._isFirstFrame; 60250 var i; 60251 var len; 60252 60253 if (this.hierarchy) { 60254 len = this.hierarchy.length; 60255 60256 for (i = 0; i < len; i += 1) { 60257 _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf; 60258 } 60259 } 60260 60261 if (_mdf || 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) { 60262 this.mat.reset(); 60263 60264 if (this.hierarchy) { 60265 len = this.hierarchy.length - 1; 60266 60267 for (i = len; i >= 0; i -= 1) { 60268 var mTransf = this.hierarchy[i].finalTransform.mProp; 60269 this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]); 60270 this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]); 60271 this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v); 60272 this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]); 60273 this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]); 60274 } 60275 } 60276 60277 if (this.p) { 60278 this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]); 60279 } else { 60280 this.mat.translate(-this.px.v, -this.py.v, this.pz.v); 60281 } 60282 60283 if (this.a) { 60284 var diffVector; 60285 60286 if (this.p) { 60287 diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]]; 60288 } else { 60289 diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]]; 60290 } 60291 60292 var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v)); 60293 60294 var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag]; 60295 var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]); 60296 var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ); 60297 var mRotationY = Math.atan2(lookDir[0], -lookDir[2]); 60298 this.mat.rotateY(mRotationY).rotateX(-mRotationX); 60299 } 60300 60301 this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v); 60302 this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]); 60303 this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0); 60304 this.mat.translate(0, 0, this.pe.v); 60305 var hasMatrixChanged = !this._prevMat.equals(this.mat); 60306 60307 if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) { 60308 len = this.comp.threeDElements.length; 60309 var comp; 60310 var perspectiveStyle; 60311 var containerStyle; 60312 60313 for (i = 0; i < len; i += 1) { 60314 comp = this.comp.threeDElements[i]; 60315 60316 if (comp.type === '3d') { 60317 if (hasMatrixChanged) { 60318 var matValue = this.mat.toCSS(); 60319 containerStyle = comp.container.style; 60320 containerStyle.transform = matValue; 60321 containerStyle.webkitTransform = matValue; 60322 } 60323 60324 if (this.pe._mdf) { 60325 perspectiveStyle = comp.perspectiveElem.style; 60326 perspectiveStyle.perspective = this.pe.v + 'px'; 60327 perspectiveStyle.webkitPerspective = this.pe.v + 'px'; 60328 } 60329 } 60330 } 60331 60332 this.mat.clone(this._prevMat); 60333 } 60334 } 60335 60336 this._isFirstFrame = false; 60337 }; 60338 60339 HCameraElement.prototype.prepareFrame = function (num) { 60340 this.prepareProperties(num, true); 60341 }; 60342 60343 HCameraElement.prototype.destroy = function () {}; 60344 60345 HCameraElement.prototype.getBaseElement = function () { 60346 return null; 60347 }; 60348 60349 function HImageElement(data, globalData, comp) { 60350 this.assetData = globalData.getAssetData(data.refId); 60351 this.initElement(data, globalData, comp); 60352 } 60353 60354 extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement); 60355 60356 HImageElement.prototype.createContent = function () { 60357 var assetPath = this.globalData.getAssetsPath(this.assetData); 60358 var img = new Image(); 60359 60360 if (this.data.hasMask) { 60361 this.imageElem = createNS('image'); 60362 this.imageElem.setAttribute('width', this.assetData.w + 'px'); 60363 this.imageElem.setAttribute('height', this.assetData.h + 'px'); 60364 this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath); 60365 this.layerElement.appendChild(this.imageElem); 60366 this.baseElement.setAttribute('width', this.assetData.w); 60367 this.baseElement.setAttribute('height', this.assetData.h); 60368 } else { 60369 this.layerElement.appendChild(img); 60370 } 60371 60372 img.crossOrigin = 'anonymous'; 60373 img.src = assetPath; 60374 60375 if (this.data.ln) { 60376 this.baseElement.setAttribute('id', this.data.ln); 60377 } 60378 }; 60379 60380 function HybridRendererBase(animationItem, config) { 60381 this.animationItem = animationItem; 60382 this.layers = null; 60383 this.renderedFrame = -1; 60384 this.renderConfig = { 60385 className: config && config.className || '', 60386 imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice', 60387 hideOnTransparent: !(config && config.hideOnTransparent === false), 60388 filterSize: { 60389 width: config && config.filterSize && config.filterSize.width || '400%', 60390 height: config && config.filterSize && config.filterSize.height || '400%', 60391 x: config && config.filterSize && config.filterSize.x || '-100%', 60392 y: config && config.filterSize && config.filterSize.y || '-100%' 60393 } 60394 }; 60395 this.globalData = { 60396 _mdf: false, 60397 frameNum: -1, 60398 renderConfig: this.renderConfig 60399 }; 60400 this.pendingElements = []; 60401 this.elements = []; 60402 this.threeDElements = []; 60403 this.destroyed = false; 60404 this.camera = null; 60405 this.supports3d = true; 60406 this.rendererType = 'html'; 60407 } 60408 60409 extendPrototype([BaseRenderer], HybridRendererBase); 60410 HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem; 60411 60412 HybridRendererBase.prototype.checkPendingElements = function () { 60413 while (this.pendingElements.length) { 60414 var element = this.pendingElements.pop(); 60415 element.checkParenting(); 60416 } 60417 }; 60418 60419 HybridRendererBase.prototype.appendElementInPos = function (element, pos) { 60420 var newDOMElement = element.getBaseElement(); 60421 60422 if (!newDOMElement) { 60423 return; 60424 } 60425 60426 var layer = this.layers[pos]; 60427 60428 if (!layer.ddd || !this.supports3d) { 60429 if (this.threeDElements) { 60430 this.addTo3dContainer(newDOMElement, pos); 60431 } else { 60432 var i = 0; 60433 var nextDOMElement; 60434 var nextLayer; 60435 var tmpDOMElement; 60436 60437 while (i < pos) { 60438 if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) { 60439 nextLayer = this.elements[i]; 60440 tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement(); 60441 nextDOMElement = tmpDOMElement || nextDOMElement; 60442 } 60443 60444 i += 1; 60445 } 60446 60447 if (nextDOMElement) { 60448 if (!layer.ddd || !this.supports3d) { 60449 this.layerElement.insertBefore(newDOMElement, nextDOMElement); 60450 } 60451 } else if (!layer.ddd || !this.supports3d) { 60452 this.layerElement.appendChild(newDOMElement); 60453 } 60454 } 60455 } else { 60456 this.addTo3dContainer(newDOMElement, pos); 60457 } 60458 }; 60459 60460 HybridRendererBase.prototype.createShape = function (data) { 60461 if (!this.supports3d) { 60462 return new SVGShapeElement(data, this.globalData, this); 60463 } 60464 60465 return new HShapeElement(data, this.globalData, this); 60466 }; 60467 60468 HybridRendererBase.prototype.createText = function (data) { 60469 if (!this.supports3d) { 60470 return new SVGTextLottieElement(data, this.globalData, this); 60471 } 60472 60473 return new HTextElement(data, this.globalData, this); 60474 }; 60475 60476 HybridRendererBase.prototype.createCamera = function (data) { 60477 this.camera = new HCameraElement(data, this.globalData, this); 60478 return this.camera; 60479 }; 60480 60481 HybridRendererBase.prototype.createImage = function (data) { 60482 if (!this.supports3d) { 60483 return new IImageElement(data, this.globalData, this); 60484 } 60485 60486 return new HImageElement(data, this.globalData, this); 60487 }; 60488 60489 HybridRendererBase.prototype.createSolid = function (data) { 60490 if (!this.supports3d) { 60491 return new ISolidElement(data, this.globalData, this); 60492 } 60493 60494 return new HSolidElement(data, this.globalData, this); 60495 }; 60496 60497 HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull; 60498 60499 HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) { 60500 var i = 0; 60501 var len = this.threeDElements.length; 60502 60503 while (i < len) { 60504 if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) { 60505 return this.threeDElements[i].perspectiveElem; 60506 } 60507 60508 i += 1; 60509 } 60510 60511 return null; 60512 }; 60513 60514 HybridRendererBase.prototype.createThreeDContainer = function (pos, type) { 60515 var perspectiveElem = createTag('div'); 60516 var style; 60517 var containerStyle; 60518 styleDiv(perspectiveElem); 60519 var container = createTag('div'); 60520 styleDiv(container); 60521 60522 if (type === '3d') { 60523 style = perspectiveElem.style; 60524 style.width = this.globalData.compSize.w + 'px'; 60525 style.height = this.globalData.compSize.h + 'px'; 60526 var center = '50% 50%'; 60527 style.webkitTransformOrigin = center; 60528 style.mozTransformOrigin = center; 60529 style.transformOrigin = center; 60530 containerStyle = container.style; 60531 var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)'; 60532 containerStyle.transform = matrix; 60533 containerStyle.webkitTransform = matrix; 60534 } 60535 60536 perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem); 60537 60538 var threeDContainerData = { 60539 container: container, 60540 perspectiveElem: perspectiveElem, 60541 startPos: pos, 60542 endPos: pos, 60543 type: type 60544 }; 60545 this.threeDElements.push(threeDContainerData); 60546 return threeDContainerData; 60547 }; 60548 60549 HybridRendererBase.prototype.build3dContainers = function () { 60550 var i; 60551 var len = this.layers.length; 60552 var lastThreeDContainerData; 60553 var currentContainer = ''; 60554 60555 for (i = 0; i < len; i += 1) { 60556 if (this.layers[i].ddd && this.layers[i].ty !== 3) { 60557 if (currentContainer !== '3d') { 60558 currentContainer = '3d'; 60559 lastThreeDContainerData = this.createThreeDContainer(i, '3d'); 60560 } 60561 60562 lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i); 60563 } else { 60564 if (currentContainer !== '2d') { 60565 currentContainer = '2d'; 60566 lastThreeDContainerData = this.createThreeDContainer(i, '2d'); 60567 } 60568 60569 lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i); 60570 } 60571 } 60572 60573 len = this.threeDElements.length; 60574 60575 for (i = len - 1; i >= 0; i -= 1) { 60576 this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem); 60577 } 60578 }; 60579 60580 HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) { 60581 var i = 0; 60582 var len = this.threeDElements.length; 60583 60584 while (i < len) { 60585 if (pos <= this.threeDElements[i].endPos) { 60586 var j = this.threeDElements[i].startPos; 60587 var nextElement; 60588 60589 while (j < pos) { 60590 if (this.elements[j] && this.elements[j].getBaseElement) { 60591 nextElement = this.elements[j].getBaseElement(); 60592 } 60593 60594 j += 1; 60595 } 60596 60597 if (nextElement) { 60598 this.threeDElements[i].container.insertBefore(elem, nextElement); 60599 } else { 60600 this.threeDElements[i].container.appendChild(elem); 60601 } 60602 60603 break; 60604 } 60605 60606 i += 1; 60607 } 60608 }; 60609 60610 HybridRendererBase.prototype.configAnimation = function (animData) { 60611 var resizerElem = createTag('div'); 60612 var wrapper = this.animationItem.wrapper; 60613 var style = resizerElem.style; 60614 style.width = animData.w + 'px'; 60615 style.height = animData.h + 'px'; 60616 this.resizerElem = resizerElem; 60617 styleDiv(resizerElem); 60618 style.transformStyle = 'flat'; 60619 style.mozTransformStyle = 'flat'; 60620 style.webkitTransformStyle = 'flat'; 60621 60622 if (this.renderConfig.className) { 60623 resizerElem.setAttribute('class', this.renderConfig.className); 60624 } 60625 60626 wrapper.appendChild(resizerElem); 60627 style.overflow = 'hidden'; 60628 var svg = createNS('svg'); 60629 svg.setAttribute('width', '1'); 60630 svg.setAttribute('height', '1'); 60631 styleDiv(svg); 60632 this.resizerElem.appendChild(svg); 60633 var defs = createNS('defs'); 60634 svg.appendChild(defs); 60635 this.data = animData; // Mask animation 60636 60637 this.setupGlobalData(animData, svg); 60638 this.globalData.defs = defs; 60639 this.layers = animData.layers; 60640 this.layerElement = this.resizerElem; 60641 this.build3dContainers(); 60642 this.updateContainerSize(); 60643 }; 60644 60645 HybridRendererBase.prototype.destroy = function () { 60646 if (this.animationItem.wrapper) { 60647 this.animationItem.wrapper.innerText = ''; 60648 } 60649 60650 this.animationItem.container = null; 60651 this.globalData.defs = null; 60652 var i; 60653 var len = this.layers ? this.layers.length : 0; 60654 60655 for (i = 0; i < len; i += 1) { 60656 if (this.elements[i] && this.elements[i].destroy) { 60657 this.elements[i].destroy(); 60658 } 60659 } 60660 60661 this.elements.length = 0; 60662 this.destroyed = true; 60663 this.animationItem = null; 60664 }; 60665 60666 HybridRendererBase.prototype.updateContainerSize = function () { 60667 var elementWidth = this.animationItem.wrapper.offsetWidth; 60668 var elementHeight = this.animationItem.wrapper.offsetHeight; 60669 var elementRel = elementWidth / elementHeight; 60670 var animationRel = this.globalData.compSize.w / this.globalData.compSize.h; 60671 var sx; 60672 var sy; 60673 var tx; 60674 var ty; 60675 60676 if (animationRel > elementRel) { 60677 sx = elementWidth / this.globalData.compSize.w; 60678 sy = elementWidth / this.globalData.compSize.w; 60679 tx = 0; 60680 ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2; 60681 } else { 60682 sx = elementHeight / this.globalData.compSize.h; 60683 sy = elementHeight / this.globalData.compSize.h; 60684 tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2; 60685 ty = 0; 60686 } 60687 60688 var style = this.resizerElem.style; 60689 style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)'; 60690 style.transform = style.webkitTransform; 60691 }; 60692 60693 HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame; 60694 60695 HybridRendererBase.prototype.hide = function () { 60696 this.resizerElem.style.display = 'none'; 60697 }; 60698 60699 HybridRendererBase.prototype.show = function () { 60700 this.resizerElem.style.display = 'block'; 60701 }; 60702 60703 HybridRendererBase.prototype.initItems = function () { 60704 this.buildAllItems(); 60705 60706 if (this.camera) { 60707 this.camera.setup(); 60708 } else { 60709 var cWidth = this.globalData.compSize.w; 60710 var cHeight = this.globalData.compSize.h; 60711 var i; 60712 var len = this.threeDElements.length; 60713 60714 for (i = 0; i < len; i += 1) { 60715 var style = this.threeDElements[i].perspectiveElem.style; 60716 style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px'; 60717 style.perspective = style.webkitPerspective; 60718 } 60719 } 60720 }; 60721 60722 HybridRendererBase.prototype.searchExtraCompositions = function (assets) { 60723 var i; 60724 var len = assets.length; 60725 var floatingContainer = createTag('div'); 60726 60727 for (i = 0; i < len; i += 1) { 60728 if (assets[i].xt) { 60729 var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null); 60730 comp.initExpressions(); 60731 this.globalData.projectInterface.registerComposition(comp); 60732 } 60733 } 60734 }; 60735 60736 function HCompElement(data, globalData, comp) { 60737 this.layers = data.layers; 60738 this.supports3d = !data.hasMask; 60739 this.completeLayers = false; 60740 this.pendingElements = []; 60741 this.elements = this.layers ? createSizedArray(this.layers.length) : []; 60742 this.initElement(data, globalData, comp); 60743 this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { 60744 _placeholder: true 60745 }; 60746 } 60747 60748 extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement); 60749 HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements; 60750 60751 HCompElement.prototype.createContainerElements = function () { 60752 this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)'; 60753 60754 60755 if (this.data.hasMask) { 60756 this.svgElement.setAttribute('width', this.data.w); 60757 this.svgElement.setAttribute('height', this.data.h); 60758 this.transformedElement = this.baseElement; 60759 } else { 60760 this.transformedElement = this.layerElement; 60761 } 60762 }; 60763 60764 HCompElement.prototype.addTo3dContainer = function (elem, pos) { 60765 var j = 0; 60766 var nextElement; 60767 60768 while (j < pos) { 60769 if (this.elements[j] && this.elements[j].getBaseElement) { 60770 nextElement = this.elements[j].getBaseElement(); 60771 } 60772 60773 j += 1; 60774 } 60775 60776 if (nextElement) { 60777 this.layerElement.insertBefore(elem, nextElement); 60778 } else { 60779 this.layerElement.appendChild(elem); 60780 } 60781 }; 60782 60783 HCompElement.prototype.createComp = function (data) { 60784 if (!this.supports3d) { 60785 return new SVGCompElement(data, this.globalData, this); 60786 } 60787 60788 return new HCompElement(data, this.globalData, this); 60789 }; 60790 60791 function HybridRenderer(animationItem, config) { 60792 this.animationItem = animationItem; 60793 this.layers = null; 60794 this.renderedFrame = -1; 60795 this.renderConfig = { 60796 className: config && config.className || '', 60797 imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice', 60798 hideOnTransparent: !(config && config.hideOnTransparent === false), 60799 filterSize: { 60800 width: config && config.filterSize && config.filterSize.width || '400%', 60801 height: config && config.filterSize && config.filterSize.height || '400%', 60802 x: config && config.filterSize && config.filterSize.x || '-100%', 60803 y: config && config.filterSize && config.filterSize.y || '-100%' 60804 }, 60805 runExpressions: !config || config.runExpressions === undefined || config.runExpressions 60806 }; 60807 this.globalData = { 60808 _mdf: false, 60809 frameNum: -1, 60810 renderConfig: this.renderConfig 60811 }; 60812 this.pendingElements = []; 60813 this.elements = []; 60814 this.threeDElements = []; 60815 this.destroyed = false; 60816 this.camera = null; 60817 this.supports3d = true; 60818 this.rendererType = 'html'; 60819 } 60820 60821 extendPrototype([HybridRendererBase], HybridRenderer); 60822 60823 HybridRenderer.prototype.createComp = function (data) { 60824 if (!this.supports3d) { 60825 return new SVGCompElement(data, this.globalData, this); 60826 } 60827 60828 return new HCompElement(data, this.globalData, this); 60829 }; 60830 60831 var CompExpressionInterface = function () { 60832 return function (comp) { 60833 function _thisLayerFunction(name) { 60834 var i = 0; 60835 var len = comp.layers.length; 60836 60837 while (i < len) { 60838 if (comp.layers[i].nm === name || comp.layers[i].ind === name) { 60839 return comp.elements[i].layerInterface; 60840 } 60841 60842 i += 1; 60843 } 60844 60845 return null; // return {active:false}; 60846 } 60847 60848 Object.defineProperty(_thisLayerFunction, '_name', { 60849 value: comp.data.nm 60850 }); 60851 _thisLayerFunction.layer = _thisLayerFunction; 60852 _thisLayerFunction.pixelAspect = 1; 60853 _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h; 60854 _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w; 60855 _thisLayerFunction.pixelAspect = 1; 60856 _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate; 60857 _thisLayerFunction.displayStartTime = 0; 60858 _thisLayerFunction.numLayers = comp.layers.length; 60859 return _thisLayerFunction; 60860 }; 60861 }(); 60862 60863 function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); } 60864 60865 /* eslint-disable */ 60866 60867 /* 60868 Copyright 2014 David Bau. 60869 60870 Permission is hereby granted, free of charge, to any person obtaining 60871 a copy of this software and associated documentation files (the 60872 "Software"), to deal in the Software without restriction, including 60873 without limitation the rights to use, copy, modify, merge, publish, 60874 distribute, sublicense, and/or sell copies of the Software, and to 60875 permit persons to whom the Software is furnished to do so, subject to 60876 the following conditions: 60877 60878 The above copyright notice and this permission notice shall be 60879 included in all copies or substantial portions of the Software. 60880 60881 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 60882 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 60883 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 60884 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 60885 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 60886 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 60887 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 60888 60889 */ 60890 function seedRandom(pool, math) { 60891 // 60892 // The following constants are related to IEEE 754 limits. 60893 // 60894 var global = this, 60895 width = 256, 60896 // each RC4 output is 0 <= x < 256 60897 chunks = 6, 60898 // at least six RC4 outputs for each double 60899 digits = 52, 60900 // there are 52 significant digits in a double 60901 rngname = 'random', 60902 // rngname: name for Math.random and Math.seedrandom 60903 startdenom = math.pow(width, chunks), 60904 significance = math.pow(2, digits), 60905 overflow = significance * 2, 60906 mask = width - 1, 60907 nodecrypto; // node.js crypto module, initialized at the bottom. 60908 // 60909 // seedrandom() 60910 // This is the seedrandom function described above. 60911 // 60912 60913 function seedrandom(seed, options, callback) { 60914 var key = []; 60915 options = options === true ? { 60916 entropy: true 60917 } : options || {}; // Flatten the seed string or build one from local entropy if needed. 60918 60919 var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator. 60920 60921 var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains 60922 // randomness in every bit of the mantissa of the IEEE 754 value. 60923 60924 var prng = function prng() { 60925 var n = arc4.g(chunks), 60926 // Start with a numerator n < 2 ^ 48 60927 d = startdenom, 60928 // and denominator d = 2 ^ 48. 60929 x = 0; // and no 'extra last byte'. 60930 60931 while (n < significance) { 60932 // Fill up all significant digits by 60933 n = (n + x) * width; // shifting numerator and 60934 60935 d *= width; // denominator and generating a 60936 60937 x = arc4.g(1); // new least-significant-byte. 60938 } 60939 60940 while (n >= overflow) { 60941 // To avoid rounding up, before adding 60942 n /= 2; // last byte, shift everything 60943 60944 d /= 2; // right using integer math until 60945 60946 x >>>= 1; // we have exactly the desired bits. 60947 } 60948 60949 return (n + x) / d; // Form the number within [0, 1). 60950 }; 60951 60952 prng.int32 = function () { 60953 return arc4.g(4) | 0; 60954 }; 60955 60956 prng.quick = function () { 60957 return arc4.g(4) / 0x100000000; 60958 }; 60959 60960 prng["double"] = prng; // Mix the randomness into accumulated entropy. 60961 60962 mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math. 60963 60964 return (options.pass || callback || function (prng, seed, is_math_call, state) { 60965 if (state) { 60966 // Load the arc4 state from the given state if it has an S array. 60967 if (state.S) { 60968 copy(state, arc4); 60969 } // Only provide the .state method if requested via options.state. 60970 60971 60972 prng.state = function () { 60973 return copy(arc4, {}); 60974 }; 60975 } // If called as a method of Math (Math.seedrandom()), mutate 60976 // Math.random because that is how seedrandom.js has worked since v1.0. 60977 60978 60979 if (is_math_call) { 60980 math[rngname] = prng; 60981 return seed; 60982 } // Otherwise, it is a newer calling convention, so return the 60983 // prng directly. 60984 else return prng; 60985 })(prng, shortseed, 'global' in options ? options.global : this == math, options.state); 60986 } 60987 60988 math['seed' + rngname] = seedrandom; // 60989 // ARC4 60990 // 60991 // An ARC4 implementation. The constructor takes a key in the form of 60992 // an array of at most (width) integers that should be 0 <= x < (width). 60993 // 60994 // The g(count) method returns a pseudorandom integer that concatenates 60995 // the next (count) outputs from ARC4. Its return value is a number x 60996 // that is in the range 0 <= x < (width ^ count). 60997 // 60998 60999 function ARC4(key) { 61000 var t, 61001 keylen = key.length, 61002 me = this, 61003 i = 0, 61004 j = me.i = me.j = 0, 61005 s = me.S = []; // The empty key [] is treated as [0]. 61006 61007 if (!keylen) { 61008 key = [keylen++]; 61009 } // Set up S using the standard key scheduling algorithm. 61010 61011 61012 while (i < width) { 61013 s[i] = i++; 61014 } 61015 61016 for (i = 0; i < width; i++) { 61017 s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])]; 61018 s[j] = t; 61019 } // The "g" method returns the next (count) outputs as one number. 61020 61021 61022 me.g = function (count) { 61023 // Using instance members instead of closure state nearly doubles speed. 61024 var t, 61025 r = 0, 61026 i = me.i, 61027 j = me.j, 61028 s = me.S; 61029 61030 while (count--) { 61031 t = s[i = mask & i + 1]; 61032 r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)]; 61033 } 61034 61035 me.i = i; 61036 me.j = j; 61037 return r; // For robust unpredictability, the function call below automatically 61038 // discards an initial batch of values. This is called RC4-drop[256]. 61039 // See http://google.com/search?q=rsa+fluhrer+response&btnI 61040 }; 61041 } // 61042 // copy() 61043 // Copies internal state of ARC4 to or from a plain object. 61044 // 61045 61046 61047 function copy(f, t) { 61048 t.i = f.i; 61049 t.j = f.j; 61050 t.S = f.S.slice(); 61051 return t; 61052 } // 61053 // flatten() 61054 // Converts an object tree to nested arrays of strings. 61055 // 61056 61057 61058 function flatten(obj, depth) { 61059 var result = [], 61060 typ = _typeof$2(obj), 61061 prop; 61062 61063 if (depth && typ == 'object') { 61064 for (prop in obj) { 61065 try { 61066 result.push(flatten(obj[prop], depth - 1)); 61067 } catch (e) {} 61068 } 61069 } 61070 61071 return result.length ? result : typ == 'string' ? obj : obj + '\0'; 61072 } // 61073 // mixkey() 61074 // Mixes a string seed into a key that is an array of integers, and 61075 // returns a shortened string seed that is equivalent to the result key. 61076 // 61077 61078 61079 function mixkey(seed, key) { 61080 var stringseed = seed + '', 61081 smear, 61082 j = 0; 61083 61084 while (j < stringseed.length) { 61085 key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++); 61086 } 61087 61088 return tostring(key); 61089 } // 61090 // autoseed() 61091 // Returns an object for autoseeding, using window.crypto and Node crypto 61092 // module if available. 61093 // 61094 61095 61096 function autoseed() { 61097 try { 61098 if (nodecrypto) { 61099 return tostring(nodecrypto.randomBytes(width)); 61100 } 61101 61102 var out = new Uint8Array(width); 61103 (global.crypto || global.msCrypto).getRandomValues(out); 61104 return tostring(out); 61105 } catch (e) { 61106 var browser = global.navigator, 61107 plugins = browser && browser.plugins; 61108 return [+new Date(), global, plugins, global.screen, tostring(pool)]; 61109 } 61110 } // 61111 // tostring() 61112 // Converts an array of charcodes to a string 61113 // 61114 61115 61116 function tostring(a) { 61117 return String.fromCharCode.apply(0, a); 61118 } // 61119 // When seedrandom.js is loaded, we immediately mix a few bits 61120 // from the built-in RNG into the entropy pool. Because we do 61121 // not want to interfere with deterministic PRNG state later, 61122 // seedrandom will not call math.random on its own again after 61123 // initialization. 61124 // 61125 61126 61127 mixkey(math.random(), pool); // 61128 // Nodejs and AMD support: export the implementation as a module using 61129 // either convention. 61130 // 61131 // End anonymous scope, and pass initial values. 61132 } 61133 61134 ; 61135 61136 function initialize$2(BMMath) { 61137 seedRandom([], BMMath); 61138 } 61139 61140 var propTypes = { 61141 SHAPE: 'shape' 61142 }; 61143 61144 function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); } 61145 61146 var ExpressionManager = function () { 61147 'use strict'; 61148 61149 var ob = {}; 61150 var Math = BMMath; 61151 var window = null; 61152 var document = null; 61153 var XMLHttpRequest = null; 61154 var fetch = null; 61155 var frames = null; 61156 var _lottieGlobal = {}; 61157 initialize$2(BMMath); 61158 61159 function resetFrame() { 61160 _lottieGlobal = {}; 61161 } 61162 61163 function $bm_isInstanceOfArray(arr) { 61164 return arr.constructor === Array || arr.constructor === Float32Array; 61165 } 61166 61167 function isNumerable(tOfV, v) { 61168 return tOfV === 'number' || v instanceof Number || tOfV === 'boolean' || tOfV === 'string'; 61169 } 61170 61171 function $bm_neg(a) { 61172 var tOfA = _typeof$1(a); 61173 61174 if (tOfA === 'number' || a instanceof Number || tOfA === 'boolean') { 61175 return -a; 61176 } 61177 61178 if ($bm_isInstanceOfArray(a)) { 61179 var i; 61180 var lenA = a.length; 61181 var retArr = []; 61182 61183 for (i = 0; i < lenA; i += 1) { 61184 retArr[i] = -a[i]; 61185 } 61186 61187 return retArr; 61188 } 61189 61190 if (a.propType) { 61191 return a.v; 61192 } 61193 61194 return -a; 61195 } 61196 61197 var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get; 61198 var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get; 61199 var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get; 61200 61201 function sum(a, b) { 61202 var tOfA = _typeof$1(a); 61203 61204 var tOfB = _typeof$1(b); 61205 61206 if (isNumerable(tOfA, a) && isNumerable(tOfB, b) || tOfA === 'string' || tOfB === 'string') { 61207 return a + b; 61208 } 61209 61210 if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { 61211 a = a.slice(0); 61212 a[0] += b; 61213 return a; 61214 } 61215 61216 if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { 61217 b = b.slice(0); 61218 b[0] = a + b[0]; 61219 return b; 61220 } 61221 61222 if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) { 61223 var i = 0; 61224 var lenA = a.length; 61225 var lenB = b.length; 61226 var retArr = []; 61227 61228 while (i < lenA || i < lenB) { 61229 if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) { 61230 retArr[i] = a[i] + b[i]; 61231 } else { 61232 retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i]; 61233 } 61234 61235 i += 1; 61236 } 61237 61238 return retArr; 61239 } 61240 61241 return 0; 61242 } 61243 61244 var add = sum; 61245 61246 function sub(a, b) { 61247 var tOfA = _typeof$1(a); 61248 61249 var tOfB = _typeof$1(b); 61250 61251 if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { 61252 if (tOfA === 'string') { 61253 a = parseInt(a, 10); 61254 } 61255 61256 if (tOfB === 'string') { 61257 b = parseInt(b, 10); 61258 } 61259 61260 return a - b; 61261 } 61262 61263 if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { 61264 a = a.slice(0); 61265 a[0] -= b; 61266 return a; 61267 } 61268 61269 if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { 61270 b = b.slice(0); 61271 b[0] = a - b[0]; 61272 return b; 61273 } 61274 61275 if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) { 61276 var i = 0; 61277 var lenA = a.length; 61278 var lenB = b.length; 61279 var retArr = []; 61280 61281 while (i < lenA || i < lenB) { 61282 if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) { 61283 retArr[i] = a[i] - b[i]; 61284 } else { 61285 retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i]; 61286 } 61287 61288 i += 1; 61289 } 61290 61291 return retArr; 61292 } 61293 61294 return 0; 61295 } 61296 61297 function mul(a, b) { 61298 var tOfA = _typeof$1(a); 61299 61300 var tOfB = _typeof$1(b); 61301 61302 var arr; 61303 61304 if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { 61305 return a * b; 61306 } 61307 61308 var i; 61309 var len; 61310 61311 if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { 61312 len = a.length; 61313 arr = createTypedArray('float32', len); 61314 61315 for (i = 0; i < len; i += 1) { 61316 arr[i] = a[i] * b; 61317 } 61318 61319 return arr; 61320 } 61321 61322 if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { 61323 len = b.length; 61324 arr = createTypedArray('float32', len); 61325 61326 for (i = 0; i < len; i += 1) { 61327 arr[i] = a * b[i]; 61328 } 61329 61330 return arr; 61331 } 61332 61333 return 0; 61334 } 61335 61336 function div(a, b) { 61337 var tOfA = _typeof$1(a); 61338 61339 var tOfB = _typeof$1(b); 61340 61341 var arr; 61342 61343 if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { 61344 return a / b; 61345 } 61346 61347 var i; 61348 var len; 61349 61350 if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { 61351 len = a.length; 61352 arr = createTypedArray('float32', len); 61353 61354 for (i = 0; i < len; i += 1) { 61355 arr[i] = a[i] / b; 61356 } 61357 61358 return arr; 61359 } 61360 61361 if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { 61362 len = b.length; 61363 arr = createTypedArray('float32', len); 61364 61365 for (i = 0; i < len; i += 1) { 61366 arr[i] = a / b[i]; 61367 } 61368 61369 return arr; 61370 } 61371 61372 return 0; 61373 } 61374 61375 function mod(a, b) { 61376 if (typeof a === 'string') { 61377 a = parseInt(a, 10); 61378 } 61379 61380 if (typeof b === 'string') { 61381 b = parseInt(b, 10); 61382 } 61383 61384 return a % b; 61385 } 61386 61387 var $bm_sum = sum; 61388 var $bm_sub = sub; 61389 var $bm_mul = mul; 61390 var $bm_div = div; 61391 var $bm_mod = mod; 61392 61393 function clamp(num, min, max) { 61394 if (min > max) { 61395 var mm = max; 61396 max = min; 61397 min = mm; 61398 } 61399 61400 return Math.min(Math.max(num, min), max); 61401 } 61402 61403 function radiansToDegrees(val) { 61404 return val / degToRads; 61405 } 61406 61407 var radians_to_degrees = radiansToDegrees; 61408 61409 function degreesToRadians(val) { 61410 return val * degToRads; 61411 } 61412 61413 var degrees_to_radians = radiansToDegrees; 61414 var helperLengthArray = [0, 0, 0, 0, 0, 0]; 61415 61416 function length(arr1, arr2) { 61417 if (typeof arr1 === 'number' || arr1 instanceof Number) { 61418 arr2 = arr2 || 0; 61419 return Math.abs(arr1 - arr2); 61420 } 61421 61422 if (!arr2) { 61423 arr2 = helperLengthArray; 61424 } 61425 61426 var i; 61427 var len = Math.min(arr1.length, arr2.length); 61428 var addedLength = 0; 61429 61430 for (i = 0; i < len; i += 1) { 61431 addedLength += Math.pow(arr2[i] - arr1[i], 2); 61432 } 61433 61434 return Math.sqrt(addedLength); 61435 } 61436 61437 function normalize(vec) { 61438 return div(vec, length(vec)); 61439 } 61440 61441 function rgbToHsl(val) { 61442 var r = val[0]; 61443 var g = val[1]; 61444 var b = val[2]; 61445 var max = Math.max(r, g, b); 61446 var min = Math.min(r, g, b); 61447 var h; 61448 var s; 61449 var l = (max + min) / 2; 61450 61451 if (max === min) { 61452 h = 0; // achromatic 61453 61454 s = 0; // achromatic 61455 } else { 61456 var d = max - min; 61457 s = l > 0.5 ? d / (2 - max - min) : d / (max + min); 61458 61459 switch (max) { 61460 case r: 61461 h = (g - b) / d + (g < b ? 6 : 0); 61462 break; 61463 61464 case g: 61465 h = (b - r) / d + 2; 61466 break; 61467 61468 case b: 61469 h = (r - g) / d + 4; 61470 break; 61471 61472 default: 61473 break; 61474 } 61475 61476 h /= 6; 61477 } 61478 61479 return [h, s, l, val[3]]; 61480 } 61481 61482 function hue2rgb(p, q, t) { 61483 if (t < 0) t += 1; 61484 if (t > 1) t -= 1; 61485 if (t < 1 / 6) return p + (q - p) * 6 * t; 61486 if (t < 1 / 2) return q; 61487 if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; 61488 return p; 61489 } 61490 61491 function hslToRgb(val) { 61492 var h = val[0]; 61493 var s = val[1]; 61494 var l = val[2]; 61495 var r; 61496 var g; 61497 var b; 61498 61499 if (s === 0) { 61500 r = l; // achromatic 61501 61502 b = l; // achromatic 61503 61504 g = l; // achromatic 61505 } else { 61506 var q = l < 0.5 ? l * (1 + s) : l + s - l * s; 61507 var p = 2 * l - q; 61508 r = hue2rgb(p, q, h + 1 / 3); 61509 g = hue2rgb(p, q, h); 61510 b = hue2rgb(p, q, h - 1 / 3); 61511 } 61512 61513 return [r, g, b, val[3]]; 61514 } 61515 61516 function linear(t, tMin, tMax, value1, value2) { 61517 if (value1 === undefined || value2 === undefined) { 61518 value1 = tMin; 61519 value2 = tMax; 61520 tMin = 0; 61521 tMax = 1; 61522 } 61523 61524 if (tMax < tMin) { 61525 var _tMin = tMax; 61526 tMax = tMin; 61527 tMin = _tMin; 61528 } 61529 61530 if (t <= tMin) { 61531 return value1; 61532 } 61533 61534 if (t >= tMax) { 61535 return value2; 61536 } 61537 61538 var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin); 61539 61540 if (!value1.length) { 61541 return value1 + (value2 - value1) * perc; 61542 } 61543 61544 var i; 61545 var len = value1.length; 61546 var arr = createTypedArray('float32', len); 61547 61548 for (i = 0; i < len; i += 1) { 61549 arr[i] = value1[i] + (value2[i] - value1[i]) * perc; 61550 } 61551 61552 return arr; 61553 } 61554 61555 function random(min, max) { 61556 if (max === undefined) { 61557 if (min === undefined) { 61558 min = 0; 61559 max = 1; 61560 } else { 61561 max = min; 61562 min = undefined; 61563 } 61564 } 61565 61566 if (max.length) { 61567 var i; 61568 var len = max.length; 61569 61570 if (!min) { 61571 min = createTypedArray('float32', len); 61572 } 61573 61574 var arr = createTypedArray('float32', len); 61575 var rnd = BMMath.random(); 61576 61577 for (i = 0; i < len; i += 1) { 61578 arr[i] = min[i] + rnd * (max[i] - min[i]); 61579 } 61580 61581 return arr; 61582 } 61583 61584 if (min === undefined) { 61585 min = 0; 61586 } 61587 61588 var rndm = BMMath.random(); 61589 return min + rndm * (max - min); 61590 } 61591 61592 function createPath(points, inTangents, outTangents, closed) { 61593 var i; 61594 var len = points.length; 61595 var path = shapePool.newElement(); 61596 path.setPathData(!!closed, len); 61597 var arrPlaceholder = [0, 0]; 61598 var inVertexPoint; 61599 var outVertexPoint; 61600 61601 for (i = 0; i < len; i += 1) { 61602 inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder; 61603 outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder; 61604 path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true); 61605 } 61606 61607 return path; 61608 } 61609 61610 function initiateExpression(elem, data, property) { 61611 // Bail out if we don't want expressions 61612 function noOp(_value) { 61613 return _value; 61614 } 61615 61616 if (!elem.globalData.renderConfig.runExpressions) { 61617 return noOp; 61618 } 61619 61620 var val = data.x; 61621 var needsVelocity = /velocity(?![\w\d])/.test(val); 61622 61623 var _needsRandom = val.indexOf('random') !== -1; 61624 61625 var elemType = elem.data.ty; 61626 var transform; 61627 var $bm_transform; 61628 var content; 61629 var effect; 61630 var thisProperty = property; 61631 thisProperty.valueAtTime = thisProperty.getValueAtTime; 61632 Object.defineProperty(thisProperty, 'value', { 61633 get: function get() { 61634 return thisProperty.v; 61635 } 61636 }); 61637 elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate; 61638 elem.comp.displayStartTime = 0; 61639 var inPoint = elem.data.ip / elem.comp.globalData.frameRate; 61640 var outPoint = elem.data.op / elem.comp.globalData.frameRate; 61641 var width = elem.data.sw ? elem.data.sw : 0; 61642 var height = elem.data.sh ? elem.data.sh : 0; 61643 var name = elem.data.nm; 61644 var loopIn; 61645 var loop_in; 61646 var loopOut; 61647 var loop_out; 61648 var smooth; 61649 var toWorld; 61650 var fromWorld; 61651 var fromComp; 61652 var toComp; 61653 var fromCompToSurface; 61654 var position; 61655 var rotation; 61656 var anchorPoint; 61657 var scale; 61658 var thisLayer; 61659 var thisComp; 61660 var mask; 61661 var valueAtTime; 61662 var velocityAtTime; 61663 var scoped_bm_rt; // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls 61664 61665 var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval 61666 61667 var numKeys = property.kf ? data.k.length : 0; 61668 var active = !this.data || this.data.hd !== true; 61669 61670 var wiggle = function wiggle(freq, amp) { 61671 var iWiggle; 61672 var j; 61673 var lenWiggle = this.pv.length ? this.pv.length : 1; 61674 var addedAmps = createTypedArray('float32', lenWiggle); 61675 freq = 5; 61676 var iterations = Math.floor(time * freq); 61677 iWiggle = 0; 61678 j = 0; 61679 61680 while (iWiggle < iterations) { 61681 // var rnd = BMMath.random(); 61682 for (j = 0; j < lenWiggle; j += 1) { 61683 addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd; 61684 } 61685 61686 iWiggle += 1; 61687 } // var rnd2 = BMMath.random(); 61688 61689 61690 var periods = time * freq; 61691 var perc = periods - Math.floor(periods); 61692 var arr = createTypedArray('float32', lenWiggle); 61693 61694 if (lenWiggle > 1) { 61695 for (j = 0; j < lenWiggle; j += 1) { 61696 arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc; 61697 // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc); 61698 } 61699 61700 return arr; 61701 } 61702 61703 return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc; 61704 }.bind(this); 61705 61706 if (thisProperty.loopIn) { 61707 loopIn = thisProperty.loopIn.bind(thisProperty); 61708 loop_in = loopIn; 61709 } 61710 61711 if (thisProperty.loopOut) { 61712 loopOut = thisProperty.loopOut.bind(thisProperty); 61713 loop_out = loopOut; 61714 } 61715 61716 if (thisProperty.smooth) { 61717 smooth = thisProperty.smooth.bind(thisProperty); 61718 } 61719 61720 function loopInDuration(type, duration) { 61721 return loopIn(type, duration, true); 61722 } 61723 61724 function loopOutDuration(type, duration) { 61725 return loopOut(type, duration, true); 61726 } 61727 61728 if (this.getValueAtTime) { 61729 valueAtTime = this.getValueAtTime.bind(this); 61730 } 61731 61732 if (this.getVelocityAtTime) { 61733 velocityAtTime = this.getVelocityAtTime.bind(this); 61734 } 61735 61736 var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface); 61737 61738 function lookAt(elem1, elem2) { 61739 var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]]; 61740 var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads; 61741 var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads; 61742 return [yaw, pitch, 0]; 61743 } 61744 61745 function easeOut(t, tMin, tMax, val1, val2) { 61746 return applyEase(easeOutBez, t, tMin, tMax, val1, val2); 61747 } 61748 61749 function easeIn(t, tMin, tMax, val1, val2) { 61750 return applyEase(easeInBez, t, tMin, tMax, val1, val2); 61751 } 61752 61753 function ease(t, tMin, tMax, val1, val2) { 61754 return applyEase(easeInOutBez, t, tMin, tMax, val1, val2); 61755 } 61756 61757 function applyEase(fn, t, tMin, tMax, val1, val2) { 61758 if (val1 === undefined) { 61759 val1 = tMin; 61760 val2 = tMax; 61761 } else { 61762 t = (t - tMin) / (tMax - tMin); 61763 } 61764 61765 if (t > 1) { 61766 t = 1; 61767 } else if (t < 0) { 61768 t = 0; 61769 } 61770 61771 var mult = fn(t); 61772 61773 if ($bm_isInstanceOfArray(val1)) { 61774 var iKey; 61775 var lenKey = val1.length; 61776 var arr = createTypedArray('float32', lenKey); 61777 61778 for (iKey = 0; iKey < lenKey; iKey += 1) { 61779 arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey]; 61780 } 61781 61782 return arr; 61783 } 61784 61785 return (val2 - val1) * mult + val1; 61786 } 61787 61788 function nearestKey(time) { 61789 var iKey; 61790 var lenKey = data.k.length; 61791 var index; 61792 var keyTime; 61793 61794 if (!data.k.length || typeof data.k[0] === 'number') { 61795 index = 0; 61796 keyTime = 0; 61797 } else { 61798 index = -1; 61799 time *= elem.comp.globalData.frameRate; 61800 61801 if (time < data.k[0].t) { 61802 index = 1; 61803 keyTime = data.k[0].t; 61804 } else { 61805 for (iKey = 0; iKey < lenKey - 1; iKey += 1) { 61806 if (time === data.k[iKey].t) { 61807 index = iKey + 1; 61808 keyTime = data.k[iKey].t; 61809 break; 61810 } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) { 61811 if (time - data.k[iKey].t > data.k[iKey + 1].t - time) { 61812 index = iKey + 2; 61813 keyTime = data.k[iKey + 1].t; 61814 } else { 61815 index = iKey + 1; 61816 keyTime = data.k[iKey].t; 61817 } 61818 61819 break; 61820 } 61821 } 61822 61823 if (index === -1) { 61824 index = iKey + 1; 61825 keyTime = data.k[iKey].t; 61826 } 61827 } 61828 } 61829 61830 var obKey = {}; 61831 obKey.index = index; 61832 obKey.time = keyTime / elem.comp.globalData.frameRate; 61833 return obKey; 61834 } 61835 61836 function key(ind) { 61837 var obKey; 61838 var iKey; 61839 var lenKey; 61840 61841 if (!data.k.length || typeof data.k[0] === 'number') { 61842 throw new Error('The property has no keyframe at index ' + ind); 61843 } 61844 61845 ind -= 1; 61846 obKey = { 61847 time: data.k[ind].t / elem.comp.globalData.frameRate, 61848 value: [] 61849 }; 61850 var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e; 61851 lenKey = arr.length; 61852 61853 for (iKey = 0; iKey < lenKey; iKey += 1) { 61854 obKey[iKey] = arr[iKey]; 61855 obKey.value[iKey] = arr[iKey]; 61856 } 61857 61858 return obKey; 61859 } 61860 61861 function framesToTime(fr, fps) { 61862 if (!fps) { 61863 fps = elem.comp.globalData.frameRate; 61864 } 61865 61866 return fr / fps; 61867 } 61868 61869 function timeToFrames(t, fps) { 61870 if (!t && t !== 0) { 61871 t = time; 61872 } 61873 61874 if (!fps) { 61875 fps = elem.comp.globalData.frameRate; 61876 } 61877 61878 return t * fps; 61879 } 61880 61881 function seedRandom(seed) { 61882 BMMath.seedrandom(randSeed + seed); 61883 } 61884 61885 function sourceRectAtTime() { 61886 return elem.sourceRectAtTime(); 61887 } 61888 61889 function substring(init, end) { 61890 if (typeof value === 'string') { 61891 if (end === undefined) { 61892 return value.substring(init); 61893 } 61894 61895 return value.substring(init, end); 61896 } 61897 61898 return ''; 61899 } 61900 61901 function substr(init, end) { 61902 if (typeof value === 'string') { 61903 if (end === undefined) { 61904 return value.substr(init); 61905 } 61906 61907 return value.substr(init, end); 61908 } 61909 61910 return ''; 61911 } 61912 61913 function posterizeTime(framesPerSecond) { 61914 time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond; 61915 value = valueAtTime(time); 61916 } 61917 61918 var time; 61919 var velocity; 61920 var value; 61921 var text; 61922 var textIndex; 61923 var textTotal; 61924 var selectorValue; 61925 var index = elem.data.ind; 61926 var hasParent = !!(elem.hierarchy && elem.hierarchy.length); 61927 var parent; 61928 var randSeed = Math.floor(Math.random() * 1000000); 61929 var globalData = elem.globalData; 61930 61931 function executeExpression(_value) { 61932 // globalData.pushExpression(); 61933 value = _value; 61934 61935 if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') { 61936 return value; 61937 } 61938 61939 if (this.propType === 'textSelector') { 61940 textIndex = this.textIndex; 61941 textTotal = this.textTotal; 61942 selectorValue = this.selectorValue; 61943 } 61944 61945 if (!thisLayer) { 61946 text = elem.layerInterface.text; 61947 thisLayer = elem.layerInterface; 61948 thisComp = elem.comp.compInterface; 61949 toWorld = thisLayer.toWorld.bind(thisLayer); 61950 fromWorld = thisLayer.fromWorld.bind(thisLayer); 61951 fromComp = thisLayer.fromComp.bind(thisLayer); 61952 toComp = thisLayer.toComp.bind(thisLayer); 61953 mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null; 61954 fromCompToSurface = fromComp; 61955 } 61956 61957 if (!transform) { 61958 transform = elem.layerInterface('ADBE Transform Group'); 61959 $bm_transform = transform; 61960 61961 if (transform) { 61962 anchorPoint = transform.anchorPoint; 61963 /* position = transform.position; 61964 rotation = transform.rotation; 61965 scale = transform.scale; */ 61966 } 61967 } 61968 61969 if (elemType === 4 && !content) { 61970 content = thisLayer('ADBE Root Vectors Group'); 61971 } 61972 61973 if (!effect) { 61974 effect = thisLayer(4); 61975 } 61976 61977 hasParent = !!(elem.hierarchy && elem.hierarchy.length); 61978 61979 if (hasParent && !parent) { 61980 parent = elem.hierarchy[0].layerInterface; 61981 } 61982 61983 time = this.comp.renderedFrame / this.comp.globalData.frameRate; 61984 61985 if (_needsRandom) { 61986 seedRandom(randSeed + time); 61987 } 61988 61989 if (needsVelocity) { 61990 velocity = velocityAtTime(time); 61991 } 61992 61993 expression_function(); 61994 this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value 61995 // Changed this to a ternary operation because Rollup failed compiling it correctly 61996 61997 scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt; 61998 return scoped_bm_rt; 61999 } // Bundlers will see these as dead code and unless we reference them 62000 62001 62002 executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData]; 62003 return executeExpression; 62004 } 62005 62006 ob.initiateExpression = initiateExpression; 62007 ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath, _lottieGlobal]; 62008 ob.resetFrame = resetFrame; 62009 return ob; 62010 }(); 62011 62012 var Expressions = function () { 62013 var ob = {}; 62014 ob.initExpressions = initExpressions; 62015 ob.resetFrame = ExpressionManager.resetFrame; 62016 62017 function initExpressions(animation) { 62018 var stackCount = 0; 62019 var registers = []; 62020 62021 function pushExpression() { 62022 stackCount += 1; 62023 } 62024 62025 function popExpression() { 62026 stackCount -= 1; 62027 62028 if (stackCount === 0) { 62029 releaseInstances(); 62030 } 62031 } 62032 62033 function registerExpressionProperty(expression) { 62034 if (registers.indexOf(expression) === -1) { 62035 registers.push(expression); 62036 } 62037 } 62038 62039 function releaseInstances() { 62040 var i; 62041 var len = registers.length; 62042 62043 for (i = 0; i < len; i += 1) { 62044 registers[i].release(); 62045 } 62046 62047 registers.length = 0; 62048 } 62049 62050 animation.renderer.compInterface = CompExpressionInterface(animation.renderer); 62051 animation.renderer.globalData.projectInterface.registerComposition(animation.renderer); 62052 animation.renderer.globalData.pushExpression = pushExpression; 62053 animation.renderer.globalData.popExpression = popExpression; 62054 animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty; 62055 } 62056 62057 return ob; 62058 }(); 62059 62060 var MaskManagerInterface = function () { 62061 function MaskInterface(mask, data) { 62062 this._mask = mask; 62063 this._data = data; 62064 } 62065 62066 Object.defineProperty(MaskInterface.prototype, 'maskPath', { 62067 get: function get() { 62068 if (this._mask.prop.k) { 62069 this._mask.prop.getValue(); 62070 } 62071 62072 return this._mask.prop; 62073 } 62074 }); 62075 Object.defineProperty(MaskInterface.prototype, 'maskOpacity', { 62076 get: function get() { 62077 if (this._mask.op.k) { 62078 this._mask.op.getValue(); 62079 } 62080 62081 return this._mask.op.v * 100; 62082 } 62083 }); 62084 62085 var MaskManager = function MaskManager(maskManager) { 62086 var _masksInterfaces = createSizedArray(maskManager.viewData.length); 62087 62088 var i; 62089 var len = maskManager.viewData.length; 62090 62091 for (i = 0; i < len; i += 1) { 62092 _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]); 62093 } 62094 62095 var maskFunction = function maskFunction(name) { 62096 i = 0; 62097 62098 while (i < len) { 62099 if (maskManager.masksProperties[i].nm === name) { 62100 return _masksInterfaces[i]; 62101 } 62102 62103 i += 1; 62104 } 62105 62106 return null; 62107 }; 62108 62109 return maskFunction; 62110 }; 62111 62112 return MaskManager; 62113 }(); 62114 62115 var ExpressionPropertyInterface = function () { 62116 var defaultUnidimensionalValue = { 62117 pv: 0, 62118 v: 0, 62119 mult: 1 62120 }; 62121 var defaultMultidimensionalValue = { 62122 pv: [0, 0, 0], 62123 v: [0, 0, 0], 62124 mult: 1 62125 }; 62126 62127 function completeProperty(expressionValue, property, type) { 62128 Object.defineProperty(expressionValue, 'velocity', { 62129 get: function get() { 62130 return property.getVelocityAtTime(property.comp.currentFrame); 62131 } 62132 }); 62133 expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0; 62134 62135 expressionValue.key = function (pos) { 62136 if (!expressionValue.numKeys) { 62137 return 0; 62138 } 62139 62140 var value = ''; 62141 62142 if ('s' in property.keyframes[pos - 1]) { 62143 value = property.keyframes[pos - 1].s; 62144 } else if ('e' in property.keyframes[pos - 2]) { 62145 value = property.keyframes[pos - 2].e; 62146 } else { 62147 value = property.keyframes[pos - 2].s; 62148 } 62149 62150 var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers 62151 62152 valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate; 62153 valueProp.value = type === 'unidimensional' ? value[0] : value; 62154 return valueProp; 62155 }; 62156 62157 expressionValue.valueAtTime = property.getValueAtTime; 62158 expressionValue.speedAtTime = property.getSpeedAtTime; 62159 expressionValue.velocityAtTime = property.getVelocityAtTime; 62160 expressionValue.propertyGroup = property.propertyGroup; 62161 } 62162 62163 function UnidimensionalPropertyInterface(property) { 62164 if (!property || !('pv' in property)) { 62165 property = defaultUnidimensionalValue; 62166 } 62167 62168 var mult = 1 / property.mult; 62169 var val = property.pv * mult; 62170 var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers 62171 62172 expressionValue.value = val; 62173 completeProperty(expressionValue, property, 'unidimensional'); 62174 return function () { 62175 if (property.k) { 62176 property.getValue(); 62177 } 62178 62179 val = property.v * mult; 62180 62181 if (expressionValue.value !== val) { 62182 expressionValue = new Number(val); // eslint-disable-line no-new-wrappers 62183 62184 expressionValue.value = val; 62185 completeProperty(expressionValue, property, 'unidimensional'); 62186 } 62187 62188 return expressionValue; 62189 }; 62190 } 62191 62192 function MultidimensionalPropertyInterface(property) { 62193 if (!property || !('pv' in property)) { 62194 property = defaultMultidimensionalValue; 62195 } 62196 62197 var mult = 1 / property.mult; 62198 var len = property.data && property.data.l || property.pv.length; 62199 var expressionValue = createTypedArray('float32', len); 62200 var arrValue = createTypedArray('float32', len); 62201 expressionValue.value = arrValue; 62202 completeProperty(expressionValue, property, 'multidimensional'); 62203 return function () { 62204 if (property.k) { 62205 property.getValue(); 62206 } 62207 62208 for (var i = 0; i < len; i += 1) { 62209 arrValue[i] = property.v[i] * mult; 62210 expressionValue[i] = arrValue[i]; 62211 } 62212 62213 return expressionValue; 62214 }; 62215 } // TODO: try to avoid using this getter 62216 62217 62218 function defaultGetter() { 62219 return defaultUnidimensionalValue; 62220 } 62221 62222 return function (property) { 62223 if (!property) { 62224 return defaultGetter; 62225 } 62226 62227 if (property.propType === 'unidimensional') { 62228 return UnidimensionalPropertyInterface(property); 62229 } 62230 62231 return MultidimensionalPropertyInterface(property); 62232 }; 62233 }(); 62234 62235 var TransformExpressionInterface = function () { 62236 return function (transform) { 62237 function _thisFunction(name) { 62238 switch (name) { 62239 case 'scale': 62240 case 'Scale': 62241 case 'ADBE Scale': 62242 case 6: 62243 return _thisFunction.scale; 62244 62245 case 'rotation': 62246 case 'Rotation': 62247 case 'ADBE Rotation': 62248 case 'ADBE Rotate Z': 62249 case 10: 62250 return _thisFunction.rotation; 62251 62252 case 'ADBE Rotate X': 62253 return _thisFunction.xRotation; 62254 62255 case 'ADBE Rotate Y': 62256 return _thisFunction.yRotation; 62257 62258 case 'position': 62259 case 'Position': 62260 case 'ADBE Position': 62261 case 2: 62262 return _thisFunction.position; 62263 62264 case 'ADBE Position_0': 62265 return _thisFunction.xPosition; 62266 62267 case 'ADBE Position_1': 62268 return _thisFunction.yPosition; 62269 62270 case 'ADBE Position_2': 62271 return _thisFunction.zPosition; 62272 62273 case 'anchorPoint': 62274 case 'AnchorPoint': 62275 case 'Anchor Point': 62276 case 'ADBE AnchorPoint': 62277 case 1: 62278 return _thisFunction.anchorPoint; 62279 62280 case 'opacity': 62281 case 'Opacity': 62282 case 11: 62283 return _thisFunction.opacity; 62284 62285 default: 62286 return null; 62287 } 62288 } 62289 62290 Object.defineProperty(_thisFunction, 'rotation', { 62291 get: ExpressionPropertyInterface(transform.r || transform.rz) 62292 }); 62293 Object.defineProperty(_thisFunction, 'zRotation', { 62294 get: ExpressionPropertyInterface(transform.rz || transform.r) 62295 }); 62296 Object.defineProperty(_thisFunction, 'xRotation', { 62297 get: ExpressionPropertyInterface(transform.rx) 62298 }); 62299 Object.defineProperty(_thisFunction, 'yRotation', { 62300 get: ExpressionPropertyInterface(transform.ry) 62301 }); 62302 Object.defineProperty(_thisFunction, 'scale', { 62303 get: ExpressionPropertyInterface(transform.s) 62304 }); 62305 62306 var _px; 62307 62308 var _py; 62309 62310 var _pz; 62311 62312 var _transformFactory; 62313 62314 if (transform.p) { 62315 _transformFactory = ExpressionPropertyInterface(transform.p); 62316 } else { 62317 _px = ExpressionPropertyInterface(transform.px); 62318 _py = ExpressionPropertyInterface(transform.py); 62319 62320 if (transform.pz) { 62321 _pz = ExpressionPropertyInterface(transform.pz); 62322 } 62323 } 62324 62325 Object.defineProperty(_thisFunction, 'position', { 62326 get: function get() { 62327 if (transform.p) { 62328 return _transformFactory(); 62329 } 62330 62331 return [_px(), _py(), _pz ? _pz() : 0]; 62332 } 62333 }); 62334 Object.defineProperty(_thisFunction, 'xPosition', { 62335 get: ExpressionPropertyInterface(transform.px) 62336 }); 62337 Object.defineProperty(_thisFunction, 'yPosition', { 62338 get: ExpressionPropertyInterface(transform.py) 62339 }); 62340 Object.defineProperty(_thisFunction, 'zPosition', { 62341 get: ExpressionPropertyInterface(transform.pz) 62342 }); 62343 Object.defineProperty(_thisFunction, 'anchorPoint', { 62344 get: ExpressionPropertyInterface(transform.a) 62345 }); 62346 Object.defineProperty(_thisFunction, 'opacity', { 62347 get: ExpressionPropertyInterface(transform.o) 62348 }); 62349 Object.defineProperty(_thisFunction, 'skew', { 62350 get: ExpressionPropertyInterface(transform.sk) 62351 }); 62352 Object.defineProperty(_thisFunction, 'skewAxis', { 62353 get: ExpressionPropertyInterface(transform.sa) 62354 }); 62355 Object.defineProperty(_thisFunction, 'orientation', { 62356 get: ExpressionPropertyInterface(transform.or) 62357 }); 62358 return _thisFunction; 62359 }; 62360 }(); 62361 62362 var LayerExpressionInterface = function () { 62363 function getMatrix(time) { 62364 var toWorldMat = new Matrix(); 62365 62366 if (time !== undefined) { 62367 var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time); 62368 62369 propMatrix.clone(toWorldMat); 62370 } else { 62371 var transformMat = this._elem.finalTransform.mProp; 62372 transformMat.applyToMatrix(toWorldMat); 62373 } 62374 62375 return toWorldMat; 62376 } 62377 62378 function toWorldVec(arr, time) { 62379 var toWorldMat = this.getMatrix(time); 62380 toWorldMat.props[12] = 0; 62381 toWorldMat.props[13] = 0; 62382 toWorldMat.props[14] = 0; 62383 return this.applyPoint(toWorldMat, arr); 62384 } 62385 62386 function toWorld(arr, time) { 62387 var toWorldMat = this.getMatrix(time); 62388 return this.applyPoint(toWorldMat, arr); 62389 } 62390 62391 function fromWorldVec(arr, time) { 62392 var toWorldMat = this.getMatrix(time); 62393 toWorldMat.props[12] = 0; 62394 toWorldMat.props[13] = 0; 62395 toWorldMat.props[14] = 0; 62396 return this.invertPoint(toWorldMat, arr); 62397 } 62398 62399 function fromWorld(arr, time) { 62400 var toWorldMat = this.getMatrix(time); 62401 return this.invertPoint(toWorldMat, arr); 62402 } 62403 62404 function applyPoint(matrix, arr) { 62405 if (this._elem.hierarchy && this._elem.hierarchy.length) { 62406 var i; 62407 var len = this._elem.hierarchy.length; 62408 62409 for (i = 0; i < len; i += 1) { 62410 this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix); 62411 } 62412 } 62413 62414 return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0); 62415 } 62416 62417 function invertPoint(matrix, arr) { 62418 if (this._elem.hierarchy && this._elem.hierarchy.length) { 62419 var i; 62420 var len = this._elem.hierarchy.length; 62421 62422 for (i = 0; i < len; i += 1) { 62423 this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix); 62424 } 62425 } 62426 62427 return matrix.inversePoint(arr); 62428 } 62429 62430 function fromComp(arr) { 62431 var toWorldMat = new Matrix(); 62432 toWorldMat.reset(); 62433 62434 this._elem.finalTransform.mProp.applyToMatrix(toWorldMat); 62435 62436 if (this._elem.hierarchy && this._elem.hierarchy.length) { 62437 var i; 62438 var len = this._elem.hierarchy.length; 62439 62440 for (i = 0; i < len; i += 1) { 62441 this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat); 62442 } 62443 62444 return toWorldMat.inversePoint(arr); 62445 } 62446 62447 return toWorldMat.inversePoint(arr); 62448 } 62449 62450 function sampleImage() { 62451 return [1, 1, 1, 1]; 62452 } 62453 62454 return function (elem) { 62455 var transformInterface; 62456 62457 function _registerMaskInterface(maskManager) { 62458 _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem); 62459 } 62460 62461 function _registerEffectsInterface(effects) { 62462 _thisLayerFunction.effect = effects; 62463 } 62464 62465 function _thisLayerFunction(name) { 62466 switch (name) { 62467 case 'ADBE Root Vectors Group': 62468 case 'Contents': 62469 case 2: 62470 return _thisLayerFunction.shapeInterface; 62471 62472 case 1: 62473 case 6: 62474 case 'Transform': 62475 case 'transform': 62476 case 'ADBE Transform Group': 62477 return transformInterface; 62478 62479 case 4: 62480 case 'ADBE Effect Parade': 62481 case 'effects': 62482 case 'Effects': 62483 return _thisLayerFunction.effect; 62484 62485 case 'ADBE Text Properties': 62486 return _thisLayerFunction.textInterface; 62487 62488 default: 62489 return null; 62490 } 62491 } 62492 62493 _thisLayerFunction.getMatrix = getMatrix; 62494 _thisLayerFunction.invertPoint = invertPoint; 62495 _thisLayerFunction.applyPoint = applyPoint; 62496 _thisLayerFunction.toWorld = toWorld; 62497 _thisLayerFunction.toWorldVec = toWorldVec; 62498 _thisLayerFunction.fromWorld = fromWorld; 62499 _thisLayerFunction.fromWorldVec = fromWorldVec; 62500 _thisLayerFunction.toComp = toWorld; 62501 _thisLayerFunction.fromComp = fromComp; 62502 _thisLayerFunction.sampleImage = sampleImage; 62503 _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem); 62504 _thisLayerFunction._elem = elem; 62505 transformInterface = TransformExpressionInterface(elem.finalTransform.mProp); 62506 var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint'); 62507 Object.defineProperties(_thisLayerFunction, { 62508 hasParent: { 62509 get: function get() { 62510 return elem.hierarchy.length; 62511 } 62512 }, 62513 parent: { 62514 get: function get() { 62515 return elem.hierarchy[0].layerInterface; 62516 } 62517 }, 62518 rotation: getDescriptor(transformInterface, 'rotation'), 62519 scale: getDescriptor(transformInterface, 'scale'), 62520 position: getDescriptor(transformInterface, 'position'), 62521 opacity: getDescriptor(transformInterface, 'opacity'), 62522 anchorPoint: anchorPointDescriptor, 62523 anchor_point: anchorPointDescriptor, 62524 transform: { 62525 get: function get() { 62526 return transformInterface; 62527 } 62528 }, 62529 active: { 62530 get: function get() { 62531 return elem.isInRange; 62532 } 62533 } 62534 }); 62535 _thisLayerFunction.startTime = elem.data.st; 62536 _thisLayerFunction.index = elem.data.ind; 62537 _thisLayerFunction.source = elem.data.refId; 62538 _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100; 62539 _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100; 62540 _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate; 62541 _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate; 62542 _thisLayerFunction._name = elem.data.nm; 62543 _thisLayerFunction.registerMaskInterface = _registerMaskInterface; 62544 _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface; 62545 return _thisLayerFunction; 62546 }; 62547 }(); 62548 62549 var propertyGroupFactory = function () { 62550 return function (interfaceFunction, parentPropertyGroup) { 62551 return function (val) { 62552 val = val === undefined ? 1 : val; 62553 62554 if (val <= 0) { 62555 return interfaceFunction; 62556 } 62557 62558 return parentPropertyGroup(val - 1); 62559 }; 62560 }; 62561 }(); 62562 62563 var PropertyInterface = function () { 62564 return function (propertyName, propertyGroup) { 62565 var interfaceFunction = { 62566 _name: propertyName 62567 }; 62568 62569 function _propertyGroup(val) { 62570 val = val === undefined ? 1 : val; 62571 62572 if (val <= 0) { 62573 return interfaceFunction; 62574 } 62575 62576 return propertyGroup(val - 1); 62577 } 62578 62579 return _propertyGroup; 62580 }; 62581 }(); 62582 62583 var EffectsExpressionInterface = function () { 62584 var ob = { 62585 createEffectsInterface: createEffectsInterface 62586 }; 62587 62588 function createEffectsInterface(elem, propertyGroup) { 62589 if (elem.effectsManager) { 62590 var effectElements = []; 62591 var effectsData = elem.data.ef; 62592 var i; 62593 var len = elem.effectsManager.effectElements.length; 62594 62595 for (i = 0; i < len; i += 1) { 62596 effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem)); 62597 } 62598 62599 var effects = elem.data.ef || []; 62600 62601 var groupInterface = function groupInterface(name) { 62602 i = 0; 62603 len = effects.length; 62604 62605 while (i < len) { 62606 if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) { 62607 return effectElements[i]; 62608 } 62609 62610 i += 1; 62611 } 62612 62613 return null; 62614 }; 62615 62616 Object.defineProperty(groupInterface, 'numProperties', { 62617 get: function get() { 62618 return effects.length; 62619 } 62620 }); 62621 return groupInterface; 62622 } 62623 62624 return null; 62625 } 62626 62627 function createGroupInterface(data, elements, propertyGroup, elem) { 62628 function groupInterface(name) { 62629 var effects = data.ef; 62630 var i = 0; 62631 var len = effects.length; 62632 62633 while (i < len) { 62634 if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) { 62635 if (effects[i].ty === 5) { 62636 return effectElements[i]; 62637 } 62638 62639 return effectElements[i](); 62640 } 62641 62642 i += 1; 62643 } 62644 62645 throw new Error(); 62646 } 62647 62648 var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup); 62649 62650 var effectElements = []; 62651 var i; 62652 var len = data.ef.length; 62653 62654 for (i = 0; i < len; i += 1) { 62655 if (data.ef[i].ty === 5) { 62656 effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem)); 62657 } else { 62658 effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup)); 62659 } 62660 } 62661 62662 if (data.mn === 'ADBE Color Control') { 62663 Object.defineProperty(groupInterface, 'color', { 62664 get: function get() { 62665 return effectElements[0](); 62666 } 62667 }); 62668 } 62669 62670 Object.defineProperties(groupInterface, { 62671 numProperties: { 62672 get: function get() { 62673 return data.np; 62674 } 62675 }, 62676 _name: { 62677 value: data.nm 62678 }, 62679 propertyGroup: { 62680 value: _propertyGroup 62681 } 62682 }); 62683 groupInterface.enabled = data.en !== 0; 62684 groupInterface.active = groupInterface.enabled; 62685 return groupInterface; 62686 } 62687 62688 function createValueInterface(element, type, elem, propertyGroup) { 62689 var expressionProperty = ExpressionPropertyInterface(element.p); 62690 62691 function interfaceFunction() { 62692 if (type === 10) { 62693 return elem.comp.compInterface(element.p.v); 62694 } 62695 62696 return expressionProperty(); 62697 } 62698 62699 if (element.p.setGroupProperty) { 62700 element.p.setGroupProperty(PropertyInterface('', propertyGroup)); 62701 } 62702 62703 return interfaceFunction; 62704 } 62705 62706 return ob; 62707 }(); 62708 62709 var ShapePathInterface = function () { 62710 return function pathInterfaceFactory(shape, view, propertyGroup) { 62711 var prop = view.sh; 62712 62713 function interfaceFunction(val) { 62714 if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) { 62715 return interfaceFunction.path; 62716 } 62717 62718 return null; 62719 } 62720 62721 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 62722 62723 prop.setGroupProperty(PropertyInterface('Path', _propertyGroup)); 62724 Object.defineProperties(interfaceFunction, { 62725 path: { 62726 get: function get() { 62727 if (prop.k) { 62728 prop.getValue(); 62729 } 62730 62731 return prop; 62732 } 62733 }, 62734 shape: { 62735 get: function get() { 62736 if (prop.k) { 62737 prop.getValue(); 62738 } 62739 62740 return prop; 62741 } 62742 }, 62743 _name: { 62744 value: shape.nm 62745 }, 62746 ix: { 62747 value: shape.ix 62748 }, 62749 propertyIndex: { 62750 value: shape.ix 62751 }, 62752 mn: { 62753 value: shape.mn 62754 }, 62755 propertyGroup: { 62756 value: propertyGroup 62757 } 62758 }); 62759 return interfaceFunction; 62760 }; 62761 }(); 62762 62763 var ShapeExpressionInterface = function () { 62764 function iterateElements(shapes, view, propertyGroup) { 62765 var arr = []; 62766 var i; 62767 var len = shapes ? shapes.length : 0; 62768 62769 for (i = 0; i < len; i += 1) { 62770 if (shapes[i].ty === 'gr') { 62771 arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup)); 62772 } else if (shapes[i].ty === 'fl') { 62773 arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup)); 62774 } else if (shapes[i].ty === 'st') { 62775 arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup)); 62776 } else if (shapes[i].ty === 'tm') { 62777 arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup)); 62778 } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup)); 62779 } else if (shapes[i].ty === 'el') { 62780 arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup)); 62781 } else if (shapes[i].ty === 'sr') { 62782 arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup)); 62783 } else if (shapes[i].ty === 'sh') { 62784 arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup)); 62785 } else if (shapes[i].ty === 'rc') { 62786 arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup)); 62787 } else if (shapes[i].ty === 'rd') { 62788 arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup)); 62789 } else if (shapes[i].ty === 'rp') { 62790 arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup)); 62791 } else if (shapes[i].ty === 'gf') { 62792 arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup)); 62793 } else { 62794 arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup)); 62795 } 62796 } 62797 62798 return arr; 62799 } 62800 62801 function contentsInterfaceFactory(shape, view, propertyGroup) { 62802 var interfaces; 62803 62804 var interfaceFunction = function _interfaceFunction(value) { 62805 var i = 0; 62806 var len = interfaces.length; 62807 62808 while (i < len) { 62809 if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) { 62810 return interfaces[i]; 62811 } 62812 62813 i += 1; 62814 } 62815 62816 if (typeof value === 'number') { 62817 return interfaces[value - 1]; 62818 } 62819 62820 return null; 62821 }; 62822 62823 interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 62824 interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup); 62825 interfaceFunction.numProperties = interfaces.length; 62826 var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup); 62827 interfaceFunction.transform = transformInterface; 62828 interfaceFunction.propertyIndex = shape.cix; 62829 interfaceFunction._name = shape.nm; 62830 return interfaceFunction; 62831 } 62832 62833 function groupInterfaceFactory(shape, view, propertyGroup) { 62834 var interfaceFunction = function _interfaceFunction(value) { 62835 switch (value) { 62836 case 'ADBE Vectors Group': 62837 case 'Contents': 62838 case 2: 62839 return interfaceFunction.content; 62840 // Not necessary for now. Keeping them here in case a new case appears 62841 // case 'ADBE Vector Transform Group': 62842 // case 3: 62843 62844 default: 62845 return interfaceFunction.transform; 62846 } 62847 }; 62848 62849 interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 62850 var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup); 62851 var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup); 62852 interfaceFunction.content = content; 62853 interfaceFunction.transform = transformInterface; 62854 Object.defineProperty(interfaceFunction, '_name', { 62855 get: function get() { 62856 return shape.nm; 62857 } 62858 }); // interfaceFunction.content = interfaceFunction; 62859 62860 interfaceFunction.numProperties = shape.np; 62861 interfaceFunction.propertyIndex = shape.ix; 62862 interfaceFunction.nm = shape.nm; 62863 interfaceFunction.mn = shape.mn; 62864 return interfaceFunction; 62865 } 62866 62867 function fillInterfaceFactory(shape, view, propertyGroup) { 62868 function interfaceFunction(val) { 62869 if (val === 'Color' || val === 'color') { 62870 return interfaceFunction.color; 62871 } 62872 62873 if (val === 'Opacity' || val === 'opacity') { 62874 return interfaceFunction.opacity; 62875 } 62876 62877 return null; 62878 } 62879 62880 Object.defineProperties(interfaceFunction, { 62881 color: { 62882 get: ExpressionPropertyInterface(view.c) 62883 }, 62884 opacity: { 62885 get: ExpressionPropertyInterface(view.o) 62886 }, 62887 _name: { 62888 value: shape.nm 62889 }, 62890 mn: { 62891 value: shape.mn 62892 } 62893 }); 62894 view.c.setGroupProperty(PropertyInterface('Color', propertyGroup)); 62895 view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup)); 62896 return interfaceFunction; 62897 } 62898 62899 function gradientFillInterfaceFactory(shape, view, propertyGroup) { 62900 function interfaceFunction(val) { 62901 if (val === 'Start Point' || val === 'start point') { 62902 return interfaceFunction.startPoint; 62903 } 62904 62905 if (val === 'End Point' || val === 'end point') { 62906 return interfaceFunction.endPoint; 62907 } 62908 62909 if (val === 'Opacity' || val === 'opacity') { 62910 return interfaceFunction.opacity; 62911 } 62912 62913 return null; 62914 } 62915 62916 Object.defineProperties(interfaceFunction, { 62917 startPoint: { 62918 get: ExpressionPropertyInterface(view.s) 62919 }, 62920 endPoint: { 62921 get: ExpressionPropertyInterface(view.e) 62922 }, 62923 opacity: { 62924 get: ExpressionPropertyInterface(view.o) 62925 }, 62926 type: { 62927 get: function get() { 62928 return 'a'; 62929 } 62930 }, 62931 _name: { 62932 value: shape.nm 62933 }, 62934 mn: { 62935 value: shape.mn 62936 } 62937 }); 62938 view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup)); 62939 view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup)); 62940 view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup)); 62941 return interfaceFunction; 62942 } 62943 62944 function defaultInterfaceFactory() { 62945 function interfaceFunction() { 62946 return null; 62947 } 62948 62949 return interfaceFunction; 62950 } 62951 62952 function strokeInterfaceFactory(shape, view, propertyGroup) { 62953 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 62954 62955 var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup); 62956 62957 function addPropertyToDashOb(i) { 62958 Object.defineProperty(dashOb, shape.d[i].nm, { 62959 get: ExpressionPropertyInterface(view.d.dataProps[i].p) 62960 }); 62961 } 62962 62963 var i; 62964 var len = shape.d ? shape.d.length : 0; 62965 var dashOb = {}; 62966 62967 for (i = 0; i < len; i += 1) { 62968 addPropertyToDashOb(i); 62969 view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup); 62970 } 62971 62972 function interfaceFunction(val) { 62973 if (val === 'Color' || val === 'color') { 62974 return interfaceFunction.color; 62975 } 62976 62977 if (val === 'Opacity' || val === 'opacity') { 62978 return interfaceFunction.opacity; 62979 } 62980 62981 if (val === 'Stroke Width' || val === 'stroke width') { 62982 return interfaceFunction.strokeWidth; 62983 } 62984 62985 return null; 62986 } 62987 62988 Object.defineProperties(interfaceFunction, { 62989 color: { 62990 get: ExpressionPropertyInterface(view.c) 62991 }, 62992 opacity: { 62993 get: ExpressionPropertyInterface(view.o) 62994 }, 62995 strokeWidth: { 62996 get: ExpressionPropertyInterface(view.w) 62997 }, 62998 dash: { 62999 get: function get() { 63000 return dashOb; 63001 } 63002 }, 63003 _name: { 63004 value: shape.nm 63005 }, 63006 mn: { 63007 value: shape.mn 63008 } 63009 }); 63010 view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup)); 63011 view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); 63012 view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup)); 63013 return interfaceFunction; 63014 } 63015 63016 function trimInterfaceFactory(shape, view, propertyGroup) { 63017 function interfaceFunction(val) { 63018 if (val === shape.e.ix || val === 'End' || val === 'end') { 63019 return interfaceFunction.end; 63020 } 63021 63022 if (val === shape.s.ix) { 63023 return interfaceFunction.start; 63024 } 63025 63026 if (val === shape.o.ix) { 63027 return interfaceFunction.offset; 63028 } 63029 63030 return null; 63031 } 63032 63033 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 63034 63035 interfaceFunction.propertyIndex = shape.ix; 63036 view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup)); 63037 view.e.setGroupProperty(PropertyInterface('End', _propertyGroup)); 63038 view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup)); 63039 interfaceFunction.propertyIndex = shape.ix; 63040 interfaceFunction.propertyGroup = propertyGroup; 63041 Object.defineProperties(interfaceFunction, { 63042 start: { 63043 get: ExpressionPropertyInterface(view.s) 63044 }, 63045 end: { 63046 get: ExpressionPropertyInterface(view.e) 63047 }, 63048 offset: { 63049 get: ExpressionPropertyInterface(view.o) 63050 }, 63051 _name: { 63052 value: shape.nm 63053 } 63054 }); 63055 interfaceFunction.mn = shape.mn; 63056 return interfaceFunction; 63057 } 63058 63059 function transformInterfaceFactory(shape, view, propertyGroup) { 63060 function interfaceFunction(value) { 63061 if (shape.a.ix === value || value === 'Anchor Point') { 63062 return interfaceFunction.anchorPoint; 63063 } 63064 63065 if (shape.o.ix === value || value === 'Opacity') { 63066 return interfaceFunction.opacity; 63067 } 63068 63069 if (shape.p.ix === value || value === 'Position') { 63070 return interfaceFunction.position; 63071 } 63072 63073 if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') { 63074 return interfaceFunction.rotation; 63075 } 63076 63077 if (shape.s.ix === value || value === 'Scale') { 63078 return interfaceFunction.scale; 63079 } 63080 63081 if (shape.sk && shape.sk.ix === value || value === 'Skew') { 63082 return interfaceFunction.skew; 63083 } 63084 63085 if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') { 63086 return interfaceFunction.skewAxis; 63087 } 63088 63089 return null; 63090 } 63091 63092 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 63093 63094 view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); 63095 view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); 63096 view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup)); 63097 view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup)); 63098 view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); 63099 63100 if (view.transform.mProps.sk) { 63101 view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup)); 63102 view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup)); 63103 } 63104 63105 view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); 63106 Object.defineProperties(interfaceFunction, { 63107 opacity: { 63108 get: ExpressionPropertyInterface(view.transform.mProps.o) 63109 }, 63110 position: { 63111 get: ExpressionPropertyInterface(view.transform.mProps.p) 63112 }, 63113 anchorPoint: { 63114 get: ExpressionPropertyInterface(view.transform.mProps.a) 63115 }, 63116 scale: { 63117 get: ExpressionPropertyInterface(view.transform.mProps.s) 63118 }, 63119 rotation: { 63120 get: ExpressionPropertyInterface(view.transform.mProps.r) 63121 }, 63122 skew: { 63123 get: ExpressionPropertyInterface(view.transform.mProps.sk) 63124 }, 63125 skewAxis: { 63126 get: ExpressionPropertyInterface(view.transform.mProps.sa) 63127 }, 63128 _name: { 63129 value: shape.nm 63130 } 63131 }); 63132 interfaceFunction.ty = 'tr'; 63133 interfaceFunction.mn = shape.mn; 63134 interfaceFunction.propertyGroup = propertyGroup; 63135 return interfaceFunction; 63136 } 63137 63138 function ellipseInterfaceFactory(shape, view, propertyGroup) { 63139 function interfaceFunction(value) { 63140 if (shape.p.ix === value) { 63141 return interfaceFunction.position; 63142 } 63143 63144 if (shape.s.ix === value) { 63145 return interfaceFunction.size; 63146 } 63147 63148 return null; 63149 } 63150 63151 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 63152 63153 interfaceFunction.propertyIndex = shape.ix; 63154 var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; 63155 prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup)); 63156 prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); 63157 Object.defineProperties(interfaceFunction, { 63158 size: { 63159 get: ExpressionPropertyInterface(prop.s) 63160 }, 63161 position: { 63162 get: ExpressionPropertyInterface(prop.p) 63163 }, 63164 _name: { 63165 value: shape.nm 63166 } 63167 }); 63168 interfaceFunction.mn = shape.mn; 63169 return interfaceFunction; 63170 } 63171 63172 function starInterfaceFactory(shape, view, propertyGroup) { 63173 function interfaceFunction(value) { 63174 if (shape.p.ix === value) { 63175 return interfaceFunction.position; 63176 } 63177 63178 if (shape.r.ix === value) { 63179 return interfaceFunction.rotation; 63180 } 63181 63182 if (shape.pt.ix === value) { 63183 return interfaceFunction.points; 63184 } 63185 63186 if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') { 63187 return interfaceFunction.outerRadius; 63188 } 63189 63190 if (shape.os.ix === value) { 63191 return interfaceFunction.outerRoundness; 63192 } 63193 63194 if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) { 63195 return interfaceFunction.innerRadius; 63196 } 63197 63198 if (shape.is && shape.is.ix === value) { 63199 return interfaceFunction.innerRoundness; 63200 } 63201 63202 return null; 63203 } 63204 63205 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 63206 63207 var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; 63208 interfaceFunction.propertyIndex = shape.ix; 63209 prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup)); 63210 prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup)); 63211 prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup)); 63212 prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); 63213 prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); 63214 63215 if (shape.ir) { 63216 prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup)); 63217 prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup)); 63218 } 63219 63220 Object.defineProperties(interfaceFunction, { 63221 position: { 63222 get: ExpressionPropertyInterface(prop.p) 63223 }, 63224 rotation: { 63225 get: ExpressionPropertyInterface(prop.r) 63226 }, 63227 points: { 63228 get: ExpressionPropertyInterface(prop.pt) 63229 }, 63230 outerRadius: { 63231 get: ExpressionPropertyInterface(prop.or) 63232 }, 63233 outerRoundness: { 63234 get: ExpressionPropertyInterface(prop.os) 63235 }, 63236 innerRadius: { 63237 get: ExpressionPropertyInterface(prop.ir) 63238 }, 63239 innerRoundness: { 63240 get: ExpressionPropertyInterface(prop.is) 63241 }, 63242 _name: { 63243 value: shape.nm 63244 } 63245 }); 63246 interfaceFunction.mn = shape.mn; 63247 return interfaceFunction; 63248 } 63249 63250 function rectInterfaceFactory(shape, view, propertyGroup) { 63251 function interfaceFunction(value) { 63252 if (shape.p.ix === value) { 63253 return interfaceFunction.position; 63254 } 63255 63256 if (shape.r.ix === value) { 63257 return interfaceFunction.roundness; 63258 } 63259 63260 if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') { 63261 return interfaceFunction.size; 63262 } 63263 63264 return null; 63265 } 63266 63267 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 63268 63269 var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; 63270 interfaceFunction.propertyIndex = shape.ix; 63271 prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); 63272 prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup)); 63273 prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); 63274 Object.defineProperties(interfaceFunction, { 63275 position: { 63276 get: ExpressionPropertyInterface(prop.p) 63277 }, 63278 roundness: { 63279 get: ExpressionPropertyInterface(prop.r) 63280 }, 63281 size: { 63282 get: ExpressionPropertyInterface(prop.s) 63283 }, 63284 _name: { 63285 value: shape.nm 63286 } 63287 }); 63288 interfaceFunction.mn = shape.mn; 63289 return interfaceFunction; 63290 } 63291 63292 function roundedInterfaceFactory(shape, view, propertyGroup) { 63293 function interfaceFunction(value) { 63294 if (shape.r.ix === value || value === 'Round Corners 1') { 63295 return interfaceFunction.radius; 63296 } 63297 63298 return null; 63299 } 63300 63301 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 63302 63303 var prop = view; 63304 interfaceFunction.propertyIndex = shape.ix; 63305 prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup)); 63306 Object.defineProperties(interfaceFunction, { 63307 radius: { 63308 get: ExpressionPropertyInterface(prop.rd) 63309 }, 63310 _name: { 63311 value: shape.nm 63312 } 63313 }); 63314 interfaceFunction.mn = shape.mn; 63315 return interfaceFunction; 63316 } 63317 63318 function repeaterInterfaceFactory(shape, view, propertyGroup) { 63319 function interfaceFunction(value) { 63320 if (shape.c.ix === value || value === 'Copies') { 63321 return interfaceFunction.copies; 63322 } 63323 63324 if (shape.o.ix === value || value === 'Offset') { 63325 return interfaceFunction.offset; 63326 } 63327 63328 return null; 63329 } 63330 63331 var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); 63332 63333 var prop = view; 63334 interfaceFunction.propertyIndex = shape.ix; 63335 prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup)); 63336 prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup)); 63337 Object.defineProperties(interfaceFunction, { 63338 copies: { 63339 get: ExpressionPropertyInterface(prop.c) 63340 }, 63341 offset: { 63342 get: ExpressionPropertyInterface(prop.o) 63343 }, 63344 _name: { 63345 value: shape.nm 63346 } 63347 }); 63348 interfaceFunction.mn = shape.mn; 63349 return interfaceFunction; 63350 } 63351 63352 return function (shapes, view, propertyGroup) { 63353 var interfaces; 63354 63355 function _interfaceFunction(value) { 63356 if (typeof value === 'number') { 63357 value = value === undefined ? 1 : value; 63358 63359 if (value === 0) { 63360 return propertyGroup; 63361 } 63362 63363 return interfaces[value - 1]; 63364 } 63365 63366 var i = 0; 63367 var len = interfaces.length; 63368 63369 while (i < len) { 63370 if (interfaces[i]._name === value) { 63371 return interfaces[i]; 63372 } 63373 63374 i += 1; 63375 } 63376 63377 return null; 63378 } 63379 63380 function parentGroupWrapper() { 63381 return propertyGroup; 63382 } 63383 63384 _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper); 63385 interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup); 63386 _interfaceFunction.numProperties = interfaces.length; 63387 _interfaceFunction._name = 'Contents'; 63388 return _interfaceFunction; 63389 }; 63390 }(); 63391 63392 var TextExpressionInterface = function () { 63393 return function (elem) { 63394 var _sourceText; 63395 63396 function _thisLayerFunction(name) { 63397 switch (name) { 63398 case 'ADBE Text Document': 63399 return _thisLayerFunction.sourceText; 63400 63401 default: 63402 return null; 63403 } 63404 } 63405 63406 Object.defineProperty(_thisLayerFunction, 'sourceText', { 63407 get: function get() { 63408 elem.textProperty.getValue(); 63409 var stringValue = elem.textProperty.currentData.t; 63410 63411 if (!_sourceText || stringValue !== _sourceText.value) { 63412 _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers 63413 // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive 63414 63415 _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers 63416 63417 Object.defineProperty(_sourceText, 'style', { 63418 get: function get() { 63419 return { 63420 fillColor: elem.textProperty.currentData.fc 63421 }; 63422 } 63423 }); 63424 } 63425 63426 return _sourceText; 63427 } 63428 }); 63429 return _thisLayerFunction; 63430 }; 63431 }(); 63432 63433 function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 63434 63435 var FootageInterface = function () { 63436 var outlineInterfaceFactory = function outlineInterfaceFactory(elem) { 63437 var currentPropertyName = ''; 63438 var currentProperty = elem.getFootageData(); 63439 63440 function init() { 63441 currentPropertyName = ''; 63442 currentProperty = elem.getFootageData(); 63443 return searchProperty; 63444 } 63445 63446 function searchProperty(value) { 63447 if (currentProperty[value]) { 63448 currentPropertyName = value; 63449 currentProperty = currentProperty[value]; 63450 63451 if (_typeof(currentProperty) === 'object') { 63452 return searchProperty; 63453 } 63454 63455 return currentProperty; 63456 } 63457 63458 var propertyNameIndex = value.indexOf(currentPropertyName); 63459 63460 if (propertyNameIndex !== -1) { 63461 var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10); 63462 currentProperty = currentProperty[index]; 63463 63464 if (_typeof(currentProperty) === 'object') { 63465 return searchProperty; 63466 } 63467 63468 return currentProperty; 63469 } 63470 63471 return ''; 63472 } 63473 63474 return init; 63475 }; 63476 63477 var dataInterfaceFactory = function dataInterfaceFactory(elem) { 63478 function interfaceFunction(value) { 63479 if (value === 'Outline') { 63480 return interfaceFunction.outlineInterface(); 63481 } 63482 63483 return null; 63484 } 63485 63486 interfaceFunction._name = 'Outline'; 63487 interfaceFunction.outlineInterface = outlineInterfaceFactory(elem); 63488 return interfaceFunction; 63489 }; 63490 63491 return function (elem) { 63492 function _interfaceFunction(value) { 63493 if (value === 'Data') { 63494 return _interfaceFunction.dataInterface; 63495 } 63496 63497 return null; 63498 } 63499 63500 _interfaceFunction._name = 'Data'; 63501 _interfaceFunction.dataInterface = dataInterfaceFactory(elem); 63502 return _interfaceFunction; 63503 }; 63504 }(); 63505 63506 var interfaces = { 63507 layer: LayerExpressionInterface, 63508 effects: EffectsExpressionInterface, 63509 comp: CompExpressionInterface, 63510 shape: ShapeExpressionInterface, 63511 text: TextExpressionInterface, 63512 footage: FootageInterface 63513 }; 63514 63515 function getInterface(type) { 63516 return interfaces[type] || null; 63517 } 63518 63519 var expressionHelpers = function () { 63520 function searchExpressions(elem, data, prop) { 63521 if (data.x) { 63522 prop.k = true; 63523 prop.x = true; 63524 prop.initiateExpression = ExpressionManager.initiateExpression; 63525 prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop)); 63526 } 63527 } 63528 63529 function getValueAtTime(frameNum) { 63530 frameNum *= this.elem.globalData.frameRate; 63531 frameNum -= this.offsetTime; 63532 63533 if (frameNum !== this._cachingAtTime.lastFrame) { 63534 this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0; 63535 this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime); 63536 this._cachingAtTime.lastFrame = frameNum; 63537 } 63538 63539 return this._cachingAtTime.value; 63540 } 63541 63542 function getSpeedAtTime(frameNum) { 63543 var delta = -0.01; 63544 var v1 = this.getValueAtTime(frameNum); 63545 var v2 = this.getValueAtTime(frameNum + delta); 63546 var speed = 0; 63547 63548 if (v1.length) { 63549 var i; 63550 63551 for (i = 0; i < v1.length; i += 1) { 63552 speed += Math.pow(v2[i] - v1[i], 2); 63553 } 63554 63555 speed = Math.sqrt(speed) * 100; 63556 } else { 63557 speed = 0; 63558 } 63559 63560 return speed; 63561 } 63562 63563 function getVelocityAtTime(frameNum) { 63564 if (this.vel !== undefined) { 63565 return this.vel; 63566 } 63567 63568 var delta = -0.001; // frameNum += this.elem.data.st; 63569 63570 var v1 = this.getValueAtTime(frameNum); 63571 var v2 = this.getValueAtTime(frameNum + delta); 63572 var velocity; 63573 63574 if (v1.length) { 63575 velocity = createTypedArray('float32', v1.length); 63576 var i; 63577 63578 for (i = 0; i < v1.length; i += 1) { 63579 // removing frameRate 63580 // if needed, don't add it here 63581 // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta); 63582 velocity[i] = (v2[i] - v1[i]) / delta; 63583 } 63584 } else { 63585 velocity = (v2 - v1) / delta; 63586 } 63587 63588 return velocity; 63589 } 63590 63591 function getStaticValueAtTime() { 63592 return this.pv; 63593 } 63594 63595 function setGroupProperty(propertyGroup) { 63596 this.propertyGroup = propertyGroup; 63597 } 63598 63599 return { 63600 searchExpressions: searchExpressions, 63601 getSpeedAtTime: getSpeedAtTime, 63602 getVelocityAtTime: getVelocityAtTime, 63603 getValueAtTime: getValueAtTime, 63604 getStaticValueAtTime: getStaticValueAtTime, 63605 setGroupProperty: setGroupProperty 63606 }; 63607 }(); 63608 63609 function addPropertyDecorator() { 63610 function loopOut(type, duration, durationFlag) { 63611 if (!this.k || !this.keyframes) { 63612 return this.pv; 63613 } 63614 63615 type = type ? type.toLowerCase() : ''; 63616 var currentFrame = this.comp.renderedFrame; 63617 var keyframes = this.keyframes; 63618 var lastKeyFrame = keyframes[keyframes.length - 1].t; 63619 63620 if (currentFrame <= lastKeyFrame) { 63621 return this.pv; 63622 } 63623 63624 var cycleDuration; 63625 var firstKeyFrame; 63626 63627 if (!durationFlag) { 63628 if (!duration || duration > keyframes.length - 1) { 63629 duration = keyframes.length - 1; 63630 } 63631 63632 firstKeyFrame = keyframes[keyframes.length - 1 - duration].t; 63633 cycleDuration = lastKeyFrame - firstKeyFrame; 63634 } else { 63635 if (!duration) { 63636 cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip); 63637 } else { 63638 cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration); 63639 } 63640 63641 firstKeyFrame = lastKeyFrame - cycleDuration; 63642 } 63643 63644 var i; 63645 var len; 63646 var ret; 63647 63648 if (type === 'pingpong') { 63649 var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration); 63650 63651 if (iterations % 2 !== 0) { 63652 return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line 63653 } 63654 } else if (type === 'offset') { 63655 var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); 63656 var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); 63657 var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line 63658 63659 var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration); 63660 63661 if (this.pv.length) { 63662 ret = new Array(initV.length); 63663 len = ret.length; 63664 63665 for (i = 0; i < len; i += 1) { 63666 ret[i] = (endV[i] - initV[i]) * repeats + current[i]; 63667 } 63668 63669 return ret; 63670 } 63671 63672 return (endV - initV) * repeats + current; 63673 } else if (type === 'continue') { 63674 var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); 63675 var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0); 63676 63677 if (this.pv.length) { 63678 ret = new Array(lastValue.length); 63679 len = ret.length; 63680 63681 for (i = 0; i < len; i += 1) { 63682 ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line 63683 } 63684 63685 return ret; 63686 } 63687 63688 return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001); 63689 } 63690 63691 return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line 63692 } 63693 63694 function loopIn(type, duration, durationFlag) { 63695 if (!this.k) { 63696 return this.pv; 63697 } 63698 63699 type = type ? type.toLowerCase() : ''; 63700 var currentFrame = this.comp.renderedFrame; 63701 var keyframes = this.keyframes; 63702 var firstKeyFrame = keyframes[0].t; 63703 63704 if (currentFrame >= firstKeyFrame) { 63705 return this.pv; 63706 } 63707 63708 var cycleDuration; 63709 var lastKeyFrame; 63710 63711 if (!durationFlag) { 63712 if (!duration || duration > keyframes.length - 1) { 63713 duration = keyframes.length - 1; 63714 } 63715 63716 lastKeyFrame = keyframes[duration].t; 63717 cycleDuration = lastKeyFrame - firstKeyFrame; 63718 } else { 63719 if (!duration) { 63720 cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame); 63721 } else { 63722 cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration); 63723 } 63724 63725 lastKeyFrame = firstKeyFrame + cycleDuration; 63726 } 63727 63728 var i; 63729 var len; 63730 var ret; 63731 63732 if (type === 'pingpong') { 63733 var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration); 63734 63735 if (iterations % 2 === 0) { 63736 return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line 63737 } 63738 } else if (type === 'offset') { 63739 var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); 63740 var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); 63741 var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); 63742 var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1; 63743 63744 if (this.pv.length) { 63745 ret = new Array(initV.length); 63746 len = ret.length; 63747 63748 for (i = 0; i < len; i += 1) { 63749 ret[i] = current[i] - (endV[i] - initV[i]) * repeats; 63750 } 63751 63752 return ret; 63753 } 63754 63755 return current - (endV - initV) * repeats; 63756 } else if (type === 'continue') { 63757 var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); 63758 var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0); 63759 63760 if (this.pv.length) { 63761 ret = new Array(firstValue.length); 63762 len = ret.length; 63763 63764 for (i = 0; i < len; i += 1) { 63765 ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001; 63766 } 63767 63768 return ret; 63769 } 63770 63771 return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001; 63772 } 63773 63774 return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line 63775 } 63776 63777 function smooth(width, samples) { 63778 if (!this.k) { 63779 return this.pv; 63780 } 63781 63782 width = (width || 0.4) * 0.5; 63783 samples = Math.floor(samples || 5); 63784 63785 if (samples <= 1) { 63786 return this.pv; 63787 } 63788 63789 var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate; 63790 var initFrame = currentTime - width; 63791 var endFrame = currentTime + width; 63792 var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1; 63793 var i = 0; 63794 var j = 0; 63795 var value; 63796 63797 if (this.pv.length) { 63798 value = createTypedArray('float32', this.pv.length); 63799 } else { 63800 value = 0; 63801 } 63802 63803 var sampleValue; 63804 63805 while (i < samples) { 63806 sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency); 63807 63808 if (this.pv.length) { 63809 for (j = 0; j < this.pv.length; j += 1) { 63810 value[j] += sampleValue[j]; 63811 } 63812 } else { 63813 value += sampleValue; 63814 } 63815 63816 i += 1; 63817 } 63818 63819 if (this.pv.length) { 63820 for (j = 0; j < this.pv.length; j += 1) { 63821 value[j] /= samples; 63822 } 63823 } else { 63824 value /= samples; 63825 } 63826 63827 return value; 63828 } 63829 63830 function getTransformValueAtTime(time) { 63831 if (!this._transformCachingAtTime) { 63832 this._transformCachingAtTime = { 63833 v: new Matrix() 63834 }; 63835 } /// / 63836 63837 63838 var matrix = this._transformCachingAtTime.v; 63839 matrix.cloneFromProps(this.pre.props); 63840 63841 if (this.appliedTransformations < 1) { 63842 var anchor = this.a.getValueAtTime(time); 63843 matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult); 63844 } 63845 63846 if (this.appliedTransformations < 2) { 63847 var scale = this.s.getValueAtTime(time); 63848 matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult); 63849 } 63850 63851 if (this.sk && this.appliedTransformations < 3) { 63852 var skew = this.sk.getValueAtTime(time); 63853 var skewAxis = this.sa.getValueAtTime(time); 63854 matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult); 63855 } 63856 63857 if (this.r && this.appliedTransformations < 4) { 63858 var rotation = this.r.getValueAtTime(time); 63859 matrix.rotate(-rotation * this.r.mult); 63860 } else if (!this.r && this.appliedTransformations < 4) { 63861 var rotationZ = this.rz.getValueAtTime(time); 63862 var rotationY = this.ry.getValueAtTime(time); 63863 var rotationX = this.rx.getValueAtTime(time); 63864 var orientation = this.or.getValueAtTime(time); 63865 matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult); 63866 } 63867 63868 if (this.data.p && this.data.p.s) { 63869 var positionX = this.px.getValueAtTime(time); 63870 var positionY = this.py.getValueAtTime(time); 63871 63872 if (this.data.p.z) { 63873 var positionZ = this.pz.getValueAtTime(time); 63874 matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult); 63875 } else { 63876 matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0); 63877 } 63878 } else { 63879 var position = this.p.getValueAtTime(time); 63880 matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult); 63881 } 63882 63883 return matrix; /// / 63884 } 63885 63886 function getTransformStaticValueAtTime() { 63887 return this.v.clone(new Matrix()); 63888 } 63889 63890 var getTransformProperty = TransformPropertyFactory.getTransformProperty; 63891 63892 TransformPropertyFactory.getTransformProperty = function (elem, data, container) { 63893 var prop = getTransformProperty(elem, data, container); 63894 63895 if (prop.dynamicProperties.length) { 63896 prop.getValueAtTime = getTransformValueAtTime.bind(prop); 63897 } else { 63898 prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop); 63899 } 63900 63901 prop.setGroupProperty = expressionHelpers.setGroupProperty; 63902 return prop; 63903 }; 63904 63905 var propertyGetProp = PropertyFactory.getProp; 63906 63907 PropertyFactory.getProp = function (elem, data, type, mult, container) { 63908 var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime; 63909 // prop.loopOut = loopOut; 63910 // prop.loopIn = loopIn; 63911 63912 if (prop.kf) { 63913 prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop); 63914 } else { 63915 prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop); 63916 } 63917 63918 prop.setGroupProperty = expressionHelpers.setGroupProperty; 63919 prop.loopOut = loopOut; 63920 prop.loopIn = loopIn; 63921 prop.smooth = smooth; 63922 prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop); 63923 prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop); 63924 prop.numKeys = data.a === 1 ? data.k.length : 0; 63925 prop.propertyIndex = data.ix; 63926 var value = 0; 63927 63928 if (type !== 0) { 63929 value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length); 63930 } 63931 63932 prop._cachingAtTime = { 63933 lastFrame: initialDefaultFrame, 63934 lastIndex: 0, 63935 value: value 63936 }; 63937 expressionHelpers.searchExpressions(elem, data, prop); 63938 63939 if (prop.k) { 63940 container.addDynamicProperty(prop); 63941 } 63942 63943 return prop; 63944 }; 63945 63946 function getShapeValueAtTime(frameNum) { 63947 // For now this caching object is created only when needed instead of creating it when the shape is initialized. 63948 if (!this._cachingAtTime) { 63949 this._cachingAtTime = { 63950 shapeValue: shapePool.clone(this.pv), 63951 lastIndex: 0, 63952 lastTime: initialDefaultFrame 63953 }; 63954 } 63955 63956 frameNum *= this.elem.globalData.frameRate; 63957 frameNum -= this.offsetTime; 63958 63959 if (frameNum !== this._cachingAtTime.lastTime) { 63960 this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0; 63961 this._cachingAtTime.lastTime = frameNum; 63962 this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime); 63963 } 63964 63965 return this._cachingAtTime.shapeValue; 63966 } 63967 63968 var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction(); 63969 var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction(); 63970 63971 function ShapeExpressions() {} 63972 63973 ShapeExpressions.prototype = { 63974 vertices: function vertices(prop, time) { 63975 if (this.k) { 63976 this.getValue(); 63977 } 63978 63979 var shapePath = this.v; 63980 63981 if (time !== undefined) { 63982 shapePath = this.getValueAtTime(time, 0); 63983 } 63984 63985 var i; 63986 var len = shapePath._length; 63987 var vertices = shapePath[prop]; 63988 var points = shapePath.v; 63989 var arr = createSizedArray(len); 63990 63991 for (i = 0; i < len; i += 1) { 63992 if (prop === 'i' || prop === 'o') { 63993 arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]]; 63994 } else { 63995 arr[i] = [vertices[i][0], vertices[i][1]]; 63996 } 63997 } 63998 63999 return arr; 64000 }, 64001 points: function points(time) { 64002 return this.vertices('v', time); 64003 }, 64004 inTangents: function inTangents(time) { 64005 return this.vertices('i', time); 64006 }, 64007 outTangents: function outTangents(time) { 64008 return this.vertices('o', time); 64009 }, 64010 isClosed: function isClosed() { 64011 return this.v.c; 64012 }, 64013 pointOnPath: function pointOnPath(perc, time) { 64014 var shapePath = this.v; 64015 64016 if (time !== undefined) { 64017 shapePath = this.getValueAtTime(time, 0); 64018 } 64019 64020 if (!this._segmentsLength) { 64021 this._segmentsLength = bez.getSegmentsLength(shapePath); 64022 } 64023 64024 var segmentsLength = this._segmentsLength; 64025 var lengths = segmentsLength.lengths; 64026 var lengthPos = segmentsLength.totalLength * perc; 64027 var i = 0; 64028 var len = lengths.length; 64029 var accumulatedLength = 0; 64030 var pt; 64031 64032 while (i < len) { 64033 if (accumulatedLength + lengths[i].addedLength > lengthPos) { 64034 var initIndex = i; 64035 var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1; 64036 var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength; 64037 pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]); 64038 break; 64039 } else { 64040 accumulatedLength += lengths[i].addedLength; 64041 } 64042 64043 i += 1; 64044 } 64045 64046 if (!pt) { 64047 pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]]; 64048 } 64049 64050 return pt; 64051 }, 64052 vectorOnPath: function vectorOnPath(perc, time, vectorType) { 64053 // perc doesn't use triple equality because it can be a Number object as well as a primitive. 64054 if (perc == 1) { 64055 // eslint-disable-line eqeqeq 64056 perc = this.v.c; 64057 } else if (perc == 0) { 64058 // eslint-disable-line eqeqeq 64059 perc = 0.999; 64060 } 64061 64062 var pt1 = this.pointOnPath(perc, time); 64063 var pt2 = this.pointOnPath(perc + 0.001, time); 64064 var xLength = pt2[0] - pt1[0]; 64065 var yLength = pt2[1] - pt1[1]; 64066 var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2)); 64067 64068 if (magnitude === 0) { 64069 return [0, 0]; 64070 } 64071 64072 var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude]; 64073 return unitVector; 64074 }, 64075 tangentOnPath: function tangentOnPath(perc, time) { 64076 return this.vectorOnPath(perc, time, 'tangent'); 64077 }, 64078 normalOnPath: function normalOnPath(perc, time) { 64079 return this.vectorOnPath(perc, time, 'normal'); 64080 }, 64081 setGroupProperty: expressionHelpers.setGroupProperty, 64082 getValueAtTime: expressionHelpers.getStaticValueAtTime 64083 }; 64084 extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction); 64085 extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction); 64086 KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime; 64087 KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression; 64088 var propertyGetShapeProp = ShapePropertyFactory.getShapeProp; 64089 64090 ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) { 64091 var prop = propertyGetShapeProp(elem, data, type, arr, trims); 64092 prop.propertyIndex = data.ix; 64093 prop.lock = false; 64094 64095 if (type === 3) { 64096 expressionHelpers.searchExpressions(elem, data.pt, prop); 64097 } else if (type === 4) { 64098 expressionHelpers.searchExpressions(elem, data.ks, prop); 64099 } 64100 64101 if (prop.k) { 64102 elem.addDynamicProperty(prop); 64103 } 64104 64105 return prop; 64106 }; 64107 } 64108 64109 function initialize$1() { 64110 addPropertyDecorator(); 64111 } 64112 64113 function addDecorator() { 64114 function searchExpressions() { 64115 if (this.data.d.x) { 64116 this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this); 64117 this.addEffect(this.getExpressionValue.bind(this)); 64118 return true; 64119 } 64120 64121 return null; 64122 } 64123 64124 TextProperty.prototype.getExpressionValue = function (currentValue, text) { 64125 var newValue = this.calculateExpression(text); 64126 64127 if (currentValue.t !== newValue) { 64128 var newData = {}; 64129 this.copyData(newData, currentValue); 64130 newData.t = newValue.toString(); 64131 newData.__complete = false; 64132 return newData; 64133 } 64134 64135 return currentValue; 64136 }; 64137 64138 TextProperty.prototype.searchProperty = function () { 64139 var isKeyframed = this.searchKeyframes(); 64140 var hasExpressions = this.searchExpressions(); 64141 this.kf = isKeyframed || hasExpressions; 64142 return this.kf; 64143 }; 64144 64145 TextProperty.prototype.searchExpressions = searchExpressions; 64146 } 64147 64148 function initialize() { 64149 addDecorator(); 64150 } 64151 64152 function SVGComposableEffect() {} 64153 64154 SVGComposableEffect.prototype = { 64155 createMergeNode: function createMergeNode(resultId, ins) { 64156 var feMerge = createNS('feMerge'); 64157 feMerge.setAttribute('result', resultId); 64158 var feMergeNode; 64159 var i; 64160 64161 for (i = 0; i < ins.length; i += 1) { 64162 feMergeNode = createNS('feMergeNode'); 64163 feMergeNode.setAttribute('in', ins[i]); 64164 feMerge.appendChild(feMergeNode); 64165 feMerge.appendChild(feMergeNode); 64166 } 64167 64168 return feMerge; 64169 } 64170 }; 64171 64172 var linearFilterValue = '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'; 64173 64174 function SVGTintFilter(filter, filterManager, elem, id, source) { 64175 this.filterManager = filterManager; 64176 var feColorMatrix = createNS('feColorMatrix'); 64177 feColorMatrix.setAttribute('type', 'matrix'); 64178 feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB'); 64179 feColorMatrix.setAttribute('values', linearFilterValue + ' 1 0'); 64180 this.linearFilter = feColorMatrix; 64181 feColorMatrix.setAttribute('result', id + '_tint_1'); 64182 filter.appendChild(feColorMatrix); 64183 feColorMatrix = createNS('feColorMatrix'); 64184 feColorMatrix.setAttribute('type', 'matrix'); 64185 feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB'); 64186 feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'); 64187 feColorMatrix.setAttribute('result', id + '_tint_2'); 64188 filter.appendChild(feColorMatrix); 64189 this.matrixFilter = feColorMatrix; 64190 var feMerge = this.createMergeNode(id, [source, id + '_tint_1', id + '_tint_2']); 64191 filter.appendChild(feMerge); 64192 } 64193 64194 extendPrototype([SVGComposableEffect], SVGTintFilter); 64195 64196 SVGTintFilter.prototype.renderFrame = function (forceRender) { 64197 if (forceRender || this.filterManager._mdf) { 64198 var colorBlack = this.filterManager.effectElements[0].p.v; 64199 var colorWhite = this.filterManager.effectElements[1].p.v; 64200 var opacity = this.filterManager.effectElements[2].p.v / 100; 64201 this.linearFilter.setAttribute('values', linearFilterValue + ' ' + opacity + ' 0'); 64202 this.matrixFilter.setAttribute('values', colorWhite[0] - colorBlack[0] + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 1 0'); 64203 } 64204 }; 64205 64206 function SVGFillFilter(filter, filterManager, elem, id) { 64207 this.filterManager = filterManager; 64208 var feColorMatrix = createNS('feColorMatrix'); 64209 feColorMatrix.setAttribute('type', 'matrix'); 64210 feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB'); 64211 feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'); 64212 feColorMatrix.setAttribute('result', id); 64213 filter.appendChild(feColorMatrix); 64214 this.matrixFilter = feColorMatrix; 64215 } 64216 64217 SVGFillFilter.prototype.renderFrame = function (forceRender) { 64218 if (forceRender || this.filterManager._mdf) { 64219 var color = this.filterManager.effectElements[2].p.v; 64220 var opacity = this.filterManager.effectElements[6].p.v; 64221 this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0'); 64222 } 64223 }; 64224 64225 function SVGStrokeEffect(fil, filterManager, elem) { 64226 this.initialized = false; 64227 this.filterManager = filterManager; 64228 this.elem = elem; 64229 this.paths = []; 64230 } 64231 64232 SVGStrokeEffect.prototype.initialize = function () { 64233 var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes; 64234 var path; 64235 var groupPath; 64236 var i; 64237 var len; 64238 64239 if (this.filterManager.effectElements[1].p.v === 1) { 64240 len = this.elem.maskManager.masksProperties.length; 64241 i = 0; 64242 } else { 64243 i = this.filterManager.effectElements[0].p.v - 1; 64244 len = i + 1; 64245 } 64246 64247 groupPath = createNS('g'); 64248 groupPath.setAttribute('fill', 'none'); 64249 groupPath.setAttribute('stroke-linecap', 'round'); 64250 groupPath.setAttribute('stroke-dashoffset', 1); 64251 64252 for (i; i < len; i += 1) { 64253 path = createNS('path'); 64254 groupPath.appendChild(path); 64255 this.paths.push({ 64256 p: path, 64257 m: i 64258 }); 64259 } 64260 64261 if (this.filterManager.effectElements[10].p.v === 3) { 64262 var mask = createNS('mask'); 64263 var id = createElementID(); 64264 mask.setAttribute('id', id); 64265 mask.setAttribute('mask-type', 'alpha'); 64266 mask.appendChild(groupPath); 64267 this.elem.globalData.defs.appendChild(mask); 64268 var g = createNS('g'); 64269 g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')'); 64270 64271 while (elemChildren[0]) { 64272 g.appendChild(elemChildren[0]); 64273 } 64274 64275 this.elem.layerElement.appendChild(g); 64276 this.masker = mask; 64277 groupPath.setAttribute('stroke', '#fff'); 64278 } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) { 64279 if (this.filterManager.effectElements[10].p.v === 2) { 64280 elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes; 64281 64282 while (elemChildren.length) { 64283 this.elem.layerElement.removeChild(elemChildren[0]); 64284 } 64285 } 64286 64287 this.elem.layerElement.appendChild(groupPath); 64288 this.elem.layerElement.removeAttribute('mask'); 64289 groupPath.setAttribute('stroke', '#fff'); 64290 } 64291 64292 this.initialized = true; 64293 this.pathMasker = groupPath; 64294 }; 64295 64296 SVGStrokeEffect.prototype.renderFrame = function (forceRender) { 64297 if (!this.initialized) { 64298 this.initialize(); 64299 } 64300 64301 var i; 64302 var len = this.paths.length; 64303 var mask; 64304 var path; 64305 64306 for (i = 0; i < len; i += 1) { 64307 if (this.paths[i].m !== -1) { 64308 mask = this.elem.maskManager.viewData[this.paths[i].m]; 64309 path = this.paths[i].p; 64310 64311 if (forceRender || this.filterManager._mdf || mask.prop._mdf) { 64312 path.setAttribute('d', mask.lastPath); 64313 } 64314 64315 if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) { 64316 var dasharrayValue; 64317 64318 if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) { 64319 var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01; 64320 var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01; 64321 var l = path.getTotalLength(); 64322 dasharrayValue = '0 0 0 ' + l * s + ' '; 64323 var lineLength = l * (e - s); 64324 var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01; 64325 var units = Math.floor(lineLength / segment); 64326 var j; 64327 64328 for (j = 0; j < units; j += 1) { 64329 dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' '; 64330 } 64331 64332 dasharrayValue += '0 ' + l * 10 + ' 0 0'; 64333 } else { 64334 dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01; 64335 } 64336 64337 path.setAttribute('stroke-dasharray', dasharrayValue); 64338 } 64339 } 64340 } 64341 64342 if (forceRender || this.filterManager.effectElements[4].p._mdf) { 64343 this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2); 64344 } 64345 64346 if (forceRender || this.filterManager.effectElements[6].p._mdf) { 64347 this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v); 64348 } 64349 64350 if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) { 64351 if (forceRender || this.filterManager.effectElements[3].p._mdf) { 64352 var color = this.filterManager.effectElements[3].p.v; 64353 this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')'); 64354 } 64355 } 64356 }; 64357 64358 function SVGTritoneFilter(filter, filterManager, elem, id) { 64359 this.filterManager = filterManager; 64360 var feColorMatrix = createNS('feColorMatrix'); 64361 feColorMatrix.setAttribute('type', 'matrix'); 64362 feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB'); 64363 feColorMatrix.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'); 64364 filter.appendChild(feColorMatrix); 64365 var feComponentTransfer = createNS('feComponentTransfer'); 64366 feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB'); 64367 feComponentTransfer.setAttribute('result', id); 64368 this.matrixFilter = feComponentTransfer; 64369 var feFuncR = createNS('feFuncR'); 64370 feFuncR.setAttribute('type', 'table'); 64371 feComponentTransfer.appendChild(feFuncR); 64372 this.feFuncR = feFuncR; 64373 var feFuncG = createNS('feFuncG'); 64374 feFuncG.setAttribute('type', 'table'); 64375 feComponentTransfer.appendChild(feFuncG); 64376 this.feFuncG = feFuncG; 64377 var feFuncB = createNS('feFuncB'); 64378 feFuncB.setAttribute('type', 'table'); 64379 feComponentTransfer.appendChild(feFuncB); 64380 this.feFuncB = feFuncB; 64381 filter.appendChild(feComponentTransfer); 64382 } 64383 64384 SVGTritoneFilter.prototype.renderFrame = function (forceRender) { 64385 if (forceRender || this.filterManager._mdf) { 64386 var color1 = this.filterManager.effectElements[0].p.v; 64387 var color2 = this.filterManager.effectElements[1].p.v; 64388 var color3 = this.filterManager.effectElements[2].p.v; 64389 var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0]; 64390 var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1]; 64391 var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2]; 64392 this.feFuncR.setAttribute('tableValues', tableR); 64393 this.feFuncG.setAttribute('tableValues', tableG); 64394 this.feFuncB.setAttribute('tableValues', tableB); 64395 } 64396 }; 64397 64398 function SVGProLevelsFilter(filter, filterManager, elem, id) { 64399 this.filterManager = filterManager; 64400 var effectElements = this.filterManager.effectElements; 64401 var feComponentTransfer = createNS('feComponentTransfer'); // Red 64402 64403 if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) { 64404 this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer); 64405 } // Green 64406 64407 64408 if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) { 64409 this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer); 64410 } // Blue 64411 64412 64413 if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) { 64414 this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer); 64415 } // Alpha 64416 64417 64418 if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) { 64419 this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer); 64420 } // RGB 64421 64422 64423 if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) { 64424 feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB'); 64425 filter.appendChild(feComponentTransfer); 64426 } 64427 64428 if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) { 64429 feComponentTransfer = createNS('feComponentTransfer'); 64430 feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB'); 64431 feComponentTransfer.setAttribute('result', id); 64432 filter.appendChild(feComponentTransfer); 64433 this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer); 64434 this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer); 64435 this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer); 64436 } 64437 } 64438 64439 SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) { 64440 var feFunc = createNS(type); 64441 feFunc.setAttribute('type', 'table'); 64442 feComponentTransfer.appendChild(feFunc); 64443 return feFunc; 64444 }; 64445 64446 SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) { 64447 var cnt = 0; 64448 var segments = 256; 64449 var perc; 64450 var min = Math.min(inputBlack, inputWhite); 64451 var max = Math.max(inputBlack, inputWhite); 64452 var table = Array.call(null, { 64453 length: segments 64454 }); 64455 var colorValue; 64456 var pos = 0; 64457 var outputDelta = outputWhite - outputBlack; 64458 var inputDelta = inputWhite - inputBlack; 64459 64460 while (cnt <= 256) { 64461 perc = cnt / 256; 64462 64463 if (perc <= min) { 64464 colorValue = inputDelta < 0 ? outputWhite : outputBlack; 64465 } else if (perc >= max) { 64466 colorValue = inputDelta < 0 ? outputBlack : outputWhite; 64467 } else { 64468 colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma); 64469 } 64470 64471 table[pos] = colorValue; 64472 pos += 1; 64473 cnt += 256 / (segments - 1); 64474 } 64475 64476 return table.join(' '); 64477 }; 64478 64479 SVGProLevelsFilter.prototype.renderFrame = function (forceRender) { 64480 if (forceRender || this.filterManager._mdf) { 64481 var val; 64482 var effectElements = this.filterManager.effectElements; 64483 64484 if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) { 64485 val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v); 64486 this.feFuncRComposed.setAttribute('tableValues', val); 64487 this.feFuncGComposed.setAttribute('tableValues', val); 64488 this.feFuncBComposed.setAttribute('tableValues', val); 64489 } 64490 64491 if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) { 64492 val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v); 64493 this.feFuncR.setAttribute('tableValues', val); 64494 } 64495 64496 if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) { 64497 val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v); 64498 this.feFuncG.setAttribute('tableValues', val); 64499 } 64500 64501 if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) { 64502 val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v); 64503 this.feFuncB.setAttribute('tableValues', val); 64504 } 64505 64506 if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) { 64507 val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v); 64508 this.feFuncA.setAttribute('tableValues', val); 64509 } 64510 } 64511 }; 64512 64513 function SVGDropShadowEffect(filter, filterManager, elem, id, source) { 64514 var globalFilterSize = filterManager.container.globalData.renderConfig.filterSize; 64515 var filterSize = filterManager.data.fs || globalFilterSize; 64516 filter.setAttribute('x', filterSize.x || globalFilterSize.x); 64517 filter.setAttribute('y', filterSize.y || globalFilterSize.y); 64518 filter.setAttribute('width', filterSize.width || globalFilterSize.width); 64519 filter.setAttribute('height', filterSize.height || globalFilterSize.height); 64520 this.filterManager = filterManager; 64521 var feGaussianBlur = createNS('feGaussianBlur'); 64522 feGaussianBlur.setAttribute('in', 'SourceAlpha'); 64523 feGaussianBlur.setAttribute('result', id + '_drop_shadow_1'); 64524 feGaussianBlur.setAttribute('stdDeviation', '0'); 64525 this.feGaussianBlur = feGaussianBlur; 64526 filter.appendChild(feGaussianBlur); 64527 var feOffset = createNS('feOffset'); 64528 feOffset.setAttribute('dx', '25'); 64529 feOffset.setAttribute('dy', '0'); 64530 feOffset.setAttribute('in', id + '_drop_shadow_1'); 64531 feOffset.setAttribute('result', id + '_drop_shadow_2'); 64532 this.feOffset = feOffset; 64533 filter.appendChild(feOffset); 64534 var feFlood = createNS('feFlood'); 64535 feFlood.setAttribute('flood-color', '#00ff00'); 64536 feFlood.setAttribute('flood-opacity', '1'); 64537 feFlood.setAttribute('result', id + '_drop_shadow_3'); 64538 this.feFlood = feFlood; 64539 filter.appendChild(feFlood); 64540 var feComposite = createNS('feComposite'); 64541 feComposite.setAttribute('in', id + '_drop_shadow_3'); 64542 feComposite.setAttribute('in2', id + '_drop_shadow_2'); 64543 feComposite.setAttribute('operator', 'in'); 64544 feComposite.setAttribute('result', id + '_drop_shadow_4'); 64545 filter.appendChild(feComposite); 64546 var feMerge = this.createMergeNode(id, [id + '_drop_shadow_4', source]); 64547 filter.appendChild(feMerge); // 64548 } 64549 64550 extendPrototype([SVGComposableEffect], SVGDropShadowEffect); 64551 64552 SVGDropShadowEffect.prototype.renderFrame = function (forceRender) { 64553 if (forceRender || this.filterManager._mdf) { 64554 if (forceRender || this.filterManager.effectElements[4].p._mdf) { 64555 this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4); 64556 } 64557 64558 if (forceRender || this.filterManager.effectElements[0].p._mdf) { 64559 var col = this.filterManager.effectElements[0].p.v; 64560 this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255))); 64561 } 64562 64563 if (forceRender || this.filterManager.effectElements[1].p._mdf) { 64564 this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255); 64565 } 64566 64567 if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) { 64568 var distance = this.filterManager.effectElements[3].p.v; 64569 var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads; 64570 var x = distance * Math.cos(angle); 64571 var y = distance * Math.sin(angle); 64572 this.feOffset.setAttribute('dx', x); 64573 this.feOffset.setAttribute('dy', y); 64574 } 64575 } 64576 }; 64577 64578 var _svgMatteSymbols = []; 64579 64580 function SVGMatte3Effect(filterElem, filterManager, elem) { 64581 this.initialized = false; 64582 this.filterManager = filterManager; 64583 this.filterElem = filterElem; 64584 this.elem = elem; 64585 elem.matteElement = createNS('g'); 64586 elem.matteElement.appendChild(elem.layerElement); 64587 elem.matteElement.appendChild(elem.transformedElement); 64588 elem.baseElement = elem.matteElement; 64589 } 64590 64591 SVGMatte3Effect.prototype.findSymbol = function (mask) { 64592 var i = 0; 64593 var len = _svgMatteSymbols.length; 64594 64595 while (i < len) { 64596 if (_svgMatteSymbols[i] === mask) { 64597 return _svgMatteSymbols[i]; 64598 } 64599 64600 i += 1; 64601 } 64602 64603 return null; 64604 }; 64605 64606 SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) { 64607 var parentNode = mask.layerElement.parentNode; 64608 64609 if (!parentNode) { 64610 return; 64611 } 64612 64613 var children = parentNode.children; 64614 var i = 0; 64615 var len = children.length; 64616 64617 while (i < len) { 64618 if (children[i] === mask.layerElement) { 64619 break; 64620 } 64621 64622 i += 1; 64623 } 64624 64625 var nextChild; 64626 64627 if (i <= len - 2) { 64628 nextChild = children[i + 1]; 64629 } 64630 64631 var useElem = createNS('use'); 64632 useElem.setAttribute('href', '#' + symbolId); 64633 64634 if (nextChild) { 64635 parentNode.insertBefore(useElem, nextChild); 64636 } else { 64637 parentNode.appendChild(useElem); 64638 } 64639 }; 64640 64641 SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) { 64642 if (!this.findSymbol(mask)) { 64643 var symbolId = createElementID(); 64644 var masker = createNS('mask'); 64645 masker.setAttribute('id', mask.layerId); 64646 masker.setAttribute('mask-type', 'alpha'); 64647 64648 _svgMatteSymbols.push(mask); 64649 64650 var defs = elem.globalData.defs; 64651 defs.appendChild(masker); 64652 var symbol = createNS('symbol'); 64653 symbol.setAttribute('id', symbolId); 64654 this.replaceInParent(mask, symbolId); 64655 symbol.appendChild(mask.layerElement); 64656 defs.appendChild(symbol); 64657 var useElem = createNS('use'); 64658 useElem.setAttribute('href', '#' + symbolId); 64659 masker.appendChild(useElem); 64660 mask.data.hd = false; 64661 mask.show(); 64662 } 64663 64664 elem.setMatte(mask.layerId); 64665 }; 64666 64667 SVGMatte3Effect.prototype.initialize = function () { 64668 var ind = this.filterManager.effectElements[0].p.v; 64669 var elements = this.elem.comp.elements; 64670 var i = 0; 64671 var len = elements.length; 64672 64673 while (i < len) { 64674 if (elements[i] && elements[i].data.ind === ind) { 64675 this.setElementAsMask(this.elem, elements[i]); 64676 } 64677 64678 i += 1; 64679 } 64680 64681 this.initialized = true; 64682 }; 64683 64684 SVGMatte3Effect.prototype.renderFrame = function () { 64685 if (!this.initialized) { 64686 this.initialize(); 64687 } 64688 }; 64689 64690 function SVGGaussianBlurEffect(filter, filterManager, elem, id) { 64691 // Outset the filter region by 100% on all sides to accommodate blur expansion. 64692 filter.setAttribute('x', '-100%'); 64693 filter.setAttribute('y', '-100%'); 64694 filter.setAttribute('width', '300%'); 64695 filter.setAttribute('height', '300%'); 64696 this.filterManager = filterManager; 64697 var feGaussianBlur = createNS('feGaussianBlur'); 64698 feGaussianBlur.setAttribute('result', id); 64699 filter.appendChild(feGaussianBlur); 64700 this.feGaussianBlur = feGaussianBlur; 64701 } 64702 64703 SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) { 64704 if (forceRender || this.filterManager._mdf) { 64705 // Empirical value, matching AE's blur appearance. 64706 var kBlurrinessToSigma = 0.3; 64707 var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping: 64708 // 64709 // 1 -> horizontal & vertical 64710 // 2 -> horizontal only 64711 // 3 -> vertical only 64712 // 64713 64714 var dimensions = this.filterManager.effectElements[1].p.v; 64715 var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq 64716 64717 var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq 64718 64719 this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping: 64720 // 64721 // 0 -> off -> duplicate 64722 // 1 -> on -> wrap 64723 64724 var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq 64725 64726 this.feGaussianBlur.setAttribute('edgeMode', edgeMode); 64727 } 64728 }; 64729 64730 function TransformEffect() {} 64731 64732 TransformEffect.prototype.init = function (effectsManager) { 64733 this.effectsManager = effectsManager; 64734 this.type = effectTypes.TRANSFORM_EFFECT; 64735 this.matrix = new Matrix(); 64736 this.opacity = -1; 64737 this._mdf = false; 64738 this._opMdf = false; 64739 }; 64740 64741 TransformEffect.prototype.renderFrame = function (forceFrame) { 64742 this._opMdf = false; 64743 this._mdf = false; 64744 64745 if (forceFrame || this.effectsManager._mdf) { 64746 var effectElements = this.effectsManager.effectElements; 64747 var anchor = effectElements[0].p.v; 64748 var position = effectElements[1].p.v; 64749 var isUniformScale = effectElements[2].p.v === 1; 64750 var scaleHeight = effectElements[3].p.v; 64751 var scaleWidth = isUniformScale ? scaleHeight : effectElements[4].p.v; 64752 var skew = effectElements[5].p.v; 64753 var skewAxis = effectElements[6].p.v; 64754 var rotation = effectElements[7].p.v; 64755 this.matrix.reset(); 64756 this.matrix.translate(-anchor[0], -anchor[1], anchor[2]); 64757 this.matrix.scale(scaleWidth * 0.01, scaleHeight * 0.01, 1); 64758 this.matrix.rotate(-rotation * degToRads); 64759 this.matrix.skewFromAxis(-skew * degToRads, (skewAxis + 90) * degToRads); 64760 this.matrix.translate(position[0], position[1], 0); 64761 this._mdf = true; 64762 64763 if (this.opacity !== effectElements[8].p.v) { 64764 this.opacity = effectElements[8].p.v; 64765 this._opMdf = true; 64766 } 64767 } 64768 }; 64769 64770 function SVGTransformEffect(_, filterManager) { 64771 this.init(filterManager); 64772 } 64773 64774 extendPrototype([TransformEffect], SVGTransformEffect); 64775 64776 function CVTransformEffect(effectsManager) { 64777 this.init(effectsManager); 64778 } 64779 64780 extendPrototype([TransformEffect], CVTransformEffect); 64781 64782 registerRenderer('canvas', CanvasRenderer); 64783 registerRenderer('html', HybridRenderer); 64784 registerRenderer('svg', SVGRenderer); // Registering shape modifiers 64785 64786 ShapeModifiers.registerModifier('tm', TrimModifier); 64787 ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier); 64788 ShapeModifiers.registerModifier('rp', RepeaterModifier); 64789 ShapeModifiers.registerModifier('rd', RoundCornersModifier); 64790 ShapeModifiers.registerModifier('zz', ZigZagModifier); 64791 ShapeModifiers.registerModifier('op', OffsetPathModifier); // Registering expression plugin 64792 64793 setExpressionsPlugin(Expressions); 64794 setExpressionInterfaces(getInterface); 64795 initialize$1(); 64796 initialize(); // Registering svg effects 64797 64798 registerEffect$1(20, SVGTintFilter, true); 64799 registerEffect$1(21, SVGFillFilter, true); 64800 registerEffect$1(22, SVGStrokeEffect, false); 64801 registerEffect$1(23, SVGTritoneFilter, true); 64802 registerEffect$1(24, SVGProLevelsFilter, true); 64803 registerEffect$1(25, SVGDropShadowEffect, true); 64804 registerEffect$1(28, SVGMatte3Effect, false); 64805 registerEffect$1(29, SVGGaussianBlurEffect, true); 64806 registerEffect$1(35, SVGTransformEffect, false); 64807 registerEffect(35, CVTransformEffect); 64808 64809 return lottie; 64810 64811})); 64812 64813!/** 64814 * Highcharts JS v11.4.8 (2024-08-29) 64815 *
64816 * (c) 2009-2024 Torstein Honsi 64817 * 64818 * License: www.highcharts.com/license 64819 */function(t,e){"object"==typeof module&&module.exports?(e.default=e,module.exports=t&&t.document?e(t):e):"function"==typeof define&&define.amd?define("highcharts/highcharts",function(){return e(t)}):(t.Highcharts&&t.Highcharts.error(16,!0),t.Highcharts=e(t))}("undefined"!=typeof window?window:this,function(t){"use strict";var e={};function i(e,i,s,r){!e.hasOwnProperty(i)&&(e[i]=r.apply(null,s),t&&"function"==typeof CustomEvent&&t.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}return i(e,"Core/Globals.js",[],function(){var e,i;return(i=e||(e={})).SVG_NS="http://www.w3.org/2000/svg",i.product="Highcharts",i.version="11.4.8",i.win=void 0!==t?t:{},i.doc=i.win.document,i.svg=i.doc&&i.doc.createElementNS&&!!i.doc.createElementNS(i.SVG_NS,"svg").createSVGRect,i.userAgent=i.win.navigator&&i.win.navigator.userAgent||"",i.isChrome=i.win.chrome,i.isFirefox=-1!==i.userAgent.indexOf("Firefox"),i.isMS=/(edge|msie|trident)/i.test(i.userAgent)&&!i.win.opera,i.isSafari=!i.isChrome&&-1!==i.userAgent.indexOf("Safari"),i.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(i.userAgent),i.isWebKit=-1!==i.userAgent.indexOf("AppleWebKit"),i.deg2rad=2*Math.PI/360,i.hasBidiBug=i.isFirefox&&4>parseInt(i.userAgent.split("Firefox/")[1],10),i.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],i.noop=function(){},i.supportsPassiveEvents=function(){let t=!1;if(!i.isMS){let e=Object.defineProperty({},"passive",{get:function(){t=!0}});i.win.addEventListener&&i.win.removeEventListener&&(i.win.addEventListener("testPassive",i.noop,e),i.win.removeEventListener("testPassive",i.noop,e))}return t}(),i.charts=[],i.composed=[],i.dateFormats={},i.seriesTypes={},i.symbolSizes={},i.chartCount=0,e}),i(e,"Core/Utilities.js",[e["Core/Globals.js"]],function(t){let e;let{charts:i,doc:s,win:r}=t;function o(e,i,s,n){let a=i?"Highcharts error":"Highcharts warning";32===e&&(e=`${a}: Deprecated member`);let h=p(e),l=h?`${a} #${e}: www.highcharts.com/errors/${e}/`:e.toString();if(void 0!==n){let t="";h&&(l+="?"),C(n,function(e,i){t+=` 64820 - ${i}: ${e}`,h&&(l+=encodeURI(i)+"="+encodeURI(e))}),l+=t}M(t,"displayError",{chart:s,code:e,message:l,params:n},function(){if(i)throw Error(l);r.console&&-1===o.messages.indexOf(l)&&console.warn(l)}),o.messages.push(l)}function n(t,e){return parseInt(t,e||10)}function a(t){return"string"==typeof t}function h(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function l(t,e){return!!t&&"object"==typeof t&&(!e||!h(t))}function d(t){return l(t)&&"number"==typeof t.nodeType}function c(t){let e=t&&t.constructor;return!!(l(t,!0)&&!d(t)&&e&&e.name&&"Object"!==e.name)}function p(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function u(t){return null!=t}function g(t,e,i){let s;let r=a(e)&&!u(i),o=(e,i)=>{u(e)?t.setAttribute(i,e):r?(s=t.getAttribute(i))||"class"!==i||(s=t.getAttribute(i+"Name")):t.removeAttribute(i)};return a(e)?o(i,e):C(e,o),s}function f(t){return h(t)?t:[t]}function m(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function x(){let t=arguments,e=t.length;for(let i=0;i<e;i++){let e=t[i];if(null!=e)return e}}function y(t,e){m(t.style,e)}function b(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function v(t,e){return t>1e14?t:parseFloat(t.toPrecision(e||14))}(o||(o={})).messages=[],Math.easeInOutSine=function(t){return -.5*(Math.cos(Math.PI*t)-1)};let S=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let i;let s=t.length;for(i=0;i<s;i++)if(e(t[i],i))return t[i]};function C(t,e,i){for(let s in t)Object.hasOwnProperty.call(t,s)&&e.call(i||t[s],t[s],s,t)}function k(t,e,i){function s(e,i){let s=t.removeEventListener;s&&s.call(t,e,i,!1)}function r(i){let r,o;t.nodeName&&(e?(r={})[e]=!0:r=i,C(r,function(t,e){if(i[e])for(o=i[e].length;o--;)s(e,i[e][o].fn)}))}let o="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(o,"hcEvents")){let t=o.hcEvents;if(e){let o=t[e]||[];i?(t[e]=o.filter(function(t){return i!==t.fn}),s(e,i)):(r(t),t[e]=[])}else r(t),delete o.hcEvents}}function M(e,i,r,o){if(r=r||{}
vendor: 4,897 bytes, line 64820
64820,s.createEvent&&(e.dispatchEvent||e.fireEvent&&e!==t)){let t=s.createEvent("Events");t.initEvent(i,!0,!0),r=m(t,r),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(i,r)}else if(e.hcEvents){r.target||m(r,{preventDefault:function(){r.defaultPrevented=!0},target:e,type:i});let t=[],s=e,o=!1;for(;s.hcEvents;)Object.hasOwnProperty.call(s,"hcEvents")&&s.hcEvents[i]&&(t.length&&(o=!0),t.unshift.apply(t,s.hcEvents[i])),s=Object.getPrototypeOf(s);o&&t.sort((t,e)=>t.order-e.order),t.forEach(t=>{!1===t.fn.call(e,r)&&r.preventDefault()})}o&&!r.defaultPrevented&&o.call(e,r)}C({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(e,i){t[i]=function(t){return o(32,!1,void 0,{[`Highcharts.${i}`]:`use Array.${e}`}),Array.prototype[e].apply(t,[].slice.call(arguments,1))}});let w=function(){let t=Math.random().toString(36).substring(2,9)+"-",i=0;return function(){return"highcharts-"+(e?"":t)+i++}}();return r.jQuery&&(r.jQuery.fn.highcharts=function(){let e=[].slice.call(arguments);if(this[0])return e[0]?(new t[a(e[0])?e.shift():"Chart"](this[0],e[0],e[1]),this):i[g(this[0],"data-highcharts-chart")]}),{addEvent:function(e,i,s,r={}){let o="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let n=o.hcEvents;t.Point&&e instanceof t.Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);let a=e.addEventListener;a&&a.call(e,i,s,!!t.supportsPassiveEvents&&{passive:void 0===r.passive?-1!==i.indexOf("touch"):r.passive,capture:!1}),n[i]||(n[i]=[]);let h={fn:s,order:"number"==typeof r.order?r.order:1/0};return n[i].push(h),n[i].sort((t,e)=>t.order-e.order),function(){k(e,i,s)}},arrayMax:function(t){let e=t.length,i=t[0];for(;e--;)t[e]>i&&(i=t[e]);return i},arrayMin:function(t){let e=t.length,i=t[0];for(;e--;)t[e]<i&&(i=t[e]);return i},attr:g,clamp:function(t,e,i){return t>e?t<i?t:i:e},clearTimeout:function(t){u(t)&&clearTimeout(t)},correctFloat:v,createElement:function(t,e,i,r,o){let n=s.createElement(t);return e&&m(n,e),o&&y(n,{padding:"0",border:"none",margin:"0"}),i&&y(n,i),r&&r.appendChild(n),n},crisp:(t,e=0,i)=>{let s=e%2/2,r=i?-1:1;return(Math.round(t*r-s)+s)*r},css:y,defined:u,destroyObjectProperties:function(t,e,i){C(t,function(s,r){s!==e&&s?.destroy&&s.destroy(),(s?.destroy||!i)&&delete t[r]})},diffObjects:function(t,e,i,s){let r={};return function t(e,r,o,n){let a=i?r:e;C(e,function(i,d){if(!n&&s&&s.indexOf(d)>-1&&r[d]){i=f(i),o[d]=[];for(let e=0;e<Math.max(i.length,r[d].length);e++)r[d][e]&&(void 0===i[e]?o[d][e]=r[d][e]:(o[d][e]={},t(i[e],r[d][e],o[d][e],n+1)))}else l(i,!0)&&!i.nodeType?(o[d]=h(i)?[]:{},t(i,r[d]||{},o[d],n+1),0!==Object.keys(o[d]).length||"colorAxis"===d&&0===n||delete o[d]):(e[d]!==r[d]||d in e&&!(d in r))&&"__proto__"!==d&&"constructor"!==d&&(o[d]=a[d])})}(t,e,r,0),r},discardElement:function(t){t&&t.parentElement&&t.parentElement.removeChild(t)},erase:function(t,e){let i=t.length;for(;i--;)if(t[i]===e){t.splice(i,1);break}},error:o,extend:m,extendClass:function(t,e){let i=function(){};return i.prototype=new t,m(i.prototype,e),i},find:S,fireEvent:M,getClosestDistance:function(t,e){let i,s,r,o;let n=!e;return t.forEach(t=>{if(t.length>1)for(o=s=t.length-1;o>0;o--)(r=t[o]-t[o-1])<0&&!n?(e?.(),e=void 0):r&&(void 0===i||r<i)&&(i=r)}),i},getMagnitude:b,getNestedProperty:function(t,e){let i=t.split(".");for(;i.length&&u(e);){let t=i.shift();if(void 0===t||"__proto__"===t)return;if("this"===t){let t;return l(e)&&(t=e["@this"]),t??e}let s=e[t];if(!u(s)||"function"==typeof s||"number"==typeof s.nodeType||s===r)return;e=s}return e},getStyle:function t(e,i,s){let o;if("width"===i){let i=Math.min(e.offsetWidth,e.scrollWidth),s=e.getBoundingClientRect&&e.getBoundingClientRect().width;return s<i&&s>=i-1&&(i=Math.floor(s)),Math.max(0,i-(t(e,"padding-left",!0)||0)-(t(e,"padding-right",!0)||0))}if("height"===i)return Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-(t(e,"padding-top",!0)||0)-(t(e,"padding-bottom",!0)||0));let a=r.getComputedStyle(e,void 0);return a&&(o=a.getPropertyValue(i),x(s,"opacity"!==i)&&(o=n(o))),o},inArray:function(t,e,i){return o(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),e.indexOf(t,i)},insertItem:function(t,e){let i;let s=t.options.index,r=e.length;for(i=t.options.isInternal?r:0;i<r+1;i++)if(!e[i]||p(s)&&s<x(e[i].options.index,e[i]._i)||e[i].options.isInternal){e.splice(i,0,t);break}return i},isArray:h,isClass:c,isDOMElement:d,isFunction:function(t){return"function"==typeof t},isNumber:p,isObject:l,isString:a,keys:function(t){return o(32,!1,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(t)},merge:function(){let t,e=arguments,i={},s=function(t,e){return"object"!=typeof t&&(t={}),C(e,function(i,r){"__proto__"!==r&&"constructor"!==r&&(!l(i,!0)||c(i)||d(i)?t[r]=e[r]:t[r]=s(t[r]||{},i))}),t};!0===e[0]&&(i=e[1],e=Array.prototype.slice.call(e,2));let r=e.length;for(t=0;t<r;t++)i=s(i,e[t]);return i}
64820,normalizeTickInterval:function(t,e,i,s,r){let o,n=t;i=x(i,b(t));let a=t/i;for(!e&&(e=r?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===s&&(1===i?e=e.filter(function(t){return t%1==0}):i<=.1&&(e=[1/i]))),o=0;o<e.length&&(n=e[o],(!r||!(n*i>=t))&&(r||!(a<=(e[o]+(e[o+1]||e[o]))/2)));o++);return v(n*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:C,offset:function(t){let e=s.documentElement,i=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i.top+(r.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(r.pageXOffset||e.scrollLeft)-(e.clientLeft||0),width:i.width,height:i.height}},pad:function(t,e,i){return Array((e||2)+1-String(t).replace("-","").length).join(i||"0")+t},pick:x,pInt:n,pushUnique:function(t,e){return 0>t.indexOf(e)&&!!t.push(e)},relativeLength:function(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)},removeEvent:k,replaceNested:function(t,...e){let i,s;do for(s of(i=t,e))t=t.replace(s[0],s[1]);while(t!==i);return t},splat:f,stableSort:function(t,e){let i,s;let r=t.length;for(s=0;s<r;s++)t[s].safeI=s;for(t.sort(function(t,s){return 0===(i=e(t,s))?t.safeI-s.safeI:i}),s=0;s<r;s++)delete t[s].safeI},syncTimeout:function(t,e,i){return e>0?setTimeout(t,e,i):(t.call(0,i),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:w,useSerialIds:function(t){return e=x(t,e)},wrap:function(t,e,i){let s=t[e];t[e]=function(){let t=arguments,e=this;return i.apply(this,[function(){return s.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}}}),i(e,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),i(e,"Core/Color/Palettes.js",[],function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}}),i(e,"Core/Time.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{win:i}=t,{defined:s,error:r,extend:o,isNumber:n,isObject:a,merge:h,objectEach:l,pad:d,pick:c,splat:p,timeUnits:u}=e,g=t.isSafari&&i.Intl&&i.Intl.DateTimeFormat.prototype.formatRange,f=t.isSafari&&i.Intl&&!i.Intl.DateTimeFormat.prototype.formatRange;class m{constructor(t){this.options={},this.useUTC=!1,this.variableTimezone=!1,this.Date=i.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(t)}get(t,e){if(this.variableTimezone||this.timezoneOffset){let i=e.getTime(),s=i-this.getTimezoneOffset(e);e.setTime(s);let r=e["getUTC"+t]();return e.setTime(i),r}return this.useUTC?e["getUTC"+t]():e["get"+t]()}set(t,e,i){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===t||"Seconds"===t||"Minutes"===t&&this.getTimezoneOffset(e)%36e5==0)return e["setUTC"+t](i);let s=this.getTimezoneOffset(e),r=e.getTime()-s;e.setTime(r),e["setUTC"+t](i);let o=this.getTimezoneOffset(e);return r=e.getTime()+o,e.setTime(r)}return this.useUTC||g&&"FullYear"===t?e["setUTC"+t](i):e["set"+t](i)}update(t={}){let e=c(t.useUTC,!0);this.options=t=h(!0,this.options,t),this.Date=t.Date||i.Date||Date,this.useUTC=e,this.timezoneOffset=e&&t.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=e&&!!(t.getTimezoneOffset||t.timezone)}makeTime(t,e,i,s,r,o){let n,a,h;return this.useUTC?(n=this.Date.UTC.apply(0,arguments),a=this.getTimezoneOffset(n),n+=a,a!==(h=this.getTimezoneOffset(n))?n+=h-a:a-36e5!==this.getTimezoneOffset(n-36e5)||f||(n-=36e5)):n=new this.Date(t,e,c(i,1),c(s,0),c(r,0),c(o,0)).getTime(),n}timezoneOffsetFunction(){let t=this,e=this.options,i=e.getTimezoneOffset;return this.useUTC?e.timezone?t=>{try{let i=`shortOffset,${e.timezone||""}`,[s,r,o,a,h=0]=(m.formatCache[i]=m.formatCache[i]||Intl.DateTimeFormat("en",{timeZone:e.timezone,timeZoneName:"shortOffset"}
64820)).format(t).split(/(GMT|:)/).map(Number),l=-(36e5*(o+h/60));if(n(l))return l}catch(t){r(34)}return 0}:this.useUTC&&i?t=>6e4*i(t.valueOf()):()=>6e4*(t.timezoneOffset||0):t=>6e4*new Date(t.toString()).getTimezoneOffset()}dateFormat(e,i,r){if(!s(i)||isNaN(i))return t.defaultOptions.lang&&t.defaultOptions.lang.invalidDate||"";e=c(e,"%Y-%m-%d %H:%M:%S");let n=this,a=new this.Date(i),h=this.get("Hours",a),p=this.get("Day",a),u=this.get("Date",a),g=this.get("Month",a),f=this.get("FullYear",a),m=t.defaultOptions.lang,x=m&&m.weekdays,y=m&&m.shortWeekdays;return l(o({a:y?y[p]:x[p].substr(0,3),A:x[p],d:d(u),e:d(u,2," "),w:p,b:m.shortMonths[g],B:m.months[g],m:d(g+1),o:g+1,y:f.toString().substr(2,2),Y:f,H:d(h),k:h,I:d(h%12||12),l:h%12||12,M:d(this.get("Minutes",a)),p:h<12?"AM":"PM",P:h<12?"am":"pm",S:d(this.get("Seconds",a)),L:d(Math.floor(i%1e3),3)},t.dateFormats),function(t,s){for(;-1!==e.indexOf("%"+s);)e=e.replace("%"+s,"function"==typeof t?t.call(n,i):t)}),r?e.substr(0,1).toUpperCase()+e.substr(1):e}resolveDTLFormat(t){return a(t,!0)?t:{main:(t=p(t))[0],from:t[1],to:t[2]}}getTimeTicks(t,e,i,r){let n,a,h,l;let d=this,p=d.Date,g=[],f={},m=new p(e),x=t.unitRange,y=t.count||1;if(r=c(r,1),s(e)){d.set("Milliseconds",m,x>=u.second?0:y*Math.floor(d.get("Milliseconds",m)/y)),x>=u.second&&d.set("Seconds",m,x>=u.minute?0:y*Math.floor(d.get("Seconds",m)/y)),x>=u.minute&&d.set("Minutes",m,x>=u.hour?0:y*Math.floor(d.get("Minutes",m)/y)),x>=u.hour&&d.set("Hours",m,x>=u.day?0:y*Math.floor(d.get("Hours",m)/y)),x>=u.day&&d.set("Date",m,x>=u.month?1:Math.max(1,y*Math.floor(d.get("Date",m)/y))),x>=u.month&&(d.set("Month",m,x>=u.year?0:y*Math.floor(d.get("Month",m)/y)),a=d.get("FullYear",m)),x>=u.year&&(a-=a%y,d.set("FullYear",m,a)),x===u.week&&(l=d.get("Day",m),d.set("Date",m,d.get("Date",m)-l+r+(l<r?-7:0))),a=d.get("FullYear",m);let t=d.get("Month",m),o=d.get("Date",m),c=d.get("Hours",m);e=m.getTime(),(d.variableTimezone||!d.useUTC)&&s(i)&&(h=i-e>4*u.month||d.getTimezoneOffset(e)!==d.getTimezoneOffset(i));let p=m.getTime();for(n=1;p<i;)g.push(p),x===u.year?p=d.makeTime(a+n*y,0):x===u.month?p=d.makeTime(a,t+n*y):h&&(x===u.day||x===u.week)?p=d.makeTime(a,t,o+n*y*(x===u.day?1:7)):h&&x===u.hour&&y>1?p=d.makeTime(a,t,o,c+n*y):p+=x*y,n++;g.push(p),x<=u.hour&&g.length<1e4&&g.forEach(function(t){t%18e5==0&&"000000000"===d.dateFormat("%H%M%S%L",t)&&(f[t]="day")})}return g.info=o(t,{higherRanks:f,totalRange:x*y}),g}getDateFormat(t,e,i,s){let r=this.dateFormat("%m-%d %H:%M:%S.%L",e),o="01-01 00:00:00.000",n={millisecond:15,second:12,minute:9,hour:6,day:3},a="millisecond",h=a;for(a in u){if(t===u.week&&+this.dateFormat("%w",e)===i&&r.substr(6)===o.substr(6)){a="week";break}if(u[a]>t){a=h;break}if(n[a]&&r.substr(n[a])!==o.substr(n[a]))break;"week"!==a&&(h=a)}return this.resolveDTLFormat(s[a]).main}}return m.formatCache={},m}),i(e,"Core/Defaults.js",[e["Core/Chart/ChartDefaults.js"],e["Core/Globals.js"],e["Core/Color/Palettes.js"],e["Core/Time.js"],e["Core/Utilities.js"]],function(t,e,i,s,r){let{isTouchDevice:o}=e,{fireEvent:n,merge:a}=r,h={colors:i.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:t,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:"",align:"center",widthAdjust:-44},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:t=>Math.sqrt(1-Math.pow(t-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %e %b, %H:%M:%S.%L",second:"%A, %e %b, %H:%M:%S",minute:"%A, %e %b, %H:%M",hour:"%A, %e %b, %H:%M",day:"%A, %e %b %Y",week:"Week from %A, %e %b %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:o?25:10,headerFormat:'<span style="font-size: 0.8em">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">â</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};h.chart.styledMode=!1;let l=new s(h.time);return{defaultOptions:h,defaultTime:l,getOptions:function(){return h},setOptions:function(t){return n(e,"setOptions",{options:t}),a(!0,h,t),(t.time||t.global)&&(e.time?e.time.update(a(h.global,h.time,t.global,t.time)):e.time=l),h}}}),i(e,"Core/Color/Color.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{isNumber:i,merge:s,pInt:r}=e;class o{static parse(t){return t?new o(t):o.None}constructor(e){let i,s,r,n;this.rgba=[NaN,NaN,NaN,NaN],this.input=e;let a=t.Color;if(a&&a!==o)return new a(e);if("object"==typeof e&&void 0!==e.stops)this.stops=e.stops.map(t=>new o(t[1]));else if("string"==typeof e){if(this.input=e=o.names[e.toLowerCase()]||e,"#"===e.charAt(0)){let t=e.length,i=parseInt(e.substr(1),16);7===t?s=[(16711680&i)>>16,(65280&i)>>8,255&i,1]:4===t&&(s=[(3840&i)>>4|(3840&i)>>8,(240&i)>>4|240&i,(15&i)<<4|15&i,1])}if(!s)for(r=o.parsers.length;r--&&!s;)(i=(n=o.parsers[r]).regex.exec(e))&&(s=n.parse(i))}s&&(this.rgba=s)}get(t){let e=this.input,r=this.rgba;if("object"==typeof e&&void 0!==this.stops){let i=s(e);return i.stops=[].slice.call(i.stops),this.stops.forEach((e,s)=>{i.stops[s]=[i.stops[s][0],e.get(t)]}),i}return r&&i(r[0])?"rgb"!==t&&(t||1!==r[3])?"a"===t?`${r[3]}`:"rgba("+r.join(",")+")":"rgb("+r[0]+","+r[1]+","+r[2]+")":e}brighten(t){let e=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(i(t)&&0!==t)for(let i=0;i<3;i++)e[i]+=r(255*t),e[i]<0&&(e[i]=0),e[i]>255&&(e[i]=255);return this}setOpacity(t){return this.rgba[3]=t,this}tweenTo(t,e){let s=this.rgba,r=t.rgba;
64820if(!i(s[0])||!i(r[0]))return t.input||"none";let o=1!==r[3]||1!==s[3];return(o?"rgba(":"rgb(")+Math.round(r[0]+(s[0]-r[0])*(1-e))+","+Math.round(r[1]+(s[1]-r[1])*(1-e))+","+Math.round(r[2]+(s[2]-r[2])*(1-e))+(o?","+(r[3]+(s[3]-r[3])*(1-e)):"")+")"}}return o.names={white:"#ffffff",black:"#000000"},o.parsers=[{regex:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?(?:\.\d+)?)\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),1]}}],o.None=new o(""),o}),i(e,"Core/Animation/Fx.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){let{parse:s}=t,{win:r}=e,{isNumber:o,objectEach:n}=i;class a{constructor(t,e,i){this.pos=NaN,this.options=e,this.elem=t,this.prop=i}dSetter(){let t=this.paths,e=t&&t[0],i=t&&t[1],s=this.now||0,r=[];if(1!==s&&e&&i){if(e.length===i.length&&s<1)for(let t=0;t<i.length;t++){let n=e[t],a=i[t],h=[];for(let t=0;t<a.length;t++){let e=n[t],i=a[t];o(e)&&o(i)&&!("A"===a[0]&&(4===t||5===t))?h[t]=e+s*(i-e):h[t]=i}r.push(h)}else r=i}else r=this.toD||[];this.elem.attr("d",r,void 0,!0)}update(){let t=this.elem,e=this.prop,i=this.now,s=this.options.step;this[e+"Setter"]?this[e+"Setter"]():t.attr?t.element&&t.attr(e,i,null,!0):t.style[e]=i+this.unit,s&&s.call(t,i,this)}run(t,e,i){let s=this,o=s.options,n=function(t){return!n.stopped&&s.step(t)},h=r.requestAnimationFrame||function(t){setTimeout(t,13)},l=function(){for(let t=0;t<a.timers.length;t++)a.timers[t]()||a.timers.splice(t--,1);a.timers.length&&h(l)};t!==e||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=t,this.end=e,this.unit=i,this.now=this.start,this.pos=0,n.elem=this.elem,n.prop=this.prop,n()&&1===a.timers.push(n)&&h(l)):(delete o.curAnim[this.prop],o.complete&&0===Object.keys(o.curAnim).length&&o.complete.call(this.elem))}step(t){let e,i;let s=+new Date,r=this.options,o=this.elem,a=r.complete,h=r.duration,l=r.curAnim;return o.attr&&!o.element?e=!1:t||s>=h+this.startTime?(this.now=this.end,this.pos=1,this.update(),l[this.prop]=!0,i=!0,n(l,function(t){!0!==t&&(i=!1)}),i&&a&&a.call(o),e=!1):(this.pos=r.easing((s-this.startTime)/h),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e}initPath(t,e,i){let s=t.startX,r=t.endX,n=i.slice(),a=t.isArea,h=a?2:1,l=e&&i.length>e.length&&i.hasStackedCliffs,d,c,p,u,g=e&&e.slice();if(!g||l)return[n,n];function f(t,e){for(;t.length<c;){let i=t[0],s=e[c-t.length];if(s&&"M"===i[0]&&("C"===s[0]?t[0]=["C",i[1],i[2],i[1],i[2],i[1],i[2]]:t[0]=["L",i[1],i[2]]),t.unshift(i),a){let e=t.pop();t.push(t[t.length-1],e)}}}function m(t){for(;t.length<c;){let e=t[Math.floor(t.length/h)-1].slice();if("C"===e[0]&&(e[1]=e[5],e[2]=e[6]),a){let i=t[Math.floor(t.length/h)].slice();t.splice(t.length/2,0,e,i)}else t.push(e)}}if(s&&r&&r.length){for(p=0;p<s.length;p++){if(s[p]===r[0]){d=p;break}if(s[0]===r[r.length-s.length+p]){d=p,u=!0;break}if(s[s.length-1]===r[r.length-s.length+p]){d=s.length-p;break}}void 0===d&&(g=[])}return g.length&&o(d)&&(c=n.length+d*h,u?(f(g,n),m(n)):(f(n,g),m(g))),[g,n]}fillSetter(){a.prototype.strokeSetter.apply(this,arguments)}strokeSetter(){this.elem.attr(this.prop,s(this.start).tweenTo(s(this.end),this.pos),void 0,!0)}}return a.timers=[],a}),i(e,"Core/Animation/AnimationUtilities.js",[e["Core/Animation/Fx.js"],e["Core/Utilities.js"]],function(t,e){let{defined:i,getStyle:s,isArray:r,isNumber:o,isObject:n,merge:a,objectEach:h,pick:l}=e;function d(t){return n(t)?a({duration:500,defer:0},t):{duration:t?500:0,defer:0}}function c(e,i){let s=t.timers.length;for(;s--;)t.timers[s].elem!==e||i&&i!==t.timers[s].prop||(t.timers[s].stopped=!0)}return{animate:function(e,i,l){let d,p="",u,g,f;n(l)||(f=arguments,l={duration:f[2],easing:f[3],complete:f[4]}),o(l.duration)||(l.duration=400),l.easing="function"==typeof l.easing?l.easing:Math[l.easing]||Math.easeInOutSine,l.curAnim=a(i),h(i,function(o,n){c(e,n),g=new t(e,l,n),u=void 0,"d"===n&&r(i.d)?(g.paths=g.initPath(e,e.pathArray,i.d),g.toD=i.d,d=0,u=1):e.attr?d=e.attr(n):(d=parseFloat(s(e,n))||0,"opacity"!==n&&(p="px")),u||(u=o),"string"==typeof u&&u.match("px")&&(u=u.replace(/px/g,"")),g.run(d,u,p)})},animObject:d,getDeferredAnimation:function(t,e,s){let r=d(e),o=s?[s]:t.series,a=0,h=0;return o.forEach(t=>{let s=d(t.options.animation);a=n(e)&&i(e.defer)?r.defer:Math.max(a,s.duration+s.defer),h=Math.min(r.duration,s.duration)}),t.renderer.forExport&&(a=0),{defer:Math.max(0,a-h),duration:Math.min(a,h)}},setAnimation:function(t,e){e.renderer.globalAnimation=l(t,e.options.chart.animation,!0)},stop:c}}),i(e,"Core/Renderer/HTML/AST.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{SVG_NS:i,win:s}=t,{attr:r,createElement:o,css:n,error:a,isFunction:h,isString:l,objectEach:d,splat:c}=e,{trustedTypes:p}=s,u=p&&h(p.createPolicy)&&p.createPolicy("highcharts",{createHTML:t=>t}),g=u?u.createHTML(""):"",f=function(){try{return!!new DOMParser().parseFromString(g,"text/html")}catch(t){return!1}}();class m{static filterUserAttributes(t){return d(t,(e,i)=>{let s=!0;-1===m.allowedAttributes.indexOf(i)&&(s=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(i)&&(s=l(e)&&m.allowedReferences.some(t=>0===e.indexOf(t))),s||(a(33,!1,void 0,{"Invalid attribute in config":`${i}`}),delete t[i]),l(e)&&t[i]&&(t[i]=e.replace(/</g,"<"))}),t}static parseStyle(t){return t.split(";").reduce((t,e)=>{let i=e.split(":").map(t=>t.trim()),s=i.shift();return s&&i.length&&(t[s.replace(/-([a-z])/g,t=>t[1].toUpperCase())]=i.join(":")),t},{})}static setElementHTML(t,e){t.innerHTML=m.emptyHTML,e&&new m(e).addToDOM(t)}constructor(t){this.nodes="string"==typeof t?this.parseMarkup(t):t}addToDOM(e){return function e(s,o){let h;
64820return c(s).forEach(function(s){let l;let c=s.tagName,p=s.textContent?t.doc.createTextNode(s.textContent):void 0,u=m.bypassHTMLFiltering;if(c){if("#text"===c)l=p;else if(-1!==m.allowedTags.indexOf(c)||u){let a="svg"===c?i:o.namespaceURI||i,h=t.doc.createElementNS(a,c),g=s.attributes||{};d(s,function(t,e){"tagName"!==e&&"attributes"!==e&&"children"!==e&&"style"!==e&&"textContent"!==e&&(g[e]=t)}),r(h,u?g:m.filterUserAttributes(g)),s.style&&n(h,s.style),p&&h.appendChild(p),e(s.children||[],h),l=h}else a(33,!1,void 0,{"Invalid tagName in config":c})}l&&o.appendChild(l),h=l}),h}(this.nodes,e)}parseMarkup(t){let e;let i=[];if(t=t.trim().replace(/ style=(["'])/g," data-style=$1"),f)e=new DOMParser().parseFromString(u?u.createHTML(t):t,"text/html");else{let i=o("div");i.innerHTML=t,e={body:i}}let s=(t,e)=>{let i=t.nodeName.toLowerCase(),r={tagName:i};"#text"===i&&(r.textContent=t.textContent||"");let o=t.attributes;if(o){let t={};[].forEach.call(o,e=>{"data-style"===e.name?r.style=m.parseStyle(e.value):t[e.name]=e.value}),r.attributes=t}if(t.childNodes.length){let e=[];[].forEach.call(t.childNodes,t=>{s(t,e)}),e.length&&(r.children=e)}e.push(r)};return[].forEach.call(e.body.childNodes,t=>s(t,i)),i}}return m.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],m.allowedReferences=["https://","http://","mailto:","/","../","./","#"],m.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMorphology","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],m.emptyHTML=g,m.bypassHTMLFiltering=!1,m}),i(e,"Core/Templating.js",[e["Core/Defaults.js"],e["Core/Utilities.js"]],function(t,e){let{defaultOptions:i,defaultTime:s}=t,{extend:r,getNestedProperty:o,isArray:n,isNumber:a,isObject:h,pick:l,pInt:d}=e,c={add:(t,e)=>
64820t+e,divide:(t,e)=>0!==e?t/e:"",eq:(t,e)=>t==e,each:function(t){let e=arguments[arguments.length-1];return!!n(t)&&t.map((i,s)=>p(e.body,r(h(i)?i:{"@this":i},{"@index":s,"@first":0===s,"@last":s===t.length-1}))).join("")},ge:(t,e)=>t>=e,gt:(t,e)=>t>e,if:t=>!!t,le:(t,e)=>t<=e,lt:(t,e)=>t<e,multiply:(t,e)=>t*e,ne:(t,e)=>t!=e,subtract:(t,e)=>t-e,unless:t=>!t};function p(t="",e,r){let n=/\{([\w\:\.\,;\-\/<>%@"'â= #\(\)]+)\}/g,a=/\(([\w\:\.\,;\-\/<>%@"'= ]+)\)/g,h=[],d=/f$/,g=/\.(\d)/,f=i.lang,m=r&&r.time||s,x=r&&r.numberFormatter||u,y=(t="")=>{let i;return"true"===t||"false"!==t&&((i=Number(t)).toString()===t?i:o(t,e))},b,v,S=0,C;for(;null!==(b=n.exec(t));){let i=a.exec(b[1]);i&&(b=i,C=!0),v&&v.isBlock||(v={ctx:e,expression:b[1],find:b[0],isBlock:"#"===b[1].charAt(0),start:b.index,startInner:b.index+b[0].length,length:b[0].length});let s=b[1].split(" ")[0].replace("#","");c[s]&&(v.isBlock&&s===v.fn&&S++,v.fn||(v.fn=s));let r="else"===b[1];if(v.isBlock&&v.fn&&(b[1]===`/${v.fn}`||r)){if(S)!r&&S--;else{let e=v.startInner,i=t.substr(e,b.index-e);void 0===v.body?(v.body=i,v.startInner=b.index+b[0].length):v.elseBody=i,v.find+=i+b[0],r||(h.push(v),v=void 0)}}else v.isBlock||h.push(v);if(i&&!v?.isBlock)break}return h.forEach(i=>{let s,o;let{body:n,elseBody:a,expression:h,fn:u}=i;if(u){let t=[i],l=h.split(" ");for(o=c[u].length;o--;)t.unshift(y(l[o+1]));s=c[u].apply(e,t),i.isBlock&&"boolean"==typeof s&&(s=p(s?n:a,e,r))}else{let t=h.split(":");if(s=y(t.shift()||""),t.length&&"number"==typeof s){let e=t.join(":");if(d.test(e)){let t=parseInt((e.match(g)||["","-1"])[1],10);null!==s&&(s=x(s,t,f.decimalPoint,e.indexOf(",")>-1?f.thousandsSep:""))}else s=m.dateFormat(e,s)}}t=t.replace(i.find,l(s,""))}),C?p(t,e,r):t}function u(t,e,s,r){let o,n;t=+t||0,e=+e;let h=i.lang,c=(t.toString().split(".")[1]||"").split("e")[0].length,p=t.toString().split("e"),u=e;-1===e?e=Math.min(c,20):a(e)?e&&p[1]&&p[1]<0&&((n=e+ +p[1])>=0?(p[0]=(+p[0]).toExponential(n).split("e")[0],e=n):(p[0]=p[0].split(".")[0]||0,t=e<20?(p[0]*Math.pow(10,p[1])).toFixed(e):0,p[1]=0)):e=2;let g=(Math.abs(p[1]?p[0]:t)+Math.pow(10,-Math.max(e,c)-1)).toFixed(e),f=String(d(g)),m=f.length>3?f.length%3:0;return s=l(s,h.decimalPoint),r=l(r,h.thousandsSep),o=(t<0?"-":"")+(m?f.substr(0,m)+r:""),0>+p[1]&&!u?o="0":o+=f.substr(m).replace(/(\d{3})(?=\d)/g,"$1"+r),e?o+=s+g.slice(-e):0==+o&&(o="0"),p[1]&&0!=+o&&(o+="e"+p[1]),o}return{dateFormat:function(t,e,i){return s.dateFormat(t,e,i)},format:p,helpers:c,numberFormat:u}}),i(e,"Core/Renderer/RendererRegistry.js",[e["Core/Globals.js"]],function(t){var e,i;let s;return(i=e||(e={})).rendererTypes={},i.getRendererType=function(t=s){return i.rendererTypes[t]||i.rendererTypes[s]},i.registerRendererType=function(e,r,o){i.rendererTypes[e]=r,(!s||o)&&(s=e,t.Renderer=r)},e}),i(e,"Core/Renderer/RendererUtilities.js",[e["Core/Utilities.js"]],function(t){var e;let{clamp:i,pick:s,pushUnique:r,stableSort:o}=t;return(e||(e={})).distribute=function t(e,n,a){let h=e,l=h.reducedLen||n,d=(t,e)=>t.target-e.target,c=[],p=e.length,u=[],g=c.push,f,m,x,y=!0,b,v,S=0,C;for(f=p;f--;)S+=e[f].size;if(S>l){for(o(e,(t,e)=>(e.rank||0)-(t.rank||0)),x=(C=e[0].rank===e[e.length-1].rank)?p/2:-1,m=C?x:p-1;x&&S>l;)b=e[f=Math.floor(m)],r(u,f)&&(S-=b.size),m+=x,C&&m>=e.length&&(x/=2,m=x);u.sort((t,e)=>e-t).forEach(t=>g.apply(c,e.splice(t,1)))}for(o(e,d),e=e.map(t=>({size:t.size,targets:[t.target],align:s(t.align,.5)}));y;){for(f=e.length;f--;)b=e[f],v=(Math.min.apply(0,b.targets)+Math.max.apply(0,b.targets))/2,b.pos=i(v-b.size*b.align,0,n-b.size);for(f=e.length,y=!1;f--;)f>0&&e[f-1].pos+e[f-1].size>e[f].pos&&(e[f-1].size+=e[f].size,e[f-1].targets=e[f-1].targets.concat(e[f].targets),e[f-1].align=.5,e[f-1].pos+e[f-1].size>n&&(e[f-1].pos=n-e[f-1].size),e.splice(f,1),y=!0)}return g.apply(h,c),f=0,e.some(e=>{let i=0;return(e.targets||[]).some(()=>(h[f].pos=e.pos+i,void 0!==a&&Math.abs(h[f].pos-h[f].target)>a)?(h.slice(0,f+1).forEach(t=>delete t.pos),h.reducedLen=(h.reducedLen||n)-.1*n,h.reducedLen>.1*n&&t(h,n,a),!0):(i+=h[f].size,f++,!1))}),o(h,d),h},e}
vendor: 10,859 bytes, line 64820
64820),i(e,"Core/Renderer/SVG/SVGElement.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i,s){let{animate:r,animObject:o,stop:n}=t,{deg2rad:a,doc:h,svg:l,SVG_NS:d,win:c}=i,{addEvent:p,attr:u,createElement:g,crisp:f,css:m,defined:x,erase:y,extend:b,fireEvent:v,isArray:S,isFunction:C,isObject:k,isString:M,merge:w,objectEach:T,pick:A,pInt:P,pushUnique:L,replaceNested:O,syncTimeout:D,uniqueKey:E}=s;class I{_defaultGetter(t){let e=A(this[t+"Value"],this[t],this.element?this.element.getAttribute(t):null,0);return/^-?[\d\.]+$/.test(e)&&(e=parseFloat(e)),e}_defaultSetter(t,e,i){i.setAttribute(e,t)}add(t){let e;let i=this.renderer,s=this.element;return t&&(this.parentGroup=t),void 0!==this.textStr&&"text"===this.element.nodeName&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(s),this.onAdd&&this.onAdd(),this}addClass(t,e){let i=e?"":this.attr("class")||"";return(t=(t||"").split(/ /g).reduce(function(t,e){return -1===i.indexOf(e)&&t.push(e),t},i?[i]:[]).join(" "))!==i&&this.attr("class",t),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)}align(t,e,i,s=!0){let r,o,n,a;let h={},l=this.renderer,d=l.alignedObjects,c=!!t;t?(this.alignOptions=t,this.alignByTranslate=e,this.alignTo=i):(t=this.alignOptions||{},e=this.alignByTranslate,i=this.alignTo);let p=!i||M(i)?i||"renderer":void 0;p&&(c&&L(d,this),i=void 0);let u=A(i,l[p],l),g=t.align,f=t.verticalAlign;return r=(u.x||0)+(t.x||0),o=(u.y||0)+(t.y||0),"right"===g?n=1:"center"===g&&(n=2),n&&(r+=((u.width||0)-(t.width||0))/n),h[e?"translateX":"x"]=Math.round(r),"bottom"===f?a=1:"middle"===f&&(a=2),a&&(o+=((u.height||0)-(t.height||0))/a),h[e?"translateY":"y"]=Math.round(o),s&&(this[this.placed?"animate":"attr"](h),this.placed=!0),this.alignAttr=h,this}alignSetter(t){let e={left:"start",center:"middle",right:"end"};e[t]&&(this.alignValue=t,this.element.setAttribute("text-anchor",e[t]))}animate(t,e,i){let s=o(A(e,this.renderer.globalAnimation,!0)),n=s.defer;return h.hidden&&(s.duration=0),0!==s.duration?(i&&(s.complete=i),D(()=>{this.element&&r(this,t,s)},n)):(this.attr(t,void 0,i||s.complete),T(t,function(t,e){s.step&&s.step.call(this,t,{prop:e,pos:1,elem:this})},this)),this}applyTextOutline(t){let e=this.element;-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(e.style.fill)));let s=t.split(" "),r=s[s.length-1],o=s[0];if(o&&"none"!==o&&i.svg){this.fakeTS=!0,o=o.replace(/(^[\d\.]+)(.*?)$/g,function(t,e,i){return 2*Number(e)+i}),this.removeTextOutline();let t=h.createElementNS(d,"tspan");u(t,{class:"highcharts-text-outline",fill:r,stroke:r,"stroke-width":o,"stroke-linejoin":"round"});let i=e.querySelector("textPath")||e;[].forEach.call(i.childNodes,e=>{let i=e.cloneNode(!0);i.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(t=>i.removeAttribute(t)),t.appendChild(i)});let s=0;[].forEach.call(i.querySelectorAll("text tspan"),t=>{s+=Number(t.getAttribute("dy"))});let n=h.createElementNS(d,"tspan");n.textContent="â",u(n,{x:Number(e.getAttribute("x")),dy:-s}),t.appendChild(n),i.insertBefore(t,i.firstChild)}}attr(t,e,i,s){let{element:r}=this,o=I.symbolCustomAttribs,a,h,l=this,d;return"string"==typeof t&&void 0!==e&&(a=t,(t={})[a]=e),"string"==typeof t?l=(this[t+"Getter"]||this._defaultGetter).call(this,t,r):(T(t,function(e,i){d=!1,s||n(this,i),this.symbolName&&-1!==o.indexOf(i)&&(h||(this.symbolAttr(t),h=!0),d=!0),this.rotation&&("x"===i||"y"===i)&&(this.doTransform=!0),d||(this[i+"Setter"]||this._defaultSetter).call(this,e,i,r)},this),this.afterSetters()),i&&i.call(this),l}clip(t){if(t&&!t.clipPath){let e=E()+"-",i=this.renderer.createElement("clipPath").attr({id:e}).add(this.renderer.defs);b(t,{clipPath:i,id:e,count:0}),t.add(i)}return this.attr("clip-path",t?`url(${this.renderer.url}#${t.id})`:"none")}crisp(t,e){e=Math.round(e||t.strokeWidth||0);let i=t.x||this.x||0,s=t.y||this.y||0,r=(t.width||this.width||0)+i,o=(t.height||this.height||0)+s,n=f(i,e),a=f(s,e);return b(t,{x:n,y:a,width:f(r,e)-n,height:f(o,e)-a}),x(t.strokeWidth)&&(t.strokeWidth=e),t}complexColor(t,i,s){let r=this.renderer,o,n,a,h,l,d,c,p,u,g,f=[],m;v(this.renderer,"complexColor",{args:arguments},function(){if(t.radialGradient?n="radialGradient":t.linearGradient&&(n="linearGradient"),n){if(a=t[n],l=r.gradients,d=t.stops,u=s.radialReference,S(a)&&(t[n]=a={x1:a[0],y1:a[1],x2:a[2],y2:a[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===n&&u&&!x(a.gradientUnits)&&(h=a,a=w(a,r.getRadialAttr(u,h),{gradientUnits:"userSpaceOnUse"})),T(a,function(t,e){"id"!==e&&f.push(e,t)}),T(d,function(t){f.push(t)}),l[f=f.join(",")])g=l[f].attr("id");else{a.id=g=E();let t=l[f]=r.createElement(n).attr(a).add(r.defs);t.radAttr=h,t.stops=[],d.forEach(function(i){0===i[1].indexOf("rgba")?(c=(o=e.parse(i[1])).get("rgb"),p=o.get("a")):(c=i[1],p=1);let s=r.createElement("stop").attr({offset:i[0],"stop-color":c,"stop-opacity":p}).add(t);t.stops.push(s)})}m="url("+r.url+"#"+g+")",s.setAttribute(i,m),s.gradient=f,t.toString=function(){return m}}})}css(t){let e=this.styles,i={},s=this.element,r,o=!e;if(e&&T(t,function(t,s){e&&e[s]!==t&&(i[s]=t,o=!0)}),o){e&&(t=b(e,i)),null===t.width||"auto"===t.width?delete this.textWidth:"text"===s.nodeName.toLowerCase()&&t.width&&(r=this.textWidth=P(t.width)),b(this.styles,t),r&&!l&&this.renderer.forExport&&delete t.width;let o=w(t);s.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","width"].forEach(t=>o&&delete o[t]),o.color&&(o.fill=o.color)),m(s,o)}return this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t.textOutline&&this.applyTextOutline(t.textOutline)),this}dashstyleSetter(t){let e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){let s=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=s.length;e--;)s[e]=""+P(s[e])*A(i,NaN);t=s.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}}destroy(){let t=this,e=t.element||{},i=t.renderer,s=e.ownerSVGElement,r="SPAN"===e.nodeName&&t.parentGroup||void 0,o,a;if(e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null,n(t),t.clipPath&&s){let e=t.clipPath;[].forEach.call(s.querySelectorAll("[clip-path],[CLIP-PATH]"),function(t){t.getAttribute("clip-path").indexOf(e.element.id)>-1&&t.removeAttribute("clip-path")}),t.clipPath=e.destroy()}if(t.connector=t.connector?.destroy(),t.stops){for(a=0;a<t.stops.length;a++)t.stops[a].destroy();t.stops.length=0,t.stops=void 0}for(t.safeRemoveChild(e);r&&r.div&&0===r.div.childNodes.length;)o=r.parentGroup,t.safeRemoveChild(r.div),delete r.div,r=o;t.alignOptions&&y(i.alignedObjects,t),T(t,function(e,i){t[i]&&t[i].parentGroup===t&&t[i].destroy&&t[i].destroy(),delete t[i]})}dSetter(t,e,i){S(t)&&("string"==typeof t[0]&&(t=this.renderer.pathToSegments(t)),this.pathArray=t,t=t.reduce((t,e,i)=>e&&e.join?(i?t+" ":"")+e.join(" "):(e||"").toString(),"")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),this[e]!==t&&(i.setAttribute(e,t),this[e]=t)}fillSetter(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.complexColor(t,e,i)}hrefSetter(t,e,i){i.setAttributeNS("http://www.w3.org/1999/xlink",e,t)}getBBox(t,e){let i,s,r,o;let{alignValue:n,element:a,renderer:h,styles:l,textStr:d}=this,{cache:c,cacheKeys:p}=h,u=a.namespaceURI===this.SVG_NS,g=A(e,this.rotation,0),f=h.styledMode?a&&I.prototype.getStyle.call(a,"font-size"):l.fontSize;if(x(d)&&(-1===(o=d.toString()).indexOf("<")&&(o=o.replace(/\d/g,"0")),o+=["",h.rootFontSize,f,g,this.textWidth,n,l.textOverflow,l.fontWeight].join(",")),o&&!t&&(i=c[o]),!i||i.polygon){if(u||h.forExport){try{r=this.fakeTS&&function(t){let e=a.querySelector(".highcharts-text-outline");e&&m(e,{display:t})},C(r)&&r("none"),i=a.getBBox?b({},a.getBBox()):{width:a.offsetWidth,height:a.offsetHeight,x:0,y:0},C(r)&&r("")}catch(t){}(!i||i.width<0)&&(i={x:0,y:0,width:0,height:0})}else i=this.htmlGetBBox();s=i.height,u&&(i.height=s=({"11px,17":14,"13px,20":16})[`${f||""},${Math.round(s)}`]||s),g&&(i=this.getRotatedBox(i,g));let t={bBox:i};v(this,"afterGetBBox",t),i=t.bBox}if(o&&(""===d||i.height>0)){for(;p.length>250;)delete c[p.shift()];c[o]||p.push(o),c[o]=i}return i}getRotatedBox(t,e){let{x:i,y:s,width:r,height:o}=t,{alignValue:n,translateY:h,rotationOriginX:l=0,rotationOriginY:d=0}=this,c={right:1,center:.5}[n||0]||0,p=Number(this.element.getAttribute("y")||0)-(h?0:s),u=e*a,g=(e-90)*a,f=Math.cos(u),m=Math.sin(u),x=r*f,y=r*m,b=Math.cos(g),v=Math.sin(g),[[S,C],[k,M]]=[l,d].map(t=>[t-t*f,t*m]),w=i+c*(r-x)+S+M+p*b,T=w+x,A=T-o*b,P=A-x,L=s+p-c*y-C+k+p*v,O=L+y,D=O-o*v,E=D-y,I=Math.min(w,T,A,P),j=Math.min(L,O,D,E),B=Math.max(w,T,A,P)-I,R=Math.max(L,O,D,E)-j;return{x:I,y:j,width:B,height:R,polygon:[[w,L],[T,O],[A,D],[P,E]]}}getStyle(t){return c.getComputedStyle(this.element||this,"").getPropertyValue(t)}hasClass(t){return -1!==(""+this.attr("class")).split(" ").indexOf(t)}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}constructor(t,e){this.onEvents={},this.opacity=1,this.SVG_NS=d,this.element="span"===e||"body"===e?g(e):h.createElementNS(this.SVG_NS,e),this.renderer=t,this.styles={},v(this,"afterInit")}on(t,e){let{onEvents:i}=this;return i[t]&&i[t](),i[t]=p(this.element,t,e),this}opacitySetter(t,e,i){let s=Number(Number(t).toFixed(3));this.opacity=s,i.setAttribute(e,s)}reAlign(){this.alignOptions?.width&&"left"!==this.alignOptions.align&&(this.alignOptions.width=this.getBBox().width,this.placed=!1,this.align())}removeClass(t){return this.attr("class",(""+this.attr("class")).replace(M(t)?RegExp(`(^| )${t}( |$)`):t," ").replace(/ +/g," ").trim())}removeTextOutline(){let t=this.element.querySelector("tspan.highcharts-text-outline");t&&this.safeRemoveChild(t)}safeRemoveChild(t){let e=t.parentNode;e&&e.removeChild(t)}setRadialReference(t){let e=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this}shadow(t){let{renderer:e}=this,i=w(this.parentGroup?.rotation===90?{offsetX:-1,offsetY:-1}:{},k(t)?t:{}),s=e.shadowDefinition(i);return this.attr({filter:t?`url(${e.url}#${s})`:"none"})}show(t=!0){return this.attr({visibility:t?"inherit":"visible"})}"stroke-widthSetter"(t,e,i){this[e]=t,i.setAttribute(e,t)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;let t=this.getStyle("stroke-width"),e=0,i;return/px$/.test(t)?e=P(t):""!==t&&(u(i=h.createElementNS(d,"rect"),{width:t,"stroke-width":0}),this.element.parentNode.appendChild(i),e=i.getBBox().width,i.parentNode.removeChild(i)),e}symbolAttr(t){let e=this;
vendor: 8,550 bytes, line 64820
64820I.symbolCustomAttribs.forEach(function(i){e[i]=A(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})}textSetter(t){t!==this.textStr&&(delete this.textPxLength,this.textStr=t,this.added&&this.renderer.buildText(this),this.reAlign())}titleSetter(t){let e=this.element,i=e.getElementsByTagName("title")[0]||h.createElementNS(this.SVG_NS,"title");e.insertBefore?e.insertBefore(i,e.firstChild):e.appendChild(i),i.textContent=O(A(t,""),[/<[^>]*>/g,""]).replace(/</g,"<").replace(/>/g,">")}toFront(){let t=this.element;return t.parentNode.appendChild(t),this}translate(t,e){return this.attr({translateX:t,translateY:e})}updateTransform(t="transform"){let{element:e,matrix:i,rotation:s=0,rotationOriginX:r,rotationOriginY:o,scaleX:n,scaleY:a,translateX:h=0,translateY:l=0}=this,d=["translate("+h+","+l+")"];x(i)&&d.push("matrix("+i.join(",")+")"),s&&(d.push("rotate("+s+" "+A(r,e.getAttribute("x"),0)+" "+A(o,e.getAttribute("y")||0)+")"),this.text?.element.tagName==="SPAN"&&this.text.attr({rotation:s,rotationOriginX:(r||0)-this.padding,rotationOriginY:(o||0)-this.padding})),(x(n)||x(a))&&d.push("scale("+A(n,1)+" "+A(a,1)+")"),d.length&&!(this.text||this).textPath&&e.setAttribute(t,d.join(" "))}visibilitySetter(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t}xGetter(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)}zIndexSetter(t,e){let i=this.renderer,s=this.parentGroup,r=(s||i).element||i.box,o=this.element,n=r===i.box,a,h,l,d=!1,c,p=this.added,u;if(x(t)?(o.setAttribute("data-z-index",t),t=+t,this[e]===t&&(p=!1)):x(this[e])&&o.removeAttribute("data-z-index"),this[e]=t,p){for((t=this.zIndex)&&s&&(s.handleZ=!0),u=(a=r.childNodes).length-1;u>=0&&!d;u--)c=!x(l=(h=a[u]).getAttribute("data-z-index")),h!==o&&(t<0&&c&&!n&&!u?(r.insertBefore(o,a[u]),d=!0):(P(l)<=t||c&&(!x(t)||t>=0))&&(r.insertBefore(o,a[u+1]),d=!0));d||(r.insertBefore(o,a[n?3:0]),d=!0)}return d}}return I.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],I.prototype.strokeSetter=I.prototype.fillSetter,I.prototype.yGetter=I.prototype.xGetter,I.prototype.matrixSetter=I.prototype.rotationOriginXSetter=I.prototype.rotationOriginYSetter=I.prototype.rotationSetter=I.prototype.scaleXSetter=I.prototype.scaleYSetter=I.prototype.translateXSetter=I.prototype.translateYSetter=I.prototype.verticalAlignSetter=function(t,e){this[e]=t,this.doTransform=!0},I}),i(e,"Core/Renderer/SVG/SVGLabel.js",[e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(t,e){let{defined:i,extend:s,isNumber:r,merge:o,pick:n,removeEvent:a}=e;class h extends t{constructor(t,e,i,s,r,o,n,a,l,d){let c;super(t,"g"),this.paddingLeftSetter=this.paddingSetter,this.paddingRightSetter=this.paddingSetter,this.doUpdate=!1,this.textStr=e,this.x=i,this.y=s,this.anchorX=o,this.anchorY=n,this.baseline=l,this.className=d,this.addClass("button"===d?"highcharts-no-tooltip":"highcharts-label"),d&&this.addClass("highcharts-"+d),this.text=t.text(void 0,0,0,a).attr({zIndex:1}),"string"==typeof r&&((c=/^url\((.*?)\)$/.test(r))||this.renderer.symbols[r])&&(this.symbolKey=r),this.bBox=h.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=t.styledMode||c,this.deferredAttr={},this.alignFactor=0}alignSetter(t){let e={left:0,center:.5,right:1}[t];e!==this.alignFactor&&(this.alignFactor=e,this.bBox&&r(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(t,e){this.anchorX=t,this.boxAttr(e,Math.round(t)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(t,e){this.anchorY=t,this.boxAttr(e,t-this.ySetting)}boxAttr(t,e){this.box?this.box.attr(t,e):this.deferredAttr[t]=e}css(e){if(e){let t={};e=o(e),h.textProps.forEach(i=>{void 0!==e[i]&&(t[i]=e[i],delete e[i])}),this.text.css(t),"fontSize"in t||"fontWeight"in t?this.updateTextPadding():("width"in t||"textOverflow"in t)&&this.updateBoxSize()}return t.prototype.css.call(this,e)}destroy(){a(this.element,"mouseenter"),a(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),t.prototype.destroy.call(this)}fillSetter(t,e){t&&(this.needsBox=!0),this.fill=t,this.boxAttr(e,t)}getBBox(t,e){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();let{padding:i,height:s=0,translateX:r=0,translateY:o=0,width:a=0}=this,h=n(this.paddingLeft,i),l=e??(this.rotation||0),d={width:a,height:s,x:r+this.bBox.x-h,y:o+this.bBox.y-i+this.baselineOffset};return l&&(d=this.getRotatedBox(d,l)),d}getCrispAdjust(){return(this.renderer.styledMode&&this.box?this.box.strokeWidth():this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(t){this.heightSetting=t,this.doUpdate=!0}afterSetters(){super.afterSetters(),this.doUpdate&&(this.updateBoxSize(),this.doUpdate=!1)}onAdd(){this.text.add(this),this.attr({text:n(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&i(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(t,e){r(t)?t!==this[e]&&(this[e]=t,this.updateTextPadding()):this[e]=void 0}rSetter(t,e){this.boxAttr(e,t)}strokeSetter(t,e){this.stroke=t,this.boxAttr(e,t)}"stroke-widthSetter"(t,e){t&&(this.needsBox=!0),this["stroke-width"]=t,this.boxAttr(e,t)}"text-alignSetter"(t){this.textAlign=t}textSetter(t){void 0!==t&&this.text.attr({text:t}),this.updateTextPadding(),this.reAlign()}updateBoxSize(){let t;let e=this.text,o={},n=this.padding,a=this.bBox=(!r(this.widthSetting)||!r(this.heightSetting)||this.textAlign)&&i(e.textStr)?e.getBBox(void 0,0):h.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||a.height||0)+2*n;let l=this.renderer.fontMetrics(e);if(this.baselineOffset=n+Math.min((this.text.firstLineMetrics||l).b,a.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-l.h)/2),this.needsBox&&!e.textPath){if(!this.box){let t=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();t.addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),t.add(this)}t=this.getCrispAdjust(),o.x=t,o.y=(this.baseline?-this.baselineOffset:0)+t,o.width=Math.round(this.width),o.height=Math.round(this.height),this.box.attr(s(o,this.deferredAttr)),this.deferredAttr={}}}updateTextPadding(){let t=this.text;if(!t.textPath){this.updateBoxSize();let e=this.baseline?0:this.baselineOffset,s=n(this.paddingLeft,this.padding);i(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(s+=({center:.5,right:1})[this.textAlign]*(this.widthSetting-this.bBox.width)),(s!==t.x||e!==t.y)&&(t.attr("x",s),t.hasBoxWidthChanged&&(this.bBox=t.getBBox(!0)),void 0!==e&&t.attr("y",e)),t.x=s,t.y=e}}widthSetter(t){this.widthSetting=r(t)?t:void 0,this.doUpdate=!0}getPaddedWidth(){let t=this.padding,e=n(this.paddingLeft,t),i=n(this.paddingRight,t);return(this.widthSetting||this.bBox.width||0)+e+i}xSetter(t){this.x=t,this.alignFactor&&(t-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(t),this.attr("translateX",this.xSetting)}ySetter(t){this.ySetting=this.y=Math.round(t),this.attr("translateY",this.ySetting)}}return h.emptyBBox={width:0,height:0,x:0,y:0},h.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"],h}),i(e,"Core/Renderer/SVG/Symbols.js",[e["Core/Utilities.js"]],function(t){let{defined:e,isNumber:i,pick:s}=t;function r(t,i,r,o,n){let a=[];if(n){let h=n.start||0,l=s(n.r,r),d=s(n.r,o||r),c=2e-4/(n.borderRadius?1:Math.max(l,1)),p=Math.abs((n.end||0)-h-2*Math.PI)<c,u=(n.end||0)-(p?c:0),g=n.innerR,f=s(n.open,p),m=Math.cos(h),x=Math.sin(h),y=Math.cos(u),b=Math.sin(u),v=s(n.longArc,u-h-Math.PI<c?0:1),S=["A",l,d,0,v,s(n.clockwise,1),t+l*y,i+d*b];S.params={start:h,end:u,cx:t,cy:i},a.push(["M",t+l*m,i+d*x],S),e(g)&&((S=["A",g,g,0,v,e(n.clockwise)?1-n.clockwise:0,t+g*m,i+g*x]).params={start:u,end:h,cx:t,cy:i},a.push(f?["M",t+g*y,i+g*b]:["L",t+g*y,i+g*b],S)),f||a.push(["Z"])}return a}function o(t,e,i,s,r){return r&&r.r?n(t,e,i,s,r):[["M",t,e],["L",t+i,e],["L",t+i,e+s],["L",t,e+s],["Z"]]}function n(t,e,i,s,r){let o=r?.r||0;return[["M",t+o,e],["L",t+i-o,e],["A",o,o,0,0,1,t+i,e+o],["L",t+i,e+s-o],["A",o,o,0,0,1,t+i-o,e+s],["L",t+o,e+s],["A",o,o,0,0,1,t,e+s-o],["L",t,e+o],["A",o,o,0,0,1,t+o,e],["Z"]]}return{arc:r,callout:function(t,e,s,r,o){let a=Math.min(o&&o.r||0,s,r),h=a+6,l=o&&o.anchorX,d=o&&o.anchorY||0,c=n(t,e,s,r,{r
vendor: 10,451 bytes, line 64820
64820:a});if(!i(l)||l<s&&l>0&&d<r&&d>0)return c;if(t+l>s-h){if(d>e+h&&d<e+r-h)c.splice(3,1,["L",t+s,d-6],["L",t+s+6,d],["L",t+s,d+6],["L",t+s,e+r-a]);else if(l<s){let i=d<e+h,o=i?e:e+r;c.splice(i?2:5,0,["L",l,d],["L",t+s-a,o])}else c.splice(3,1,["L",t+s,r/2],["L",l,d],["L",t+s,r/2],["L",t+s,e+r-a])}else if(t+l<h){if(d>e+h&&d<e+r-h)c.splice(7,1,["L",t,d+6],["L",t-6,d],["L",t,d-6],["L",t,e+a]);else if(l>0){let i=d<e+h,s=i?e:e+r;c.splice(i?1:6,0,["L",l,d],["L",t+a,s])}else c.splice(7,1,["L",t,r/2],["L",l,d],["L",t,r/2],["L",t,e+a])}else d>r&&l<s-h?c.splice(5,1,["L",l+6,e+r],["L",l,e+r+6],["L",l-6,e+r],["L",t+a,e+r]):d<0&&l>h&&c.splice(1,1,["L",l-6,e],["L",l,e-6],["L",l+6,e],["L",s-a,e]);return c},circle:function(t,e,i,s){return r(t+i/2,e+s/2,i/2,s/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(t,e,i,s){return[["M",t+i/2,e],["L",t+i,e+s/2],["L",t+i/2,e+s],["L",t,e+s/2],["Z"]]},rect:o,roundedRect:n,square:o,triangle:function(t,e,i,s){return[["M",t+i/2,e],["L",t+i,e+s],["L",t,e+s],["Z"]]},"triangle-down":function(t,e,i,s){return[["M",t,e],["L",t+i,e],["L",t+i/2,e+s],["Z"]]}}}),i(e,"Core/Renderer/SVG/TextBuilder.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){let{doc:s,SVG_NS:r,win:o}=e,{attr:n,extend:a,fireEvent:h,isString:l,objectEach:d,pick:c}=i;return class{constructor(t){let e=t.styles;this.renderer=t.renderer,this.svgElement=t,this.width=t.textWidth,this.textLineHeight=e&&e.lineHeight,this.textOutline=e&&e.textOutline,this.ellipsis=!!(e&&"ellipsis"===e.textOverflow),this.noWrap=!!(e&&"nowrap"===e.whiteSpace)}buildSVG(){let e=this.svgElement,i=e.element,r=e.renderer,o=c(e.textStr,"").toString(),n=-1!==o.indexOf("<"),a=i.childNodes,h=!e.added&&r.box,d=[o,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,e.getStyle("font-size"),this.width].join(",");if(d!==e.textCache){e.textCache=d,delete e.actualWidth;for(let t=a.length;t--;)i.removeChild(a[t]);if(n||this.ellipsis||this.width||e.textPath||-1!==o.indexOf(" ")&&(!this.noWrap||/<br.*?>/g.test(o))){if(""!==o){h&&h.appendChild(i);let s=new t(o);this.modifyTree(s.nodes),s.addToDOM(i),this.modifyDOM(),this.ellipsis&&-1!==(i.textContent||"").indexOf("â¦")&&e.attr("title",this.unescapeEntities(e.textStr||"",["<",">"])),h&&h.removeChild(i)}}else i.appendChild(s.createTextNode(this.unescapeEntities(o)));l(this.textOutline)&&e.applyTextOutline&&e.applyTextOutline(this.textOutline)}}modifyDOM(){let t;let e=this.svgElement,i=n(e.element,"x");for(e.firstLineMetrics=void 0;t=e.element.firstChild;)if(/^[\s\u200B]*$/.test(t.textContent||" "))e.element.removeChild(t);else break;[].forEach.call(e.element.querySelectorAll("tspan.highcharts-br"),(t,s)=>{t.nextSibling&&t.previousSibling&&(0===s&&1===t.previousSibling.nodeType&&(e.firstLineMetrics=e.renderer.fontMetrics(t.previousSibling)),n(t,{dy:this.getLineHeight(t.nextSibling),x:i}))});let a=this.width||0;if(!a)return;let h=(t,o)=>{let h=t.textContent||"",l=h.replace(/([^\^])-/g,"$1- ").split(" "),d=!this.noWrap&&(l.length>1||e.element.childNodes.length>1),c=this.getLineHeight(o),p=0,u=e.actualWidth;if(this.ellipsis)h&&this.truncate(t,h,void 0,0,Math.max(0,a-.8*c),(t,e)=>t.substring(0,e)+"â¦");else if(d){let h=[],d=[];for(;o.firstChild&&o.firstChild!==t;)d.push(o.firstChild),o.removeChild(o.firstChild);for(;l.length;)l.length&&!this.noWrap&&p>0&&(h.push(t.textContent||""),t.textContent=l.join(" ").replace(/- /g,"-")),this.truncate(t,void 0,l,0===p&&u||0,a,(t,e)=>l.slice(0,e).join(" ").replace(/- /g,"-")),u=e.actualWidth,p++;d.forEach(e=>{o.insertBefore(e,t)}),h.forEach(e=>{o.insertBefore(s.createTextNode(e),t);let a=s.createElementNS(r,"tspan");a.textContent="â",n(a,{dy:c,x:i}),o.insertBefore(a,t)})}},l=t=>{[].slice.call(t.childNodes).forEach(i=>{i.nodeType===o.Node.TEXT_NODE?h(i,t):(-1!==i.className.baseVal.indexOf("highcharts-br")&&(e.actualWidth=0),l(i))})};l(e.element)}getLineHeight(t){let e=t.nodeType===o.Node.TEXT_NODE?t.parentElement:t;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(e||this.svgElement.element).h}modifyTree(t){let e=(i,s)=>{let{attributes:r={},children:o,style:n={},tagName:h}=i,l=this.renderer.styledMode;if("b"===h||"strong"===h?l?r.class="highcharts-strong":n.fontWeight="bold":("i"===h||"em"===h)&&(l?r.class="highcharts-emphasized":n.fontStyle="italic"),n&&n.color&&(n.fill=n.color),"br"===h){r.class="highcharts-br",i.textContent="â";let e=t[s+1];e&&e.textContent&&(e.textContent=e.textContent.replace(/^ +/gm,""))}else"a"===h&&o&&o.some(t=>"#text"===t.tagName)&&(i.children=[{children:o,tagName:"tspan"}]);"#text"!==h&&"a"!==h&&(i.tagName="tspan"),a(i,{attributes:r,style:n}),o&&o.filter(t=>"#text"!==t.tagName).forEach(e)};t.forEach(e),h(this.svgElement,"afterModifyTree",{nodes:t})}truncate(t,e,i,s,r,o){let n,a;let h=this.svgElement,{rotation:l}=h,d=[],c=i?1:0,p=(e||i||"").length,u=p,g=function(e,r){let o=r||e,n=t.parentNode;if(n&&void 0===d[o]&&n.getSubStringLength)try{d[o]=s+n.getSubStringLength(0,i?o+1:o)}catch(t){}return d[o]};if(h.rotation=0,s+(a=g(t.textContent.length))>r){for(;c<=p;)u=Math.ceil((c+p)/2),i&&(n=o(i,u)),a=g(u,n&&n.length-1),c===p?c=p+1:a>r?p=u-1:c=u;0===p?t.textContent="":e&&p===e.length-1||(t.textContent=n||o(e||i,u))}i&&i.splice(0,u),h.actualWidth=a,h.rotation=l}unescapeEntities(t,e){return d(this.renderer.escapes,function(i,s){e&&-1!==e.indexOf(i)||(t=t.toString().replace(RegExp(i,"g"),s))}),t}}}),i(e,"Core/Renderer/SVG/SVGRenderer.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Defaults.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGLabel.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Renderer/SVG/TextBuilder.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o,n,a,h,l){let d;let{defaultOptions:c}=e,{charts:p,deg2rad:u,doc:g,isFirefox:f,isMS:m,isWebKit:x,noop:y,SVG_NS:b,symbolSizes:v,win:S}=s,{addEvent:C,attr:k,createElement:M,crisp:w,css:T,defined:A,destroyObjectProperties:P,extend:L,isArray:O,isNumber:D,isObject:E,isString:I,merge:j,pick:B,pInt:R,replaceNested:z,uniqueKey:N}=l;class W{constructor(t,e,i,s,r,o,n){let a,h;let l=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),d=l.element;n||l.css(this.getStyle(s||{})),t.appendChild(d),k(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&k(d,"xmlns",this.SVG_NS),this.box=d,this.boxWrapper=l,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(g.createTextNode("Created with Highcharts 11.4.8")),this.defs=this.createElement("defs").add(),this.allowHTML=o,this.forExport=r,this.styledMode=n,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=l.getStyle("font-size"),this.setSize(e,i,!1),f&&t.getBoundingClientRect&&((a=function(){T(t,{left:0,top:0}),h=t.getBoundingClientRect(),T(t,{left:Math.ceil(h.left)-h.left+"px",top:Math.ceil(h.top)-h.top+"px"})})(),this.unSubPixelFix=C(S,"resize",a))}definition(e){return new t([e]).addToDOM(this.defs.element)}getReferenceURL(){if((f||x)&&g.getElementsByTagName("base").length){if(!A(d)){let e=N(),i=new t([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:e},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${e})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(g.body);T(i,{position:"fixed",top:0,left:0,zIndex:9e5});let s=g.elementFromPoint(6,6);d="hitme"===(s&&s.id),g.body.removeChild(i)}if(d)return z(S.location.href.split("#")[0],[/<[^>]*>/g,""],[/([\('\)])/g,"\\$1"],[/ /g,"%20"])}return""}getStyle(t){return this.style=L({fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1rem"},t),this.style}setStyle(t){this.boxWrapper.css(this.getStyle(t))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){let t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),P(this.gradients||{}),this.gradients=null,this.defs=t.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null}createElement(t){return new this.Element(this,t)}getRadialAttr(t,e){return{cx:t[0]-t[2]/2+(e.cx||0)*t[2],cy:t[1]-t[2]/2+(e.cy||0)*t[2],r:(e.r||0)*t[2]}}shadowDefinition(t){let e=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(t).map(e=>`${e}-${t[e]}`)].join("-").toLowerCase().replace(/[^a-z\d\-]/g,""),i=j({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},t);return this.defs.element.querySelector(`#${e}`)||this.definition({tagName:"filter",attributes:{id:e,filterUnits:i.filterUnits},children:this.getShadowFilterContent(i)}),e}getShadowFilterContent(t){return[{tagName:"feDropShadow",attributes:{dx:t.offsetX,dy:t.offsetY,"flood-color":t.color,"flood-opacity":Math.min(5*t.opacity,1),stdDeviation:t.width/2}}]}buildText(t){new h(t).buildSVG()}getContrast(t){let e=i.parse(t).rgba.map(t=>{let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}),s=.2126*e[0]+.7152*e[1]+.0722*e[2];return 1.05/(s+.05)>(s+.05)/.05?"#FFFFFF":"#000000"}button(e,i,s,r,o={},n,a,h,l,d){let p=this.label(e,i,s,l,void 0,void 0,d,void 0,"button"),u=this.styledMode,g=arguments,f=0;o=j(c.global.buttonTheme,o),u&&(delete o.fill,delete o.stroke,delete o["stroke-width"]);let x=o.states||{},y=o.style||{};delete o.states,delete o.style;let b=[t.filterUserAttributes(o)],v=[y];return u||["hover","select","disabled"].forEach((e,i)=>{b.push(j(b[0],t.filterUserAttributes(g[i+5]||x[e]||{}))),v.push(b[i+1].style),delete b[i+1].style}),C(p.element,m?"mouseover":"mouseenter",function(){3!==f&&p.setState(1)}),C(p.element,m?"mouseout":"mouseleave",function(){3!==f&&p.setState(f)}),p.setState=(t=0)=>{if(1!==t&&(p.state=f=t),p.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t]),!u){p.attr(b[t]);let e=v[t];E(e)&&p.css(e)}},p.attr(b[0]),!u&&(p.css(L({cursor:"default"},y)),d&&p.text.css({pointerEvents:"none"})),p.on("touchstart",t=>t.stopPropagation()).on("click",function(t){3!==f&&r.call(p,t)})}crispLine(t,e){let[i,s]=t;return A(i[1])&&i[1]===s[1]&&(i[1]=s[1]=w(i[1],e)),A(i[2])&&i[2]===s[2]&&(i[2]=s[2]=w(i[2],e)),t}path(t){let e=this.styledMode?{}:{fill:"none"};return O(t)?e.d=t:E(t)&&L(e,t),this.createElement("path").attr(e)}circle(t,e,i){let s=E(t)?t:void 0===t?{}:{x:t,y:e,r:i},r=this.createElement("circle");
vendor: 4,132 bytes, line 64820
64820return r.xSetter=r.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},r.attr(s)}arc(t,e,i,s,r,o){let n;E(t)?(e=(n=t).y,i=n.r,s=n.innerR,r=n.start,o=n.end,t=n.x):n={innerR:s,start:r,end:o};let a=this.symbol("arc",t,e,i,i,n);return a.r=i,a}rect(t,e,i,s,r,o){let n=E(t)?t:void 0===t?{}:{x:t,y:e,r,width:Math.max(i||0,0),height:Math.max(s||0,0)},a=this.createElement("rect");return this.styledMode||(void 0!==o&&(n["stroke-width"]=o,L(n,a.crisp(n))),n.fill="none"),a.rSetter=function(t,e,i){a.r=t,k(i,{rx:t,ry:t})},a.rGetter=function(){return a.r||0},a.attr(n)}roundedRect(t){return this.symbol("roundedRect").attr(t)}setSize(t,e,i){this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:B(i,!0)?void 0:0}),this.alignElements()}g(t){let e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e}image(t,e,i,s,r,o){let n={preserveAspectRatio:"none"};D(e)&&(n.x=e),D(i)&&(n.y=i),D(s)&&(n.width=s),D(r)&&(n.height=r);let a=this.createElement("image").attr(n),h=function(e){a.attr({href:t}),o.call(a,e)};if(o){a.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});let e=new S.Image;C(e,"load",h),e.src=t,e.complete&&h({})}else a.attr({href:t});return a}symbol(t,e,i,s,r,o){let n,a,h,l;let d=this,c=/^url\((.*?)\)$/,u=c.test(t),f=!u&&(this.symbols[t]?t:"circle"),m=f&&this.symbols[f];if(m)"number"==typeof e&&(a=m.call(this.symbols,e||0,i||0,s||0,r||0,o)),n=this.path(a),d.styledMode||n.attr("fill","none"),L(n,{symbolName:f||void 0,x:e,y:i,width:s,height:r}),o&&L(n,o);else if(u){h=t.match(c)[1];let s=n=this.image(h);s.imgwidth=B(o&&o.width,v[h]&&v[h].width),s.imgheight=B(o&&o.height,v[h]&&v[h].height),l=t=>t.attr({width:t.width,height:t.height}),["width","height"].forEach(t=>{s[`${t}Setter`]=function(t,e){this[e]=t;let{alignByTranslate:i,element:s,width:r,height:n,imgwidth:a,imgheight:h}=this,l="width"===e?a:h,d=1;o&&"within"===o.backgroundSize&&r&&n&&a&&h?(d=Math.min(r/a,n/h),k(s,{width:Math.round(a*d),height:Math.round(h*d)})):s&&l&&s.setAttribute(e,l),!i&&a&&h&&this.translate(((r||0)-a*d)/2,((n||0)-h*d)/2)}}),A(e)&&s.attr({x:e,y:i}),s.isImg=!0,s.symbolUrl=t,A(s.imgwidth)&&A(s.imgheight)?l(s):(s.attr({width:0,height:0}),M("img",{onload:function(){let t=p[d.chartIndex];0===this.width&&(T(this,{position:"absolute",top:"-999em"}),g.body.appendChild(this)),v[h]={width:this.width,height:this.height},s.imgwidth=this.width,s.imgheight=this.height,s.element&&l(s),this.parentNode&&this.parentNode.removeChild(this),d.imgCount--,d.imgCount||!t||t.hasLoaded||t.onload()},src:h}),this.imgCount++)}return n}clipRect(t,e,i,s){return this.rect(t,e,i,s,0)}text(t,e,i,s){let r={};if(s&&(this.allowHTML||!this.forExport))return this.html(t,e,i);r.x=Math.round(e||0),i&&(r.y=Math.round(i)),A(t)&&(r.text=t);let o=this.createElement("text").attr(r);return s&&(!this.forExport||this.allowHTML)||(o.xSetter=function(t,e,i){let s=i.getElementsByTagName("tspan"),r=i.getAttribute(e);for(let i=0,o;i<s.length;i++)(o=s[i]).getAttribute(e)===r&&o.setAttribute(e,t);i.setAttribute(e,t)}),o}fontMetrics(t){let e=R(o.prototype.getStyle.call(t,"font-size")||0),i=e<24?e+3:Math.round(1.2*e),s=Math.round(.8*i);return{h:i,b:s,f:e}}rotCorr(t,e,i){let s=t;return e&&i&&(s=Math.max(s*Math.cos(e*u),4)),{x:-t/3*Math.sin(e*u),y:s}}pathToSegments(t){let e=[],i=[],s={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2};for(let r=0;r<t.length;r++)I(i[0])&&D(t[r])&&i.length===s[i[0].toUpperCase()]&&t.splice(r,0,i[0].replace("M","L").replace("m","l")),"string"==typeof t[r]&&(i.length&&e.push(i.slice(0)),i.length=0),i.push(t[r]);return e.push(i.slice(0)),e}label(t,e,i,s,r,o,a,h,l){return new n(this,t,e,i,s,r,o,a,h,l)}alignElements(){this.alignedObjects.forEach(t=>t.align())}}return L(W.prototype,{Element:o,SVG_NS:b,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:a,draw:y}),r.registerRendererType("svg",W,!0),W}),i(e,"Core/Renderer/HTML/HTMLElement.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Globals.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(t,e,
64820i,s){let{composed:r}=e,{attr:o,css:n,createElement:a,defined:h,extend:l,pInt:d,pushUnique:c}=s;function p(t,e,s){let r=this.div?.style||s.style;i.prototype[`${e}Setter`].call(this,t,e,s),r&&(r[e]=t)}let u=(t,e)=>{if(!t.div){let s=o(t.element,"class"),r=t.css,n=a("div",s?{className:s}:void 0,{position:"absolute",left:`${t.translateX||0}px`,top:`${t.translateY||0}px`,...t.styles,display:t.display,opacity:t.opacity,visibility:t.visibility},t.parentGroup?.div||e);t.classSetter=(t,e,i)=>{i.setAttribute("class",t),n.className=t},t.translateXSetter=t.translateYSetter=(e,i)=>{t[i]=e,n.style["translateX"===i?"left":"top"]=`${e}px`,t.doTransform=!0},t.opacitySetter=t.visibilitySetter=p,t.css=e=>(r.call(t,e),e.cursor&&(n.style.cursor=e.cursor),e.pointerEvents&&(n.style.pointerEvents=e.pointerEvents),t),t.on=function(){return i.prototype.on.apply({element:n,onEvents:t.onEvents},arguments),t},t.div=n}return t.div};class g extends i{static compose(t){c(r,this.compose)&&(t.prototype.html=function(t,e,i){return new g(this,"span").attr({text:t,x:Math.round(e),y:Math.round(i)})})}constructor(t,e){super(t,e),this.css({position:"absolute",...t.styledMode?{}:{fontFamily:t.style.fontFamily,fontSize:t.style.fontSize}}),this.element.style.whiteSpace="nowrap"}getSpanCorrection(t,e,i){this.xCorr=-t*i,this.yCorr=-e}css(t){let e;let{element:i}=this,s="SPAN"===i.tagName&&t&&"width"in t,r=s&&t.width;return s&&(delete t.width,this.textWidth=d(r)||void 0,e=!0),t?.textOverflow==="ellipsis"&&(t.whiteSpace="nowrap",t.overflow="hidden"),l(this.styles,t),n(i,t),e&&this.updateTransform(),this}htmlGetBBox(){let{element:t}=this;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}updateTransform(){if(!this.added){this.alignOnAdd=!0;return}let{element:t,renderer:e,rotation:i,rotationOriginX:s,rotationOriginY:r,styles:o,textAlign:a="left",textWidth:l,translateX:d=0,translateY:c=0,x:p=0,y:u=0}=this,g={left:0,center:.5,right:1}[a],f=o.whiteSpace;if(n(t,{marginLeft:`${d}px`,marginTop:`${c}px`}),"SPAN"===t.tagName){let o=[i,a,t.innerHTML,l,this.textAlign].join(","),d=-(this.parentGroup?.padding*1)||0,c,m=!1;if(l!==this.oldTextWidth){let e=this.textPxLength?this.textPxLength:(n(t,{width:"",whiteSpace:f||"nowrap"}),t.offsetWidth),s=l||0;(s>this.oldTextWidth||e>s)&&(/[ \-]/.test(t.textContent||t.innerText)||"ellipsis"===t.style.textOverflow)&&(n(t,{width:e>s||i?l+"px":"auto",display:"block",whiteSpace:f||"normal"}),this.oldTextWidth=l,m=!0)}this.hasBoxWidthChanged=m,o!==this.cTT&&(c=e.fontMetrics(t).b,h(i)&&(i!==(this.oldRotation||0)||a!==this.oldAlign)&&this.setSpanRotation(i,d,d),this.get
64820SpanCorrection(!h(i)&&this.textPxLength||t.offsetWidth,c,g));let{xCorr:x=0,yCorr:y=0}=this,b=(s??p)-x-p-d,v=(r??u)-y-u-d;n(t,{left:`${p+x}px`,top:`${u+y}px`,transformOrigin:`${b}px ${v}px`}),this.cTT=o,this.oldRotation=i,this.oldAlign=a}}setSpanRotation(t,e,i){n(this.element,{transform:`rotate(${t}deg)`,transformOrigin:`${e}% ${i}px`})}add(t){let e;let i=this.renderer.box.parentNode,s=[];if(this.parentGroup=t,t&&!(e=t.div)){let r=t;for(;r;)s.push(r),r=r.parentGroup;for(let t of s.reverse())e=u(t,i)}return(e||i).appendChild(this.element),this.added=!0,this.alignOnAdd&&this.updateTransform(),this}textSetter(e){e!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,t.setElementHTML(this.element,e??""),this.textStr=e,this.doTransform=!0)}alignSetter(t){this.alignValue=this.textAlign=t,this.doTransform=!0}xSetter(t,e){this[e]=t,this.doTransform=!0}}let f=g.prototype;return f.visibilitySetter=f.opacitySetter=p,f.ySetter=f.rotationSetter=f.rotationOriginXSetter=f.rotationOriginYSetter=f.xSetter,g}),i(e,"Core/Axis/AxisDefaults.js",[],function(){var t,e;return(e=t||(t={})).xAxis={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e %b"},week:{main:"%e %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},e.yAxis={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){let{numberFormatter:t}=this.axis.chart;return t(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},t}),i(e,"Core/Foundation.js",[e["Core/Utilities.js"]],function(t){var e;let{addEvent:i,isFunction:s,objectEach:r,removeEvent:o}=t;return(e||(e={})).registerEventOptions=function(t,e){t.eventOptions=t.eventOptions||{},r(e.events,function(e,r){t.eventOptions[r]!==e&&(t.eventOptions[r]&&(o(t,r,t.eventOptions[r]),delete t.eventOptions[r]),s(e)&&(t.eventOptions[r]=e,i(t,r,e,{order:0})))})},e}),i(e,"Core/Axis/Tick.js",[e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){let{deg2rad:s}=e,{clamp:r,correctFloat:o,defined:n,destroyObjectProperties:a,extend:h,fireEvent:l,isNumber:d,merge:c,objectEach:p,pick:u}=i;return class{constructor(t,e,i,s,r){this.isNew=!0,this.isNewLabel=!0,this.axis=t,this.pos=e,this.type=i||"",this.parameters=r||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,l(this,"init"),i||s||this.addLabel()}addLabel(){let e=this,i=e.axis,s=i.options,r=i.chart,a=i.categories,c=i.logarithmic,p=i.names,g=e.pos,f=u(e.options&&e.options.labels,s.labels),m=i.tickPositions,x=g===m[0],y=g===m[m.length-1],b=(!f.step||1===f.step)&&1===i.tickInterval,v=m.info,S=e.label,C,k,M,w=this.parameters.category||(a?u(a[g],p[g],g):g);c&&d(w)&&(w=o(c.lin2log(w))),i.dateTime&&(v?C=(k=r.time.resolveDTLFormat(s.dateTimeLabelFormats[!s.grid&&v.higherRanks[g]||v.unitName])).main:d(w)&&(C=i.dateTime.getXDateFormat(w,s.dateTimeLabelFormats||{}))),e.isFirst=x,e.isLast=y;let T={axis:i,chart:r,dateTimeLabelFormat:C,isFirst:x,isLast:y,pos:g,tick:e,tickPositionInfo:v,value:w};l(this,"labelFormat",T);let A=e=>f.formatter?f.formatter.call(e,e):f.format?(e.text=i.defaultLabelFormatter.call(e),t.format(f.format,e,r)):i.defaultLabelFormatter.call(e),P=A.call(T,T),L=k&&k.list;L?e.shortenLabel=function(){for(M=0;M<L.length;M++)if(h(T,{dateTimeLabelFormat:L[M]}),S.attr({text:A.call(T,T)}),S.getBBox().width<i.getSlotWidth(e)-2*(f.padding||0))return;S.attr({text:""})}:e.shortenLabel=void 0,b&&i._addedPlotLB&&e.moveLabel(P,f),n(S)||e.movedLabel?S&&S.textStr!==P&&!b&&(!S.textWidth||f.style.width||S.styles.width||S.css({width:null}),S.attr({text:P}),S.textPxLength=S.getBBox().width):(e.label=S=e.createLabel(P,f),e.rotation=0)}createLabel(t,e,i){let s=this.axis,r=s.chart,o=n(t)&&e.enabled?r.renderer.text(t,i?.x,i?.y,e.useHTML).add(s.labelGroup):void 0;return o&&(r.styledMode||o.css(c(e.style)),o.textPxLength=o.getBBox().width),o}destroy(){a(this,this.axis)}
vendor: 15,299 bytes, line 64820
64820getPosition(t,e,i,s){let n=this.axis,a=n.chart,h=s&&a.oldChartHeight||a.chartHeight,d={x:t?o(n.translate(e+i,void 0,void 0,s)+n.transB):n.left+n.offset+(n.opposite?(s&&a.oldChartWidth||a.chartWidth)-n.right-n.left:0),y:t?h-n.bottom+n.offset-(n.opposite?n.height:0):o(h-n.translate(e+i,void 0,void 0,s)-n.transB)};return d.y=r(d.y,-1e9,1e9),l(this,"afterGetPosition",{pos:d}),d}getLabelPosition(t,e,i,r,o,a,h,d){let c,p;let g=this.axis,f=g.transA,m=g.isLinked&&g.linkedParent?g.linkedParent.reversed:g.reversed,x=g.staggerLines,y=g.tickRotCorr||{x:0,y:0},b=r||g.reserveSpaceDefault?0:-g.labelOffset*("center"===g.labelAlign?.5:1),v=o.distance,S={};return c=0===g.side?i.rotation?-v:-i.getBBox().height:2===g.side?y.y+v:Math.cos(i.rotation*s)*(y.y-i.getBBox(!1,0).height/2),n(o.y)&&(c=0===g.side&&g.horiz?o.y+c:o.y),t=t+u(o.x,[0,1,0,-1][g.side]*v)+b+y.x-(a&&r?a*f*(m?-1:1):0),e=e+c-(a&&!r?a*f*(m?1:-1):0),x&&(p=h/(d||1)%x,g.opposite&&(p=x-p-1),e+=p*(g.labelOffset/x)),S.x=t,S.y=Math.round(e),l(this,"afterGetLabelPosition",{pos:S,tickmarkOffset:a,index:h}),S}getLabelSize(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0}getMarkPath(t,e,i,s,r=!1,o){return o.crispLine([["M",t,e],["L",t+(r?0:-i),e+(r?i:0)]],s)}handleOverflow(t){let e=this.axis,i=e.options.labels,r=t.x,o=e.chart.chartWidth,n=e.chart.spacing,a=u(e.labelLeft,Math.min(e.pos,n[3])),h=u(e.labelRight,Math.max(e.isRadial?0:e.pos+e.len,o-n[1])),l=this.label,d=this.rotation,c={left:0,center:.5,right:1}[e.labelAlign||l.attr("align")],p=l.getBBox().width,g=e.getSlotWidth(this),f={},m=g,x=1,y,b,v;d||"justify"!==i.overflow?d<0&&r-c*p<a?v=Math.round(r/Math.cos(d*s)-a):d>0&&r+c*p>h&&(v=Math.round((o-r)/Math.cos(d*s))):(y=r-c*p,b=r+(1-c)*p,y<a?m=t.x+m*(1-c)-a:b>h&&(m=h-t.x+m*c,x=-1),(m=Math.min(g,m))<g&&"center"===e.labelAlign&&(t.x+=x*(g-m-c*(g-Math.min(p,m)))),(p>m||e.autoRotation&&(l.styles||{}).width)&&(v=m)),v&&(this.shortenLabel?this.shortenLabel():(f.width=Math.floor(v)+"px",(i.style||{}).textOverflow||(f.textOverflow="ellipsis"),l.css(f)))}moveLabel(t,e){let i=this,s=i.label,r=i.axis,o=!1,n;s&&s.textStr===t?(i.movedLabel=s,o=!0,delete i.label):p(r.ticks,function(e){o||e.isNew||e===i||!e.label||e.label.textStr!==t||(i.movedLabel=e.label,o=!0,e.labelPos=i.movedLabel.xy,delete e.label)}),!o&&(i.labelPos||s)&&(n=i.labelPos||s.xy,i.movedLabel=i.createLabel(t,e,n),i.movedLabel&&i.movedLabel.attr({opacity:0}))}render(t,e,i){let s=this.axis,r=s.horiz,n=this.pos,a=u(this.tickmarkOffset,s.tickmarkOffset),h=this.getPosition(r,n,a,e),d=h.x,c=h.y,p=s.pos,g=p+s.len,f=r?d:c;!s.chart.polar&&this.isNew&&(o(f)<p||f>g)&&(i=0);let m=u(i,this.label&&this.label.newOpacity,1);i=u(i,1),this.isActive=!0,this.renderGridLine(e,i),this.renderMark(h,i),this.renderLabel(h,e,m,t),this.isNew=!1,l(this,"afterRender")}renderGridLine(t,e){let i=this.axis,s=i.options,r={},o=this.pos,n=this.type,a=u(this.tickmarkOffset,i.tickmarkOffset),h=i.chart.renderer,l=this.gridLine,d,c=s.gridLineWidth,p=s.gridLineColor,g=s.gridLineDashStyle;"minor"===this.type&&(c=s.minorGridLineWidth,p=s.minorGridLineColor,g=s.minorGridLineDashStyle),l||(i.chart.styledMode||(r.stroke=p,r["stroke-width"]=c||0,r.dashstyle=g),n||(r.zIndex=1),t&&(e=0),this.gridLine=l=h.path().attr(r).addClass("highcharts-"+(n?n+"-":"")+"grid-line").add(i.gridGroup)),l&&(d=i.getPlotLinePath({value:o+a,lineWidth:l.strokeWidth(),force:"pass",old:t,acrossPanes:!1}))&&l[t||this.isNew?"attr":"animate"]({d:d,opacity:e})}renderMark(t,e){let i=this.axis,s=i.options,r=i.chart.renderer,o=this.type,n=i.tickSize(o?o+"Tick":"tick"),a=t.x,h=t.y,l=u(s["minor"!==o?"tickWidth":"minorTickWidth"],!o&&i.isXAxis?1:0),d=s["minor"!==o?"tickColor":"minorTickColor"],c=this.mark,p=!c;n&&(i.opposite&&(n[0]=-n[0]),c||(this.mark=c=r.path().addClass("highcharts-"+(o?o+"-":"")+"tick").add(i.axisGroup),i.chart.styledMode||c.attr({stroke:d,"stroke-width":l})),c[p?"attr":"animate"]({d:this.getMarkPath(a,h,n[0],c.strokeWidth(),i.horiz,r),opacity:e}))}renderLabel(t,e,i,s){let r=this.axis,o=r.horiz,n=r.options,a=this.label,h=n.labels,l=h.step,c=u(this.tickmarkOffset,r.tickmarkOffset),p=t.x,g=t.y,f=!0;a&&d(p)&&(a.xy=t=this.getLabelPosition(p,g,a,o,h,c,s,l),(!this.isFirst||this.isLast||n.showFirstLabel)&&(!this.isLast||this.isFirst||n.showLastLabel)?!o||h.step||h.rotation||e||0===i||this.handleOverflow(t):f=!1,l&&s%l&&(f=!1),f&&d(t.y)?(t.opacity=i,a[this.isNewLabel?"attr":"animate"](t).show(!0),this.isNewLabel=!1):(a.hide(),this.isNewLabel=!0))}replaceMovedLabel(){let t=this.label,e=this.axis;t&&!this.isNew&&(t.animate({opacity:0},void 0,t.destroy),delete this.label),e.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel}}}),i(e,"Core/Axis/Axis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/AxisDefaults.js"],e["Core/Color/Color.js"],e["Core/Defaults.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Axis/Tick.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o,n,a){let{animObject:h}=t,{xAxis:l,yAxis:d}=e,{defaultOptions:c}=s,{registerEventOptions:p}=r,{deg2rad:u}=o,{arrayMax:g,arrayMin:f,clamp:m,correctFloat:x,defined:y,destroyObjectProperties:b,erase:v,error:S,extend:C,fireEvent:k,getClosestDistance:M,insertItem:w,isArray:T,isNumber:A,isString:P,merge:L,normalizeTickInterval:O,objectEach:D,pick:E,relativeLength:I,removeEvent:j,splat:B,syncTimeout:R}=a,z=(t,e)=>O(e,void 0,void 0,E(t.options.allowDecimals,e<.5||void 0!==t.tickAmount),!!t.tickAmount);C(c,{xAxis:l,yAxis:L(l,d)});class N{constructor(t,e,i){this.init(t,e,i)}init(t,e,i=this.coll){let s="xAxis"===i,r=this.isZAxis||(t.inverted?!s:s);this.chart=t,this.horiz=r,this.isXAxis=s,this.coll=i,k(this,"init",{userOptions:e}),this.opposite=E(e.opposite,this.opposite),this.side=E(e.side,this.side,r?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);let o=this.options,n=o.labels;this.type??(this.type=o.type||"linear"),this.uniqueNames??(this.uniqueNames=o.uniqueNames??!0),k(this,"afterSetType"),this.userOptions=e,this.minPixelPadding=0,this.reversed=E(o.reversed,this.reversed),this.visible=o.visible,this.zoomEnabled=o.zoomEnabled,this.hasNames="category"===this.type||!0===o.categories,this.categories=T(o.categories)&&o.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=y(o.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len??(this.len=0),this.minRange=this.userMinRange=o.minRange||o.maxZoom,this.range=o.range,this.offset=o.offset||0,this.max=void 0,this.min=void 0;let a=E(o.crosshair,B(t.options.tooltip.crosshairs)[s?0:1]);this.crosshair=!0===a?{}:a,-1===t.axes.indexOf(this)&&(s?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),w(this,t[this.coll])),t.orderItems(this.coll),this.series=this.series||[],t.inverted&&!this.isZAxis&&s&&!y(this.reversed)&&(this.reversed=!0),this.labelRotation=A(n.rotation)?n.rotation:void 0,p(this,o),k(this,"afterInit")}setOptions(t){let e=this.horiz?{labels:{autoRotation:[-45],padding:4},margin:15}:{labels:{padding:1},title:{rotation:90*this.side}};this.options=L(e,c[this.coll],t),k(this,"afterSetOptions",{userOptions:t})}defaultLabelFormatter(){let t=this.axis,{numberFormatter:e}=this.chart,i=A(this.value)?this.value:NaN,s=t.chart.time,r=t.categories,o=this.dateTimeLabelFormat,n=c.lang,a=n.numericSymbols,h=n.numericSymbolMagnitude||1e3,l=t.logarithmic?Math.abs(i):t.tickInterval,d=a&&a.length,p,u;if(r)u=`${this.value}`;else if(o)u=s.dateFormat(o,i);else if(d&&a&&l>=1e3)for(;d--&&void 0===u;)l>=(p=Math.pow(h,d+1))&&10*i%p==0&&null!==a[d]&&0!==i&&(u=e(i/p,-1)+a[d]);return void 0===u&&(u=Math.abs(i)>=1e4?e(i,-1):e(i,-1,void 0,"")),u}getSeriesExtremes(){let t;let e=this;k(this,"getSeriesExtremes",null,function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=void 0,e.softThreshold=!e.isXAxis,e.series.forEach(i=>{if(i.reserveSpace()){let s=i.options,r,o=s.threshold,n,a;if(e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=(o||0)&&(o=void 0),e.isXAxis)(r=i.xData)&&r.length&&(r=e.logarithmic?r.filter(t=>t>0):r,n=(t=i.getXExtremes(r)).min,a=t.max,A(n)||n instanceof Date||(r=r.filter(A),n=(t=i.getXExtremes(r)).min,a=t.max),r.length&&(e.dataMin=Math.min(E(e.dataMin,n),n),e.dataMax=Math.max(E(e.dataMax,a),a)));else{let t=i.applyExtremes();A(t.dataMin)&&(n=t.dataMin,e.dataMin=Math.min(E(e.dataMin,n),n)),A(t.dataMax)&&(a=t.dataMax,e.dataMax=Math.max(E(e.dataMax,a),a)),y(o)&&(e.threshold=o),(!s.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1)}}})}),k(this,"afterGetSeriesExtremes")}translate(t,e,i,s,r,o){let n=this.linkedParent||this,a=s&&n.old?n.old.min:n.min;if(!A(a))return NaN;let h=n.minPixelPadding,l=(n.isOrdinal||n.brokenAxis?.hasBreaks||n.logarithmic&&r)&&n.lin2val,d=1,c=0,p=s&&n.old?n.old.transA:n.transA,u=0;return p||(p=n.transA),i&&(d*=-1,c=n.len),n.reversed&&(d*=-1,c-=d*(n.sector||n.len)),e?(u=(t=t*d+c-h)/p+a,l&&(u=n.lin2val(u))):(l&&(t=n.val2lin(t)),u=d*(t-a)*p+c+d*h+(A(o)?p*o:0),n.isRadial||(u=x(u))),u}toPixels(t,e){return this.translate(t,!1,!this.horiz,void 0,!0)+(e?0:this.pos)}toValue(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,void 0,!0)}getPlotLinePath(t){let e=this,i=e.chart,s=e.left,r=e.top,o=t.old,n=t.value,a=t.lineWidth,h=o&&i.oldChartHeight||i.chartHeight,l=o&&i.oldChartWidth||i.chartWidth,d=e.transB,c=t.translatedValue,p=t.force,u,g,f,x,y;function b(t,e,i){return"pass"!==p&&(t<e||t>i)&&(p?t=m(t,e,i):y=!0),t}let v={value:n,lineWidth:a,old:o,force:p,acrossPanes:t.acrossPanes,translatedValue:c};return k(this,"getPlotLinePath",v,function(t){u=f=(c=m(c=E(c,e.translate(n,void 0,void 0,o)),-1e9,1e9))+d,g=x=h-c-d,A(c)?e.horiz?(g=r,x=h-e.bottom+(e.options.isInternal?0:i.scrollablePixelsY||0),u=f=b(u,s,s+e.width)):(u=s,f=l-e.right+(i.scrollablePixelsX||0),g=x=b(g,r,r+e.height)):(y=!0,p=!1),t.path=y&&!p?void 0:i.renderer.crispLine([["M",u,g],["L",f,x]],a||1)}),v.path}getLinearTickPositions(t,e,i){let s,r,o;let n=x(Math.floor(e/t)*t),a=x(Math.ceil(i/t)*t),h=[];if(x(n+t)===n&&(o=20),this.single)return[e];for(s=n;s<=a&&(h.push(s),(s=x(s+t,o))!==r);)r=s;return h}getMinorTickInterval(){let{minorTicks:t,minorTickInterval:e}=this.options;return!0===t?E(e,"auto"):!1!==t?e:void 0}getMinorTickPositions(){let t=this.options,e=this.tickPositions,i=this.minorTickInterval,s=this.pointRangePadding||0,r=(this.min||0)-s,o=(this.max||0)+s,n=o-r,a=[],h;if(n&&n/i<this.len/3){let s=this.logarithmic;if(s)this.paddedTicks.forEach(function(t,e,r){e&&a.push.apply(a,s.getLogTickPositions(i,r[e-1],r[e],!0))});else if(this.dateTime&&"auto"===this.getMinorTickInterval())a=a.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(i),r,o,t.startOfWeek));else for(h=r+(e[0]-r)%i;h<=o&&h!==a[0];h+=i)a.push(h)}return 0!==a.length&&this.trimTicks(a),a}adjustForMinRange(){let t=this.options,e=this.logarithmic,{max:i,min:s,minRange:r}=this,o,n,a,h;this.isXAxis&&void 0===r&&!e&&(r=y(t.min)||y(t.max)||y(t.floor)||y(t.ceiling)?null:Math.min(5*(M(this.series.map(t=>(t.xIncrement?t.xData?.slice(0,2):t.xData)||[]))||0),this.dataMax-this.dataMin)),A(i)&&A(s)&&A(r)&&i-s<r&&(n=this.dataMax-this.dataMin>=r,o=(r-i+s)/2,a=[s-o,E(t.min,s-o)],n&&(a[2]=e?e.log2lin(this.dataMin):this.dataMin),h=[(s=g(a))+r,E(t.max,s+r)],n&&(h[2]=e?e.log2lin(this.dataMax):this.dataMax),(i=f(h))-s<r&&(a[0]=i-r,a[1]=E(t.min,i-r),s=g(a))),this.minRange=r,this.min=s,this.max=i}getClosest(){let t,e;if(this.categories)e=1;else{let i=[];this.series.forEach(function(t){let s=t.closestPointRange;t.xData?.length===1?i.push(t.xData[0]):!t.noSharedTooltip&&y(s)&&t.reserveSpace()&&(e=y(e)?Math.min(e,s):s)}),i.length&&(i.sort((t,e)=>t-e),t=M([i]))}return t&&e?Math.min(t,e):t||e}nameToX(t){let e=T(this.options.categories),i=e?this.categories:this.names,s=t.options.x,r;return t.series.requireSorting=!1,y(s)||(s=this.uniqueNames&&i?e?i.indexOf(t.name):E(i.keys[t.name],-1):t.series.autoIncrement()),-1===s?!e&&i&&(r=i.length):r=s,void 0!==r?(this.names[r]=t.name,this.names.keys[t.name]=r):t.x&&(r=t.x),r}updateNames(){let t=this,e=this.names;e.length>0&&(Object.keys(e.keys).forEach(function(t){delete e.keys[t]}),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(e=>{e.xIncrement=null,(!e.points||e.isDirtyData)&&(t.max=Math.max(t.max,e.xData.length-1),e.processData(),e.generatePoints()),e.data.forEach(function(i,s){let r;i?.options&&void 0!==i.name&&void 0!==(r=t.nameToX(i))&&r!==i.x&&(i.x=r,e.xData[s]=r)})}))}setAxisTranslation(){let t=this,e=t.max-t.min,i=t.linkedParent,s=!!t.categories,r=t.isXAxis,o=t.axisPointRange||0,n,a=0,h=0,l,d=t.transA;(r||s||o)&&(n=t.getClosest(),i?(a=i.minPointOffset,h=i.pointRangePadding):t.series.forEach(function(e){let i=s?1:r?E(e.options.pointRange,n,0):t.axisPointRange||0,l=e.options.pointPlacement;if(o=Math.max(o,i),!t.single||s){let t=e.is("xrange")?!r:r;a=Math.max(a,t&&P(l)?0:i/2),h=Math.max(h,t&&"on"===l?0:i)}}),l=t.ordinal&&t.ordinal.slope&&n?t.ordinal.slope/n:1,t.minPointOffset=a*=l,t.pointRangePadding=h*=l,t.pointRange=Math.min(o,t.single&&s?1:e),r&&n&&(t.closestPointRange=n)),t.translationSlope=t.transA=d=t.staticScale||t.len/(e+h||1),t.transB=t.horiz?t.left:t.bottom,t.minPixelPadding=d*a,k(this,"afterSetAxisTranslation")}minFromRange(){let{max:t,min:e}=this;return A(t)&&A(e)&&t-e||void 0}setTickInterval(t){let{categories:e,chart:i,dataMax:s,dataMin:r,dateTime:o,isXAxis:n,logarithmic:a,options:h,softThreshold:l}=this,d=A(this.threshold)?this.threshold:void 0,c=this.minRange||0,{ceiling:p,floor:u,linkedTo:g,softMax:f,softMin:m}=h,b=A(g)&&i[this.coll]?.[g],v=h.tickPixelInterval,C=h.maxPadding,M=h.minPadding,w=0,T,P=A(h.tickInterval)&&h.tickInterval>=0?h.tickInterval:void 0,L,O,D,I;if(o||e||b||this.getTickAmount(),D=E(this.userMin,h.min),I=E(this.userMax,h.max),b?(this.linkedParent=b,T=b.getExtremes(),this.min=E(T.min,T.dataMin),this.max=E(T.max,T.dataMax),this.type!==b.type&&S(11,!0,i)):(l&&y(d)&&A(s)&&A(r)&&(r>=d?(L=d,M=0):s<=d&&(O=d,C=0)),this.min=E(D,L,r),this.max=E(I,O,s)),A(this.max)&&A(this.min)&&(a&&(this.positiveValuesOnly&&!t&&0>=Math.min(this.min,E(r,this.min))&&S(10,!0,i),this.min=x(a.log2lin(this.min),16),this.max=x(a.log2lin(this.max),16)),this.range&&A(r)&&(this.userMin=this.min=D=Math.max(r,this.minFromRange()||0),this.userMax=I=this.max,this.range=void 0)),k(this,"foundExtremes"),this.adjustForMinRange(),A(this.min)&&A(this.max)){if(!A(this.userMin)&&A(m)&&m<this.min&&(this.min=D=m),!A(this.userMax)&&A(f)&&f>this.max&&(this.max=I=f),e||this.axisPointRange||this.stacking?.usePercentage||b||!(w=this.max-this.min)||(!y(D)&&M&&(this.min-=w*M),y(I)||!C||(this.max+=w*C)),!A(this.userMin)&&A(u)&&(this.min=Math.max(this.min,u)),!A(this.userMax)&&A(p)&&(this.max=Math.min(this.max,p)),l&&A(r)&&A(s)){let t=d||0;!y(D)&&this.min<t&&r>=t?this.min=h.minRange?Math.min(t,this.max-c):t:!y(I)&&this.max>t&&s<=t&&(this.max=h.minRange?Math.max(t,this.min+c):t)}!i.polar&&this.min>this.max&&(y(h.min)?this.max=this.min:y(h.max)&&(this.min=this.max)),w=this.max-this.min}if(this.min!==this.max&&A(this.min)&&A(this.max)?b&&!P&&v===b.options.tickPixelInterval?this.tickInterval=P=b.tickInterval:this.tickInterval=E(P,this.tickAmount?w/Math.max(this.tickAmount-1,1):void 0,e?1:w*v/Math.max(this.len,v)):this.tickInterval=1,n&&!t){let t=this.min!==this.old?.min||this.max!==this.old?.max;
vendor: 4,585 bytes, line 64820
64820this.series.forEach(function(e){e.forceCrop=e.forceCropping?.(),e.processData(t)}),k(this,"postProcessData",{hasExtremesChanged:t})}this.setAxisTranslation(),k(this,"initialAxisTranslation"),this.pointRange&&!P&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));let j=E(h.minTickInterval,o&&!this.series.some(t=>t.noSharedTooltip)?this.closestPointRange:0);!P&&this.tickInterval<j&&(this.tickInterval=j),o||a||P||(this.tickInterval=z(this,this.tickInterval)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()}setTickPositions(){let t=this.options,e=t.tickPositions,i=t.tickPositioner,s=this.getMinorTickInterval(),r=!this.isPanning,o=r&&t.startOnTick,n=r&&t.endOnTick,a=[],h;if(this.tickmarkOffset=this.categories&&"between"===t.tickmarkPlacement&&1===this.tickInterval?.5:0,this.single=this.min===this.max&&y(this.min)&&!this.tickAmount&&(this.min%1==0||!1!==t.allowDecimals),e)a=e.slice();else if(A(this.min)&&A(this.max)){if(!this.ordinal?.positions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))a=[this.min,this.max],S(19,!1,this.chart);else if(this.dateTime)a=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,t.units),this.min,this.max,t.startOfWeek,this.ordinal?.positions,this.closestPointRange,!0);else if(this.logarithmic)a=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else{let t=this.tickInterval,e=t;for(;e<=2*t;)if(a=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&a.length>this.tickAmount)this.tickInterval=z(this,e*=1.1);else break}a.length>this.len&&(a=[a[0],a[a.length-1]])[0]===a[1]&&(a.length=1),i&&(this.tickPositions=a,(h=i.apply(this,[this.min,this.max]))&&(a=h))}this.tickPositions=a,this.minorTickInterval="auto"===s&&this.tickInterval?this.tickInterval/t.minorTicksPerMajor:s,this.paddedTicks=a.slice(0),this.trimTicks(a,o,n),!this.isLinked&&A(this.min)&&A(this.max)&&(this.single&&a.length<2&&!this.categories&&!this.series.some(t=>t.is("heatmap")&&"between"===t.options.pointPlacement)&&(this.min-=.5,this.max+=.5),e||h||this.adjustTickAmount()),k(this,"afterSetTickPositions")}trimTicks(t,e,i){let s=t[0],r=t[t.length-1],o=!this.isOrdinal&&this.minPointOffset||0;if(k(this,"trimTicks"),!this.isLinked){if(e&&s!==-1/0)this.min=s;else for(;this.min-o>t[0];)t.shift();if(i)this.max=r;else for(;this.max+o<t[t.length-1];)t.pop();0===t.length&&y(s)&&!this.options.tickPositions&&t.push((r+s)/2)}}alignToOthers(){let t;let e=this,i=e.chart,s=[this],r=e.options,o=i.options.chart,n="yAxis"===this.coll&&o.alignThresholds,a=[];if(e.thresholdAlignment=void 0,(!1!==o.alignTicks&&r.alignTicks||n)&&!1!==r.startOnTick&&!1!==r.endOnTick&&!e.logarithmic){let r=t=>{let{horiz:e,options:i}=t;return[e?i.left:i.top,i.width,i.height,i.pane].join(",")},o=r(this);i[this.coll].forEach(function(i){let{series:n}=i;n.length&&n.some(t=>t.visible)&&i!==e&&r(i)===o&&(t=!0,s.push(i))})}if(t&&n){s.forEach(t=>{let i=t.getThresholdAlignment(e);A(i)&&a.push(i)});let t=a.length>1?a.reduce((t,e)=>t+=e,0)/a.length:void 0;s.forEach(e=>{e.thresholdAlignment=t})}return t}getThresholdAlignment(t){if((!A(this.dataMin)||this!==t&&this.series.some(t=>t.isDirty||t.isDirtyData))&&this.getSeriesExtremes(),A(this.threshold)){let t=m((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(t=1-t),t}}getTickAmount(){let t=this.options,e=t.tickPixelInterval,i=t.tickAmount;y(t.tickInterval)||i||!(this.len<e)||this.isRadial||this.logarithmic||!t.startOnTick||!t.endOnTick||(i=2),!i&&this.alignToOthers()&&(i=Math.ceil(this.len/e)+1),i<4&&(this.finalTickAmt=i,i=5),this.tickAmount=i}adjustTickAmount(){let t=this,{finalTickAmt:e,max:i,min:s,options:r,tickPositions:o,tickAmount:n,thresholdAlignment:a}=t,h=o?.length,l=E(t.threshold,t.softThreshold?0:null),d,c,p=t.tickInterval,u,g=()=>o.push(x(o[o.length-1]+p)),f=()=>o.unshift(x(o[0]-p));if(A(a)&&(u=a<.5?Math.ceil(a*(n-1)):Math.floor(a*(n-1)),r.reversed&&(u=n-1-u)),t.hasData()&&A(s)&&A(i)){let a=()=>{t.transA*=(h-1)/(n-1),t.min=r.startOnTick?o[0]:Math.min(s,o[0]),t.max=r.endOnTick?o[o.length-1]:Math.max(i,o[o.length-1])};if(A(u)&&A(t.threshold)){for(;o[u]!==l||o.length!==n||o[0]>s||o[o.length-1]<i;){for(o.length=0,o.push(t.threshold);o.length<n;)void 0===o[u]||o[u]>t.threshold?f():g();if(p>8*t.tickInterval)break;p*=2}a()}else if(h<n){for(;o.length<n;)o.length%2||s===l?g():f();a()}if(y(e)){for(c=d=o.length;c--;)(3===e&&c%2==1||e<=2&&c>0&&c<d-1)&&o.splice(c,1);t.finalTickAmt=void 0}}}setScale(){let{coll:t,stacking:e}=this,i=!1,s=!1;
64820this.series.forEach(t=>{i=i||t.isDirtyData||t.isDirty,s=s||t.xAxis&&t.xAxis.isDirty||!1}),this.setAxisSize();let r=this.len!==(this.old&&this.old.len);r||i||s||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(e&&"yAxis"===t&&e.buildStacks(),this.forceRedraw=!1,this.userMinRange||(this.minRange=void 0),this.getSeriesExtremes(),this.setTickInterval(),e&&"xAxis"===t&&e.buildStacks(),this.isDirty||(this.isDirty=r||this.min!==this.old?.min||this.max!==this.old?.max)):e&&e.cleanStacks(),i&&delete this.allExtremes,k(this,"afterSetScale")}setExtremes(t,e,i=!0,s,r){this.series.forEach(t=>{delete t.kdTree}),k(this,"setExtremes",r=C(r,{min:t,max:e}),t=>{this.userMin=t.min,this.userMax=t.max,this.eventArgs=t,i&&this.chart.redraw(s)})}setAxisSize(){let t=this.chart,e=this.options,i=e.offsets||[0,0,0,0],s=this.horiz,r=this.width=Math.round(I(E(e.width,t.plotWidth-i[3]+i[1]),t.plotWidth)),o=this.height=Math.round(I(E(e.height,t.plotHeight-i[0]+i[2]),t.plotHeight)),n=this.top=Math.round(I(E(e.top,t.plotTop+i[0]),t.plotHeight,t.plotTop)),a=this.left=Math.round(I(E(e.left,t.plotLeft+i[3]),t.plotWidth,t.plotLeft));this.bottom=t.chartHeight-o-n,this.right=t.chartWidth-r-a,this.len=Math.max(s?r:o,0),this.pos=s?a:n}getExtremes(){let t=this.logarithmic;return{min:t?x(t.lin2log(this.min)):this.min,max:t?x(t.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}getThreshold(t){let e=this.logarithmic,i=e?e.lin2log(this.min):this.min,s=e?e.lin2log(this.max):this.max;return null===t||t===-1/0?t=i:t===1/0?t=s:i>t?t=i:s<t&&(t=s),this.translate(t,0,1,0,1)}autoLabelAlign(t){let e=(E(t,0)-90*this.side+720)%360,i={align:"center"};return k(this,"autoLabelAlign",i,function(t){e>15&&e<165?t.align="right":e>195&&e<345&&(t.align="left")}),i.align}tickSize(t){let e=this.options,i=E(e["tick"===t?"tickWidth":"minorTickWidth"],"tick"===t&&this.isXAxis&&!this.categories?1:0),s=e["tick"===t?"tickLength":"minorTickLength"],r;i&&s&&("inside"===e[t+"Position"]&&(s=-s),r=[s,i]);let o={tickSize:r};return k(this,"afterTickSize",o),o.tickSize}labelMetrics(){let t=this.chart.renderer,e=this.ticks,i=e[Object.keys(e)[0]]||{};return this.chart.renderer.fontMetrics(i.label||i.movedLabel||t.box)}unsquish(){let t=this.options.labels,e=t.padding||0,i=this.horiz,s=this.tickInterval,r=this.len/(((this.categories?1:0)+this.max-this.min)/s),o=t.rotation,n=x(.8*this.labelMetrics().h),a=Math.max(this.max-this.min,0),h=function(t){let i=(t+2*e)/(r||1);return(i=i>1?Math.ceil(i):1)*s>a&&t!==1/0&&r!==1/0&&a&&(i=Math.ceil(a/s)),x(i*s)},l=s,d,c=Number.MAX_VALUE,p;if(i){if(!t.staggerLines&&(A(o)?p=[o]:r<t.autoRotationLimit&&(p=t.autoRotation)),p){let t,e;for(let i of p)(i===o||i&&i>=-90&&i<=90)&&(e=(t=h(Math.abs(n/Math.sin(u*i))))+Math.abs(i/360))<c&&(c=e,d=i,l=t)}}else l=h(.75*n);return this.autoRotation=p,this.labelRotation=E(d,A(o)?o:0),t.step?s:l}getSlotWidth(t){let e=this.chart,i=this.horiz,s=this.options.labels,r=Math.max(this.tickPositions.length-(this.categories?0:1),1),o=e.margin[3];if(t&&A(t.slotWidth))return t.slotWidth;if(i&&s.step<2)return s.rotation?0:(this.staggerLines||1)*this.len/r;if(!i){let t=s.style.width;if(void 0!==t)return parseInt(String(t),10);if(o)return o-e.spacing[3]}return .33*e.chartWidth}renderUnsquish(){let t=this.chart,e=t.renderer,i=this.tickPositions,s=this.ticks,r=this.options.labels,o=r.style,n=this.horiz,a=this.getSlotWidth(),h=Math.max(1,Math.round(a-(n?2*(r.padding||0):r.distance||0))),l={},d=this.labelMetrics(),c=o.textOverflow,p,u,g=0,f,m;if(P(r.rotation)||(l.rotation=r.rotation||0),i.forEach(function(t){let e=s[t];e.movedLabel&&e.replaceMovedLabel(),e&&e.label&&e.label.textPxLength>g&&(g=e.label.textPxLength)}),this.maxLabelLength=g,this.autoRotation)g>h&&g>d.h?l.rotation=this.labelRotation:this.labelRotation=0;else if(a&&(p=h,!c))for(u="clip",m=i.length;!n&&m--;)(f=s[i[m]].label)&&("ellipsis"===f.styles.textOverflow?f.css({textOverflow:"clip"}):f.textPxLength>a&&f.css({width:a+"px"}),f.getBBox().height>this.len/i.length-(d.h-d.f)&&(f.specificTextOverflow="ellipsis"));l.rotation&&(p=g>.5*t.chartHeight?.33*t.chartHeight:g,c||(u="ellipsis")),this.labelAlign=r.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(l.align=this.labelAlign),i.forEac
vendor: 44,073 bytes, line 64820
64820h(function(t){let e=s[t],i=e&&e.label,r=o.width,n={};i&&(i.attr(l),e.shortenLabel?e.shortenLabel():p&&!r&&"nowrap"!==o.whiteSpace&&(p<i.textPxLength||"SPAN"===i.element.tagName)?(n.width=p+"px",c||(n.textOverflow=i.specificTextOverflow||u),i.css(n)):!i.styles.width||n.width||r||i.css({width:null}),delete i.specificTextOverflow,e.rotation=l.rotation)},this),this.tickRotCorr=e.rotCorr(d.b,this.labelRotation||0,0!==this.side)}hasData(){return this.series.some(function(t){return t.hasData()})||this.options.showEmpty&&y(this.min)&&y(this.max)}addTitle(t){let e;let i=this.chart.renderer,s=this.horiz,r=this.opposite,o=this.options.title,n=this.chart.styledMode;this.axisTitle||((e=o.textAlign)||(e=(s?{low:"left",middle:"center",high:"right"}:{low:r?"right":"left",middle:"center",high:r?"left":"right"})[o.align]),this.axisTitle=i.text(o.text||"",0,0,o.useHTML).attr({zIndex:7,rotation:o.rotation||0,align:e}).addClass("highcharts-axis-title"),n||this.axisTitle.css(L(o.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),n||o.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[t?"show":"hide"](t)}generateTick(t){let e=this.ticks;e[t]?e[t].addLabel():e[t]=new n(this,t)}createGroups(){let{axisParent:t,chart:e,coll:i,options:s}=this,r=e.renderer,o=(e,o,n)=>r.g(e).attr({zIndex:n}).addClass(`highcharts-${i.toLowerCase()}${o} `+(this.isRadial?`highcharts-radial-axis${o} `:"")+(s.className||"")).add(t);this.axisGroup||(this.gridGroup=o("grid","-grid",s.gridZIndex),this.axisGroup=o("axis","",s.zIndex),this.labelGroup=o("axis-labels","-labels",s.labels.zIndex))}getOffset(){let t=this,{chart:e,horiz:i,options:s,side:r,ticks:o,tickPositions:n,coll:a}=t,h=e.inverted&&!t.isZAxis?[1,0,3,2][r]:r,l=t.hasData(),d=s.title,c=s.labels,p=A(s.crossing),u=e.axisOffset,g=e.clipOffset,f=[-1,1,1,-1][r],m,x=0,b,v=0,S=0,C,M;if(t.showAxis=m=l||s.showEmpty,t.staggerLines=t.horiz&&c.staggerLines||void 0,t.createGroups(),l||t.isLinked?(n.forEach(function(e){t.generateTick(e)}),t.renderUnsquish(),t.reserveSpaceDefault=0===r||2===r||({1:"left",3:"right"})[r]===t.labelAlign,E(c.reserveSpace,!p&&null,"center"===t.labelAlign||null,t.reserveSpaceDefault)&&n.forEach(function(t){S=Math.max(o[t].getLabelSize(),S)}),t.staggerLines&&(S*=t.staggerLines),t.labelOffset=S*(t.opposite?-1:1)):D(o,function(t,e){t.destroy(),delete o[e]}),d?.text&&!1!==d.enabled&&(t.addTitle(m),m&&!p&&!1!==d.reserveSpace&&(t.titleOffset=x=t.axisTitle.getBBox()[i?"height":"width"],v=y(b=d.offset)?0:E(d.margin,i?5:10))),t.renderLine(),t.offset=f*E(s.offset,u[r]?u[r]+(s.margin||0):0),t.tickRotCorr=t.tickRotCorr||{x:0,y:0},M=0===r?-t.labelMetrics().h:2===r?t.tickRotCorr.y:0,C=Math.abs(S)+v,S&&(C-=M,C+=f*(i?E(c.y,t.tickRotCorr.y+f*c.distance):E(c.x,f*c.distance))),t.axisTitleMargin=E(b,C),t.getMaxLabelDimensions&&(t.maxLabelDimensions=t.getMaxLabelDimensions(o,n)),"colorAxis"!==a&&g){let e=this.tickSize("tick");u[r]=Math.max(u[r],(t.axisTitleMargin||0)+x+f*t.offset,C,n&&n.length&&e?e[0]+f*t.offset:0);let i=!t.axisLine||s.offset?0:t.axisLine.strokeWidth()/2;g[h]=Math.max(g[h],i)}k(this,"afterGetOffset")}getLinePath(t){let e=this.chart,i=this.opposite,s=this.offset,r=this.horiz,o=this.left+(i?this.width:0)+s,n=e.chartHeight-this.bottom-(i?this.height:0)+s;return i&&(t*=-1),e.renderer.crispLine([["M",r?this.left:o,r?n:this.top],["L",r?e.chartWidth-this.right:o,r?n:e.chartHeight-this.bottom]],t)}renderLine(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))}getTitlePosition(t){let e=this.horiz,i=this.left,s=this.top,r=this.len,o=this.options.title,n=e?i:s,a=this.opposite,h=this.offset,l=o.x,d=o.y,c=this.chart.renderer.fontMetrics(t),p=t?Math.max(t.getBBox(!1,0).height-c.h-1,0):0,u={low:n+(e?0:r),middle:n+r/2,high:n+(e?r:0)}[o.align],g=(e?s+this.height:i)+(e?1:-1)*(a?-1:1)*(this.axisTitleMargin||0)+[-p,p,c.f,-p][this.side],f={x:e?u+l:g+(a?this.width:0)+h+l,y:e?g+d-(a?this.height:0)+h:u+d};return k(this,"afterGetTitlePosition",{titlePosition:f}),f}renderMinorTick(t,e){let i=this.minorTicks;i[t]||(i[t]=new n(this,t,"minor")),e&&i[t].isNew&&i[t].render(null,!0),i[t].render(null,!1,1)}renderTick(t,e,i){let s=this.isLinked,r=this.ticks;(!s||t>=this.min&&t<=this.max||this.grid&&this.grid.isColumn)&&(r[t]||(r[t]=new n(this,t)),i&&r[t].isNew&&r[t].render(e,!0,-1),r[t].render(e))}render(){let t,e;let i=this,s=i.chart,r=i.logarithmic,a=s.renderer,l=i.options,d=i.isLinked,c=i.tickPositions,p=i.axisTitle,u=i.ticks,g=i.minorTicks,f=i.alternateBands,m=l.stackLabels,x=l.alternateGridColor,y=l.crossing,b=i.tickmarkOffset,v=i.axisLine,S=i.showAxis,C=h(a.globalAnimation);if(i.labelEdge.length=0,i.overlap=!1,[u,g,f].forEach(function(t){D(t,function(t){t.isActive=!1})}),A(y)){let t=this.isXAxis?s.yAxis[0]:s.xAxis[0],e=[1,-1,-1,1][this.side];if(t){let s=t.toPixels(y,!0);i.horiz&&(s=t.len-s),i.offset=e*s}}if(i.hasData()||d){let a=i.chart.hasRendered&&i.old&&A(i.old.min);i.minorTickInterval&&!i.categories&&i.getMinorTickPositions().forEach(function(t){i.renderMinorTick(t,a)}),c.length&&(c.forEach(function(t,e){i.renderTick(t,e,a)}),b&&(0===i.min||i.single)&&(u[-1]||(u[-1]=new n(i,-1,null,!0)),u[-1].render(-1))),x&&c.forEach(function(n,a){e=void 0!==c[a+1]?c[a+1]+b:i.max-b,a%2==0&&n<i.max&&e<=i.max+(s.polar?-b:b)&&(f[n]||(f[n]=new o.PlotLineOrBand(i,{})),t=n+b,f[n].options={from:r?r.lin2log(t):t,to:r?r.lin2log(e):e,color:x,className:"highcharts-alternate-grid"},f[n].render(),f[n].isActive=!0)}),i._addedPlotLB||(i._addedPlotLB=!0,(l.plotLines||[]).concat(l.plotBands||[]).forEach(function(t){i.addPlotBandOrLine(t)}))}[u,g,f].forEach(function(t){let e=[],i=C.duration;D(t,function(t,i){t.isActive||(t.render(i,!1,0),t.isActive=!1,e.push(i))}),R(function(){let i=e.length;for(;i--;)t[e[i]]&&!t[e[i]].isActive&&(t[e[i]].destroy(),delete t[e[i]])},t!==f&&s.hasRendered&&i?i:0)}),v&&(v[v.isPlaced?"animate":"attr"]({d:this.getLinePath(v.strokeWidth())}),v.isPlaced=!0,v[S?"show":"hide"](S)),p&&S&&(p[p.isNew?"attr":"animate"](i.getTitlePosition(p)),p.isNew=!1),m&&m.enabled&&i.stacking&&i.stacking.renderStackTotals(),i.old={len:i.len,max:i.max,min:i.min,transA:i.transA,userMax:i.userMax,userMin:i.userMin},i.isDirty=!1,k(this,"afterRender")}redraw(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(t){t.render()})),this.series.forEach(function(t){t.isDirty=!0})}getKeepProps(){return this.keepProps||N.keepProps}destroy(t){let e=this,i=e.plotLinesAndBands,s=this.eventOptions;if(k(this,"destroy",{keepEvents:t}),t||j(e),[e.ticks,e.minorTicks,e.alternateBands].forEach(function(t){b(t)}),i){let t=i.length;for(;t--;)i[t].destroy()}for(let t in["axisLine","axisTitle","axisGroup","gridGroup","labelGroup","cross","scrollbar"].forEach(function(t){e[t]&&(e[t]=e[t].destroy())}),e.plotLinesAndBandsGroups)e.plotLinesAndBandsGroups[t]=e.plotLinesAndBandsGroups[t].destroy();D(e,function(t,i){-1===e.getKeepProps().indexOf(i)&&delete e[i]}),this.eventOptions=s}drawCrosshair(t,e){let s=this.crosshair,r=E(s&&s.snap,!0),o=this.chart,n,a,h,l=this.cross,d;if(k(this,"drawCrosshair",{e:t,point:e}),t||(t=this.cross&&this.cross.e),s&&!1!==(y(e)||!r)){if(r?y(e)&&(a=E("colorAxis"!==this.coll?e.crosshairPos:null,this.isXAxis?e.plotX:this.len-e.plotY)):a=t&&(this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos),y(a)&&(d={value:e&&(this.isXAxis?e.x:E(e.stackY,e.y)),translatedValue:a},o.polar&&C(d,{isCrosshair:!0,chartX:t&&t.chartX,chartY:t&&t.chartY,point:e}),n=this.getPlotLinePath(d)||null),!y(n)){this.hideCrosshair();return}h=this.categories&&!this.isRadial,l||(this.cross=l=o.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(h?"category ":"thin ")+(s.className||"")).attr({zIndex:E(s.zIndex,2)}).add(),!o.styledMode&&(l.attr({stroke:s.color||(h?i.parse("#ccd3ff").setOpacity(.25).get():"#cccccc"),"stroke-width":E(s.width,1)}).css({"pointer-events":"none"}),s.dashStyle&&l.attr({dashstyle:s.dashStyle}))),l.show().attr({d:n}),h&&!s.width&&l.attr({"stroke-width":this.transA}),this.cross.e=t}else this.hideCrosshair();k(this,"afterDrawCrosshair",{e:t,point:e})}hideCrosshair(){this.cross&&this.cross.hide(),k(this,"afterHideCrosshair")}update(t,e){let i=this.chart;t=L(this.userOptions,t),this.destroy(!0),this.init(i,t),i.isDirtyBox=!0,E(e,!0)&&i.redraw()}remove(t){let e=this.chart,i=this.coll,s=this.series,r=s.length;for(;r--;)s[r]&&s[r].remove(!1);v(e.axes,this),v(e[i]||[],this),e.orderItems(i),this.destroy(),e.isDirtyBox=!0,E(t,!0)&&e.redraw()}setTitle(t,e){this.update({title:t},e)}setCategories(t,e){this.update({categories:t},e)}}return N.keepProps=["coll","extKey","hcEvents","len","names","series","userMax","userMin"],N}),i(e,"Core/Axis/DateTimeAxis.js",[e["Core/Utilities.js"]],function(t){var e;let{addEvent:i,getMagnitude:s,normalizeTickInterval:r,timeUnits:o}=t;return function(t){function e(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function n(){if("datetime"!==this.type){this.dateTime=void 0;return}this.dateTime||(this.dateTime=new a(this))}t.compose=function(t){return t.keepProps.includes("dateTime")||(t.keepProps.push("dateTime"),t.prototype.getTimeTicks=e,i(t,"afterSetType",n)),t};class a{constructor(t){this.axis=t}normalizeTimeTickInterval(t,e){let i=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],n=i[i.length-1],a=o[n[0]],h=n[1],l;for(l=0;l<i.length&&(a=o[(n=i[l])[0]],h=n[1],!i[l+1]||!(t<=(a*h[h.length-1]+o[i[l+1][0]])/2));l++);a===o.year&&t<5*a&&(h=[1,2,5]);let d=r(t/a,h,"year"===n[0]?Math.max(s(t/a),1):1);return{unitRange:a,count:d,unitName:n[0]}}getXDateFormat(t,e){let{axis:i}=this,s=i.chart.time;return i.closestPointRange?s.getDateFormat(i.closestPointRange,t,i.options.startOfWeek,e)||s.resolveDTLFormat(e.year).main:s.resolveDTLFormat(e.day).main}}t.Additions=a}(e||(e={})),e}),i(e,"Core/Axis/LogarithmicAxis.js",[e["Core/Utilities.js"]],function(t){var e;let{addEvent:i,normalizeTickInterval:s,pick:r}=t;return function(t){function e(){"logarithmic"!==this.type?this.logarithmic=void 0:this.logarithmic??(this.logarithmic=new n(this))}function o(){let t=this.logarithmic;t&&(this.lin2val=function(e){return t.lin2log(e)},this.val2lin=function(e){return t.log2lin(e)})}t.compose=function(t){return t.keepProps.includes("logarithmic")||(t.keepProps.push("logarithmic"),i(t,"afterSetType",e),i(t,"afterInit",o)),t};class n{constructor(t){this.axis=t}getLogTickPositions(t,e,i,o){let n=this.axis,a=n.len,h=n.options,l=[];if(o||(this.minorAutoInterval=void 0),t>=.5)t=Math.round(t),l=n.getLinearTickPositions(t,e,i);else if(t>=.08){let s,r,n,a,h,d,c;let p=Math.floor(e);for(s=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],r=p;r<i+1&&!c;r++)for(n=0,a=s.length;n<a&&!c;n++)(h=this.log2lin(this.lin2log(r)*s[n]))>e&&(!o||d<=i)&&void 0!==d&&l.push(d),d>i&&(c=!0),d=h}else{let d=this.lin2log(e),c=this.lin2log(i),p=o?n.getMinorTickInterval():h.tickInterval,u=h.tickPixelInterval/(o?5:1),g=o?a/n.tickPositions.length:a;t=s(t=r("auto"===p?null:p,this.minorAutoInterval,(c-d)*u/(g||1))),l=n.getLinearTickPositions(t,d,c).map(this.log2lin),o||(this.minorAutoInterval=t/5)}return o||(n.tickInterval=t),l}lin2log(t){return Math.pow(10,t)}log2lin(t){return Math.log(t)/Math.LN10}}t.Additions=n}(e||(e={})),e}),i(e,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[e["Core/Utilities.js"]],function(t){var e;let{erase:i,extend:s,isNumber:r}=t;return function(t){let e;function o(t){return this.addPlotBandOrLine(t,"plotBands")}function n(t,i){let s=this.userOptions,r=new e(this,t);if(this.visible&&(r=r.render()),r){if(this._addedPlotLB||(this._addedPlotLB=!0,(s.plotLines||[]).concat(s.plotBands||[]).forEach(t=>{this.addPlotBandOrLine(t)})),i){let e=s[i]||[];e.push(t),s[i]=e}this.plotLinesAndBands.push(r)}return r}function a(t){return this.addPlotBandOrLine(t,"plotLines")}function h(t,e,i){i=i||this.options;let s=this.getPlotLinePath({value:e,force:!0,acrossPanes:i.acrossPanes}),o=[],n=this.horiz,a=!r(this.min)||!r(this.max)||t<this.min&&e<this.min||t>this.max&&e>this.max,h=this.getPlotLinePath({value:t,force:!0,acrossPanes:i.acrossPanes}),l,d=1,c;if(h&&s)for(a&&(c=h.toString()===s.toString(),d=0),l=0;l<h.length;l+=2){let t=h[l],e=h[l+1],i=s[l],r=s[l+1];("M"===t[0]||"L"===t[0])&&("M"===e[0]||"L"===e[0])&&("M"===i[0]||"L"===i[0])&&("M"===r[0]||"L"===r[0])&&(n&&i[1]===t[1]?(i[1]+=d,r[1]+=d):n||i[2]!==t[2]||(i[2]+=d,r[2]+=d),o.push(["M",t[1],t[2]],["L",e[1],e[2]],["L",r[1],r[2]],["L",i[1],i[2]],["Z"])),o.isFlat=c}return o}function l(t){this.removePlotBandOrLine(t)}function d(t){let e=this.plotLinesAndBands,s=this.options,r=this.userOptions;if(e){let o=e.length;for(;o--;)e[o].id===t&&e[o].destroy();[s.plotLines||[],r.plotLines||[],s.plotBands||[],r.plotBands||[]].forEach(function(e){for(o=e.length;o--;)(e[o]||{}).id===t&&i(e,e[o])})}}function c(t){this.removePlotBandOrLine(t)}t.compose=function(t,i){let r=i.prototype;return r.addPlotBand||(e=t,s(r,{addPlotBand:o,addPlotLine:a,addPlotBandOrLine:n,getPlotBandPath:h,removePlotBand:l,removePlotLine:c,removePlotBandOrLine:d})),i}}(e||(e={})),e}),i(e,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",[e["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],e["Core/Utilities.js"]],function(t,e){let{addEvent:i,arrayMax:s,arrayMin:r,defined:o,destroyObjectProperties:n,erase:a,fireEvent:h,merge:l,objectEach:d,pick:c}=e;class p{static compose(e,s){return i(e,"afterInit",function(){this.labelCollectors.push(()=>{let t=[];for(let e of this.axes)for(let{label:i,options:s}of e.plotLinesAndBands)i&&!s?.label?.allowOverlap&&t.push(i);return t})}),t.compose(p,s)}constructor(t,e){this.axis=t,this.options=e,this.id=e.id}render(){h(this,"render");let{axis:t,options:e}=this,{horiz:i,logarithmic:s}=t,{color:r,events:n,zIndex:a=0}=e,p={},u=t.chart.renderer,g=e.to,f=e.from,m=e.value,x=e.borderWidth,y=e.label,{label:b,svgElem:v}=this,S=[],C,k=o(f)&&o(g),M=o(m),w=!v,T={class:"highcharts-plot-"+(k?"band ":"line ")+(e.className||"")},A=k?"bands":"lines";if(!t.chart.styledMode&&(M?(T.stroke=r||"#999999",T["stroke-width"]=c(e.width,1),e.dashStyle&&(T.dashstyle=e.dashStyle)):k&&(T.fill=r||"#e6e9ff",x&&(T.stroke=e.borderColor,T["stroke-width"]=x))),p.zIndex=a,A+="-"+a,(C=t.plotLinesAndBandsGroups[A])||(t.plotLinesAndBandsGroups[A]=C=u.g("plot-"+A).attr(p).add()),v||(this.svgElem=v=u.path().attr(T).add(C)),o(m))S=t.getPlotLinePath({value:s?.log2lin(m)??m,lineWidth:v.strokeWidth(),acrossPanes:e.acrossPanes});else{if(!(o(f)&&o(g)))return;S=t.getPlotBandPath(s?.log2lin(f)??f,s?.log2lin(g)??g,e)}return!this.eventsAdded&&n&&(d(n,(t,e)=>{v?.on(e,t=>{n[e].apply(this,[t])})}),this.eventsAdded=!0),(w||!v.d)&&S?.length?v.attr({d:S}):v&&(S?(v.show(),v.animate({d:S})):v.d&&(v.hide(),b&&(this.label=b=b.destroy()))),y&&(o(y.text)||o(y.formatter))&&S?.length&&t.width>0&&t.height>0&&!S.isFlat?(y=l({align:i&&k?"center":void 0,x:i?!k&&4:10,verticalAlign:!i&&k?"middle":void 0,y:i?k?16:10:k?6:-4,rotation:i&&!k?90:0,...k?{inside:!0}:{}},y),this.renderLabel(y,S,k,a)):b&&b.hide(),this}renderLabel(t,e,i,n){let a=this.axis,h=a.chart.renderer,d=t.inside,c=this.label;c||(this.label=c=h.text(this.getLabelText(t),0,0,t.useHTML).attr({align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(i?"band":"line")+"-label "+(t.className||""),zIndex:n}),a.chart.styledMode||c.css(l({fontSize:"0.8em",textOverflow:i&&!d?"":"ellipsis"},t.style)),c.add());let p=e.xBounds||[e[0][1],e[1][1],i?e[2][1]:e[0][1]],u=e.yBounds||[e[0][2],e[1][2],i?e[2][2]:e[0][2]],g=r(p),f=r(u),m=s(p)-g;c.align(t,!1,{x:g,y:f,width:m,height:s(u)-f}),(!c.alignValue||"left"===c.alignValue||o(d))&&c.css({width:(t.style?.width||(i&&d?m:90===c.rotation?a.height-(c.alignAttr.y-a.top):(t.clip?a.width:a.chart.chartWidth)-(c.alignAttr.x-a.left)))+"px"}),c.show(!0)}getLabelText(t){return o(t.formatter)?t.formatter.call(this):t.text}destroy(){a(this.axis.plotLinesAndBands,this),delete this.axis,n(this)}}return p}),i(e,"Core/Tooltip.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o){var n;let{animObject:a}=t,{format:h}=e,{composed:l,doc:d,isSafari:c}=i,{distribute:p}=s,{addEvent:u,clamp:g,css:f,discardElement:m,extend:x,fireEvent:y,isArray:b,isNumber:v,isString:S,merge:C,pick:k,pushUnique:M,splat:w,syncTimeout:T}=o;class A{constructor(t,e,i){this.allowShared=!0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.options={},this.outside=!1,this.chart=t,this.init(t,e),this.pointer=i}bodyFormatter(t){return t.map(function(t){let e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"]||"")})}cleanSplit(t){this.chart.series.forEach(function(e){let i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)})}defaultFormatter(t){let e;let i=this.points||w(this);return(e=(e=[t.tooltipFooterHeaderFormatter(i[0])]).concat(t.bodyFormatter(i))).push(t.tooltipFooterHeaderFormatter(i[0],!0)),e}destroy(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),m(this.container)),o.clearTimeout(this.hideTimer)}getAnchor(t,e){let i;let{chart:s,pointer:r}=this,o=s.inverted,n=s.plotTop,a=s.plotLeft;if((t=w(t))[0].series&&t[0].series.yAxis&&!t[0].series.yAxis.options.reversedStacks&&(t=t.slice().reverse()),this.followPointer&&e)void 0===e.chartX&&(e=r.normalize(e)),i=[e.chartX-a,e.chartY-n];else if(t[0].tooltipPos)i=t[0].tooltipPos;else{let s=0,r=0;t.forEach(function(t){let e=t.pos(!0);e&&(s+=e[0],r+=e[1])}),s/=t.length,r/=t.length,this.shared&&t.length>1&&e&&(o?s=e.chartX:r=e.chartY),i=[s-a,r-n]}return i.map(Math.round)}getClassName(t,e,i){let s=this.options,r=t.series,o=r.options;return[s.className,"highcharts-label",i&&"highcharts-tooltip-header",e?"highcharts-tooltip-box":"highcharts-tooltip",!i&&"highcharts-color-"+k(t.colorIndex,r.colorIndex),o&&o.className].filter(S).join(" ")}getLabel({anchorX:t,anchorY:e}={anchorX:0,anchorY:0}){let s=this,o=this.chart.styledMode,n=this.options,a=this.split&&this.allowShared,h=this.container,l=this.chart.renderer;if(this.label){let t=!this.label.hasClass("highcharts-label");(!a&&t||a&&!t)&&this.destroy()}if(!this.label){if(this.outside){let t=this.chart.options.chart.style,e=r.getRendererType();this.container=h=i.doc.createElement("div"),h.className="highcharts-tooltip-container",f(h,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,(t&&t.zIndex||0)+3)}),this.renderer=l=new e(h,0,0,t,void 0,void 0,l.styledMode)}if(a?this.label=l.g("tooltip"):(this.label=l.label("",t,e,n.shape,void 0,void 0,n.useHTML,void 0,"tooltip").attr({padding:n.padding,r:n.borderRadius}),o||this.label.attr({fill:n.backgroundColor,"stroke-width":n.borderWidth||0}).css(n.style).css({pointerEvents:n.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),s.outside){let t=this.label;[t.xSetter,t.ySetter].forEach((e,i)=>{t[i?"ySetter":"xSetter"]=r=>{e.call(t,s.distance),t[i?"y":"x"]=r,h&&(h.style[i?"top":"left"]=`${r}px`)}})}this.label.attr({zIndex:8}).shadow(n.shadow).add()}return h&&!h.parentElement&&i.doc.body.appendChild(h),this.label}getPlayingField(){let{body:t,documentElement:e}=d,{chart:i,distance:s,outside:r}=this;return{width:r?Math.max(t.scrollWidth,e.scrollWidth,t.offsetWidth,e.offsetWidth,e.clientWidth)-2*s:i.chartWidth,height:r?Math.max(t.scrollHeight,e.scrollHeight,t.offsetHeight,e.offsetHeight,e.clientHeight):i.chartHeight}}getPosition(t,e,i){let{distance:s,chart:r,outside:o,pointer:n}=this,{inverted:a,plotLeft:h,plotTop:l,polar:d}=r,{plotX:c=0,plotY:p=0}=i,u={},g=a&&i.h||0,{height:f,width:m}=this.getPlayingField(),x=n.getChartPosition(),y=t=>t*x.scaleX,b=t=>t*x.scaleY,v=i=>{let n="x"===i;return[i,n?m:f,n?t:e].concat(o?[n?y(t):b(e),n?x.left-s+y(c+h):x.top-s+b(p+l),0,n?m:f]:[n?t:e,n?c+h:p+l,n?h:l,n?h+r.plotWidth:l+r.plotHeight])},S=v("y"),C=v("x"),M,w=!!i.negative;!d&&r.hoverSeries?.yAxis?.reversed&&(w=!w);let T=!this.followPointer&&k(i.ttBelow,!d&&!a===w),A=function(t,e,i,r,n,a,h){let l=o?"y"===t?b(s):y(s):s,d=(i-r)/2,c=r<n-s,p=n+s+r<e,f=n-l-i+d,m=n+l-d;if(T&&p)u[t]=m;else if(!T&&c)u[t]=f;else if(c)u[t]=Math.min(h-r,f-g<0?f:f-g);else{if(!p)return!1;u[t]=Math.max(a,m+g+i>e?m:m+g)}},P=function(t,e,i,r,o){if(o<s||o>e-s)return!1;o<i/2?u[t]=1:o>e-r/2?u[t]=e-r-2:u[t]=o-i/2},L=function(t){[S,C]=[C,S],M=t},O=()=>{!1!==A.apply(0,S)?!1!==P.apply(0,C)||M||(L(!0),O()):M?u.x=u.y=0:(L(!0),O())};return(a&&!d||this.len>1)&&L(),O(),u}hide(t){let e=this;o.clearTimeout(this.hideTimer),t=k(t,this.options.hideDelay),this.isHidden||(this.hideTimer=T(function(){let i=e.getLabel();e.getLabel().animate({opacity:0},{duration:t?150:t,complete:()=>{i.hide(),e.container&&e.container.remove()}}),e.isHidden=!0},t))}init(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.isHidden=!0,this.split=e.split&&!t.inverted&&!t.polar,this.shared=e.shared||this.split,this.outside=k(e.outside,!!(t.scrollablePixelsX||t.scrollablePixelsY))}shouldStickOnContact(t){return!!(!this.followPointer&&this.options.stickOnContact&&(!t||this.pointer.inClass(t.target,"highcharts-tooltip")))}move(t,e,i,s){let r=this,o=a(!r.isHidden&&r.options.animation),n=r.followPointer||(r.len||0)>1,h={x:t,y:e};n||(h.anchorX=i,h.anchorY=s),o.step=()=>r.drawTracker(),r.getLabel().animate(h,o)}refresh(t,e){let{chart:i,options:s,pointer:r,shared:n}=this,a=w(t),l=a[0],d=[],c=s.format,p=s.formatter||this.defaultFormatter,u=i.styledMode,f={},m=this.allowShared;if(!s.enabled||!l.series)return;o.clearTimeout(this.hideTimer),this.allowShared=!(!b(t)&&t.series&&t.series.noSharedTooltip),m=m&&!this.allowShared,this.followPointer=!this.split&&l.series.tooltipOptions.followPointer;let x=this.getAnchor(t,e),v=x[0],C=x[1];n&&this.allowShared?(r.applyInactiveState(a),a.forEach(function(t){t.setState("hover"),d.push(t.getLabelConfig())}),(f=l.getLabelConfig()).points=d):f=l.getLabelConfig(),this.len=d.length;let M=S(c)?h(c,f,i):p.call(f,this),T=l.series;if(this.distance=k(T.tooltipOptions.distance,16),!1===M)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(M,a);else{let t=v,o=C;if(e&&r.isDirectTouch&&(t=e.chartX-i.plotLeft,o=e.chartY-i.plotTop),i.polar||!1===T.options.clip||a.some(e=>r.isDirectTouch||e.series.shouldShowTooltip(t,o))){let t=this.getLabel(m&&this.tt||{});(!s.style.width||u)&&t.css({width:(this.outside?this.getPlayingField():i.spacingBox).width+"px"}),t.attr({class:this.getClassName(l),text:M&&M.join?M.join(""):M}),this.outside&&t.attr({x:g(t.x||0,0,this.getPlayingField().width-(t.width||0))}),u||t.attr({stroke:s.borderColor||l.color||T.color||"#666666"}),this.updatePosition({plotX:v,plotY:C,negative:l.negative,ttBelow:l.ttBelow,h:x[2]||0})}else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}y(this,"refresh")}renderSplit(t,e){let i=this,{chart:s,chart:{chartWidth:r,chartHeight:o,plotHeight:n,plotLeft:a,plotTop:h,scrollablePixelsY:l=0,scrollablePixelsX:u,styledMode:f},distance:m,options:y,options:{positioner:b},pointer:v}=i,{scrollLeft:C=0,scrollTop:M=0}=s.scrollablePlotArea?.scrollingContainer||{},w=i.outside&&"number"!=typeof u?d.documentElement.getBoundingClientRect():{left:C,right:C+r,top:M,bottom:M+o},T=i.getLabel(),A=this.renderer||s.renderer,P=!!(s.xAxis[0]&&s.xAxis[0].opposite),{left:L,top:O}=v.getChartPosition(),D=h+M,E=0,I=n-l;function j(t,e,s,r,o=!0){let n,a;return s?(n=P?0:I,a=g(t-r/2,w.left,w.right-r-(i.outside?L:0))):(n=e-D,a=g(a=o?t-r-m:t+m,o?a:w.left,w.right)),{x:a,y:n}}S(t)&&(t=[!1,t]);let B=t.slice(0,e.length+1).reduce(function(t,s,r){if(!1!==s&&""!==s){let o=e[r-1]||{isHeader:!0,plotX:e[0].plotX,plotY:n,series:{}},l=o.isHeader,d=l?i:o.series,c=d.tt=function(t,e,s){let r=t,{isHeader:o,series:n}=e;if(!r){let t={padding:y.padding,r:y.borderRadius};f||(t.fill=y.backgroundColor,t["stroke-width"]=y.borderWidth??1),r=A.label("",0,0,y[o?"headerShape":"shape"],void 0,void 0,y.useHTML).addClass(i.getClassName(e,!0,o)).attr(t).add(T)}return r.isActive=!0,r.attr({text:s}),f||r.css(y.style).attr({stroke:y.borderColor||e.color||n.color||"#333333"}),r}(d.tt,o,s.toString()),p=c.getBBox(),u=p.width+c.strokeWidth();l&&(E=p.height,I+=E,P&&(D-=E));let{anchorX:x,anchorY:v}=function(t){let e,i;let{isHeader:s,plotX:r=0,plotY:o=0,series:l}=t;if(s)e=Math.max(a+r,a),i=h+n/2;else{let{xAxis:t,yAxis:s}=l;e=t.pos+g(r,-m,t.len+m),l.shouldShowTooltip(0,s.pos-h+o,{ignoreX:!0})&&(i=s.pos+o)}return{anchorX:e=g(e,w.left-m,w.right+m),anchorY:i}}(o);if("number"==typeof v){let e=p.height+1,s=b?b.call(i,u,e,o):j(x,v,l,u);t.push({align:b?0:void 0,anchorX:x,anchorY:v,boxWidth:u,point:o,rank:k(s.rank,l?1:0),size:e,target:s.y,tt:c,x:s.x})}else c.isActive=!1}return t},[]);!b&&B.some(t=>{let{outside:e}=i,s=(e?L:0)+t.anchorX;return s<w.left&&s+t.boxWidth<w.right||s<L-w.left+t.boxWidth&&w.right-s>s})&&(B=B.map(t=>{let{x:e,y:i}=j(t.anchorX,t.anchorY,t.point.isHeader,t.boxWidth,!1);return x(t,{target:i,x:e})})),i.cleanSplit(),p(B,I);let R={left:L,right:L};B.forEach(function(t){let{x:e,boxWidth:s,isHeader:r}=t;!r&&(i.outside&&L+e<R.left&&(R.left=L+e),!r&&i.outside&&R.left+s>R.right&&(R.right=L+e))}),B.forEach(function(t){let{x:e,anchorX:s,anchorY:r,pos:o,point:{isHeader:n}}=t,a={visibility:void 0===o?"hidden":"inherit",x:e,y:(o||0)+D,anchorX:s,anchorY:r};if(i.outside&&e<s){let t=L-R.left;t>0&&(n||(a.x=e+t,a.anchorX=s+t),n&&(a.x=(R.right-R.left)/2,a.anchorX=s+t))}t.tt.attr(a)});let{container:z,outside:N,renderer:W}=i;if(N&&z&&W){let{width:t,height:e,x:i,y:s}=T.getBBox();W.setSize(t+i,e+s,!1),z.style.left=R.left+"px",z.style.top=O+"px"}c&&T.attr({opacity:1===T.opacity?.999:1})}drawTracker(){if(!this.shouldStickOnContact()){this.tracker&&(this.tracker=this.tracker.destroy());return}let t=this.chart,e=this.label,i=this.shared?t.hoverPoints:t.hoverPoint;if(!e||!i)return;let s={x:0,y:0,width:0,height:0},r=this.getAnchor(i),o=e.getBBox();r[0]+=t.plotLeft-(e.translateX||0),r[1]+=t.plotTop-(e.translateY||0),s.x=Math.min(0,r[0]),s.y=Math.min(0,r[1]),s.width=r[0]<0?Math.max(Math.abs(r[0]),o.width-r[0]):Math.max(Math.abs(r[0]),o.width),s.height=r[1]<0?Math.max(Math.abs(r[1]),o.height-Math.abs(r[1])):Math.max(Math.abs(r[1]),o.height),this.tracker?this.tracker.attr(s):(this.tracker=e.renderer.rect(s).addClass("highcharts-tracker").add(e),t.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}styledModeFormat(t){return t.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}tooltipFooterHeaderFormatter(t,e){let i=t.series,s=i.tooltipOptions,r=i.xAxis,o=r&&r.dateTime,n={isFooter:e,labelConfig:t},a=s.xDateFormat,l=s[e?"footerFormat":"headerFormat"];return y(this,"headerFormatter",n,function(e){o&&!a&&v(t.key)&&(a=o.getXDateFormat(t.key,s.dateTimeLabelFormats)),o&&a&&(t.point&&t.point.tooltipDateKeys||["key"]).forEach(function(t){l=l.replace("{point."+t+"}","{point."+t+":"+a+"}")}),i.chart.styledMode&&(l=this.styledModeFormat(l)),e.text=h(l,{point:t,series:i},this.chart)}),n.text}update(t){this.destroy(),this.init(this.chart,C(!0,this.options,t))}updatePosition(t){let{chart:e,container:i,distance:s,options:r,pointer:o,renderer:n}=this,{height:a=0,width:h=0}=this.getLabel(),{left:l,top:d,scaleX:c,scaleY:p}=o.getChartPosition(),u=(r.positioner||this.getPosition).call(this,h,a,t),g=(t.plotX||0)+e.plotLeft,m=(t.plotY||0)+e.plotTop,x;n&&i&&(r.positioner&&(u.x+=l-s,u.y+=d-s),x=(r.borderWidth||0)+2*s+2,n.setSize(h+x,a+x,!1),(1!==c||1!==p)&&(f(i,{transform:`scale(${c}, ${p})`}),g*=c,m*=p),g+=l-u.x,m+=d-u.y),this.move(Math.round(u.x),Math.round(u.y||0),g,m)}}return(n=A||(A={})).compose=function(t){M(l,"Core.Tooltip")&&u(t,"afterInit",function(){let t=this.chart;t.options.tooltip&&(t.tooltip=new n(t,t.options.tooltip,this))})},A}),i(e,"Core/Series/Point.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e,i,s,r){let{animObject:o}=e,{defaultOptions:n}=i,{format:a}=s,{addEvent:h,crisp:l,erase:d,extend:c,fireEvent:p,getNestedProperty:u,isArray:g,isFunction:f,isNumber:m,isObject:x,merge:y,pick:b,syncTimeout:v,removeEvent:S,uniqueKey:C}=r;class k{animateBeforeDestroy(){let t=this,e={x:t.startXPos,opacity:0},i=t.getGraphicalProps();i.singular.forEach(function(i){t[i]=t[i].animate("dataLabel"===i?{x:t[i].startXPos,y:t[i].startYPos,opacity:0}:e)}),i.plural.forEach(function(e){t[e].forEach(function(e){e.element&&e.animate(c({x:t.startXPos},e.startYPos?{x:e.startXPos,y:e.startYPos}:{}))})})}applyOptions(t,e){let i=this.series,s=i.options.pointValKey||i.pointValKey;return c(this,t=k.prototype.optionsToObject.call(this,t)),this.options=this.options?c(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,s&&(this.y=k.prototype.getNestedProperty.call(this,s)),this.selected&&(this.state="select"),"name"in this&&void 0===e&&i.xAxis&&i.xAxis.hasNames&&(this.x=i.xAxis.nameToX(this)),void 0===this.x&&i?this.x=e??i.autoIncrement():m(t.x)&&i.options.relativeXValue&&(this.x=i.autoIncrement(t.x)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this}destroy(){if(!this.destroyed){let t=this,e=t.series,i=e.chart,s=e.options.dataSorting,r=i.hoverPoints,n=o(t.series.chart.renderer.globalAnimation),a=()=>{for(let e in(t.graphic||t.graphics||t.dataLabel||t.dataLabels)&&(S(t),t.destroyElements()),t)delete t[e]};t.legendItem&&i.legend.destroyItem(t),r&&(t.setState(),d(r,t),r.length||(i.hoverPoints=null)),t===i.hoverPoint&&t.onMouseOut(),s&&s.enabled?(this.animateBeforeDestroy(),v(a,n.duration)):a(),i.pointCount--}this.destroyed=!0}destroyElements(t){let e=this,i=e.getGraphicalProps(t);i.singular.forEach(function(t){e[t]=e[t].destroy()}),i.plural.forEach(function(t){e[t].forEach(function(t){t&&t.element&&t.destroy()}),delete e[t]})}firePointEvent(t,e,i){let s=this,r=this.series.options;s.manageEvent(t),"click"===t&&r.allowPointSelect&&(i=function(t){!s.destroyed&&s.select&&s.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),p(s,t,e,i)}getClassName(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(t){let e,i;let s=this,r=[],o={singular:[],plural:[]};for((t=t||{graphic:1,dataLabel:1}).graphic&&r.push("graphic","connector"),t.dataLabel&&r.push("dataLabel","dataLabelPath","dataLabelUpper"),i=r.length;i--;)s[e=r[i]]&&o.singular.push(e);return["graphic","dataLabel"].forEach(function(e){let i=e+"s";t[e]&&s[i]&&o.plural.push(i)}),o}getLabelConfig(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}}getNestedProperty(t){return t?0===t.indexOf("custom.")?u(t,this.options):this[t]:void 0}getZone(){let t=this.series,e=t.zones,i=t.zoneAxis||"y",s,r=0;for(s=e[0];this[i]>=s.value;)s=e[++r];return this.nonZonedColor||(this.nonZonedColor=this.color),s&&s.color&&!this.options.color?this.color=s.color:this.color=this.nonZonedColor,s}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}constructor(t,e,i){this.formatPrefix="point",this.visible=!0,this.series=t,this.applyOptions(e,i),this.id??(this.id=C()),this.resolveColor(),t.chart.pointCount++,p(this,"afterInit")}isValid(){return(m(this.x)||this.x instanceof Date)&&m(this.y)}optionsToObject(t){let e=this.series,i=e.options.keys,s=i||e.pointArrayMap||["y"],r=s.length,o={},n,a=0,h=0;if(m(t)||null===t)o[s[0]]=t;else if(g(t))for(!i&&t.length>r&&("string"==(n=typeof t[0])?o.name=t[0]:"number"===n&&(o.x=t[0]),a++);h<r;)i&&void 0===t[a]||(s[h].indexOf(".")>0?k.prototype.setNestedProperty(o,t[a],s[h]):o[s[h]]=t[a]),a++,h++;else"object"==typeof t&&(o=t,t.dataLabels&&(e.hasDataLabels=()=>!0),t.marker&&(e._hasPointMarkers=!0));return o}pos(t,e=this.plotY){if(!this.destroyed){let{plotX:i,series:s}=this,{chart:r,xAxis:o,yAxis:n}=s,a=0,h=0;if(m(i)&&m(e))return t&&(a=o?o.pos:r.plotLeft,h=n?n.pos:r.plotTop),r.inverted&&o&&n?[n.len-e+h,o.len-i+a]:[i+a,e+h]}}resolveColor(){let t=this.series,e=t.chart.options.chart,i=t.chart.styledMode,s,r,o=e.colorCount,n;delete this.nonZonedColor,t.options.colorByPoint?(i||(s=(r=t.options.colors||t.chart.options.colors)[t.colorCounter],o=r.length),n=t.colorCounter,t.colorCounter++,t.colorCounter===o&&(t.colorCounter=0)):(i||(s=t.color),n=t.colorIndex),this.colorIndex=b(this.options.colorIndex,n),this.color=b(this.options.color,s)}setNestedProperty(t,e,i){return i.split(".").reduce(function(t,i,s,r){let o=r.length-1===s;return t[i]=o?e:x(t[i],!0)?t[i]:{},t[i]},t),t}shouldDraw(){return!this.isNull}tooltipFormatter(t){let e=this.series,i=e.tooltipOptions,s=b(i.valueDecimals,""),r=i.valuePrefix||"",o=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach(function(e){e="{point."+e,(r||o)&&(t=t.replace(RegExp(e+"}","g"),r+e+"}"+o)),t=t.replace(RegExp(e+"}","g"),e+":,."+s+"f}")}),a(t,{point:this,series:this.series},e.chart)}update(t,e,i,s){let r;let o=this,n=o.series,a=o.graphic,h=n.chart,l=n.options;function d(){o.applyOptions(t);let s=a&&o.hasMockGraphic,d=null===o.y?!s:s;a&&d&&(o.graphic=a.destroy(),delete o.hasMockGraphic),x(t,!0)&&(a&&a.element&&t&&t.marker&&void 0!==t.marker.symbol&&(o.graphic=a.destroy()),t?.dataLabels&&o.dataLabel&&(o.dataLabel=o.dataLabel.destroy())),r=o.index,n.updateParallelArrays(o,r),l.data[r]=x(l.data[r],!0)||x(t,!0)?o.options:b(t,l.data[r]),n.isDirty=n.isDirtyData=!0,!n.fixedBox&&n.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===l.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}e=b(e,!0),!1===s?d():o.firePointEvent("update",{options:t},d)}remove(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)}select(t,e){let i=this,s=i.series,r=s.chart;t=b(t,!i.selected),this.selectedStaging=t,i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,s.options.data[s.data.indexOf(i)]=i.options,i.setState(t&&"select"),e||r.getSelectedPoints().forEach(function(t){let e=t.series;t.selected&&t!==i&&(t.selected=t.options.selected=!1,e.options.data[e.data.indexOf(t)]=t.options,t.setState(r.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))})}),delete this.selectedStaging}onMouseOver(t){let{inverted:e,pointer:i}=this.series.chart;i&&(t=t?i.normalize(t):i.getChartCoordinatesFromPoint(this,e),i.runPointActions(t,this))}onMouseOut(){let t=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t.hoverPoints||[]).forEach(function(t){t.setState()}),t.hoverPoints=t.hoverPoint=null}manageEvent(t){let e=y(this.series.options.point,this.options),i=e.events?.[t];f(i)&&(!this.hcEvents?.[t]||this.hcEvents?.[t]?.map(t=>t.fn).indexOf(i)===-1)?(this.importedUserEvent?.(),this.importedUserEvent=h(this,t,i)):this.importedUserEvent&&!i&&this.hcEvents?.[t]&&(S(this,t),delete this.hcEvents[t],Object.keys(this.hcEvents)||delete this.importedUserEvent)}setState(e,i){let s=this.series,r=this.state,o=s.options.states[e||"normal"]||{},a=n.plotOptions[s.type].marker&&s.options.marker,h=a&&!1===a.enabled,l=a&&a.states&&a.states[e||"normal"]||{},d=!1===l.enabled,u=this.marker||{},g=s.chart,f=a&&s.markerAttribs,x=s.halo,y,v,S,C=s.stateMarkerGraphic,k;if((e=e||"")===this.state&&!i||this.selected&&"select"!==e||!1===o.enabled||e&&(d||h&&!1===l.enabled)||e&&u.states&&u.states[e]&&!1===u.states[e].enabled)return;if(this.state=e,f&&(y=s.markerAttribs(this,e)),this.graphic&&!this.hasMockGraphic){if(r&&this.graphic.removeClass("highcharts-point-"+r),e&&this.graphic.addClass("highcharts-point-"+e),!g.styledMode){v=s.pointAttribs(this,e),S=b(g.options.chart.animation,o.animation);let t=v.opacity;s.options.inactiveOtherPoints&&m(t)&&(this.dataLabels||[]).forEach(function(e){e&&!e.hasClass("highcharts-data-label-hidden")&&(e.animate({opacity:t},S),e.connector&&e.connector.animate({opacity:t},S))}),this.graphic.animate(v,S)}y&&this.graphic.animate(y,b(g.options.chart.animation,l.animation,a.animation)),C&&C.hide()}else e&&l&&(k=u.symbol||s.symbol,C&&C.currentSymbol!==k&&(C=C.destroy()),y&&(C?C[i?"animate":"attr"]({x:y.x,y:y.y}):k&&(s.stateMarkerGraphic=C=g.renderer.symbol(k,y.x,y.y,y.width,y.height).add(s.markerGroup),C.currentSymbol=k)),!g.styledMode&&C&&"inactive"!==this.state&&C.attr(s.pointAttribs(this,e))),C&&(C[e&&this.isInside?"show":"hide"](),C.element.point=this,C.addClass(this.getClassName(),!0));let M=o.halo,w=this.graphic||C,T=w&&w.visibility||"inherit";M&&M.size&&w&&"hidden"!==T&&!this.isCluster?(x||(s.halo=x=g.renderer.path().add(w.parentGroup)),x.show()[i?"animate":"attr"]({d:this.haloPath(M.size)}),x.attr({class:"highcharts-halo highcharts-color-"+b(this.colorIndex,s.colorIndex)+(this.className?" "+this.className:""),visibility:T,zIndex:-1}),x.point=this,g.styledMode||x.attr(c({fill:this.color||s.color,"fill-opacity":M.opacity},t.filterUserAttributes(M.attributes||{})))):x?.point?.haloPath&&!x.point.destroyed&&x.animate({d:x.point.haloPath(0)},null,x.hide),p(this,"afterSetState",{state:e})}haloPath(t){let e=this.pos();return e?this.series.chart.renderer.symbols.circle(l(e[0],1)-t,e[1]-t,2*t,2*t):[]}}return k}),i(e,"Core/Pointer.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var s;let{parse:r}=t,{charts:o,composed:n,isTouchDevice:a}=e,{addEvent:h,attr:l,css:d,extend:c,find:p,fireEvent:u,isNumber:g,isObject:f,objectEach:m,offset:x,pick:y,pushUnique:b,splat:v}=i;class S{applyInactiveState(t){let e=[],i;(t||[]).forEach(function(t){i=t.series,e.push(i),i.linkedParent&&e.push(i.linkedParent),i.linkedSeries&&(e=e.concat(i.linkedSeries)),i.navigatorSeries&&e.push(i.navigatorSeries)}),this.chart.series.forEach(function(t){-1===e.indexOf(t)?t.setState("inactive",!0):t.options.inactiveOtherPoints&&t.setAllPointsToState("inactive")})}destroy(){let t=this;this.eventsToUnbind.forEach(t=>t()),this.eventsToUnbind=[],!e.chartCount&&(S.unbindDocumentMouseUp&&S.unbindDocumentMouseUp.forEach(t=>t()),S.unbindDocumentTouchEnd&&(S.unbindDocumentTouchEnd=S.unbindDocumentTouchEnd())),clearInterval(t.tooltipTimeout),m(t,function(e,i){t[i]=void 0})}getSelectionMarkerAttrs(t,e){let i={args:{chartX:t,chartY:e},attrs:{},shapeType:"rect"};return u(this,"getSelectionMarkerAttrs",i,i=>{let s;let{chart:r,zoomHor:o,zoomVert:n}=this,{mouseDownX:a=0,mouseDownY:h=0}=r,l=i.attrs;l.x=r.plotLeft,l.y=r.plotTop,l.width=o?1:r.plotWidth,l.height=n?1:r.plotHeight,o&&(s=t-a,l.width=Math.max(1,Math.abs(s)),l.x=(s>0?0:s)+a),n&&(s=e-h,l.height=Math.max(1,Math.abs(s)),l.y=(s>0?0:s)+h)}),i}drag(t){let{chart:e}=this,{mouseDownX:i=0,mouseDownY:s=0}=e,{panning:o,panKey:n,selectionMarkerFill:a}=e.options.chart,h=e.plotLeft,l=e.plotTop,d=e.plotWidth,c=e.plotHeight,p=f(o)?o.enabled:o,u=n&&t[`${n}Key`],g=t.chartX,m=t.chartY,x,y=this.selectionMarker;if((!y||!y.touch)&&(g<h?g=h:g>h+d&&(g=h+d),m<l?m=l:m>l+c&&(m=l+c),this.hasDragged=Math.sqrt(Math.pow(i-g,2)+Math.pow(s-m,2)),this.hasDragged>10)){x=e.isInsidePlot(i-h,s-l,{visiblePlotOnly:!0});let{shapeType:n,attrs:d}=this.getSelectionMarkerAttrs(g,m);(e.hasCartesianSeries||e.mapView)&&this.hasZoom&&x&&!u&&!y&&(this.selectionMarker=y=e.renderer[n](),y.attr({class:"highcharts-selection-marker",zIndex:7}).add(),e.styledMode||y.attr({fill:a||r("#334eff").setOpacity(.25).get()})),y&&y.attr(d),x&&!y&&p&&e.pan(t,o)}}dragStart(t){let e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=t.chartX,e.mouseDownY=t.chartY}getSelectionBox(t){let e={args:{marker:t},result:t.getBBox()};return u(this,"getSelectionBox",e),e.result}drop(t){let e;let{chart:i,selectionMarker:s}=this;for(let t of i.axes)t.isPanning&&(t.isPanning=!1,(t.options.startOnTick||t.options.endOnTick||t.series.some(t=>t.boosted))&&(t.forceRedraw=!0,t.setExtremes(t.userMin,t.userMax,!1),e=!0));if(e&&i.redraw(),s&&t){if(this.hasDragged){let e=this.getSelectionBox(s);i.transform({axes:i.axes.filter(t=>t.zoomEnabled&&("xAxis"===t.coll&&this.zoomX||"yAxis"===t.coll&&this.zoomY)),selection:{originalEvent:t,xAxis:[],yAxis:[],...e},from:e})}g(i.index)&&(this.selectionMarker=s.destroy())}i&&g(i.index)&&(d(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=!1,this.hasDragged=0,this.pinchDown=[])}findNearestKDPoint(t,e,i){let s;return t.forEach(function(t){let r=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y"),o=t.searchPoint(i,r);f(o,!0)&&o.series&&(!f(s,!0)||function(t,i){let s=t.distX-i.distX,r=t.dist-i.dist,o=i.series.group?.zIndex-t.series.group?.zIndex;return 0!==s&&e?s:0!==r?r:0!==o?o:t.series.index>i.series.index?-1:1}(s,o)>0)&&(s=o)}),s}getChartCoordinatesFromPoint(t,e){let{xAxis:i,yAxis:s}=t.series,r=t.shapeArgs;if(i&&s){let o=t.clientX??t.plotX??0,n=t.plotY||0;return t.isNode&&r&&g(r.x)&&g(r.y)&&(o=r.x,n=r.y),e?{chartX:s.len+s.pos-n,chartY:i.len+i.pos-o}:{chartX:o+i.pos,chartY:n+s.pos}}if(r&&r.x&&r.y)return{chartX:r.x,chartY:r.y}}getChartPosition(){if(this.chartPosition)return this.chartPosition;let{container:t}=this.chart,e=x(t);this.chartPosition={left:e.left,top:e.top,scaleX:1,scaleY:1};let{offsetHeight:i,offsetWidth:s}=t;return s>2&&i>2&&(this.chartPosition.scaleX=e.width/s,this.chartPosition.scaleY=e.height/i),this.chartPosition}getCoordinates(t){let e={xAxis:[],yAxis:[]};for(let i of this.chart.axes)e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])});return e}getHoverData(t,e,i,s,r,o){let n=[],a=function(t){return t.visible&&!(!r&&t.directTouch)&&y(t.options.enableMouseTracking,!0)},h=e,l,d={chartX:o?o.chartX:void 0,chartY:o?o.chartY:void 0,shared:r};u(this,"beforeGetHoverData",d),l=h&&!h.stickyTracking?[h]:i.filter(t=>t.stickyTracking&&(d.filter||a)(t));let c=s&&t||!o?t:this.findNearestKDPoint(l,r,o);return h=c&&c.series,c&&(r&&!h.noSharedTooltip?(l=i.filter(function(t){return d.filter?d.filter(t):a(t)&&!t.noSharedTooltip})).forEach(function(t){let e=p(t.points,function(t){return t.x===c.x&&!t.isNull});f(e)&&(t.boosted&&t.boost&&(e=t.boost.getPoint(e)),n.push(e))}):n.push(c)),u(this,"afterGetHoverData",d={hoverPoint:c}),{hoverPoint:d.hoverPoint,hoverSeries:h,hoverPoints:n}}getPointFromEvent(t){let e=t.target,i;for(;e&&!i;)i=e.point,e=e.parentNode;return i}onTrackerMouseOut(t){let e=this.chart,i=t.relatedTarget,s=e.hoverSeries;this.isDirectTouch=!1,!s||!i||s.stickyTracking||this.inClass(i,"highcharts-tooltip")||this.inClass(i,"highcharts-series-"+s.index)&&this.inClass(i,"highcharts-tracker")||s.onMouseOut()}inClass(t,e){let i=t,s;for(;i;){if(s=l(i,"class")){if(-1!==s.indexOf(e))return!0;if(-1!==s.indexOf("highcharts-container"))return!1}i=i.parentElement}}constructor(t,e){this.hasDragged=0,this.pointerCaptureEventsToUnbind=[],this.eventsToUnbind=[],this.options=e,this.chart=t,this.runChartClick=!!e.chart.events?.click,this.pinchDown=[],this.setDOMEvents(),u(this,"afterInit")}normalize(t,e){let i=t.touches,s=i?i.length?i.item(0):y(i.changedTouches,t.changedTouches)[0]:t;e||(e=this.getChartPosition());let r=s.pageX-e.left,o=s.pageY-e.top;return c(t,{chartX:Math.round(r/=e.scaleX),chartY:Math.round(o/=e.scaleY)})}onContainerClick(t){let e=this.chart,i=e.hoverPoint,s=this.normalize(t),r=e.plotLeft,o=e.plotTop;!e.cancelClick&&(i&&this.inClass(s.target,"highcharts-tracker")?(u(i.series,"click",c(s,{point:i}
vendor: 4,437 bytes, line 64820
64820)),e.hoverPoint&&i.firePointEvent("click",s)):(c(s,this.getCoordinates(s)),e.isInsidePlot(s.chartX-r,s.chartY-o,{visiblePlotOnly:!0})&&u(e,"click",s)))}onContainerMouseDown(t){let i=(1&(t.buttons||t.button))==1;t=this.normalize(t),e.isFirefox&&0!==t.button&&this.onContainerMouseMove(t),(void 0===t.button||i)&&(this.zoomOption(t),i&&t.preventDefault?.(),this.dragStart(t))}onContainerMouseLeave(t){let{pointer:e}=o[y(S.hoverChartIndex,-1)]||{};t=this.normalize(t),this.onContainerMouseMove(t),e&&!this.inClass(t.relatedTarget,"highcharts-tooltip")&&(e.reset(),e.chartPosition=void 0)}onContainerMouseEnter(){delete this.chartPosition}onContainerMouseMove(t){let e=this.chart,i=e.tooltip,s=this.normalize(t);this.setHoverChartIndex(t),("mousedown"===e.mouseIsDown||this.touchSelect(s))&&this.drag(s),!e.openMenu&&(this.inClass(s.target,"highcharts-tracker")||e.isInsidePlot(s.chartX-e.plotLeft,s.chartY-e.plotTop,{visiblePlotOnly:!0}))&&!(i&&i.shouldStickOnContact(s))&&(this.inClass(s.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(s))}onDocumentTouchEnd(t){this.onDocumentMouseUp(t)}onContainerTouchMove(t){this.touchSelect(t)?this.onContainerMouseMove(t):this.touch(t)}onContainerTouchStart(t){this.touchSelect(t)?this.onContainerMouseDown(t):(this.zoomOption(t),this.touch(t,!0))}onDocumentMouseMove(t){let e=this.chart,i=e.tooltip,s=this.chartPosition,r=this.normalize(t,s);!s||e.isInsidePlot(r.chartX-e.plotLeft,r.chartY-e.plotTop,{visiblePlotOnly:!0})||i&&i.shouldStickOnContact(r)||r.target!==e.container.ownerDocument&&this.inClass(r.target,"highcharts-tracker")||this.reset()}onDocumentMouseUp(t){o[y(S.hoverChartIndex,-1)]?.pointer?.drop(t)}pinch(t){let e=this,{chart:i,hasZoom:s,lastTouches:r}=e,o=[].map.call(t.touches||[],t=>e.normalize(t)),n=o.length,a=1===n&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),h=i.tooltip,l=1===n&&y(h?.options.followTouchMove,!0);n>1?e.initiated=!0:l&&(e.initiated=!1),s&&e.initiated&&!a&&!1!==t.cancelable&&t.preventDefault(),"touchstart"===t.type?(e.pinchDown=o,e.res=!0,i.mouseDownX=t.chartX):l?this.runPointActions(e.normalize(t)):r&&(u(i,"touchpan",{originalEvent:t,touches:o},()=>{let e=t=>{let e=t[0],i=t[1]||e;return{x:e.chartX,y:e.chartY,width:i.chartX-e.chartX,height:i.chartY-e.chartY}};i.transform({axes:i.axes.filter(t=>t.zoomEnabled&&(this.zoomHor&&t.horiz||this.zoomVert&&!t.horiz)),to:e(o),from:e(r),trigger:t.type})}),e.res&&(e.res=!1,this.reset(!1,0))),e.lastTouches=o}reset(t,e){let i=this.chart,s=i.hoverSeries,r=i.hoverPoint,o=i.hoverPoints,n=i.tooltip,a=n&&n.shared?o:r;t&&a&&v(a).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?n&&a&&v(a).length&&(n.refresh(a),n.shared&&o?o.forEach(function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):r&&(r.setState(r.state,!0),i.axes.forEach(function(t){t.crosshair&&r.series[t.coll]===t&&t.drawCrosshair(null,r)}))):(r&&r.onMouseOut(),o&&o.forEach(function(t){t.setState()}),s&&s.onMouseOut(),n&&n.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach(function(t){t.hideCrosshair()}),i.hoverPoints=i.hoverPoint=void 0)}runPointActions(t,e,i){let s=this.chart,r=s.series,n=s.tooltip&&s.tooltip.options.enabled?s.tooltip:void 0,a=!!n&&n.shared,l=e||s.hoverPoint,d=l&&l.series||s.hoverSeries,c=(!t||"touchmove"!==t.type)&&(!!e||d&&d.directTouch&&this.isDirectTouch),u=this.getHoverData(l,d,r,c,a,t);l=u.hoverPoint,d=u.hoverSeries;let g=u.hoverPoints,f=d&&d.tooltipOptions.followPointer&&!d.tooltipOptions.split,m=a&&d&&!d.noSharedTooltip;if(l&&(i||l!==s.hoverPoint||n&&n.isHidden)){if((s.hoverPoints||[]).forEach(function(t){-1===g.indexOf(t)&&t.setState()}),s.hoverSeries!==d&&d.onMouseOver(),this.applyInactiveState(g),(g||[]).forEach(function(t){t.setState("hover")}),s.hoverPoint&&s.hoverPoint.firePointEvent("mouseOut"),!l.series)return;s.hoverPoints=g,s.hoverPoint=l,l.firePointEvent("mouseOver",void 0,()=>{n&&l&&n.refresh(m?g:l,t)})}else if(f&&n&&!n.isHidden){let e=n.getAnchor([{}],t);s.isInsidePlot(e[0],e[1],{visiblePlotOnly:!0})&&n.updatePosition({plotX:e[0],plotY:e[1]})}this.unDocMouseMove||(this.unDocMouseMove=h(s.container.ownerDocument,"mousemove",t=>o[S.hoverChartIndex??-1]?.pointer?.onDocumentMouseMove(t)),this.eventsToUnbind.push(this.unDocMouseMove)),s.axes.forEac
vendor: 4,239 bytes, line 64820
64820h(function(e){let i;let r=y((e.crosshair||{}).snap,!0);!r||(i=s.hoverPoint)&&i.series[e.coll]===e||(i=p(g,t=>t.series&&t.series[e.coll]===e)),i||!r?e.drawCrosshair(t,i):e.hideCrosshair()})}setDOMEvents(){let t=this.chart.container,e=t.ownerDocument;t.onmousedown=this.onContainerMouseDown.bind(this),t.onmousemove=this.onContainerMouseMove.bind(this),t.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(h(t,"mouseenter",this.onContainerMouseEnter.bind(this)),h(t,"mouseleave",this.onContainerMouseLeave.bind(this))),S.unbindDocumentMouseUp||(S.unbindDocumentMouseUp=[]),S.unbindDocumentMouseUp.push(h(e,"mouseup",this.onDocumentMouseUp.bind(this)));let i=this.chart.renderTo.parentElement;for(;i&&"BODY"!==i.tagName;)this.eventsToUnbind.push(h(i,"scroll",()=>{delete this.chartPosition})),i=i.parentElement;this.eventsToUnbind.push(h(t,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1}),h(t,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),S.unbindDocumentTouchEnd||(S.unbindDocumentTouchEnd=h(e,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})),this.setPointerCapture(),h(this.chart,"redraw",this.setPointerCapture.bind(this))}setPointerCapture(){if(!a)return;let t=this.pointerCaptureEventsToUnbind,e=this.chart,i=e.container,s=y(e.options.tooltip?.followTouchMove,!0)&&e.series.some(t=>t.options.findNearestPointBy.indexOf("y")>-1);!this.hasPointerCapture&&s?(t.push(h(i,"pointerdown",t=>{t.target?.hasPointerCapture(t.pointerId)&&t.target?.releasePointerCapture(t.pointerId)}),h(i,"pointermove",t=>{e.pointer?.getPointFromEvent(t)?.onMouseOver(t)})),e.styledMode||d(i,{"touch-action":"none"}),i.className+=" highcharts-no-touch-action",this.hasPointerCapture=!0):this.hasPointerCapture&&!s&&(t.forEach(t=>t()),t.length=0,e.styledMode||d(i,{"touch-action":y(e.options.chart.style?.["touch-action"],"manipulation")}),i.className=i.className.replace(" highcharts-no-touch-action",""),this.hasPointerCapture=!1)}setHoverChartIndex(t){let i=this.chart,s=e.charts[y(S.hoverChartIndex,-1)];if(s&&s!==i){let e={relatedTarget:i.container};t&&!t?.relatedTarget&&(t={...e,...t}),s.pointer?.onContainerMouseLeave(t||e)}s&&s.mouseIsDown||(S.hoverChartIndex=i.index)}touch(t,e){let i;let{chart:s,pinchDown:r=[]}=this;this.setHoverChartIndex(),1===(t=this.normalize(t)).touches.length?s.isInsidePlot(t.chartX-s.plotLeft,t.chartY-s.plotTop,{visiblePlotOnly:!0})&&!s.openMenu?(e&&this.runPointActions(t),"touchmove"===t.type&&(i=!!r[0]&&Math.pow(r[0].chartX-t.chartX,2)+Math.pow(r[0].chartY-t.chartY,2)>=16),y(i,!0)&&this.pinch(t)):e&&this.reset():2===t.touches.length&&this.pinch(t)}touchSelect(t){return!!(this.chart.zooming.singleTouch&&t.touches&&1===t.touches.length)}zoomOption(t){let e=this.chart,i=e.inverted,s=e.zooming.type||"",r,o;/touch/.test(t.type)&&(s=y(e.zooming.pinchType,s)),this.zoomX=r=/x/.test(s),this.zoomY=o=/y/.test(s),this.zoomHor=r&&!i||o&&i,this.zoomVert=o&&!i||r&&i,this.hasZoom=r||o}}return(s=S||(S={})).compose=function(t){b(n,"Core.Pointer")&&h(t,"beforeRender",function(){this.pointer=new s(this,this.options)})},S}),i(e,"Core/Legend/LegendSymbol.js",[e["Core/Utilities.js"]],function(t){var e;let{extend:i,merge:s,pick:r}=t;return function(t){function e(t,e,o){let n=this.legendItem=this.legendItem||{},{chart:a,options:h}=this,{baseline:l=0,symbolWidth:d,symbolHeight:c}=t,p=this.symbol||"circle",u=c/2,g=a.renderer,f=n.group,m=l-Math.round((t.fontMetrics?.b||c)*(o?.4:.3)),x={},y,b=h.marker,v=0;if(a.styledMode||(x["stroke-width"]=Math.min(h.lineWidth||0,24),h.dashStyle?x.dashstyle=h.dashStyle:"square"===h.linecap||(x["stroke-linecap"]="round")),n.line=g.path().addClass("highcharts-graph").attr(x).add(f),o&&(n.area=g.path().addClass("highcharts-area").add(f)),x["stroke-linecap"]&&(v=Math.min(n.line.strokeWidth(),d)/2),d){let t=[["M",v,m],["L",d-v,m]];n.line.attr({d:t}),n.area?.attr({d:[...t,["L",d-v,l],["L",v,l]]})}if(b&&!1!==b.enabled&&d){let t=Math.min(r(b.radius,u),u);0===p.indexOf("url")&&(b=s(b,{width:c,height:c}),t=0),n.symbol=y=g.symbol(p,d/2-t,m-t,2*t,2*t,i({context:"legend"},b)).addClass("highcharts-point").add(f),y.isMarker=!0}}t.areaMarker=function(t,i){e.call(this,t,i,!0)},t.lineMarker=e,t.rectangle=function(t,e){let i=e.legendItem||{}
64820,s=t.options,o=t.symbolHeight,n=s.squareSymbol,a=n?o:t.symbolWidth;i.symbol=this.chart.renderer.rect(n?(t.symbolWidth-o)/2:0,t.baseline-o+1,a,o,r(t.options.symbolRadius,o/2)).addClass("highcharts-point").attr({zIndex:3}).add(i.group)}}(e||(e={})),e}),i(e,"Core/Series/SeriesDefaults.js",[],function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},enableMouseTracking:!0,events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:150},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:!0,formatter:function(){let{numberFormatter:t}=this.series.chart;return"number"!=typeof this.y?"":t(this.y,-1)},padding:5,style:{fontSize:"0.7em",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:150},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:150},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"}}),i(e,"Core/Series/SeriesRegistry.js",[e["Core/Globals.js"],e["Core/Defaults.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(t,e,i,s){var r;let{defaultOptions:o}=e,{extend:n,extendClass:a,merge:h}=s;return function(e){function s(t,s){let r=o.plotOptions||{},n=s.defaultOptions,a=s.prototype;return a.type=t,a.pointClass||(a.pointClass=i),!e.seriesTypes[t]&&(n&&(r[t]=n),e.seriesTypes[t]=s,!0)}e.seriesTypes=t.seriesTypes,e.registerSeriesType=s,e.seriesType=function(t,r,l,d,c){let p=o.plotOptions||{};if(r=r||"",p[t]=h(p[r],l),delete e.seriesTypes[t],s(t,a(e.seriesTypes[r]||function(){},d)),e.seriesTypes[t].prototype.type=t,c){class s extends i{}n(s.prototype,c),e.seriesTypes[t].prototype.pointClass=s}return e.seriesTypes[t]}}(r||(r={})),r}),i(e,"Core/Series/Series.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Series/Point.js"],e["Core/Series/SeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o,n,a,h,l){let{animObject:d,setAnimation:c}=t,{defaultOptions:p}=e,{registerEventOptions:u}=i,{svg:g,win:f}=s,{seriesTypes:m}=a,{arrayMax:x,arrayMin:y,clamp:b,correctFloat:v,crisp:S,defined:C,destroyObjectProperties:k,diffObjects:M,erase:w,error:T,extend:A,find:P,fireEvent:L,getClosestDistance:O,getNestedProperty:D,insertItem:E,isArray:I,isNumber:j,isString:B,merge:R,objectEach:z,pick:N,removeEvent:W,splat:G,syncTimeout:H}=l;class X{constructor(){this.zoneAxis="y"}init(t,e){let i;L(this,"init",{options:e});let s=this,r=t.series;this.eventsToUnbind=[],s.chart=t,s.options=s.setOptions(e);let o=s.options,n=!1!==o.visible;s.linkedSeries=[],s.bindAxes(),A(s,{name:o.name,state:"",visible:n,selected:!0===o.selected}),u(this,o);let a=o.events;(a&&a.click||o.point&&o.point.events&&o.point.events.click||o.allowPointSelect)&&(t.runTrackerClick=!0),s.getColor(),s.getSymbol(),s.parallelArrays.forEach(function(t){s[t+"Data"]||(s[t+"Data"]=[])}),s.isCartesian&&(t.hasCartesianSeries=!0),r.length&&(i=r[r.length-1]),s._i=N(i&&i._i,-1)+1,s.opacity=s.options.opacity,t.orderItems("series",E(this,r)),o.dataSorting&&o.dataSorting.enabled?s.setDataSortingOptions():s.points||s.data||s.setData(o.data,!1),L(this,"afterInit")}is(t){return m[t]&&this instanceof m[t]}bindAxes(){let t;let e=this,i=e.options,s=e.chart;L(this,"bindAxes",null,function(){(e.axisTypes||[]).forEach(function(r){(s[r]||[]).forEach(function(s){t=s.options,
64820(N(i[r],0)===s.index||void 0!==i[r]&&i[r]===t.id)&&(E(e,s.series),e[r]=s,s.isDirty=!0)}),e[r]||e.optionalAxis===r||T(18,!0,s)})}),L(this,"afterBindAxes")}updateParallelArrays(t,e,i){let s=t.series,r=j(e)?function(i){let r="y"===i&&s.toYData?s.toYData(t):t[i];s[i+"Data"][e]=r}:function(t){Array.prototype[e].apply(s[t+"Data"],i)};s.parallelArrays.forEach(r)}hasData(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&this.yData.length>0}hasMarkerChanged(t,e){let i=t.marker,s=e.marker||{};return i&&(s.enabled&&!i.enabled||s.symbol!==i.symbol||s.height!==i.height||s.width!==i.width)}autoIncrement(t){let e=this.options,i=e.pointIntervalUnit,s=e.relativeXValue,r=this.chart.time,o=this.xIncrement,n,a;return(o=N(o,e.pointStart,0),this.pointInterval=a=N(this.pointInterval,e.pointInterval,1),s&&j(t)&&(a*=t),i&&(n=new r.Date(o),"day"===i?r.set("Date",n,r.get("Date",n)+a):"month"===i?r.set("Month",n,r.get("Month",n)+a):"year"===i&&r.set("FullYear",n,r.get("FullYear",n)+a),a=n.getTime()-o),s&&j(t))?o+a:(this.xIncrement=o+a,o)}setDataSortingOptions(){let t=this.options;A(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),C(t.pointRange)||(t.pointRange=1)}setOptions(t){let e;let i=this.chart,s=i.options.plotOptions,r=i.userOptions||{},o=R(t),n=i.styledMode,a={plotOptions:s,userOptions:o};L(this,"setOptions",a);let h=a.plotOptions[this.type],l=r.plotOptions||{},d=l.series||{},c=p.plotOptions[this.type]||{},u=l[this.type]||{};this.userOptions=a.userOptions;let g=R(h,s.series,u,o);this.tooltipOptions=R(p.tooltip,p.plotOptions.series?.tooltip,c?.tooltip,i.userOptions.tooltip,l.series?.tooltip,u.tooltip,o.tooltip),this.stickyTracking=N(o.stickyTracking,u.stickyTracking,d.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||g.stickyTracking),null===h.marker&&delete g.marker,this.zoneAxis=g.zoneAxis||"y";let f=this.zones=(g.zones||[]).map(t=>({...t}));return(g.negativeColor||g.negativeFillColor)&&!g.zones&&(e={value:g[this.zoneAxis+"Threshold"]||g.threshold||0,className:"highcharts-negative"},n||(e.color=g.negativeColor,e.fillColor=g.negativeFillColor),f.push(e)),f.length&&C(f[f.length-1].value)&&f.push(n?{}:{color:this.color,fillColor:this.fillColor}),L(this,"afterSetOptions",{options:g}),g}getName(){return N(this.options.name,"Series "+(this.index+1))}getCyclic(t,e,i){let s,r;let o=this.chart,n=`${t}Index`,a=`${t}Counter`,h=i?.length||o.options.chart.colorCount;!e&&(C(r=N("color"===t?this.options.colorIndex:void 0,this[n]))?s=r:(o.series.length||(o[a]=0),s=o[a]%h,o[a]+=1),i&&(e=i[s])),void 0!==s&&(this[n]=s),this[t]=e}getColor(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||p.plotOptions[this.type].color,this.chart.options.colors)}getPointsCollection(){return(this.hasGroupedData?this.points:this.data)||[]}getSymbol(){let t=this.options.marker;this.getCyclic("symbol",t.symbol,this.chart.options.symbols)}findPointIndex(t,e){let i,s,r;let n=t.id,a=t.x,h=this.points,l=this.options.dataSorting;if(n){let t=this.chart.get(n);t instanceof o&&(i=t)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){let e=e=>!e.touched&&e.index===t.index;if(l&&l.matchByName?e=e=>!e.touched&&e.name===t.name:this.options.relativeXValue&&(e=e=>!e.touched&&e.options.x===t.x),!(i=P(h,e)))return}return i&&void 0!==(r=i&&i.index)&&(s=!0),void 0===r&&j(a)&&(r=this.xData.indexOf(a,e)),-1!==r&&void 0!==r&&this.cropped&&(r=r>=this.cropStart?r-this.cropStart:r),!s&&j(r)&&h[r]&&h[r].touched&&(r=void 0),r}updateData(t,e){let i=this.options,s=i.dataSorting,r=this.points,o=[],n=this.requireSorting,a=t.length===r.length,h,l,d,c,p=!0;if(this.xIncrement=null,t.forEach(function(t,e){let l;let d=C(t)&&this.pointClass.prototype.optionsToObject.call({series:this},t)||{},p=d.x;d.id||j(p)?(-1===(l=this.findPointIndex(d,c))||void 0===l?o.push(t):r[l]&&t!==i.data[l]?(r[l].update(t,!1,null,!1),r[l].touched=!0,n&&(c=l+1)):r[l]&&(r[l].touched=!0),(!a||e!==l||s&&s.enabled||this.hasDerivedData)&&(h=!0)):o.push(t)},this),h)for(l=r.length;l--;)(d=r[l])&&!d.touched&&d.remove&&d.remove(!1,e);else!a||s&&s.enabled?p=!1:(t.forEach(function(t,e){t===r[e].y||r[e].destroyed||r[e].update(t,!1,null,!1)}),o.length=0);return r.forEach(function(t){t&&(t.touched=!1)}
64820),!!p&&(o.forEach(function(t){this.addPoint(t,!1,null,null,!1)},this),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=x(this.xData),this.autoIncrement()),!0)}setData(t,e=!0,i,s){let r=this,o=r.points,n=o&&o.length||0,a=r.options,h=r.chart,l=a.dataSorting,d=r.xAxis,c=a.turboThreshold,p=this.xData,u=this.yData,g=r.pointArrayMap,f=g&&g.length,m=a.keys,x,y,b,v=0,S=1,C;h.options.chart.allowMutatingData||(a.data&&delete r.options.data,r.userOptions.data&&delete r.userOptions.data,C=R(!0,t));let k=(t=C||t||[]).length;if(l&&l.enabled&&(t=this.sortData(t)),h.options.chart.allowMutatingData&&!1!==s&&k&&n&&!r.cropped&&!r.hasGroupedData&&r.visible&&!r.boosted&&(b=this.updateData(t,i)),!b){r.xIncrement=null,r.colorCounter=0,this.parallelArrays.forEach(function(t){r[t+"Data"].length=0});let e=c&&k>c;if(e){let i=r.getFirstValidPoint(t),s=r.getFirstValidPoint(t,k-1,-1),o=t=>!!(I(t)&&(m||j(t[0])));if(j(i)&&j(s))for(x=0;x<k;x++)p[x]=this.autoIncrement(),u[x]=t[x];else if(o(i)&&o(s)){if(f){if(i.length===f)for(x=0;x<k;x++)p[x]=this.autoIncrement(),u[x]=t[x];else for(x=0;x<k;x++)y=t[x],p[x]=y[0],u[x]=y.slice(1,f+1)}else if(m&&(v=m.indexOf("x"),S=m.indexOf("y"),v=v>=0?v:0,S=S>=0?S:1),1===i.length&&(S=0),v===S)for(x=0;x<k;x++)p[x]=this.autoIncrement(),u[x]=t[x][S];else for(x=0;x<k;x++)y=t[x],p[x]=y[v],u[x]=y[S]}else e=!1}if(!e)for(x=0;x<k;x++)y={series:r},r.pointClass.prototype.applyOptions.apply(y,[t[x]]),r.updateParallelArrays(y,x);for(u&&B(u[0])&&T(14,!0,h),r.data=[],r.options.data=r.userOptions.data=t,x=n;x--;)o[x]?.destroy();d&&(d.minRange=d.userMinRange),r.isDirty=h.isDirtyBox=!0,r.isDirtyData=!!o,i=!1}"point"===a.legendType&&(this.processData(),this.generatePoints()),e&&h.redraw(i)}sortData(t){let e=this,i=e.options.dataSorting.sortKey||"y",s=function(t,e){return C(e)&&t.pointClass.prototype.optionsToObject.call({series:t},e)||{}};return t.forEach(function(i,r){t[r]=s(e,i),t[r].index=r},this),t.concat().sort((t,e)=>{let s=D(i,t),r=D(i,e);return r<s?-1:r>s?1:0}).forEach(function(t,e){t.x=e},this),e.linkedSeries&&e.linkedSeries.forEach(function(e){let i=e.options,r=i.data;i.dataSorting&&i.dataSorting.enabled||!r||(r.forEach(function(i,o){r[o]=s(e,i),t[o]&&(r[o].x=t[o].x,r[o].index=o)}),e.setData(r,!1))}),t}getProcessedData(t){let e=this,i=e.xAxis,s=e.options.cropThreshold,r=i?.logarithmic,o=e.isCartesian,n,a,h=0,l,d,c,p=e.xData,u=e.yData,g=!1,f=p.length;i&&(d=(l=i.getExtremes()).min,c=l.max,g=!!(i.categories&&!i.names.length)),o&&e.sorted&&!t&&(!s||f>s||e.forceCrop)&&(p[f-1]<d||p[0]>c?(p=[],u=[]):e.yData&&(p[0]<d||p[f-1]>c)&&(p=(n=this.cropData(e.xData,e.yData,d,c)).xData,u=n.yData,h=n.start,a=!0));let m=O([r?p.map(r.log2lin):p],()=>e.requireSorting&&!g&&T(15,!1,e.chart));return{xData:p,yData:u,cropped:a,cropStart:h,closestPointRange:m}}processData(t){let e=this.xAxis;if(this.isCartesian&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!t)return!1;let i=this.getProcessedData();this.cropped=i.cropped,this.cropStart=i.cropStart,this.processedXData=i.xData,this.processedYData=i.yData,this.closestPointRange=this.basePointRange=i.closestPointRange,L(this,"afterProcessData")}cropData(t,e,i,s){let r=t.length,o,n,a=0,h=r;for(o=0;o<r;o++)if(t[o]>=i){a=Math.max(0,o-1);break}for(n=o;n<r;n++)if(t[n]>s){h=n+1;break}return{xData:t.slice(a,h),yData:e.slice(a,h),start:a,end:h}}generatePoints(){let t=this.options,e=this.processedData||t.data,i=this.processedXData,s=this.processedYData,r=this.pointClass,o=i.length,n=this.cropStart||0,a=this.hasGroupedData,h=t.keys,l=[],d=t.dataGrouping&&t.dataGrouping.groupAll?n:0,c,p,u,g,f=this.data;if(!f&&!a){let t=[];t.length=e.length,f=this.data=t}for(h&&a&&(this.options.keys=!1),g=0;g<o;g++)p=n+g,a?((u=new r(this,[i[g]].concat(G(s[g])))).dataGroup=this.groupMap[d+g],u.dataGroup.options&&(u.options=u.dataGroup.options,A(u,u.dataGroup.options),delete u.dataLabels)):(u=f[p])||void 0===e[p]||(f[p]=u=new r(this,e[p],i[g])),u&&(u.index=a?d+g:p,l[g]=u);if(this.options.keys=h,f&&(o!==(c=f.length)||a))for(g=0;g<c;g++)g!==n||a||(g+=o),f[g]&&(f[g].destroyElements(),f[g].plotX=void 0);this.data=f,this.points=l,L(this,"afterGeneratePoints")}getXExtremes(t){return{min:y(t),max:x(t)}}getExtremes(t,e){let i=this.xAxis,s=this.yAxis,r=[],o=this.requireSorting&&!this.is("column")?1:0,n=!!s&&s.positiveValuesOnly,a=e||this.getExtremesFromAll||this.options.getExtremesFromAll,{processedXData:h,processedYData:l}=this,d,c,p,u,g,f,m,b=0,v=0,S=0;if(this.cropped&&a){let t=this.getProcessedData(!0);h=t.xData,l=t.yData}let C=(t=t||this.stackedYData||l||[]).length,k=h||this.xData;for(i&&(b=(d=i.getExtremes()).min,v=d.max),f=0;f<C;f++)if(u=k[f],c=(j(g=t[f])||I(g))&&((j(g)?g>0:g.length)||!n),p=e||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!i||(k[f+o]||u)>=b&&(k[f-o]||u)<=v,c&&p){if(m=g.length)for(;m--;)j(g[m])&&(r[S++]=g[m]);else r[S++]=g}let M={activeYData:r,dataMin:y(r),dataMax:x(r)};return L(this,"afterGetExtremes",{dataExtremes:M}),M}applyExtremes(){let t=this.getExtremes();return this.dataMin=t.dataMin,this.dataMax=t.dataMax,t}getFirstValidPoint(t,e=0,i=1){let s=t.length,r=e;for(;r>=0&&r<s;){if(C(t[r]))return t[r];r+=i}}translate(){this.processedXData||this.processData(),this.generatePoints();
64820let t=this.options,e=t.stacking,i=this.xAxis,s=i.categories,r=this.enabledDataSorting,o=this.yAxis,n=this.points,a=n.length,h=this.pointPlacementToXValue(),l=!!h,d=t.threshold,c=t.startFromThreshold?d:0,p,u,g,f,m=Number.MAX_VALUE;function x(t){return b(t,-1e9,1e9)}for(p=0;p<a;p++){let t;let a=n[p],y=a.x,b,S,k=a.y,M=a.low,w=e&&o.stacking?.stacks[(this.negStacks&&k<(c?0:d)?"-":"")+this.stackKey];u=i.translate(y,!1,!1,!1,!0,h),a.plotX=j(u)?v(x(u)):void 0,e&&this.visible&&w&&w[y]&&(f=this.getStackIndicator(f,y,this.index),!a.isNull&&f.key&&(S=(b=w[y]).points[f.key]),b&&I(S)&&(M=S[0],k=S[1],M===c&&f.key===w[y].base&&(M=N(j(d)?d:o.min)),o.positiveValuesOnly&&C(M)&&M<=0&&(M=void 0),a.total=a.stackTotal=N(b.total),a.percentage=C(a.y)&&b.total?a.y/b.total*100:void 0,a.stackY=k,this.irregularWidths||b.setOffset(this.pointXOffset||0,this.barW||0,void 0,void 0,void 0,this.xAxis))),a.yBottom=C(M)?x(o.translate(M,!1,!0,!1,!0)):void 0,this.dataModify&&(k=this.dataModify.modifyValue(k,p)),j(k)&&void 0!==a.plotX&&(t=j(t=o.translate(k,!1,!0,!1,!0))?x(t):void 0),a.plotY=t,a.isInside=this.isPointInside(a),a.clientX=l?v(i.translate(y,!1,!1,!1,!0,h)):u,a.negative=(a.y||0)<(d||0),a.category=N(s&&s[a.x],a.x),a.isNull||!1===a.visible||(void 0!==g&&(m=Math.min(m,Math.abs(u-g))),g=u),a.zone=this.zones.length?a.getZone():void 0,!a.graphic&&this.group&&r&&(a.isNew=!0)}this.closestPointRangePx=m,L(this,"afterTranslate")}getValidPoints(t,e,i){let s=this.chart;return(t||this.points||[]).filter(function(t){let{plotX:r,plotY:o}=t;return!!((i||!t.isNull&&j(o))&&(!e||s.isInsidePlot(r,o,{inverted:s.inverted})))&&!1!==t.visible})}getClipBox(){let{chart:t,xAxis:e,yAxis:i}=this,{x:s,y:r,width:o,height:n}=R(t.clipBox);return e&&e.len!==t.plotSizeX&&(o=e.len),i&&i.len!==t.plotSizeY&&(n=i.len),t.inverted&&!this.invertible&&([o,n]=[n,o]),{x:s,y:r,width:o,height:n}}getSharedClipKey(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0),this.sharedClipKey}setClip(){let{chart:t,group:e,markerGroup:i}=this,s=t.sharedClips,r=t.renderer,o=this.getClipBox(),n=this.getSharedClipKey(),a=s[n];a?a.animate(o):s[n]=a=r.clipRect(o),e&&e.clip(!1===this.options.clip?void 0:a),i&&i.clip()}animate(t){let{chart:e,group:i,markerGroup:s}=this,r=e.inverted,o=d(this.options.animation),n=[this.getSharedClipKey(),o.duration,o.easing,o.defer].join(","),a=e.sharedCl
64820ips[n],h=e.sharedClips[n+"m"];if(t&&i){let t=this.getClipBox();if(a)a.attr("height",t.height);else{t.width=0,r&&(t.x=e.plotHeight),a=e.renderer.clipRect(t),e.sharedClips[n]=a;let i={x:-99,y:-99,width:r?e.plotWidth+199:99,height:r?99:e.plotHeight+199};h=e.renderer.clipRect(i),e.sharedClips[n+"m"]=h}i.clip(a),s?.clip(h)}else if(a&&!a.hasClass("highcharts-animating")){let t=this.getClipBox(),i=o.step;(s?.element.childNodes.length||e.series.length>1)&&(o.step=function(t,e){i&&i.apply(e,arguments),"width"===e.prop&&h?.element&&h.attr(r?"height":"width",t+99)}),a.addClass("highcharts-animating").animate(t,o)}}afterAnimate(){this.setClip(),z(this.chart.sharedClips,(t,e,i)=>{t&&!this.chart.container.querySelector(`[clip-path="url(#${t.id})"]`)&&(t.destroy(),delete i[e])}),this.finishedAnimating=!0,L(this,"afterAnimate")}drawPoints(t=this.points){let e,i,s,r,o,n,a;let h=this.chart,l=h.styledMode,{colorAxis:d,options:c}=this,p=c.marker,u=this[this.specialGroup||"markerGroup"],g=this.xAxis,f=N(p.enabled,!g||!!g.isRadial||null,this.closestPointRangePx>=p.enabledThreshold*p.radius);if(!1!==p.enabled||this._hasPointMarkers)for(e=0;e<t.length;e++)if(r=(s=(i=t[e]).graphic)?"animate":"attr",o=i.marker||{},n=!!i.marker,(f&&void 0===o.enabled||o.enabled)&&!i.isNull&&!1!==i.visible){let t=N(o.symbol,this.symbol,"rect");a=this.markerAttribs(i,i.selected&&"select"),this.enabledDataSorting&&(i.startXPos=g.reversed?-(a.width||0):g.width);let e=!1!==i.isInside;if(!s&&e&&((a.width||0)>0||i.hasImage)&&(i.graphic=s=h.renderer.symbol(t,a.x,a.y,a.width,a.height,n?o:p).add(u),this.enabledDataSorting&&h.hasRendered&&(s.attr({x:i.startXPos}),r="animate")),s&&"animate"===r&&s[e?"show":"hide"](e).animate(a),s){let t=this.pointAttribs(i,l||!i.selected?void 0:"select");l?d&&s.css({fill:t.fill}):s[r](t)}s&&s.addClass(i.getClassName(),!0)}else s&&(i.graphic=s.destroy())}markerAttribs(t,e){let i=this.options,s=i.marker,r=t.marker||{},o=r.symbol||s.symbol,n={},a,h,l=N(r.radius,s&&s.radius);e&&(a=s.states[e],l=N((h=r.states&&r.states[e])&&h.radius,a&&a.radius,l&&l+(a&&a.radiusPlus||0))),t.hasImage=o&&0===o.indexOf("url"),t.hasImage&&(l=0);let d=t.pos();return j(l)&&d&&(i.crisp&&(d[0]=S(d[0],t.hasImage?0:"rect"===o?s?.lineWidth||0:1)),n.x=d[0]-l,n.y=d[1]-l),l&&(n.width=n.height=2*l),n}pointAttribs(t,e){let i=this.options.marker,s=t&&t.options,r=s&&s.marker||{},o=s&&s.color,n=t&&t.color,a=t&&t.zone&&t.zone.color,h,l,d=this.color,c,p,u=N(r.lineWidth,i.lineWidth),g=1;return d=o||a||n||d,c=r.fillColor||i.fillColor||d,p=r.lineColor||i.lineColor||d,e=e||"normal",h=i.states[e]||{},u=N((l=r.states&&r.states[e]||{}).lineWidth,h.lineWidth,u+N(l.lineWidthPlus,h.lineWidthPlus,0)),c=l.fillColor||h.fillColor||c,{stroke:p=l.lineColor||h.lineColor||p,"stroke-width":u,fill:c,opacity:g=N(l.opacity,h.opacity,g)}}destroy(t){let e,i,s;let r=this,o=r.chart,n=/AppleWebKit\/533/.test(f.navigator.userAgent),a=r.data||[];
vendor: 5,746 bytes, line 64820
64820for(L(r,"destroy",{keepEventsForUpdate:t}),this.removeEvents(t),(r.axisTypes||[]).forEach(function(t){(s=r[t])&&s.series&&(w(s.series,r),s.isDirty=s.forceRedraw=!0)}),r.legendItem&&r.chart.legend.destroyItem(r),e=a.length;e--;)(i=a[e])&&i.destroy&&i.destroy();for(let t of r.zones)k(t,void 0,!0);l.clearTimeout(r.animationTimeout),z(r,function(t,e){t instanceof h&&!t.survive&&t[n&&"group"===e?"hide":"destroy"]()}),o.hoverSeries===r&&(o.hoverSeries=void 0),w(o.series,r),o.orderItems("series"),z(r,function(e,i){t&&"hcEvents"===i||delete r[i]})}applyZones(){let{area:t,chart:e,graph:i,zones:s,points:r,xAxis:o,yAxis:n,zoneAxis:a}=this,{inverted:h,renderer:l}=e,d=this[`${a}Axis`],{isXAxis:c,len:p=0}=d||{},u=(i?.strokeWidth()||0)/2+1,g=(t,e=0,i=0)=>{h&&(i=p-i);let{translated:s=0,lineClip:r}=t,o=i-s;r?.push(["L",e,Math.abs(o)<u?i-u*(o<=0?-1:1):s])};if(s.length&&(i||t)&&d&&j(d.min)){let e=d.getExtremes().max,u=t=>{t.forEach((e,i)=>{("M"===e[0]||"L"===e[0])&&(t[i]=[e[0],c?p-e[1]:e[1],c?e[2]:p-e[2]])})};if(s.forEach(t=>{t.lineClip=[],t.translated=b(d.toPixels(N(t.value,e),!0)||0,0,p)}),i&&!this.showLine&&i.hide(),t&&t.hide(),"y"===a&&r.length<o.len)for(let t of r){let{plotX:e,plotY:i,zone:r}=t,o=r&&s[s.indexOf(r)-1];r&&g(r,e,i),o&&g(o,e,i)}let f=[],m=d.toPixels(d.getExtremes().min,!0);s.forEach(e=>{let s=e.lineClip||[],r=Math.round(e.translated||0);o.reversed&&s.reverse();let{clip:a,simpleClip:d}=e,p=0,g=0,x=o.len,y=n.len;c?(p=r,x=m):(g=r,y=m);let b=[["M",p,g],["L",x,g],["L",x,y],["L",p,y],["Z"]],v=[b[0],...s,b[1],b[2],...f,b[3],b[4]];f=s.reverse(),m=r,h&&(u(v),t&&u(b)),a?(a.animate({d:v}),d?.animate({d:b})):(a=e.clip=l.path(v),t&&(d=e.simpleClip=l.path(b))),i&&e.graph?.clip(a),t&&e.area?.clip(d)})}else this.visible&&(i&&i.show(),t&&t.show())}plotGroup(t,e,i,s,r){let o=this[t],n=!o,a={visibility:i,zIndex:s||.1};return C(this.opacity)&&!this.chart.styledMode&&"inactive"!==this.state&&(a.opacity=this.opacity),o||(this[t]=o=this.chart.renderer.g().add(r)),o.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(C(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),o.attr(a)[n?"attr":"animate"](this.getPlotBox(e)),o}getPlotBox(t){let e=this.xAxis,i=this.yAxis,s=this.chart,r=s.inverted&&!s.polar&&e&&this.invertible&&"series"===t;return s.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:s.plotLeft,translateY:i?i.top:s.plotTop,rotation:r?90:0,rotationOriginX:r?(e.len-i.len)/2:0,rotationOriginY:r?(e.len+i.len)/2:0,scaleX:r?-1:1,scaleY:1}}removeEvents(t){let{eventsToUnbind:e}=this;t||W(this),e.length&&(e.forEach(t=>{t()}),e.length=0)}render(){let t=this,{chart:e,options:i,hasRendered:s}=t,r=d(i.animation),o=t.visible?"inherit":"hidden",n=i.zIndex,a=e.seriesGroup,h=t.finishedAnimating?0:r.duration;L(this,"render"),t.plotGroup("group","series",o,n,a),t.markerGroup=t.plotGroup("markerGroup","markers",o,n,a),!1!==i.clip&&t.setClip(),h&&t.animate?.(!0),t.drawGraph&&(t.drawGraph(),t.applyZones()),t.visible&&t.drawPoints(),t.drawDataLabels?.(),t.redrawPoints?.(),i.enableMouseTracking&&t.drawTracker?.(),h&&t.animate?.(),s||(h&&r.defer&&(h+=r.defer),t.animationTimeout=H(()=>{t.afterAnimate()},h||0)),t.isDirty=!1,t.hasRendered=!0,L(t,"afterRender")}redraw(){let t=this.isDirty||this.isDirtyData;this.translate(),this.render(),t&&delete this.kdTree}reserveSpace(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries}searchPoint(t,e){let{xAxis:i,yAxis:s}=this,r=this.chart.inverted;return this.searchKDTree({clientX:r?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:r?s.len-t.chartX+s.pos:t.chartY-s.pos},e,t)}buildKDTree(t){this.buildingKdTree=!0;let e=this,i=e.options.findNearestPointBy.indexOf("y")>-1?2:1;delete e.kdTree,H(function(){e.kdTree=function t(i,s,r){let o,n;let a=i?.length;if(a)return o=e.kdAxisArray[s%r],i.sort((t,e)=>(t[o]||0)-(e[o]||0)),{point:i[n=Math.floor(a/2)],left:t(i.slice(0,n),s+1,r),right:t(i.slice(n+1),s+1,r)}}(e.getValidPoints(void 0,!e.directTouch),i,i),e.buildingKdTree=!1},e.options.kdNow||t?.type==="touchstart"?0:1)}searchKDTree(t,e,i){let s=this,[r,o]=this.kdAxisArray,n=e?"distX":"dist",a=(s.options.findNearestPointBy||"").indexOf("y")>-1?2:1,h=!!s.isBubble;if(this.kdTree||this.buildingKdTree||this.buildKDTree(i),this.kdTree)return function t(e,i,a,l){let d=i.point,c=s.kdAxisArray[a%l],p,u,g=d;!function(t,e){let i=t[r],s=e[r],n=C(i)&&C(s)?i-s:null,a=t[o],l=e[o],d=C(a)&&C(l)?a-l:0,c=h&&e.marker?.radius||0;e.dist=Math.sqrt((n&&n*n||0)+d*d)-c,e.distX=C(n)?Math.abs(n)-c:Number.MAX_VALUE}(e,d);let f=(e[c]||0)-(d[c]||0)+(h&&d.marker?.radius||0),m=f<0?"left":"right",x=f<0?"right":"left";return i[m]&&(g=(p=t(e,i[m],a+1,l))[n]<g[n]?p:d),i[x]&&Math.sqrt(f*f)<g[n]&&(g=(u=t(e,i[x],a+1,l))[n]<g[n]?u:g),g}(t,this.kdTree,a,a)}pointPlacementToXValue(){let{options:t,xAxis:e}=this,i=t.pointPlacement;return"between"===i&&(i=e.reversed?-.5:.5),j(i)?i*(t.pointRange||e.pointRange):0}isPointInside(t){let{chart:e,xAxis:i,yAxis:s}=this,{plotX:r=-1,plotY:o=-1}=t;return o>=0&&o<=(s?s.len:e.plotHeight)&&r>=0&&r<=(i?i.len:e.plotWidth)}drawTracker(){let t=this,e=t.options,i=e.trackByArea,s=[].concat((i?t.areaPath:t.graphPath)||[]),r=t.chart,o=r.pointer,n=r.renderer,a=r.options.tooltip?.snap||0,h=()=>{e.enableMouseTracking&&r.hoverSeries!==t&&t.onMouseOver()},l="rgba(192,192,192,"+(g?1e-4:.002)+")",d=t.tracker;d?d.attr({d:s}):t.graph&&(t.tracker=d=n.path(s).attr({visibility:t.visible?"inherit":"hidden",zIndex:2}).addClass(i?"highcharts-tracker-area":"highcharts-tracker-line").add(t.group),r.styledMode||d.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:l,fill:i?l:"none","stroke-width":t.graph.strokeWidth()+(i?0:2*a)}
64820),[t.tracker,t.markerGroup,t.dataLabelsGroup].forEach(t=>{t&&(t.addClass("highcharts-tracker").on("mouseover",h).on("mouseout",t=>{o?.onTrackerMouseOut(t)}),e.cursor&&!r.styledMode&&t.css({cursor:e.cursor}),t.on("touchstart",h))})),L(this,"afterDrawTracker")}addPoint(t,e,i,s,r){let o,n;let a=this.options,h=this.data,l=this.chart,d=this.xAxis,c=d&&d.hasNames&&d.names,p=a.data,u=this.xData;e=N(e,!0);let g={series:this};this.pointClass.prototype.applyOptions.apply(g,[t]);let f=g.x;if(n=u.length,this.requireSorting&&f<u[n-1])for(o=!0;n&&u[n-1]>f;)n--;this.updateParallelArrays(g,"splice",[n,0,0]),this.updateParallelArrays(g,n),c&&g.name&&(c[f]=g.name),p.splice(n,0,t),(o||this.processedData)&&(this.data.splice(n,0,null),this.processData()),"point"===a.legendType&&this.generatePoints(),i&&(h[0]&&h[0].remove?h[0].remove(!1):(h.shift(),this.updateParallelArrays(g,"shift"),p.shift())),!1!==r&&L(this,"addPoint",{point:g}),this.isDirty=!0,this.isDirtyData=!0,e&&l.redraw(s)}removePoint(t,e,i){let s=this,r=s.data,o=r[t],n=s.points,a=s.chart,h=function(){n&&n.length===r.length&&n.splice(t,1),r.splice(t,1),s.options.data.splice(t,1),s.updateParallelArrays(o||{series:s},"splice",[t,1]),o&&o.destroy(),s.isDirty=!0,s.isDirtyData=!0,e&&a.redraw()};c(i,a),e=N(e,!0),o?o.firePointEvent("remove",null,h):h()}remove(t,e,i,s){let r=this,o=r.chart;function n(){r.destroy(s),o.isDirtyLegend=o.isDirtyBox=!0,o.linkSeries(s),N(t,!0)&&o.redraw(e)}!1!==i?L(r,"remove",null,n):n()}update(t,e){L(this,"update",{options:t=M(t,this.userOptions)});let i=this,s=i.chart,r=i.userOptions,o=i.initialType||i.type,n=s.options.plotOptions,a=m[o].prototype,h=i.finishedAnimating&&{animation:!1},l={},d,c,p=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],u=t.type||r.type||s.options.chart.type,g=!(this.hasDerivedData||u&&u!==this.type||void 0!==t.pointStart||void 0!==t.pointInterval||void 0!==t.relativeXValue||t.joinBy||t.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some(t=>i.hasOptionChanged(t)));u=u||o,g&&(p.push("data","isDirtyData","isDirtyCanvas","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX","transformGroups"),!1!==t.visible&&p.push("area","graph"),i.parallelArrays.forEach(function(t){p.push(t+"Data")}),t.data&&(t.dataSorting&&A(i.options.dataSorting,t.dataSorting),this.setData(t.data,!1))),t=R(r,{index:void 0===r.index?i.index:r.index,pointStart:n?.series?.pointStart??r.pointStart??i.xData?.[0]},!g&&{data:i.options.data},t,h),g&&t.data&&(t.data=i.options.data),(p=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(p)).forEach(function(t){p[t]=i[t],delete i[t]});let f=!1;if(m[u]){if(f=u!==i.type,i.remove(!1,!1,!1,!0),f){if(s.propFromSeries(),Object.setPrototypeOf)Object.setPrototypeOf(i,m[u].prototype);else{let t=Object.hasOwnProperty.call(i,"hcEvents")&&i.hcEvents;for(c in a)i[c]=void 0;A(i,m[u].prototype),t?i.hcEvents=t:delete i.hcEvents}}}else T(17,!0,s,{missingModuleFor:u});if(p.forEach(function(t){i[t]=p[t]}),i.init(s,t),g&&this.points)for(let t of(!1===(d=i.options).visible?(l.graphic=1,l.dataLabel=1):(this.hasMarkerChanged(d,r)&&(l.graphic=1),i.hasDataLabels?.()||(l.dataLabel=1)),this.points))t&&t.series&&(t.resolveColor(),Object.keys(l).length&&t.destroyElements(l),!1===d.showInLegend&&t.legendItem&&s.legend.destroyItem(t));i.initialType=o,s.linkSeries(),s.setSortedData(),f&&i.linkedSeries.length&&(i.isDirtyData=!0),L(this,"afterUpdate"),N(e,!0)&&s.redraw(!!g&&void 0)}setName(t){this.name=this.options.name=this.userOptions.name=t,this.chart.isDirtyLegend=!0}hasOptionChanged(t){let e=this.chart,i=this.options[t],s=e.options.plotOptions,r=this.userOptions[t],o=N(s?.[this.type]?.[t],s?.series?.[t]);return r&&!C(o)?i!==r:i!==N(o,i)}onMouseOver(){let t=this.chart,e=t.hoverSeries,i=t.pointer;i?.setHoverChartIndex(),e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&L(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this}onMouseOut(){let t=this.options,e=this.chart,i=e.tooltip,s=e.hoverPoint;
vendor: 8,932 bytes, line 64820
64820e.hoverSeries=null,s&&s.onMouseOut(),this&&t.events.mouseOut&&L(this,"mouseOut"),i&&!this.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),e.series.forEach(function(t){t.setState("",!0)})}setState(t,e){let i=this,s=i.options,r=i.graph,o=s.inactiveOtherPoints,n=s.states,a=N(n[t||"normal"]&&n[t||"normal"].animation,i.chart.options.chart.animation),h=s.lineWidth,l=s.opacity;if(t=t||"",i.state!==t&&([i.group,i.markerGroup,i.dataLabelsGroup].forEach(function(e){e&&(i.state&&e.removeClass("highcharts-series-"+i.state),t&&e.addClass("highcharts-series-"+t))}),i.state=t,!i.chart.styledMode)){if(n[t]&&!1===n[t].enabled)return;if(t&&(h=n[t].lineWidth||h+(n[t].lineWidthPlus||0),l=N(n[t].opacity,l)),r&&!r.dashstyle&&j(h))for(let t of[r,...this.zones.map(t=>t.graph)])t?.animate({"stroke-width":h},a);o||[i.group,i.markerGroup,i.dataLabelsGroup,i.labelBySeries].forEach(function(t){t&&t.animate({opacity:l},a)})}e&&o&&i.points&&i.setAllPointsToState(t||void 0)}setAllPointsToState(t){this.points.forEach(function(e){e.setState&&e.setState(t)})}setVisible(t,e){let i=this,s=i.chart,r=s.options.chart.ignoreHiddenSeries,o=i.visible;i.visible=t=i.options.visible=i.userOptions.visible=void 0===t?!o:t;let n=t?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(t=>{i[t]?.[n]()}),(s.hoverSeries===i||s.hoverPoint?.series===i)&&i.onMouseOut(),i.legendItem&&s.legend.colorizeItem(i,t),i.isDirty=!0,i.options.stacking&&s.series.forEach(t=>{t.options.stacking&&t.visible&&(t.isDirty=!0)}),i.linkedSeries.forEach(e=>{e.setVisible(t,!1)}),r&&(s.isDirtyBox=!0),L(i,n),!1!==e&&s.redraw()}show(){this.setVisible(!0)}hide(){this.setVisible(!1)}select(t){this.selected=t=this.options.selected=void 0===t?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),L(this,t?"select":"unselect")}shouldShowTooltip(t,e,i={}){return i.series=this,i.visiblePlotOnly=!0,this.chart.isInsidePlot(t,e,i)}drawLegendSymbol(t,e){r[this.options.legendSymbol||"rectangle"]?.call(this,t,e)}}return X.defaultOptions=n,X.types=a.seriesTypes,X.registerType=a.registerSeriesType,A(X.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,directTouch:!1,invertible:!0,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:o,requireSorting:!0,sorted:!0}),a.series=X,X}),i(e,"Core/Legend/Legend.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Series/Point.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o,n,a){var h;let{animObject:l,setAnimation:d}=t,{registerEventOptions:c}=e,{composed:p,marginNames:u}=i,{distribute:g}=o,{format:f}=n,{addEvent:m,createElement:x,css:y,defined:b,discardElement:v,find:S,fireEvent:C,isNumber:k,merge:M,pick:w,pushUnique:T,relativeLength:A,stableSort:P,syncTimeout:L}=a;class O{constructor(t,e){this.allItems=[],this.initialItemY=0,this.itemHeight=0,this.itemMarginBottom=0,this.itemMarginTop=0,this.itemX=0,this.itemY=0,this.lastItemY=0,this.lastLineHeight=0,this.legendHeight=0,this.legendWidth=0,this.maxItemWidth=0,this.maxLegendWidth=0,this.offsetWidth=0,this.padding=0,this.pages=[],this.symbolHeight=0,this.symbolWidth=0,this.titleHeight=0,this.totalItemWidth=0,this.widthOption=0,this.chart=t,this.setOptions(e),e.enabled&&(this.render(),c(this,e),m(this.chart,"endResize",function(){this.legend.positionCheckboxes()})),m(this.chart,"render",()=>{this.options.enabled&&this.proximate&&(this.proximatePositions(),this.positionItems())})}setOptions(t){let e=w(t.padding,8);this.options=t,this.chart.styledMode||(this.itemStyle=t.itemStyle,this.itemHiddenStyle=M(this.itemStyle,t.itemHiddenStyle)),this.itemMarginTop=t.itemMarginTop,this.itemMarginBottom=t.itemMarginBottom,this.padding=e,this.initialItemY=e-5,this.symbolWidth=w(t.symbolWidth,16),this.pages=[],this.proximate="proximate"===t.layout&&!this.chart.inverted,this.baseline=void 0}update(t,e){let i=this.chart;this.setOptions(M(!0,this.options,t)),"events"in this.options&&c(this,this.options),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,w(e,!0)&&i.redraw(),C(this,"afterUpdate",{redraw:e})}colorizeItem(t,e){let{area:i,group:s,label:r,line:o,symbol:n}=t.legendItem||{};if(s?.[e?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){let{itemHiddenStyle:s={}}=this,a=s.color,{fillColor:h,fillOpacity:l,lineColor:d,marker:c}=t.options,p=t=>(!e&&(t.fill&&(t.fill=a),t.stroke&&(t.stroke=a)),t);r?.css(M(e?this.itemStyle:s)),o?.attr(p({stroke:d||t.color})),n&&n.attr(p(c&&n.isMarker?t.pointAttribs():{fill:t.color})),i?.attr(p({fill:h||t.color,"fill-opacity":h?1:l??.75}))}C(this,"afterColorizeItem",{item:t,visible:e})}positionItems(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()}positionItem(t){let{group:e,x:i=0,y:s=0}=t.legendItem||{},r=this.options,o=r.symbolPadding,n=!r.rtl,a=t.checkbox;if(e&&e.element){let r={translateX:n?i:this.legendWidth-i-2*o-4,translateY:s};e[b(e.translateY)?"animate":"attr"](r,void 0,()=>{C(this,"afterPositionItem",{item:t})})}a&&(a.x=i,a.y=s)}destroyItem(t){let e=t.checkbox,i=t.legendItem||{};for(let t of["group","label","line","symbol"])i[t]&&(i[t]=i[t].destroy());e&&v(e),t.legendItem=void 0}destroy(){for(let t of this.getAllItems())this.destroyItem(t);for(let t of["clipRect","up","down","pager","nav","box","title","group"])this[t]&&(this[t]=this[t].destroy());this.display=null}positionCheckboxes(){let t;let e=this.group&&this.group.alignAttr,i=this.clipHeight||this.legendHeight,s=this.titleHeight;e&&(t=e.translateY,this.allItems.forEach(function(r){let o;let n=r.checkbox;n&&(o=t+s+n.y+(this.scrollOffset||0)+3,y(n,{left:e.translateX+r.checkboxOffset+n.x-20+"px",top:o+"px",display:this.proximate||o>t-6&&o<t+i-6?"":"none"}))},this))}renderTitle(){let t=this.options,e=this.padding,i=t.title,s,r=0;i.text&&(this.title||(this.title=this.chart.renderer.label(i.text,e-3,e-4,void 0,void 0,void 0,t.useHTML,void 0,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(i.style),this.title.add(this.group)),i.width||this.title.css({width:this.maxLegendWidth+"px"}),r=(s=this.title.getBBox()).height,this.offsetWidth=s.width,this.contentGroup.attr({translateY:r})),this.titleHeight=r}setText(t){let e=this.options;t.legendItem.label.attr({text:e.labelFormat?f(e.labelFormat,t,this.chart):e.labelFormatter.call(t)})}renderItem(t){let e=t.legendItem=t.legendItem||{},i=this.chart,s=i.renderer,r=this.options,o="horizontal"===r.layout,n=this.symbolWidth,a=r.symbolPadding||0,h=this.itemStyle,l=this.itemHiddenStyle,d=o?w(r.itemDistance,20):0,c=!r.rtl,p=!t.series,u=!p&&t.series.drawLegendSymbol?t.series:t,g=u.options,f=!!this.createCheckboxForItem&&g&&g.showCheckbox,m=r.useHTML,x=t.options.className,y=e.label,b=n+a+d+(f?20:0);!y&&(e.group=s.g("legend-item").addClass("highcharts-"+u.type+"-series highcharts-color-"+t.colorIndex+(x?" "+x:"")+(p?" highcharts-series-"+t.index:"")).attr({zIndex:1}).add(this.scrollGroup),e.label=y=s.text("",c?n+a:-a,this.baseline||0,m),i.styledMode||y.css(M(t.visible?h:l)),y.attr({align:c?"left":"right",zIndex:2}).add(e.group),!this.baseline&&(this.fontMetrics=s.fontMetrics(y),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,y.attr("y",this.baseline),this.symbolHeight=w(r.symbolHeight,this.fontMetrics.f),r.squareSymbol&&(this.symbolWidth=w(r.symbolWidth,Math.max(this.symbolHeight,16)),b=this.symbolWidth+a+d+(f?20:0),c&&y.attr("x",this.symbolWidth+a))),u.drawLegendSymbol(this,t),this.setItemEvents&&this.setItemEvents(t,y,m)),f&&!t.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(t),this.colorizeItem(t,t.visible),(i.styledMode||!h.width)&&y.css({width:(r.itemWidth||this.widthOption||i.spacingBox.width)-b+"px"}),this.setText(t);let v=y.getBBox(),S=this.fontMetrics&&this.fontMetrics.h||0;t.itemWidth=t.checkboxOffset=r.itemWidth||e.labelWidth||v.width+b,this.maxItemWidth=Math.max(this.maxItemWidth,t.itemWidth),this.totalItemWidth+=t.itemWidth,this.itemHeight=t.itemHeight=Math.round(e.labelHeight||(v.height>1.5*S?v.height:S))}layoutItem(t){let e=this.options,i=this.padding,s="horizontal"===e.layout,r=t.itemHeight,o=this.itemMarginBottom,n=this.itemMarginTop,a=s?w(e.itemDistance,20):0,h=this.maxLegendWidth,l=e.alignColumns&&this.totalItemWidth>h?this.maxItemWidth:t.itemWidth,d=t.legendItem||{};s&&this.itemX-i+l>h&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=n+this.lastLineHeight+o),this.lastLineHeight=0),this.lastItemY=n+this.itemY+o,this.lastLineHeight=Math.max(r,this.lastLineHeight),d.x=this.itemX,d.y=this.itemY,s?this.itemX+=l:(this.itemY+=n+r+o,this.lastLineHeight=r),this.offsetWidth=this.widthOption||Math.max((s?this.itemX-i-(t.checkbox?0:a):l)+i,this.offsetWidth)}getAllItems(){let t=[];return this.chart.series.forEach(function(e){let i=e&&e.options;e&&w(i.showInLegend,!b(i.linkedTo)&&void 0,!0)&&(t=t.concat((e.legendItem||{}
vendor: 6,107 bytes, line 64820
64820).labels||("point"===i.legendType?e.data:e)))}),C(this,"afterGetAllItems",{allItems:t}),t}getAlignment(){let t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)}adjustMargins(t,e){let i=this.chart,s=this.options,r=this.getAlignment();r&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(o,n){o.test(r)&&!b(t[n])&&(i[u[n]]=Math.max(i[u[n]],i.legend[(n+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][n]*s[n%2?"x":"y"]+w(s.margin,12)+e[n]+(i.titleOffset[n]||0)))})}proximatePositions(){let t;let e=this.chart,i=[],s="left"===this.options.align;for(let r of(this.allItems.forEach(function(t){let r,o,n=s,a,h;t.yAxis&&(t.xAxis.options.reversed&&(n=!n),t.points&&(r=S(n?t.points:t.points.slice(0).reverse(),function(t){return k(t.plotY)})),o=this.itemMarginTop+t.legendItem.label.getBBox().height+this.itemMarginBottom,h=t.yAxis.top-e.plotTop,a=t.visible?(r?r.plotY:t.yAxis.height)+(h-.3*o):h+t.yAxis.height,i.push({target:a,size:o,item:t}))},this),g(i,e.plotHeight)))t=r.item.legendItem||{},k(r.pos)&&(t.y=e.plotTop-e.spacing[0]+r.pos)}render(){let t=this.chart,e=t.renderer,i=this.options,s=this.padding,r=this.getAllItems(),o,n,a,h=this.group,l,d=this.box;this.itemX=s,this.itemY=this.initialItemY,this.offsetWidth=0,this.lastItemY=0,this.widthOption=A(i.width,t.spacingBox.width-s),l=t.spacingBox.width-2*s-i.x,["rm","lm"].indexOf(this.getAlignment().substring(0,2))>-1&&(l/=2),this.maxLegendWidth=this.widthOption||l,h||(this.group=h=e.g("legend").addClass(i.className||"").attr({zIndex:7}).add(),this.contentGroup=e.g().attr({zIndex:1}).add(h),this.scrollGroup=e.g().add(this.contentGroup)),this.renderTitle(),P(r,(t,e)=>(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)),i.reversed&&r.reverse(),this.allItems=r,this.display=o=!!r.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,r.forEach(this.renderItem,this),r.forEach(this.layoutItem,this),n=(this.widthOption||this.offsetWidth)+s,a=this.lastItemY+this.lastLineHeight+this.titleHeight,a=this.handleOverflow(a)+s,d||(this.box=d=e.rect().addClass("highcharts-legend-box").attr({r:i.borderRadius}).add(h)),t.styledMode||d.attr({stroke:i.borderColor,"stroke-width":i.borderWidth||0,fill:i.backgroundColor||"none"}).shadow(i.shadow),n>0&&a>0&&d[d.placed?"animate":"attr"](d.crisp.call({},{x:0,y:0,width:n,height:a},d.strokeWidth())),h[o?"show":"hide"](),t.styledMode&&"none"===h.getStyle("display")&&(n=a=0),this.legendWidth=n,this.legendHeight=a,o&&this.align(),this.proximate||this.positionItems(),C(this,"afterRender")}align(t=this.chart.spacingBox){let e=this.chart,i=this.options,s=t.y;/(lth|ct|rth)/.test(this.getAlignment())&&e.titleOffset[0]>0?s+=e.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&e.titleOffset[2]>0&&(s-=e.titleOffset[2]),s!==t.y&&(t=M(t,{y:s})),e.hasRendered||(this.group.placed=!1),this.group.align(M(i,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":i.verticalAlign}),!0,t)}handleOverflow(t){let e=this,i=this.chart,s=i.renderer,r=this.options,o=r.y,n="top"===r.verticalAlign,a=this.padding,h=r.maxHeight,l=r.navigation,d=w(l.animation,!0),c=l.arrowSize||12,p=this.pages,u=this.allItems,g=function(t){"number"==typeof t?S.attr({height:t}):S&&(e.clipRect=S.destroy(),e.contentGroup.clip()),e.contentGroup.div&&(e.contentGroup.div.style.clip=t?"rect("+a+"px,9999px,"+(a+t)+"px,0)":"auto")},f=function(t){return e[t]=s.circle(0,0,1.3*c).translate(c/2,c/2).add(v),i.styledMode||e[t].attr("fill","rgba(0,0,0,0.0001)"),e[t]},m,x,y,b=i.spacingBox.height+(n?-o:o)-a,v=this.nav,S=this.clipRect;return"horizontal"!==r.layout||"middle"===r.verticalAlign||r.floating||(b/=2),h&&(b=Math.min(b,h)),p.length=0,t&&b>0&&t>b&&!1!==l.enabled?(this.clipHeight=m=Math.max(b-20-this.titleHeight-a,0),this.currentPage=w(this.currentPage,1),this.fullHeight=t,u.forEach((t,e)=>{let i=(y=t.legendItem||{}).y||0,s=Math.round(y.label.getBBox().height),r=p.length;(!r||i-p[r-1]>m&&(x||i)!==p[r-1])&&(p.push(x||i),r++),y.pageIx=r-1,x&&((u[e-1].legendItem||{}).pageIx=r-1),e===u.length-1&&i+s-p[r-1]>m&&i>p[r-1]&&(p.push(i),y.pageIx=r),i!==x&&(x=i)}),S||(S=e.clipRect=s.clipRect(0,a-2,9999,0),e.contentGroup.clip(S)),g(m),v||(this.nav=v=s.g().attr({zIndex:1}).add(this.group),this.up=s.symbol("triangle",0,0,c,c).add(v),f("upTracker").on("click",function(){e.scroll(-1,d)}),this.pager=s.text("",15,10).addClass("highcharts-legend-navigation"),!i.styledMode&&l.style&&this.pager.css(l.style),this.pager.add(v),this.down=s.symbol("triangle-down",0,0,c,c).add(v),f("downTracker").on("click",function(){e.scroll(1,d)})),e.scroll(0),t=b):v&&(g(),this.nav=v.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t}scroll(t,e){let i=this.chart,s=this.pages,r=s.length,o=this.clipHeight,n=this.options.navigation,a=this.pager,h=this.padding,c=this.currentPage+t;c>r&&(c=r),c>0&&(void 0!==e&&d(e,i),this.nav.attr({translateX:h,translateY:o+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(t){t.attr({class:1===c?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),a.attr({text:c+"/"+r}),[this.down,this.downTracker].forEach(function(t){t.attr({x:18+this.pager.getBBox().width,class:c===r?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),i.styledMode||(this.up.attr({fill:1===c?n.inactiveColor:n.activeColor}),this.upTracker.css({cursor:1===c?"default":"pointer"}),this.down.attr({fill:c===r?n.inactiveColor:n.activeColor}),this.downTracker.css({cursor:c===r?"default":"pointer"})),this.scrollOffset=-s[c-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=c,this.positionCheckboxes(),L(()=>{C(this,"afterScroll",{currentPage:c})},l(w(e,i.renderer.globalAnimation,!0)).duration))}setItemEvents(t,e,i){let o=this,n=t.legendItem||{},a=o.chart.renderer.boxWrapper,h=t instanceof r,l=t instanceof s,d="highcharts-legend-"+(h?"point":"series")+"-active",c=o.chart.styledMode,p=i?[e,n.symbol]:[n.group],u=e=>
vendor: 5,280 bytes, line 64820
64820{o.allItems.forEach(i=>{t!==i&&[i].concat(i.linkedSeries||[]).forEach(t=>{t.setState(e,!h)})})};for(let i of p)i&&i.on("mouseover",function(){t.visible&&u("inactive"),t.setState("hover"),t.visible&&a.addClass(d),c||e.css(o.options.itemHoverStyle)}).on("mouseout",function(){o.chart.styledMode||e.css(M(t.visible?o.itemStyle:o.itemHiddenStyle)),u(""),a.removeClass(d),t.setState()}).on("click",function(e){let i=function(){t.setVisible&&t.setVisible(),u(t.visible?"inactive":"")};a.removeClass(d),C(o,"itemClick",{browserEvent:e,legendItem:t},i),h?t.firePointEvent("legendItemClick",{browserEvent:e}):l&&C(t,"legendItemClick",{browserEvent:e})})}createCheckboxForItem(t){t.checkbox=x("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),m(t.checkbox,"click",function(e){let i=e.target;C(t.series||t,"checkboxClick",{checked:i.checked,item:t},function(){t.select()})})}}return(h=O||(O={})).compose=function(t){T(p,"Core.Legend")&&m(t,"beforeMargins",function(){this.legend=new h(this,this.options.legend)})},O}),i(e,"Core/Chart/Chart.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Defaults.js"],e["Core/Templating.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Time.js"],e["Core/Utilities.js"],e["Core/Renderer/HTML/AST.js"],e["Core/Axis/Tick.js"]],function(t,e,i,s,r,o,n,a,h,l,d,c,p,u){let{animate:g,animObject:f,setAnimation:m}=t,{defaultOptions:x,defaultTime:y}=i,{numberFormat:b}=s,{registerEventOptions:v}=r,{charts:S,doc:C,marginNames:k,svg:M,win:w}=o,{seriesTypes:T}=h,{addEvent:A,attr:P,createElement:L,css:O,defined:D,diffObjects:E,discardElement:I,erase:j,error:B,extend:R,find:z,fireEvent:N,getStyle:W,isArray:G,isNumber:H,isObject:X,isString:F,merge:Y,objectEach:U,pick:V,pInt:$,relativeLength:Z,removeEvent:_,splat:q,syncTimeout:K,uniqueKey:J}=c;class Q{static chart(t,e,i){return new Q(t,e,i)}constructor(t,e,i){this.sharedClips={};let s=[...arguments];(F(t)||t.nodeName)&&(this.renderTo=s.shift()),this.init(s[0],s[1])}setZoomOptions(){let t=this.options.chart,e=t.zooming;this.zooming={...e,type:V(t.zoomType,e.type),key:V(t.zoomKey,e.key),pinchType:V(t.pinchType,e.pinchType),singleTouch:V(t.zoomBySingleTouch,e.singleTouch,!1),resetButton:Y(e.resetButton,t.resetZoomButton)}}init(t,e){N(this,"init",{args:arguments},function(){let i=Y(x,t),s=i.chart;this.userOptions=R({},t),this.margin=[],this.spacing=[],this.labelCollectors=[],this.callback=e,this.isResizing=0,this.options=i,this.axes=[],this.series=[],this.time=t.time&&Object.keys(t.time).length?new d(t.time):o.time,this.numberFormatter=s.numberFormatter||b,this.styledMode=s.styledMode,this.hasCartesianSeries=s.showAxes,this.index=S.length,S.push(this),o.chartCount++,v(this,s),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.setZoomOptions(),N(this,"afterInit"),this.firstRender()})}initSeries(t){let e=this.options.chart,i=t.type||e.type,s=T[i];s||B(17,!0,this,{missingModuleFor:i});let r=new s;return"function"==typeof r.init&&r.init(this,t),r}setSortedData(){this.getSeriesOrderByLinks().forEach(function(t){t.points||t.data||!t.enabledDataSorting||t.setData(t.options.data,!1)})}getSeriesOrderByLinks(){return this.series.concat().sort(function(t,e){return t.linkedSeries.length||e.linkedSeries.length?e.linkedSeries.length-t.linkedSeries.length:0})}orderItems(t,e=0){let i=this[t],s=this.options[t]=q(this.options[t]).slice(),r=this.userOptions[t]=this.userOptions[t]?q(this.userOptions[t]).slice():[];if(this.hasRendered&&(s.splice(e),r.splice(e)),i)for(let t=e,o=i.length;t<o;++t){let e=i[t];e&&(e.index=t,e instanceof a&&(e.name=e.getName()),e.options.isInternal||(s[t]=e.options,r[t]=e.userOptions))}}isInsidePlot(t,e,i={}){let{inverted:s,plotBox:r,plotLeft:o,plotTop:n,scrollablePlotBox:a}=this,{scrollLeft:h=0,scrollTop:l=0}=i.visiblePlotOnly&&this.scrollablePlotArea?.scrollingContainer||{},d=i.series,c=i.visiblePlotOnly&&a||r,p=i.inverted?e:t,u=i.inverted?t:e,g={x:p,y:u,isInsidePlot:!0,options:i};if(!i.ignoreX){let t=d&&(s&&!this.polar?d.yAxis:d.xAxis)||{pos:o,len:1/0},e=i.paneCoordinates?t.pos+p:o+p;e>=Math.max(h+o,t.pos)&&e<=Math.min(h+o+c.width,t.pos+t.len)||(g.isInsidePlot=!1)}if(!i.ignoreY&&g.isInsidePlot){let t=!s&&i.axis&&!i.axis.isXAxis&&i.axis||d&&(s?d.xAxis:d.yAxis)||{pos:n,len:1/0},e=i.paneCoordinates?t.pos+u:n+u;e>=Math.max(l+n,t.pos)&&e<=Math.min(l+n+c.height,t.pos+t.len)||(g.isInsidePlot=!1)}return N(this,"afterIsInsidePlot",g),g.isInsidePlot}redraw(t){N(this,"beforeRedraw");let e=this.hasCartesianSeries?this.axes:this.colorAxis||[],i=this.series,s=this.pointer,r=this.legend,o=this.userOptions.legend,n=this.renderer,a=n.isHidden(),h=[],l,d,c,p=this.isDirtyBox,u=this.isDirtyLegend,g;for(n.rootFontSize=n.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),m(!!this.hasRendered&&t,this),a&&this.temporaryDisplay(),this.layOutTitles(!1),c=i.length;c--;)if(((g=i[c]).options.stacking||g.options.centerInCategory)&&(d=!0,g.isDirty)){l=!0;break}if(l)for(c=i.length;c--;)(g=i[c]).options.stacking&&(g.isDirty=!0);
vendor: 4,501 bytes, line 64820
64820i.forEach(function(t){t.isDirty&&("point"===t.options.legendType?("function"==typeof t.updateTotals&&t.updateTotals(),u=!0):o&&(o.labelFormatter||o.labelFormat)&&(u=!0)),t.isDirtyData&&N(t,"updatedData")}),u&&r&&r.options.enabled&&(r.render(),this.isDirtyLegend=!1),d&&this.getStacks(),e.forEach(function(t){t.updateNames(),t.setScale()}),this.getMargins(),e.forEach(function(t){t.isDirty&&(p=!0)}),e.forEach(function(t){let e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,h.push(function(){N(t,"afterSetExtremes",R(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(p||d)&&t.redraw()}),p&&this.drawChartBox(),N(this,"predraw"),i.forEach(function(t){(p||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1}),s&&s.reset(!0),n.draw(),N(this,"redraw"),N(this,"render"),a&&this.temporaryDisplay(!0),h.forEach(function(t){t.call()})}get(t){let e=this.series;function i(e){return e.id===t||e.options&&e.options.id===t}let s=z(this.axes,i)||z(this.series,i);for(let t=0;!s&&t<e.length;t++)s=z(e[t].points||[],i);return s}getAxes(){let t=this.userOptions;for(let i of(N(this,"getAxes"),["xAxis","yAxis"]))for(let s of t[i]=q(t[i]||{}))new e(this,s,i);N(this,"afterGetAxes")}getSelectedPoints(){return this.series.reduce((t,e)=>(e.getPointsCollection().forEach(e=>{V(e.selectedStaging,e.selected)&&t.push(e)}),t),[])}getSelectedSeries(){return this.series.filter(function(t){return t.selected})}setTitle(t,e,i){this.applyDescription("title",t),this.applyDescription("subtitle",e),this.applyDescription("caption",void 0),this.layOutTitles(i)}applyDescription(t,e){let i=this,s=this.options[t]=Y(this.options[t],e),r=this[t];r&&e&&(this[t]=r=r.destroy()),s&&!r&&((r=this.renderer.text(s.text,0,0,s.useHTML).attr({align:s.align,class:"highcharts-"+t,zIndex:s.zIndex||4}).add()).update=function(e,s){i.applyDescription(t,e),i.layOutTitles(s)},this.styledMode||r.css(R("title"===t?{fontSize:this.options.isStock?"1em":"1.2em"}:{},s.style)),this[t]=r)}layOutTitles(t=!0){let e=[0,0,0],i=this.renderer,s=this.spacingBox;["title","subtitle","caption"].forEach(function(t){let r=this[t],o=this.options[t],n=o.verticalAlign||"top",a="title"===t?"top"===n?-3:0:"top"===n?e[0]+2:0;if(r){r.css({width:(o.width||s.width+(o.widthAdjust||0))+"px"});let t=i.fontMetrics(r).b,h=Math.round(r.getBBox(o.useHTML).height);r.align(R({y:"bottom"===n?t:a+t,height:h},o),!1,"spacingBox"),o.floating||("top"===n?e[0]=Math.ceil(e[0]+h):"bottom"===n&&(e[2]=Math.ceil(e[2]+h)))}},this),e[0]&&"top"===(this.options.title.verticalAlign||"top")&&(e[0]+=this.options.title.margin),e[2]&&"bottom"===this.options.caption.verticalAlign&&(e[2]+=this.options.caption.margin);let r=!this.titleOffset||this.titleOffset.join(",")!==e.join(",");this.titleOffset=e,N(this,"afterLayOutTitles"),!this.isDirtyBox&&r&&(this.isDirtyBox=this.isDirtyLegend=r,this.hasRendered&&t&&this.isDirtyBox&&this.redraw())}getContainerBox(){let t=[].map.call(this.renderTo.children,t=>{if(t!==this.container){let e=t.style.display;return t.style.display="none",[t,e]}}),e={width:W(this.renderTo,"width",!0)||0,height:W(this.renderTo,"height",!0)||0};return t.filter(Boolean).forEach(([t,e])=>{t.style.display=e}),e}getChartSize(){let t=this.options.chart,e=t.width,i=t.height,s=this.getContainerBox(),r=s.height>1&&!(!this.renderTo.parentElement?.style.height&&"100%"===this.renderTo.style.height);this.chartWidth=Math.max(0,e||s.width||600),this.chartHeight=Math.max(0,Z(i,this.chartWidth)||(r?s.height:400)),this.containerBox=s}temporaryDisplay(t){let e=this.renderTo,i;if(t)for(;e&&e.style;)e.hcOrigStyle&&(O(e,e.hcOrigStyle),delete e.hcOrigStyle),e.hcOrigDetached&&(C.body.removeChild(e),e.hcOrigDetached=!1),e=e.parentNode;else for(;e&&e.style&&(C.body.contains(e)||e.parentNode||(e.hcOrigDetached=!0,C.body.appendChild(e)),("none"===W(e,"display",!1)||e.hcOricDetached)&&(e.hcOrigStyle={display:e.style.display,height:e.style.height,overflow:e.style.overflow},i={display:"block",overflow:"hidden"},e!==this.renderTo&&(i.height=0),O(e,i),e.offsetWidth||e.style.setProperty("display","block","important")),(e=e.parentNode)!==C.body););}setClassName(t){this.container.className="highcharts-container "+(t||"")}getContainer(){let t=this.options,e=t.chart,i="data-highcharts-chart",s=J(),r,o=this.renderTo;o||(this.renderTo=o=e.renderTo),F(o)&&(this.renderTo=o=C.getElementById(o)),o||B(13,!0,this);let a=$(P(o,i));H(a)&&S[a]&&S[a].hasRendered&&S[a].destroy(),P(o,i,this.index),o.innerHTML=p.emptyHTML,e.skipClone||o.offsetWidth||this.temporaryDisplay(),this.getChartSize();
vendor: 12,557 bytes, line 64820
64820let h=this.chartHeight,d=this.chartWidth;O(o,{overflow:"hidden"}),this.styledMode||(r=R({position:"relative",overflow:"hidden",width:d+"px",height:h+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none",padding:"0px"},e.style||{}));let c=L("div",{id:s},r,o);this.container=c,this.getChartSize(),d===this.chartWidth||(d=this.chartWidth,this.styledMode||O(c,{width:V(e.style?.width,d+"px")})),this.containerBox=this.getContainerBox(),this._cursor=c.style.cursor;let u=e.renderer||!M?n.getRendererType(e.renderer):l;if(this.renderer=new u(c,d,h,void 0,e.forExport,t.exporting&&t.exporting.allowHTML,this.styledMode),m(void 0,this),this.setClassName(e.className),this.styledMode)for(let e in t.defs)this.renderer.definition(t.defs[e]);else this.renderer.setStyle(e.style);this.renderer.chartIndex=this.index,N(this,"afterGetContainer")}getMargins(t){let{spacing:e,margin:i,titleOffset:s}=this;this.resetMargins(),s[0]&&!D(i[0])&&(this.plotTop=Math.max(this.plotTop,s[0]+e[0])),s[2]&&!D(i[2])&&(this.marginBottom=Math.max(this.marginBottom,s[2]+e[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),N(this,"getMargins"),t||this.getAxisMargins()}getAxisMargins(){let t=this,e=t.axisOffset=[0,0,0,0],i=t.colorAxis,s=t.margin,r=function(t){t.forEach(function(t){t.visible&&t.getOffset()})};t.hasCartesianSeries?r(t.axes):i&&i.length&&r(i),k.forEach(function(i,r){D(s[r])||(t[i]+=e[r])}),t.setChartSize()}getOptions(){return E(this.userOptions,x)}reflow(t){let e=this,i=e.containerBox,s=e.getContainerBox();delete e.pointer?.chartPosition,!e.isPrinting&&!e.isResizing&&i&&s.width&&((s.width!==i.width||s.height!==i.height)&&(c.clearTimeout(e.reflowTimeout),e.reflowTimeout=K(function(){e.container&&e.setSize(void 0,void 0,!1)},t?100:0)),e.containerBox=s)}setReflow(){let t=this,e=e=>{t.options?.chart.reflow&&t.hasLoaded&&t.reflow(e)};if("function"==typeof ResizeObserver)new ResizeObserver(e).observe(t.renderTo);else{let t=A(w,"resize",e);A(this,"destroy",t)}}setSize(t,e,i){let s=this,r=s.renderer;s.isResizing+=1,m(i,s);let o=r.globalAnimation;s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,void 0!==t&&(s.options.chart.width=t),void 0!==e&&(s.options.chart.height=e),s.getChartSize();let{chartWidth:n,chartHeight:a,scrollablePixelsX:h=0,scrollablePixelsY:l=0}=s;(s.isDirtyBox||n!==s.oldChartWidth||a!==s.oldChartHeight)&&(s.styledMode||(o?g:O)(s.container,{width:`${n+h}px`,height:`${a+l}px`},o),s.setChartSize(!0),r.setSize(n,a,o),s.axes.forEach(function(t){t.isDirty=!0,t.setScale()}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.layOutTitles(),s.getMargins(),s.redraw(o),s.oldChartHeight=void 0,N(s,"resize"),setTimeout(()=>{s&&N(s,"endResize")},f(o).duration)),s.isResizing-=1}setChartSize(t){let e,i,s,r;let{chartHeight:o,chartWidth:n,inverted:a,spacing:h,renderer:l}=this,d=this.clipOffset,c=Math[a?"floor":"round"];this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=s=Math.max(0,Math.round(n-e-this.marginRight)),this.plotHeight=r=Math.max(0,Math.round(o-i-this.marginBottom)),this.plotSizeX=a?r:s,this.plotSizeY=a?s:r,this.spacingBox=l.spacingBox={x:h[3],y:h[0],width:n-h[3]-h[1],height:o-h[0]-h[2]},this.plotBox=l.plotBox={x:e,y:i,width:s,height:r},d&&(this.clipBox={x:c(d[3]),y:c(d[0]),width:c(this.plotSizeX-d[1]-d[3]),height:c(this.plotSizeY-d[0]-d[2])}),t||(this.axes.forEach(function(t){t.setAxisSize(),t.setAxisTranslation()}),l.alignElements()),N(this,"afterSetChartSize",{skipAxes:t})}resetMargins(){N(this,"resetMargins");let t=this,e=t.options.chart,i=e.plotBorderWidth||0,s=i/2;["margin","spacing"].forEach(function(i){let s=e[i],r=X(s)?s:[s,s,s,s];["Top","Right","Bottom","Left"].forEach(function(s,o){t[i][o]=V(e[i+s],r[o])})}),k.forEach(function(e,i){t[e]=V(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[s,s,s,s],t.plotBorderWidth=i}drawChartBox(){let t=this.options.chart,e=this.renderer,i=this.chartWidth,s=this.chartHeight,r=this.styledMode,o=this.plotBGImage,n=t.backgroundColor,a=t.plotBackgroundColor,h=t.plotBackgroundImage,l=this.plotLeft,d=this.plotTop,c=this.plotWidth,p=this.plotHeight,u=this.plotBox,g=this.clipRect,f=this.clipBox,m=this.chartBackground,x=this.plotBackground,y=this.plotBorder,b,v,S,C="animate";m||(this.chartBackground=m=e.rect().addClass("highcharts-background").add(),C="attr"),r?b=v=m.strokeWidth():(v=(b=t.borderWidth||0)+(t.shadow?8:0),S={fill:n||"none"},(b||m["stroke-width"])&&(S.stroke=t.borderColor,S["stroke-width"]=b),m.attr(S).shadow(t.shadow)),m[C]({x:v/2,y:v/2,width:i-v-b%2,height:s-v-b%2,r:t.borderRadius}),C="animate",x||(C="attr",this.plotBackground=x=e.rect().addClass("highcharts-plot-background").add()),x[C](u),!r&&(x.attr({fill:a||"none"}).shadow(t.plotShadow),h&&(o?(h!==o.attr("href")&&o.attr("href",h),o.animate(u)):this.plotBGImage=e.image(h,l,d,c,p).add())),g?g.animate({width:f.width,height:f.height}):this.clipRect=e.clipRect(f),C="animate",y||(C="attr",this.plotBorder=y=e.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),r||y.attr({stroke:t.plotBorderColor,"stroke-width":t.plotBorderWidth||0,fill:"none"}),y[C](y.crisp({x:l,y:d,width:c,height:p},-y.strokeWidth())),this.isDirtyBox=!1,N(this,"afterDrawChartBox")}propFromSeries(){let t,e,i;let s=this,r=s.options.chart,o=s.options.series;["inverted","angular","polar"].forEach(function(n){for(e=T[r.type],i=r[n]||e&&e.prototype[n],t=o&&o.length;!i&&t--;)(e=T[o[t].type])&&e.prototype[n]&&(i=!0);s[n]=i})}linkSeries(t){let e=this,i=e.series;i.forEach(function(t){t.linkedSeries.length=0}),i.forEach(function(t){let{linkedTo:i}=t.options;if(F(i)){let s;(s=":previous"===i?e.series[t.index-1]:e.get(i))&&s.linkedParent!==t&&(s.linkedSeries.push(t),t.linkedParent=s,s.enabledDataSorting&&t.setDataSortingOptions(),t.visible=V(t.options.visible,s.options.visible,t.visible))}}),N(this,"afterLinkSeries",{isUpdating:t})}renderSeries(){this.series.forEach(function(t){t.translate(),t.render()})}render(){let t=this.axes,e=this.colorAxis,i=this.renderer,s=this.options.chart.axisLayoutRuns||2,r=t=>{t.forEach(t=>{t.visible&&t.render()})},o=0,n=!0,a,h=0;for(let e of(this.setTitle(),N(this,"beforeMargins"),this.getStacks?.(),this.getMargins(!0),this.setChartSize(),t)){let{options:t}=e,{labels:i}=t;if(this.hasCartesianSeries&&e.horiz&&e.visible&&i.enabled&&e.series.length&&"colorAxis"!==e.coll&&!this.polar){o=t.tickLength,e.createGroups();let s=new u(e,0,"",!0),r=s.createLabel("x",i);if(s.destroy(),r&&V(i.reserveSpace,!H(t.crossing))&&(o=r.getBBox().height+i.distance+Math.max(t.offset||0,0)),o){r?.destroy();break}}}for(this.plotHeight=Math.max(this.plotHeight-o,0);(n||a||s>1)&&h<s;){let e=this.plotWidth,i=this.plotHeight;for(let e of t)0===h?e.setScale():(e.horiz&&n||!e.horiz&&a)&&e.setTickInterval(!0);0===h?this.getAxisMargins():this.getMargins(),n=e/this.plotWidth>(h?1:1.1),a=i/this.plotHeight>(h?1:1.05),h++}this.drawChartBox(),this.hasCartesianSeries?r(t):e&&e.length&&r(e),this.seriesGroup||(this.seriesGroup=i.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0}addCredits(t){let e=this,i=Y(!0,this.options.credits,t);i.enabled&&!this.credits&&(this.credits=this.renderer.text(i.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){i.href&&(w.location.href=i.href)}).attr({align:i.position.align,zIndex:8}),e.styledMode||this.credits.css(i.style),this.credits.add().align(i.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})}destroy(){let t;let e=this,i=e.axes,s=e.series,r=e.container,n=r&&r.parentNode;for(N(e,"destroy"),e.renderer.forExport?j(S,e):S[e.index]=void 0,o.chartCount--,e.renderTo.removeAttribute("data-highcharts-chart"),_(e),t=i.length;t--;)i[t]=i[t].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),t=s.length;t--;)s[t]=s[t].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach(function(t){let i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),r&&(r.innerHTML=p.emptyHTML,_(r),n&&I(r)),U(e,function(t,i){delete e[i]})}firstRender(){let t=this,e=t.options;t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes();let i=G(e.series)?e.series:[];e.series=[],i.forEach(function(e){t.initSeries(e)}),t.linkSeries(),t.setSortedData(),N(t,"beforeRender"),t.render(),t.pointer?.getChartPosition(),t.renderer.imgCount||t.hasLoaded||t.onload(),t.temporaryDisplay(!0)}onload(){this.callbacks.concat([this.callback]).forEach(function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),N(this,"load"),N(this,"render"),D(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0}warnIfA11yModuleNotLoaded(){let{options:t,title:e}=this;!t||this.accessibility||(this.renderer.boxWrapper.attr({role:"img","aria-label":(e&&e.element.textContent||"").replace(/</g,"<")}),t.accessibility&&!1===t.accessibility.enabled||B('Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.',!1,this))}addSeries(t,e,i){let s;let r=this;return t&&(e=V(e,!0),N(r,"addSeries",{options:t},function(){s=r.initSeries(t),r.isDirtyLegend=!0,r.linkSeries(),s.enabledDataSorting&&s.setData(t.data,!1),N(r,"afterAddSeries",{series:s}),e&&r.redraw(i)})),s}addAxis(t,e,i,s){return this.createAxis(e?"xAxis":"yAxis",{axis:t,redraw:i,animation:s})}addColorAxis(t,e,i){return this.createAxis("colorAxis",{axis:t,redraw:e,animation:i})}createAxis(t,i){let s=new e(this,i.axis,t);return V(i.redraw,!0)&&this.redraw(i.animation),s}showLoading(t){let e=this,i=e.options,s=i.loading,r=function(){o&&O(o,{left:e.plotLeft+"px",top:e.plotTop+"px",width:e.plotWidth+"px",height:e.plotHeight+"px"})},o=e.loadingDiv,n=e.loadingSpan;o||(e.loadingDiv=o=L("div",{className:"highcharts-loading highcharts-loading-hidden"},null,e.container)),n||(e.loadingSpan=n=L("span",{className:"highcharts-loading-inner"},null,o),A(e,"redraw",r)),o.className="highcharts-loading",p.setElementHTML(n,V(t,i.lang.loading,"")),e.styledMode||(O(o,R(s.style,{zIndex:10})),O(n,s.labelStyle),e.loadingShown||(O(o,{opacity:0,display:""}),g(o,{opacity:s.style.opacity||.5},{duration:s.showDuration||0}))),e.loadingShown=!0,r()}hideLoading(){let t=this.options,e=this.loadingDiv;e&&(e.className="highcharts-loading highcharts-loading-hidden",this.styledMode||g(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){O(e,{display:"none"})}})),this.loadingShown=!1}update(t,e,i,s){let r,o,n;let a=this,h={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},l=t.isResponsiveOptions,c=[];N(a,"update",{options:t}),l||a.setResponsive(!1,!0),t=E(t,a.options),a.userOptions=Y(a.userOptions,t);let p=t.chart;p&&(Y(!0,a.options.chart,p),this.setZoomOptions(),"className"in p&&a.setClassName(p.className),("inverted"in p||"polar"in p||"type"in p)&&(a.propFromSeries(),r=!0),"alignTicks"in p&&(r=!0),"events"in p&&v(this,p),U(p,function(t,e){-1!==a.propsRequireUpdateSeries.indexOf("chart."+e)&&(o=!0),-1!==a.propsRequireDirtyBox.indexOf(e)&&(a.isDirtyBox=!0),-1===a.propsRequireReflow.indexOf(e)||(a.isDirtyBox=!0,l||(n=!0))}),!a.styledMode&&p.style&&a.renderer.setStyle(a.options.chart.style||{})),!a.styledMode&&t.colors&&(this.options.colors=t.colors),t.time&&(this.time===y&&(this.time=new d(t.time)),Y(!0,a.options.time,t.time)),U(t,function(e,i){a[i]&&"function"==typeof a[i].update?a[i].update(e,!1):"function"==typeof a[h[i]]?a[h[i]](e):"colors"!==i&&-1===a.collectionsWithUpdate.indexOf(i)&&Y(!0,a.options[i],t[i]),"chart"!==i&&-1!==a.propsRequireUpdateSeries.indexOf(i)&&(o=!0)}),this.collectionsWithUpdate.forEach(function(e){t[e]&&(q(t[e]).forEach(function(t,s){let r;let o=D(t.id);o&&(r=a.get(t.id)),!r&&a[e]&&(r=a[e][V(t.index,s)])&&(o&&D(r.options.id)||r.options.isInternal)&&(r=void 0),r&&r.coll===e&&(r.update(t,!1),i&&(r.touched=!0)),!r&&i&&a.collectionsWithInit[e]&&(a.collectionsWithInit[e][0].apply(a,[t].concat(a.collectionsWithInit[e][1]||[]).concat([!1])).touched=!0)}),i&&a[e].forEach(function(t){t.touched||t.options.isInternal?delete t.touched:c.push(t)}))}
64820),c.forEach(function(t){t.chart&&t.remove&&t.remove(!1)}),r&&a.axes.forEach(function(t){t.update({},!1)}),o&&a.getSeriesOrderByLinks().forEach(function(t){t.chart&&t.update({},!1)},this);let u=p&&p.width,g=p&&(F(p.height)?Z(p.height,u||a.chartWidth):p.height);n||H(u)&&u!==a.chartWidth||H(g)&&g!==a.chartHeight?a.setSize(u,g,s):V(e,!0)&&a.redraw(s),N(a,"afterUpdate",{options:t,redraw:e,animation:s})}setSubtitle(t,e){this.applyDescription("subtitle",t),this.layOutTitles(e)}setCaption(t,e){this.applyDescription("caption",t),this.layOutTitles(e)}showResetZoom(){let t=this,e=x.lang,i=t.zooming.resetButton,s=i.theme,r="chart"===i.relativeTo||"spacingBox"===i.relativeTo?null:"plotBox";function o(){t.zoomOut()}N(this,"beforeShowResetZoom",null,function(){t.resetZoomButton=t.renderer.button(e.resetZoom,null,null,o,s).attr({align:i.position.align,title:e.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(i.position,!1,r)}),N(this,"afterShowResetZoom")}zoomOut(){N(this,"selection",{resetSelection:!0},()=>this.transform({reset:!0,trigger:"zoom"}))}pan(t,e){let i=this,s="object"==typeof e?e:{enabled:e,type:"x"},r=s.type,o=r&&i[({x:"xAxis",xy:"axes",y:"yAxis"})[r]].filter(t=>t.options.panningEnabled&&!t.options.isInternal),n=i.options.chart;n?.panning&&(n.panning=s),N(this,"pan",{originalEvent:t},()=>{i.transform({axes:o,event:t,to:{x:t.chartX-(i.mouseDownX||0),y:t.chartY-(i.mouseDownY||0)},trigger:"pan"}),O(i.container,{cursor:"move"})})}transform(t){let{axes:e=this.axes,event:i,from:s={},reset:r,selection:o,to:n={},trigger:a}=t,{inverted:h}=this,l=!1,d,c;for(let t of(this.hoverPoints?.forEach(t=>t.setState()),e)){let{horiz:e,len:p,minPointOffset:u=0,options:g,reversed:f}=t,m=e?"width":"height",x=e?"x":"y",y=V(n[m],t.len),b=V(s[m],t.len),v=10>Math.abs(y)?1:y/b,S=(s[x]||0)+b/2-t.pos,C=S-((n[x]??t.pos)+y/2-t.pos)/v,k=f&&!h||!f&&h?-1:1;if(!r&&(S<0||S>t.len))continue;let M=t.toValue(C,!0)+(o||t.isOrdinal?0:u*k),w=t.toValue(C+p/v,!0)-(o||t.isOrdinal?0:u*k||0),T=t.allExtremes;if(M>w&&([M,w]=[w,M]),1===v&&!r&&"yAxis"===t.coll&&!T){for(let e of t.series){let t=e.getExtremes(e.getProcessedData(!0).yData,!0);T??(T={dataMin:Number.MAX_VALUE,dataMax:-Number.MAX_VALUE}),H(t.dataMin)&&H(t.dataMax)&&(T.dataMin=Math.min(t.dataMin,T.dataMin),T.dataMax=Math.max(t.dataMax,T.dataMax))}t.allExtremes=T}let{dataMin:A,dataMax:P,min:L,max:O}=R(t.getExtremes(),T||{}),E=A??g.min,I=P??g.max,j=w-M,B=t.categories?0:Math.min(j,I-E),z=E-B*(D(g.min)?0:g.minPadding),N=I+B*(D(g.max)?0:g.maxPadding),W=t.allowZoomOutside||1===v||"zoom"!==a&&v>1,G=Math.min(g.min??z,z,W?L:z),X=Math.max(g.max??N,N,W?O:N);(!t.isOrdinal||t.options.overscroll||1!==v||r)&&(M<G&&(M=G,v>=1&&(w=M+j)),w>X&&(w=X,v>=1&&(M=w-j)),(r||t.series.length&&(M!==L||w!==O)&&M>=G&&w<=X)&&(o?o[t.coll].push({axis:t,min:M,max:w}):(t.isPanning="zoom"!==a,t.isPanning&&(c=!0),t.setExtremes(r?void 0:M,r?void 0:w,!1,!1,{move:C,trigger:a,scale:v}),!r&&(M>G||w<X)&&"mousewheel"!==a&&(d=!0)),l=!0),i&&(this[e?"mouseDownX":"mouseDownY"]=i[e?"chartX":"chartY"]))}return l&&(o?N(this,"selection",o,()=>{delete t.selection,t.trigger="zoom",this.transform(t)}):(!d||c||this.resetZoomButton?!d&&this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy()):this.showResetZoom(),this.redraw("zoom"===a&&(this.options.chart.animation??this.pointCount<100)))),l}}return R(Q.prototype,{callbacks:[],collectionsWithInit:{xAxis:[Q.prototype.addAxis,[!0]],yAxis:[Q.prototype.addAxis,[!1]],series:[Q.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroun
64820dColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]}),Q}),i(e,"Extensions/ScrollablePlotArea.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,s){let{stop:r}=t,{composed:o}=e,{addEvent:n,createElement:a,css:h,defined:l,merge:d,pushUnique:c}=s;function p(){let t=this.scrollablePlotArea;(this.scrollablePixelsX||this.scrollablePixelsY)&&!t&&(this.scrollablePlotArea=t=new g(this)),t?.applyFixed()}function u(){this.chart.scrollablePlotArea&&(this.chart.scrollablePlotArea.isDirty=!0)}class g{static compose(t,e,i){c(o,this.compose)&&(n(t,"afterInit",u),n(e,"afterSetChartSize",t=>this.afterSetSize(t.target,t)),n(e,"render",p),n(i,"show",u))}static afterSetSize(t,e){let i,s,r;let{minWidth:o,minHeight:n}=t.options.chart.scrollablePlotArea||{},{clipBox:a,plotBox:h,inverted:c,renderer:p}=t;if(!p.forExport&&(o?(t.scrollablePixelsX=i=Math.max(0,o-t.chartWidth),i&&(t.scrollablePlotBox=d(t.plotBox),h.width=t.plotWidth+=i,a[c?"height":"width"]+=i,r=!0)):n&&(t.scrollablePixelsY=s=Math.max(0,n-t.chartHeight),l(s)&&(t.scrollablePlotBox=d(t.plotBox),h.height=t.plotHeight+=s,a[c?"width":"height"]+=s,r=!1)),l(r)&&!e.skipAxes))for(let e of t.axes)e.horiz===r&&(e.setAxisSize(),e.setAxisTranslation())}constructor(t){let e;let s=t.options.chart,r=i.getRendererType(),o=s.scrollablePlotArea||{},l=this.moveFixedElements.bind(this),d={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};t.scrollablePixelsX&&(d.overflowX="auto"),t.scrollablePixelsY&&(d.overflowY="auto"),this.chart=t;let c=this.parentDiv=a("div",{className:"highcharts-scrolling-parent"},{position:"relative"},t.renderTo),p=this.scrollingContainer=a("div",{className:"highcharts-scrolling"},d,c),u=this.innerContainer=a("div",{className:"highcharts-inner-container"},void 0,p),g=this.fixedDiv=a("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(s.style?.zIndex||0)+2,top:0},void 0,!0),f=this.fixedRenderer=new r(g,t.chartWidth,t.chartHeight,s.style);this.mask=f.path().attr({fill:s.backgroundColor||"#fff","fill-opacity":o.opacity??.85,zIndex:-1}).addClass("highcharts-scrollable-mask").add(),p.parentNode.insertBefore(g,p),h(t.renderTo,{overflow:"visible"}),n(t,"afterShowResetZoom",l),n(t,"afterApplyDrilldown",l),n(t,"afterLayOutTitles",l),n(p,"scroll",()=>{let{pointer:i,hoverPoint:s}=t;i&&(delete i.chartPosition,s&&(e=s),i.runPointActions(void 0,e,!0))}),u.appendChild(t.container)}applyFixed(){let{chart:t,fixedRenderer:e,isDirty:i,scrollingContainer:s}=this,{axisOffset:o,chartWidth:n,chartHeight:a,container:d,plotHeight:c,plotLeft:p,plotTop:u,plotWidth:g,scrollablePixelsX:f=0,scrollablePixelsY:m=0}=t,{scrollPositionX:x=0,scrollPositionY:y=0}=t.options.chart.scrollablePlotArea||{},b=n+f,v=a+m;e.setSize(n,a),(i??!0)&&(this.isDirty=!1,this.moveFixedElements()),r(t.container),h(d,{width:`${b}px`,height:`${v}px`}),t.renderer.boxWrapper.attr({width:b,height:v,viewBox:[0,0,b,v].join(" ")}),t.chartBackground?.attr({width:b,height:v}),h(s,{width:`${n}px`,height:`${a}px`}),l(i)||(s.scrollLeft=f*x,s.scrollTop=m*y);let S=u-o[0]-1,C=p-o[3]-1,k=u+c+o[2]+1,M=p+g+o[1]+1,w=p+g-f,T=u+c-m,A=[["M",0,0]];f?A=[["M",0,S],["L",p-1,S],["L",p-1,k],["L",0,k],["Z"],["M",w,S],["L",n,S],["L",n,k],["L",w,k],["Z"]]:m&&(A=[["M",C,0],["L",C,u-1],["L",M,u-1],["L",M,0],["Z"],["M",C,T],["L",C,a],["L",M,a],["L",M,T],["Z"]]),"adjustHeight"!==t.redrawTrigger&&this.mask.attr({d:A})}moveFixedElements(){let t;let{container:e,inverted:i,scrollablePixelsX:s,scrollablePixelsY:r}=this.chart,o=this.fixedRenderer,n=g.fixedSelectors;for(let a of(s&&!i?t=".highcharts-yaxis":s&&i?t=".highcharts-xaxis":r&&!i?t=".highcharts-xaxis":r&&i&&(t=".highcharts-yaxis"),t&&n.push(`${t}:not(.highcharts-radial-axis)`,`${t}-labels:not(.highcharts-radial-axis-labels)`),n))[].forEach.call(e.querySelectorAll(a),t=>
vendor: 4,556 bytes, line 64820
64820{(t.namespaceURI===o.SVG_NS?o.box:o.box.parentNode).appendChild(t),t.style.pointerEvents="auto"})}}return g.fixedSelectors=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-caption",".highcharts-credits",".highcharts-drillup-button",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-range-selector-group",".highcharts-reset-zoom",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"],g}),i(e,"Core/Axis/Stacking/StackItem.js",[e["Core/Templating.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{format:s}=t,{series:r}=e,{destroyObjectProperties:o,fireEvent:n,isNumber:a,pick:h}=i;return class{constructor(t,e,i,s,r){let o=t.chart.inverted,n=t.reversed;this.axis=t;let a=this.isNegative=!!i!=!!n;this.options=e=e||{},this.x=s,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=r,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:e.align||(o?a?"left":"right":"center"),verticalAlign:e.verticalAlign||(o?"middle":a?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(o?a?"right":"left":"center")}destroy(){o(this,this.axis)}render(t){let e=this.axis.chart,i=this.options,r=i.format,o=r?s(r,this,e):i.formatter.call(this);if(this.label)this.label.attr({text:o,visibility:"hidden"});else{this.label=e.renderer.label(o,null,void 0,i.shape,void 0,void 0,i.useHTML,!1,"stack-labels");let s={r:i.borderRadius||0,text:o,padding:h(i.padding,5),visibility:"hidden"};e.styledMode||(s.fill=i.backgroundColor,s.stroke=i.borderColor,s["stroke-width"]=i.borderWidth,this.label.css(i.style||{})),this.label.attr(s),this.label.added||this.label.add(t)}this.label.labelrank=e.plotSizeY,n(this,"afterRender")}setOffset(t,e,i,s,o,l){let{alignOptions:d,axis:c,label:p,options:u,textAlign:g}=this,f=c.chart,m=this.getStackBox({xOffset:t,width:e,boxBottom:i,boxTop:s,defaultX:o,xAxis:l}),{verticalAlign:x}=d;if(p&&m){let t=p.getBBox(void 0,0),e=p.padding,i="justify"===h(u.overflow,"justify"),s;d.x=u.x||0,d.y=u.y||0;let{x:o,y:n}=this.adjustStackPosition({labelBox:t,verticalAlign:x,textAlign:g});m.x-=o,m.y-=n,p.align(d,!1,m),(s=f.isInsidePlot(p.alignAttr.x+d.x+o,p.alignAttr.y+d.y+n))||(i=!1),i&&r.prototype.justifyDataLabel.call(c,p,d,p.alignAttr,t,m),p.attr({x:p.alignAttr.x,y:p.alignAttr.y,rotation:u.rotation,rotationOriginX:t.width*({left:0,center:.5,right:1})[u.textAlign||"center"],rotationOriginY:t.height/2}),h(!i&&u.crop,!0)&&(s=a(p.x)&&a(p.y)&&f.isInsidePlot(p.x-e+(p.width||0),p.y)&&f.isInsidePlot(p.x+e,p.y)),p[s?"show":"hide"]()}n(this,"afterSetOffset",{xOffset:t,width:e})}adjustStackPosition({labelBox:t,verticalAlign:e,textAlign:i}){let s={bottom:0,middle:1,top:2,right:1,center:0,left:-1},r=s[e],o=s[i];return{x:t.width/2+t.width/2*o,y:t.height/2*r}}getStackBox(t){let e=this.axis,i=e.chart,{boxTop:s,defaultX:r,xOffset:o,width:n,boxBottom:l}=t,d=e.stacking.usePercentage?100:h(s,this.total,0),c=e.toPixels(d),p=t.xAxis||i.xAxis[0],u=h(r,p.translate(this.x))+o,g=Math.abs(c-e.toPixels(l||a(e.min)&&e.logarithmic&&e.logarithmic.lin2log(e.min)||0)),f=i.inverted,m=this.isNegative;return f?{x:(m?c:c-g)-i.plotLeft,y:p.height-u-n+p.top-i.plotTop,width:g,height:n}:{x:u+p.transB-i.plotLeft,y:(m?c-g:c)-i.plotTop,width:n,height:g}}}}),i(e,"Core/Axis/Stacking/StackingAxis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Utilities.js"]],function(t,e,i,s,r){var o;let{getDeferredAnimation:n}=t,{series:{prototype:a}}=i,{addEvent:h,correctFloat:l,defined:d,destroyObjectProperties:c,fireEvent:p,isArray:u,isNumber:g,objectEach:f,pick:m}=r;function x(){let t=this.inverted;this.axes.forEach(t=>{t.stacking&&t.stacking.stacks&&t.hasVisibleSeries&&(t.stacking.oldStacks=t.stacking.stacks)}),this.series.forEach(e=>{let i=e.xAxis&&e.xAxis.options||{};e.options.stacking&&e.reserveSpace()&&(e.stackKey=[e.type,m(e.options.stack,""),t?i.top:i.left,t?i.height:i.width].join(","))})}function y(){let t=this.stacking;if(t){let e=t.stacks;f(e,(t,i)=>{c(t),delete e[i]}),t.stackTotalGroup?.destroy()}}function b(){this.stacking||(this.stacking=new w(this))}function v(t,e,i,s){return!d(t)||t.x!==e||s&&t.stackKey!==s?t={x:e,index:0,key:s,stackKey:s}:t.index++,t.key=[i,e,t.index].join(","),t}function S(){let t;let e=this,i=e.yAxis,s=e.stackKey||"",r=i.stacking.stacks,o=e.processedXData,n=e.options.stacking,a=e[n+"Stacker"];
vendor: 4,199 bytes, line 64820
64820a&&[s,"-"+s].forEach(i=>{let s=o.length,n,h,l;for(;s--;)n=o[s],t=e.getStackIndicator(t,n,e.index,i),h=r[i]?.[n],(l=h?.points[t.key||""])&&a.call(e,l,h,s)})}function C(t,e,i){let s=e.total?100/e.total:0;t[0]=l(t[0]*s),t[1]=l(t[1]*s),this.stackedYData[i]=t[1]}function k(t){(this.is("column")||this.is("columnrange"))&&(this.options.centerInCategory&&!this.options.stacking&&this.chart.series.length>1?a.setStackedPoints.call(this,t,"group"):t.stacking.resetStacks())}function M(t,e){let i,r,o,n,a,h,c,p,g;let f=e||this.options.stacking;if(!f||!this.reserveSpace()||(({group:"xAxis"})[f]||"yAxis")!==t.coll)return;let x=this.processedXData,y=this.processedYData,b=[],v=y.length,S=this.options,C=S.threshold||0,k=S.startFromThreshold?C:0,M=S.stack,w=e?`${this.type},${f}`:this.stackKey||"",T="-"+w,A=this.negStacks,P=t.stacking,L=P.stacks,O=P.oldStacks;for(P.stacksTouched+=1,c=0;c<v;c++){p=x[c],g=y[c],h=(i=this.getStackIndicator(i,p,this.index)).key||"",L[a=(r=A&&g<(k?0:C))?T:w]||(L[a]={}),L[a][p]||(O[a]?.[p]?(L[a][p]=O[a][p],L[a][p].total=null):L[a][p]=new s(t,t.options.stackLabels,!!r,p,M)),o=L[a][p],null!==g?(o.points[h]=o.points[this.index]=[m(o.cumulative,k)],d(o.cumulative)||(o.base=h),o.touched=P.stacksTouched,i.index>0&&!1===this.singleStacks&&(o.points[h][0]=o.points[this.index+","+p+",0"][0])):(delete o.points[h],delete o.points[this.index]);let e=o.total||0;"percent"===f?(n=r?w:T,e=A&&L[n]?.[p]?(n=L[n][p]).total=Math.max(n.total||0,e)+Math.abs(g)||0:l(e+(Math.abs(g)||0))):"group"===f?(u(g)&&(g=g[0]),null!==g&&e++):e=l(e+(g||0)),"group"===f?o.cumulative=(e||1)-1:o.cumulative=l(m(o.cumulative,k)+(g||0)),o.total=e,null!==g&&(o.points[h].push(o.cumulative),b[c]=o.cumulative,o.hasValidPoints=!0)}"percent"===f&&(P.usePercentage=!0),"group"!==f&&(this.stackedYData=b),P.oldStacks={}}class w{constructor(t){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=t}buildStacks(){let t,e;let i=this.axis,s=i.series,r="xAxis"===i.coll,o=i.options.reversedStacks,n=s.length;for(this.resetStacks(),this.usePercentage=!1,e=n;e--;)t=s[o?e:n-e-1],r&&t.setGroupedPoints(i),t.setStackedPoints(i);if(!r)for(e=0;e<n;e++)s[e].modifyStacks();p(i,"afterBuildStacks")}cleanStacks(){this.oldStacks&&(this.stacks=this.oldStacks,f(this.stacks,t=>{f(t,t=>{t.cumulative=t.total})}))}resetStacks(){f(this.stacks,t=>{f(t,(e,i)=>{g(e.touched)&&e.touched<this.stacksTouched?(e.destroy(),delete t[i]):(e.total=null,e.cumulative=null)})})}renderStackTotals(){let t=this.axis,e=t.chart,i=e.renderer,s=this.stacks,r=n(e,t.options.stackLabels?.animation||!1),o=this.stackTotalGroup=this.stackTotalGroup||i.g("stack-labels").attr({zIndex:6,opacity:0}).add();o.translate(e.plotLeft,e.plotTop),f(s,t=>{f(t,t=>{t.render(o)})}),o.animate({opacity:1},r)}}return(o||(o={})).compose=function(t,e,i){let s=e.prototype,r=i.prototype;s.getStacks||(h(t,"init",b),h(t,"destroy",y),s.getStacks=x,r.getStackIndicator=v,r.modifyStacks=S,r.percentStacker=C,r.setGroupedPoints=k,r.setStackedPoints=M)},o}),i(e,"Series/Line/LineSeries.js",[e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{defined:s,merge:r,isObject:o}=i;class n extends t{drawGraph(){let t=this.options,e=(this.gappedPath||this.getGraphPath).call(this),i=this.chart.styledMode;[this,...this.zones].forEach((s,n)=>{let a,h=s.graph,l=h?"animate":"attr",d=s.dashStyle||t.dashStyle;h?(h.endX=this.preventGraphAnimation?null:e.xMap,h.animate({d:e})):e.length&&(s.graph=h=this.chart.renderer.path(e).addClass("highcharts-graph"+(n?` highcharts-zone-graph-${n-1} `:" ")+(n&&s.className||"")).attr({zIndex:1}).add(this.group)),h&&!i&&(a={stroke:!n&&t.lineColor||s.color||this.color||"#cccccc","stroke-width":t.lineWidth||0,fill:this.fillGraph&&this.color||"none"},d?a.dashstyle=d:"square"!==t.linecap&&(a["stroke-linecap"]=a["stroke-linejoin"]="round"),h[l](a).shadow(n<2&&t.shadow&&r({filterUnits:"userSpaceOnUse"},o(t.shadow)?t.shadow:{}))),h&&(h.startX=e.xMap,h.isArea=e.isArea)})}getGraphPath(t,e,i){let r=this,o=r.options,n=[],a=[],h,l=o.step,d=(t=t||r.points).reversed;return d&&t.reverse(),(l=({right:1,center:2})[l]||l&&3)&&d&&(l=4-l),(t=this.getValidPoints(t,!1,!(o.connectNulls&&!e&&!i))).forEac
vendor: 2,055 bytes, line 64820
64820h(function(d,c){let p;let u=d.plotX,g=d.plotY,f=t[c-1],m=d.isNull||"number"!=typeof g;(d.leftCliff||f&&f.rightCliff)&&!i&&(h=!0),m&&!s(e)&&c>0?h=!o.connectNulls:m&&!e?h=!0:(0===c||h?p=[["M",d.plotX,d.plotY]]:r.getPointSpline?p=[r.getPointSpline(t,d,c)]:l?(p=1===l?[["L",f.plotX,g]]:2===l?[["L",(f.plotX+u)/2,f.plotY],["L",(f.plotX+u)/2,g]]:[["L",u,f.plotY]]).push(["L",u,g]):p=[["L",u,g]],a.push(d.x),l&&(a.push(d.x),2===l&&a.push(d.x)),n.push.apply(n,p),h=!1)}),n.xMap=a,r.graphPath=n,n}}return n.defaultOptions=r(t.defaultOptions,{legendSymbol:"lineMarker"}),e.registerSeriesType("line",n),n}),i(e,"Series/Area/AreaSeriesDefaults.js",[],function(){return{threshold:0,legendSymbol:"areaMarker"}}),i(e,"Series/Area/AreaSeries.js",[e["Series/Area/AreaSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{seriesTypes:{line:s}}=e,{extend:r,merge:o,objectEach:n,pick:a}=i;class h extends s{drawGraph(){this.areaPath=[],super.drawGraph.apply(this);let{areaPath:t,options:e}=this;[this,...this.zones].forEach((i,s)=>{let r={},o=i.fillColor||e.fillColor,n=i.area,a=n?"animate":"attr";n?(n.endX=this.preventGraphAnimation?null:t.xMap,n.animate({d:t})):(r.zIndex=0,(n=i.area=this.chart.renderer.path(t).addClass("highcharts-area"+(s?` highcharts-zone-area-${s-1} `:" ")+(s&&i.className||"")).add(this.group)).isArea=!0),this.chart.styledMode||(r.fill=o||i.color||this.color,r["fill-opacity"]=o?1:e.fillOpacity??.75,n.css({pointerEvents:this.stickyTracking?"none":"auto"})),n[a](r),n.startX=t.xMap,n.shiftUnit=e.step?2:1})}getGraphPath(t){let e,i,r;let o=s.prototype.getGraphPath,n=this.options,h=n.stacking,l=this.yAxis,d=[],c=[],p=this.index,u=l.stacking.stacks[this.stackKey],g=n.threshold,f=Math.round(l.getThreshold(n.threshold)),m=a(n.connectNulls,"percent"===h),x=function(i,s,r){let o=t[i],n=h&&u[o.x].points[p],a=o[r+"Null"]||0,m=o[r+"Cliff"]||0,x,y,b=!0;m||a?(x=(a?n[0]:n[1])+m,y=n[0]+m,b=!!a):!h&&t[s]&&t[s].isNull&&(x=y=g),void 0!==x&&(c.push({plotX:e,plotY:null===x?f:l.getThreshold(x),isNull:b,isCliff:!0}
vendor: 15,828 bytes, line 64820
64820),d.push({plotX:e,plotY:null===y?f:l.getThreshold(y),doCurve:!1}))};t=t||this.points,h&&(t=this.getStackPoints(t));for(let s=0,o=t.length;s<o;++s)h||(t[s].leftCliff=t[s].rightCliff=t[s].leftNull=t[s].rightNull=void 0),i=t[s].isNull,e=a(t[s].rectPlotX,t[s].plotX),r=h?a(t[s].yBottom,f):f,i&&!m||(m||x(s,s-1,"left"),i&&!h&&m||(c.push(t[s]),d.push({x:s,plotX:e,plotY:r})),m||x(s,s+1,"right"));let y=o.call(this,c,!0,!0);d.reversed=!0;let b=o.call(this,d,!0,!0),v=b[0];v&&"M"===v[0]&&(b[0]=["L",v[1],v[2]]);let S=y.concat(b);S.length&&S.push(["Z"]);let C=o.call(this,c,!1,m);return this.chart.series.length>1&&h&&c.some(t=>t.isCliff)&&(S.hasStackedCliffs=C.hasStackedCliffs=!0),S.xMap=y.xMap,this.areaPath=S,C}getStackPoints(t){let e=this,i=[],s=[],r=this.xAxis,o=this.yAxis,h=o.stacking.stacks[this.stackKey],l={},d=o.series,c=d.length,p=o.options.reversedStacks?1:-1,u=d.indexOf(e);if(t=t||this.points,this.options.stacking){for(let e=0;e<t.length;e++)t[e].leftNull=t[e].rightNull=void 0,l[t[e].x]=t[e];n(h,function(t,e){null!==t.total&&s.push(e)}),s.sort(function(t,e){return t-e});let g=d.map(t=>t.visible);s.forEach(function(t,n){let f=0,m,x;if(l[t]&&!l[t].isNull)i.push(l[t]),[-1,1].forEach(function(i){let r=1===i?"rightNull":"leftNull",o=h[s[n+i]],a=0;if(o){let i=u;for(;i>=0&&i<c;){let s=d[i].index;!(m=o.points[s])&&(s===e.index?l[t][r]=!0:g[i]&&(x=h[t].points[s])&&(a-=x[1]-x[0])),i+=p}}l[t][1===i?"rightCliff":"leftCliff"]=a});else{let e=u;for(;e>=0&&e<c;){let i=d[e].index;if(m=h[t].points[i]){f=m[1];break}e+=p}f=a(f,0),f=o.translate(f,0,1,0,1),i.push({isNull:!0,plotX:r.translate(t,0,0,0,1),x:t,plotY:f,yBottom:f})}})}return i}}return h.defaultOptions=o(s.defaultOptions,t),r(h.prototype,{singleStacks:!1}),e.registerSeriesType("area",h),h}),i(e,"Series/Spline/SplineSeries.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{line:i}=t.seriesTypes,{merge:s,pick:r}=e;class o extends i{getPointSpline(t,e,i){let s,o,n,a;let h=e.plotX||0,l=e.plotY||0,d=t[i-1],c=t[i+1];function p(t){return t&&!t.isNull&&!1!==t.doCurve&&!e.isCliff}if(p(d)&&p(c)){let t=d.plotX||0,i=d.plotY||0,r=c.plotX||0,p=c.plotY||0,u=0;s=(1.5*h+t)/2.5,o=(1.5*l+i)/2.5,n=(1.5*h+r)/2.5,a=(1.5*l+p)/2.5,n!==s&&(u=(a-o)*(n-h)/(n-s)+l-a),o+=u,a+=u,o>i&&o>l?(o=Math.max(i,l),a=2*l-o):o<i&&o<l&&(o=Math.min(i,l),a=2*l-o),a>p&&a>l?(a=Math.max(p,l),o=2*l-a):a<p&&a<l&&(a=Math.min(p,l),o=2*l-a),e.rightContX=n,e.rightContY=a,e.controlPoints={low:[s,o],high:[n,a]}}let u=["C",r(d.rightContX,d.plotX,0),r(d.rightContY,d.plotY,0),r(s,h,0),r(o,l,0),h,l];return d.rightContX=d.rightContY=void 0,u}}return o.defaultOptions=s(i.defaultOptions),t.registerSeriesType("spline",o),o}),i(e,"Series/AreaSpline/AreaSplineSeries.js",[e["Series/Spline/SplineSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{area:s,area:{prototype:r}}=e.seriesTypes,{extend:o,merge:n}=i;class a extends t{}return a.defaultOptions=n(t.defaultOptions,s.defaultOptions),o(a.prototype,{getGraphPath:r.getGraphPath,getStackPoints:r.getStackPoints,drawGraph:r.drawGraph}),e.registerSeriesType("areaspline",a),a}),i(e,"Series/Column/ColumnSeriesDefaults.js",[],function(){return{borderRadius:3,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}}),i(e,"Series/Column/ColumnSeries.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Color/Color.js"],e["Series/Column/ColumnSeriesDefaults.js"],e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o,n){let{animObject:a}=t,{parse:h}=e,{noop:l}=s,{clamp:d,crisp:c,defined:p,extend:u,fireEvent:g,isArray:f,isNumber:m,merge:x,pick:y,objectEach:b}=n;class v extends r{animate(t){let e,i;let s=this,r=this.yAxis,o=r.pos,n=r.reversed,h=s.options,{clipOffset:l,inverted:c}=this.chart,p={},g=c?"translateX":"translateY";t&&l?(p.scaleY=.001,i=d(r.toPixels(h.threshold),o,o+r.len),c?(i+=n?-Math.floor(l[0]):Math.ceil(l[2]),p.translateX=i-r.len):(i+=n?Math.ceil(l[0]):-Math.floor(l[2]),p.translateY=i),s.clipBox&&s.setClip(),s.group.attr(p)):(e=Number(s.group.attr(g)),s.group.animate({scaleY:1},u(a(s.options.animation),{step:function(t,i){s.group&&(p[g]=e+i.pos*(o-e),s.group.attr(p))}})))}init(t,e){super.init.apply(this,arguments);let i=this;(t=i.chart).hasRendered&&t.series.forEach(function(t){t.type===i.type&&(t.isDirty=!0)})}getColumnMetrics(){let t=this,e=t.options,i=t.xAxis,s=t.yAxis,r=i.options.reversedStacks,o=i.reversed&&!r||!i.reversed&&r,n={},a,h=0;!1===e.grouping?h=1:t.chart.series.forEach(function(e){let i;let r=e.yAxis,o=e.options;e.type===t.type&&e.reserveSpace()&&s.len===r.len&&s.pos===r.pos&&(o.stacking&&"group"!==o.stacking?(void 0===n[a=e.stackKey]&&(n[a]=h++),i=n[a]):!1!==o.grouping&&(i=h++),e.columnIndex=i)});let l=Math.min(Math.abs(i.transA)*(!i.brokenAxis?.hasBreaks&&i.ordinal?.slope||e.pointRange||i.closestPointRange||i.tickInterval||1),i.len),d=l*e.groupPadding,c=(l-2*d)/(h||1),p=Math.min(e.maxPointWidth||i.len,y(e.pointWidth,c*(1-2*e.pointPadding))),u=(t.columnIndex||0)+(o?1:0);return t.columnMetrics={width:p,offset:(c-p)/2+(d+u*c-l/2)*(o?-1:1),paddedWidth:c,columnCount:h},t.columnMetrics}crispCol(t,e,i,s){let r=this.borderWidth,o=this.chart.inverted;return s=c(e+s,r,o)-(e=c(e,r,o)),this.options.crisp&&(i=c(t+i,r)-(t=c(t,r))),{x:t,y:e,width:i,height:s}}adjustForMissingColumns(t,e,i,s){if(!i.isNull&&s.columnCount>1){let r=this.xAxis.series.filter(t=>t.visible).map(t=>t.index),o=0,n=0;b(this.xAxis.stacking?.stacks,t=>{if("number"==typeof i.x){let e=t[i.x.toString()];if(e&&f(e.points[this.index])){let t=Object.keys(e.points).filter(t=>!t.match(",")&&e.points[t]&&e.points[t].length>1).map(parseFloat).filter(t=>-1!==r.indexOf(t)).sort((t,e)=>e-t);o=t.indexOf(this.index),n=t.length}}}),o=this.xAxis.reversed?n-1-o:o;let a=(n-1)*s.paddedWidth+e;t=(i.plotX||0)+a/2-e-o*s.paddedWidth}return t}translate(){let t=this,e=t.chart,i=t.options,s=t.dense=t.closestPointRange*t.xAxis.transA<2,o=t.borderWidth=y(i.borderWidth,s?0:1),n=t.xAxis,a=t.yAxis,h=i.threshold,l=y(i.minPointLength,5),c=t.getColumnMetrics(),u=c.width,f=t.pointXOffset=c.offset,x=t.dataMin,b=t.dataMax,v=t.translatedThreshold=a.getThreshold(h),S=t.barW=Math.max(u,1+2*o);i.pointPadding&&(S=Math.ceil(S)),r.prototype.translate.apply(t),t.points.forEach(function(s){let r=y(s.yBottom,v),o=999+Math.abs(r),g=s.plotX||0,C=d(s.plotY,-o,a.len+o),k,M=Math.min(C,r),w=Math.max(C,r)-M,T=u,A=g+f,P=S;l&&Math.abs(w)<l&&(w=l,k=!a.reversed&&!s.negative||a.reversed&&s.negative,m(h)&&m(b)&&s.y===h&&b<=h&&(a.min||0)<h&&(x!==b||(a.max||0)<=h)&&(k=!k,s.negative=!s.negative),M=Math.abs(M-v)>l?r-l:v-(k?l:0)),p(s.options.pointWidth)&&(A-=Math.round(((T=P=Math.ceil(s.options.pointWidth))-u)/2)),i.centerInCategory&&!i.stacking&&(A=t.adjustForMissingColumns(A,T,s,c)),s.barX=A,s.pointWidth=T,s.tooltipPos=e.inverted?[d(a.len+a.pos-e.plotLeft-C,a.pos-e.plotLeft,a.len+a.pos-e.plotLeft),n.len+n.pos-e.plotTop-A-P/2,w]:[n.left-e.plotLeft+A+P/2,d(C+a.pos-e.plotTop,a.pos-e.plotTop,a.len+a.pos-e.plotTop),w],s.shapeType=t.pointClass.prototype.shapeType||"roundedRect",s.shapeArgs=t.crispCol(A,s.isNull?v:M,P,s.isNull?0:w)}),g(this,"afterColumnTranslate")}drawGraph(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}pointAttribs(t,e){let i=this.options,s=this.pointAttrToOptions||{},r=s.stroke||"borderColor",o=s["stroke-width"]||"borderWidth",n,a,l,d=t&&t.color||this.color,c=t&&t[r]||i[r]||d,p=t&&t.options.dashStyle||i.dashStyle,u=t&&t[o]||i[o]||this[o]||0,g=y(t&&t.opacity,i.opacity,1);t&&this.zones.length&&(a=t.getZone(),d=t.options.color||a&&(a.color||t.nonZonedColor)||this.color,a&&(c=a.borderColor||c,p=a.dashStyle||p,u=a.borderWidth||u)),e&&t&&(l=(n=x(i.states[e],t.options.states&&t.options.states[e]||{})).brightness,d=n.color||void 0!==l&&h(d).brighten(n.brightness).get()||d,c=n[r]||c,u=n[o]||u,p=n.dashStyle||p,g=y(n.opacity,g));let f={fill:d,stroke:c,"stroke-width":u,opacity:g};return p&&(f.dashstyle=p),f}drawPoints(t=this.points){let e;let i=this,s=this.chart,r=i.options,o=s.renderer,n=r.animationLimit||250;t.forEach(function(t){let a=t.plotY,h=t.graphic,l=!!h,d=h&&s.pointCount<n?"animate":"attr";m(a)&&null!==t.y?(e=t.shapeArgs,h&&t.hasNewShapeType()&&(h=h.destroy()),i.enabledDataSorting&&(t.startXPos=i.xAxis.reversed?-(e&&e.width||0):i.xAxis.width),!h&&(t.graphic=h=o[t.shapeType](e).add(t.group||i.group),h&&i.enabledDataSorting&&s.hasRendered&&s.pointCount<n&&(h.attr({x:t.startXPos}),l=!0,d="animate")),h&&l&&h[d](x(e)),s.styledMode||h[d](i.pointAttribs(t,t.selected&&"select")).shadow(!1!==t.allowShadow&&r.shadow),h&&(h.addClass(t.getClassName(),!0),h.attr({visibility:t.visible?"inherit":"hidden"}))):h&&(t.graphic=h.destroy())})}drawTracker(t=this.points){let e;let i=this,s=i.chart,r=s.pointer,o=function(t){let e=r?.getPointFromEvent(t);r&&e&&i.options.enableMouseTracking&&(r.isDirectTouch=!0,e.onMouseOver(t))};t.forEach(function(t){e=f(t.dataLabels)?t.dataLabels:t.dataLabel?[t.dataLabel]:[],t.graphic&&(t.graphic.element.point=t),e.forEach(function(e){(e.div||e.element).point=t})}),i._hasTracking||(i.trackerGroups.forEach(function(t){i[t]&&(i[t].addClass("highcharts-tracker").on("mouseover",o).on("mouseout",function(t){r?.onTrackerMouseOut(t)}).on("touchstart",o),!s.styledMode&&i.options.cursor&&i[t].css({cursor:i.options.cursor}))}),i._hasTracking=!0),g(this,"afterDrawTracker")}remove(){let t=this,e=t.chart;e.hasRendered&&e.series.forEach(function(e){e.type===t.type&&(e.isDirty=!0)}),r.prototype.remove.apply(t,arguments)}}return v.defaultOptions=x(r.defaultOptions,i),u(v.prototype,{directTouch:!0,getSymbol:l,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),o.registerSeriesType("column",v),v}),i(e,"Core/Series/DataLabel.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e,i){var s;let{getDeferredAnimation:r}=t,{format:o}=e,{defined:n,extend:a,fireEvent:h,isArray:l,isString:d,merge:c,objectEach:p,pick:u,pInt:g,splat:f}=i;return function(t){function e(){return v(this).some(t=>t?.enabled)}function i(t,e,i,s,r){let{chart:o,enabledDataSorting:h}=this,l=this.isCartesian&&o.inverted,d=t.plotX,p=t.plotY,g=i.rotation||0,f=n(d)&&n(p)&&o.isInsidePlot(d,Math.round(p),{inverted:l,paneCoordinates:!0,series:this}),m=0===g&&"justify"===u(i.overflow,h?"none":"justify"),x=this.visible&&!1!==t.visible&&n(d)&&(t.series.forceDL||h&&!m||f||u(i.inside,!!this.options.stacking)&&s&&o.isInsidePlot(d,l?s.x+1:s.y+s.height-1,{inverted:l,paneCoordinates:!0,series:this})),y=t.pos();if(x&&y){var b;let n=e.getBBox(),d=e.getBBox(void 0,0),p={right:1,center:.5}[i.align||0]||0,v={bottom:1,middle:.5}[i.verticalAlign||0]||0;if(s=a({x:y[0],y:Math.round(y[1]),width:0,height:0},s||{}),"plotEdges"===i.alignTo&&this.isCartesian&&(s[l?"x":"y"]=0,s[l?"width":"height"]=this.yAxis?.len||0),a(i,{width:n.width,height:n.height}),b=s,h&&this.xAxis&&!m&&this.setDataLabelStartPos(t,e,r,f,b),e.align(c(i,{width:d.width,height:d.height}),!1,s,!1),e.alignAttr.x+=p*(d.width-n.width),e.alignAttr.y+=v*(d.height-n.height),e[e.placed?"animate":"attr"]({x:e.alignAttr.x+(n.width-d.width)/2,y:e.alignAttr.y+(n.height-d.height)/2,rotationOriginX:(e.width||0)/2,rotationOriginY:(e.height||0)/2}),m&&s.height>=0)this.justifyDataLabel(e,i,e.alignAttr,n,s,r);else if(u(i.crop,!0)){let{x:t,y:i}=e.alignAttr;x=o.isInsidePlot(t,i,{paneCoordinates:!0,series:this})&&o.isInsidePlot(t+n.width-1,i+n.height-1,{paneCoordinates:!0,series:this})}i.shape&&!g&&e[r?"attr":"animate"]({anchorX:y[0],anchorY:y[1]})}r&&h&&(e.placed=!1),x||h&&!m?(e.show(),e.placed=!0):(e.hide(),e.placed=!1)}function s(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6)}function m(t){let e=this.hasRendered||0,i=this.initDataLabelsGroup().attr({opacity:+e});return!e&&i&&(this.visible&&i.show(),this.options.animation?i.animate({opacity:1},t):i.attr({opacity:1})),i}function x(t){let e;t=t||this.points;let i=this,s=i.chart,a=i.options,l=s.renderer,{backgroundColor:c,plotBackgroundColor:m}=s.options.chart,x=l.getContrast(d(m)&&m||d(c)&&c||"#000000"),y=v(i),{animation:S,defer:C}=y[0],k=C?r(s,S,i):{defer:0,duration:0};h(this,"drawDataLabels"),i.hasDataLabels?.()&&(e=this.initDataLabels(k),t.forEach(t=>{let r=t.dataLabels||[];f(b(y,t.dlOptions||t.options?.dataLabels)).forEach((c,f)=>{let m=c.enabled&&(t.visible||t.dataLabelOnHidden)&&(!t.isNull||t.dataLabelOnNull)&&function(t,e){let i=e.filter;if(i){let e=i.operator,s=t[i.property],r=i.value;return">"===e&&s>r||"<"===e&&s<r||">="===e&&s>=r||"<="===e&&s<=r||"=="===e&&s==r||"==="===e&&s===r||"!="===e&&s!=r||"!=="===e&&s!==r}return!0}(t,c),{backgroundColor:y,borderColor:b,distance:v,style:S={}}=c,C,k,M,w,T={},A=r[f],P=!A,L;m&&(k=u(c[t.formatPrefix+"Format"],c.format),C=t.getLabelConfig(),M=n(k)?o(k,C,s):(c[t.formatPrefix+"Formatter"]||c.formatter).call(C,c),w=c.rotation,!s.styledMode&&(S.color=u(c.color,S.color,d(i.color)?i.color:void 0,"#000000"),"contrast"===S.color?("none"!==y&&(L=y),t.contrastColor=l.getContrast("auto"!==L&&L||t.color||i.color),S.color=L||!n(v)&&c.inside||0>g(v||0)||a.stacking?t.contrastColor:x):delete t.contrastColor,a.cursor&&(S.cursor=a.cursor)),T={r:c.borderRadius||0,rotation:w,padding:c.padding,zIndex:1},s.styledMode||(T.fill="auto"===y?t.color:y,T.stroke="auto"===b?t.color:b,T["stroke-width"]=c.borderWidth),p(T,(t,e)=>{void 0===t&&delete T[e]})),!A||m&&n(M)&&!!A.div==!!c.useHTML&&(A.rotation&&c.rotation||A.rotation===c.rotation)||(A=void 0,P=!0),m&&n(M)&&(A?T.text=M:(A=l.label(M,0,0,c.shape,void 0,void 0,c.useHTML,void 0,"data-label")).addClass(" highcharts-data-label-color-"+t.colorIndex+" "+(c.className||"")+(c.useHTML?" highcharts-tracker":"")),A&&(A.options=c,A.attr(T),s.styledMode?S.width&&A.css({width:S.width,textOverflow:S.textOverflow}):A.css(S).shadow(c.shadow),h(A,"beforeAddingDataLabel",{labelOptions:c,point:t}),A.added||A.add(e),i.alignDataLabel(t,A,c,void 0,P),A.isActive=!0,r[f]&&r[f]!==A&&r[f].destroy(),r[f]=A))});let c=r.length;for(;c--;)r[c]&&r[c].isActive?r[c].isActive=!1:(r[c]?.destroy(),r.splice(c,1));t.dataLabel=r[0],t.dataLabels=r})),h(this,"afterDrawDataLabels")}function y(t,e,i,s,r,o){let n=this.chart,a=e.align,h=e.verticalAlign,l=t.box?0:t.padding||0,d=n.inverted?this.yAxis:this.xAxis,c=d?d.left-n.plotLeft:0,p=n.inverted?this.xAxis:this.yAxis,u=p?p.top-n.plotTop:0,{x:g=0,y:f=0}=e,m,x;return(m=(i.x||0)+l+c)<0&&("right"===a&&g>=0?(e.align="left",e.inside=!0):g-=m,x=!0),(m=(i.x||0)+s.width-l+c)>n.plotWidth&&("left"===a&&g<=0?(e.align="right",e.inside=!0):g+=n.plotWidth-m,x=!0),(m=i.y+l+u)<0&&("bottom"===h&&f>=0?(e.verticalAlign="top",e.inside=!0):f-=m,x=!0),(m=(i.y||0)+s.height-l+u)>n.plotHeight&&("top"===h&&f<=0?(e.verticalAlign="bottom",e.inside=!0):f+=n.plotHeight-m,x=!0),x&&(e.x=g,e.y=f,t.placed=!o,t.align(e,void 0,r)),x}function b(t,e){let i=[],s;if(l(t)&&!l(e))i=t.map(function(t){return c(t,e)});else if(l(e)&&!l(t))i=e.map(function(e){return c(t,e)});else if(l(t)||l(e)){if(l(t)&&l(e))for(s=Math.max(t.length,e.length);s--;)i[s]=c(t[s],e[s])}else i=c(t,e);return i}function v(t){let e=t.chart.options.plotOptions;return f(b(b(e?.series?.dataLabels,e?.[t.type]?.dataLabels),t.options.dataLabels))}function S(t,e,i,s,r){let o=this.chart,n=o.inverted,a=this.xAxis,h=a.reversed,l=((n?e.height:e.width)||0)/2,d=t.pointWidth,c=d?d/2:0;e.startXPos=n?r.x:h?-l-c:a.width-l+c,e.startYPos=n?h?this.yAxis.height-l+c:-l-c:r.y,s?"hidden"===e.visibility&&(e.show(),e.attr({opacity:0}).animate({opacity:1})):e.attr({opacity:1}).animate({opacity:0}
64820,void 0,e.hide),o.hasRendered&&(i&&e.attr({x:e.startXPos,y:e.startYPos}),e.placed=!0)}t.compose=function(t){let r=t.prototype;r.initDataLabels||(r.initDataLabels=m,r.initDataLabelsGroup=s,r.alignDataLabel=i,r.drawDataLabels=x,r.justifyDataLabel=y,r.setDataLabelStartPos=S,r.hasDataLabels=e)}}(s||(s={})),s}),i(e,"Series/Column/ColumnDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,s){var r;let{composed:o}=e,{series:n}=i,{merge:a,pick:h,pushUnique:l}=s;return function(e){function i(t,e,i,s,r){let o=this.chart.inverted,l=t.series,d=(l.xAxis?l.xAxis.len:this.chart.plotSizeX)||0,c=(l.yAxis?l.yAxis.len:this.chart.plotSizeY)||0,p=t.dlBox||t.shapeArgs,u=h(t.below,t.plotY>h(this.translatedThreshold,c)),g=h(i.inside,!!this.options.stacking);if(p){if(s=a(p),!("allow"===i.overflow&&!1===i.crop)){s.y<0&&(s.height+=s.y,s.y=0);let t=s.y+s.height-c;t>0&&t<s.height-1&&(s.height-=t)}o&&(s={x:c-s.y-s.height,y:d-s.x-s.width,width:s.height,height:s.width}),g||(o?(s.x+=u?0:s.width,s.width=0):(s.y+=u?s.height:0,s.height=0))}i.align=h(i.align,!o||g?"center":u?"right":"left"),i.verticalAlign=h(i.verticalAlign,o||g?"middle":u?"top":"bottom"),n.prototype.alignDataLabel.call(this,t,e,i,s,r),i.inside&&t.contrastColor&&e.css({color:t.contrastColor})}e.compose=function(e){t.compose(n),l(o,"ColumnDataLabel")&&(e.prototype.alignDataLabel=i)}}(r||(r={})),r}),i(e,"Series/Bar/BarSeries.js",[e["Series/Column/ColumnSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{extend:s,merge:r}=i;class o extends t{}return o.defaultOptions=r(t.defaultOptions,{}),s(o.prototype,{inverted:!0}),e.registerSeriesType("bar",o),o}),i(e,"Series/Scatter/ScatterSeriesDefaults.js",[],function(){return{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">â</span> <span style="font-size: 0.8em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}}),i(e,"Series/Scatter/ScatterSeries.js",[e["Series/Scatter/ScatterSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{column:s,line:r}=e.seriesTypes,{addEvent:o,extend:n,merge:a}=i;class h extends r{applyJitter(){let t=this,e=this.options.jitter,i=this.points.length;e&&this.points.forEach(function(s,r){["x","y"].forEach(function(o,n){if(e[o]&&!s.isNull){let a=`plot${o.toUpperCase()}`,h=t[`${o}Axis`],l=e[o]*h.transA;if(h&&!h.logarithmic){let t=Math.max(0,(s[a]||0)-l),e=Math.min(h.len,(s[a]||0)+l);s[a]=t+(e-t)*function(t){let e=1e4*Math.sin(t);return e-Math.floor(e)}(r+n*i),"x"===o&&(s.clientX=s.plotX)}}})})}drawGraph(){this.options.lineWidth?super.drawGraph():this.graph&&(this.graph=this.graph.destroy())}}return h.defaultOptions=a(r.defaultOptions,t),n(h.prototype,{drawTracker:s.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"]}),o(h,"afterTranslate",function(){this.applyJitter()}),e.registerSeriesType("scatter",h),h}),i(e,"Series/CenteredUtilities.js",[e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Utilities.js"]],function(t,e,i){var s,r;let{deg2rad:o}=t,{fireEvent:n,isNumber:a,pick:h,relativeLength:l}=i;return(r=s||(s={})).getCenter=function(){let t=this.options,i=this.chart,s=2*(t.slicedOffset||0),r=i.plotWidth-2*s,o=i.plotHeight-2*s,d=t.center,c=Math.min(r,o),p=t.thickness,u,g=t.size,f=t.innerSize||0,m,x;"string"==typeof g&&(g=parseFloat(g)),"string"==typeof f&&(f=parseFloat(f));let y=[h(d[0],"50%"),h(d[1],"50%"),h(g&&g<0?void 0:t.size,"100%"),h(f&&f<0?void 0:t.innerSize||0,"0%")];for(!i.angular||this instanceof e||(y[3]=0),m=0;m<4;++m)x=y[m],u=m<2||2===m&&/%$/.test(x),y[m]=l(x,[r,o,c,y[2]][m])+(u?s:0);return y[3]>y[2]&&(y[3]=y[2]),a(p)&&2*p<y[2]&&p>0&&(y[3]=y[2]-2*p),n(this,"afterGetCenter",{positions:y}),y},r.getStartAndEndRadians=function(t,e){let i=a(t)?t:0,s=a(e)&&e>i&&e-i<360?e:i+360;return{start:o*(i+-90),end:o*(s+-90)}},s}
vendor: 4,468 bytes, line 64820
64820),i(e,"Series/Pie/PiePoint.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(t,e,i){let{setAnimation:s}=t,{addEvent:r,defined:o,extend:n,isNumber:a,pick:h,relativeLength:l}=i;class d extends e{getConnectorPath(t){let e=t.dataLabelPosition,i=t.options||{},s=i.connectorShape,r=this.connectorShapes[s]||s;return e&&r.call(this,{...e.computed,alignment:e.alignment},e.connectorPosition,i)||[]}getTranslate(){return this.sliced&&this.slicedTranslation||{translateX:0,translateY:0}}haloPath(t){let e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:e.r-1,start:e.start,end:e.end,borderRadius:e.borderRadius})}constructor(t,e,i){super(t,e,i),this.half=0,this.name??(this.name="Slice");let s=t=>{this.slice("select"===t.type)};r(this,"select",s),r(this,"unselect",s)}isValid(){return a(this.y)&&this.y>=0}setVisible(t,e=!0){t!==this.visible&&this.update({visible:t??!this.visible},e,void 0,!1)}slice(t,e,i){let r=this.series;s(i,r.chart),e=h(e,!0),this.sliced=this.options.sliced=t=o(t)?t:!this.sliced,r.options.data[r.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())}}return n(d.prototype,{connectorShapes:{fixedOffset:function(t,e,i){let s=e.breakAt,r=e.touchingSliceAt,o=i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*s.x-r.x,2*s.y-r.y,s.x,s.y]:["L",s.x,s.y];return[["M",t.x,t.y],o,["L",r.x,r.y]]},straight:function(t,e){let i=e.touchingSliceAt;return[["M",t.x,t.y],["L",i.x,i.y]]},crookedLine:function(t,e,i){let{breakAt:s,touchingSliceAt:r}=e,{series:o}=this,[n,a,h]=o.center,d=h/2,{plotLeft:c,plotWidth:p}=o.chart,u="left"===t.alignment,{x:g,y:f}=t,m=s.x;if(i.crookDistance){let t=l(i.crookDistance,1);m=u?n+d+(p+c-n-d)*(1-t):c+(n-d)*t}else m=n+(a-f)*Math.tan((this.angle||0)-Math.PI/2);let x=[["M",g,f]];return(u?m<=g&&m>=s.x:m>=g&&m<=s.x)&&x.push(["L",m,f]),x.push(["L",s.x,s.y],["L",r.x,r.y]),x}}}),d}),i(e,"Series/Pie/PieSeriesDefaults.js",[],function(){return{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}}),i(e,"Series/Pie/PieSeries.js",[e["Series/CenteredUtilities.js"],e["Series/Column/ColumnSeries.js"],e["Core/Globals.js"],e["Series/Pie/PiePoint.js"],e["Series/Pie/PieSeriesDefaults.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o,n,a,h){let{getStartAndEndRadians:l}=t,{noop:d}=i,{clamp:c,extend:p,fireEvent:u,merge:g,pick:f}=h;class m extends o{animate(t){let e=this,i=e.points,s=e.startAngleRad;t||i.forEach(function(t){let i=t.graphic,r=t.shapeArgs;i&&r&&(i.attr({r:f(t.startR,e.center&&e.center[3]/2),start:s,end:s}),i.animate({r:r.r,start:r.start,end:r.end},e.options.animation))})}drawEmpty(){let t,e;let i=this.startAngleRad,s=this.endAngleRad,r=this.options;0===this.total&&this.center?(t=this.center[0],e=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(t,e,this.center[1]/2,0,i,s).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:a.arc(t,e,this.center[2]/2,0,{start:i,end:s,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":r.borderWidth,fill:r.fillColor||"none",stroke:r.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())}drawPoints(){let t=this.chart.renderer;this.points.forEach(function(e){e.graphic&&e.hasNewShapeType()&&(e.graphic=e.graphic.destroy()),e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)})}generatePoints(){super.generatePoints(),this.updateTotals()}getX(t,e,i,s){let r=this.center,o=this.radii?this.radii[i.index]||0:r[2]/2,n=s.dataLabelPosition,a=n?.distance||0,h=Math.asin(c((t-r[1])/(o+a),-1,1));return r[0]+Math.cos(h)*(o+a)*(e?-1:1)+(a>0?(e?-1:1)*(s.padding||0):0)}hasData(){return!!this.processedXData.length}redrawPoints(){let t,e,i,s;let r=this,o=r.chart;this.drawEmpty(),r.group&&!o.styledMode&&r.group.shadow(r.options.shadow),r.points.forEac
vendor: 3,064 bytes, line 64820
64820h(function(n){let a={};e=n.graphic,!n.isNull&&e?(s=n.shapeArgs,t=n.getTranslate(),o.styledMode||(i=r.pointAttribs(n,n.selected&&"select")),n.delayedRendering?(e.setRadialReference(r.center).attr(s).attr(t),o.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}),n.delayedRendering=!1):(e.setRadialReference(r.center),o.styledMode||g(!0,a,i),g(!0,a,s,t),e.animate(a)),e.attr({visibility:n.visible?"inherit":"hidden"}),e.addClass(n.getClassName(),!0)):e&&(n.graphic=e.destroy())})}sortByAngle(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})}translate(t){u(this,"translate"),this.generatePoints();let e=this.options,i=e.slicedOffset,s=l(e.startAngle,e.endAngle),r=this.startAngleRad=s.start,o=(this.endAngleRad=s.end)-r,n=this.points,a=e.ignoreHiddenPoint,h=n.length,d,c,p,g,f,m,x,y=0;for(t||(this.center=t=this.getCenter()),m=0;m<h;m++){x=n[m],d=r+y*o,x.isValid()&&(!a||x.visible)&&(y+=x.percentage/100),c=r+y*o;let e={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:Math.round(1e3*d)/1e3,end:Math.round(1e3*c)/1e3};x.shapeType="arc",x.shapeArgs=e,(p=(c+d)/2)>1.5*Math.PI?p-=2*Math.PI:p<-Math.PI/2&&(p+=2*Math.PI),x.slicedTranslation={translateX:Math.round(Math.cos(p)*i),translateY:Math.round(Math.sin(p)*i)},g=Math.cos(p)*t[2]/2,f=Math.sin(p)*t[2]/2,x.tooltipPos=[t[0]+.7*g,t[1]+.7*f],x.half=p<-Math.PI/2||p>Math.PI/2?1:0,x.angle=p}u(this,"afterTranslate")}updateTotals(){let t=this.points,e=t.length,i=this.options.ignoreHiddenPoint,s,r,o=0;for(s=0;s<e;s++)(r=t[s]).isValid()&&(!i||r.visible)&&(o+=r.y);for(s=0,this.total=o;s<e;s++)(r=t[s]).percentage=o>0&&(r.visible||!i)?r.y/o*100:0,r.total=o}}return m.defaultOptions=g(o.defaultOptions,r),p(m.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:e.prototype.drawTracker,getCenter:t.getCenter,getSymbol:d,invertible:!1,isCartesian:!1,noSharedTooltip:!0,pointAttribs:e.prototype.pointAttribs,pointClass:s,requireSorting:!1,searchPoint:d,trackerGroups:["group","dataLabelsGroup"]}),n.registerSeriesType("pie",m),m}),i(e,"Series/Pie/PieDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,s,r){var o;let{composed:n,noop:a}=e,{distribute:h}=i,{series:l}=s,{arrayMax:d,clamp:c,defined:p,pick:u,pushUnique:g,relativeLength:f}=r;return function(e){let i={radialDistributionY:function(t,e){return(e.dataLabelPosition?.top||0)+t.distributeBox.pos},radialDistributionX:function(t,e,i,s,r){let o=r.dataLabelPosition;return t.getX(i<(o?.top||0)+2||i>(o?.bottom||0)-2?s:i,e.half,e,r)},justify:function(t,e,i,s){return s[0]+(t.half?-1:1)*(i+(e.dataLabelPosition?.distance||0))},alignToPlotEdges:function(t,e,i,s){let r=t.getBBox().width;return e?r+s:i-r-s},alignToConnectors:function(t,e,i,s){let r=0,o;return t.forEach(function(t){(o=t.dataLabel.getBBox().width)>r&&(r=o)}),e?r+s:i-r-s}};function s(t,e){let{center:i,options:s}=this,r=i[2]/2,o=t.angle||0,n=Math.cos(o),a=Math.sin(o),h=i[0]+n*r,l=i[1]+a*r,d=Math.min((s.slicedOffset||0)+(s.borderWidth||0),e/5);
vendor: 4,374 bytes, line 64820
64820return{natural:{x:h+n*e,y:l+a*e},computed:{},alignment:e<0?"center":t.half?"right":"left",connectorPosition:{breakAt:{x:h+n*d,y:l+a*d},touchingSliceAt:{x:h,y:l}},distance:e}}function r(){let t=this,e=t.points,i=t.chart,s=i.plotWidth,r=i.plotHeight,o=i.plotLeft,n=Math.round(i.chartWidth/3),a=t.center,c=a[2]/2,g=a[1],m=[[],[]],x=[0,0,0,0],y=t.dataLabelPositioners,b,v,S,C=0;t.visible&&t.hasDataLabels?.()&&(e.forEach(t=>{(t.dataLabels||[]).forEach(t=>{t.shortened&&(t.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.shortened=!1)})}),l.prototype.drawDataLabels.apply(t),e.forEach(t=>{(t.dataLabels||[]).forEach((e,i)=>{let s=a[2]/2,r=e.options,o=f(r?.distance||0,s);0===i&&m[t.half].push(t),!p(r?.style?.width)&&e.getBBox().width>n&&(e.css({width:Math.round(.7*n)+"px"}),e.shortened=!0),e.dataLabelPosition=this.getDataLabelPosition(t,o),C=Math.max(C,o)})}),m.forEach((e,n)=>{let l=e.length,d=[],f,m,b=0,k;l&&(t.sortByAngle(e,n-.5),C>0&&(f=Math.max(0,g-c-C),m=Math.min(g+c+C,i.plotHeight),e.forEach(t=>{(t.dataLabels||[]).forEach(e=>{let s=e.dataLabelPosition;s&&s.distance>0&&(s.top=Math.max(0,g-c-s.distance),s.bottom=Math.min(g+c+s.distance,i.plotHeight),b=e.getBBox().height||21,e.lineHeight=i.renderer.fontMetrics(e.text||e).h+2*e.padding,t.distributeBox={target:(e.dataLabelPosition?.natural.y||0)-s.top+e.lineHeight/2,size:b,rank:t.y},d.push(t.distributeBox))})}),h(d,k=m+b-f,k/5)),e.forEach(i=>{(i.dataLabels||[]).forEach(h=>{let l=h.options||{},g=i.distributeBox,f=h.dataLabelPosition,m=f?.natural.y||0,b=l.connectorPadding||0,C=h.lineHeight||21,k=(C-h.getBBox().height)/2,M=0,w=m,T="inherit";if(f){if(d&&p(g)&&f.distance>0&&(void 0===g.pos?T="hidden":(S=g.size,w=y.radialDistributionY(i,h))),l.justify)M=y.justify(i,h,c,a);else switch(l.alignTo){case"connectors":M=y.alignToConnectors(e,n,s,o);break;case"plotEdges":M=y.alignToPlotEdges(h,n,s,o);break;default:M=y.radialDistributionX(t,i,w-k,m,h)}if(f.attribs={visibility:T,align:f.alignment},f.posAttribs={x:M+(l.x||0)+(({left:b,right:-b})[f.alignment]||0),y:w+(l.y||0)-C/2},f.computed.x=M,f.computed.y=w-k,u(l.crop,!0)){let t;M-(v=h.getBBox().width)<b&&1===n?(t=Math.round(v-M+b),x[3]=Math.max(t,x[3])):M+v>s-b&&0===n&&(t=Math.round(M+v-s+b),x[1]=Math.max(t,x[1])),w-S/2<0?x[0]=Math.max(Math.round(-w+S/2),x[0]):w+S/2>r&&(x[2]=Math.max(Math.round(w+S/2-r),x[2])),f.sideOverflow=t}}})}))}),(0===d(x)||this.verifyDataLabelOverflow(x))&&(this.placeDataLabels(),this.points.forEach(e=>{(e.dataLabels||[]).forEach(s=>{let{connectorColor:r,connectorWidth:o=1}=s.options||{},n=s.dataLabelPosition;if(o){let a;b=s.connector,n&&n.distance>0?(a=!b,b||(s.connector=b=i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+e.colorIndex+(e.className?" "+e.className:"")).add(t.dataLabelsGroup)),i.styledMode||b.attr({"stroke-width":o,stroke:r||e.color||"#666666"}),b[a?"attr":"animate"]({d:e.getConnectorPath(s)}),b.attr({visibility:n.attribs?.visibility})):b&&(s.connector=b.destroy())}})})))}function o(){this.points.forEach(t=>{(t.dataLabels||[]).forEach(t=>{let e=t.dataLabelPosition;e?(e.sideOverflow&&(t.css({width:Math.max(t.getBBox().width-e.sideOverflow,0)+"px",textOverflow:(t.options?.style||{}).textOverflow||"ellipsis"}),t.shortened=!0),t.attr(e.attribs),t[t.moved?"animate":"attr"](e.posAttribs),t.moved=!0):t&&t.attr({y:-9999})}),delete t.distributeBox},this)}function m(t){let e=this.center,i=this.options,s=i.center,r=i.minSize||80,o=r,n=null!==i.size;return!n&&(null!==s[0]?o=Math.max(e[2]-Math.max(t[1],t[3]),r):(o=Math.max(e[2]-t[1]-t[3],r),e[0]+=(t[3]-t[1])/2),null!==s[1]?o=c(o,r,e[2]-Math.max(t[0],t[2])):(o=c(o,r,e[2]-t[0]-t[2]),e[1]+=(t[0]-t[2])/2),o<e[2]?(e[2]=o,e[3]=Math.min(i.thickness?Math.max(0,o-2*i.thickness):Math.max(0,f(i.innerSize||0,o)),o),this.translate(e),this.drawDataLabels&&this.drawDataLabels()):n=!0),n}e.compose=function(e){if(t.compose(l),g(n,"PieDataLabel")){let t=e.prototype;t.dataLabelPositioners=i,t.alignDataLabel=a,t.drawDataLabels=r,t.getDataLabelPosition=s,t.placeDataLabels=o,t.verifyDataLabelOverflow=m}}}(o||(o={})),o}),i(e,"Core/Geometry/GeometryUtilities.js",[],function(){var t,e;return(e=t||(t={})).getCenterOfPoints=function(t){let e=t.reduce((t,e)=>(t.x+=e.x,t.y+=e.y,t),{x:0,y:0});return{x:e.x/t.length,y:e.y/t.length}},e.getDistanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}
vendor: 2,638 bytes, line 64820
64820,e.getAngleBetweenPoints=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)},e.pointInPolygon=function({x:t,y:e},i){let s=i.length,r,o,n=!1;for(r=0,o=s-1;r<s;o=r++){let[s,a]=i[r],[h,l]=i[o];a>e!=l>e&&t<(h-s)*(e-a)/(l-a)+s&&(n=!n)}return n},t}),i(e,"Extensions/OverlappingDataLabels.js",[e["Core/Geometry/GeometryUtilities.js"],e["Core/Utilities.js"]],function(t,e){let{pointInPolygon:i}=t,{addEvent:s,fireEvent:r,objectEach:o,pick:n}=e;function a(t){let e=t.length,s=(t,e)=>!(e.x>=t.x+t.width||e.x+e.width<=t.x||e.y>=t.y+t.height||e.y+e.height<=t.y),o=(t,e)=>{for(let s of t)if(i({x:s[0],y:s[1]},e))return!0;return!1},n,a,l,d,c,p=!1;for(let i=0;i<e;i++)(n=t[i])&&(n.oldOpacity=n.opacity,n.newOpacity=1,n.absoluteBox=function(t){if(t&&(!t.alignAttr||t.placed)){let e=t.box?0:t.padding||0,i=t.alignAttr||{x:t.attr("x"),y:t.attr("y")},s=t.getBBox();return t.width=s.width,t.height=s.height,{x:i.x+(t.parentGroup?.translateX||0)+e,y:i.y+(t.parentGroup?.translateY||0)+e,width:(t.width||0)-2*e,height:(t.height||0)-2*e,polygon:s?.polygon}}}(n));t.sort((t,e)=>(e.labelrank||0)-(t.labelrank||0));for(let i=0;i<e;++i){d=(a=t[i])&&a.absoluteBox;let r=d?.polygon;for(let n=i+1;n<e;++n){c=(l=t[n])&&l.absoluteBox;let e=!1;if(d&&c&&a!==l&&0!==a.newOpacity&&0!==l.newOpacity&&"hidden"!==a.visibility&&"hidden"!==l.visibility){let t=c.polygon;if(r&&t&&r!==t?o(r,t)&&(e=!0):s(d,c)&&(e=!0),e){let t=a.labelrank<l.labelrank?a:l,e=t.text;t.newOpacity=0,e?.element.querySelector("textPath")&&e.hide()}}}}for(let e of t)h(e,this)&&(p=!0);p&&r(this,"afterHideAllOverlappingLabels")}function h(t,e){let i,s,o=!1;return t&&(s=t.newOpacity,t.oldOpacity!==s&&(t.hasClass("highcharts-data-label")?(t[s?"removeClass":"addClass"]("highcharts-data-label-hidden"),i=function(){e.styledMode||t.css({pointerEvents:s?"auto":"none"})},o=!0,t[t.isOld?"animate":"attr"]({opacity:s},void 0,i),r(e,"afterHideOverlappingLabel")):t.attr({opacity:s})),t.isOld=!0),o}function l(){let t=this,e=[];for(let i of t.labelCollectors||[])e=e.concat(i());for(let i of t.yAxis||[])i.stacking&&i.options.stackLabels&&!i.options.stackLabels.allowOverlap&&o(i.stacking.stacks,t=>{o(t,t=>{t.label&&e.push(t.label)})});for(let i of t.series||[])if(i.visible&&i.hasDataLabels?.()){let s=i=>{for(let s of i)s.visible&&(s.dataLabels||[]).forEach(i=>{let r=i.options||{};i.labelrank=n(r.labelrank,s.labelrank,s.shapeArgs?.height),r.allowOverlap??Number(r.distance)>0?(i.oldOpacity=i.opacity,i.newOpacity=1,h(i,t)):e.push(i)})};s(i.nodes||[]),s(i.points)}this.hideOverlappingLabels(e)}return{compose:function(t){let e=t.prototype;e.hideOverlappingLabels||(e.hideOverlappingLabels=a,s(t,"render",l))}}}
vendor: 3,847 bytes, line 64820
64820),i(e,"Extensions/BorderRadius.js",[e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){let{defaultOptions:s}=t,{noop:r}=e,{addEvent:o,extend:n,isObject:a,merge:h,relativeLength:l}=i,d={radius:0,scope:"stack",where:void 0},c=r,p=r;function u(t,e,i,s,r={}){let o=c(t,e,i,s,r),{innerR:n=0,r:a=i,start:h=0,end:d=0}=r;if(r.open||!r.borderRadius)return o;let p=d-h,g=Math.sin(p/2),f=Math.max(Math.min(l(r.borderRadius||0,a-n),(a-n)/2,a*g/(1+g)),0),m=Math.min(f,p/Math.PI*2*n),x=o.length-1;for(;x--;)!function(t,e,i){let s,r,o;let n=t[e],a=t[e+1];if("Z"===a[0]&&(a=t[0]),("M"===n[0]||"L"===n[0])&&"A"===a[0]?(s=n,r=a,o=!0):"A"===n[0]&&("M"===a[0]||"L"===a[0])&&(s=a,r=n),s&&r&&r.params){let n=r[1],a=r[5],h=r.params,{start:l,end:d,cx:c,cy:p}=h,u=a?n-i:n+i,g=u?Math.asin(i/u):0,f=a?g:-g,m=Math.cos(g)*u;o?(h.start=l+f,s[1]=c+m*Math.cos(l),s[2]=p+m*Math.sin(l),t.splice(e+1,0,["A",i,i,0,0,1,c+n*Math.cos(h.start),p+n*Math.sin(h.start)])):(h.end=d-f,r[6]=c+n*Math.cos(h.end),r[7]=p+n*Math.sin(h.end),t.splice(e+1,0,["A",i,i,0,0,1,c+m*Math.cos(d),p+m*Math.sin(d)])),r[4]=Math.abs(h.end-h.start)<Math.PI?0:1}}(o,x,x>1?m:f);return o}function g(){if(this.options.borderRadius&&!(this.chart.is3d&&this.chart.is3d())){let{options:t,yAxis:e}=this,i="percent"===t.stacking,r=s.plotOptions?.[this.type]?.borderRadius,o=f(t.borderRadius,a(r)?r:{}),h=e.options.reversed;for(let s of this.points){let{shapeArgs:r}=s;if("roundedRect"===s.shapeType&&r){let{width:a=0,height:d=0,y:c=0}=r,p=c,u=d;if("stack"===o.scope&&s.stackTotal){let r=e.translate(i?100:s.stackTotal,!1,!0,!1,!0),o=e.translate(t.threshold||0,!1,!0,!1,!0),n=this.crispCol(0,Math.min(r,o),0,Math.abs(r-o));p=n.y,u=n.height}let g=(s.negative?-1:1)*(h?-1:1)==-1,f=o.where;!f&&this.is("waterfall")&&Math.abs((s.yBottom||0)-(this.translatedThreshold||0))>this.borderWidth&&(f="all"),f||(f="end");let m=Math.min(l(o.radius,a),a/2,"all"===f?d/2:1/0)||0;"end"===f&&(g&&(p-=m),u+=m),n(r,{brBoxHeight:u,brBoxY:p,r:m})}}}}function f(t,e){return a(t)||(t={radius:t||0}),h(d,e,t)}function m(){let t=f(this.options.borderRadius);for(let e of this.points){let i=e.shapeArgs;i&&(i.borderRadius=l(t.radius,(i.r||0)-(i.innerR||0)))}}function x(t,e,i,s,r={}){let o=p(t,e,i,s,r),{r:n=0,brBoxHeight:a=s,brBoxY:h=e}=r,l=e-h,d=h+a-(e+s),c=l-n>-.1?0:n,u=d-n>-.1?0:n,g=Math.max(c&&l,0),f=Math.max(u&&d,0),m=[t+c,e],y=[t+i-c,e],b=[t+i,e+c],v=[t+i,e+s-u],S=[t+i-u,e+s],C=[t+u,e+s],k=[t,e+s-u],M=[t,e+c],w=(t,e)=>Math.sqrt(Math.pow(t,2)-Math.pow(e,2));if(g){let t=w(c,c-g);m[0]-=t,y[0]+=t,b[1]=M[1]=e+c-g}if(s<c-g){let r=w(c,c-g-s);b[0]=v[0]=t+i-c+r,S[0]=Math.min(b[0],S[0]),C[0]=Math.max(v[0],C[0]),k[0]=M[0]=t+c-r,b[1]=M[1]=e+s}if(f){let t=w(u,u-f);S[0]+=t,C[0]-=t,v[1]=k[1]=e+s-u+f}if(s<u-f){let r=w(u,u-f-s);b[0]=v[0]=t+i-u+r,y[0]=Math.min(b[0],y[0]),m[0]=Math.max(v[0],m[0]),k[0]=M[0]=t+u-r,v[1]=k[1]=e}return o.length=0,o.push(["M",...m],["L",...y],["A",c,c,0,0,1,...b],["L",...v],["A",u,u,0,0,1,...S],["L",...C],["A",u,u,0,0,1,...k],["L",...M],["A",c,c,0,0,1,...m],["Z"]),o}return{compose:function(t,e,i){let s=t.types.pie;if(!e.symbolCustomAttribs.includes("borderRadius")){let r=i.prototype.symbols;o(t,"afterColumnTranslate",g,{order:9}),o(s,"afterTranslate",m),e.symbolCustomAttribs.push("borderRadius","brBoxHeight","brBoxY"),c=r.arc,p=r.roundedRect,r.arc=u,r.roundedRect=x}},optionsToObject:f}}),i(e,"Core/Responsive.js",[e["Core/Utilities.js"]],function(t){var e;let{diffObjects:i,extend:s,find:r,merge:o,pick:n,uniqueKey:a}=t;return function(t){function e(t,e){let i=t.condition;(i.callback||function(){return this.chartWidth<=n(i.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=n(i.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=n(i.minWidth,0)&&this.chartHeight>=n(i.minHeight,0)}).call(this)&&e.push(t._id)}function h(t,e){let s=this.options.responsive,n=this.currentResponsive,h=[],l;
64820!e&&s&&s.rules&&s.rules.forEach(t=>{void 0===t._id&&(t._id=a()),this.matchResponsiveRule(t,h)},this);let d=o(...h.map(t=>r((s||{}).rules||[],e=>e._id===t)).map(t=>t&&t.chartOptions));d.isResponsiveOptions=!0,h=h.toString()||void 0;let c=n&&n.ruleIds;h===c||(n&&(this.currentResponsive=void 0,this.updatingResponsive=!0,this.update(n.undoOptions,t,!0),this.updatingResponsive=!1),h?((l=i(d,this.options,!0,this.collectionsWithUpdate)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:h,mergedOptions:d,undoOptions:l},this.updatingResponsive||this.update(d,t,!0)):this.currentResponsive=void 0)}t.compose=function(t){let i=t.prototype;return i.matchResponsiveRule||s(i,{matchResponsiveRule:e,setResponsive:h}),t}}(e||(e={})),e}),i(e,"masters/highcharts.src.js",[e["Core/Globals.js"],e["Core/Utilities.js"],e["Core/Defaults.js"],e["Core/Animation/Fx.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Renderer/HTML/AST.js"],e["Core/Templating.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Renderer/HTML/HTMLElement.js"],e["Core/Axis/Axis.js"],e["Core/Axis/DateTimeAxis.js"],e["Core/Axis/LogarithmicAxis.js"],e["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],e["Core/Axis/Tick.js"],e["Core/Tooltip.js"],e["Core/Series/Point.js"],e["Core/Pointer.js"],e["Core/Legend/Legend.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Chart/Chart.js"],e["Extensions/ScrollablePlotArea.js"],e["Core/Axis/Stacking/StackingAxis.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Column/ColumnDataLabel.js"],e["Series/Pie/PieDataLabel.js"],e["Core/Series/DataLabel.js"],e["Extensions/OverlappingDataLabels.js"],e["Extensions/
64820BorderRadius.js"],e["Core/Responsive.js"],e["Core/Color/Color.js"],e["Core/Time.js"]],function(t,e,i,s,r,o,n,a,h,l,d,c,p,u,g,f,m,x,y,b,v,S,C,k,M,w,T,A,P,L,O,D,E,I,j,B){return t.AST=o,t.Axis=p,t.Chart=C,t.Color=j,t.DataLabel=O,t.Fx=s,t.HTMLElement=c,t.Legend=v,t.LegendSymbol=S,t.OverlappingDataLabels=t.OverlappingDataLabels||D,t.PlotLineOrBand=f,t.Point=y,t.Pointer=b,t.RendererRegistry=a,t.Series=T,t.SeriesRegistry=A,t.StackItem=w,t.SVGElement=l,t.SVGRenderer=d,t.Templating=n,t.Tick=m,t.Time=B,t.Tooltip=x,t.animate=r.animate,t.animObject=r.animObject,t.chart=C.chart,t.color=j.parse,t.dateFormat=n.dateFormat,t.defaultOptions=i.defaultOptions,t.distribute=h.distribute,t.format=n.format,t.getDeferredAnimation=r.getDeferredAnimation,t.getOptions=i.getOptions,t.numberFormat=n.numberFormat,t.seriesType=A.seriesType,t.setAnimation=r.setAnimation,t.setOptions=i.setOptions,t.stop=r.stop,t.time=i.defaultTime,t.timers=s.timers,E.compose(t.Series,t.SVGElement,t.SVGRenderer),P.compose(t.Series.types.column),O.compose(t.Series),u.compose(t.Axis),c.compose(t.SVGRenderer),v.compose(t.Chart),g.compose(t.Axis),D.compose(t.Chart),L.compose(t.Series.types.pie),f.compose(t.Chart,t.Axis),b.compose(t.Chart),I.compose(t.Chart),k.compose(t.Axis,t.Chart,t.Series),M.compose(t.Axis,t.Chart,t.Series),x.compose(t.Pointer),e.extend(t,e),t}),e["masters/highcharts.src.js"]._modules=e,e["masters/highcharts.src.js"]}); 64821 64822!/** 64823 * Highcharts JS v12.0.1 (2024-11-28) 64824 * @module highcharts/modules/data 64825 * @requires highcharts 64826 * 64827 * Data module 64828 * 64829 * (c) 2012-2024 Torstein Honsi 64830 * 64831 * License: www.highcharts.com/license 64832 */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("highcharts"),require("highcharts").Axis,require("highcharts").Chart,require("highcharts").Point,require("highcharts").SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/data",[["highcharts/highcharts"],["highcharts/highcharts","Axis"],["highcharts/highcharts","Chart"],["highcharts/highcharts","Point"],["highcharts/highcharts","SeriesRegistry"]],t):"object"==typeof exports?exports["highcharts/data"]=t(require("highcharts"),require("highcharts").Axis,require("highcharts").Chart,require("highcharts").Point,require("highcharts").SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.Axis,e.Highcharts.Chart,e.Highcharts.Point,e.Highcharts.SeriesRegistry)}(this,(e,t,s,i,r)=>(()=>{"use strict";var a={532:e=>{e.exports=t},960:e=>{e.exports=s},260:e=>{e.exports=i},512:e=>{e.exports=r},944:t=>{t.exports=e}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return a[e](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};o.d(l,{default:()=>$});var h=o(944),u=/*#__PURE__*/o.n(h);let{win:d}=u(),{discardElement:c,objectEach:p}=u(),m={ajax:function(e){let t={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"},s=new XMLHttpRequest;function i(t,s){e.error&&e.error(t,s)}if(!e.url)return!1;s.open((e.type||"get").toUpperCase(),e.url,!0),e.headers&&e.headers["Content-Type"]||s.setRequestHeader("Content-Type",t[e.dataType||"json"]||t.text),p(e.headers,function(e,t){s.setRequestHeader(t,e)}),e.responseType&&(s.responseType=e.responseType),s.onreadystatechange=function(){let t;if(4===s.readyState){if(200===s.status){if("blob"!==e.responseType&&(t=s.responseText,"json"===e.dataType))try{t=JSON.parse(t)}catch(e){if(e instanceof Error)return i(s,e)}return e.success&&e.success(t,s)}i(s,s.responseText)}},e.data&&"string"!=typeof e.data&&(e.data=JSON.stringify(e.data)),s.send(e.data)},getJSON:function(e,t){m.ajax({url:e,success:t,dataType:"json",headers:{"Content-Type":"text/plain"}})},post:function(e,t,s){let i=new d.FormData;p(t,function(e,t){i.append(t,e)}),i.append("b64","true");let{filename:r,type:a}=t;return d.fetch(e,{method:"POST",body:i,...s}).then(e=>{e.ok&&e.text().then(e=>{let t=document.createElement("a");t.href=`data:${a};base64,${e}`,t.download=r,t.click(),c(t)})})}};var f=o(532),g=/*#__PURE__*/o.n(f),x=o(960),y=/*#__PURE__*/o.n(x),v=o(260),C=/*#__PURE__*/o.n(v),T=o(512),N=/*#__PURE__*/o.n(T);let{getOptions:R}=u(),{doc:A}=u(),{ajax:Y}=m,{seriesTypes:D}=N(),{addEvent:w,defined:U,extend:b,fireEvent:F,isNumber:O,merge:S,objectEach:E,pick:j,splat:L}=u();function M(e){return!!(e&&(e.rowsURL||e.csvURL||e.columnsURL))}class I{static data(e,t={},s){return new I(e,t,s)}static rowsToColumns(e){let t,s,i,r,a;if(e)for(t=0,a=[],s=e.length;t<s;t++)for(i=0,r=e[t].length;i<r;i++)a[i]||(a[i]=[]),a[i][t]=e[t][i];return a}constructor(e,t={},s){this.rowsToColumns=I.rowsToColumns,this.dateFormats={"YYYY/mm/dd":{regex:/^(\d{4})[\-\/\.](\d{1,2})[\-\/\.](\d{1,2})$/,parser:function(e){return e?Date.UTC(+e[1],+e[2]-1,+e[3]):NaN}},"dd/mm/YYYY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{4})$/,parser:function(e){return e?Date.UTC(+e[3],+e[2]-1,+e[1]):NaN},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{4})$/,parser:function(e){return e?Date.UTC(+e[3],+e[1]-1,+e[2]):NaN}},"dd/mm/YY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{2})$/,parser:function(e){if(!e)return NaN;let t=new Date,s=+e[3];return s>t.getFullYear()-2e3?s+=1900:s+=2e3,Date.UTC(s,+e[2]-1,+e[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{2})$/,parser:function(e){return e?Date.UTC(+e[3]+2e3,+e[1]-1,+e[2]):NaN}}},this.chart=s,this.chartOptions=t,this.options=e,this.rawColumns=[],this.init(e,t,s
64832)}init(e,t,s){let i=e.decimalPoint,r;t&&(this.chartOptions=t),s&&(this.chart=s),"."!==i&&","!==i&&(i=void 0),this.options=e,this.columns=e.columns||this.rowsToColumns(e.rows)||[],this.firstRowAsNames=j(e.firstRowAsNames,this.firstRowAsNames,!0),this.decimalRegex=i&&RegExp("^(-?[0-9]+)"+i+"([0-9]+)$"),void 0!==this.liveDataTimeout&&clearTimeout(this.liveDataTimeout),this.rawColumns=[],this.columns.length&&(this.dataFound(),r=!M(e)),r||(r=this.fetchLiveData()),r||(r=!!this.parseCSV().length),r||(r=!!this.parseTable().length),r||(r=this.parseGoogleSpreadsheet()),!r&&e.afterComplete&&e.afterComplete(this)}getColumnDistribution(){let e=this.chartOptions,t=this.options,s=[],i=function(e="line"){return(D[e].prototype.pointArrayMap||[0]).length},r=function(e="line"){return D[e].prototype.pointArrayMap},a=e?.chart?.type,n=[],o=[],l=t?.seriesMapping||e?.series?.map(function(){return{x:0}})||[],h=0;(e?.series||[]).forEach(e=>{n.push(i(e.type||a))}),l.forEach(e=>{s.push(e.x||0)}),0===s.length&&s.push(0),l.forEach(t=>{let s=new P,l=n[h]||i(a),u=(e?.series??[])[h]??{},d=r(u.type||a),c=d??["y"];(U(t.x)||u.isCartesian||!d)&&s.addColumnReader(t.x,"x"),E(t,function(e,t){"x"!==t&&s.addColumnReader(e,t)});for(let e=0;e<l;e++)s.hasReader(c[e])||s.addColumnReader(void 0,c[e]);o.push(s),h++});let u=r(a);void 0===u&&(u=["y"]),this.valueCount={global:i(a),xColumns:s,individual:n,seriesBuilders:o,globalPointArrayMap:u}}dataFound(){this.options.switchRowsAndColumns&&(this.columns=this.rowsToColumns(this.columns)),this.getColumnDistribution(),this.parseTypes(),!1!==this.parsed()&&this.complete()}parseCSV(e){let t=this,s=this.columns=[],i=e||this.options,r=i.startColumn||0,a=i.endColumn||Number.MAX_VALUE,n=[],o={",":0,";":0," ":0},l=i.csv,h=i.startRow||0,u=i.endRow||Number.MAX_VALUE,d,c,p=0;if(l&&i.beforeParse&&(l=i.beforeParse.call(this,l)),l){if(c=l.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(i.lineDelimiter||"\n"),(!h||h<0)&&(h=0),(!u||u>=c.length)&&(u=c.length-1),i.itemDelimiter)d=i.itemDelimiter;else{let e,s,r;e=0,s=0,r=!1,c.some(function(t,i){let r=!1,a,n,l,h="";if(i>13)return!0;for(let i=0;i<t.length;i++){if(a=t[i],n=t[i+1],l=t[i-1],"#"===a)return;if('"'===a){if(r){if('"'!==l&&'"'!==n){for(;" "===n&&i<t.length;)n=t[++i];void 0!==o[n]&&o[n]++,r=!1}}else r=!0}else void 0!==o[a]?(isNaN(Date.parse(h=h.trim()))?(isNaN(h)||!isFinite(h))&&o[a]++:o[a]++,h=""):h+=a;","===a&&s++,"."===a&&e++}}),o[";"]>o[","]?r=";":(o[","],o[";"],r=","),i.decimalPoint||(e>s?i.decimalPoint=".":i.decimalPoint=",",t.decimalRegex=RegExp("^(-?[0-9]+)"+i.decimalPoint+"([0-9]+)$")),d=r}let e=0;for(p=h;p<=u;p++)"#"===c[p][0]?e++:function(e,t,o,l){let h=0,u="",c="",p="",m="",f=0,g=0;function x(t){u=e[t],c=e[t-1],p=e[t+1]}function y(e){n.length<g+1&&n.push([e]),n[g][n[g].length-1]!==e&&n[g].push(e)}function v(){if(r>f||f>a){++f,m="";return}i.columnTypes||(!isNaN(parseFloat(m))&&isFinite(m)?(m=parseFloat(m),y("number")):isNaN(Date.parse(m))?y("string"):(m=m.replace(/\//g,"-"),y("date"))),s.length<g+1&&s.push([]),s[g][t]=m,m="",++g,++f}if(e.trim().length&&"#"!==e.trim()[0]){for(;h<e.length;h++)if(x(h),'"'===u)for(x(++h);h<e.length&&('"'!==u||'"'===c||'"'===p);)('"'!==u||'"'===u&&'"'!==c)&&(m+=u),x(++h);else u===d?v():m+=u;v()}}(c[p],p-h-e);(!i.columnTypes||0===i.columnTypes.length)&&n.length&&n[0].length&&"date"===n[0][1]&&!i.dateFormat&&(i.dateFormat=function(e,s){let r="YYYY/mm/dd",a=[],n=[],o,l=[],h,u=0,d=!1,c;for((!s||s>e.length)&&(s=e.length);u<s;u++)if(void 0!==e[u]&&e[u]?.length)for(c=0,o=e[u].trim().replace(/\//g," ").replace(/\-/g," ").replace(/\./g," ").split(" "),l=["","",""];c<o.length;c++)c<l.length&&(o[c]=parseInt(o[c],10),o[c]&&(n[c]=!n[c]||n[c]<o[c]?o[c]:n[c],void 0!==a[c]?a[c]!==o[c]&&(a[c]=!1):a[c]=o[c],o[c]>31?o[c]<100?l[c]="YY":l[c]="YYYY":o[c]>12&&o[c]<=31?(l[c]="dd",d=!0):l[c].length||(l[c]="mm")));if(d){for(c=0;c<a.length;c++)!1!==a[c]?n[c]>12&&"YY"!==l[c]&&"YYYY"!==l[c]&&(l[c]="YY"):n[c]>12&&"mm"===l[c]&&(l[c]="dd");return(3===l.length&&"dd"===l[1]&&"dd"===l[2]&&(l[2]="YY"),h=l.join("/"),(i.dateFormats||t.dateFormats)[h])?h:(F(t,"deduceDateFailed"),r)}return r}(s[0])),this.dataFound()}return s}parseTable(){let e=this.options,t=this.columns||[],s=e.startRow||0,i=e.endRow||Number.MAX_VALUE,r=e.startColumn||0,a=e.endColumn||Number.MAX_VALUE;if(e.table){let n=e.table;"string"==typeof n&&(n=A.getElementById(n)),[].forEach.call(n.getElementsByTagName("tr"),(e,n)=>{n>=s&&n<=i&&[].forEach.call(e.children,(e,i)=>{let o=t[i-r],l=1;if(("TD"===e.tagName||"TH"===e.tagName)&&i>=r&&i<=a)for(t[i-r]||(t[i-r]=[]),t[i-r][n-s]=e.innerHTML;n-s>=l&&void 0===o[n-s-l];)o[n-s-l]=null,l++})}),this.dataFound()}return t}fetchLiveData(){let e=this,t=this.chart,s=this.options,i=s.enablePolling,r=S(s),a=0,n=1e3*(s.dataRefreshRate||2);return!!M(s)&&(n<1e3&&(n=1e3),delete s.csvURL,delete s.rowsURL,delete s.columnsURL,!function o(l){function h(r,h,u){if(!r||!/^(http|\/|\.\/|\.\.\/)/.test(r))return r&&s.error&&s.error("Invalid URL"),!1;function d(){i&&t.liveDataURL===r&&(e.liveDataTimeout=setTimeout(o,n))}return l&&(clearTimeout(e.liveDataTimeout),t.liveDataURL=r),Y({url:r,dataType:u||"json",success:function(e){t?.series&&h(e),d()},error:function(e,t){return++a<3&&d(),s.error?.(t,e)}}),!0}h(r.csvURL,function(e){t.update({data:{csv:e}})},"text")||h(r.rowsURL,function(e){t.update({data:{rows:e}})})||h(r.columnsURL,function(e){t.update({data:{columns:e}})})}(!0),M(s))}parseGoogleSpreadsheet(){let e=this,t=this.options,s=t.googleSpreadsheetKey,i=this.chart,r=Math.max(1e3*(t.dataRefreshRate||2),4e3),a=()=>
64832{if(t.googleSpreadsheetRange)return t.googleSpreadsheetRange;let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=(e.charAt(t.startColumn||0)||"A")+((t.startRow||0)+1),i=e.charAt(j(t.endColumn,-1))||"ZZ";return U(t.endRow)&&(i+=t.endRow+1),`${s}:${i}`};return s&&(delete t.googleSpreadsheetKey,function i(n){Y({url:["https://sheets.googleapis.com/v4/spreadsheets",s,"values",a(),"?alt=json&majorDimension=COLUMNS&valueRenderOption=UNFORMATTED_VALUE&dateTimeRenderOption=FORMATTED_STRING&key="+t.googleAPIKey].join("/"),dataType:"json",success:function(s){n(s),t.enablePolling&&(e.liveDataTimeout=setTimeout(function(){i(n)},r))},error:function(e,s){return t.error?.(s,e)}})}(function(t){let s=t.values;if(!s||0===s.length)return!1;let r=s.reduce((e,t)=>Math.max(e,t.length),0);s.forEach(e=>{for(let t=0;t<r;t++)void 0===e[t]&&(e[t]=null)}),i?.series?i.update({data:{columns:s}}):(e.columns=s,e.dataFound())})),!1}trim(e,t){return"string"==typeof e&&(e=e.replace(/^\s+|\s+$/g,""),t&&/[\d\s]+/.test(e)&&(e=e.replace(/\s/g,"")),this.decimalRegex&&(e=e.replace(this.decimalRegex,"$1.$2"))),e}parseTypes(){let e=this.columns||[],t=e.length;for(;t--;)this.parseColumn(e[t],t)}parseColumn(e,t){let s=this.rawColumns,i=this.columns=this.columns||[],r=this.firstRowAsNames,a=this.valueCount?.xColumns.indexOf(t)!==-1,n=[],o=this.chartOptions,l=(this.options.columnTypes||[])[t],h=a&&o?.xAxis&&"category"===L(o.xAxis)[0].type||"string"===l,u=U(e.name),d=e.length,c,p,m,f,g,x,y;for(s[t]||(s[t]=[]);d--;)c=n[d]||e[d],m=this.trim(c),p=parseFloat(f=this.trim(c,!0)),void 0===s[t][d]&&(s[t][d]=m),h||0===d&&r&&!u?e[d]=""+m:+f===p?(e[d]=p,p>31536e6&&"float"!==l?e.isDatetime=!0:e.isNumeric=!0,void 0!==e[d+1]&&(y=p>e[d+1])):(m?.length&&(g=this.parseDate(c)),a&&O(g)&&"float"!==l?(n[d]=c,e[d]=g,e.isDatetime=!0,void 0!==e[d+1]&&((x=g>e[d+1])!==y&&void 0!==y&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,d=e.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):e.unsorted=!0),y=x)):(e[d]=""===m?null:m,0!==d&&(e.isDatetime||e.isNumeric)&&(e.mixed=!0)));if(a&&e.mixed&&(i[t]=s[t]),a&&y&&this.options.sort){for(t=0;t<i.length;t++)if(i[t].reverse(),r){let e=i[t].pop();e&&i[t].unshift(e)}}}parseDate(e){let t=this.options.parseDate,s,i,r,a=this.options.dateFormat||this.dateFormat,n;if(t)s=t(e);else if("string"==typeof e){if(a)(r=this.dateFormats[a])||(r=this.dateFormats["YYYY/mm/dd"]),(n=e.match(r.regex))&&(s=r.parser(n));else for(i in this.dateFormats)if(r=this.dateFormats[i],n=e.match(r.regex)){this.dateFormat=a=i,this.alternativeFormat=r.alternative,s=r.parser(n);break}!n&&(e.match(/:.+(GMT|UTC|[Z+\-])/)&&(e=e.replace(/\s*(?:GMT|UTC)?([+\-])(\d\d)(\d\d)$/,"$1$2:$3").replace(/(?:\s+|GMT|UTC)([+\-])/,"$1").replace(/(\d)\s*(?:GMT|UTC|Z)$/,"$1+00:00")),"object"==typeof(n=Date.parse(e))&&null!==n&&n.getTime?s=n.getTime()-6e4*n.getTimezoneOffset():O(n)&&(s=n-6e4*new Date(n).getTimezoneOffset()))}return s}getData(){if(this.columns)return this.rowsToColumns(this.columns)?.slice(1)}parsed(){if(this.options.parsed)return this.options.parsed.call(this,this.columns)}complete(){let e=this.columns=this.columns||[],t=this.options,s=[],i="linear",r,a,n,o,l,h,u,d,c,p,m;if([].length=e.length,t.complete||t.afterComplete){if(this.firstRowAsNames)for(n=0;n<e.length;n++){let t=e[n];U(t.name)||(t.name=j(t.shift(),"").toString())}for(h=0,r=[],c=function(e,t){let s,i,r;let a=[],n=[];for(i=0;i<e;i+=1)a.push(!0);for(s=0;s<t.length;s+=1)for(i=0,r=t[s].getReferencedColumnIndexes();i<r.length;i+=1)a[r[i]]=!1;for(i=0;i<a.length;i+=1)a[i]&&n.push(i);return n}(e?.length||0,this.valueCount.seriesBuilders);h<this.valueCount.seriesBuilders.length;h++)(d=this.valueCount.seriesBuilders[h]).populateColumns(c)&&s.push(d);for(;c.length>0;){for((d=new P).addColumnReader(0,"x"),-1!==(m=c.indexOf(0))&&c.splice(m,1),n=0;n<this.valueCount.global;n++)d.addColumnReader(void 0,this.valueCount.globalPointArrayMap[n]);d.populateColumns(c)&&s.push(d)}if(s.length>0&&s[0].readers.length>0&&void 0!==(p=e?.[s[0].readers[0].columnIndex??-1])&&(p.isDatetime?i="datetime":p.isNumeric||(i="category")),"category"===i)for(h=0;h<s.length;h++)for(l=0,d=s[h];l<d.readers.length;l++)"x"===d.readers[l].configName&&(d.readers[l].configName="name");for(h=0;h<s.length;h++){for(o=0,d=s[h],a=[];o<e[0].length;o++)a[o]=d.read(e,o);r[h]={data:a,pointStart:a[0]&&(d.pointIsArray?a[0]?.[0]:a[0]?.x)||void 0},d.name&&(r[h].name=d.name),"category"===i&&(r[h].turboThreshold=0,r[h].pointStart=0)}u={series:r},"linear"!==i||this.xAxisOptions&&this.xAxisOptions.type!==i?(this.xAxisOptions={type:i},"category"===i&&(this.xAxisOptions.uniqueNames=!1)):i=this.xAxisOptions=void 0,this.chart||S(!0,u,{xAxis:this.xAxisOptions||{}}),t.complete?.(u),t.afterComplete?.(this,u)}}xAxisUpdateHandler(e){let t=this.xAxisOptions;t&&(!e.options.type&&t.type&&(e.type=t.type),e.options.uniqueNames||!1!==t.uniqueNames||(e.uniqueNames=t.uniqueNames))}update(e,t){let s=this.chart,i=s.options;e&&(e.afterComplete=function(e,i){if(!i)return;let r=s.xAxis[0],a=e.xAxisOptions;a&&r&&(r.type!==a.type&&!r.options.type||r.uniqueNames&&!1===a.uniqueNames&&void 0===r.options.uniqueNames)?r.update({}
64832,!1):(i?.series||[]).forEach(function(e){delete e.pointStart}),s.update(i,t,!0)},S(!0,i.data,e),i.data?.googleSpreadsheetKey&&!e.columns&&delete i.data.columns,this.init(i.data||{},i))}}w(g(),"afterSetOptions",function(){this.isXAxis&&(!this.chart.xAxis.length||this.chart.xAxis[0]===this)&&this.chart.data?.xAxisUpdateHandler(this)}),w(y(),"init",function(e){let t=this,s=e.args[1],i=R().data,r=e.args[0]||{};if((i||r&&r.data)&&!t.hasDataDef){t.hasDataDef=!0;let a=S(i,r.data);t.data=new I(b(a,{afterComplete:function(e,i){let a,n;if(Object.hasOwnProperty.call(r,"series")){if("object"==typeof r.series)for(a=Math.max(r.series.length,i?.series?.length??0);a--;)n=r.series[a]||{},r.series[a]=S(n,i?.series?.[a]??{});else delete r.series}r=S(i,r),t.data=e,t.init(r,s)}}),r,t),e.preventDefault()}});class P{constructor(){this.readers=[],this.pointIsArray=!0}populateColumns(e){let t=!0;return this.readers.forEach(t=>{void 0===t.columnIndex&&(t.columnIndex=e.shift())}),this.readers.forEach(e=>{void 0===e.columnIndex&&(t=!1)}),t}read(e,t){let s=this.pointIsArray,i=s?[]:{};if(this.readers.forEach(r=>{let a=e[r.columnIndex][t];s?i.push(a):r.configName.indexOf(".")>0?C().prototype.setNestedProperty(i,a,r.configName):i[r.configName]=a}),void 0===this.name&&this.readers.length>=2){let t=[];this.readers.forEach(function(e){("x"===e.configName||"name"===e.configName||"y"===e.configName)&&void 0!==e.columnIndex&&t.push(e.columnIndex)}),t.length>=2&&(t.shift(),t.sort(function(e,t){return e-t})),this.name=e[j(t.shift(),0)].name}return i}addColumnReader(e,t){this.readers.push({columnIndex:e,configName:t}),"x"===t||"y"===t||void 0===t||(this.pointIsArray=!1)}getReferencedColumnIndexes(){let e,t;let s=[];for(e=0;e<this.readers.length;e+=1)void 0!==(t=this.readers[e]).columnIndex&&s.push(t.columnIndex);return s}hasReader(e){let t;for(t=0;t<this.readers.length;t+=1)if(this.readers[t].configName===e)return!0}}let q=u();q.Data=q.Data||I,q.HttpUtilities=q.HttpUtilities||m,q.ajax=q.HttpUtilities.ajax,q.data=q.Data.data,q.getJSON=q.HttpUtilities.getJSON,q.post=q.HttpUtilities.post;let $=u();return l.default})()); 64833 64834!/** 64835 * Highcharts JS v12.0.1 (2024-11-28) 64836 * @module highcharts/modules/variable-pie 64837 * @requires highcharts 64838 * 64839 * Variable Pie module for Highcharts 64840 * 64841 * (c) 2010-2024 Grzegorz BlachliÅski 64842 * 64843 * License: www.highcharts.com/license 64844 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("highcharts"),require("highcharts").SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/variable-pie",[["highcharts/highcharts"],["highcharts/highcharts","SeriesRegistry"]],e):"object"==typeof exports?exports["highcharts/variable-pie"]=e(require("highcharts"),require("highcharts").SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}(this,(t,e)=>(()=>{"use strict";var i={512:t=>{t.exports=e},944:e=>{e.exports=t}},r={};function a(t){var e=r[t];if(void 0!==e)return e.exports;var s=r[t]={exports:{}};return i[t](s,s.exports,a),s.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};a.d(s,{default:()=>z});var n=a(944),h=/*#__PURE__*/a.n(n),o=a(512),l=/*#__PURE__*/a.n(o);let{pie:p}=l().seriesTypes,{arrayMax:c,arrayMin:d,clamp:g,extend:u,fireEvent:f,merge:M,pick:x}=h();class y extends p{calculateExtremes(){let t,e;let i=this.chart,r=i.plotWidth,a=i.plotHeight,s=this.options,n=2*(s.slicedOffset||0),h=this.getColumn("z"),o=Math.min(r,a)-n,l={},p=this.center||this.getCenter();for(let t of["minPointSize","maxPointSize"]){let e=s[t],i=/%$/.test(e);e=parseInt(e,10),l[t]=i?o*e/100:2*e}this.minPxSize=p[3]+l.minPointSize,this.maxPxSize=g(p[2],p[3]+l.minPointSize,l.maxPointSize),h.length&&(t=x(s.zMin,d(h.filter(this.zValEval))),e=x(s.zMax,c(h.filter(this.zValEval))),this.getRadii(t,e,this.minPxSize,this.maxPxSize))}getRadii(t,e,i,r){let a,s,n;let h=this.getColumn("z"),o=[],l="radius"!==this.options.sizeBy,p=e-t;for(let c=0;c<h.length;c++)(s=this.zValEval(h[c])?h[c]:t)<=t?n=i/2:s>=e?n=r/2:(a=p>0?(s-t)/p:.5,l&&(a=Math.sqrt(a)),n=Math.ceil(i+a*(r-i))/2),o.push(n);this.radii=o}redraw(){this.center=null,super.redraw()}getDataLabelPosition(t,e){let{center:i,options:r}=this,a=t.angle||0,s=this.radii[t.index],n=i[0]+Math.cos(a)*s,h=i[1]+Math.sin(a)*s,o=Math.min((r.slicedOffset||0)+(r.borderWidth||0),e/5);
64844return{distance:e,natural:{x:n+Math.cos(a)*e,y:h+Math.sin(a)*e},computed:{},alignment:t.half?"right":"left",connectorPosition:{breakAt:{x:n+Math.cos(a)*o,y:h+Math.sin(a)*o},touchingSliceAt:{x:n,y:h}}}}translate(t){this.generatePoints();let e=this.options,i=e.slicedOffset,r=e.startAngle||0,a=Math.PI/180*(r-90),s=Math.PI/180*(x(e.endAngle,r+360)-90),n=s-a,h=this.points,o=e.ignoreHiddenPoint,l=0,p,c,d,g,u,M,y;this.startAngleRad=a,this.endAngleRad=s,this.calculateExtremes(),t||(this.center=t=this.getCenter());for(let e=0;e<h.length;e++)M=h[e],y=this.radii[e],p=a+l*n,(!o||M.visible)&&(l+=M.percentage/100),c=a+l*n,M.shapeType="arc",M.shapeArgs={x:t[0],y:t[1],r:y,innerR:t[3]/2,start:Math.round(1e3*p)/1e3,end:Math.round(1e3*c)/1e3},(d=(c+p)/2)>1.5*Math.PI?d-=2*Math.PI:d<-Math.PI/2&&(d+=2*Math.PI),M.slicedTranslation={translateX:Math.round(Math.cos(d)*i),translateY:Math.round(Math.sin(d)*i)},g=Math.cos(d)*t[2]/2,u=Math.sin(d)*t[2]/2,M.tooltipPos=[t[0]+.7*g,t[1]+.7*u],M.half=d<-Math.PI/2||d>Math.PI/2?1:0,M.angle=d;f(this,"afterTranslate")}zValEval(t){return!("number"!=typeof t||isNaN(t))||null}}y.defaultOptions=M(p.defaultOptions,{minPointSize:"10%",maxPointSize:"100%",zMin:void 0,zMax:void 0,sizeBy:"area",tooltip:{pointFormat:'<span style="color:{point.color}">â</span> {series.name}<br/>Value: {point.y}<br/>Size: {point.z}<br/>'}}),u(y.prototype,{pointArrayMap:["y","z"],parallelArrays:["x","y","z"]}),l().registerSeriesType("variablepie",y);let z=h();return s.default})()); 64845 64846!/** 64847 * Highcharts JS v12.0.1 (2024-11-28) 64848 * @module highcharts/modules/exporting 64849 * @requires highcharts 64850 * 64851 * Exporting module 64852 * 64853 * (c) 2010-2024 Torstein Honsi 64854 * 64855 * License: www.highcharts.com/license 64856 */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("highcharts"),require("highcharts").AST,require("highcharts").Chart):"function"==typeof define&&define.amd?define("highcharts/exporting",[["highcharts/highcharts"],["highcharts/highcharts","AST"],["highcharts/highcharts","Chart"]],t):"object"==typeof exports?exports["highcharts/exporting"]=t(require("highcharts"),require("highcharts").AST,require("highcharts").Chart):e.Highcharts=t(e.Highcharts,e.Highcharts.AST,e.Highcharts.Chart)}(this,(e,t,n)=>(()=>{"use strict";var i,o,r,s={660:e=>{e.exports=t},960:e=>{e.exports=n},944:t=>{t.exports=e}},l={};function a(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return s[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};a.d(c,{default:()=>J});var h=a(944),p=/*#__PURE__*/a.n(h),u=a(660),d=/*#__PURE__*/a.n(u);a(960),function(e){e.compose=function(e){return e.navigation||(e.navigation=new t(e)),e};class t{constructor(e){this.updates=[],this.chart=e}addUpdate(e){this.chart.navigation.updates.push(e)}update(e,t){this.updates.forEach(n=>{n.call(this.chart,e,t)})}}e.Additions=t}(i||(i={}));let g=i,{isTouchDevice:f}=p(),m={exporting:{allowTableSorting:!0,type:"image/png",url:"https://export-svg.highcharts.com/",pdfFont:{normal:void 0,bold:void 0,bolditalic:void 0,italic:void 0},printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:["viewFullscreen","printChart","separator","downloadPNG","downloadJPEG","downloadSVG"],y:-5}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen&&this.fullscreen.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}},lang:{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"},navigation:{buttonOptions:{symbolSize:14,symbolX:14.5,symbolY:13.5,align:"right",buttonSpacing:5,height:28,verticalAlign:"top",width:28,symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",padding:5,stroke:"none","stroke-linecap":"round"}},menuStyle:{border:"none",borderRadius:"3px",background:"#ffffff",padding:"0.5em"},menuItemStyle:{background:"none",borderRadius:"3px",color:"#333333",padding:"0.5em",fontSize:f?"0.9em":"0.8em",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#f2f2f2"}}};!function(e){let t=[];function n(e,t,n,i){return[["M",e,t+2.5],["L",e+n,t+2.5],["M",e,t+i/2+.5],["L",e+n,t+i/2+.5],["M",e,t+i-1.5],["L",e+n,t+i-1.5]]}function i(e,t,n,i){let o=i/3-2;return[].concat(this.circle(n-o,t,o,o),this.circle(n-o,t+o+4,o,o),this.circle(n-o,t+2*(o+4),o,o))}e.compose=function(e){if(-1===t.indexOf(e)){t.push(e);let o=e.prototype.symbols;o.menu=n,o.menuball=i.bind(o)}}}(o||(o={}));let x=o,{composed:y}=p(),{addEvent:b,fireEvent:v,pushUnique:w}=p();function S(){this.fullscreen=new E(this)}class E{static compose(e){w(y,"Fullscreen")&&b(e,"beforeRender",S)}constructor(e){this.chart=e,this.isOpen=!1;let t=e.renderTo;!this.browserProps&&("function"==typeof t.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:t.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:t.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:t.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}close(){let e=this,t=e.chart,n=t.options.chart;v(t,"fullscreenClose",null,function(){e.isOpen&&e.browserProps&&t.container.ownerDocument instanceof Document&&t.container.ownerDocument[e.browserProps.exitFullscreen](),e.unbindFullscreenEvent&&(e.unbindFullscreenEvent=e.unbindFullscreenEvent()),t.setSize(e.origWidth,e.origHeight,!1),e.origWidth=void 0,e.origHeight=void 0,n.width=e.origWidthOption,n.height=e.origHeightOption,e.origWidthOption=void 0,e.origHeightOption=void 0,e.isOpen=!1,e.setButtonText()})}open(){let e=this,t=e.chart,n=t.options.chart;v(t,"fullscreenOpen",null,function(){if(n&&(e.origWidthOption=n.width,e.origHeightOption=n.height),e.origWidth=t.chartWidth,e.origHeight=t.chartHeight,e.browserProps){let n=b(t.container.ownerDocument,e.browserProps.fullscreenChange,function(){e.isOpen?(e.isOpen=!1,e.close()):(t.setSize(null,null,!1),e.isOpen=!0,e.setButtonText())}
64856),i=b(t,"destroy",n);e.unbindFullscreenEvent=()=>{n(),i()};let o=t.renderTo[e.browserProps.requestFullscreen]();o&&o.catch(function(){alert("Full screen is not supported inside a frame.")})}})}setButtonText(){let e=this.chart,t=e.exportDivElements,n=e.options.exporting,i=n&&n.buttons&&n.buttons.contextButton.menuItems,o=e.options.lang;if(n&&n.menuItemDefinitions&&o&&o.exitFullscreen&&o.viewFullscreen&&i&&t){let e=t[i.indexOf("viewFullscreen")];e&&d().setElementHTML(e,this.isOpen?o.exitFullscreen:n.menuItemDefinitions.viewFullscreen.text||o.viewFullscreen)}}toggle(){this.isOpen?this.close():this.open()}}let{win:C}=p(),{discardElement:T,objectEach:O}=p(),F={ajax:function(e){let t={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"},n=new XMLHttpRequest;function i(t,n){e.error&&e.error(t,n)}if(!e.url)return!1;n.open((e.type||"get").toUpperCase(),e.url,!0),e.headers&&e.headers["Content-Type"]||n.setRequestHeader("Content-Type",t[e.dataType||"json"]||t.text),O(e.headers,function(e,t){n.setRequestHeader(t,e)}),e.responseType&&(n.responseType=e.responseType),n.onreadystatechange=function(){let t;if(4===n.readyState){if(200===n.status){if("blob"!==e.responseType&&(t=n.responseText,"json"===e.dataType))try{t=JSON.parse(t)}catch(e){if(e instanceof Error)return i(n,e)}return e.success&&e.success(t,n)}i(n,n.responseText)}},e.data&&"string"!=typeof e.data&&(e.data=JSON.stringify(e.data)),n.send(e.data)},getJSON:function(e,t){F.ajax({url:e,success:t,dataType:"json",headers:{"Content-Type":"text/plain"}})},post:function(e,t,n){let i=new C.FormData;O(t,function(e,t){i.append(t,e)}),i.append("b64","true");let{filename:o,type:r}=t;return C.fetch(e,{method:"POST",body:i,...n}).then(e=>{e.ok&&e.text().then(e=>{let t=document.createElement("a");t.href=`data:${r};base64,${e}`,t.download=o,t.click(),T(t)})})}},{defaultOptions:P}=p(),{doc:M,SVG_NS:k,win:N}=p(),{addEvent:H,css:D,createElement:G,discardElement:q,extend:I,find:W,fireEvent:R,isObject:j,merge:V,objectEach:$,pick:z,removeEvent:L,uniqueKey:A}=p();!function(e){let t;let n=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/^parentRule$/,/^(cssRules|ownerRules)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/,/^\d+$/],i=["fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","textAnchor","x","y"];e.inlineAllowlist=[];let o=["clipPath","defs","desc"];function r(e){let t,n;let i=this,o=i.renderer,r=V(i.options.navigation.buttonOptions,e),s=r.onclick,l=r.menuItems,a=r.symbolSize||12;if(i.btnCount||(i.btnCount=0),i.exportDivElements||(i.exportDivElements=[],i.exportSVGElements=[]),!1===r.enabled||!r.theme)return;let c=i.styledMode?{}:r.theme;s?n=function(e){e&&e.stopPropagation(),s.call(i,e)}:l&&(n=function(e){e&&e.stopPropagation(),i.contextMenu(h.menuClassName,l,h.translateX||0,h.translateY||0,h.width||0,h.height||0,h),h.setState(2)}),r.text&&r.symbol?c.paddingLeft=z(c.paddingLeft,30):r.text||I(c,{width:r.width,height:r.height,padding:0});let h=o.button(r.text,0,0,n,c,void 0,void 0,void 0,void 0,r.useHTML).addClass(e.className).attr({title:z(i.options.lang[r._titleKey||r.titleKey],"")});h.menuClassName=e.menuClassName||"highcharts-menu-"+i.btnCount++,r.symbol&&(t=o.symbol(r.symbol,Math.round((r.symbolX||0)-a/2),Math.round((r.symbolY||0)-a/2),a,a,{width:a,height:a}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(h),i.styledMode||t.attr({stroke:r.symbolStroke,fill:r.symbolFill,"stroke-width":r.symbolStrokeWidth||1})),h.add(i.exportingGroup).align(I(r,{width:h.width,x:z(r.x,i.buttonOffset)}),!0,"spacingBox"),i.buttonOffset+=((h.width||0)+r.buttonSpacing)*("right"===r.align?-1:1),i.exportSVGElements.push(h,t)}function s(){if(!this.printReverseInfo)return;let{childNodes:e,origDisplay:n,resetParams:i}=this.printReverseInfo;this.moveContainers(this.renderTo),[].forEach.call(e,function(e,t){1===e.nodeType&&(e.style.display=n[t]||"")}),this.isPrinting=!1,i&&this.setSize.apply(this,i),delete this.printReverseInfo,t=void 0,R(this,"afterPrint")}function l(){let e=M.body,t=this.options.exporting.printMaxWidth,n={childNodes:e.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0,this.pointer?.reset(void 0,0),R(this,"beforePrint"),t&&this.chartWidth>t&&(n.resetParams=[this.options.chart.width,void 0,!1],this.setSize(t,void 0,!1)),[].forEach.call(n.childNodes,function(e,t){1===e.nodeType&&(n.origDisplay[t]=e.style.display,e.style.display="none")}),this.moveContainers(e),this.printReverseInfo=n}function a(e){e.renderExporting(),H(e,"redraw",e.renderExporting),H(e,"destroy",e.destroyExport)}function c(e,t,n,i,o,r,s){let l=this,a=l.options.navigation,c=l.chartWidth,h=l.chartHeight,u="cache-"+e,g=Math.max(o,r),f,m=l[u];m||(l.exportContextMenu=l[u]=m=G("div",{className:e},{position:"absolute",zIndex:1e3,padding:g+"px",pointerEvents:"auto",...l.renderer.style}
64856,l.scrollablePlotArea?.fixedDiv||l.container),f=G("ul",{className:"highcharts-menu"},l.styledMode?{}:{listStyle:"none",margin:0,padding:0},m),l.styledMode||D(f,I({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},a.menuStyle)),m.hideMenu=function(){D(m,{display:"none"}),s&&s.setState(0),l.openMenu=!1,D(l.renderTo,{overflow:"hidden"}),D(l.container,{overflow:"hidden"}),p().clearTimeout(m.hideTimer),R(l,"exportMenuHidden")},l.exportEvents.push(H(m,"mouseleave",function(){m.hideTimer=N.setTimeout(m.hideMenu,500)}),H(m,"mouseenter",function(){p().clearTimeout(m.hideTimer)}),H(M,"mouseup",function(t){l.pointer?.inClass(t.target,e)||m.hideMenu()}),H(m,"click",function(){l.openMenu&&m.hideMenu()})),t.forEach(function(e){if("string"==typeof e&&(e=l.options.exporting.menuItemDefinitions[e]),j(e,!0)){let t;e.separator?t=G("hr",void 0,void 0,f):("viewData"===e.textKey&&l.isDataTableVisible&&(e.textKey="hideData"),t=G("li",{className:"highcharts-menu-item",onclick:function(t){t&&t.stopPropagation(),m.hideMenu(),"string"!=typeof e&&e.onclick&&e.onclick.apply(l,arguments)}},void 0,f),d().setElementHTML(t,e.text||l.options.lang[e.textKey]),l.styledMode||(t.onmouseover=function(){D(this,a.menuItemHoverStyle)},t.onmouseout=function(){D(this,a.menuItemStyle)},D(t,I({cursor:"pointer"},a.menuItemStyle||{})))),l.exportDivElements.push(t)}}),l.exportDivElements.push(f,m),l.exportMenuWidth=m.offsetWidth,l.exportMenuHeight=m.offsetHeight);let x={display:"block"};n+(l.exportMenuWidth||0)>c?x.right=c-n-o-g+"px":x.left=n-g+"px",i+r+(l.exportMenuHeight||0)>h&&s.alignOptions?.verticalAlign!=="top"?x.bottom=h-i-g+"px":x.top=i+r-g+"px",D(m,x),D(l.renderTo,{overflow:""}),D(l.container,{overflow:""}),l.openMenu=!0,R(l,"exportMenuShown")}function h(e){let t;let n=e?e.target:this,i=n.exportSVGElements,o=n.exportDivElements,r=n.exportEvents;i&&(i.forEach((e,o)=>{e&&(e.onclick=e.ontouchstart=null,n[t="cache-"+e.menuClassName]&&delete n[t],i[o]=e.destroy())}),i.length=0),n.exportingGroup&&(n.exportingGroup.destroy(),delete n.exportingGroup),o&&(o.forEach(function(e,t){e&&(p().clearTimeout(e.hideTimer),L(e,"mouseleave"),o[t]=e.onmouseout=e.onmouseover=e.ontouchstart=e.onclick=null,q(e))}),o.length=0),r&&(r.forEach(function(e){e()}),r.length=0)}function u(e,t){let n=this.getSVGForExport(e,t);e=V(this.options.exporting,e),F.post(e.url,{filename:e.filename?e.filename.replace(/\//g,"-"):this.getFilename(),type:e.type,width:e.width,scale:e.scale,svg:n},e.fetchOptions)}function f(e){return e&&this.inlineStyles(),this.container.innerHTML}function y(){let e=this.userOptions.title&&this.userOptions.title.text,t=this.options.exporting.filename;return t?t.replace(/\//g,"-"):("string"==typeof e&&(t=e.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z\d\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,"")),(!t||t.length<5)&&(t="chart"),t)}function b(e){let t,n,i=V(this.options,e);i.plotOptions=V(this.userOptions.plotOptions,e&&e.plotOptions),i.time=V(this.userOptions.time,e&&e.time);let o=G("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},M.body),r=this.renderTo.style.width,s=this.renderTo.style.height,l=i.exporting.sourceWidth||i.chart.width||/px$/.test(r)&&parseInt(r,10)||(i.isGantt?800:600),a=i.exporting.sourceHeight||i.chart.height||/px$/.test(s)&&parseInt(s,10)||400;I(i.chart,{animation:!1,renderTo:o,forExport:!0,renderer:"SVGRenderer",width:l,height:a}),i.exporting.enabled=!1,delete i.data,i.series=[],this.series.forEach(function(e){(n=V(e.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:e.visible})).isInternal||i.series.push(n)});let c={};this.axes.forEach(function(e){e.userOptions.internalKey||(e.userOptions.internalKey=A()),e.options.isInternal||(c[e.coll]||(c[e.coll]=!0,i[e.coll]=[]),i[e.coll].push(V(e.userOptions,{visible:e.visible,type:e.type,uniqueNames:e.uniqueNames})))}),i.colorAxis=this.userOptions.colorAxis;let h=new this.constructor(i,this.callback);return e&&["xAxis","yAxis","series"].forEach(function(t){let n={};e[t]&&(n[t]=e[t],h.update(n))}
64856),this.axes.forEach(function(e){let t=W(h.axes,function(t){return t.options.internalKey===e.userOptions.internalKey}),n=e.getExtremes(),i=n.userMin,o=n.userMax;t&&(void 0!==i&&i!==t.min||void 0!==o&&o!==t.max)&&t.setExtremes(i,o,!0,!1)}),t=h.getChartHTML(this.styledMode||i.exporting?.applyStyleSheets),R(this,"getSVG",{chartCopy:h}),t=this.sanitizeSVG(t,i),i=null,h.destroy(),q(o),t}function v(e,t){let n=this.options.exporting;return this.getSVG(V({chart:{borderRadius:0}},n.chartOptions,t,{exporting:{sourceWidth:e&&e.sourceWidth||n.sourceWidth,sourceHeight:e&&e.sourceHeight||n.sourceHeight}}))}function w(){let t;let r=e.inlineAllowlist,s={},l=M.createElement("iframe");D(l,{width:"1px",height:"1px",visibility:"hidden"}),M.body.appendChild(l);let a=l.contentWindow&&l.contentWindow.document;a&&a.body.appendChild(a.createElementNS(k,"svg")),function e(l){let c,h,u,d,g,f;let m={};if(a&&1===l.nodeType&&-1===o.indexOf(l.nodeName)){if(c=N.getComputedStyle(l,null),h="svg"===l.nodeName?{}:N.getComputedStyle(l.parentNode,null),!s[l.nodeName]){t=a.getElementsByTagName("svg")[0],u=a.createElementNS(l.namespaceURI,l.nodeName),t.appendChild(u);let e=N.getComputedStyle(u,null),n={};for(let t in e)t.length<1e3&&"string"==typeof e[t]&&!/^\d+$/.test(t)&&(n[t]=e[t]);s[l.nodeName]=n,"text"===l.nodeName&&delete s.text.fill,t.removeChild(u)}for(let e in c)(p().isFirefox||p().isMS||p().isSafari||Object.hasOwnProperty.call(c,e))&&function(e,t){if(d=g=!1,r.length){for(f=r.length;f--&&!g;)g=r[f].test(t);d=!g}for("transform"===t&&"none"===e&&(d=!0),f=n.length;f--&&!d;){if(t.length>1e3)throw Error("Input too long");d=n[f].test(t)||"function"==typeof e}!d&&(h[t]!==e||"svg"===l.nodeName)&&s[l.nodeName][t]!==e&&(i&&-1===i.indexOf(t)?m[t]=e:e&&l.setAttribute(t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),e))}(c[e],e);if(D(l,m),"svg"===l.nodeName&&l.setAttribute("stroke-width","1px"),"text"===l.nodeName)return;[].forEach.call(l.children||l.childNodes,e)}}(this.container.querySelector("svg")),t.parentNode.removeChild(t),l.parentNode.removeChild(l)}function S(e){let{scrollablePlotArea:t}=this;(t?[t.fixedDiv,t.scrollingContainer]:[this.container]).forEach(function(t){e.appendChild(t)})}function C(){let e=this,t=(t,n,i)=>{e.isDirtyExporting=!0,V(!0,e.options[t],n),z(i,!0)&&e.redraw()};e.exporting={update:function(e,n){t("exporting",e,n)}},g.compose(e).navigation.addUpdate((e,n)=>{t("navigation",e,n)})}function T({alignTo:e,key:t,textPxLength:n}){let i=this.options.exporting,{align:o,buttonSpacing:r=0,verticalAlign:s,width:l=0}=V(this.options.navigation?.buttonOptions,i?.buttons?.contextButton),a=e.width-n,c=l+r;(i?.enabled??!0)&&"title"===t&&"right"===o&&"top"===s&&a<2*c&&(a<c?e.width-=c:this.title?.alignValue!=="left"&&(e.x-=c-a/2))}function O(){let e=this;e.isPrinting||(t=e,p().isSafari||e.beforePrint(),setTimeout(()=>{N.focus(),N.print(),p().isSafari||setTimeout(()=>{e.afterPrint()},1e3)},1))}function K(){let e=this,t=e.options.exporting,n=t.buttons,i=e.isDirtyExporting||!e.exportSVGElements;e.buttonOffset=0,e.isDirtyExporting&&e.destroyExport(),i&&!1!==t.enabled&&(e.exportEvents=[],e.exportingGroup=e.exportingGroup||e.renderer.g("exporting-group").attr({zIndex:3}).add(),$(n,function(t){e.addButton(t)}),e.isDirtyExporting=!1)}function B(e,t){let n=e.indexOf("</svg>")+6,i=e.substr(n);return e=e.substr(0,n),t&&t.exporting&&t.exporting.allowHTML&&i&&(i='<foreignObject x="0" y="0" width="'+t.chart.width+'" height="'+t.chart.height+'"><body xmlns="http://www.w3.org/1999/xhtml">'+i.replace(/(<(?:img|br).*?(?=\>))>/g,"$1 />")+"</body></foreignObject>",e=e.replace("</svg>",i+"</svg>")),e=e.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery\d+="[^"]+"/g,"").replace(/url\(("|")(.*?)("|")\;?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS\d+\:)?href=/g," xlink:href=").replace(/\n+/g," ").replace(/(fill|stroke)="rgba\(([ \d]+,[ \d]+,[ \d]+),([ \d\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/ /g,"\xa0").replace(/­/g,"\xad")}e.compose=function(e,n){x.compose(n),E.compose(e);let i=e.prototype;i.exportChart||(i.afterPrint=s,i.exportChart=u,i.inlineStyles=w,i.print=O,i.sanitizeSVG=B,i.getChartHTML=f,i.getSVG=b,i.getSVGForExport=v,i.getFilename=y,i.moveContainers=S,i.beforePrint=l,i.contextMenu=c,i.addButton=r,i.destroyExport=h,i.renderExporting=K,i.callbacks.push(a),H(e,"init",C),H(e,"layOutTitle",T),p().isSafari&&N.matchMedia("print").addListener(function(e){t&&(e.matches?t.beforePrint():t.afterPrint())}),P.exporting=V(m.exporting,P.exporting),P.lang=V(m.lang,P.lang),P.n
64856avigation=V(m.navigation,P.navigation))}}(r||(r={}));let K=r,B=p();B.HttpUtilities=B.HttpUtilities||F,B.ajax=B.HttpUtilities.ajax,B.getJSON=B.HttpUtilities.getJSON,B.post=B.HttpUtilities.post,K.compose(B.Chart,B.Renderer);let J=p();return c.default})()); 64857 64858!/** 64859 * Highcharts JS v12.0.1 (2024-11-28) 64860 * @module highcharts/modules/offline-exporting 64861 * @requires highcharts 64862 * @requires highcharts/modules/exporting 64863 * 64864 * Client side exporting module 64865 * 64866 * (c) 2015-2024 Torstein Honsi / Oystein Moseng 64867 * 64868 * License: www.highcharts.com/license 64869 */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("highcharts"),require("highcharts").AST,require("highcharts").Chart,require("highcharts").HttpUtilities):"function"==typeof define&&define.amd?define("highcharts/offline-exporting",[["highcharts/highcharts"],["highcharts/highcharts","AST"],["highcharts/highcharts","Chart"],["highcharts/highcharts","HttpUtilities"]],t):"object"==typeof exports?exports["highcharts/offline-exporting"]=t(require("highcharts"),require("highcharts").AST,require("highcharts").Chart,require("highcharts").HttpUtilities):e.Highcharts=t(e.Highcharts,e.Highcharts.AST,e.Highcharts.Chart,e.Highcharts.HttpUtilities)}(this,(e,t,n,o)=>(()=>{"use strict";var i,r,l,s,a={660:e=>{e.exports=t},960:e=>{e.exports=n},156:e=>{e.exports=o},944:t=>{t.exports=e}},c={};function h(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return a[e](n,n.exports,h),n.exports}h.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return h.d(t,{a:t}),t},h.d=(e,t)=>{for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var d={};h.d(d,{default:()=>ed});var p=h(944),u=/*#__PURE__*/h.n(p);let{isSafari:g,win:f,win:{document:m}}=u(),x=f.URL||f.webkitURL||f;function y(e){let t=e.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);if(t&&t.length>3&&f.atob&&f.ArrayBuffer&&f.Uint8Array&&f.Blob&&x.createObjectURL){let e=f.atob(t[3]),n=new f.ArrayBuffer(e.length),o=new f.Uint8Array(n);for(let t=0;t<o.length;++t)o[t]=e.charCodeAt(t);return x.createObjectURL(new f.Blob([o],{type:t[1]}))}}let b={dataURLtoBlob:y,downloadURL:function(e,t){let n=f.navigator,o=m.createElement("a");if("string"!=typeof e&&!(e instanceof String)&&n.msSaveOrOpenBlob){n.msSaveOrOpenBlob(e,t);return}if(e=""+e,n.userAgent.length>1e3)throw Error("Input too long");let i=/Edge\/\d+/.test(n.userAgent);if((g&&"string"==typeof e&&0===e.indexOf("data:application/pdf")||i||e.length>2e6)&&!(e=y(e)||""))throw Error("Failed to convert to blob");if(void 0!==o.download)o.href=e,o.download=t,m.body.appendChild(o),o.click(),m.body.removeChild(o);else try{if(!f.open(e,"chart"))throw Error("Failed to open window")}catch{f.location.href=e}}};var v=h(660),w=/*#__PURE__*/h.n(v);h(960),function(e){e.compose=function(e){return e.navigation||(e.navigation=new t(e)),e};class t{constructor(e){this.updates=[],this.chart=e}addUpdate(e){this.chart.navigation.updates.push(e)}update(e,t){this.updates.forEach(n=>{n.call(this.chart,e,t)})}}e.Additions=t}(i||(i={}));let S=i,{isTouchDevice:E}=u(),C={exporting:{allowTableSorting:!0,type:"image/png",url:"https://export-svg.highcharts.com/",pdfFont:{normal:void 0,bold:void 0,bolditalic:void 0,italic:void 0},printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:["viewFullscreen","printChart","separator","downloadPNG","downloadJPEG","downloadSVG"],y:-5}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen&&this.fullscreen.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}}
64869,downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}},lang:{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"},navigation:{buttonOptions:{symbolSize:14,symbolX:14.5,symbolY:13.5,align:"right",buttonSpacing:5,height:28,verticalAlign:"top",width:28,symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",padding:5,stroke:"none","stroke-linecap":"round"}},menuStyle:{border:"none",borderRadius:"3px",background:"#ffffff",padding:"0.5em"},menuItemStyle:{background:"none",borderRadius:"3px",color:"#333333",padding:"0.5em",fontSize:E?"0.9em":"0.8em",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#f2f2f2"}}};!function(e){let t=[];function n(e,t,n,o){return[["M",e,t+2.5],["L",e+n,t+2.5],["M",e,t+o/2+.5],["L",e+n,t+o/2+.5],["M",e,t+o-1.5],["L",e+n,t+o-1.5]]}function o(e,t,n,o){let i=o/3-2;return[].concat(this.circle(n-i,t,i,i),this.circle(n-i,t+i+4,i,i),this.circle(n-i,t+2*(i+4),i,i))}e.compose=function(e){if(-1===t.indexOf(e)){t.push(e);let i=e.prototype.symbols;i.menu=n,i.menuball=o.bind(i)}}}(r||(r={}));let F=r,{composed:O}=u(),{addEvent:T,fireEvent:k,pushUnique:L}=u();function M(){this.fullscreen=new N(this)}class N{static compose(e){L(O,"Fullscreen")&&T(e,"beforeRender",M)}constructor(e){this.chart=e,this.isOpen=!1;let t=e.renderTo;!this.browserProps&&("function"==typeof t.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:t.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:t.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:t.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}close(){let e=this,t=e.chart,n=t.options.chart;k(t,"fullscreenClose",null,function(){e.isOpen&&e.browserProps&&t.container.ownerDocument instanceof Document&&t.container.ownerDocument[e.browserProps.exitFullscreen](),e.unbindFullscreenEvent&&(e.unbindFullscreenEvent=e.unbindFullscreenEvent()),t.setSize(e.origWidth,e.origHeight,!1),e.origWidth=void 0,e.origHeight=void 0,n.width=e.origWidthOption,n.height=e.origHeightOption,e.origWidthOption=void 0,e.origHeightOption=void 0,e.isOpen=!1,e.setButtonText()})}open(){let e=this,t=e.chart,n=t.options.chart;k(t,"fullscreenOpen",null,function(){if(n&&(e.origWidthOption=n.width,e.origHeightOption=n.height),e.origWidth=t.chartWidth,e.origHeight=t.chartHeight,e.browserProps){let n=T(t.container.ownerDocument,e.browserProps.fullscreenChange,function(){e.isOpen?(e.isOpen=!1,e.close()):(t.setSize(null,null,!1),e.isOpen=!0,e.setButtonText())}),o=T(t,"destroy",n);e.unbindFullscreenEvent=()=>{n(),o()};let i=t.renderTo[e.browserProps.requestFullscreen]();i&&i.catch(function(){alert("Full screen is not supported inside a frame.")})}})}setButtonText(){let e=this.chart,t=e.exportDivElements,n=e.options.exporting,o=n&&n.buttons&&n.buttons.contextButton.menuItems,i=e.options.lang;if(n&&n.menuItemDefinitions&&i&&i.exitFullscreen&&i.viewFullscreen&&o&&t){let e=t[o.indexOf("viewFullscreen")];e&&w().setElementHTML(e,this.isOpen?i.exitFullscreen:n.menuItemDefinitions.viewFullscreen.text||i.viewFullscreen)}}toggle(){this.isOpen?this.close():this.open()}}var P=h(156),G=/*#__PURE__*/h.n(P);let{defaultOptions:D}=u(),{doc:A,SVG_NS:R,win:H}=u(),{addEvent:B,css:I,createElement:U,discardElement:V,extend:j,find:q,fireEvent:W,isObject:z,merge:$,objectEach:K,pick:J,removeEvent:_,uniqueKey:X}=u();!function(e){let t;let n=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/^parentRule$/,/^(cssRules|ownerRules)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/,/^\d+$/],o=["fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","textAnchor","x","y"];e.inlineAllowlist=[];let i=["clipPath","defs","desc"];function r(e){let t,n;let o=this,i=o.renderer,r=$(o.options.navigation.buttonOptions,e),l=r.onclick,s=r.menuItems,a=r.symbolSize||12;if(o.btnCount||(o.btnCount=0),o.exportDivElements||(o.exportDivElements=[],o.exportSVGElements=[]),!1===r.enabled||!r.theme)return;let c=o.styledMode?{}:r.theme;l?n=function(e){e&&e.stopPropagation(),l.call(o,e)}:s&&(n=function(e){e&&e.stopPropagation(),o.contextMenu(h.menuClassName,s,h.translateX||0,h.translateY||0,h.width||0,h.height||0,h),h.setState(2)}),r.text&&r.symbol?c.paddingLeft=J(c.paddingLeft,30):r.text||j(c,{width:r.width,height:r.height,padding:0});let h=i.button(r.text,0,0,n,c,void 0,void 0,void 0,void 0,r.useHTML).addClass(e.className).attr({title:J(o.options.lang[r._titleKey||r.titleKey],"")});h.menuClassName=e.menuClassName||"highcharts-menu-"+o.btnCount++,r.symbol&&(t=i.symbol(r.symbol,Math.round((r.symbolX||0)-a/2),Math.round((r.symbolY||0)-a/2),a,a,{width:a,height:a}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(h),o.styledMode||t.attr({stroke:r.symbolStroke,fill:r.symbolFill,"stroke-width":r.symbolStrokeWidth||1})),h.add(o.exportingGroup).align(j(r,{width:h.width,x:J(r.x,o.buttonOffset)}),!0,"spacingBox"),o.buttonOffset+=((h.width||0)+r.buttonSpacing)*("right"===r.align?-1:1),o.exportSVGElements.push(h,t)}function l(){if(!this.printReverseInfo)return;let{childNodes:e,origDisplay:n,resetParams:o}=this.printReverseInfo;this.moveContainers(this.renderTo),[].forEach.call(e,function(e,t){1===e.nodeType&&(e.style.display=n[t]||"")}),this.isPrinting=!1,o&&this.setSize.apply(this,o),delete this.printReverseInfo,t=void 0,W(this,"afterPrint")}function s(){let e=A.body,t=this.options.exporting.printMaxWidth,n={childNodes:e.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0,this.pointer?.reset(void 0,0),W(this,"beforePrint"),t&&this.chartWidth>t&&(n.resetParams=[this.options.chart.width,void 0,!1],this.setSize(t,void 0,!1)),[].forEach.call(n.childNodes,function(e,t){1===e.nodeType&&(n.origDisplay[t]=e.style.display,e.style.display="none")}),this.moveContainers(e),this.printReverseInfo=n}function a(e){e.renderExporting(),B(e,"redraw",e.renderExporting),B(e,"destroy",e.destroyExport)}function c(e,t,n,o,i,r,l){let s=this,a=s.options.navigation,c=s.chartWidth,h=s.chartHe
64869ight,d="cache-"+e,p=Math.max(i,r),g,f=s[d];f||(s.exportContextMenu=s[d]=f=U("div",{className:e},{position:"absolute",zIndex:1e3,padding:p+"px",pointerEvents:"auto",...s.renderer.style},s.scrollablePlotArea?.fixedDiv||s.container),g=U("ul",{className:"highcharts-menu"},s.styledMode?{}:{listStyle:"none",margin:0,padding:0},f),s.styledMode||I(g,j({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},a.menuStyle)),f.hideMenu=function(){I(f,{display:"none"}),l&&l.setState(0),s.openMenu=!1,I(s.renderTo,{overflow:"hidden"}),I(s.container,{overflow:"hidden"}),u().clearTimeout(f.hideTimer),W(s,"exportMenuHidden")},s.exportEvents.push(B(f,"mouseleave",function(){f.hideTimer=H.setTimeout(f.hideMenu,500)}),B(f,"mouseenter",function(){u().clearTimeout(f.hideTimer)}),B(A,"mouseup",function(t){s.pointer?.inClass(t.target,e)||f.hideMenu()}),B(f,"click",function(){s.openMenu&&f.hideMenu()})),t.forEach(function(e){if("string"==typeof e&&(e=s.options.exporting.menuItemDefinitions[e]),z(e,!0)){let t;e.separator?t=U("hr",void 0,void 0,g):("viewData"===e.textKey&&s.isDataTableVisible&&(e.textKey="hideData"),t=U("li",{className:"highcharts-menu-item",onclick:function(t){t&&t.stopPropagation(),f.hideMenu(),"string"!=typeof e&&e.onclick&&e.onclick.apply(s,arguments)}},void 0,g),w().setElementHTML(t,e.text||s.options.lang[e.textKey]),s.styledMode||(t.onmouseover=function(){I(this,a.menuItemHoverStyle)},t.onmouseout=function(){I(this,a.menuItemStyle)},I(t,j({cursor:"pointer"},a.menuItemStyle||{})))),s.exportDivElements.push(t)}}),s.exportDivElements.push(g,f),s.exportMenuWidth=f.offsetWidth,s.exportMenuHeight=f.offsetHeight);let m={display:"block"};n+(s.exportMenuWidth||0)>c?m.right=c-n-i-p+"px":m.left=n-p+"px",o+r+(s.exportMenuHeight||0)>h&&l.alignOptions?.verticalAlign!=="top"?m.bottom=h-o-p+"px":m.top=o+r-p+"px",I(f,m),I(s.renderTo,{overflow:""}),I(s.container,{overflow:""}),s.openMenu=!0,W(s,"exportMenuShown")}function h(e){let t;let n=e?e.target:this,o=n.exportSVGElements,i=n.exportDivElements,r=n.exportEvents;o&&(o.forEach((e,i)=>{e&&(e.onclick=e.ontouchstart=null,n[t="cache-"+e.menuClassName]&&delete n[t],o[i]=e.destroy())}),o.length=0),n.exportingGroup&&(n.exportingGroup.destroy(),delete n.exportingGroup),i&&(i.forEach(function(e,t){e&&(u().clearTimeout(e.hideTimer),_(e,"mouseleave"),i[t]=e.onmouseout=e.onmouseover=e.ontouchstart=e.onclick=null,V(e))}),i.length=0),r&&(r.forEach(function(e){e()}),r.length=0)}function d(e,t){let n=this.getSVGForExport(e,t);e=$(this.options.exporting,e),G().post(e.url,{filename:e.filename?e.filename.replace(/\//g,"-"):this.getFilename(),type:e.type,width:e.width,scale:e.scale,svg:n},e.fetchOptions)}function p(e){return e&&this.inlineStyles(),this.container.innerHTML}function g(){let e=this.userOptions.title&&this.userOptions.title.text,t=this.options.exporting.filename;return t?t.replace(/\//g,"-"):("string"==typeof e&&(t=e.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z\d\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,"")),(!t||t.length<5)&&(t="chart"),t)}function f(e){let t,n,o=$(this.options,e);o.plotOptions=$(this.userOptions.plotOptions,e&&e.plotOptions),o.time=$(this.userOptions.time,e&&e.time);let i=U("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},A.body),r=this.renderTo.style.width,l=this.renderTo.style.height,s=o.exporting.sourceWidth||o.chart.width||/px$/.test(r)&&parseInt(r,10)||(o.isGantt?800:600),a=o.exporting.sourceHeight||o.chart.height||/px$/.test(l)&&parseInt(l,10)||400;j(o.chart,{animation:!1,renderTo:i,forExport:!0,renderer:"SVGRenderer",width:s,height:a}),o.exporting.enabled=!1,delete o.data,o.series=[],this.series.forEach(function(e){(n=$(e.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:e.visible})).isInternal||o.series.push(n)});let c={};this.axes.forEach(function(e){e.userOptions.internalKey||(e.userOptions.internalKey=X()),e.options.isInternal||(c[e.coll]||(c[e.coll]=!0,o[e.coll]=[]),o[e.coll].push($(e.userOptions,{visible:e.visible,type:e.type,uniqueNames:e.uniqueNames})))}),o.colorAxis=this.userOptions.colorAxis;let h=new this.constructor(o,this.callback);return e&&["xAxis","yAxis","series"].forEach(function(t){let n={};e[t]&&(n[t]=e[t],h.update(n))}
64869),this.axes.forEach(function(e){let t=q(h.axes,function(t){return t.options.internalKey===e.userOptions.internalKey}),n=e.getExtremes(),o=n.userMin,i=n.userMax;t&&(void 0!==o&&o!==t.min||void 0!==i&&i!==t.max)&&t.setExtremes(o,i,!0,!1)}),t=h.getChartHTML(this.styledMode||o.exporting?.applyStyleSheets),W(this,"getSVG",{chartCopy:h}),t=this.sanitizeSVG(t,o),o=null,h.destroy(),V(i),t}function m(e,t){let n=this.options.exporting;return this.getSVG($({chart:{borderRadius:0}},n.chartOptions,t,{exporting:{sourceWidth:e&&e.sourceWidth||n.sourceWidth,sourceHeight:e&&e.sourceHeight||n.sourceHeight}}))}function x(){let t;let r=e.inlineAllowlist,l={},s=A.createElement("iframe");I(s,{width:"1px",height:"1px",visibility:"hidden"}),A.body.appendChild(s);let a=s.contentWindow&&s.contentWindow.document;a&&a.body.appendChild(a.createElementNS(R,"svg")),function e(s){let c,h,d,p,g,f;let m={};if(a&&1===s.nodeType&&-1===i.indexOf(s.nodeName)){if(c=H.getComputedStyle(s,null),h="svg"===s.nodeName?{}:H.getComputedStyle(s.parentNode,null),!l[s.nodeName]){t=a.getElementsByTagName("svg")[0],d=a.createElementNS(s.namespaceURI,s.nodeName),t.appendChild(d);let e=H.getComputedStyle(d,null),n={};for(let t in e)t.length<1e3&&"string"==typeof e[t]&&!/^\d+$/.test(t)&&(n[t]=e[t]);l[s.nodeName]=n,"text"===s.nodeName&&delete l.text.fill,t.removeChild(d)}for(let e in c)(u().isFirefox||u().isMS||u().isSafari||Object.hasOwnProperty.call(c,e))&&function(e,t){if(p=g=!1,r.length){for(f=r.length;f--&&!g;)g=r[f].test(t);p=!g}for("transform"===t&&"none"===e&&(p=!0),f=n.length;f--&&!p;){if(t.length>1e3)throw Error("Input too long");p=n[f].test(t)||"function"==typeof e}!p&&(h[t]!==e||"svg"===s.nodeName)&&l[s.nodeName][t]!==e&&(o&&-1===o.indexOf(t)?m[t]=e:e&&s.setAttribute(t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),e))}(c[e],e);if(I(s,m),"svg"===s.nodeName&&s.setAttribute("stroke-width","1px"),"text"===s.nodeName)return;[].forEach.call(s.children||s.childNodes,e)}}(this.container.querySelector("svg")),t.parentNode.removeChild(t),s.parentNode.removeChild(s)}function y(e){let{scrollablePlotArea:t}=this;(t?[t.fixedDiv,t.scrollingContainer]:[this.container]).forEach(function(t){e.appendChild(t)})}function b(){let e=this,t=(t,n,o)=>{e.isDirtyExporting=!0,$(!0,e.options[t],n),J(o,!0)&&e.redraw()};e.exporting={update:function(e,n){t("exporting",e,n)}},S.compose(e).navigation.addUpdate((e,n)=>{t("navigation",e,n)})}function v({alignTo:e,key:t,textPxLength:n}){let o=this.options.exporting,{align:i,buttonSpacing:r=0,verticalAlign:l,width:s=0}=$(this.options.navigation?.buttonOptions,o?.buttons?.contextButton),a=e.width-n,c=s+r;(o?.enabled??!0)&&"title"===t&&"right"===i&&"top"===l&&a<2*c&&(a<c?e.width-=c:this.title?.alignValue!=="left"&&(e.x-=c-a/2))}function E(){let e=this;e.isPrinting||(t=e,u().isSafari||e.beforePrint(),setTimeout(()=>{H.focus(),H.print(),u().isSafari||setTimeout(()=>{e.afterPrint()},1e3)},1))}function O(){let e=this,t=e.options.exporting,n=t.buttons,o=e.isDirtyExporting||!e.exportSVGElements;e.buttonOffset=0,e.isDirtyExporting&&e.destroyExport(),o&&!1!==t.enabled&&(e.exportEvents=[],e.exportingGroup=e.exportingGroup||e.renderer.g("exporting-group").attr({zIndex:3}).add(),K(n,function(t){e.addButton(t)}),e.isDirtyExporting=!1)}function T(e,t){let n=e.indexOf("</svg>")+6,o=e.substr(n);return e=e.substr(0,n),t&&t.exporting&&t.exporting.allowHTML&&o&&(o='<foreignObject x="0" y="0" width="'+t.chart.width+'" height="'+t.chart.height+'"><body xmlns="http://www.w3.org/1999/xhtml">'+o.replace(/(<(?:img|br).*?(?=\>))>/g,"$1 />")+"</body></foreignObject>",e=e.replace("</svg>",o+"</svg>")),e=e.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery\d+="[^"]+"/g,"").replace(/url\(("|")(.*?)("|")\;?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS\d+\:)?href=/g," xlink:href=").replace(/\n+/g," ").replace(/(fill|stroke)="rgba\(([ \d]+,[ \d]+,[ \d]+),([ \d\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/ /g,"\xa0").replace(/­/g,"\xad")}
64869e.compose=function(e,n){F.compose(n),N.compose(e);let o=e.prototype;o.exportChart||(o.afterPrint=l,o.exportChart=d,o.inlineStyles=x,o.print=E,o.sanitizeSVG=T,o.getChartHTML=p,o.getSVG=f,o.getSVGForExport=m,o.getFilename=g,o.moveContainers=y,o.beforePrint=s,o.contextMenu=c,o.addButton=r,o.destroyExport=h,o.renderExporting=O,o.callbacks.push(a),B(e,"init",b),B(e,"layOutTitle",v),u().isSafari&&H.matchMedia("print").addListener(function(e){t&&(e.matches?t.beforePrint():t.afterPrint())}),D.exporting=$(C.exporting,D.exporting),D.lang=$(C.lang,D.lang),D.navigation=$(C.navigation,D.navigation))}}(l||(l={}));let Y=l,Z={libURL:"https://code.highcharts.com/12.0.1/lib/",menuItemDefinitions:{downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChartLocal()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChartLocal({type:"image/jpeg"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChartLocal({type:"image/svg+xml"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChartLocal({type:"application/pdf"})}}}},{defaultOptions:Q}=u(),{downloadURL:ee}=b,{doc:et,win:en}=u(),{ajax:eo}=G(),{addEvent:ei,error:er,extend:el,fireEvent:es,merge:ea}=u();w().allowedAttributes.push("data-z-index","fill-opacity","filter","rx","ry","stroke-dasharray","stroke-linejoin","stroke-opacity","text-anchor","transform","version","viewBox","visibility","xmlns","xmlns:xlink"),w().allowedTags.push("desc","clippath","g"),function(e){function t(t,n){let o=this,i=ea(o.options.exporting,t),r=function(e){!1===i.fallbackToExportServer?i.error?i.error(i,e):er(28,!0):o.exportChart(i)};if(u().isMS&&o.styledMode&&!Y.inlineAllowlist.length&&Y.inlineAllowlist.push(/^blockSize/,/^border/,/^caretColor/,/^color/,/^columnRule/,/^columnRuleColor/,/^cssFloat/,/^cursor/,/^fill$/,/^fillOpacity/,/^font/,/^inlineSize/,/^length/,/^lineHeight/,/^opacity/,/^outline/,/^parentRule/,/^rx$/,/^ry$/,/^stroke/,/^textAlign/,/^textAnchor/,/^textDecoration/,/^transform/,/^vectorEffect/,/^visibility/,/^x$/,/^y$/),u().isMS&&("application/pdf"===i.type||o.container.getElementsByTagName("image").length&&"image/svg+xml"!==i.type)||"application/pdf"===i.type&&[].some.call(o.container.getElementsByTagName("image"),function(e){let t=e.getAttribute("href");return""!==t&&"string"==typeof t&&0!==t.indexOf("data:")})){r(Error("Image type not supported for this chart/browser."));return}o.getSVGForLocalExport(i,n||{},r,function(t){t.indexOf("<foreignObject")>-1&&"image/svg+xml"!==i.type&&(u().isMS||"application/pdf"===i.type)?r(Error("Image type not supported for charts with embedded HTML")):e.downloadSVGLocal(t,el({filename:o.getFilename()},i),r,()=>es(o,"exportChartLocalSuccess"))})}function n(e,t){let n=et.getElementsByTagName("head")[0],o=et.createElement("script");o.type="text/javascript",o.src=e,o.onload=t,o.onerror=function(){er("Error loading script "+e)},n.appendChild(o)}function o(t,n,o,i){let r=this,l=e=>r.sanitizeSVG(e,d),s=()=>{u&&f===g&&i(l(h.innerHTML))},a=(e,t,n)=>{++f,n.imageElement.setAttributeNS("http://www.w3.org/1999/xlink","href",e),s()},c,h,d,p=null,u,g=0,f=0;r.unbindGetSVG=ei(r,"getSVG",e=>{d=e.chartCopy.options,g=(u=(h=e.chartCopy.container.cloneNode(!0))&&h.getElementsByTagName("image")||[]).length}),r.getSVGForExport(t,n);try{if(!u||!u.length){i(l(h.innerHTML));return}for(let n=0;n<u.length;n++)(p=(c=u[n]).getAttributeNS("http://www.w3.org/1999/xlink","href"))?e.imageToDataUrl(p,"image/png",{imageElement:c},t.scale,a,o,o,o):(f++,c.parentNode.removeChild(c),n--,s())}catch(e){o(e)}r.unbindGetSVG()}function i(t,n,o,i,r,l,s,a,c){let h=new en.Image,d,p=()=>{setTimeout(function(){let e;let l=et.createElement("canvas"),a=l.getContext&&l.getContext("2d");try{if(a){l.height=h.height*i,l.width=h.width*i,a.drawImage(h,0,0,l.width,l.height);try{e=l.toDataURL(n),r(e,n,o,i)}catch(e){d(t,n,o,i)}}else s(t,n,o,i)}finally{c&&c(t,n,o,i)}},e.loadEventDeferDelay)},u=()=>{a(t,n,o,i),c&&c(t,n,o,i)};d=()=>{h=new en.Image,d=l,h.crossOrigin="Anonymous",h.onload=p,h.onerror=u,h.src=t},h.onload=p,h.onerror=u,h.src=t}function r(t){let n=en.navigator.userAgent,o=n.indexOf("WebKit")>-1&&0>n.indexOf("Chrome");try{if(!o&&-1===t.indexOf("<foreignObject"))return e.domurl.createObjectURL(new en.Blob([t],{type:"image/svg+xml;charset-utf-16"}))}catch(e){}return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(t)}function l(e,t,n,o){let i=(Number(e.getAttribute("width"))+2*t)*n,r=(Number(e.getAttribute("height"))+2*t)*n,l=new en.jspdf.jsPDF(r>i?"p":"l","pt",[i,r]);[].forEach.call(e.querySelectorAll('*[visibility="hidden"]'),function(e){e.parentNode.removeChild(e)});let s=e.querySelectorAll("linearGradient");for(let e=0;e<s.length;e++){let t=s[e].querySelectorAll("stop"),n=0;for(;n<t.length&&"0"===t[n].getAttribute("offset")&&"0"===t[n+1].getAttribute("offset");)t[n].remove(),n++}[].forEach.call(e.querySelectorAll("tspan"),e=>{"â"===e.textContent&&(e.textContent=" ",e.setAttribute("dx",-5))}),l.svg(e,{x:0,y:0,width:i,height:r,removeInvalid:!0}).then(()=>o(l.output("datauristring")))}e.CanVGRenderer={},e.domurl=en.URL||en.webkitURL||en,e.loadEventDeferDelay=u().isMS?150:0,e.compose=function(e){let n=e.prototype;return n.exportChartLocal||(n.getSVGForLocalExport=o,n.exportChartLocal=t,ea(!0,Q.exporting,Z)),e},e.downloadSVGLocal=function(t,o,s,a){let c=et.createElement("div"),h=o.type||"image/png",d=(o.filename||"chart")+"."+("image/svg+xml"===h?"svg":h.split("/")[1]),p=o.scale||1,u,g,f,m=o.libURL||Q.exporting.libURL,x=!0,y=o.pdfFont;m="/"!==m.slice(-1)?m+"/":m;let b=(e,t)=>{let n,o;let i=(e,t)=>{en.jspdf.jsPDF.API.events.push(["initialized",function(){this.addFileToVFS(e,t),this.addFont(e,"HighchartsFont",e),this.getFontList(
64869).HighchartsFont||this.setFont("HighchartsFont")}])};y&&(o=e.textContent||"",!/[^\u0000-\u007F\u200B]+/.test(o))&&(y=void 0);let r=["normal","italic","bold","bolditalic"],l=()=>{let e=r.shift();if(!e)return t();let o=y&&y[e];o?eo({url:o,responseType:"blob",success:(t,o)=>{let r=new FileReader;r.onloadend=function(){if("string"==typeof this.result){let t=this.result.split(",")[1];i(e,t),"normal"===e&&(n=t)}l()},r.readAsDataURL(o.response)},error:l}):(n&&i(e,n),l())};l()},v=()=>{let e,n;w().setElementHTML(c,t);let o=c.getElementsByTagName("text"),i=function(e,t){let n=e;for(;n&&n!==c;){if(n.style[t]){let o=n.style[t];"fontSize"===t&&/em$/.test(o)&&(o=Math.round(16*parseFloat(o))+"px"),e.style[t]=o;break}n=n.parentNode}};[].forEach.call(o,function(t){for(["fontFamily","fontSize"].forEach(e=>{i(t,e)}),t.style.fontFamily=y&&y.normal?"HighchartsFont":String(t.style.fontFamily&&t.style.fontFamily.split(" ").splice(-1)),e=t.getElementsByTagName("title"),[].forEach.call(e,function(e){t.removeChild(e)}),n=t.getElementsByClassName("highcharts-text-outline");n.length>0;){let e=n[0];e.parentNode&&e.parentNode.removeChild(e)}});let r=c.querySelector("svg");r&&b(r,()=>{l(r,0,p,e=>{try{ee(e,d),a&&a()}catch(e){s(e)}})})};if("image/svg+xml"===h)try{void 0!==en.MSBlobBuilder?((g=new en.MSBlobBuilder).append(t),u=g.getBlob("image/svg+xml")):u=r(t),ee(u,d),a&&a()}catch(e){s(e)}else"application/pdf"===h?en.jspdf&&en.jspdf.jsPDF?v():(x=!0,n(m+"jspdf.js",function(){n(m+"svg2pdf.js",v)})):(u=r(t),f=function(){try{e.domurl.revokeObjectURL(u)}catch(e){}},i(u,h,{},p,function(e){try{ee(e,d),a&&a()}catch(e){s(e)}},function(){if(t.length>1e8)throw Error("Input too long");let e=et.createElement("canvas"),o=e.getContext("2d"),i=t.match(/^<svg[^>]*\s{,1000}width\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/),r=t.match(/^<svg[^>]*\s{0,1000}height\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/);if(o&&i&&r){let l=+i[1]*p,c=+r[1]*p,u=()=>{en.canvg.Canvg.fromString(o,t).start();try{ee(en.navigator.msSaveOrOpenBlob?e.msToBlob():e.toDataURL(h),d),a&&a()}catch(e){s(e)}finally{f()}};e.width=l,e.height=c,en.canvg?u():(x=!0,n(m+"canvg.js",u))}},s,s,function(){x&&f()}))},e.getScript=n,e.imageToDataUrl=i,e.svgToDataUrl=r,e.svgToPdf=l}(s||(s={}));let ec=s,eh=u();eh.dataURLtoBlob=eh.dataURLtoBlob||b.dataURLtoBlob,eh.downloadSVGLocal=ec.downloadSVGLocal,eh.downloadURL=eh.downloadURL||b.downloadURL,ec.compose(eh.Chart);let ed=u();return d.default})()); 64870
vendor: 436,980 bytes, lines 64871-64878
64871/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */ 64872var DO_NOT_EXPORT_CODEPAGE=true;var cptable={version:"1.15.0"};cptable[437]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Ãüéâäà åçêëèïîìÃà ÃæÃôöòûùÿÃÃÂ¢Â£Â¥â§ÆÃ¡Ãóúñ꺿⬽¼¡«»âââââ¤â¡â¢âââ£ââââââââ´â¬âââ¼âââââ©â¦â ââ¬â§â¨â¤â¥âââââ«âªâââââââαÃÎÏΣϵÏΦÎΩδâÏεâ©â¡Â±â¥â¤â â¡Ã·â°â·ââ¿Â²â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[620]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ÃÃ¼Ã©Ã¢Ã¤Ã Ä Ã§ÃªÃ«Ã¨Ã¯Ã®ÄÃÄÄÄÅôöÄûùÅÃâÅÂ¥ÅÆÅ¹Å»Ã³ÃÅÅźż¿â¬½¼¡«»âââââ¤â¡â¢âââ£ââââââââ´â¬âââ¼âââââ©â¦â ââ¬â§â¨â¤â¥âââââ«âªâââââââαÃÎÏΣϵÏΦÎΩδâÏεâ©â¡Â±â¥â¤â â¡Ã·â°â·ââ¿Â²â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[737]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοÏÏÏÏÏÏ ÏÏÏâââââ¤â¡â¢âââ£ââââââââ´â¬âââ¼âââââ©â¦â ââ¬â§â¨â¤â¥âââââ«âªâââââââÏάÎήÏίÏÏÏÏÎÎÎÎÎÎαâ¥â¤ÎªÎ«Ã·â°â·ââ¿Â²â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[850]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Ãüéâäà åçêëèïîìÃà ÃæÃôöòûùÿÃÃø£ÃÃÆÃ¡Ãóúñ꺿®¬½¼¡«»âââââ¤ÃÃéâ£ââ⢥âââ´â¬âââ¼Ã£Ãâââ©â¦â ââ¬Â¤Ã°ÃÃÃÃıÃÃÃââââ¦ÃâÃÃÃÃõõþÃÃÃÃýï´Â±â¾¶§÷¸°¨·¹³²â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[852]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ÃüéâäůÄçÅëÅÅîŹÃÄÃĹĺôöĽľÅÅÃÃŤťÅÃÄáÃóúÄÄ Å½Å¾ÄĬźÄÅ«»âââââ¤ÃÃÄÅâ£ââ⯿âââ´â¬âââ¼ÄÄâââ©â¦â ââ¬Â¤ÄÄÄÃÄÅÃÃÄââââŢŮâÃÃÃÅÅÅÅ Å¡ÅÃÅŰýÃţ´ÂËËË˧÷¸°¨ËűÅÅâ  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[857]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Ãüéâäà åçêëèïîıÃà ÃæÃôöòûùİÃÃø£ÃÅÅáÃóúñÃÄÄ¿®¬½¼¡«»âââââ¤ÃÃéâ£ââ⢥âââ´â¬âââ¼Ã£Ãâââ©â¦â ââ¬Â¤ÂºÂªÃÃÃ�ÃÃÃââââ¦ÃâÃÃÃÃõõ�ÃÃÃÃìÿ¯´Â±�¾¶§÷¸°¨·¹³²â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[861]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Ãüéâäà åçêëèÃðÃÃà ÃæÃôöþûÃýÃÃø£Ãâ§ÆÃ¡ÃóúÃÃÃÿ⬽¼¡«»âââââ¤â¡â¢âââ£ââââââââ´â¬âââ¼âââââ©â¦â ââ¬â§â¨â¤â¥âââââ«âªâââââââαÃÎÏΣϵÏΦÎΩδâÏεâ©â¡Â±â¥â¤â â¡Ã·â°â·ââ¿Â²â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[865]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Ãüéâäà åçêëèïîìÃà ÃæÃôöòûùÿÃÃø£Ãâ§ÆÃ¡Ãóúñ꺿⬽¼¡«¤âââââ¤â¡â¢âââ£ââââââââ´â¬âââ¼âââââ©â¦â ââ¬â§â¨â¤â¥âââââ«âªâââââââαÃÎÏΣϵÏΦÎΩδâÏεâ©â¡Â±â¥â¤â â¡Ã·â°â·ââ¿Â²â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[866]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмнопâââââ¤â¡â¢âââ£ââââââââ´â¬âââ¼âââââ©â¦â ââ¬â§â¨â¤â¥âââââ«âªâââââââÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÐÑÐÑÐÑÐѰâ·ââ¤â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[874]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½ï¿½ï¿½ï¿½â¦ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½âââââ¢ââ�������� à¸à¸à¸à¸à¸ à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸à¸ มยรฤลฦวศษสหฬà¸à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹à¹à¹à¹à¹à¹ à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹à¹ï¿½ï¿½ï¿½ï¿½",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[895]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ÄüéÄäÄŤÄÄÄĹÃľǪÃÃÞŽôöÃůÃýÃÊĽÃÅťáÃóúÅÅÅ®ÃÅ¡ÅÅż§«»âââââ¤â¡â¢âââ£ââââââââ´â¬âââ¼âââââ©â¦â ââ¬â§â¨â¤â¥âââââ«âªâââââââαÃÎÏΣϵÏΦÎΩδâÏεâ©â¡Â±â¥â¤â â¡Ã·â°â·ââ¿Â²â  ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[932]=function(){var e=[],r={},t=[],a;t[0]="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~����������������������������������。「」、・ヲァィゥェォャï½ï½®ï½¯ï½°ï½±ï½²ï½³ï½´ï½µï½¶ï½·ï½¸ï½¹ï½ºï½»ï½¼ï½½ï½¾ï½¿ï¾ï¾ï¾ï¾ï¾ï¾ ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¾ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[0].length;++a)if(t[0][a].charCodeAt(0)!==65533){r[t[0][a]]=0+a;e[0+a]=t[0][a]}t[129]="����������������������������������������������������������������ãããï¼ï¼ã»ï¼ï¼ï¼ï¼ãã´ï½Â¨ï¼¾ï¿£ï¼¿ã½ã¾ãããä»ã ããã¼ââï¼ï¼¼ï½â¥ï½â¦â¥ââââï¼ï¼ãã[]ï½ï½ããããããããããï¼ï¼Â±Ã�÷ï¼â ï¼ï¼â¦â§ââ´ââ°â²â³âï¿¥ï¼ï¿ ï¿¡ï¼ ï¼ï¼ï¼ï¼ §ââ ââââââ¡â â³â²â½â¼â»ãââââã�����������âââââââªâ©ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½â§â¨ï¿¢ââââ�����������â â¥ââââ¡ââªâ«ââ½ââµâ«â¬ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½â«â°â¯ââªâ â¡Â¶ï¿½ï¿½ï¿½ï¿½â¯ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[129].length;++a)if(t[129][a].charCodeAt(0)!==65533){r[t[129][a]]=33024+a;e[33024+a]=t[129][a]}t[130]="�������������������������������������������������������������������������������ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¼¡ï¼¢ï¼£ï¼¤ï¼¥ï¼¦ï¼§ï¼¨ï¼©ï¼ªï¼«ï¼¬ï¼ï¼®ï¼¯ï¼°ï¼±ï¼²ï¼³ï¼´ï¼µï¼¶ï¼·ï¼¸ï¼¹ï¼ºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï½ï½ï½ï½ï½ ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï¿½ï¿½ï¿½ï¿½ããããã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ãããããã ãããããããããããããã��������������".split("");for(a=0;a!=t[130].length;++a)if(t[130][a].charCodeAt(0)!==65533){r[t[130][a]]=33280+a;e[33280+a]=t[130][a]}t[131]="����������������������������������������������������������������ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ãããããã ãããããããããããããããããããããããããã�ã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎΠΡΣΤΥΦΧΨΩ��������αβγδεζηθικλμνξοÏÏÏÏÏ ÏÏÏÏ�����������������������������������������".split("");for(a=0;a!=t[131].length;++a)if(t[131][a].charCodeAt(0)!==65533){r[t[131][a]]=33536+a;e[33536+a]=t[131][a]}t[132]="����������������������������������������������������������������ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐРСТУФХЦЧШЩЪЫЬÐЮЯ���������������абвгдеÑжзийклмн�опÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑ�������������ââââââââ¬â¤â´â¼âââââââ£â³â«â»ââ â¯â¨â·â¿ââ°â¥â¸â�����������������������������������������������������������������".split("");for(a=0;a!=t[132].length;++a)if(t[132][a].charCodeAt(0)!==65533){r[t[132][a]]=33792+a;e[33792+a]=t[132][a]}t[135]="����������������������������������������������������������������â â¡â¢â£â¤â¥â¦â§â¨â©âªâ«â¬ââ®â¯â°â±â²â³â ⠡⠢⠣⠤⠥⠦⠧⠨⠩�ããã¢ããã§ãã¶ãããã¦ã£ã«ãã»ããããããã¡ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ã»ï¿½ããâãâ¡ã¤ã¥ã¦ã§ã¨ã±ã²ã¹ã¾ã½ã¼ââ¡â«â®âââ¥â ââ¿âµâ©âªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[135].length;++a)if(t[135][a].charCodeAt(0)!==65533){r[t[135][a]]=34560+a;e[34560+a]=t[135][a]}t[136]="���������������������������������������������������������������������������������������������������������������������������������������������������������������äºåå¨é¿åææ¨å§¶é¢èµèç©æªæ¡æ¸¥æè¦è¦é¯µæ¢å§æ¡æ±å®å§è»é£´çµ¢ç¶¾é®æç²è¢·å®åºµæææ¡ééæä»¥ä¼ä½ä¾åå²å¤·å§å¨å°æææ °ææ¤ çºçç°ç§»ç¶ç·¯èèè¡£è¬ééºå»äºäº¥åè²é磯ä¸å£±æº¢é¸ç¨²è¨èé°¯å å°å½å¡å å§»å¼é£²æ·«è¤è���".split("");for(a=0;a!=t[136].length;++a)if(t[136][a].charCodeAt(0)!==65533){r[t[136][a]]=34816+a;e[34816+a]=t[136][a]}t[137]="����������������������������������������������������������������é¢é°é é»åå³å®çç¾½è¿é¨å¯éµçªºä¸ç¢è¼æ¸¦å忬è鰻姥婿µ¦çéåäºéé²èé¤å¡å¶å¬°å½±æ æ³æ 永泳洩ççç©é ´è±è¡è© éæ¶²ç«çé§ æ¦è¬è¶é²æ¦åå�åå °å¥å®´å»¶æ¨æ©æ´æ²¿æ¼ççç çç¿ç¸è¶èèé éé´å¡©æ¼æ±ç¥å¹å¤®å¥¥å¾å¿æ¼æºæ¨ªæ¬§æ®´çç¿è¥é´¬é´é»å²¡æ²è»å屿¶èæ¡¶ç¡ä¹ä¿ºå¸æ©æ¸©ç©é³ä¸åä»®ä½ä¼½ä¾¡ä½³å å¯åå¤å«å®¶å¯¡ç§æææ¶ææ²³ç«çç¦ç¦¾ç¨¼ç®è±èèè·è¯èè¦èª²å©è²¨è¿¦ééèä¿å³¨æçç»è¥è½è¾è³é é¤é§ä»ä¼è§£åå¡å£å»»å¿«æªææ¢ææææ¹ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[137].length;++a)if(t[137][a].charCodeAt(0)!==65533){r[t[137][a]]=35072+a;e[35072+a]=t[137][a]}t[138]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½éæ¦æ¢°æµ·ç°çççµµè¥è¹ééè²å±å¾å¤å³å®³å´æ ¨æ¦æ¶¯ç¢èè¡è©²é§éª¸æµ¬é¦¨è壿¿èéååå廿¡æ¹æ ¼æ ¸æ®»ç²ç¢ºç©«è¦è§èµ«è¼éé£éé©å¦å²³æ¥½é¡é¡æç¬ æ¨«ï¿½æ©¿æ¢¶é°æ½å²åæ°æ¬æ´»æ¸æ»èè¤è½ä¸é°¹å¶æ¤æ¨ºéæ ªå ç«è²ééåé´¨æ ¢è è±ç²¥åè ç¦ä¹¾ä¾å å¯ååå§å·»åå ªå§¦å®å®å¯å¹²å¹¹æ£ææ £æ¾ææ¢ææ¡æ£ºæ¬¾ææ±æ¼¢æ¾æ½ ç°çç£ç竿管簡緩缶翰èè¦è観è«è²«ééééé¢é¥é館è丸å«å²¸å·ç©çç¼å²©ç¿«è´éé é¡é¡ä¼ä¼å±åå¨åºå¥å¬å¯å²å¸å¹¾å¿æ®æºææ¢ææ£æ£ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[138].length;++a)if(t[138][a].charCodeAt(0)!==65533){r[t[138][a]]=35328+a;e[35328+a]=t[138][a]}t[139]="����������������������������������������������������������������æ©å¸°æ¯ æ°æ±½ç¿ç¥å£ç¨ç´å¾½è¦è¨è²´èµ·è»è¼é£¢é¨é¬¼äºå½åå¦å®æ¯ææ¬æ¬ºç çç¥ç¾©è»èª¼è°æ¬èé åå嫿¡æ©è©°ç §æµé»å´å®¢èèéä¸ä¹ ä»ä¼åå¸å®®å¼æ¥æï¿½æ½æ±æ±²æ³£ç¸ç究窮ç¬ç´ç³¾çµ¦æ§çå»å± å·¨ææ ææ¸ è許è·é¸æ¼ç¦¦é亨享京ä¾ä¾ åå ç«¶å ±å¶åå¡å¿å«å¬å¢å³¡å¼·å½æ¯æææææ©æ³ççç¯è¸è èèé·é¡é¿é¥é©ä»°åå°ææ¥å±æ²æ¥µçæ¡ç²å å¤å巾馿¤æ¬£æ¬½ç´ç¦ç¦½çç·è¹èè¡¿è¥è¬¹è¿éåéä¹å¶å¥åºççç©è¦èº¯é§é§é§å ·æèå°ç©ºå¶å¯éé 串æ«é§å±å±ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[139].length;++a)if(t[139][a].charCodeAt(0)!==65533){r[t[139][a]]=35584+a;e[35584+a]=t[139][a]}t[140]="����������������������������������������������������������������æçªæ²é´è½¡çªªçéç²æ ç¹°æ¡é¬å²åè«è¨ç¾¤è»é¡å¦è¢ç¥ä¿å¾åå ååçªåå¥å½¢å¾æµæ ¶æ §æ©æ²æºæ¬æ¯æ¡æ¸ç¦ç¨½ç³»çµç¶ç¹ç½«èèèè¨è©£è¦è»½é é¶è¸è¿é¯¨ï¿½åæææ¿éæ¡åæ¬ æ±ºæ½ç©´çµè¡è¨£æä»¶å¹å¦å¥å ¼å¸å£å§åå å«å»ºæ²æ¸æ³æ²æ¤æ¨©ç½ç¬ç®ç 硯絹çè©è¦è¬è³¢è»é£éµéºé¡é¨é¹¸å åå³å¹»å¼¦æ¸æºçç¾çµè·è¨è«ºéä¹åå¤å¼åºå§å¤å·±åº«å¼§æ¸æ æ¯æ¹çç³è¢´è¡è¡è°èèªè·¨é·éé¡§é¼äºäºä¼ååå¾å¨¯å¾å¾¡ææ¢§æªçç¢èªèª¤è·éä¹é¯äº¤ä½¼ä¾¯ååå å ¬åå¹å¾åå£å���".split("");for(a=0;a!=t[140].length;++a)if(t[140][a].charCodeAt(0)!==65533){r[t[140][a]]=35840+a;e[35840+a]=t[140][a]}t[141]="����������������������������������������������������������������åååå¢å¥½ååå®å·¥å·§å··å¹¸åºåºåº·å¼ææ æææ§æ»æææ´ææ ¡æ¢æ§æ±æ´ªæµ©æ¸¯æºç²çç¡¬ç¨¿ç³ ç´ ç´çµç¶±èèè¯è±è èèªèè¡è¡¡è¬è²¢è³¼éé µé±ç ¿é¼é¤é�é é¦é«é´»åå«å·å壿·æ¿ 豪è½éº¹å å»åå½ç©é ·éµ é»çæ¼è °ç忽æéª¨çè¾¼æ¤é ä»å°å¤å¢¾å©æ¨ææææ ¹æ¢±æ··çç´ºè®éäºä½åååµ¯å·¦å·®æ»æ²ç³ç è©éè£å座æ«åµå¬åæåå¡å¦»å®°å½©ææ¡æ ½æ³æ¸ç½éçç ç ¦ç¥æç´°èè£è¼éå¤å¨æç½ªè²¡å´åéªå ºæ¦è´å²å´å¼ç¢é·ºä½ååæ¾æ¨ææµçªçç´¢é¯æ¡é®ç¬¹ååå·ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[141].length;++a)if(t[141][a].charCodeAt(0)!==65533){r[t[141][a]]=36096+a;e[36096+a]=t[141][a]}t[142]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å¯æ¶æ®æ¦ææ®ºè©éç靿éé®«ç¿æä¸ååå±±æ¨ææ£æ¡ç¦çç£ç®çºèè®è³é ¸é¤æ¬æ«æ®ä»ä»ä¼ºä½¿åºå¸å²å£å士å§å§å§¿åå±å¸å¸«å¿æææ¯åæ¯æ½æ¨ææ¢ï¿½æ»æ°ç ç¥ç§ç³¸ç´ç´«è¢èè³è¦è©è©©è©¦èªè«®è³è³é飼æ¯äºä¼¼ä¾å åå¯ºæ æææ¬¡æ»æ²»ç¾ç½çç£ç¤ºèè³èªèè¾æ±é¹¿å¼è鴫竺軸å®é«ä¸å±å·å¤±å«å®¤ææ¹¿æ¼ç¾è³ªå®èç¯ å²æ´è屡èç¸èåå°æ¨èµ¦æç ®ç¤¾ç´è è¬è»é®èéªååºå°ºæç¼çµé éé«è¥å¯å¼±æ¹ä¸»åå®ææ±æ®ç©ç ç¨®è «è¶£é é¦åååªå¯¿ææ¨¹ç¶¬éååå¨ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[142].length;++a)if(t[142][a].charCodeAt(0)!==65533){r[t[142][a]]=36352+a;e[36352+a]=t[142][a]}t[143]="����������������������������������������������������������������å®å°±å·ä¿®ææ¾æ´²ç§ç§çµç¹ç¿èèèè¡è¥²è®è¹´è¼¯é±é é ¬ééä»ä½å åå¾æææ±æ¸ç£ç¸¦ééåå¤å®¿æ·ç¥ç¸®ç²å¡¾çåºè¡è¿°ä¿å³»æ¥ç¬ç«£èé§¿åå¾ªæ¬æ¥¯æ®æ·³ï¿½æºæ½¤ç¾ç´å·¡éµéé å¦åææææ¸åº¶ç·ç½²æ¸è¯è·è«¸å©å女åºå¾æé¤é¤å·ååå åå¬å¨åå±å奨妾娼宵å°å°å°å°åºåºå» å½°æ¿ææææ·ææææ¶æ¾æ¢¢æ¨æ¨µæ²¼æ¶æ¸æ¹ç¼ç¦ç §ççç¡ç¤ç¥¥ç§°ç« ç¬ç²§ç´¹èèèèè¡è£³è¨è¨¼è©è©³è±¡è³é¤é¦é¾éééä¸ä¸ä¸ä¹åå°åå ´å£å¬¢å¸¸æ æ¾æ¡ææµç¶ç³ç©£è¸è²é¸é å±å´é£¾ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[143].length;++a)if(t[143][a].charCodeAt(0)!==65533){r[t[143][a]]=36608+a;e[36608+a]=t[143][a]}t[144]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææ¤æ®çç¹è·è²è§¦é£è辱尻伸信侵åå¨ å¯å¯©å¿æ æ¯æ°ææ£®æ¦æµ¸æ·±ç³ç¹çç¥ç§¦ç´³è£è¯èªè¦ªè¨ºèº«è¾é²éé人ä»å塵壬å°çå°½è è¨è¿ é£é笥è«é é ¢å³å¨ï¿½éå¹åå¸¥æ¨æ°´çç¡ç²ç¿ è¡°éé éééçé«å´åµ©æ°æ¢è¶¨éæ®ææ¤è é éè£¾æ¾æºå¯¸ä¸ç¬çæ¯åå¶å¢å§å¾æ§ææ¿æ´ææ´æ£²æ æ£æ¸ ç²ççç²¾èå£°è£½è¥¿èª èªè«ééééæç¨èé»å¸æææ¥ææç³ç©ç±ç¸¾è責赤跡è¹ç¢©åææ¥ææè¨çªç¯èª¬éªçµ¶èèä»å åå 宣å°å°å·æ¦ææ°æ æ ´æ³æµ æ´ææ½ç ç ½æç©¿ç®ç·ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[144].length;++a)if(t[144][a].charCodeAt(0)!==65533){r[t[144][a]]=36864+a;e[36864+a]=t[144][a]}t[145]="����������������������������������������������������������������ç¹ç¾¨è ºèè¹è¦è©®è³è·µé¸é·éééé®®ååæ¼¸ç¶å ¨ç¦ ç¹è³ç³åå¡å²¨æªæ¾æ½æ¥çççç¤ç¥ç§ç²ç´ çµè訴é»é¡é¼ å§åµåå¢ååªå£®å¥ç½å®å±¤åæ£æ³æææ¿æ»ï¿½ææ©æ¹å·£æ§æ§½æ¼ç¥äºç©ç¸çªç³ç·ç¶è¡èèè¬è¼è»è£ èµ°ééééé¨å墿èèµè´é ä¿å´å峿¯æææ¸¬è¶³éä¿å±è³æç¶åè¢å ¶æåå«å°ææéä»å¤å¤ªæ±°è©å¾å å¦¥æ°ææèµæ¥éé§é¨¨ä½å 対èå²±å¸¯å¾ æ æ æ´æ¿æ³°æ»èè ¿èè¢è²¸éé®éé»é¯ä»£å°å¤§ç¬¬éé¡é·¹æ»ç§ååå® ææææ²¢æ¿¯ç¢è¨é¸æ¿è«¾è¸å§è¸åªï¿½ï¿½ï¿½".split("");for(a=0;a!=t[145].length;++a)if(t[145][a].charCodeAt(0)!==65533){r[t[145][a]]=37120+a;e[37120+a]=t[145][a]}t[146]="����������������������������������������������������������������å©ä½é辰奪è±å·½ç«ªè¾¿æ£è°·ç¸é±æ¨½èª°ä¸¹åå妿 æ¢æ¦ææ·¡æ¹çç端箪綻è½èèèªéå£å£å¼¾æææªæ®µç·è«å¤ç¥å°å¼æ¥æºæ± ç´ç¨ç½®è´èé 馳ç¯ç竹çè�éç§©çªè¶å«¡çä¸ä»²å®å¿ æ½æ¼æ±æ³¨è«è¡·è¨»é é³é§æ¨ç¦çªè§è貯ä¸å åå寵å¸å¸³åºå¼å¼µå½«å¾´æ²ææ¢ææ½®ççºçºè´è¹è ¸è¶èª¿è«è¶ è·³éé·é é³¥å æç´ææ²çè³é®é³æ´¥å¢æ¤æ§è¿½éçé塿 æ´æ§»ä½æ¼¬æè¾»è¦ç¶´é椿潰åªå£·å¬¬ç´¬çªåé£é¶´äºä½ååµåè²åå ¤å®å¸åºåºå»·å¼ææµæºææ¢¯æ±ç¢ç¦ç¨ç· èè¨è«¦è¹é���".split("");for(a=0;a!=t[146].length;++a)if(t[146][a].charCodeAt(0)!==65533){r[t[146][a]]=37376+a;e[37376+a]=t[146][a]}t[147]="����������������������������������������������������������������é¸éé鼿³¥ææ¢æµæ»´çç¬é©é溺å²å¾¹æ¤è½è¿éå ¸å¡«å¤©å±åºæ·»çºç貼転é¡ç¹ä¼æ®¿æ¾±ç°é»å åå µå¡å¦¬å± å¾æææ¸¡ç»èè³éé½éç ¥ç ºåªåº¦å奴æåå å¬ï¿½åååå¡å¡å¥å®å³¶å¶æ¼æææ±æ¡æ¢¼æ£çæ·æ¹¯æ¶ç¯çå½ç祷çççç³çµ±å°è£è©è¤è¨è¬è±è¸éééé¶é 騰éåååå å°æ§ææ´ç³ç«¥è´èéé å³ é´å¿å¾å¾³æ¶ç¹ç£ç¦¿ç¯¤æ¯ç¬èªæ æ©¡å¸çªæ¤´å±é³¶è«å¯ é çå¸å±¯ææ¦æ²è±éé åæéå¥é£å ä¹åªèè¬çæºé楢馴ç¸ç·åæ¥ è»é£æ±äºå°¼å¼è¿©åè³èè¹å»¿æ¥ä¹³å ¥ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[147].length;++a)if(t[147][a].charCodeAt(0)!==65533){r[t[147][a]]=37632+a;e[37632+a]=t[147][a]}t[148]="����������������������������������������������������������������å¦å°¿é®ä»»å¦å¿èªæ¿¡ç¦°ç¥¢å¯§è±ç«ç±å¹´å¿µæ»æçç²ä¹å»¼ä¹å墿©æ¿ç´è½è³è¿è¾²è¦è¤å·´ææè¦æ·æ³¢æ´¾ç¶ç ´å©ç½µèé¦¬ä¿³å»ææææ¯ççèèºè¼©é åå¹åªæ¢ ï¿½æ¥³ç ¤ç½è²·å£²è³ éªéè¿ç§¤ç§è©ä¼¯å¥åæææ³ç½ç®ç²è¶èè¿«ææ¼ çç¸è«é§éº¦å½ç®±ç¡²ç®¸èçæ«¨å¹¡èçç å «é¢æºçºé髪ä¼ç½°æçé¥é³©åºå¡è¤é¼ä¼´å¤ååå叿¬ææ¿æ°¾æ±çç¯ççç¹è¬è©è²©ç¯éç ©é é£¯æ½æ©çªç¤ç£èè®åªåå¦å¦åºå½¼æ²ææ¹æ«ææ¯æ³ç²ç®ç¢ç§ç·ç½·è¥è¢«èª¹è²»é¿é飿¨ç°¸åå°¾å¾®ææ¯çµçç¾ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[148].length;++a)if(t[148][a].charCodeAt(0)!==65533){r[t[148][a]]=37888+a;e[37888+a]=t[148][a]}t[149]="����������������������������������������������������������������鼻æç¨å¹çé«å½¦èè±èå¼¼å¿ ç¢ç鼿¡§å§«åªç´ç¾è¬¬ä¿µå½ªæ¨æ°·æ¼ç¢ç¥¨è¡¨è©è±¹å»æç ç§èé¨é²èèé°åå½¬ææµçè²§è³é »æç¶ä¸ä»å 夫婦å¯å¨å¸åºææ¶æ·ï¿½æ§æ®æµ®ç¶ç¬¦è èèèè² è³¦èµ´ééä¾®æ«æ¦èè¡èªé¨å°æ¥é¢¨èºèä¼å¯å¾©å¹ æç¦è ¹è¤è¦æ·µå¼ææ²¸ä»ç©é®åå»å´å¢³æ¤æ®ç奮ç²ç³ç´é°æèä¸ä½µå µå¡å¹£å¹³å¼æä¸¦è½ééç±³é å»å£ç碧å¥ç¥èç®åå¤çç¯ç·¨è¾ºè¿é便å娩å¼éä¿èéªåææ©ç«è£è¼ç©å墿 ææ®æ¯ç°¿è©å£ä¿¸å åå ±å¥å®å³°å³¯å´©åºæ±æ§æ¾æ¹æï¿½ï¿½ï¿½".split("");for(a=0;a!=t[149].length;++a)if(t[149][a].charCodeAt(0)!==65533){r[t[149][a]]=38144+a;e[38144+a]=t[149][a]}t[150]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ³æ³¡ç¹ç ²ç¸«èè³èè¬èè¤è¨ªè±é¦é飽鳳鵬ä¹äº¡ååå妨帽å¿å¿æ¿æ´æææ£åç´¡èªè¨è¬è²è²¿é¾é²å é ¬åååå¢¨æ²æ´ç§ç¦ç©é¦å没æ®å å¹å¥æ¬ç¿»å¡ç�æ©ç£¨é麻åå¦¹æ§ææ¯å©æ§å¹èæé®ªæ¾é±æ¡äº¦ä¿£åæ¹æ«æ²«è¿ä¾ç¹éº¿ä¸æ ¢æºæ¼«è峿ªé å·³ç®å²¬å¯èæ¹èç¨èå¦ç²æ°ç å夢ç¡ççé§éµ¡æ¤å©¿å¨å¥å彿çè¿·éé³´å§ªçæ» å æ£ç¶¿ç·¬é¢éººæ¸æ¨¡èå¦åæ¯çç²ç¶²èè岿¨é»ç®æ¢å¿é¤ å°¤æ»ç±¾è²°åæ¶ç´éåä¹å¶å¤çºè¶éå¼¥ç¢åå½¹ç´è¬è¨³èºéæ³è®éæææ²¹ç���".split("");for(a=0;a!=t[150].length;++a)if(t[150][a].charCodeAt(0)!==65533){r[t[150][a]]=38400+a;e[38400+a]=t[150][a]}t[151]="����������������������������������������������������������������è«è¼¸å¯ä½åªååå®¥å¹½æ æææææ¹§æ¶ç¶ç·ç±ç¥è£èªéééµéèå¤äºä½ä¸èªè¼¿é åå¹¼å¦å®¹åº¸ææºæææ¥æ§æ´æº¶çç¨çª¯ç¾èèèè¦è¬¡è¸é¥é½é¤æ ¾ææ¬²ï¿½æ²æµ´ç¿ç¿¼æ·ç¾ èºè£¸æ¥è±é ¼é·æ´çµ¡è½é ªä¹±åµåµæ¬æ¿«èè覧å©åå±¥ææ¢¨ççç¢è£è£¡éé¢é¸å¾çç«èæ ç¥åæµæºççç¡«ç²éç«é¾ä¾¶æ ®æ èäºäº®å両åå¯®ææ¢æ¶¼çççç¨ç³§è¯è«é¼ééµé åç·å«åææ·çç³è¨è¼ªé£é±éºç 塿¶ç´¯é¡ä»¤ä¼¶ä¾å·å±å¶ºæç²ç¤¼èé´é·é¶ééºé½¢æ¦æ´åå£çè£å»æææ¼£ç 簾練è¯ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[151].length;++a)if(t[151][a].charCodeAt(0)!==65533){r[t[151][a]]=38656+a;e[38656+a]=t[151][a]}t[152]="����������������������������������������������������������������è®é£é¬å靿«çè³è·¯é²å´å©å»å¼ææ¥¼æ¦æµªæ¼ç¢ç¼ç¯èè¾èéå éºç¦èé²è«åå話æªè³èææ é·²äºäºé°è©«èè¨æ¤æ¹¾ç¢è ��������������������������������������������å¼ä¸ä¸ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹ä¹ä¹äºäº 豫äºèå¼äºäºäºäº 亢亰亳亶ä»ä»ä»ä»ä»ä»ä»ä»ä»ä»·ä¼ä½ä¼°ä½ä½ä½ä½ä½¶ä¾ä¾ä¾ä½»ä½©ä½°ä¾ä½¯ä¾ä¾åä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿¤ä¿¥åå¨ååªå¥å ä¼ä¿¶å¡å©å¬ä¿¾ä¿¯ååååæåååååå¬å¸ååå å´å²ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[152].length;++a)if(t[152][a].charCodeAt(0)!==65533){r[t[152][a]]=38912+a;e[38912+a]=t[152][a]}t[153]="����������������������������������������������������������������ååå³åååå¥åå£å®å¹åµåååååååå¡åºå·å¼å»å¿å å å å å ¢ç«¸å ©å ªå ®ååååååååååå¤å¦å¢å©åªå«å³å±å²å°åµå½å ååå èå©å�å°åµå¾ååååå§åªå®å³å¹åååååååªå´å©å³å¿å½åååå±åå辨辧å¬åå¼åµååååå£å¦é£å å³åµå¸å¹ååç¸åååååå£å¯å±å³å¸ååå ä¸ååååå©å®å¤å»å·ååå å¦å¥å®å°å¶åç°éåæ¼ç®å®å¨ååºåå½åå¬åå¼å®å¶å©ååååµååå±å·å°åå»åå¶ååååå¢å¸å¥å¬ååå¨ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[153].length;++a)if(t[153][a].charCodeAt(0)!==65533){r[t[153][a]]=39168+a;e[39168+a]=t[153][a]}t[154]="����������������������������������������������������������������å«åå¤å¾å¼åå¥å¦ååå½å®ååºå¢å¹åå£åå®åå ååå¸å³åååå¯ååå»å¾ååå®å¼åå©åå¨åå åååå¤ååå·åå¾å½åå¹ååçå´å¶å²å¸ï¿½å«å¤å¯å¬åªåååå ååå¥å®å¶å´åå¼ååååååååå®å¹åå¿ååååååååååå¦å·å¸åå»ååå©ååå¡å¿ååå å³å¤åªå°åååååå åå£å å å å¡²å ¡å¡¢å¡å¡°æ¯å¡å ½å¡¹å¢ 墹å¢å¢«å¢ºå£å¢»å¢¸å¢®å£ å£å£å£å£å£å£¥å£å£¤å£å£¯å£ºå£¹å£»å£¼å£½å¤å¤å¤å¤æ¢¦å¤¥å¤¬å¤å¤²å¤¸å¤¾ç«å¥å¥å¥å¥å¥å¥¢å¥ 奧奬奩���".split("");for(a=0;a!=t[154].length;++a)if(t[154][a].charCodeAt(0)!==65533){r[t[154][a]]=39424+a;e[39424+a]=t[154][a]}t[155]="����������������������������������������������������������������奸å¦å¦ä½ä¾«å¦£å¦²å§å§¨å§å¦å§å§å¨¥å¨å¨å¨å¨å¨å©å©¬å©å¨µå¨¶å©¢å©ªåªåª¼åª¾å«å«åª½å«£å«å«¦å«©å«å«ºå«»å¬å¬å¬å¬²å«å¬ªå¬¶å¬¾åå åååååå¥å©å°å³åµå¸æåºå®ï¿½å®å®¦å®¸å¯å¯å¯å¯å¯å¯¤å¯¦å¯¢å¯å¯¥å¯«å¯°å¯¶å¯³å° å°å°å°å°å° 尢尨尸尹å±å±å±å±å±å±å±å±¬å±®ä¹¢å±¶å±¹å²å²å²å¦å²«å²»å²¶å²¼å²·å³ å²¾å³å³å³©å³½å³ºå³å¶å³ªå´å´å´åµå´å´å´å´å´¢å´å´å´åµåµåµåµåµ¬åµ³åµ¶å¶å¶å¶å¶¢å¶å¶¬å¶®å¶½å¶å¶·å¶¼å·å·å·å·å·å·å·«å·²å·µå¸å¸å¸å¸å¸å¸¶å¸·å¹å¹å¹å¹å¹å¹å¹å¹¢å¹¤å¹å¹µå¹¶å¹ºéº¼å¹¿åº å»å»å»å»å»ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[155].length;++a)if(t[155][a].charCodeAt(0)!==65533){r[t[155][a]]=39680+a;e[39680+a]=t[155][a]}t[156]="����������������������������������������������������������������å»å»£å»å»å»å»¢å»¡å»¨å»©å»¬å»±å»³å»°å»´å»¸å»¾å¼å¼å½å½å¼å¼å¼å¼©å¼å¼¸å½å½å½å½å¼¯å½å½å½å½å½¡å½å½³å½·å¾å¾å½¿å¾å¾å¾å¾å¾å¾å¾å¾ 徨å¾å¾¼å¿å¿»å¿¤å¿¸å¿±å¿æ³å¿¿æ¡æ ï¿½æææ©ææ±æææ«æ¦ææºæææªæ·æææææ£ææ¤ææ¬æ«ææææ§ææææææææ§ææ¡æ¸æ ææ´å¿°æ½ææµææ æææ¶æ·ææ´æºææ¡æ»æ±æææ æ¾æ¨æ§æ æ¿æ¼æ¬æ´æ½æ æ æ ³æ ·æ æ æ æ «æ ´æ ¯æ ¥æ ±æ æ æ æ µææææ¬æææææ«æ®ææææ·ææææºæç½¹ææ¦æ£æ¶æºæ´æ¿æ½æ¼æ¾æææææææï¿½ï¿½ï¿½".split("");for(a=0;a!=t[156].length;++a)if(t[156][a].charCodeAt(0)!==65533){r[t[156][a]]=39936+a;e[39936+a]=t[156][a]}t[157]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææ¡æªæ®æ°æ²æ³ææææ£ææ æ¨æ¼æææ¾æææææææææ»ææ¿ææææææææææææ®æ±æ§æææ¯æµææ¾æææææææ«æ¶æ£ææææµæ«ï¿½æ©æ¾æ©æææ£æææ¶æææ´æææ¦æ¶æææ¨ææ§æ¯æ¶ææªæææ¥æ©ææ¼æææ ææ»æææ±æ§èæ æ¡æ¬æ£æ¯æ¬æ¶æ´æ²æºææ½æææ æ¤æ£æ«æ´æµæ·æ¶æ¸çææææææææ²æ¸ææè®æææ«æ·æææææææææ æ¡æ±æ²æææ»æ³æµæ¶æ´ææææææææ¤æ§æ¨ææ¢æ°æææææææææ¹ææ¾æ¼ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[157].length;++a)if(t[157][a].charCodeAt(0)!==65533){r[t[157][a]]=40192+a;e[40192+a]=t[157][a]}t[158]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææ¸æææ æ¿æ¦æ©æ°æµæ·ææææ¦æ§é¸æ®æ¿æ¶ææ¸æ·æææ ææ£æ¤ææ°æ©æ¼æªæææ¦æ¡æ æ·æ¯æ´æ¬æ³æ©æ¸æ¤æææ¢æ®æ¹æææ§æªæ æ¡æ ©æ¡æ¡æ ²æ¡ï¿½æ¢³æ «æ¡æ¡£æ¡·æ¡¿æ¢æ¢æ¢æ¢æ¢æ¢æ¢æª®æ¢¹æ¡´æ¢µæ¢ æ¢ºæ¤æ¢æ¡¾æ¤æ£æ¤æ£æ¤¢æ¤¦æ£¡æ¤æ£æ£æ£§æ£æ¤¶æ¤æ¤æ£æ££æ¤¥æ£¹æ£ æ£¯æ¤¨æ¤ªæ¤æ¤£æ¤¡æ£æ¥¹æ¥·æ¥æ¥¸æ¥«æ¥æ¥¾æ¥®æ¤¹æ¥´æ¤½æ¥æ¤°æ¥¡æ¥æ¥æ¦æ¥ªæ¦²æ¦®æ§æ¦¿æ§æ§æ¦¾æ§å¯¨æ§æ§æ¦»æ§æ¦§æ¨®æ¦æ¦ æ¦æ¦æ¦´æ§æ§¨æ¨æ¨æ§¿æ¬æ§¹æ§²æ§§æ¨ æ¦±æ¨æ§æ¨æ§«æ¨æ¨æ«æ¨£æ¨æ©æ¨æ©²æ¨¶æ©¸æ©æ©¢æ©æ©¦æ©æ¨¸æ¨¢æªæªæª æªæª¢æª£ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[158].length;++a)if(t[158][a].charCodeAt(0)!==65533){r[t[158][a]]=40448+a;e[40448+a]=t[158][a]}t[159]="����������������������������������������������������������������æªèæª»æ«æ«æª¸æª³æª¬æ«æ«æ«æªªæ«æ«ªæ«»æ¬ èæ«ºæ¬æ¬é¬±æ¬æ¬¸æ¬·çæ¬¹é£®æææææææææ¡æ¸æ¹æ¿æ®æ®æ®æ®æ®æ®æ®æ®¤æ®ªæ®«æ®¯æ®²æ®±æ®³æ®·æ®¼æ¯æ¯æ¯æ¯æ¯¬æ¯«æ¯³æ¯¯ï¿½éº¾æ°æ°æ°æ°æ°¤æ°£æ±æ±æ±¢æ±ªæ²æ²æ²æ²æ²æ±¾æ±¨æ±³æ²æ²æ³æ³±æ³æ²½æ³æ³ æ³æ²®æ²±æ²¾æ²ºæ³æ³¯æ³æ³ªæ´è¡æ´¶æ´«æ´½æ´¸æ´æ´µæ´³æ´æ´æµ£æ¶æµ¤æµæµ¹æµæ¶æ¶æ¿¤æ¶ æ·¹æ¸æ¸æ¶µæ·æ·¦æ¶¸æ·æ·¬æ·æ·æ·¨æ·æ· æ·ºæ·æ·¤æ·æ·ªæ·®æ¸æ¹®æ¸®æ¸æ¹²æ¹æ¸¾æ¸£æ¹«æ¸«æ¹¶æ¹æ¸æ¹æ¸ºæ¹æ¸¤æ»¿æ¸æ¸¸æºæºªæºæ»æº·æ»æº½æº¯æ»æº²æ»æ»æºæº¥æ»æºæ½æ¼ç滬滸滾漿滲漱滯漲æ»ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[159].length;++a)if(t[159][a].charCodeAt(0)!==65533){r[t[159][a]]=40704+a;e[40704+a]=t[159][a]}t[224]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¼¾æ¼æ»·æ¾æ½ºæ½¸æ¾æ¾æ½¯æ½æ¿³æ½æ¾æ½¼æ½æ¾æ¾æ¿æ½¦æ¾³æ¾£æ¾¡æ¾¤æ¾¹æ¿æ¾ªæ¿æ¿æ¿¬æ¿æ¿æ¿±æ¿®æ¿ççæ¿ºçççæ¿¾ççæ½´çççç°ç¾ç²çç£ççç¯ç±ç¬ç¸ç³ç®ççç�ççç½ççç ¥ç çç ¦ç ¢ç ç ç ¬çç»ççç¨ç¬çç¹ç¾ççççç ç¬ç§çµç¼ç¹ç¿çççç¨çç¬ç°ç²ç»ç¼ç¿ççççç´ç¾çççççç¢ç§ç¹ç²çççççç¢ç ç¡ç¹ç·åçççççç´ç¯ç©ç¥ç¾ççé»ççªç¨ç°ç¸çµç»çºçç³çç»çç¥ç®çç¢ç ç¯ç¥ç¸ç²çºçç¿ççççç©ç°ç£çªç¶ç¾ççç§çççç±ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[224].length;++a)if(t[224][a].charCodeAt(0)!==65533){r[t[224][a]]=57344+a;e[57344+a]=t[224][a]}t[225]="����������������������������������������������������������������ç ç£ç§ç©ç®ç²ç°ç±ç¸ç·ççç ççççççç¦ç¬ç¼çççççççç©ç¤ç§ç«çç¸ç¶ççç´ççççççç¥ç£çç³ççµç½ç¸ç¼ç±ççççç£çç¾ç¿ï¿½ç¼çç°çºç²ç³ççççç§ç ç¡ç¢ç¤ç´ç°ç»çççççç¡ç¢ç¨ç©çªç§ç¬ç°ç²ç¶ç¸ç¼çççççççççç°ç´ç¸ç¹çºçççççç¡ç¥ç§çªè¯ç»çççç©ç¤çç¥ç¦çç·ç¸ççç¨ç«çç¥ç¿ç¾ç¹çççç çç°ç¶ç¹ç¿ç¼ç½ç»çççççç£ç®ç¼ç ç 礦ç ç¤ªç¡ ç¢ç¡´ç¢ç¡¼ç¢ç¢ç¢£ç¢µç¢ªç¢¯ç£ç£ç£ç£ç¢¾ç¢¼ç£ ç£ç£¬ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[225].length;++a)if(t[225][a].charCodeAt(0)!==65533){r[t[225][a]]=57600+a;e[57600+a]=t[225][a]}t[226]="����������������������������������������������������������������磧ç£ç£½ç£´ç¤ç¤ç¤ç¤ç¤¬ç¤«ç¥ç¥ ç¥ç¥ç¥ç¥ç¥ç¥ºç¥¿ç¦ç¦ç¦§é½ç¦ªç¦®ç¦³ç¦¹ç¦ºç§ç§ç§§ç§¬ç§¡ç§£ç¨ç¨ç¨ç¨ç¨ ç¨ç¦ç¨±ç¨»ç¨¾ç¨·ç©ç©ç©ç©¡ç©¢ç©©é¾ç©°ç©¹ç©½çªçªçªçªçªçª©ç«çª°ï¿½çª¶ç« ç«çª¿éç«ç«ç«ç«ç«ç«ç«ç«ç«ç«¡ç«¢ç«¦ç«ç«°ç¬ç¬ç¬ç¬ç¬³ç¬ç¬ç¬ç¬µç¬¨ç¬¶ççºç¬çç¬çç çµç¥ç´ç§ç°ç±ç¬ç®ç®ç®ç®ç®ç®ç®ç®ç®ç®çç®ç¯ç¯ç¯ç¯ç®´ç¯ç¯ç¯©ç°ç°ç¯¦ç¯¥ç± ç°ç°ç°ç¯³ç¯·ç°ç°ç¯¶ç°£ç°§ç°ªç°ç°·ç°«ç°½ç±ç±ç±ç±ç±ç±ç±ç±ç±¤ç±ç±¥ç±¬ç±µç²ç²ç²¤ç²ç²¢ç²«ç²¡ç²¨ç²³ç²²ç²±ç²®ç²¹ç²½ç³ç³ ç³ç³ç³ç³ç³¢é¬»ç³¯ç³²ç³´ç³¶ç³ºç´ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[226].length;++a)if(t[226][a].charCodeAt(0)!==65533){r[t[226][a]]=57856+a;e[57856+a]=t[226][a]}t[227]="����������������������������������������������������������������ç´ç´ç´ç´çµ çµç´®ç´²ç´¿ç´µçµçµ³çµçµçµ²çµ¨çµ®çµçµ£ç¶ç¶çµç¶çµ½ç¶ç¶ºç¶®ç¶£ç¶µç·ç¶½ç¶«ç¸½ç¶¢ç¶¯ç·ç¶¸ç¶ç¶°ç·ç·ç·¤ç·ç·»ç·²ç·¡ç¸ ç¸ç¸£ç¸¡ç¸ç¸±ç¸ç¸ç¸ç¸¢ç¹ç¹¦ç¸»ç¸µç¸¹ç¹ç¸·ï¿½ç¸²ç¸ºç¹§ç¹ç¹ç¹ç¹ç¹ç¹¹ç¹ªç¹©ç¹¼ç¹»çºç·ç¹½è¾®ç¹¿çºçºçºçºçºçºçºçºçºçºçºç¼¸ç¼ºç½ ç½ç½ç½ç½ç½ç½ç½ç½ç½ç½ 罨罩罧罸ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾£ç¾¯ç¾²ç¾¹ç¾®ç¾¶ç¾¸è±ç¿ ç¿ç¿ç¿ç¿ç¿¡ç¿¦ç¿©ç¿³ç¿¹é£èèèèèèèè¡è¨è¿è»èèèèèèè¢è¨è³è²è°è¶è¹è½è¿èèè èèèèåè¬èè¥èèèèèèè¯è±èè©è£è¯è ���".split("");for(a=0;a!=t[227].length;++a)if(t[227][a].charCodeAt(0)!==65533){r[t[227][a]]=58112+a;e[58112+a]=t[227][a]}t[228]="����������������������������������������������������������������éè è¾è è è¼è ±è ®è ¥è ¦è ´èèèèèè èè¤è£è èè©è°èµè¾è¸è½èèèºèèèèèèèèè è§èºè»è¾èèè èèèèèè©è«è¸è³èèèèèèè¤ï¿½è¢è¨èªè«è®è±è·è¸è¾èèè«èè»è¬è¡è£èèè´è³èºèèè»è¹èèèèèèµè´èè²è±èè¹èè è¯è«èèè èèªèè¢èè£èèèè¼èµè³èµè èè¨è´èè«èè½èèèèè·èè è²èè¢è è½è¸èè»èèªè¼èèè·è«èè®èè©èè¬è¯è¹èµèè¢è¹è¿èèèè»èèèèèè¡è¡è¿è´èèè¬èèèè¼èè£èè���".split("");for(a=0;a!=t[228].length;++a)if(t[228][a].charCodeAt(0)!==65533){r[t[228][a]]=58368+a;e[58368+a]=t[228][a]}t[229]="����������������������������������������������������������������èèèèèè¤èèèè¨èèèèªèèè·è¾èèèºèè¹èèèè¥èè¹èèèè¾èºèè¢èè°è¿èä¹èèè§è±èè£è©èªèèè¶è¯èèè°èè £è«èèè©è¬ï¿½èèè¯èèèèèè»èèèè¹èè´è¿è·è»è¥è©èè èè¸èèè´èè¨è®èèè£èªè è¢èèè¯èè½èèéè«èè³èèè»è¯è²è è è è¾è¶è·è èè è è è ¢è ¡è ±è ¶è ¹è §è »è¡è¡è¡è¡è¡è¡¢è¡«è¢è¡¾è¢è¡µè¡½è¢µè¡²è¢è¢è¢è¢®è¢è¢¢è¢è¢¤è¢°è¢¿è¢±è£è£è£è£è£è£è£¹è¤è£¼è£´è£¨è£²è¤è¤è¤è¤è¥è¤è¤¥è¤ªè¤«è¥è¥è¤»è¤¶è¤¸è¥è¤è¥ è¥ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[229].length;++a)if(t[229][a].charCodeAt(0)!==65533){r[t[229][a]]=58624+a;e[58624+a]=t[229][a]}t[230]="����������������������������������������������������������������襦襤è¥è¥ªè¥¯è¥´è¥·è¥¾è¦è¦è¦è¦è¦è¦¡è¦©è¦¦è¦¬è¦¯è¦²è¦ºè¦½è¦¿è§è§è§è§è§§è§´è§¸è¨è¨è¨è¨è¨è¨è¨¥è¨¶è©è©è©è©è©è©¼è©è©¬è©¢èª èªèªèª¨èª¡èªèª¥èª¦èªèª£è«è«è«è«è««è«³è«§ï¿½è«¤è«±è¬è« 諢諷è«è«è¬è¬è¬è«¡è¬è¬è¬è¬ 謳é«è¬¦è¬«è¬¾è¬¨èèèèèèèèè«èè¬è¯è´è½è®è®è®è®è®è®è®è®è°ºè±è°¿è±è±è±è±è±è±¢è±¬è±¸è±ºè²è²è² è²è²è²è²è±¼è²æè²è²ªè²½è²²è²³è²®è²¶è³è³è³¤è³£è³è³½è³ºè³»è´è´ è´è´è´è´è´é½è´è³è´è´èµ§èµèµ±èµ³è¶è¶è·è¶¾è¶ºè·è·è·è·è·è·è·ªè·«è·è·£è·¼è¸è¸è·¿è¸è¸è¸è¸è¹è¸µè¸°è¸´è¹ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[230].length;++a)if(t[230][a].charCodeAt(0)!==65533){r[t[230][a]]=58880+a;e[58880+a]=t[230][a]}t[231]="����������������������������������������������������������������è¹è¹è¹è¹è¹è¹è¹¤è¹ 踪蹣è¹è¹¶è¹²è¹¼èºèºèº èºèºèºèºèºèºèºèºªèº¡èº¬èº°è»èº±èº¾è» è»è»è»è»£è»¼è»»è»«è»¾è¼è¼ è¼è¼è¼è¼è¼è¼è¼è¼è¼¦è¼³è¼»è¼¹è½ è½è¼¾è½è½è½è½è½è½ï¿½è½¢è½£è½¤è¾è¾è¾£è¾è¾¯è¾·è¿è¿¥è¿¢è¿ªè¿¯éè¿´é 迹迺ééé¡ééééé§é¶éµé¹è¿¸ééééééé¾éééé¨é¯é¶é¨é²éé½éééééé¨é¯é±éµé¢é¤æééééé²é°é é é é £é ¥é ©é ³é ²éééé¢é«é¯éªéµé´éºéééééééé¡éé¼éµé¶éé¿éé¬ééééé éé¤ééé¿ééééééééé¹é·é©ééºéé®ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[231].length;++a)if(t[231][a].charCodeAt(0)!==65533){r[t[231][a]]=59136+a;e[59136+a]=t[231][a]}t[232]="����������������������������������������������������������������éé¢éé£éºéµé»éé é¼é®éé°é¬ééé¹ééé¨é¥éééééé¤ééééééé¶é«éµé¡éºééééé é¢ééªé©é°éµé·é½éé¼é¾éé¿ééééééé�é é¨é§éé¼é»é¹é¾éæ¿¶éééééééé¡é¥é¢é¡é¨é®é¯ééééé·ééééé¦é²é¬éééééªé§é±é²é°é´é¶é¸é¹ééééè¥éééé¹éééééééééé¤éªé°é¹é½é¾ééééééé é¤é¦é¨åé«é±é¹é é¼ééºéééééé¨é¦é£é³é´ééééééé½é²ç«é¶éµé é é ¸é ¤é ¡é ·é ½é¡é¡é¡é¡«é¡¯é¡°ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[232].length;++a)if(t[232][a].charCodeAt(0)!==65533){r[t[232][a]]=59392+a;e[59392+a]=t[232][a]}t[233]="����������������������������������������������������������������顱顴顳颪颯颱颶é£é£é£é£©é£«é¤é¤é¤é¤é¤é¤¡é¤é¤é¤¤é¤ 餬餮餽餾é¥é¥é¥ é¥é¥é¥é¥é¥é¥é¦é¦é¦¥é¦é¦®é¦¼é§é§é§é§é§é§é§®é§±é§²é§»é§¸é¨é¨é¨ é§¢é¨é¨«é¨·é© é©é©é©ï¿½é¨¾é©é©é©é©é©é©¢é©¥é©¤é©©é©«é©ªéªéª°éª¼é«é«é«é«é«é«é«é«¢é«£é«¦é«¯é««é«®é«´é«±é«·é«»é¬é¬é¬é¬é¬¢é¬£é¬¥é¬§é¬¨é¬©é¬ªé¬®é¬¯é¬²éééééééé´é®é®é®é®é®é®é® 鮨鮴é¯é¯é®¹é¯é¯é¯é¯é¯£é¯¢é¯¤é¯é¯¡é°ºé¯²é¯±é¯°é°é°é°é°é°é°é°é°é°é°é°®é°é°¥é°¤é°¡é°°é±é°²é±é°¾é±é± 鱧鱶鱸鳧鳬鳰é´é´é³«é´é´é´ªé´¦é¶¯é´£é´éµé´é´éµé´¿é´¾éµéµï¿½ï¿½ï¿½".split("");for(a=0;a!=t[233].length;++a)if(t[233][a].charCodeAt(0)!==65533){r[t[233][a]]=59648+a;e[59648+a]=t[233][a]}t[234]="����������������������������������������������������������������éµéµéµ¤éµéµéµéµ²é¶é¶é¶«éµ¯éµºé¶é¶¤é¶©é¶²é·é·é¶»é¶¸é¶ºé·é·é·é·é·é·¸é·¦é·é·¯é·½é¸é¸é¸é¹µé¹¹é¹½éºéºéºéºéºéºéºéºéº¥éº©éº¸éºªéºé¡é»é»é»é»é»é»é»é»é» 黥黨黯�黴黶黷黹黻黼黽é¼é¼ç·é¼é¼¡é¼¬é¼¾é½é½é½é½£é½é½ 齡齦齧齬齪齷齲齶é¾é¾é¾ å ¯æ§éç¤åç�������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[234].length;++a)if(t[234][a].charCodeAt(0)!==65533){r[t[234][a]]=59904+a;e[59904+a]=t[234][a]}t[237]="����������������������������������������������������������������çºè¤ééèä¿ç»æ±æ£é¹æ»å½ 丨仡仼ä¼ä¼ä¼¹ä½ä¾ä¾ä¾ä¾ä¿åå¢ä¿¿ååå°ååå´åå å ¤åå¾å¬ååå¦ååååå¤å²åå²åï¨ååå©å¿ååå¥å¬ååï¨ï¿½ï¨å¢å¢²å¤å¥å¥å¥å¥£å¦¤å¦ºåå¯ç¯å¯å¯¬å°å²¦å²ºå³µå´§åµï¨åµåµå¶¸å¶¹å·å¼¡å¼´å½§å¾·å¿ææ ææææ æ²ææ·æ°æææ¦æµæ ææææææ»ææ®ææ¤æ¥ææï¨æ³ææ æ²æ¿æºæï¤©æ¦æ»æ¡ææ æ¡æ£ï¨æ¥¨ï¨æ¦æ§¢æ¨°æ©«æ©æ©³æ©¾æ«¢æ«¤æ¯æ°¿æ±æ²æ±¯æ³æ´æ¶æµ¯æ¶æ¶¬æ·æ·¸æ·²æ·¼æ¸¹æ¹æ¸§æ¸¼æº¿æ¾æ¾µæ¿µç çç¨ç ç«ççç ç ç ï¨çç¾ç±ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[237].length;++a)if(t[237][a].charCodeAt(0)!==65533){r[t[237][a]]=60672+a;e[60672+a]=t[237][a]}t[238]="����������������������������������������������������������������ç¾ç¤ï¨ç·ç½ççç£çççµç¦çªç©ç®ç¢çççç¯ççççç¦ï¨çå¯ç ¡ç¡ç¡¤ç¡ºç¤°ï¨ï¨ï¨ç¦ï¨ç¦ç«ç«§ï¨ç««ç®ï¨çµçµç¶·ç¶ ç·ç¹ç½ç¾¡ï¨èè¢è¿èè¶èè´èè�è«ï¨è°ï¨ 﨡è 裵è¨è¨·è©¹èª§èª¾è«ï¨¢è«¶èè¿è³°è³´è´èµ¶ï¨£è»ï¨¤ï¨¥é§é都éé§ééééé®é¤é¥ééééºéé¼éééé¹é§é§é·é¸é§ééé﨧éé éé¥é¡é»ï¨¨éé¿ééé°éé¤ééé¸é±é ééï§ï¨©éé¯é³é»éééééé¡é¡¥ï¨ªï¨«é¤§ï¨¬é¦é©é«é«éµé²é®é®±é®»é°éµ°éµ«ï¨é¸é»ï¿½ï¿½â °â ±â ²â ³â ´â µâ ¶â ·â ¸â ¹ï¿¢ï¿¤ï¼ï¼ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[238].length;++a)if(t[238][a].charCodeAt(0)!==65533){r[t[238][a]]=60928+a;e[60928+a]=t[238][a]}t[250]="����������������������������������������������������������������⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹â ⠡⠢⠣⠤⠥⠦⠧⠨⠩¬¦ï¼ï¼ã±ââ¡âµçºè¤ééèä¿ç»æ±æ£é¹æ»å½ 丨仡仼ä¼ä¼ä¼¹ä½ä¾ä¾ä¾ä¾ä¿åå¢ä¿¿ååå°ååå´åå ï¿½å ¤åå¾å¬ååå¦ååååå¤å²åå²åï¨ååå©å¿ååå¥å¬ååï¨ï¨å¢å¢²å¤å¥å¥å¥å¥£å¦¤å¦ºåå¯ç¯å¯å¯¬å°å²¦å²ºå³µå´§åµï¨åµåµå¶¸å¶¹å·å¼¡å¼´å½§å¾·å¿ææ ææææ æ²ææ·æ°æææ¦æµæ ææææææ»ææ®ææ¤æ¥ææï¨æ³ææ æ²æ¿æºæï¤©æ¦æ»æ¡ææ æ¡æ£ï¨æ¥¨ï¨æ¦æ§¢æ¨°æ©«æ©æ©³æ©¾æ«¢æ«¤æ¯æ°¿æ±æ²æ±¯æ³æ´æ¶æµ¯ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[250].length;++a)if(t[250][a].charCodeAt(0)!==65533){r[t[250][a]]=64e3+a;e[64e3+a]=t[250][a]}t[251]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¶æ¶¬æ·æ·¸æ·²æ·¼æ¸¹æ¹æ¸§æ¸¼æº¿æ¾æ¾µæ¿µç çç¨ç ç«ççç ç ç ï¨çç¾ç±ç¾ç¤ï¨ç·ç½ççç£çççµç¦çªç©ç®ç¢çççç¯ççççç¦ï¨çå¯ç ¡ç¡ç¡¤ç¡ºç¤°ï¨ï¨ï¿½ï¨ç¦ï¨ç¦ç«ç«§ï¨ç««ç®ï¨çµçµç¶·ç¶ ç·ç¹ç½ç¾¡ï¨èè¢è¿èè¶èè´èèè«ï¨è°ï¨ 﨡è 裵è¨è¨·è©¹èª§èª¾è«ï¨¢è«¶èè¿è³°è³´è´èµ¶ï¨£è»ï¨¤ï¨¥é§é都éé§ééééé®é¤é¥ééééºéé¼éééé¹é§é§é·é¸é§ééé﨧éé éé¥é¡é»ï¨¨éé¿ééé°éé¤ééé¸é±é ééï§ï¨©éé¯é³é»éééééé¡é¡¥ï¨ªï¨«é¤§ï¨¬é¦é©é«ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[251].length;++a)if(t[251][a].charCodeAt(0)!==65533){r[t[251][a]]=64256+a;e[64256+a]=t[251][a]}t[252]="����������������������������������������������������������������é«éµé²é®é®±é®»é°éµ°éµ«ï¨é¸é»ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[252].length;++a)if(t[252][a].charCodeAt(0)!==65533){r[t[252][a]]=64512+a;e[64512+a]=t[252][a]}return{enc:r,dec:e}}();cptable[936]=function(){var e=[],r={},t=[],a;t[0]="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[0].length;++a)if(t[0][a].charCodeAt(0)!==65533){r[t[0][a]]=0+a;e[0+a]=t[0][a]}t[129]="����������������������������������������������������������������ä¸ä¸ä¸ ä¸ä¸ä¸ä¸ä¸ä¸ 両丣並丩丮丯丱丳丵丷丼ä¹ä¹ä¹ä¹ä¹ä¹ä¹ä¹ä¹ä¹ä¹ä¹¢ä¹£ä¹¤ä¹¥ä¹§ä¹¨ä¹ªä¹«ä¹¬ä¹ä¹®ä¹¯ä¹²ä¹´ä¹µä¹¶ä¹·ä¹¸ä¹¹ä¹ºä¹»ä¹¼ä¹½ä¹¿äºäºäºäºäºäº äºäºï¿½äºäºäºäºäºäºäºäº£äºªäº¯äº°äº±äº´äº¶äº·äº¸äº¹äº¼äº½äº¾ä»ä»ä»ä»ä»ä»ä»ä»ä» 仢仦仧仩ä»ä»®ä»¯ä»±ä»´ä»¸ä»¹ä»ºä»¼ä»¾ä¼ä¼ä¼ä¼ä¼ ä¼ä¼ä¼ä¼ä¼ä¼ä¼ä¼ä¼ä¼ä¼ä¼ä¼¡ä¼£ä¼¨ä¼©ä¼¬ä¼ä¼®ä¼±ä¼³ä¼µä¼·ä¼¹ä¼»ä¼¾ä¼¿ä½ä½ä½ä½ä½ ä½ä½ä½ä½ä½ä½ä½ä½ä½ä½¡ä½¢ä½¦ä½¨ä½ªä½«ä½ä½®ä½±ä½²ä½µä½·ä½¸ä½¹ä½ºä½½ä¾ä¾ä¾ä¾ ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä¾¡ä¾¢ï¿½".split("");for(a=0;a!=t[129].length;++a)if(t[129][a].charCodeAt(0)!==65533){r[t[129][a]]=33024+a;e[33024+a]=t[129][a]}t[130]="����������������������������������������������������������������侤侫ä¾ä¾°ä¾±ä¾²ä¾³ä¾´ä¾¶ä¾·ä¾¸ä¾¹ä¾ºä¾»ä¾¼ä¾½ä¾¾ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ä¿ 俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿åååååå ååååå�åååååååååååå å¢å£å¤å§å«å¯å°å±å²å³å´åµå¶å·å¸å¹å»å½å¿ååååå ååååååååååååååååååå å¡å¢å£å¤å¦å§å¨å©åªå«åå®å¯å°å±å²å³å´åµå¸å¹åºå¼å½ååååååååååååååååååååååååååååå å¡å¢å¤å¦åªå«åå®å¯å°å±å³å´åµå¶å·å¸å¹å¼ï¿½".split("");for(a=0;a!=t[130].length;++a)if(t[130][a].charCodeAt(0)!==65533){r[t[130][a]]=33280+a;e[33280+a]=t[130][a]}t[131]="����������������������������������������������������������������å½å¾å¿åååååå åååååååååååååååååååååååå å¡å¢å£å¤å¥å¨å©åªå«å¯å°å±å²å´å¶å·å¸å¹åºå¼å½å¾å¿åååååå å�åååååååååååååååååååååå å¢å£å¤å¥å¦å§å¨å©åªå«å¬åå®å¯å°å±å²å³å´åµå¶å·å¸å¹åºå»å¼å½å¾å å å å å å å å å å å å å å å å å å ¡å £å ¤å ¦å §å ©å ªå ¯å ²å ºå ¾å ¿åååååååååååååååååå¡å£å¦å§å¨å©åªåå®å´å¸å¹åºå¾å¿åååå ååååååååååå�".split("");for(a=0;a!=t[131].length;++a)if(t[131][a].charCodeAt(0)!==65533){r[t[131][a]]=33536+a;e[33536+a]=t[131][a]}t[132]="����������������������������������������������������������������ååååååå¢å£å¥å¦å§å¨å©åªå¬å®å±å²å´å·å¾åå åååååååååååå¡å¢å£å¥å¦å§åªå¬å¯å±å²å´åµå¼å¾åå åååååååååååå�åååååå å¢å£å¤å¦å¨å«å¬åå®å°å±å³å´åµå¶å·å¸å¹åºå»å¼å¾åååå åååååååååååååååååååå¤å¥å¦å§å®å¯å°å´åµå¶å·å¸å¹åºå»å¼å½ååååå ååååååååååååååååååå å¡å¢å£å¥å¦å§å¨å©åªå«å¬åå®å¯å±å²å³å´åµå¶å·å¸å»å¼å½åååååååååå�".split("");for(a=0;a!=t[132].length;++a)if(t[132][a].charCodeAt(0)!==65533){r[t[132][a]]=33792+a;e[33792+a]=t[132][a]}t[133]="����������������������������������������������������������������åååååååååå¢å¤å¥å§å¨å©å«å¬åå¯å°å±å²å³å´åµå¶å·å¸å¼å½åååååååååååååå¥å¨åªå¬åå²å¶å¹å»å¼å½å¾åååååååå�åååååååååååå å¡å¤å§åªå«å¬åå¯å°å±å²å³å´åµå·å¸å¹åºå¼å½å¾åååå ååååååååååååå¡å¢å§å´åºå¾å¿ååå åååååååå¢å¤å¥åªå°å³å¶å·åºå½å¿åååå åååååååååååå å¡å£å¥å§å©åªå«å¬åå®å¯å°å´å¹åºå¾å¿ååå ååååååååååååå å¡ï¿½".split("");for(a=0;a!=t[133].length;++a)if(t[133][a].charCodeAt(0)!==65533){r[t[133][a]]=34048+a;e[34048+a]=t[133][a]}t[134]="����������������������������������������������������������������å¢å¥å®å°å²åµå¶å·å¹åºå¼å¾åå åååååå å¡å¢å£å¤å«å¬å¯å°å±å´åµå¶å·å¸å¹å»å¾ååååå ååååååååååååååååååå¡å¥å¦ï¿½å¨å©å«åå²å´åµå¶å¸å¹åºå»å½ååå åååååååååååååååååååå å¢å£å¨å©å«å¯å°å±å²å³å´å¹åºå½å¿å åååååååååååååå å¡å¢å£å¤å¥å¦å¨å©åªå«å¬åå®å¯å°å²å´å¶å¸åºå¼å¿åååååååååååååååååååå å¢å§å©åå®å°å±å´å¶å¸å¹åºå»å¼å¿åååå �".split("");for(a=0;a!=t[134].length;++a)if(t[134][a].charCodeAt(0)!==65533){r[t[134][a]]=34304+a;e[34304+a]=t[134][a]}t[135]="����������������������������������������������������������������åååååååååååååååååå å¡å¢å¥å¦å¨å©åªå«å®å¯å°å³åµå·å¸åºå¼å½å¾åååååå ååååååååååååååååååå å¡ï¿½å£å¥å¦å§åå®å¯å°å²å³å´åµå·å¸å¹åºå½å¾å¿åååååååååååååååååååååååååååå å¡å¢å¤å¥å¦å§å¨å©åªå«å¬åå®å°å±å²å³å´åµå¶å¸å¹åºå»å½å¾å¿åååååå ååååååååååååååååååå£å¥å¦å§å¨å©åªå¬å®å¯å²å³å¶å·å¸å»å¼åååå åååååååå�".split("");for(a=0;a!=t[135].length;++a)if(t[135][a].charCodeAt(0)!==65533){r[t[135][a]]=34560+a;e[34560+a]=t[135][a]}t[136]="����������������������������������������������������������������ååååååååååååå å¡å¢å¤å¥å¦å§å«å±å²å´åµå¶å·å¸å¼å½å¿åååå åååååååååååå¢å£å¥å§å¬å®å°å±å²å´åµå¸å¹åºå½å¾å¿å�åååååååååååååååååååååå¥å¨åªå¬å¯å°å±å³åµå¶å·å¹åºå»å¼å½å¾å¿åååå åååååååååååååååå¡å¢å£å¥å¦å§å¨å©åªå«å¬å®å°å±å²å³åµå¶å·å»å¼å¾å¿å å å å å å å å å å å å å å å å å å å å å å å ¢å £å ¥å ¦å §å ¨å ©å «å ¬å å ®å ¯å ±å ²å ³å ´å ¶å ·å ¸å ¹å ºå »å ¼å ½ï¿½".split("");for(a=0;a!=t[136].length;++a)if(t[136][a].charCodeAt(0)!==65533){r[t[136][a]]=34816+a;e[34816+a]=t[136][a]}t[137]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å ¾å ¿å¡å¡å¡å¡å¡ å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡å¡ 塡塢塣塤塦塧塨塩塪å¡å¡®å¡¯å¡°å¡±å¡²å¡³å¡´å¡µå¡¶å¡·å¡¸å¡¹å¡ºå¡»å¡¼å¡½å¡¿å¢å¢å¢å¢å¢å¢å¢å¢ï¿½å¢å¢å¢å¢å¢å¢å¢å¢å¢å¢å¢å¢å¢å¢ 墡墢墣墤墥墦墧墪墫墬å¢å¢®å¢¯å¢°å¢±å¢²å¢³å¢´å¢µå¢¶å¢·å¢¸å¢¹å¢ºå¢»å¢½å¢¾å¢¿å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£å£ 壡壢壣壥壦壧壨壩壪å£å£¯å£±å£²å£´å£µå£·å£¸å£ºå£»å£¼å£½å£¾å£¿å¤å¤å¤å¤ å¤å¤å¤å¤å¤å¤å¤å¤å¤å¤å¤å¤å¤å¤å¤å¤å¤ 夡夢夣夦夨夬夰夲夳夵夶夻�".split("");for(a=0;a!=t[137].length;++a)if(t[137][a].charCodeAt(0)!==65533){r[t[137][a]]=35072+a;e[35072+a]=t[137][a]}t[138]="����������������������������������������������������������������夽夾夿å¥å¥å¥ å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥¡å¥£å¥¤å¥¦å¥§å¥¨å¥©å¥ªå¥«å¥¬å¥å¥®å¥¯å¥°å¥±å¥²å¥µå¥·å¥ºå¥»å¥¼å¥¾å¥¿å¦å¦ å¦å¦å¦å¦å¦å¦å¦å¦å¦å¦å¦å¦å¦å¦å¦å¦ 妡妢妦�妧妬å¦å¦°å¦±å¦³å¦´å¦µå¦¶å¦·å¦¸å¦ºå¦¼å¦½å¦¿å§å§å§å§å§å§ å§å§å§å§å§å§å§å§å§å§å§å§å§å§ 姡姢姤姦姧姩姪姫å§å§®å§¯å§°å§±å§²å§³å§´å§µå§¶å§·å§¸å§ºå§¼å§½å§¾å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨å¨¡å¨¢å¨¤å¨¦å¨§å¨¨å¨ªå¨«å¨¬å¨å¨®å¨¯å¨°å¨³å¨µå¨·å¨¸å¨¹å¨ºå¨»å¨½å¨¾å¨¿å©å©å©å©å© å©å©å©å©å©å©å©å©å©å©å©å©å©å©å©å©å©å©å©å©å©å© �".split("");for(a=0;a!=t[138].length;++a)if(t[138][a].charCodeAt(0)!==65533){r[t[138][a]]=35328+a;e[35328+a]=t[138][a]}t[139]="����������������������������������������������������������������婡婣婤婥婦婨婩婫婬å©å©®å©¯å©°å©±å©²å©³å©¸å©¹å©»å©¼å©½å©¾åªåªåªåªåªåª åªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåªåª 媡媢媣媤媥媦媧媨媩媫媬�åªåª®åª¯åª°åª±åª´åª¶åª·åª¹åªºåª»åª¼åª½åª¿å«å«å«å« å«å«å«å«å«å«å«å«å«å«å«å«å«å«å«å«å«å«å«å«¢å«¤å«¥å«§å«¨å«ªå«¬å«å«®å«¯å«°å«²å«³å«´å«µå«¶å«·å«¸å«¹å«ºå«»å«¼å«½å«¾å«¿å¬å¬å¬å¬å¬å¬ å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬å¬ 嬡嬢嬣嬤嬥嬦嬧嬨嬩嬪嬫嬬å¬å¬®å¬¯å¬°å¬±å¬³å¬µå¬¶å¬¸å¬¹å¬ºå¬»å¬¼å¬½å¬¾å¬¿ååååå åå�".split("");for(a=0;a!=t[139].length;++a)if(t[139][a].charCodeAt(0)!==65533){r[t[139][a]]=35584+a;e[35584+a]=t[139][a]}t[140]="����������������������������������������������������������������åååååååååååå å¡å§å¨å«åå®å¯å²å´å¶å·å¸å¹å»å¼å¾å¿å®å®å®å®å®å®å®å®å®å®å®å®§å®¨å®©å®¬å®å®®å®¯å®±å®²å®·å®ºå®»å®¼å¯å¯å¯å¯å¯å¯å¯å¯å¯å¯ï¿½å¯å¯å¯å¯å¯å¯å¯å¯å¯å¯å¯ 寢寣實寧審寪寫寬å¯å¯¯å¯±å¯²å¯³å¯´å¯µå¯¶å¯·å¯½å¯¾å°å°å°å° å°å°å°å°å°å°å°å°å°å°å°å°å°å°å° 尡尣尦尨尩尪尫å°å°®å°¯å°°å°²å°³å°µå°¶å°·å±å±å±å±å±å±å±å±å±å±å±å±å±å±å±å±å±å±¢å±¤å±§å±¨å±©å±ªå±«å±¬å±å±°å±²å±³å±´å±µå±¶å±·å±¸å±»å±¼å±½å±¾å²å²å²å² å²å²å²å²å²å²å²å²å²å²å²å²å²å² 岡岤岥岦岧岨�".split("");for(a=0;a!=t[140].length;++a)if(t[140][a].charCodeAt(0)!==65533){r[t[140][a]]=35840+a;e[35840+a]=t[140][a]}t[141]="����������������������������������������������������������������岪岮岯岰岲岴岶岹岺岻岼岾å³å³å³å³ å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³ 峢峣峧峩峫峬峮峯峱峲峳峴峵島峷峸峹峺峼峽峾峿å´ï¿½å´å´å´ å´å´å´å´å´å´å´å´å´å´å´å´å´å´å´å´å´å´å´å´ 崡崢崣崥崨崪崫崬崯崰崱崲崳崵崶崷崸崹崺崻崼崿åµåµåµåµåµåµ åµåµåµåµåµåµåµåµåµåµåµåµåµåµåµåµåµåµåµåµ 嵡嵢嵣嵤嵥嵦嵧嵨嵪åµåµ®åµ°åµ±åµ²åµ³åµµåµ¶åµ·åµ¸åµ¹åµºåµ»åµ¼åµ½åµ¾åµ¿å¶å¶å¶å¶å¶ å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶å¶ �".split("");for(a=0;a!=t[141].length;++a)if(t[141][a].charCodeAt(0)!==65533){r[t[141][a]]=36096+a;e[36096+a]=t[141][a]}t[142]="����������������������������������������������������������������嶡嶢嶣嶤嶥嶦嶧嶨嶩嶪嶫嶬å¶å¶®å¶¯å¶°å¶±å¶²å¶³å¶´å¶µå¶¶å¶¸å¶¹å¶ºå¶»å¶¼å¶½å¶¾å¶¿å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å·å· 巣巤巪巬å·ï¿½å·°å·µå·¶å·¸å·¹å·ºå·»å·¼å·¿å¸å¸å¸å¸å¸å¸å¸å¸å¸å¸å¸å¸å¸å¸ 帡帢帣帤帥帨帩帪師帬帯帰帲帳帴帵帶帹帺帾帿å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹å¹ 幣幤幥幦幧幨幩幪幫幬å¹å¹®å¹¯å¹°å¹±å¹µå¹·å¹¹å¹¾åºåºåºåº åºåºåºåºåºåºåºåºåºåº¡åº¢åº£åº¤åº¨åº©åºªåº«åº¬åº®åº¯åº°åº±åº²åº´åººåº»åº¼åº½åº¿å»å»å»å»å»å» �".split("");for(a=0;a!=t[142].length;++a)if(t[142][a].charCodeAt(0)!==65533){r[t[142][a]]=36352+a;e[36352+a]=t[142][a]}t[143]="����������������������������������������������������������������å»å»å»å»å»å»å»å»å»å»å»å»å»å»å»å»å»å»å»å» 廡廢廣廤廥廦廧廩廫廬å»å»®å»¯å»°å»±å»²å»³å»µå»¸å»¹å»»å»¼å»½å¼ å¼å¼å¼å¼å¼å¼å¼å¼å¼å¼å¼å¼å¼å¼å¼å¼¡å¼¢å¼£å¼¤ï¿½å¼¨å¼«å¼¬å¼®å¼°å¼²å¼³å¼´å¼µå¼¶å¼·å¼¸å¼»å¼½å¼¾å¼¿å½å½å½å½å½ å½å½å½å½å½å½å½å½å½å½å½å½å½å½å½å½å½å½å½ 彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿å¾å¾å¾å¾å¾å¾å¾å¾å¾å¾å¾å¾å¾å¾å¾ 徢徣徤徥徦徧復徫徬徯徰徱徲徳徴徶徸徹徺徻徾徿å¿å¿å¿å¿å¿å¿å¿å¿å¿å¿å¿å¿å¿å¿å¿å¿å¿¢å¿£å¿¥å¿¦å¿¨å¿©å¿¬å¿¯å¿°å¿²å¿³å¿´å¿¶å¿·å¿¹å¿ºå¿¼æï¿½".split("");for(a=0;a!=t[143].length;++a)if(t[143][a].charCodeAt(0)!==65533){r[t[143][a]]=36608+a;e[36608+a]=t[143][a]}t[144]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æææææææææææææ¢æ£æ¤æ¬ææ®æ°æ±æ²æ³æ´æ¶æ·æ¸æ¹æºæ½æ¾æææ æææææææææææææææææææ æ¡æ¥æ¦æ®æ±æ²æ´æµæ·æ¾æï¿½æææ æææææææææææææææææ¡æ¢æ¤æ¥æ§æ©æªæ®æ°æ³æµæ¶æ·æ¹æºæ½æ¾æ¿ææææææææææææææææææææææ¡æ¢æ£æ¤æ¥æªæ±æ²æµæ·æ¸æ»æ¼æ½æ¾æ¿ææææ ææææææææææææææææææ¡æ¢æ¥æ¨æ©æªæ¬ææ®æ¯æ°æ±æ²æ³æ´æµæ¶æ·æ¸æ¹æºæ»æ¼æ½æ¾æ æ æ æ æ æ æ �".split("");for(a=0;a!=t[144].length;++a)if(t[144][a].charCodeAt(0)!==65533){r[t[144][a]]=36864+a;e[36864+a]=t[144][a]}t[145]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ ¡æ £æ ¤æ ¥æ ¦æ ©æ ªæ «æ ¬æ æ ®æ ¯æ ±æ ²æ ³æ ´æ ¶æ ¸æ ¹æ ºæ »æ ¼æ ½æ ¾æ ¿ææææææ æææææææææææææï¿½ææææææææææ æ¡æ¢æ£æ¤æ¥æ¦æªæ«ææ®æ¯æ°æ±æ²æ³æ´æµæ¶æ¸æ¹æºæ»æ¼æ½æ¿æææææ æææææææææææææææææææææ æ¡æ¢æ£æ¤æ¥æ§æ¨æ©æªæ«æ¬ææ®æ¯æ°æ±æ²æ³æ´æ¶æ·æ¸æ¹æºæ»æ¼æ½æ¾ææææææ æææææææææ æ£æ¦æ§æ¨æ©æ«ææ¯æ°æ±æ²æµæ¶æ¸æ¹æºæ»æ¼æææ ææï¿½".split("");for(a=0;a!=t[145].length;++a)if(t[145][a].charCodeAt(0)!==65533){r[t[145][a]]=37120+a;e[37120+a]=t[145][a]}t[146]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææææææææææææ æ¡æ¢æ¤æ¥æ¨æ±æ²æ´æµæ·æ¸æºæ»æ½ææææ æææææææææææææææ£æ¦æ§æ©æªææ®æ¯æ°æ²æ³æ´æ¶æ·æ¸æºæ¾ææï¿½ææææææææ æ¡æ¤æªæ«æ°æ²æµæ¸æ¹æºæ»ææææ ææææææææææææææææ¦æ§æ©æ¬ææ®æ°æ±æ³æ´æµæ¶æ·æ¸æ»æ¼æ¾æ¿æææææææææææææææææææ æ¤æ¥æ¦æ¨æªæ«æ¬æ¯æ°æ²æ³æ´æµæ¸æ¹æ¼æ½æ¾æ¿ææææ ææææææææææææææææ¡æ¤æ¦æ«æ¯æ±æ²æµæ¶æ¹æ»æ½æ¿æï¿½".split("");for(a=0;a!=t[146].length;++a)if(t[146][a].charCodeAt(0)!==65533){r[t[146][a]]=37376+a;e[37376+a]=t[146][a]}t[147]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææææ ææææææææææææææææææ¢æ¤æ¥æ¦æ§æ¨æ«æ¬æ®æ¯æ°æ±æ³æµæ·æ¹æºæ»æ¼æ¾ææææææææææææææææææææ¢æ£æ¤ï¿½æ¥æ§æ¨æ©æ«æ®æ¯æ°æ±æ²æ³æµæ¶æ·æ¸æ¹æ»æ¼æ¾ææææææææææææææææææææææ æ¡æ¢æ£æ¤æ¥æ¦æ¨æªæ«æ¬æ®æ¯æ°æ±æ²æ³æ´æµæ¶æ·æ»æ¼æ½æ¾æ¿æææææææææææææææææææææææ æ¡æ¢æ£æ¥æ¦æ§æ¨æªæ«æ¯æ±æ²æ³æ´æ¶æ¹æ»æ½æ¾æ¿ææææææææææææææææææï¿½".split("");for(a=0;a!=t[147].length;++a)if(t[147][a].charCodeAt(0)!==65533){r[t[147][a]]=37632+a;e[37632+a]=t[147][a]}t[148]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æææææ æ¡æ£æ¥æ§æ¨æ©æªæ«æ¬ææ®æ¯æ°æ±æ²æ³æ´æµæ¶æ·æ¸æ¹æºæ»æ¼æ½æ¾æ¿æææææ ææææææææææææææææææææææææ æ¡ï¿½æ¢æ£æ¤æ¦æ§æ¨æ©æªæ¬ææ°æ±æ²æ³æ·æºæ¼æ½æææææææææææææææææææææ æ¡æ¤æ¥æ§æ¨æ©æªææ®æ¯æ±æ³æµæ¶æ¸æ¹æºæ»æ¼æ½æ¾æ¿ææææææ ææææææææææææææææ æ¢æ£æ¦æ¨æªæ¬æ®æ±æ²æ³æ´æµæ¶æ·æ¸æºæ»æ¾æ¿æææææææææææææææææææææ¡æ£æ¤æªæ«ï¿½".split("");for(a=0;a!=t[148].length;++a)if(t[148][a].charCodeAt(0)!==65533){r[t[148][a]]=37888+a;e[37888+a]=t[148][a]}t[149]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ²æ³æ´æµæ¸æ¹æ»æ¼æ½æ¾æ¿æææ ææææææææææææææææ¡æ¢æ£æ¤æ¦æ©æªæ«æ¬æ®æ°æ²æ³æ·æ¸æ¹æºæ»æ½æ¿ææææ ææææææææææï¿½ææææææ æ¢æ£æ¥æ§æ©æªæ«æ¬ææ±æ²æ³æµæ¸æ¹æ»æ¼æ½æ¿ææææ æææææææææææææææææææææ æ¡æ¢æ£æ¤æ¥æ¦æ©æªæ«æ¬ææ¯æ°æ±æ²æ³æµæ¶æ·æ¸æºæ»æ¼æ½æ¿ææææææ æææææææææææææææææææææææ æ¡æ¢æ£æ¤æ¥æ§æ¨æªæ«æ¬ææ®æ¯æ±æµæ¶æ¸æºæ»æ½æææï¿½".split("");for(a=0;a!=t[149].length;++a)if(t[149][a].charCodeAt(0)!==65533){r[t[149][a]]=38144+a;e[38144+a]=t[149][a]}t[150]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææ æææææææææææææææ æ¡æ¢æ£æ¤æ¥æ§æ©æ®æ°æ²æ³æ¶æ·æ¸æ¹æ»æ¼æ¾æ¿æææ ææææææææææææææ¢æ£æ¤æ¦æ§æ«æ¬æ®æ±æ´æ¶ï¿½æ¸æ¹æºæ»æ½ææææ ææææææææææææææææ æ¡æ¤æ¦æ©æ¬æ®æ±æ²æ´æ¹æºæ»æ¼æ½æ¾æ¿æææ æææææææææææææææ¡æ£æ¤æ¦æ§æ¨æªæ«ææ®æ²æµæ¶æ·æ¸æ¹æºæ»æ¼æ¾æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ æ ¢æ £æ ¤æ ¥æ ¦æ §æ ¨æ «æ ¬æ æ ®æ ¯æ °æ ±æ ´æ µæ ¶æ ºæ »æ ¿æ¡æ¡æ¡æ¡æ¡æ¡æ¡æ¡æ¡æ¡æ¡ï¿½".split("");for(a=0;a!=t[150].length;++a)if(t[150][a].charCodeAt(0)!==65533){r[t[150][a]]=38400+a;e[38400+a]=t[150][a]}t[151]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¡æ¡æ¡æ¡æ¡ªæ¡¬æ¡æ¡®æ¡¯æ¡°æ¡±æ¡²æ¡³æ¡µæ¡¸æ¡¹æ¡ºæ¡»æ¡¼æ¡½æ¡¾æ¡¿æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢æ¢ æ¢¡æ¢£æ¢¤æ¢¥æ¢©æ¢ªæ¢«æ¢¬æ¢®æ¢±æ¢²æ¢´æ¢¶æ¢·æ¢¸ï¿½æ¢¹æ¢ºæ¢»æ¢¼æ¢½æ¢¾æ¢¿æ£æ£æ£æ£ æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£æ£¡æ£¢æ£¤æ£¥æ£¦æ£§æ£¨æ£©æ£ªæ£«æ£¬æ£æ£¯æ£²æ£³æ£´æ£¶æ£·æ£¸æ£»æ£½æ£¾æ£¿æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤æ¤¡æ¤¢æ¤£æ¤¥æ¤¦æ¤§æ¤¨æ¤©æ¤ªæ¤«æ¤¬æ¤®æ¤¯æ¤±æ¤²æ¤³æ¤µæ¤¶æ¤·æ¤¸æ¤ºæ¤»æ¤¼æ¤¾æ¥æ¥æ¥æ¥æ¥ æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥æ¥ï¿½".split("");for(a=0;a!=t[151].length;++a)if(t[151][a].charCodeAt(0)!==65533){r[t[151][a]]=38656+a;e[38656+a]=t[151][a]}t[152]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¥¡æ¥¢æ¥¤æ¥¥æ¥§æ¥¨æ¥©æ¥ªæ¥¬æ¥æ¥¯æ¥°æ¥²æ¥³æ¥´æ¥µæ¥¶æ¥ºæ¥»æ¥½æ¥¾æ¥¿æ¦æ¦æ¦ æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦æ¦ æ¦¡æ¦¢æ¦£æ¦¤æ¦¥æ¦¦æ¦©æ¦ªæ¦¬æ¦®æ¦¯æ¦°æ¦²æ¦³æ¦µæ¦¶æ¦¸æ¦¹æ¦ºæ¦¼æ¦½ï¿½æ¦¾æ¦¿æ§æ§æ§æ§æ§ æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§æ§¡æ§¢æ§£æ§¤æ§¥æ§¦æ§§æ§¨æ§©æ§ªæ§«æ§¬æ§®æ§¯æ§°æ§±æ§³æ§´æ§µæ§¶æ§·æ§¸æ§¹æ§ºæ§»æ§¼æ§¾æ¨æ¨æ¨æ¨æ¨æ¨ æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨æ¨ æ¨¢æ¨£æ¨¤æ¨¥æ¨¦æ¨§æ¨©æ¨«æ¨¬æ¨æ¨®æ¨°æ¨²æ¨³æ¨´æ¨¶æ¨·æ¨¸æ¨¹æ¨ºæ¨»æ¨¼æ¨¿æ©æ©æ©æ©æ© æ©æ©æ©æ©æ©æ©æ©æ©æ©æ©æ©æ©æ©æ©æ©æ©æ©ï¿½".split("");for(a=0;a!=t[152].length;++a)if(t[152][a].charCodeAt(0)!==65533){r[t[152][a]]=38912+a;e[38912+a]=t[152][a]; 64873}t[153]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ©æ©æ©æ©æ© æ©¢æ©£æ©¤æ©¦æ©§æ©¨æ©©æ©ªæ©«æ©¬æ©æ©®æ©¯æ©°æ©²æ©³æ©´æ©µæ©¶æ©·æ©¸æ©ºæ©»æ©½æ©¾æ©¿æªæªæªæª æªæªæªæªæªæªæªæªæªæªæªæªæªæªæªæªæªæªæªæªæªæªæª¡æª¢æª£æª¤æª¥æª¦ï¿½æª§æª¨æªªæªæª®æª¯æª°æª±æª²æª³æª´æªµæª¶æª·æª¸æª¹æªºæª»æª¼æª½æª¾æª¿æ«æ«æ«æ«æ«æ« æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ«æ« æ«¡æ«¢æ«£æ«¤æ«¥æ«¦æ«§æ«¨æ«©æ«ªæ««æ«¬æ«æ«®æ«¯æ«°æ«±æ«²æ«³æ«´æ«µæ«¶æ«·æ«¸æ«¹æ«ºæ«»æ«¼æ«½æ«¾æ«¿æ¬æ¬æ¬æ¬æ¬æ¬ æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬æ¬¥æ¬¦æ¬¨æ¬©æ¬ªæ¬«æ¬¬æ¬æ¬®ï¿½".split("");for(a=0;a!=t[153].length;++a)if(t[153][a].charCodeAt(0)!==65533){r[t[153][a]]=39168+a;e[39168+a]=t[153][a]}t[154]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¬¯æ¬°æ¬±æ¬³æ¬´æ¬µæ¬¶æ¬¸æ¬»æ¬¼æ¬½æ¬¿æææææ ææææææææææææææææææææææ æ¡æ¨æ©æ«æ¬ææ®æ¯æ°æ±æ²æ³æ´æµæ¶æ·æ¸æºæ½æ¾æ¿æ®æ® æ®ï¿½æ®æ®æ®æ®æ®æ®æ®æ®æ®æ®æ®æ®æ®æ®æ® æ®¢æ®£æ®¤æ®¥æ®¦æ®§æ®¨æ®©æ®«æ®¬æ®æ®®æ®¯æ®°æ®±æ®²æ®¶æ®¸æ®¹æ®ºæ®»æ®¼æ®½æ®¾æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯æ¯ æ¯¢æ¯£æ¯¤æ¯¥æ¯¦æ¯§æ¯¨æ¯©æ¯¬æ¯æ¯®æ¯°æ¯±æ¯²æ¯´æ¯¶æ¯·æ¯¸æ¯ºæ¯»æ¯¼æ¯¾æ¯¿æ°æ°æ°æ°æ°æ°æ°æ°æ°æ°æ°æ°æ°æ°æ°æ°æ° æ°£æ°¥æ°«æ°¬æ°æ°±æ°³æ°¶æ°·æ°¹æ°ºæ°»æ°¼æ°¾æ°¿æ±æ±æ± æ±æ±æ±æ±æ±æ±æ±æ±æ±æ±æ±ï¿½".split("");for(a=0;a!=t[154].length;++a)if(t[154][a].charCodeAt(0)!==65533){r[t[154][a]]=39424+a;e[39424+a]=t[154][a]}t[155]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ±æ±æ±¢æ±£æ±¥æ±¦æ±§æ±«æ±¬æ±æ±®æ±¯æ±±æ±³æ±µæ±·æ±¸æ±ºæ±»æ±¼æ±¿æ²æ²æ²æ²æ²æ²æ²æ²æ²æ²æ²æ²æ²æ²æ²æ²æ²æ² æ²¢æ²¨æ²¬æ²¯æ²°æ²´æ²µæ²¶æ²·æ²ºæ³æ³æ³æ³æ³æ³æ³æ³æ³æ³æ³æ³æ³æ³ï¿½æ³æ³æ³æ³æ³æ³¤æ³¦æ³§æ³©æ³¬æ³æ³²æ³´æ³¹æ³¿æ´æ´æ´æ´ æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´ æ´¡æ´¢æ´£æ´¤æ´¦æ´¨æ´©æ´¬æ´æ´¯æ´°æ´´æ´¶æ´·æ´¸æ´ºæ´¿æµæµæµæµæµæµæµæµæµæµæµæµæµæµ¡æµ¢æµ¤æµ¥æµ§æµ¨æµ«æµ¬æµæµ°æµ±æµ²æµ³æµµæµ¶æµ¹æµºæµ»æµ½æµ¾æµ¿æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶æ¶¢æ¶¥æ¶¬æ¶æ¶°æ¶±æ¶³æ¶´æ¶¶æ¶·æ¶¹æ¶ºæ¶»æ¶¼æ¶½æ¶¾æ·æ·æ·æ·æ·æ·ï¿½".split("");for(a=0;a!=t[155].length;++a)if(t[155][a].charCodeAt(0)!==65533){r[t[155][a]]=39680+a;e[39680+a]=t[155][a]}t[156]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ·æ·æ·æ·æ·æ·æ·æ·æ·æ·æ·æ·æ·æ·¢æ·£æ·¥æ·§æ·¨æ·©æ·ªæ·æ·¯æ·°æ·²æ·´æ·µæ·¶æ·¸æ·ºæ·½æ·¾æ·¿æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸æ¸¢æ¸¦æ¸§æ¸¨æ¸ªæ¸¬æ¸®æ¸°æ¸±æ¸³æ¸µï¿½æ¸¶æ¸·æ¸¹æ¸»æ¸¼æ¸½æ¸¾æ¸¿æ¹æ¹æ¹æ¹ æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹æ¹ æ¹¡æ¹¢æ¹£æ¹¤æ¹¥æ¹¦æ¹§æ¹¨æ¹©æ¹ªæ¹¬æ¹æ¹¯æ¹°æ¹±æ¹²æ¹³æ¹´æ¹µæ¹¶æ¹·æ¹¸æ¹¹æ¹ºæ¹»æ¹¼æ¹½æºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæºæº æº¡æº£æº¤æº¦æº¨æº©æº«æº¬æºæº®æº°æº³æºµæº¸æº¹æº¼æº¾æº¿æ»æ»æ»æ» æ»æ»æ»æ»æ»æ»æ»æ»æ»æ»æ»æ»æ»æ»æ»æ»£æ»§æ»ªæ»«æ»¬æ»æ»®æ»¯ï¿½".split("");for(a=0;a!=t[156].length;++a)if(t[156][a].charCodeAt(0)!==65533){r[t[156][a]]=39936+a;e[39936+a]=t[156][a]}t[157]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ»°æ»±æ»²æ»³æ»µæ»¶æ»·æ»¸æ»ºæ»»æ»¼æ»½æ»¾æ»¿æ¼æ¼æ¼æ¼æ¼ æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼æ¼¡æ¼¢æ¼£æ¼¥æ¼¦æ¼§æ¼¨æ¼¬æ¼®æ¼°æ¼²æ¼´æ¼µæ¼·æ¼¸æ¼¹æ¼ºæ¼»æ¼¼æ¼½æ¼¿æ½æ½æ½ï¿½æ½æ½æ½ æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½æ½ æ½¡æ½£æ½¤æ½¥æ½§æ½¨æ½©æ½ªæ½«æ½¬æ½¯æ½°æ½±æ½³æ½µæ½¶æ½·æ½¹æ½»æ½½æ½¾æ½¿æ¾æ¾æ¾æ¾æ¾ æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾æ¾ æ¾¢æ¾£æ¾¤æ¾¥æ¾¦æ¾¨æ¾©æ¾ªæ¾«æ¾¬æ¾æ¾®æ¾¯æ¾°æ¾±æ¾²æ¾´æ¾µæ¾·æ¾¸æ¾ºæ¾»æ¾¼æ¾½æ¾¾æ¾¿æ¿æ¿æ¿æ¿ æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿æ¿¢æ¿£æ¿¤æ¿¥ï¿½".split("");for(a=0;a!=t[157].length;++a)if(t[157][a].charCodeAt(0)!==65533){r[t[157][a]]=40192+a;e[40192+a]=t[157][a]}t[158]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¿¦æ¿§æ¿¨æ¿©æ¿ªæ¿«æ¿¬æ¿æ¿°æ¿±æ¿²æ¿³æ¿´æ¿µæ¿¶æ¿·æ¿¸æ¿¹æ¿ºæ¿»æ¿¼æ¿½æ¿¾æ¿¿çççççç çççççççççççççççççççççççç ç¡ç¢ç¤ç¥ç¦ç§ç¨ç©çªï¿½ç«ç¬çç®ç¯ç°ç±ç²ç³ç´ç¶ç·ç¸çºç»ç¼ç½ç¾ç¿çççççç çççççççççççççççççççççççç ç¡ç¢ç£ç¤ç¥ç¦ç§ç¨ç©çªç®ç±ç²ç³ç´ç·ç¹çºç»ç½ççççççççççççççççççççç ç¡ç¢ç£ç¤ç¥ç¦ç§ç¨ç©çªç°ç²ç´çµç¶çºç¾ç¿çç ççççççççççççççççç�".split("");for(a=0;a!=t[158].length;++a)if(t[158][a].charCodeAt(0)!==65533){r[t[158][a]]=40448+a;e[40448+a]=t[158][a]}t[159]="����������������������������������������������������������������çççç ç¡ç¢ç£ç¥çªç®ç°ç±ç²ç³ç´çµç¶ç¸çºç»ç¼ç¾ç¿çççççç çççççççççççççççççç ç¡ç¢ç£ç¤ç¥ç§ç¨ç©çªç«ç¬çç®ç²ç³ç´ï¿½çµç·ç¸ç¹çºç»ç¼ç½ç¾ç¿ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ¡ç ¢ç £ç ¥ç ©ç ªç «ç ¬ç ç ¯ç °ç ±ç ´ç µç ¶ç ·ç ¹ç »ç ¼ç ¾ç ¿ççççç ççççççççççççççççççççç¡ç¢ç£ç¤ç¥ç¦ç§ç©çªç«çç®ç¯ç°ç±ç²ç´ç¶ç·ç¸çºç»ç¼ç½ç¾ç¿ççççç ççççççççççççç�".split("");for(a=0;a!=t[159].length;++a)if(t[159][a].charCodeAt(0)!==65533){r[t[159][a]]=40704+a;e[40704+a]=t[159][a]}t[160]="����������������������������������������������������������������ççççççççççç¡ç¢ç£ç¤ç¦ç¨ç©çªç«ç¬çç¯ç°ç±ç²ç³ç´çµç¶ç·ç¸çºç»ç¼ç½ç¾ç¿çççççç çççççççççççççççççççç�ççççç ç¡ç¢ç£ç¤ç¥ç¦ç§ç©ç«çç®ç¯ç²ç³ç´çºç¼ç¾çççççç ççççççççççççççççç ç£ç¤ç¥ç¨çªç«ç¬çç°ç±ç³ç´ç¶ç·ç¸ç»ç¼ç½ççç ççççççççççççççççççççç ç¡ç¢ç£ç¤ç¥ç¦ç§ç¨ç©çªç«ç®ç±ç²ç³çµçºç»ç¼ç½ç¾ç¿çç ççççççççççççççç�".split("");for(a=0;a!=t[160].length;++a)if(t[160][a].charCodeAt(0)!==65533){r[t[160][a]]=40960+a;e[40960+a]=t[160][a]}t[161]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ããã·Ë˨ãã âï½ââ¦ââââãããããããããããããã±Ã÷â¶â§â¨âââªâ©ââ·ââ¥â¥â âââ«â®â¡âââ½ââ â®â¯â¤â¥ââµâ´ââ°â²â³âï¼Â¤ï¿ ï¿¡â°Â§âââ ââââââ¡â â³â²â»ââââã�".split("");for(a=0;a!=t[161].length;++a)if(t[161][a].charCodeAt(0)!==65533){r[t[161][a]]=41216+a;e[41216+a]=t[161][a]}t[162]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹������âââââââââââââââââââââ´âµâ¶â·â¸â¹âºâ»â¼â½â¾â¿ââââââ âââ â¡â¢â£â¤â¥â¦â§â¨â©ï¿½ï¿½ã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ï¿½ï¿½â ⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫���".split("");for(a=0;a!=t[162].length;++a)if(t[162][a].charCodeAt(0)!==65533){r[t[162][a]]=41472+a;e[41472+a]=t[162][a]}t[163]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ï¼ï¼ï¼ï¿¥ï¼ ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ ABCDEFGHIJKLï¼ï¼®ï¼¯ï¼°ï¼±ï¼²ï¼³ï¼´ï¼µï¼¶ï¼·ï¼¸ï¼¹ï¼ºï¼»ï¼¼ï¼½ï¼¾ï¼¿ï½ï½ï½ï½ï½ï½ ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï¿£ï¿½".split("");for(a=0;a!=t[163].length;++a)if(t[163][a].charCodeAt(0)!==65533){r[t[163][a]]=41728+a;e[41728+a]=t[163][a]}t[164]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ããããã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ãããããã ãããããããããããããã������������".split("");for(a=0;a!=t[164].length;++a)if(t[164][a].charCodeAt(0)!==65533){r[t[164][a]]=41984+a;e[41984+a]=t[164][a]}t[165]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ãããããã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[165].length;++a)if(t[165][a].charCodeAt(0)!==65533){r[t[165][a]]=42240+a;e[42240+a]=t[165][a]}t[166]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎΠΡΣΤΥΦΧΨΩ��������αβγδεζηθικλμνξοÏÏÏÏÏ ÏÏÏÏ�������︵︶︹︺︿ï¹ï¸½ï¸¾ï¹ï¹ï¹ï¹ï¿½ï¿½ï¸»ï¸¼ï¸·ï¸¸ï¸±ï¿½ï¸³ï¸´ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[166].length;++a)if(t[166][a].charCodeAt(0)!==65533){r[t[166][a]]=42496+a;e[42496+a]=t[166][a]}t[167]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐРСТУФХЦЧШЩЪЫЬÐЮЯ���������������абвгдеÑжзийклмнопÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑ��������������".split("");for(a=0;a!=t[167].length;++a)if(t[167][a].charCodeAt(0)!==65533){r[t[167][a]]=42752+a;e[42752+a]=t[167][a]}t[168]="����������������������������������������������������������������ËËËâââ¥âµâ ââââââââ£ââ¦â§â¿âââââââââââââââââ â¡â¢â£â¤â¥â¦â§â¨â©âªâ«â¬ââ®â¯â°â±â²â³âââââ ââ�ââââââââââââ¼â½â¢â£â¤â¥ââããã�����������ÄáÇà ÄéÄèīÃÇìÅóÇòūúÇùÇÇÇÇüêÉ�ÅÅ�ɡ����ã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[168].length;++a)if(t[168][a].charCodeAt(0)!==65533){r[t[168][a]]=43008+a;e[43008+a]=t[168][a]}t[169]="����������������������������������������������������������������ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ã£ãããããã¡ããããã︰¬¦�â¡ã±ï¿½â���ã¼ããã½ã¾ãããï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ ﹡�﹢﹣﹤﹥﹦﹨﹩﹪﹫�������������ã�������������ââââââ âââââââââââââââââââââââââââ â¡â¢â£â¤â¥â¦â§â¨â©âªâ«â¬ââ®â¯â°â±â²â³â´âµâ¶â·â¸â¹âºâ»â¼â½â¾â¿ââââââ ââââââ����������������".split("");for(a=0;a!=t[169].length;++a)if(t[169][a].charCodeAt(0)!==65533){r[t[169][a]]=43264+a;e[43264+a]=t[169][a]}t[170]="����������������������������������������������������������������çççç¢ç£ç¤ç¥ç¦ç§çªç«çµç¶ç¹ç½ç¾ç¿çççç ççççççççççççççççç ç£ç¤ç¦ç§ç¨çç¯ç°ç²ç³çµç¶çºç»ç¼ç½çççççç ççç�çççççççççççççççççççç¡ç¢ç£ç¤ç¥ç¦ç§ç¨ç©çªç«ç®ç°ç±ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[170].length;++a)if(t[170][a].charCodeAt(0)!==65533){r[t[170][a]]=43520+a;e[43520+a]=t[170][a]}t[171]="����������������������������������������������������������������ç²ç³ç´çµç¶ç·ç¸ç¹çºç»ç¼ç½ç¿ççççç ççççççççççççççççççç ç¡ç£ç¤ç¥ç¦ç§ç¨çªç¬çç±ç´çµç¶ç¸ç¹ç¼ç½ç¾ç¿çççç çç�çççççççççççççççç¡ç¢ç£ç¤ç¦ç¨çªç«ç¬ç®ç¯ç°ç±ç³ç´çµç¶ç·ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[171].length;++a)if(t[171][a].charCodeAt(0)!==65533){r[t[171][a]]=43776+a;e[43776+a]=t[171][a]}t[172]="����������������������������������������������������������������ç¸ç¹çºç»ç¼ç½ç¾ç¿çççççççççççççççççççççççç ç¡ç£ç¤ç§ç©ç«çç¯ç±ç²ç·ç¸ç¹çºç»ç½ç¾ç¿ççççç çççççççç�ççççççççççç ç¡ç¢ç£ç¤ç¥ç¦ç§ç¨ç©çªç«ç¬ç®ç¯ç±ç²ç³ç´çµç¸ç¹çºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[172].length;++a)if(t[172][a].charCodeAt(0)!==65533){r[t[172][a]]=44032+a;e[44032+a]=t[172][a]}t[173]="����������������������������������������������������������������ç»ç¼ç½ç¿ççç ççççççççççççççççççççç ç¡ç¢ç£ç¤ç¥ç¦çªç«ç¬çç®ç¯ç°ç±ç²ç³ç´çµç¶ç·ç¸ç¹ç»ç¼ç½ç¾ç¿çççççç çç�çççççççççççççççççççççç¡ç¥ç§ç¨ç©çªç«ç¬çç°ç±ç²ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[173].length;++a)if(t[173][a].charCodeAt(0)!==65533){r[t[173][a]]=44288+a;e[44288+a]=t[173][a]}t[174]="����������������������������������������������������������������ç³çµç¸ç¹çºç»ç¼ç½ç¾ççççç çççççççççççççççççç ç¡ç¢ç£ç¤ç¦ç§çªç®ç´ç¶ç¹ç¼ç½ç¿ççççççççççççççççç�çççç ç¡ç¢ç£ç¤ç§ç¨ç©ç«ç¬çç®ç¯ç°ç±ç³çµç¶ç·çºç»ç¼ç½ç¾ççççç ç�����������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[174].length;++a)if(t[174][a].charCodeAt(0)!==65533){r[t[174][a]]=44544+a;e[44544+a]=t[174][a]}t[175]="����������������������������������������������������������������çççççççççççççç¢ç¦ç§ç¨ç©çªçç¶ç·çºç»ç¿ççççççççççççççççç ç¡ç¥ç©ç¬çç®ç¯ç²ç³çµç¶ç·ç¸çºç»ç½ç¾çççç�çççççççççççççççç¡ç£ç§ç¨ç¬ç®ç¯ç±ç²ç¶ç·ç¹çºç»ç½ççç�����������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[175].length;++a)if(t[175][a].charCodeAt(0)!==65533){r[t[175][a]]=44800+a;e[44800+a]=t[175][a]}t[176]="����������������������������������������������������������������ç ççççççççççççççççççççç ç¡ç¢ç¤ç¥ç¦ç§ç¨ç©çªç¬çç®ç°ç±ç²ç³ç´çµç¶ç·ç¹çºç¼ç¿çççç ççççççççççççç�ççççç ç¡ç¢ç£ç¥ç¦ç§ç¨ç©çªç«ç¬çç¯ç°ç³çµç¶ç·ç¸ç¹çºç»ç¼ç½ç¾çççåé¿åæ¨åååççè¼ç®è¾ç¢ç±ééæ°¨å®ä¿ºææå²¸èºæ¡è®æç广ç¬ç¿±è¢å²å¥¥ææ¾³èææåå§ç¬å «ç¤å·´æè·é¶æèåé¸ç½¢ç¸ç½æç¾æä½°è´¥æç¨æçæ¬æ³è¬é¢æ¿çæ®æä¼´ç£ååç»é¦å¸®æ¢æ¦èç»æ£ç£ èéåè°¤èèå è¤å¥ï¿½".split("");for(a=0;a!=t[176].length;++a)if(t[176][a].charCodeAt(0)!==65533){r[t[176][a]]=45056+a;e[45056+a]=t[176][a]}t[177]="����������������������������������������������������������������ççççççççççççç ç¡ç¢ç£ç¤ç¦ç§ç¨ç©çªç«ç¬çç°ç³çµç¶ç·çºç»ç½ç¿çççç ççççççççççççççççççç¡ç£ç¤ç¥ç§çªç«ï¿½ç¬ç®ç°ç±ç²ç³ç´ç¹ç»ç½ç¾ç¿ççç ççççççççççççççççççèé¹ä¿å ¡é¥±å®æ±æ¥æ´è±¹é²çæ¯ç¢æ²ååè¾èè´é¡åç夿«ç被å¥è¯æ¬ç¬¨å´©ç»·ç泵蹦迸é¼é¼»æ¯éç¬å½¼ç¢§èè½æ¯æ¯æ¯å¸åºç¹éæå¼å¿ è¾å£èé¿ééè¾¹ç¼è´¬æä¾¿ååè¾¨è¾©è¾«éæ å½ªèè¡¨é³æå«çªå½¬ææ¿æ»¨å®¾æå µå°æä¸ç§é¥¼ç³ï¿½".split("");for(a=0;a!=t[177].length;++a)if(t[177][a].charCodeAt(0)!==65533){r[t[177][a]]=45312+a;e[45312+a]=t[177][a]}t[178]="����������������������������������������������������������������çççç ç¤ç§ç©çªçç®ç¯ç°ç±ç²ç³ç´çµç¶ç·ç¸çºç»ç¼çççççççççççççççççççççççç¡ç£ç¤ç¦ç¨ç«çç®ç¯ç±ç²ç´ç¶ç·ç¸ç¹çºï¿½ç¼ç¾çççççç ççççççççççççççççççççççç ç¡ç¤ç å¹¶ç»è ææ¨éµæ³¢ååæéç®ä¼¯å¸è¶èèæ¸¤æ³é©³æååºè¡¥å ä¸å¸æ¥ç°¿é¨ææ¦çè£ææè´¢ç¬è¸©é彩èè¡é¤åèæ®ææ¨ç¿èè±ä»æ²§èæç³æ§½æ¹èåçä¾§åæµå±è¹æåè¬è¶æ¥ç¢´æ½å¯å²å·®è¯§ææ´è±ºææºèé¦è°ç¼ é²äº§é颤æç�".split("");for(a=0;a!=t[178].length;++a)if(t[178][a].charCodeAt(0)!==65533){r[t[178][a]]=45568+a;e[45568+a]=t[178][a]}t[179]="����������������������������������������������������������������ç¦ç¨çªç¯ç°ç±ç²ç´çµç·ç¹çºç»ç¼ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ç ¡ç ¢ç ¤ç ¨ç ªç «ç ®ç ¯ç ±ç ²ç ³ç µç ¶ç ½ç ¿ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ç¡ï¿½ç¡ç¡ç¡ç¡ç¡ 硡硢硣硤硥硦硧硨硩硯硰硱硲硳硴硵硶硸硹硺硻硽硾硿ç¢ç¢ç¢ç¢åºå°å¸¸é¿å¿è åæç å±å¡è¶ æéæå²æ½®å·¢åµçè½¦æ¯æ¤æ£å½»æ¾é´è£è¾°å°æ¨å¿±æ²éè¶è¡¬æç§°åæ©æåä¹ç¨æ©æ¾è¯æ¿ééªç§¤åç´æåæ± è¿å¼é©°è»é½¿ä¾å°ºèµ¤ç¿ æ¥ç½å å²è«å´å® æ½é ¬ç´è¸ç¨ æç¹ä»ç»¸ç ä¸èååºæ©±å¨èºé鿻餿¥ï¿½".split("");for(a=0;a!=t[179].length;++a)if(t[179][a].charCodeAt(0)!==65533){r[t[179][a]]=45824+a;e[45824+a]=t[179][a]}t[180]="����������������������������������������������������������������ç¢ç¢ ç¢ç¢ç¢ç¢ç¢ç¢ç¢ç¢ç¢ç¢ç¢ç¢ç¢ç¢ 碢碤碦碨碩碪碫碬ç¢ç¢®ç¢¯ç¢µç¢¶ç¢·ç¢¸ç¢ºç¢»ç¢¼ç¢½ç¢¿ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ç£ 磡磢磣�磤磥磦磧磩磪磫ç£ç£®ç£¯ç£°ç£±ç£³ç£µç£¶ç£¸ç£¹ç£»ç£¼ç£½ç£¾ç£¿ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¡å¨çæè§¦å¤æ£å·ç©¿æ¤½ä¼ è¹å串ç®çªå¹¢åºé¯åå¹çæ¶é¤åæ¥æ¤¿éåæ·³çº¯è ¢æ³ç»°çµè¨ç£éè¾æ ç·è¯æ¤åºèµæ¬¡èªè±å±åä»ä¸åç²éç°ä¿è¹¿ç¯¡çªæ§å´å¬èçç²¹æ·¬ç¿ æåå¯¸ç£æ®ææªæ«éæè¾¾çç©æå¤§åæ¹å£æ´å¸¦æ®ä»£è´·è¢å¾ é®ï¿½".split("");for(a=0;a!=t[180].length;++a)if(t[180][a].charCodeAt(0)!==65533){r[t[180][a]]=46080+a;e[46080+a]=t[180][a]}t[181]="����������������������������������������������������������������ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¤ 礡礢礣礥礦礧礨礩礪礫礬ç¤ç¤®ç¤¯ç¤°ç¤±ç¤²ç¤³ç¤µç¤¶ç¤·ç¤¸ç¤¹ç¤½ç¤¿ç¥ç¥ç¥ç¥ ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥¡ç¥£ï¿½ç¥¤ç¥¦ç¥©ç¥ªç¥«ç¥¬ç¥®ç¥°ç¥±ç¥²ç¥³ç¥´ç¥µç¥¶ç¥¹ç¥»ç¥¼ç¥½ç¥¾ç¥¿ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦æ è½æ 丹å鏿¸èæ¦æ°®ä½æ®æ·¡è¯å¼¹è彿¡å è¡æ¡£åæ£è¹åå²ç¥·å¯¼å°ç¨»æ¼éçå¾·å¾ç蹬ç¯ç»ççªå³éå ¤ä½æ»´è¿ªæç¬ç涤ç¿å«¡æµåºå°è第å¸å¼éç¼é¢ ææ»ç¢ç¹å ¸éå«çµä½ç¸åºæ¦å¥ æ·æ®¿ç¢å¼éååæåéè°è·ç¹ç¢è¶è¿è°å �".split("");for(a=0;a!=t[181].length;++a)if(t[181][a].charCodeAt(0)!==65533){r[t[181][a]]=46336+a;e[46336+a]=t[181][a]}t[182]="����������������������������������������������������������������ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ç¦ 禡禢禣禤禥禦禨禩禪禫禬ç¦ç¦®ç¦¯ç¦°ç¦±ç¦²ç¦´ç¦µç¦¶ç¦·ç¦¸ç¦¼ç¦¿ç§ç§ç§ ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ç§ 秡秢秥秨秪�秬秮秱秲秳秴秵秶秷秹秺秼秾秿ç¨ç¨ç¨ ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ç¨ä¸ç¯å®éé¡¶é¼éå®è®¢ä¸¢ä¸å¬è£æå¨æ 便«å»æ´å ææé¡è±éçé½ç£æ¯çç¬è¯»å µç¹èµæéè度渡å¦ç«¯ç黿®µæç¼å å é对墩å¨è¹²æ¦é¡¿å¤éç¾éæåå¤å¤ºå躲æµè·ºèµåæ°å è¾å³¨é¹ ä¿é¢è®¹å¨¥æ¶åæ¼éé饿æ©èå¿è³å°é¥µæ´±äºï¿½".split("");for(a=0;a!=t[182].length;++a)if(t[182][a].charCodeAt(0)!==65533){r[t[182][a]]=46592+a;e[46592+a]=t[182][a]}t[183]="����������������������������������������������������������������ç¨ç¨ç¨¡ç¨¢ç¨¤ç¨¥ç¨¦ç¨§ç¨¨ç¨©ç¨ªç¨«ç¨¬ç¨ç¨®ç¨¯ç¨°ç¨±ç¨²ç¨´ç¨µç¨¶ç¨¸ç¨ºç¨¾ç©ç©ç©ç©ç©ç© ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç©ç© 穡穢穣穤穥穦穧穨�穩穪穫穬ç©ç©®ç©¯ç©±ç©²ç©³ç©µç©»ç©¼ç©½ç©¾çªçª çªçªçªçªçªçªçªçªçªçªçªçªçªçªçª¡çª¢è´°åç½çä¼ä¹éæ³çè©å¸çªç¿»æ¨ç¾éç¹å¡ç¦åè¿èè´©ç¯é¥æ³åè³æ¹èªæ¿é²å¦¨ä»¿è®¿çººæ¾è²éå¡é£è¥åªè¯½å èºåºæ²¸è´¹è¬é 婿°å纷åçæ±¾ç²å¥ä»½å¿¿æ¤ç²ªä¸°å°æ«èå³°éé£ç¯ç½é¢å¯ç¼è®½å¥å¤ä½å¦å¤«æ·è¤åµæ¶æè¾å¹ æ°ç¬¦ä¼ä¿æï¿½".split("");for(a=0;a!=t[183].length;++a)if(t[183][a].charCodeAt(0)!==65533){r[t[183][a]]=46848+a;e[46848+a]=t[183][a]}t[184]="����������������������������������������������������������������窣窤窧窩窪窫窮窯窰窱窲窴窵窶窷窸窹窺窻窼窽窾ç«ç«ç«ç«ç«ç« ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«ç«¡ç«¢ç«¤ç«§ç«¨ç«©ç«ªç««ç«¬ç«®ç«°ç«±ç«²ç«³ï¿½ç«´ç«µç«¶ç«·ç«¸ç«»ç«¼ç«¾ç¬ç¬ç¬ç¬ ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬ç¬¡ç¬¢ç¬£ç¬§ç¬©ç¬æµ®æ¶ªç¦è¢±å¼ç«æè¾ ä¿¯éæ§è¯è åºè èµ´å¯è¦èµå¤å ä»éç¶è ¹è´å¯è®£éå¦ç¼åå¶åè¯¥æ¹æ¦éçæºå¹²çææç«¿èèµ¶æç§æ¢èµ£ååé¢ç¼¸èçº²å²æ¸¯æ ç¯çé«èç¾ç³æé稿å奿ææé¸½è³çå²é©èæ ¼è¤ééé¬ä¸ªåç»æ ¹è·èæ´åºç¾¹ï¿½".split("");for(a=0;a!=t[184].length;++a)if(t[184][a].charCodeAt(0)!==65533){r[t[184][a]]=47104+a;e[47104+a]=t[184][a]}t[185]="����������������������������������������������������������������笯笰笲笴笵笶笷笹笻笽笿çççççççççççççççççç¡ç£ç¤ç¥ç¦ç§ç¨ç©çªç«ç¬çç¯ç°ç³ç´ç¶ç¸çºç¼ç½ç¿ç®ç®ç®ç®ç®ç®ç®ç®ç®ç®ç®ç®ç®ï¿½ç®ç®ç®ç®ç®ç®ç®ç®ç®ç®ç® 箣箤箥箮箯箰箲箳箵箶箷箹箺箻箼箽箾箿ç¯ç¯ç¯ç¯åè¿æ¢å·¥æ»åæé¾ä¾èº¬å ¬å®«å¼å·©æ±æ±è´¡å ±é©å¾æ²èç墿è´å¤è¾èåç®ä¼°æ²½å¤å§é¼å¤èéª¨è°·è¡æ 顾åºéå®çå寡æè¤ä¹ææªæ£ºå ³å®å è§ç®¡é¦ç½æ¯çè´¯å 广éç°è§åç¡ å½é¾éºè½¨é¬¼è¯¡ç¸æ¡æè·ªè´µå½è¾æ»æ£é éå½æè£¹è¿å�".split("");for(a=0;a!=t[185].length;++a)if(t[185][a].charCodeAt(0)!==65533){r[t[185][a]]=47360+a;e[47360+a]=t[185][a]}t[186]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç¯ ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ç¯ 篢篣篤篧篨篩篫篬ç¯ç¯¯ç¯°ç¯²ç¯³ç¯´ç¯µç¯¶ç¯¸ç¯¹ç¯ºç¯»ç¯½ç¯¿ç°ç°ç°ç°ç°ç° ç°ç°ç°ç°ç°ç°ç°ç°ç°ç°ç°ç°ç°ç°ç°ï¿½ç°ç°ç°ç°ç°ç° 簡簢簣簤簥簨簩簫簬ç°ç°®ç°¯ç°°ç°±ç°²ç°³ç°´ç°µç°¶ç°·ç°¹ç°ºç°»ç°¼ç°½ç°¾ç±éª¸å©æµ·æ°¦äº¥å®³éªé £æ¨é¯é©å«æ¶µå¯å½åç½ç¿°æ¼ææ±æ¾æçæ±æ±å¤¯æèªå£å豪毫é好èå·æµ©åµåè·èæ ¸ç¦¾åä½åçè²é河涸赫è¤é¹¤è´ºå¿é»çå¾ç æ¨å¼äº¨æ¨ªè¡¡æè½°åçè¹é¸¿æ´ªå®å¼çº¢å侯ç´å¼åååå¼ä¹å¿½ç壶è«è¡è´çç³æ¹ï¿½".split("");for(a=0;a!=t[186].length;++a)if(t[186][a].charCodeAt(0)!==65533){r[t[186][a]]=47616+a;e[47616+a]=t[186][a]}t[187]="����������������������������������������������������������������ç±ç±ç± ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç±ç± 籡籢籣籤籥籦籧籨籩籪籫籬ç±ç±®ç±¯ç±°ç±±ç±²ç±µç±¶ç±·ç±¸ç±¹ç±ºç±¾ç±¿ç²ç²ç²ç²ç²ç² ç²ç²ï¿½ç²ç²ç²ç²ç²ç²ç²ç²ç²ç²ç²ç²ç²ç²ç² 粡粣粦粧粨粩粫粬ç²ç²¯ç²°ç²´ç²µç²¶ç²·ç²¸ç²ºç²»å¼§è嬿¤äºæ²ªæ·è±ååç¾æ»ç»ååè¯æ§å¾ææ·®åæ¬¢ç¯æ¡è¿ç¼æ¢æ£å¤çªè±¢çæ¶£å®¦å¹»èæ é»ç£ºèç°§çå°æ¶ç æå¹æè°ç°æ¥è¾å¾½æ¢èåæ¯ææ §åæ æ¦è´¿ç§½ä¼ç©æ±è®³è¯²ç»è¤æå©éæµæ··è±æ´»ä¼ç«è·ææé货祸å»å¾åºæºç¸ç¨½ç§¯ç®ï¿½".split("");for(a=0;a!=t[187].length;++a)if(t[187][a].charCodeAt(0)!==65533){r[t[187][a]]=47872+a;e[47872+a]=t[187][a]}t[188]="����������������������������������������������������������������粿ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³ç³¡ç³¢ç³£ç³¤ç³¥ç³¦ç³§ç³©ç³ªç³«ç³¬ç³ç³®ç³°ç³±ç³²ç³³ç³´ç³µç³¶ç³·ç³¹ç³ºç³¼ç³½ç³¾ç³¿ç´ç´ç´ç´ç´ç´ ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ï¿½ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´¡ç´£ç´¤ç´¥ç´¦ç´¨ç´©ç´ªç´¬ç´ç´®ç´°ç´±ç´²ç´³ç´´ç´µç´¶è饥迹æ¿è®¥é¸¡å§¬ç»©ç¼åææ£è¾ç±éåæ¥ç¾æ±²å³å«çº§æ¤å èå·±èæåå£ä¼ç¥åæ¸æµå¯å¯è®¡è®°æ¢å¿é å¦ç»§çºªåæ·å¤¹ä½³å®¶å èé¢è´¾ç²é¾å稼价æ¶é©¾å«æ¼çåå°ç¬ºé´ç å ¼è©è°å¥¸ç¼è§æ£æ¬ç¢±ç¡·æ£æ¡ç®ä¿åªåèæ§é´è·µè´±è§é®ç®ä»¶ï¿½".split("");for(a=0;a!=t[188].length;++a)if(t[188][a].charCodeAt(0)!==65533){r[t[188][a]]=48128+a;e[48128+a]=t[188][a]}t[189]="����������������������������������������������������������������紷紸紹紺紻紼紽紾紿çµçµçµçµçµçµ çµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµçµ 絡絢絣絤絥給絧絨絩絪絫絬çµçµ¯çµ°çµ±çµ²çµ³çµ´çµµçµ¶ï¿½çµ¸çµ¹çµºçµ»çµ¼çµ½çµ¾çµ¿ç¶ç¶ç¶ç¶ç¶ç¶ ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶å¥è°åé¥¯æ¸æº 涧建åµå§å°æµæ±çèæ¡¨å¥è®²å é ±éèæ¤ç¤ç¦è¶äº¤éæµéªå¨å¼æ é°ç«ä¾¥èç¡è§é¥ºç¼´ç»å¿æé µè½¿è¾å«çªææ¥ç秸è¡é¶æªå«èæ¡æ°æ·ç«ç«æ´ç»è§£å§æèè¥çåä»ç¥è¯«å±å·¾çæ¤é仿´¥è¥ç´§é¦ä» è°¨è¿é³æç¦è¿ç¬æµ¸ï¿½".split("");for(a=0;a!=t[189].length;++a)if(t[189][a].charCodeAt(0)!==65533){r[t[189][a]]=48384+a;e[48384+a]=t[189][a]}t[190]="����������������������������������������������������������������ç¶ç¶ç¶ç¶ç¶ç¶ç¶ç¶ 綡綢綣綤綥綧綨綩綪綫綬ç¶ç¶¯ç¶°ç¶±ç¶²ç¶³ç¶´ç¶µç¶¶ç¶·ç¶¸ç¶¹ç¶ºç¶»ç¶¼ç¶½ç¶¾ç¶¿ç·ç·ç·ç·ç·ç· ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ç·ï¿½ç·ç·ç·ç·ç·ç·ç· 緡緢緣緤緥緦緧編緩緪緫緬ç·ç·®ç·¯ç·°ç·±ç·²ç·³ç·´ç·µç·¶ç··ç·¸ç·¹ç·ºå°½å²èå ¢èçæ¶é²¸äº¬æç²¾ç²³ç»äºè¦æ¯é¢é墿¬éå¾çéç«ç«åç¯çªæªç©¶çº çéä¹ ç¸ä¹é 婿æ§è¼è åå°±çé æçç½å± 驹èå±åç©ä¸¾æ²®èææ®å·¨å ·è·è¸é¯ä¿±å¥æ§ç¬å§æé¹å¨å¦ç·å·ç»¢æ æ«ææåçµè§å³è¯ç»åèé§åå峻�".split("");for(a=0;a!=t[190].length;++a)if(t[190][a].charCodeAt(0)!==65533){r[t[190][a]]=48640+a;e[48640+a]=t[190][a]}t[191]="����������������������������������������������������������������緻緼緽緾緿ç¸ç¸ç¸ç¸ç¸ç¸ ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ç¸ 縡縢縣縤縥縦縧縨縩縪縫縬ç¸ç¸®ç¸¯ç¸°ç¸±ç¸²ç¸³ç¸´ç¸µç¸¶ç¸·ç¸¸ç¸¹ï¿½ç¸ºç¸¼ç¸½ç¸¾ç¸¿ç¹ç¹ç¹ç¹ç¹ ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ç¹ä¿ç«£æµé¡éªååå¡å¯å¼æ©æ¥·å¯æ ¨åå ªååç çåº·æ ·ç³ ææäº¢çèæ·ç¤é å·èæ¯æ£µç£é¢ç§å£³å³å¯æ¸´å å»å®¢è¯¾è¯å妿³åå空æåæ§æ 壿£å¯æ¯åçªè¦é ·åºè£¤å¤¸å®æè·¨è¯åç·ä¾©å¿«å®½æ¬¾å¡ççæ¡ç¿ç¶æ·åµäºç岿窥èµå¥éå�".split("");for(a=0;a!=t[191].length;++a)if(t[191][a].charCodeAt(0)!==65533){r[t[191][a]]=48896+a;e[48896+a]=t[191][a]}t[192]="����������������������������������������������������������������ç¹ç¹ç¹ 繡繢繣繤繥繦繧繨繩繪繫繬ç¹ç¹®ç¹¯ç¹°ç¹±ç¹²ç¹³ç¹´ç¹µç¹¶ç¹·ç¹¸ç¹¹ç¹ºç¹»ç¹¼ç¹½ç¹¾ç¹¿çºçºçºçºçº çºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºçºï¿½çº®çº´çº»çº¼ç»ç»¤ç»¬ç»¹ç¼ç¼ç¼ç¼·ç¼¹ç¼»ç¼¼ç¼½ç¼¾ç¼¿ç½ç½ç½ç½ç½ç½ç½ç½ç½ç½ç½ç½ç½ç½ç½é¦æ§æºå¤ææå°æ¬æ©å»éåæåè¡è è¾£å¦è±æ¥èµèå©ªæ æ¦ç¯®éå °æ¾è°°æ½è§æç¼çæ»¥ç æ¦ç¼å»éææµªæå³ç¢èä½¬å§¥é ªçæ¶åä¹é·éè¾ç£ç´¯å¡åæè类泪棱æ¥å·å梨çé»ç¯±ç¸ç¦»æ¼çæé鲤礼èèåæ ä¸½åå±ç ¾åå©åä¾ä¿ï¿½".split("");for(a=0;a!=t[192].length;++a)if(t[192][a].charCodeAt(0)!==65533){r[t[192][a]]=49152+a;e[49152+a]=t[192][a]}t[193]="����������������������������������������������������������������ç½ç½ç½ç½ç½ç½ç½ 罣罤罥罦罧罫罬ç½ç½¯ç½°ç½³ç½µç½¶ç½·ç½¸ç½ºç½»ç½¼ç½½ç½¿ç¾ç¾ç¾ç¾ç¾ ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ç¾ 羢羣羥羦羨義羪羫羬ç¾ç¾®ç¾±ï¿½ç¾³ç¾´ç¾µç¾¶ç¾·ç¾ºç¾»ç¾¾ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿¢ç¿£ç¢ç«ç²æ²¥é¶åçå©ä¿©èè²è¿é°å»ææ¶å¸æè¸é¾æç¼ç»ç²®åæ¢ç²±è¯ä¸¤è¾éæ¾äº®è° æ©èåççå¯¥è¾½æ½¦äºæé£å»æåè£çå£çç³æç£·é临é»é³æ·åèµåæç²è±é¶é¾éä¼¶ç¾åçµéµå²é¢å¦ä»¤æºç榴硫é¦çåç¤æµæ³å é¾èå笼窿�".split("");for(a=0;a!=t[193].length;++a)if(t[193][a].charCodeAt(0)!==65533){r[t[193][a]]=49408+a;e[49408+a]=t[193][a]}t[194]="����������������������������������������������������������������翤翧翨翪翫翬ç¿ç¿¯ç¿²ç¿´ç¿µç¿¶ç¿·ç¿¸ç¿¹ç¿ºç¿½ç¿¾ç¿¿èèèèèèèèèèèèèèè¡è£è¤è«è¬èè®è¯è°è²è´è¹èºè¼è¾èèèè èèèèèèèèèèè�èèèèèèè è¡è¢è£è¤è¥è¦è§è¨è«è¬èè®è¯è°è²è³è´èµè¶è·è¸è¹èºè»è¼è½é忢鿥¼å¨æç¯æ¼éè¦å¢é¢ åºçæ³å¤èé²éºç¢é²è·¯èµé¹¿æ½ç¦å½éæ®é©´åéä¾£æ 履屡ç¼èæ°¯å¾ç滤绿峦æåªæ»¦åµä¹±æ ç¥æ¡è½®ä¼¦ä»æ²¦çº¶è®ºèèºç½é»é£ç®©éª¡è£¸è½æ´éªç»å¦éº»çç è马éªååå买麦åè¿èçé¦è®æ»¡èæ¼æ ¢æ¼«ï¿½".split("");for(a=0;a!=t[194].length;++a)if(t[194][a].charCodeAt(0)!==65533){r[t[194][a]]=49664+a;e[49664+a]=t[194][a]}t[195]="����������������������������������������������������������������è¾èèè èèèèèèèèèèèèèè£è¦è§è¨è¬è°è³èµè¶è¸è¹è»è èèèèèèèèèèèèèèè è¢è£è¦è®èµè·è¹è»è¾è¿èèèèè èèè�èèèèèèèèè è¡è¢è£è¤è¥è¦è§è¨è©èªè«èè®è°è³è´èµè·è¹èºè»è¼è½è¿è°©èè«ç²æ°å¿è½ç«è 鿝çéå¯èå帽è²è´¸ä¹ç«ææ¢ é ¶éç ¤æ²¡çåªéæ¯ç¾æ§å¯å¦¹åªé¨é·ä»¬èèæª¬çé°ç梦åç¯éé¡ç³è¿·è°å¼¥ç±³ç§è§ æ³èå¯å¹æ£ç 绵åå åå¨©ç¼ é¢èæçèç§æ¸ºåºå¦èçæ°æ¿ç¿ææ¯é½æè鸣éåå½è°¬æ¸ï¿½".split("");for(a=0;a!=t[195].length;++a)if(t[195][a].charCodeAt(0)!==65533){r[t[195][a]]=49920+a;e[49920+a]=t[195][a]}t[196]="����������������������������������������������������������������è è è è è è è è è è è è è è è è è è è è è ¡è ¢è £è ¤è ¦è ¨è ªè «è ¬è ¯è ²è ³è µè ¶è ·è ¸èèèè èèèèèèèèèèèèèèèèèèè è¡è¢è¤è¥ï¿½è§è©è«è¬èè®è¯è°è±è²è´èµè¶è·è¸è¹è¼è½è¾è¿èè èèèèèèèèèèèæ¹èæ¨¡è磨æ©éæ¹æ«è«å¢¨é»æ²«æ¼ å¯éè°çææç¡äº©å§æ¯å¢æ®å¹åæ æ¨ç®ç¦ç§ç©æ¿åªåé é£å¨çº³æ°ä¹å¥¶èå¥åç·é¾åæ èæ¼é¹æ·å¢é¦å å«©è½å¦®éåªæ³¥å°¼æä½ å¿è »éæººè«æå¹´ç¢¾æµæ»å¿µå¨é ¿é¸å°¿æèå½å®ééæ¶ æ¨æ çåå®ï¿½".split("");for(a=0;a!=t[196].length;++a)if(t[196][a].charCodeAt(0)!==65533){r[t[196][a]]=50176+a;e[50176+a]=t[196][a]}t[197]="����������������������������������������������������������������èèèèèèèèèèèèè è¡è¢è¤è¥è¦è¨è©è«è®è¯è°è±è²èµè¶è·è¸è¹èºè½è¿èèèèèèèèèèèèèèèèèè è¤è¥è¦è§è©è®è²èºè¼è½è¿ï¿½èèèèè èèèèèèèèèèèèèèèèèèèè è¡è¢è£è¤è¥è¦è§è©æ§æ³çæé®çº½èæµåå¼å¥´åªæå¥³æèçæªæ¦ç³¯è¯ºå¦æ¬§é¸¥æ®´èåå¶æ²¤åªè¶´ç¬å¸æç¶ææç徿¹æ´¾ææ½çç£ç¼çå¤åä¹åºæèªèæåå¨ç®è¢è·æ³¡å¸èå¹è£´èµéªé 佩æ²å·çç °æ¨ç¹æ¾å½è¬æ£ç¡¼ç¯·è¨æé¹æ§ç¢°å¯ç 鹿¹æ«åçµæ¯ï¿½".split("");for(a=0;a!=t[197].length;++a)if(t[197][a].charCodeAt(0)!==65533){r[t[197][a]]=50432+a;e[50432+a]=t[197][a]}t[198]="����������������������������������������������������������������èªè«è¬èè±èµè¶è·è¸è»è¼èèèè èèèèèèèèèèèèè è¢è£è§è²èµè¶èºè»è¼è¿èèèè èèèèèèèè¢è§è¨è©èªè¬èè®è°è²è³èµè¶è¸ï¿½èºè¼è½è¾è¿èèèèèèèèèèèèèè è¡è¢è£è¤è¥è¦è©èªè®è°è²è·è»è½å¤è¾ç²ç®å¹çå»å±è¬ç¯åçéªé£æ¼ç¢ç¥¨æç¥æ¼é¢è´«åèä¹åªè¹èå¹³åç¶è¯å±å¡æ³¼é¢å©ç ´éè¿«ç²åæéºä»èè¡è©è²åæ´åæ®æµ¦è°±æçææ¬ºæ æå¦»ä¸åæ¼ææ²å ¶æ£å¥æ§ç¦å´è齿ç¥ç¥éªèµ·å²ä¹ä¼å¯å¥ç 卿°è¿å¼æ±½æ³£è®«æï¿½".split("");for(a=0;a!=t[198].length;++a)if(t[198][a].charCodeAt(0)!==65533){r[t[198][a]]=50688+a;e[50688+a]=t[198][a]}t[199]="����������������������������������������������������������������è¾è¿èèèè èèèèèèèèèèèèèè¢è°è±è²è³è´èµè¶è¹èºè¾è¿èèèèèèèèèèèèèèèèèèèèèèè¡è¢è£è¤è¥è¦è§è¬èè®ï¿½è¯èµè»è¾è¿èèèèèèèèèèèèèèèèèèèè¢è£è¤è¦è§è¨è«è¬èæ°æ´½çµæ¦éé åè¿ç¾ä»è°¦ä¹¾é»é±é³åæ½é£æµ è°´å 嵿¬ ææªåè ç¾å¢è·å¼ºæ¢æ©é¹æ²ææ¡¥ç§ä¹ä¾¨å·§éæ¬ç¿å³ä¿çªåè䏿¯çªé¦ä¾µäº²ç§¦ç´å¤è¹æç¦½å¯æ²é轻氢å¾å¿æ¸ ææ´æ°°æ 顷请åºç¼ç©·ç§ä¸é±çæ±åé æ³ è¶åºèæ²èº¯å±é©±æ¸ �".split("");for(a=0;a!=t[199].length;++a)if(t[199][a].charCodeAt(0)!==65533){r[t[199][a]]=50944+a;e[50944+a]=t[199][a]}t[200]="����������������������������������������������������������������è®è¯è³è´èµè¶è·èºè»è¼è¾è¿èèè èèèèèèèèèèèèèèèèè è¡è¢è£è©èªè«è¬èè®è¯è°è²è³è´èµè¶è·è¹èºè»è¾è¿èèèèèè èèè�èèèèèèèèèèèèèèèèè è¢è¤è¥è¦è§è¨èªè®è¯è°è²è´è·è¹è»è¼å娶é¾è¶£å»å颧æéæ³å ¨çæ³ç¬å¸å缺çç¸å´é¹æ¦·ç¡®éè£ç¾¤ç¶çåæç¤å£¤æå·è®©é¥¶æ°ç»æ¹ç壬ä»äººå¿é§ä»»è®¤åå¦çº«æä»æ¥æè¸èè£èçæº¶å®¹ç»åææèè¹è ååºå¦è¾±ä¹³æ±å ¥è¤¥è½¯é®èçéé°æ¶¦è¥å¼±ææ´è¨è ®é³å¡èµä¸å�".split("");for(a=0;a!=t[200].length;++a)if(t[200][a].charCodeAt(0)!==65533){r[t[200][a]]=51200+a;e[51200+a]=t[200][a]}t[201]="����������������������������������������������������������������è½è¾è¿èèèèè èèèèèèèèèèèèèèèèèè è¢è£è¤è¥è¦è§è¨è©èªè«è¬èè®è°è±è³èµè¶è·è»è¼è¾èèèè èèèèèèèèèèè�èèèèèèè¡è¢è¤è§è¨è©èªè«èè®è¯è±è²è³è´èµè¶è·è¸è¹èºè»è½è¾èèè伿£æ¡å丧æéªæ«å«çè²æ¶©æ£®å§èç æå¹æ²çº±å»å¥ç çæçè«æå±±å ç ½è¡«éªéæ 赡è³åæ±æç¼®å¢ä¼¤åèµæä¸å°è£³æ¢¢æç¨ç§èåºé¶å°å¨éµç»å¥¢èµèèè赦æå°æ æ¶ç¤¾è®¾ç ·ç³å»ä¼¸èº«æ·±å¨ ç» ç¥æ²å®¡å©¶çè¾æ æ¸å£°çç¥ç²å绳�".split("");for(a=0;a!=t[201].length;++a)if(t[201][a].charCodeAt(0)!==65533){r[t[201][a]]=51456+a;e[51456+a]=t[201][a]}t[202]="����������������������������������������������������������������èèè èèèèèèèèèèèèèèèèèèèèè è¢è£è¤è¥è¦è§è¨è©èªèè®è¯è°è±è²è³è´èµè¶è¾è¿èèèèè èèèèèèèèèèèèè�èèèèèèèè è¡è¢è£è¥è¦è§è©èªè«è¬èè®è¯è°è±è³èµè¶è·è¸è¼è½è¿èèççå©èå£å¸å¤±ç®æ½æ¹¿è¯å°¸è±åç³æ¾æ¶ä»é£èå®è¯å²ç¢ä½¿å±é©¶å§å¼ç¤ºå£«ä¸æ¿äºæèªéå¿æ¯åå¬éä»ä¾é饰æ°å¸æå®¤è§è¯æ¶æé¦å®å¯¿æå®åç¦å ½è¬æ¢æ¢³æ®æè¾åèæ·ç书èµå°çè¯ææç½²èé»é¼ 屿¯è¿°æ ææç«å¢ åº¶æ°æ¼±ï¿½".split("");for(a=0;a!=t[202].length;++a)if(t[202][a].charCodeAt(0)!==65533){r[t[202][a]]=51712+a;e[51712+a]=t[202][a]}t[203]="����������������������������������������������������������������èèèèèèèèèèèèèèèèèèèèèèèèè è¡è¢è£è¥è¦è§è©è«è¬èè±è²è³è´èµè¶è¸èºè»è¼è½è¾è¿èèèèè èèèèèèèèèè�èèèèèèèèèèè è¡è¢è£è¥è¦è§è¨èªè«è¬èè®è¯è°è±è²è³è´èµè¶è·è¸æå·èæè¡°ç©å¸ æ æ´éåç½è°æ°´ç¡ç¨å®ç¬é¡ºèè¯´ç¡æçæ¯æå¶æç§å¸ä¸æ»è寺å£å伺似饲巳æ¾è¸æé¢éå®è®¼è¯µæèæå½èé ¥ä¿ç´ éç²å³å¡æº¯å®¿è¯èé ¸èç®è½éé绥é«ç¢å²ç©éé§ç¥åæç¬èæ¢å缩çç´¢éæå¡ä»å®å¥¹å¡ï¿½".split("");for(a=0;a!=t[203].length;++a)if(t[203][a].charCodeAt(0)!==65533){r[t[203][a]]=51968+a;e[51968+a]=t[203][a]}t[204]="����������������������������������������������������������������è¹èºè¼è½è¾èèèèèèèèèèèèèèèèèèèèèèèèèèèèèè è¡è¢è£è¤è¥è¦è¨èªè«è¬èè®è¯è°è±è²è³è´èµè¶è·è¹èºè»è½è¾è¿è�èèèèè èèèèèèèèèèèèèèèèèèè è¡è£è¤è¥è¦è§è¨è©èªçæè¹è¸èèæ¬å°æ³°é å¤ªææ±°åæè´ªç«æ»©åæªç°æ½è°è°å¦æ¯¯è¢ç¢³æ¢å¹çæ±¤å¡æªå æ£ èåç³å躺æ·è¶ç«ææ¶æ»ç»¦èæ¡éæ·é¶è®¨å¥ç¹è¤è ¾ç¼èªæ¢¯å踢éæé¢è¹å¼ä½æ¿åææ¶åå±å¤©æ·»å¡«ç°çæ¬èè ææ¡è¿¢çºè·³è´´éå¸å å¬ç�".split("");for(a=0;a!=t[204].length;++a)if(t[204][a].charCodeAt(0)!==65533){r[t[204][a]]=52224+a;e[52224+a]=t[204][a]}t[205]="����������������������������������������������������������������èè¯è°è²è³è´èµè¶è·è¸èèè èèèèèèèèèèèèèèèèèèè è¡è¢è¥è¦è«èè®è²è³è·è¸è¹è»è¼è½è¾è¿èèèè èèèèèèèèèè�èè è¡è¢è£è¥è¦è§è¨èªè«è¬è¯èµè¶è·èºè»è¼è½è¿èèè èèèèèèèèèæ±å»·åäºåºæºèéæ¡é ®ç³åé彤童桶æ çç»ç巿头éå¸ç§çªå¾å¾éæ¶å± ååå æ¹å¢æ¨é¢è ¿è褪éåå±¯èææè±é¸µé驮驼æ¤å¦¥æå¾æåèæ´¼å¨ç¦è¢æªå¤è±å¼¯æ¹¾ç©é¡½ä¸¸ç·å®ç¢æ½æçæå®å©ä¸è 汪ç亡æç½å¾æºæå¿å¦å¨ï¿½".split("");for(a=0;a!=t[205].length;++a)if(t[205][a].charCodeAt(0)!==65533){r[t[205][a]]=52480+a;e[52480+a]=t[205][a]}t[206]="����������������������������������������������������������������èèèèè è¤è¦è§è¨èªè«è¬èè¯è°è²è³èµè¶è¸è¹èºè¼è½èèèèèè èèèèèèèèèèèèèèèèèèè¡è¢è¦è§è¨è©èªè«è¬èè¯è±è²è³èµï¿½è·è¸è¹èºè¿èèèèèèèèèèèèèèèèèèèèèèèè è¡è¢è£è¤å·å¾®å±é¦è¿æ¡ å´å¯æä¸ºæ½ç»´èèå§ä¼ä¼ªå°¾çº¬æªèå³çèåé使¸è°å°æ °å«ç温èæé»çº¹å»ç¨³ç´é®å¡ç¿ç®æèæ¶¡çªææ¡å§æ¡æ²å·«åé¨ä¹æ±¡è¯¬å±æ èæ¢§å¾å´æ¯æ¦äºæåèä¼ä¾®åæé¾æ¤ç©å¿å¡æè¯¯æçæè¥¿ç¡ç½æ°å»å¸é¡çºï¿½".split("");for(a=0;a!=t[206].length;++a)if(t[206][a].charCodeAt(0)!==65533){r[t[206][a]]=52736+a;e[52736+a]=t[206][a]}t[207]="����������������������������������������������������������������è¥è¦è§è©èªè®è°è±è²è´è¶è·è¸è¹è»è¼è¾è¿èèèèè èèèèèèèèèèèèèèèèèèèè¡è¢è£è¤è¦è§è¨è©è«è¬èè¯è°è±è²è³è´èµè¶è·è¸ï¿½èºè»è¼è½è¿è è è è è è è è è è è è è è è è è è è è è è è è è è è è £ç¨æ¯å¸æè夿çç¯æºªæ±çæªè¢å¸ä¹ 媳å飿´ç³»éæç»çè¾å£éè¾æå³¡ä¾ çä¸å¦å¤åæé¨å ä»é²çº¤å¸è´¤è¡è·é²æ¶å¼¦å«æ¾é©ç°ç®å¿è ºé¦ 羡宪é·é线ç¸å¢é¶é¦ç®±è¥æ¹ä¹¡ç¿ç¥¥è¯¦æ³å享项巷橡åå象è§ç¡éåå®å£éæ¶å®µæ·æï¿½".split("");for(a=0;a!=t[207].length;++a)if(t[207][a].charCodeAt(0)!==65533){r[t[207][a]]=52992+a;e[52992+a]=t[207][a]}t[208]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è ¤è ¥è ¦è §è ¨è ©è ªè «è ¬è è ®è ¯è °è ±è ³è ´è µè ¶è ·è ¸è ºè »è ½è ¾è ¿è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡è¡ 衦衧衪è¡è¡¯è¡±è¡³è¡´è¡µè¡¶è¡¸è¡¹è¡ºï¿½è¡»è¡¼è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢è¢ 袡袣袥袦袧袨袩袪å°åæ ¡èå¸ç¬ææ¥äºæèéåææºéªæèè°å械å¸è¹ææ³æ³»è°¢å±èªè¯éæ¬£è¾æ°å¿»å¿ä¿¡è¡ æè ¥ç©æºå ´ååå½¢é¢è¡éå¹¸ææ§å§å å¶è¸åæ±¹éçä¼ä¿®ç¾æ½å éç§è¢ç»£å¢æéèåé¡»å¾è®¸èé åæåºçæ¤çµ®å©¿ç»ªç»è½©å§å®£æ¬æç�".split("");for(a=0;a!=t[208].length;++a)if(t[208][a].charCodeAt(0)!==65533){r[t[208][a]]=53248+a;e[53248+a]=t[208][a]}t[209]="����������������������������������������������������������������袬袮袯袰袲袳袴袵袶袸袹袺袻袽袾袿è£è£è£è£è£è£è£è£è£è£è£è£è£è£è£è£è£è£è£è£è£ 裡裦裧裩裪裫裬è£è£®è£¯è£²è£µè£¶è£·è£ºè£»è£½è£¿è¤è¤è¤è¤è¤ è¤è¤è¤ï¿½è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤ 褢褣褤褦褧褨褩褬è¤è¤®è¤¯è¤±è¤²è¤³è¤µè¤·éç£ç©ç»é´èå¦ç©´éªè¡åç循æ¬è¯¢å¯»é©¯å·¡æ®æ±è®è®¯éè¿ åæ¼é¸¦é¸å丫è½çèå´è¡æ¶¯é åäºè®¶çå½éçæ·¹ç严ç è岩延è¨é¢éçæ²¿å¥æ©ç¼è¡æ¼è³å °çåç éå彦ç°å®´è°éªæ®å¤®é¸¯ç§§æ¨æ¬ä½¯ç¡ç¾æ´é³æ°§ä»°çå »æ ·æ¼¾éè °å¦ç¶ï¿½".split("");for(a=0;a!=t[209].length;++a)if(t[209][a].charCodeAt(0)!==65533){r[t[209][a]]=53504+a;e[53504+a]=t[209][a]}t[210]="����������������������������������������������������������������褸褹褺褻褼褽褾褿è¥è¥è¥è¥ è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥è¥ 襡襢襣襤襥襧襨襩襪襫襬è¥è¥®è¥¯è¥°è¥±è¥²è¥³è¥´è¥µè¥¶è¥·è¥¸è¥¹è¥ºè¥¼ï¿½è¥½è¥¾è¦è¦è¦è¦ è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦è¦ 覡æå°§é¥çªè°£å§å¬èè¯è¦è椰åè¶ç·éå¶ä¹é¡µæä¸å¶æ³è 夿¶²ä¸å£¹å»æé±ä¾ä¼è¡£é¢å¤·é移仪è°çæ²å®å§¨å½æ¤ èåå·²ä¹ç£ä»¥èºææé屹亿役èé¸èç«äº¦è£ææ¯ å¿ä¹ç溢诣议è°è¯å¼ç¿¼ç¿ç»èµè«å æ®·é³é´å§»åé¶æ·«å¯ 饮尹å¼é�".split("");for(a=0;a!=t[210].length;++a)if(t[210][a].charCodeAt(0)!==65533){r[t[210][a]]=53760+a;e[53760+a]=t[210][a]}t[211]="����������������������������������������������������������������覢覣覤覥覦覧覨覩親覫覬è¦è¦®è¦¯è¦°è¦±è¦²è¦³è¦´è¦µè¦¶è¦·è¦¸è¦¹è¦ºè¦»è¦¼è¦½è¦¾è¦¿è§è§è§è§è§è§è§è§è§è§è§è§è§ 觡觢觤觧觨觩觪觬è§è§®è§°è§±è§²è§´è§µè§¶è§·è§¸è§¹è§ºï¿½è§»è§¼è§½è§¾è§¿è¨è¨è¨è¨è¨ è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨å°è±æ¨±å©´é¹°åºç¼¨è¹è¤è¥è§èè¿èµ¢çå½±é¢ç¡¬æ 忥佣èç庸éè¸è¹åæ³³æ¶æ°¸æ¿åç¨å¹½ä¼æ å¿§å°¤ç±é®éç¹æ²¹æ¸¸é æåå³ä½é诱åå¹¼è¿æ·¤äºçæ¦èæèä½ä¿é¾é±¼ææ¸æ¸é äºå¨±é¨ä¸å±¿ç¦¹å®è¯ç¾½çåèéåéå»å³ªå¾¡ææ¬²ç±è²èªï¿½".split("");for(a=0;a!=t[211].length;++a)if(t[211][a].charCodeAt(0)!==65533){r[t[211][a]]=54016+a;e[54016+a]=t[211][a]}t[212]="����������������������������������������������������������������è¨è¨è¨ 訡訢訣訤訥訦訧訨訩訪訫訬è¨è¨®è¨¯è¨°è¨±è¨²è¨³è¨´è¨µè¨¶è¨·è¨¸è¨¹è¨ºè¨»è¨¼è¨½è¨¿è©è©è©è©è©è© è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©è©ï¿½è©è© 詡詢詣詤詥試詧詨詩詪詫詬è©è©®è©¯è©°è©±è©²è©³è©´è©µè©¶è©·è©¸è©ºè©»è©¼è©½è©¾è©¿èªæµ´å¯è£é¢è±«é©é¸³æ¸å¤å å£è¢åæ´è¾åååç¿æºç¼è¿èæ¿æ¨é¢æ°çº¦è¶è·é¥å²³ç²¤ææ¦é èäºé§åé¨å è¿è´é æéµååç ¸ææ ½åç¾å®°è½½åå¨å±ææèµèµèè¬éç³å¿è»æ£æ©æ¾¡è¤èºåªé çç¶ç¥è´£æ©å泽贼æå¢ææ¾èµ æå³æ¸£æè½§ï¿½".split("");for(a=0;a!=t[212].length;++a)if(t[212][a].charCodeAt(0)!==65533){r[t[212][a]]=54272+a;e[54272+a]=t[212][a]}t[213]="����������������������������������������������������������������èªèªèªèªèª èªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèªèª 誡誢誣誤誥誦誧誨誩說誫説èªèª®èª¯èª°èª±èª²èª³èª´èªµèª¶èª·èª¸èª¹èªºèª»èª¼èª½èª¾èª¿è«è«è«ï¿½è«è«è« è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è«è« 諡諢諣é¡é¸ç¨æ 榨åä¹ç¸è¯ææå® çªåºå¯¨ç»æ¯¡è©¹ç²æ²¾çæ©è¾å´å±è¸æ å æç«æ¹ç»½æ¨ç« å½°æ¼³å¼ ææ¶¨æä¸å¸è´¦ä»èç´éæææ¾æ²¼èµµç §ç½©å èå¬é®æå²è°è¾è éèè¿æµçæççç §è»è´é侦æç¹è¯éæ¯ééµè¸æ£çå¾ç°äºææ´æ¯æ£æ¿ï¿½".split("");for(a=0;a!=t[213].length;++a)if(t[213][a].charCodeAt(0)!==65533){r[t[213][a]]=54528+a;e[54528+a]=t[213][a]}t[214]="����������������������������������������������������������������諤諥諦諧諨諩諪諫諬è«è«®è«¯è«°è«±è«²è«³è«´è«µè«¶è«·è«¸è«¹è«ºè«»è«¼è«½è«¾è«¿è¬è¬è¬è¬è¬è¬ è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬ 謡謢謣�謤謥謧謨謩謪謫謬è¬è¬®è¬¯è¬°è¬±è¬²è¬³è¬´è¬µè¬¶è¬·è¬¸è¬¹è¬ºè¬»è¬¼è¬½è¬¾è¬¿èèèèèè 帧çéè¯èææ¯å±èç¥è¢èæ±ä¹ç»èç´æ¤æ®æ§å¼ä¾åææ¢è¶¾åªæ¨çº¸å¿ææ·è³è´ç½®å¸å³å¶æºç§©ç¨è´¨ççæ»æ²»çªä¸ç å¿ éè¡·ç»ç§è¿é仲ä¼èå¨å·æ´²è¯ç²¥è½´èå¸åç±å®æ¼éª¤ç æ ªèæ±çªè¯¸è¯é竹çç ®æç©å±ä¸»èæ±å©èè´®é¸ç�".split("");for(a=0;a!=t[214].length;++a)if(t[214][a].charCodeAt(0)!==65533){r[t[214][a]]=54784+a;e[54784+a]=t[214][a]}t[215]="����������������������������������������������������������������èèèèèèèèèèèèèèèèèèèèèèèèèèè è¡è¢è£è¤è¥è§è¨è©èªè«èè®è¯è°è±è²è³è´èµè¶è·è¸è¹èºè»è¼è½è¾è¿è®è®è®è®è®è® è®ï¿½è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®è®¬è®±è®»è¯è¯è¯ªè°è°ä½æ³¨ç¥é©»æçªæ½ä¸ç 转æ°èµç¯æ¡©åºè£ å¦æå£®ç¶æ¤é¥è¿½èµå ç¼è°åææåæ¡ç¢èé åçç¼æµå ¹å¨èµå§¿æ»æ·åç´«ä»ç±½æ»åèªæ¸å鬿£è¸ªå®ç»¼æ»çºµé¹èµ°å¥æç§è¶³åæç¥è¯ é»ç»é»çºå´éæç½ªå°éµæ¨å·¦ä½æåä½å座������".split("");for(a=0;a!=t[215].length;++a)if(t[215][a].charCodeAt(0)!==65533){r[t[215][a]]=55040+a;e[55040+a]=t[215][a]}t[216]="����������������������������������������������������������������谸谹谺谻谼谽谾谿è±è±è±è±è± è±è±è±è±è±è±è±è±è±è±è±è±è±è±è±è±è±è±è±è±è± 豣豤豥豦豧豨豩豬è±è±®è±¯è±°è±±è±²è±´è±µè±¶è±·è±»è±¼è±½è±¾è±¿è²è²è²è²è²è²ï¿½è²è²è²è²è²è²è²è²è²è²è²è²è²è²è²è²è²è²è²è² 財貢貣貤貥貦貧貨販貪貫責è²äºä¸å ä¸å»¿å ä¸äºä¸é¬²å¬å©ä¸¨ç¦ºä¸¿åä¹å¤ç»å®æ°åè¤é¦æ¯ç¾é¼ä¸¶äºé¼ä¹ä¹©äºèåå¬åä»ååå£å¥å®é¥èµååµå¦å®å¾èµå¦å£ååååå³å¿åååå¡åè¯å½åååååç½äº»ä»ä»ä»ä»¨ä»¡ä»«ä»ä¼ä»³ä¼¢ä½¤ä»µä¼¥ä¼§ä¼ä¼«ä½ä½§æ¸ä½ä½ï¿½".split("");for(a=0;a!=t[216].length;++a)if(t[216][a].charCodeAt(0)!==65533){r[t[216][a]]=55296+a;e[55296+a]=t[216][a]}t[217]="����������������������������������������������������������������貮貯貰貱貲貳貴貵貶買貸貹貺費貼貽貾貿è³è³è³è³è³è³ è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³è³ 賡賢賣賤賥賦賧賨賩質賫賬�è³è³®è³¯è³°è³±è³²è³³è³´è³µè³¶è³·è³¸è³¹è³ºè³»è³¼è³½è³¾è³¿è´è´è´è´è´è´ è´è´è´è´è´è´è´è´ä½ä½ä¼²ä¼½ä½¶ä½´ä¾ä¾ä¾ä¾ä½¾ä½»ä¾ªä½¼ä¾¬ä¾ä¿¦ä¿¨ä¿ªä¿ ä¿ä¿£ä¿ä¿ä¿ä¿¸å©å俳å¬åå®å俾ååå¥å¨å¾ååååå¬å»å¥å§å©åºåååå¬å¦å®åå仿°½ä½ä½¥ä¿é¾ æ±ç±´å ®å·½é»é¦åå¤å¹åè¨åå«å¤å äº å 亳衮袤亵èè£ç¦å¬´è 羸å«å±å½å¼ï¿½".split("");for(a=0;a!=t[217].length;++a)if(t[217][a].charCodeAt(0)!==65533){r[t[217][a]]=55552+a;e[55552+a]=t[217][a]}t[218]="����������������������������������������������������������������è´è´è´è´è´è´è´è´è´è´è´è´è´è´è´è´ èµèµèµèµèµ¥èµ¨èµ©èµªèµ¬èµ®èµ¯èµ±èµ²èµ¸èµ¹èµºèµ»èµ¼èµ½èµ¾èµ¿è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶è¶ 趡�趢趤趥趦趧趨趩趪趫趬è¶è¶®è¶¯è¶°è¶²è¶¶è¶·è¶¹è¶»è¶½è·è·è·è· è·è·è·è·è·è·è·è·è·ååå¢å¥è® 讦讧讪讴讵讷è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯ 诤诨诩诮诰诳诶诹诼诿è°è°è°è°è°è°è°è°è°è°è°è°è°è°è°è°è° 谡谥谧谪谫谮谯谲谳谵谶å©åºéé¢é¡é±éªé½é¼ééééé§é¬é²é´éééé°ééééé¬é¡é´é³é¶éºï¿½".split("");for(a=0;a!=t[218].length;++a)if(t[218][a].charCodeAt(0)!==65533){r[t[218][a]]=55808+a;e[55808+a]=t[218][a]}t[219]="����������������������������������������������������������������è·è·è·è·è· 跡跢跥跦跧跩è·è·®è·°è·±è·²è·´è·¶è·¼è·¾è·¿è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸è¸ 踡踤踥踦踧踨踫è¸è¸°è¸²è¸³è¸´è¸¶è¸·è¸¸è¸»è¸¼è¸¾ï¿½è¸¿è¹è¹ è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹è¹ 蹡蹢蹣蹤蹥蹧蹨蹪蹫蹮蹱é¸é°éé é¾ééééé¦é¢éééé«é¯é¾éé¢éé£é±é¯é¹é é åå¥å¢å¬åå¾å¿ååå°åç®çå»´åµå¼é¬¯å¶å¼çå·¯åå©å¡å¡¾å¢¼å£ å£å©å¬åªå³å¹å®å¯åå»åå©å å«åå¼å»å¨åå¶å³åå¤åå²åå§å´åå åååååå¸å´å¯å¸å¤å�".split("");for(a=0;a!=t[219].length;++a)if(t[219][a].charCodeAt(0)!==65533){r[t[219][a]]=56064+a;e[56064+a]=t[219][a]}t[220]="����������������������������������������������������������������蹳蹵蹷蹸蹹蹺蹻蹽蹾èºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèºèº 躡躢躣躤躥躦躧躨躩躪èºèº®èº°èº±èº³èº´èºµèº¶èº·èº¸èº¹èº»èº¼èº½èº¾èº¿è»è»è»ï¿½è»è»è» è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è»è» 軡転軣軤å å å½åå å å å¡å 塥塬å¢å¢å¢å¢é¦¨é¼æ¿è¹è½è¿èèè¨èèèèèè«è¸è¾è°èèè£èè·è®èèèè©è´è¡èªèèèè¤è¡èè·è¤èèèè´èèèè»èèèèèèè èèèèèèèè¼è´è±èèè¯èèèèèèè èèºè³è¦è¥ï¿½".split("");for(a=0;a!=t[220].length;++a)if(t[220][a].charCodeAt(0)!==65533){r[t[220][a]]=56320+a;e[56320+a]=t[220][a]}t[221]="����������������������������������������������������������������軥軦軧軨軩軪軫軬è»è»®è»¯è»°è»±è»²è»³è»´è»µè»¶è»·è»¸è»¹è»ºè»»è»¼è»½è»¾è»¿è¼è¼è¼è¼è¼è¼ è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼è¼ 輡輢輣�輤輥輦輧輨輩輪輫輬è¼è¼®è¼¯è¼°è¼±è¼²è¼³è¼´è¼µè¼¶è¼·è¼¸è¼¹è¼ºè¼»è¼¼è¼½è¼¾è¼¿è½è½è½è½è½è¨èè©è¬èªèè®è°è¸è³è´è èªèèè è¼è¶è©è½è¸è»èèè¨èºè¼èèè¥èå èèèè½èèè¸èèèèèèè¸è¹èªè èè¦è°è¡èèèèè³èèèºèè¸è¼èè©è¶èèè±èèèèè¦è½èèè¿èºè è¡è¹è´èè¥è£èçè¸è°è¹èèºï¿½".split("");for(a=0;a!=t[221].length;++a)if(t[221][a].charCodeAt(0)!==65533){r[t[221][a]]=56576+a;e[56576+a]=t[221][a]}t[222]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è½ è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½è½ 轡轢轣轤轥轪è¾è¾è¾è¾è¾ 辡辢辤辥辦辧辪辬è¾è¾®è¾¯è¾²è¾³è¾´è¾µè¾·è¾¸è¾ºè¾»è¾¼è¾¿è¿è¿è¿ï¿½è¿è¿è¿è¿è¿è¿è¿è¿è¿è¿è¿ 迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿éééééééèè»è¿è¼èèè¨è¤èèºç¢èè²è»è¤è¨èèè¹è®èè è¹è·è°èèèè¿è§è è©èè¼å»¾å¼å¤¼å¥è·å¥å¥å¥åå°¢å°¥å°¬å°´ææªææ»ææææ®æ¢æ¶æ¹ææææ¶æ±æºææ´ææ¬ææ©æ®æ¼æ²æ¸æ æ¿ææææææ¾æ ææææ ææ¦æ¡ææææï¿½".split("");for(a=0;a!=t[222].length;++a)if(t[222][a].charCodeAt(0)!==65533){r[t[222][a]]=56832+a;e[56832+a]=t[222][a]}t[223]="����������������������������������������������������������������ééé£é¤é¥é§é¨é©éªé«é¬é°é±é²é³é´é·é¹éºé½é¿ééé ééééééééééééééééé é¡é¤é¦é§é©éªé«é¬é¯é°é±é²é³é¶é·é¸é¹éºé»é¼é¾é�éé éééééééééééééééééé é¤é¥é§é¨é©é«éé²é·é¼é½é¿éæºæ·æ¸ææºææææ¤æ¢ææ¥æ®å¼å¿çå¼åå±å½å©å¨å»åååååååååå¡ååå£å²ååå·å±å¤åååå¶å¦ååååå´åå§å¦ååå²å£åå»å¿ååååå©åªå¤ååååå§å å½åå³å¢å£ååå§åªå§ååµååååå¿åå¼ï¿½".split("");for(a=0;a!=t[223].length;++a)if(t[223][a].charCodeAt(0)!==65533){r[t[223][a]]=57088+a;e[57088+a]=t[223][a]}t[224]="����������������������������������������������������������������éééééééééééééééééé é£é¤é¥é©éªé¬é®é°é±é²é³éµé¶é·é¹éºé»é¼é¿éééé éééééééééééééééééééééé�ééé é¡é¤é¥é¦é§é¨é©éªé«é¬éé®é°é²é³é´éµé¶é·é¸éºé»é¼é½é¾é¿é é é é å·ååµå¶å·å³å°ååååå±å¹åååå¾ååå»åå½å¾åååªå·åååå«å¬åå¦ååå¯å¥å²å³ååå¨åµå¤è¾ååååå¤å£å¾åå§ååå¹åå¬åå¢åååååå¤å±å«å»å¼å åå¯åååå¡åµå«å¹å¿ååååå¸å¸å¸å¸å¸±å¸»å¸¼ï¿½".split("");for(a=0;a!=t[224].length;++a)if(t[224][a].charCodeAt(0)!==65533){r[t[224][a]]=57344+a;e[57344+a]=t[224][a]}t[225]="����������������������������������������������������������������é é é é é é é é é é é é é é é ¦é §é ¨é «é é ³é ºé »é ¼éééééééééééééééééééééé é¡é¤é¥é¦é§é¨é©é«é¬é°é±é²é³é¶é·é¸é¹é»ï¿½é¼é½é¾é¿éééééé éééééééééééééééééé é¡é¢é£é¤é¥å¸·å¹å¹å¹å¹å¹¡å²å±ºå²å²å²å²å²å²å²å²å²å²µå²¢å²½å²¬å²«å²±å²£å³å²·å³å³å³¤å³å³¥å´å´å´§å´¦å´®å´¤å´å´å´åµå´¾å´´å´½åµ¬åµåµ¯åµåµ«åµåµåµ©åµ´å¶å¶å¶è±³å¶·å· 彳彷å¾å¾å¾å¾å¾å¾å¾å¾¨å¾å¾µå¾¼è¡¢å½¡çç°ç´ç·ç¸çççççç¨ç¯ç©ç²ç´ç·çç³ççºï¿½".split("");for(a=0;a!=t[225].length;++a)if(t[225][a].charCodeAt(0)!==65533){r[t[225][a]]=57600+a;e[57600+a]=t[225][a]}t[226]="����������������������������������������������������������������é¦é§é¨é©éªé«é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé ééééééééééééééééééééééééééé é¡é¢é£é¤ï¿½é¥é¦é§é¨é©éªé«é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé ç»ççç¡ççççç¢ç¹ç¥ç¬ç¸ç±çççç ç¬ç¯ç¾è夥飧夤å¤é¥£é¥§é¥¨é¥©é¥ªé¥«é¥¬é¥´é¥·é¥½é¦é¦é¦é¦é¦é¦é¦é¦é¦é¦åºåºåºåºåº¥åº 庹庵庾庳èµå»å»å»å»¨å»ªèºå¿å¿å¿å¿æå¿®æå¿¡å¿¤å¿¾æ æå¿ªå¿å¿¸ææµæ¦ææææ©æ«ææ¿æ¡æ¸æ¹æ»æºæï¿½".split("");for(a=0;a!=t[226].length;++a)if(t[226][a].charCodeAt(0)!==65533){r[t[226][a]]=57856+a;e[57856+a]=t[226][a]}t[227]="����������������������������������������������������������������ééééééééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨é©éªé«é¬éé®é¯é°é±é²é³éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé �éééééééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§æªæ½æææææææææ¬æ»æ±æææææ´æ æ¦ææ£æ´æææ«æ æ µæ¬ææ§æ·ææµå¿é³é©é«é±é³éµé¶é¼é¾éééééééééééééééä¸¬ç¿ææ°µæ±æ±æ±æ²£æ² æ²æ²æ²æ±¨æ±©æ±´æ±¶æ²æ²©æ³æ³æ²æ³·æ³¸æ³±æ³æ²²æ³ æ³æ³ºæ³«æ³®æ²±æ³æ³¯æ³¾ï¿½".split("");for(a=0;a!=t[227].length;++a)if(t[227][a].charCodeAt(0)!==65533){r[t[227][a]]=58112+a;e[58112+a]=t[227][a]}t[228]="����������������������������������������������������������������é¨é©éªé«é¬éé¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé éééééééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨ï¿½é©éªé«é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé ééééæ´¹æ´§æ´æµæµæ´æ´æ´æ´æ´«æµæ´®æ´µæ´æµæµæµæ´³æ¶æµ¯æ¶æ¶ æµæ¶æ¶æµæµ æµ¼æµ£æ¸æ·æ· æ·æ¸æ¶¿æ· æ¸æ·¦æ·æ·æ¸æ¶«æ¸æ¶®æ¸«æ¹®æ¹æ¹«æº²æ¹æºæ¹æ¹æ¸²æ¸¥æ¹æ»æº±æºæ» æ¼æ»¢æº¥æº§æº½æº»æº·æ»æº´æ»æºæ»æºæ½¢æ½æ½æ¼¤æ¼æ»¹æ¼¯æ¼¶æ½æ½´æ¼ªæ¼æ¼©æ¾æ¾æ¾æ½¸æ½²æ½¼æ½ºæ¿ï¿½".split("");for(a=0;a!=t[228].length;++a)if(t[228][a].charCodeAt(0)!==65533){r[t[228][a]]=58368+a;e[58368+a]=t[228][a]}t[229]="����������������������������������������������������������������ééééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨é©éªé«é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¿éééééé éééé�ééééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨é©é«æ¿æ¾§æ¾¹æ¾¶æ¿æ¿¡æ¿®æ¿æ¿ 濯çç£çç¹çµççå®å®å®å®å®¥å®¸ç¯éªæ´å¯¤å¯®è¤°å¯°è¹è¬è¾¶è¿è¿è¿¥è¿®è¿¤è¿©è¿¦è¿³è¿¨é ééé¦éééé¡éµé¶éé¯ééééé¨éé¢éæ¹é´é½ééééå½å½å½å½å°»å«å±å±å±å±£å±¦ç¾¼å¼ªå¼©å¼è´å¼¼é¬»å±®å¦å¦å¦å¦©å¦ªå¦£ï¿½".split("");for(a=0;a!=t[229].length;++a)if(t[229][a].charCodeAt(0)!==65533){r[t[229][a]]=58624+a;e[58624+a]=t[229][a]}t[230]="����������������������������������������������������������������é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé éééééééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨é©éªé«ï¿½é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé éééééééå¦å§å¦«å¦å¦¤å§å¦²å¦¯å§å¦¾å¨ å¨å§å¨å§£å§å§¹å¨å¨å¨²å¨´å¨å¨£å¨å©å©§å©å©å¨¼å©¢å©µè¬åªªåªå©·å©ºåª¾å««åª²å«å«åª¸å« 嫣嫱å«å«¦å«å«å¬å¬å¬å¬²å¬·åå°å°åå¥å³ååå¢é©µé©·é©¸é©ºé©¿é©½éªéªéª éªéªéªéªéªéªéªéªéªéªéªéª 骢骣骥骧çºçº¡çº£çº¥çº¨çº©ï¿½".split("");for(a=0;a!=t[230].length;++a)if(t[230][a].charCodeAt(0)!==65533){r[t[230][a]]=58880+a;e[58880+a]=t[230][a]}t[231]="����������������������������������������������������������������éééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨é©éªé«é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé éééééééé�ééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨é©éªé«é¬éé®çºçº°çº¾ç»ç»ç»ç»ç»ç»ç»ç»ç»ç»ç» 绡绨绫绮绯绱绲ç¼ç»¶ç»ºç»»ç»¾ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼¡ç¼¢ç¼£ç¼¤ç¼¥ç¼¦ç¼§ç¼ªç¼«ç¼¬ç¼ç¼¯ç¼°ç¼±ç¼²ç¼³ç¼µå¹ºç¿å·ç¾éççç®ç¢ççççç·ç³çççç¥ç顼çç©ç§ççºç²ççªçç¦ç¥ç¨ç°ç®ç¬ï¿½".split("");for(a=0;a!=t[231].length;++a)if(t[231][a].charCodeAt(0)!==65533){r[t[231][a]]=59136+a;e[59136+a]=t[231][a]}t[232]="����������������������������������������������������������������é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¿éééééé ééééééééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨é©éªé¬éé®é¯ï¿½é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééééééééééé¦é»éé çççççççç·çç¾çççççççç¨ç©çç§ççºéªé«é¬æææææ©æ¥ææªæ³ææ§æµæ¨ææææ·æ¼æ°æ ææ æ©æ°æ ææµææ³ææ ææ¸æ¢æ ææ½æ ²æ ³æ¡ æ¡¡æ¡æ¡¢æ¡æ¡¤æ¢æ æ¡æ¡¦æ¡æ¡§æ¡æ ¾æ¡æ¡æ ©æ¢µæ¢æ¡´æ¡·æ¢æ¡«æ£æ¥®æ£¼æ¤æ¤ 棹�".split("");for(a=0;a!=t[232].length;++a)if(t[232][a].charCodeAt(0)!==65533){r[t[232][a]]=59392+a;e[59392+a]=t[232][a]}t[233]="����������������������������������������������������������������é§é³é½éééééé é®é´éµé·é¸é¹éºé»é¼é½é¾éééééé ééééééééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¨é©éªï¿½é«é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé ééééé鿤¤æ£°æ¤æ¤æ¥æ££æ¤æ¥±æ¤¹æ¥ æ¥æ¥æ¦æ¥«æ¦æ¦æ¥¸æ¤´æ§æ¦æ¦æ§æ¦æ¥¦æ¥£æ¥¹æ¦æ¦§æ¦»æ¦«æ¦æ§æ¦±æ§æ§æ§æ¦æ§ æ¦æ§¿æ¨¯æ§æ¨æ¨æ©¥æ§²æ©æ¨¾æª æ©æ©æ¨µæªæ©¹æ¨½æ¨¨æ©æ©¼æªæªæª©æªæª«ç·çæ®æ®æ®æ®æ®æ®æ®æ®æ®æ®¡æ®ªè½«è½è½±è½²è½³è½µè½¶è½¸è½·è½¹è½ºè½¼è½¾è¾è¾è¾è¾è¾ï¿½".split("");for(a=0;a!=t[233].length;++a)if(t[233][a].charCodeAt(0)!==65533){r[t[233][a]]=59648+a;e[59648+a]=t[233][a]}t[234]="����������������������������������������������������������������ééééééééééééééééééééé é¡é¢é£é¤é¥é¦é§é¬é¿éééééé é£é¤é¥é¦é§é¨é©é«é¬éé¯é°é·é¸é¹éºé¾éééééééééé�ééééééé é£é¥é¦é«éé®é¯é°é±é³é¸é¹éºé»é¼é½é¾é¿ééééééééè¾è¾è¾è¾è¾è»æææææ¢æ¡æ¥æ¤æ¬è§ç¯ç´ç¿çççæ´æ®æ¯æ°æææ²æææç æ·ææ´æ±æ¶æµèææææææ¡ææ·æææ§ææ¾æææ¦æ©è´²è´³è´¶è´»è´½èµèµ èµèµèµèµèµèµèµè§è§è§è§è§è§è§è§ç®ççç¦ç¯ç¾ç¿çççççææ²æ°ï¿½".split("");for(a=0;a!=t[234].length;++a)if(t[234][a].charCodeAt(0)!==65533){r[t[234][a]]=59904+a;e[59904+a]=t[234][a]}t[235]="����������������������������������������������������������������ééééééééééééé é¡é¢é£é¤é¥é¦é¨é©éªé«é¬éé®é¯é±é²é´éµé·é¸éºé»é¿éééééééééééééééééééé¡é¢é£é¤é¥é¦é§é«ï¿½é¬éé®é°é±é²é´éµé¸éºé»é¼é½é¿ééé éééééééééééééééé æ¿æèæ¯ªæ¯³æ¯½æ¯µæ¯¹æ° æ°æ°æ°æ°æ°æ°æ°æ°¡æ°©æ°¤æ°ªæ°²æµææ«çççç°è¢åèèèè¼æè½è±è«èè´è·è§è¨è©èªèèèèèèæèè«è±è´èèèè²è¼æèè±è¶èè¬èè²è è è è ´è è è ±è è ©è ¼è ½è è §å¡åªµèèèæ»è£èªèæ¦èè»ï¿½".split("");for(a=0;a!=t[235].length;++a)if(t[235][a].charCodeAt(0)!==65533){r[t[235][a]]=60160+a;e[60160+a]=t[235][a]}t[236]="����������������������������������������������������������������é¡é¢é£é¤é¥é¦é§é¨é©é«é¬é®é¯é±é³é´éµé¶é·éºé»é¼é½é¿éééééé ééééééééééééééééééééé£é¤é¦é§é¨éªé«é¬éé®é¯é°é±ï¿½é²éµé·é¸é¹éºé»é½é¾é¿éééééééééééééééééééééééèè¦æ¬¤æ¬·æ¬¹æææé£é£é£é£é£é£æ®³å½æ¯è§³æé½ææ¼æææææææççççç»çç·ç«ç±ç¨ççççç¯ç±ç ³ç ç ¨ç ç ²ç ç ¸ç ºçç³çµç¨ç ç çç§ç¹çç¨ç¬çç ¦ç¹æ¾æ½æææç¤»ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥¢ç¥ç¥ ç¥¯ç¥§ç¥ºç¦ ç¦ç¦ç¦§ç¦³å¿å¿ï¿½".split(""); 64874for(a=0;a!=t[236].length;++a)if(t[236][a].charCodeAt(0)!==65533){r[t[236][a]]=60416+a;e[60416+a]=t[236][a]}t[237]="����������������������������������������������������������������ééé¡é¢é¤é¥é¦é§é¨é©éªé¬é®é°é±é³éµé¶é·é¸é¹éºé»é¼é½é¾é¿éééééé ééééééééééééééééééééééééééé é¡é¢é£ï¿½é¤é¥é¨é®é¯é°é±é²é´é·é¸é¹éºé»é¼é½é¾é¿é é é é é é é é é é é é é é é æ¼æææ§æææ£æ«æææ æ©ææææèè¿æ²æ³¶æ·¼ç¶ç¸ç ç ç ç ç æ«ç ç ç ç ¹ç ºç »ç ç ¼ç ¥ç ¬ç £ç ©ç¡ç¡ç¡ç¡ç ¦ç¡ç¡ç¡ç¡ªç¢ç¢ç¢ç¢ç¢ç¢¡ç¢£ç¢²ç¢¹ç¢¥ç£ç£ç£ç£¬ç£²ç¤ 磴ç¤ç¤¤ç¤ç¤´é¾é»¹é»»é»¼ç±ççç¹çççç¢ççç¦çµç¸çççççç¨ï¿½".split("");for(a=0;a!=t[237].length;++a)if(t[237][a].charCodeAt(0)!==65533){r[t[237][a]]=60672+a;e[60672+a]=t[237][a]}t[238]="����������������������������������������������������������������é é é é é é é é é é é é é é é é é é é ¡é ¢é £é ¤é ¥é ¦é §é ¨é ©é ªé «é ¬é é ®é ¯é °é ±é ²é ³é ´é µé ¶é ·é ¸é ¹é ºé »é ¼é ½é ¾é ¿é¡é¡é¡é¡é¡é¡ é¡é¡é¡é¡é¡é¡é¡é¡ï¿½é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡é¡ 顡顢顣顤顥顦顧顨顩顪顫顬é¡é¡®ç¢ç¥ç¿çç½ççççç ç°çµç½çºçççççç²ç¹çç½ç½¡ç½è©ç½¨ç½´ç½±ç½¹ç¾ç½¾çç¥è ²é ééééééééééééééé£é¤é«éªéé¬é¯é°é²é´é¶é·é¸é¹éºé¼é½é¿éééééééééééééééééééé é¢é¤é¥é§é¨éªï¿½".split("");for(a=0;a!=t[238].length;++a)if(t[238][a].charCodeAt(0)!==65533){r[t[238][a]]=60928+a;e[60928+a]=t[238][a]}t[239]="����������������������������������������������������������������顯顰顱顲顳顴é¢é¢é¢é¢é¢é¢£é¢¨é¢©é¢ªé¢«é¢¬é¢é¢®é¢¯é¢°é¢±é¢²é¢³é¢´é¢µé¢¶é¢·é¢¸é¢¹é¢ºé¢»é¢¼é¢½é¢¾é¢¿é£é£é£é£é£é£ é£é£é£é£é£é£é£é£é£é£é£é£é£é£é£é£é£ 飡飢飣飤�飥飦飩飪飫飬é£é£®é£¯é£°é£±é£²é£³é£´é£µé£¶é£·é£¸é£¹é£ºé£»é£¼é£½é£¾é£¿é¤é¤é¤é¤é¤é¤ é¤é¤é©é«é®é¯é³é´éµé·é¹é¼é½é¿éééééééééééééééééééé¢éªé«é©é¬é±é²é´é¶é·é¸é¼é¾é¿ééµéé ééééééééééééééééé¡é¢é¤é¥é¦é§é¨é©éªé«é¬é¯é±é²é³éºç§ç¬éç§ç§ç§£ç§«ç¨åµç¨ç¨ç¨ç¨ï¿½".split("");for(a=0;a!=t[239].length;++a)if(t[239][a].charCodeAt(0)!==65533){r[t[239][a]]=61184+a;e[61184+a]=t[239][a]}t[240]="����������������������������������������������������������������é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤é¤ 餡餢餣餤餥餦餧館餩餪餫餬é¤é¤¯é¤°é¤±é¤²é¤³é¤´é¤µé¤¶é¤·é¤¸é¤¹é¤ºé¤»é¤¼é¤½é¤¾é¤¿é¥é¥é¥é¥é¥é¥ é¥é¥é¥é¥ï¿½é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥é¥ 饡饢饤饦饳饸饹饻饾é¦é¦é¦ç¨¹ç¨·ç©é»é¦¥ç©°ççççç¤çç ç¬é¸ 鸢鸨鸩鸪鸫鸬鸲鸱鸶鸸鸷鸹鸺鸾é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹£é¹¦é¹§é¹¨é¹©é¹ªé¹«é¹¬é¹±é¹é¹³çççç çç¬ç£ç³ç´ç¸çç±ç°ççççç£ç¨ç¦ç¤ç«ç§çç±ç¼ç¿ççç çççç¥ççç�".split("");for(a=0;a!=t[240].length;++a)if(t[240][a].charCodeAt(0)!==65533){r[t[240][a]]=61440+a;e[61440+a]=t[240][a]}t[241]="����������������������������������������������������������������é¦é¦é¦é¦é¦é¦é¦é¦é¦ 馡馢馣馤馦馧馩馪馫馬é¦é¦®é¦¯é¦°é¦±é¦²é¦³é¦´é¦µé¦¶é¦·é¦¸é¦¹é¦ºé¦»é¦¼é¦½é¦¾é¦¿é§é§é§é§é§é§ é§é§é§é§é§é§é§é§é§é§é§é§é§é§é§é§é§é§é§ï¿½é§é§é§é§é§é§é§é§ 駡駢駣駤駥駦駧駨駩駪駫駬é§é§®é§¯é§°é§±é§²é§³é§´é§µé§¶é§·é§¸é§¹çç¼ç¢ç ççç°ç¿çµçç¾ç³çççççç«ç¯ç¿ç«¦ç©¸ç©¹çªçªçªçªçª¦çª 窬窨çªçª³è¡¤è¡©è¡²è¡½è¡¿è¢è¢¢è£è¢·è¢¼è£è£¢è£è££è£¥è£±è¤è£¼è£¨è£¾è£°è¤¡è¤è¤è¤è¤è¤´è¤«è¤¶è¥è¥¦è¥»çè¥ç²ç´çèèèèè è¢è¥è¦è§è©è¨è±èèµèèèèè©è±è¦é¡¸é¢é¢ï¿½".split("");for(a=0;a!=t[241].length;++a)if(t[241][a].charCodeAt(0)!==65533){r[t[241][a]]=61696+a;e[61696+a]=t[241][a]}t[242]="����������������������������������������������������������������駺駻駼駽駾駿é¨é¨é¨é¨é¨é¨ é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨é¨ 騡騢騣騤騥騦騧騨騩騪騫騬é¨é¨®é¨¯é¨°é¨±é¨²é¨³é¨´é¨µé¨¶é¨·é¨¸ï¿½é¨¹é¨ºé¨»é¨¼é¨½é¨¾é¨¿é©é©é©é©é©é© é©é©é©é©é©é©é©é©é©é©é©é©é©é©é©é©é©é©é©é©é¢é¢é¢é¢é¢é¢é¢é¢é¢é¢¡é¢¢é¢¥é¢¦èèè¬è®è¿èºè¼è»è¨èèè¬èè§è£èªèè©è¶èèµèè°èºè±è¯èèè´è©è±è²èè³èèèè´èèèèèè¸èèèèè£è»èè¥è®èè¾èè´è±è©è·è¿èè¢è½è¾è»è è°èè®èèè£è¼è¤èè¥èè¯è¨è�".split("");for(a=0;a!=t[242].length;++a)if(t[242][a].charCodeAt(0)!==65533){r[t[242][a]]=61952+a;e[61952+a]=t[242][a]}t[243]="����������������������������������������������������������������é©é©é©é©é©é©é© 驡驢驣驤驥驦驧驨驩驪驫驲éªéªéªéªéªéªéªéª¦éª©éªªéª«éª¬éªéª®éª¯éª²éª³éª´éªµéª¹éª»éª½éª¾éª¿é«é«é«é«é«é«é«é«é«é«é«é«é«é«é«é«é«é«é«é«ï¿½é«é«é« 髢髣髤髥髧髨髩髪髬髮髰髱髲髳髴髵髶髷髸髺髼髽髾髿é¬é¬é¬é¬é¬ é¬èèè èèèè«è¥è¬èµè³èèè½èèèèèªè è®è è è¾è è è ¡è ¹è ¼ç¼¶ç½ç½ç½ è竺竽ç¬ç¬ç¬ç¬ç¬ç¬«ç¬ç笸笪ç¬ç¬®ç¬±ç¬ 笥笤笳笾ç¬ççç çµççç ç®ç»ç¢ç²ç±ç®ç®¦ç®§ç®¸ç®¬ç®ç®¨ç® 箪ç®ç®¢ç®«ç®´ç¯ç¯ç¯ç¯ç¯ç¯¥ç¯¦ç¯ªç°ç¯¾ç¯¼ç°ç°ç°ï¿½".split("");for(a=0;a!=t[243].length;++a)if(t[243][a].charCodeAt(0)!==65533){r[t[243][a]]=62208+a;e[62208+a]=t[243][a]}t[244]="����������������������������������������������������������������é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬é¬ 鬡鬢鬤鬥鬦鬧鬨鬩鬪鬫鬬é¬é¬®é¬°é¬±é¬³é¬´é¬µé¬¶é¬·é¬¸é¬¹é¬ºé¬½é¬¾é¬¿ééééééééééééééé�éééééé é¡é¢é£é¤é¥é¦é§é¨é©éªé«é¬éé®é¯é°é±é²é³é´éµé¶é·é¸é¹éºé»ç°ç°ªç°¦ç°¸ç±ç±è¾èèèè¬è¡è¡è¢è£èè¯è¨è«è¸è»è³è´è¾èèèèèèè¨è¡¾è¢ è¢è£è£è¥ç¾ç¾ç¾§ç¾¯ç¾°ç¾²ç±¼æç²ç²ç²ç²ç²¢ç²²ç²¼ç²½ç³ç³ç³ç³ç³ç³ ç³ç³¨è®æ¨ç¾¿ç¿ç¿ç¿¥ç¿¡ç¿¦ç¿©ç¿®ç¿³ç³¸çµ·ç¶¦ç¶®ç¹çºéº¸éº´èµ³è¶è¶è¶è¶±èµ§èµè±è±é é é é é ¤ï¿½".split("");for(a=0;a!=t[244].length;++a)if(t[244][a].charCodeAt(0)!==65533){r[t[244][a]]=62464+a;e[62464+a]=t[244][a]}t[245]="����������������������������������������������������������������é¼é½é¾é¿é®é®é®é®é®é® é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é®é® 鮡鮢鮣鮤鮥鮦鮧鮨鮩鮪鮫鮬é®é®®é®¯é®°é®±é®²é®³é®´é®µé®¶é®·é®¸é®¹é®ºï¿½é®»é®¼é®½é®¾é®¿é¯é¯é¯é¯é¯é¯ é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é¯é ¢é ¡é °é ©é ¯é ½é ¾é ²é ´é ¹éé éééé¢é£éªéé®é¯éµé´éºè±é¹¾è¶¸è·«è¸ è¹è¹©è¶µè¶¿è¶¼è¶ºè·è·è·è·è·è·è·è·è·è·¬è··è·¸è·£è·¹è·»è·¤è¸è·½è¸è¸è¸è¸¬è¸®è¸£è¸¯è¸ºè¹è¸¹è¸µè¸½è¸±è¹è¹è¹è¹è¹è¹è¹°è¹¶è¹¼è¹¯è¹´èº èºèºèºèºèºè±¸è²è²è² è²è²æè§è§è§è§ï¿½".split("");for(a=0;a!=t[245].length;++a)if(t[245][a].charCodeAt(0)!==65533){r[t[245][a]]=62720+a;e[62720+a]=t[245][a]}t[246]="����������������������������������������������������������������é¯é¯é¯é¯é¯ 鯡鯢鯣鯤鯥鯦鯧鯨鯩鯪鯫鯬é¯é¯®é¯¯é¯°é¯±é¯²é¯³é¯´é¯µé¯¶é¯·é¯¸é¯¹é¯ºé¯»é¯¼é¯½é¯¾é¯¿é°é°é°é°é°é° é°é°é°é°é°é°é°é°é°é°é°é°é°é°é°é°é°é°é°é°é°ï¿½é°é°é°é°é°é° 鰡鰢鰣鰤鰥鰦鰧鰨鰩鰪鰫鰬é°é°®é°¯é°°é°±é°²é°³é°´é°µé°¶é°·é°¸é°¹é°ºé°»è§¥è§«è§¯è¨¾è¬¦éé©é³é¯ééééééªéé°é¾é¾é¾é¾ é¾é¾é¾é¾é¾é¾é»¾é¼é¼é¹é¼é½ééç¿é éé®éé¾éªééé¾é«é±¿é²é² é²é²é²ç¨£é²é²é²é²é²é²é²é²é²é²é²é² 鲡鲢鲣鲥鲦鲧鲨鲩鲫é²é²®é²°é²±é²²é²³é²´é²µé²¶é²·é²ºé²»é²¼é²½é³é³ é³é³é³é³ï¿½".split("");for(a=0;a!=t[246].length;++a)if(t[246][a].charCodeAt(0)!==65533){r[t[246][a]]=62976+a;e[62976+a]=t[246][a]}t[247]="����������������������������������������������������������������鰼鰽鰾鰿é±é±é±é±é±é± é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é±é± 鱡鱢鱣鱤鱥鱦鱧鱨鱩鱪鱫鱬é±é±®é±¯é±°é±±é±²é±³é±´é±µé±¶é±·é±¸é±¹é±ºï¿½é±»é±½é±¾é²é²é²é²é²é²é²é²é²é²é²é²é²é²ªé²¬é²¯é²¹é²¾é²¿é³é³é³é³é³é³é³é³é³é³ 鳡é³é³é³é³é³é³é³é³é³é³é³é³é³é³é³¢é¼é éééé¯é«é£é²é´éª±éª°éª·é¹éª¶éªºéª¼é«é«é« é«é«é«é«é éééééé飨é¤é¤®é¥é¥é«é«¡é«¦é«¯é««é«»é«é«¹é¬é¬é¬é¬é¬£éº½éº¾ç¸»éºéºéºéºéºééºéºé»é»é»é» é»é»¢é»©é»§é»¥é»ªé»¯é¼¢é¼¬é¼¯é¼¹é¼·é¼½é¼¾é½ï¿½".split("");for(a=0;a!=t[247].length;++a)if(t[247][a].charCodeAt(0)!==65533){r[t[247][a]]=63232+a;e[63232+a]=t[247][a]}t[248]="����������������������������������������������������������������鳣鳤鳥鳦鳧鳨鳩鳪鳫鳬é³é³®é³¯é³°é³±é³²é³³é³´é³µé³¶é³·é³¸é³¹é³ºé³»é³¼é³½é³¾é³¿é´é´é´é´é´é´ é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´é´ 鴡�鴢鴣鴤鴥鴦鴧鴨鴩鴪鴫鴬é´é´®é´¯é´°é´±é´²é´³é´´é´µé´¶é´·é´¸é´¹é´ºé´»é´¼é´½é´¾é´¿éµéµéµï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[248].length;++a)if(t[248][a].charCodeAt(0)!==65533){r[t[248][a]]=63488+a;e[63488+a]=t[248][a]}t[249]="����������������������������������������������������������������éµéµéµ éµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéµ 鵡鵢鵣鵤鵥鵦鵧鵨鵩鵪鵫鵬éµéµ®éµ¯éµ°éµ±éµ²éµ³éµ´éµµéµ¶éµ·éµ¸éµ¹éµºéµ»éµ¼éµ½éµ¾éµ¿é¶é¶ï¿½é¶é¶é¶é¶ é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶é¶ 鶡鶢�����������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[249].length;++a)if(t[249][a].charCodeAt(0)!==65533){r[t[249][a]]=63744+a;e[63744+a]=t[249][a]}t[250]="����������������������������������������������������������������鶣鶤鶥鶦鶧鶨鶩鶪鶫鶬é¶é¶®é¶¯é¶°é¶±é¶²é¶³é¶´é¶µé¶¶é¶·é¶¸é¶¹é¶ºé¶»é¶¼é¶½é¶¾é¶¿é·é·é·é·é·é· é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é·é· 鷡�鷢鷣鷤鷥鷦鷧鷨鷩鷪鷫鷬é·é·®é·¯é·°é·±é·²é·³é·´é·µé·¶é··é·¸é·¹é·ºé·»é·¼é·½é·¾é·¿é¸é¸é¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[250].length;++a)if(t[250][a].charCodeAt(0)!==65533){r[t[250][a]]=64e3+a;e[64e3+a]=t[250][a]}t[251]="����������������������������������������������������������������é¸é¸é¸ é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸é¸¤é¸§é¸®é¸°é¸´é¸»é¸¼é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹ 鹡鹢鹥鹮鹯鹲鹴鹵鹶鹷鹸鹹鹺鹻鹼鹽éºï¿½éºéºéºéº éºéºéºéºéºéºéºéºéºéºéºéºéºéºéºéºéºéºéºéº 麡麢麣麤麥麧麨麩麪�����������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[251].length;++a)if(t[251][a].charCodeAt(0)!==65533){r[t[251][a]]=64256+a;e[64256+a]=t[251][a]}t[252]="����������������������������������������������������������������麫麬éºéº®éº¯éº°éº±éº²éº³éºµéº¶éº·éº¹éººéº¼éº¿é»é»é»é»é» é»é»é»é»é»é»é»é»é»é»é»é»é»é»é»é»¡é»£é»¤é»¦é»¨é»«é»¬é»é»®é»°é»±é»²é»³é»´é»µé»¶é»·é»¸é»ºé»½é»¿é¼é¼é¼é¼é¼é¼ �é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼é¼¡é¼£é¼¤é¼¥é¼¦é¼§é¼¨é¼©é¼ªé¼«é¼é¼®é¼°é¼±ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[252].length;++a)if(t[252][a].charCodeAt(0)!==65533){r[t[252][a]]=64512+a;e[64512+a]=t[252][a]}t[253]="����������������������������������������������������������������鼲鼳鼴鼵鼶鼸鼺鼼鼿é½é½é½é½é½ é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½é½ 齡齢齣齤齥齦齧齨齩齪齫齬é½é½®é½¯é½°é½±é½²é½³é½´é½µé½¶é½·é½¸ï¿½é½¹é½ºé½»é½¼é½½é½¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾é¾¡é¾¢é¾£é¾¤é¾¥ï¤¬ï¥¹ï¦ï§§ï§±ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[253].length;++a)if(t[253][a].charCodeAt(0)!==65533){r[t[253][a]]=64768+a;e[64768+a]=t[253][a]}t[254]="����������������������������������������������������������������ï¨ï¨ï¨ï¨ï¨ï¨ï¨ï¨ï¨ï¨ 﨡﨣﨤﨧﨨﨩��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[254].length;++a)if(t[254][a].charCodeAt(0)!==65533){r[t[254][a]]=65024+a;e[65024+a]=t[254][a]}return{enc:r,dec:e}}();cptable[949]=function(){var e=[],r={},t=[],a;t[0]="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~���������������������������������������������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[0].length;++a)if(t[0][a].charCodeAt(0)!==65533){r[t[0][a]]=0+a;e[0+a]=t[0][a]}t[129]="�����������������������������������������������������������������ê°ê°ê° ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°¡ê°¢ê°£ê°¥ê°¦ê°§ê°¨ê°©ê°ªê°«ê°®ê°²ê°³ê°´ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ê°µê°¶ê°·ê°ºê°»ê°½ê°¾ê°¿ê±ê±ê±ê±ê± ê±ê±ê±ê±ê±ê±ê±ê±ê±ê±ê±ê±ê±ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ê±ê±ê±ê±ê±ê±ê±ê±ê± 걡걢걣걤걥걦걧걨걩걪걫걬ê±ê±®ê±¯ê±²ê±³ê±µê±¶ê±¹ê±»ê±¼ê±½ê±¾ê±¿ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²¢ê²£ê²¤ê²¥ê²¦ê²§ê²«ê²ê²®ê²±ê²²ê²³ê²´ê²µê²¶ê²·ê²ºê²¾ê²¿ê³ê³ê³ê³ ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³ê³¢ê³£ê³¥ê³¦ê³©ê³«ê³ê³®ê³²ê³´ê³·ê³¸ê³¹ê³ºê³»ê³¾ê³¿ê´ê´ê´ê´ ê´ê´ê´ê´ê´ê´ê´ê´ê´ï¿½".split("");for(a=0;a!=t[129].length;++a)if(t[129][a].charCodeAt(0)!==65533){r[t[129][a]]=33024+a;e[33024+a]=t[129][a]}t[130]="�����������������������������������������������������������������ê´ê´ê´ê´ê´ê´ê´ê´ê´ê´ê´¡ê´¢ê´£ê´¤ê´¥ê´¦ê´§ê´¨ê´ªê´«ê´®ê´¯ê´°ê´±ê´²ê´³ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ê´¶ê´·ê´¹ê´ºê´»ê´½ê´¾ê´¿êµêµêµêµêµêµêµêµêµêµêµêµêµêµêµêµêµêµï¿½ï¿½ï¿½ï¿½ï¿½ï¿½êµêµêµêµêµêµêµêµ 굢굤굥굦굧굨굩굪굫굮굯굱굲굷굸굹굺굾ê¶ê¶ê¶ê¶ ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ 궡궢궣궥궦궧궨궩궪궫궬ê¶ê¶®ê¶¯ê¶°ê¶±ê¶²ê¶³ê¶´ê¶µê¶¶ê¶¸ê¶¹ê¶ºê¶»ê¶¼ê¶½ê¶¾ê¶¿ê·ê·ê· ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·ê·¡ê·¢ê·£ê·¥ê·¦ê·§ê·¨ê·©ê·ªê·«ê·¬ê·ê·®ê·¯ê·°ê·±ê·²ê·³ê·´ê·µê·¶ê··ï¿½".split("");for(a=0;a!=t[130].length;++a)if(t[130][a].charCodeAt(0)!==65533){r[t[130][a]]=33280+a;e[33280+a]=t[130][a]}t[131]="�����������������������������������������������������������������귺귻귽귾ê¸ê¸ê¸ê¸ ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ê¸ê¸ê¸ê¸ 긡긢긣긤긥긦긧긨긩긪긫긬ê¸ê¸®ê¸¯ê¸²ê¸³ê¸µê¸¶ê¸¹ê¸»ê¸¼ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ê¸½ê¸¾ê¸¿ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹¢ê¹£ê¹¤ê¹¦ê¹§ê¹ªê¹«ê¹ê¹®ê¹¯ê¹±ê¹²ê¹³ê¹´ê¹µê¹¶ê¹·ê¹ºê¹¾ê¹¿êºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêºêº 꺡꺢꺣꺤꺥꺦꺧꺨꺩꺪꺫꺬êºêº®êº¯êº°êº±êº²êº³êº´êºµêº¶êº·êº¸êº¹êººêº»êº¿ê»ê»ê»ê» ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê» 껡껢껣껤껥�".split("");for(a=0;a!=t[131].length;++a)if(t[131][a].charCodeAt(0)!==65533){r[t[131][a]]=33536+a;e[33536+a]=t[131][a]}t[132]="�����������������������������������������������������������������껦껧껩껪껬껮껯껰껱껲껳껵껶껷껹껺껻껽껾껿ê¼ê¼ê¼ê¼ê¼ê¼ ������ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ê¼ 꼡꼢꼣������꼤꼥꼦꼧꼨꼩꼪꼫꼮꼯꼱꼳꼵꼶꼷꼸꼹꼺꼻꼾ê½ê½ê½ ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ê½ 꽡꽢꽣꽦꽧꽨꽩꽪꽫꽬ê½ê½®ê½¯ê½°ê½±ê½²ê½³ê½´ê½µê½¶ê½·ê½¸ê½ºê½»ê½¼ê½½ê½¾ê½¿ê¾ê¾ê¾ê¾ ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾ 꾡꾢꾣꾤꾥꾦꾧꾨꾩꾪꾫꾬ê¾ê¾®ê¾¯ê¾°ê¾±ê¾²ê¾³ê¾´ê¾µê¾¶ê¾·ê¾ºê¾»ê¾½ê¾¾ï¿½".split("");for(a=0;a!=t[132].length;++a)if(t[132][a].charCodeAt(0)!==65533){r[t[132][a]]=33792+a;e[33792+a]=t[132][a]}t[133]="�����������������������������������������������������������������꾿ê¿ê¿ê¿ê¿ê¿ ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ 꿡������꿢꿣꿤꿥꿦꿧꿪꿫꿬ê¿ê¿®ê¿¯ê¿²ê¿³ê¿µê¿¶ê¿·ê¿¹ê¿ºê¿»ê¿¼ê¿½ê¿¾ê¿¿ëë������ë ëëëëëëëëëëëëëëëëëëëëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ë©ëªë«ë¬ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëëëëëëëëëëëëëëëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ë¨ë©ëªë«ë¬ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¾ë¿ëëëë ëëëëëëëëëëëëëëëëëë£ë¤ï¿½".split("");for(a=0;a!=t[133].length;++a)if(t[133][a].charCodeAt(0)!==65533){r[t[133][a]]=34048+a;e[34048+a]=t[133][a]}t[134]="�����������������������������������������������������������������ë¥ë¦ë§ëªë°ë²ë¶ë·ë¹ëºë»ë½ë¾ë¿ëëëëëëëëëëëë������ëëëëëëëëëëëë¡ë¢ë£ë¤ë¦ë§ë¨ë©ëªë«ë¬ëë®ë¯ë°ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëë ë¡ë¢ë¦ë§ë©ëªë«ëë®ë¯ë°ë±ë²ë³ë¶ëºë»ë¼ë½ë¾ë¿ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ¡ë ¢ë £ë ¤ë ¥ë ¦ë §ë ¨ë ©ë ªë «ë ¬ë ë ®ë ¯ë °ë ±ë ²ë ³ë ´ë µë ¶ë ·ë ºë »ë ½ë ¾ë ¿ëëëë ëëëëëëëëëëëëëëë�".split("");for(a=0;a!=t[134].length;++a)if(t[134][a].charCodeAt(0)!==65533){r[t[134][a]]=34304+a;e[34304+a]=t[134][a]}t[135]="�����������������������������������������������������������������ëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ë©ëªë«ë¬ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëë������ëëëëëëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ëªë«ëë®ë¯ë±ë²ë³ë´ëµë¶ë·ë¸ëºë¼ë¾ë¿ëëëëëëëëëëëëëëëëëëëëëëëë¡ë¢ë£ë¤ë¥ë¦ë§ë¨ë©ëªë«ë¬ëë®ë¯ë°ë±ë²ë³ëµë¶ë·ë¸ë¹ëºë»ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëëëëëëëëëëëë¡ë¢ë£ë¤ë¥ë¦ë§ëªë«ë¬ëë®ï¿½".split("");for(a=0;a!=t[135].length;++a)if(t[135][a].charCodeAt(0)!==65533){r[t[135][a]]=34560+a;e[34560+a]=t[135][a]}t[136]="�����������������������������������������������������������������ë¯ë°ë±ë²ë³ë¶ë·ë¸ë¹ëºë»ë½ë¾ë¿ëëëëëëëëëëëë������ëëëëëëëëëëëë¢ë¤ë§ë¨ë©ë«ëë®ë¯ë±ë²ë³ëµë¶ë·ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëëëëë ë¡ë£ë§ë©ëªë°ë±ë²ë¶ë¼ë½ë¾ëëë ëëëëëëëëëëëëëëëëëëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ë¨ë©ëªë«ë¬ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëëëëëë ë¡ë¢ë£ï¿½".split("");for(a=0;a!=t[136].length;++a)if(t[136][a].charCodeAt(0)!==65533){r[t[136][a]]=34816+a;e[34816+a]=t[136][a]}t[137]="�����������������������������������������������������������������ë¦ë¨ëªë¬ëë¯ë²ë³ëµë¶ë·ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëëëë������ëëëëëëëëëëëëëëëëë¢ë£ë¤ë¥ë¦ë§ë©ëªë«ë������ë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëëëëëëëëëëëëëëëë¡ë¢ë£ë¥ë¦ë§ë©ëªë«ë¬ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëëëëëëëëëëë¡ë¢ë£ë¤ë¥ë¦ë§ëªë¬ëë®ë¯ë°ë±ë²ë³ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëëëë�".split("");for(a=0;a!=t[137].length;++a)if(t[137][a].charCodeAt(0)!==65533){r[t[137][a]]=35072+a;e[35072+a]=t[137][a]}t[138]="�����������������������������������������������������������������ë ëëëëëëëëëëëëëëëëëëëëëëë¢ë¤ë¦ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë§ë¨ë©ëªë«ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëë������ëëë ëëëëëëëëëëëëëëëëëëëëëëëëë ë¡ë¢ë£ë¥ë¦ë§ë©ëªë«ëë®ë¯ë°ë±ë²ë³ë´ë¶ë¸ëºë»ë¼ë½ë¾ë¿ëëëë ëëëëëëëëëëëëëëëëëëëëëë¡ë¢ë¥ë§ë¨ë©ëªë«ë®ë°ë²ë³ë´ëµë¶ë·ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëëëëëë�".split("");for(a=0;a!=t[138].length;++a)if(t[138][a].charCodeAt(0)!==65533){r[t[138][a]]=35328+a;e[35328+a]=t[138][a]}t[139]="�����������������������������������������������������������������ëëë ë¡ë¢ë£ë¦ë«ë¬ëë®ë¯ë²ë³ëµë¶ë·ë¹ëºë»ë¼ë½ë¾ë¿ëë������ëëëëëëëëëëëëëëëëëë¢ë£ë¤ë¥ë¦ë§ë¨ë©ëªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë«ë¬ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëëëëëëëëëëëëëë¢ë£ë¥ë¦ë§ë©ë¬ëë®ë¯ë²ë¶ë·ë¸ë¹ëºë¾ë¿ëëëë ëëëëëëëëëëëëëëëëëëëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ë¨ë©ëªë«ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ï¿½".split("");for(a=0;a!=t[139].length;++a)if(t[139][a].charCodeAt(0)!==65533){r[t[139][a]]=35584+a;e[35584+a]=t[139][a]}t[140]="�����������������������������������������������������������������ëëëëëë ëëëëëëëëëëëëëëëëëëëë������ëëë ë¡ë¢ë£ë¤ë¦ë§ë¨ë©ëªë«ëë®ë¯ë°ë±ë²ë³ëµë¶ë·ë¸ë¹ëºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë»ë¼ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëëëëëëëëëëëëë ë¡ë¢ë£ë¥ë¦ë§ë©ëªë«ë¬ëë®ë¯ë°ë±ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëëëëë ëëëëëëëëëëëëëëëëëëëëëëëëë¡ë¢ë£ë¥ë¦ë§ë¨ë©ëªëë®ë¯ë°ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ëëë�".split("");for(a=0;a!=t[140].length;++a)if(t[140][a].charCodeAt(0)!==65533){r[t[140][a]]=35840+a;e[35840+a]=t[140][a]}t[141]="�����������������������������������������������������������������ëëë ëëëëëëëëëëëëëëëëëëëëëëë������ëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ë¨ë©ëªë«ë¬ëë®ë¯ë±ë²ë³ëµë¶ë·ë¹ëºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë»ë¼ë½ë¾ë¿ëëëëëëëëëëëëëëëëëëëëëëëëëëëëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ëªë«ëë®ë±ë²ë³ë´ëµë¶ë·ëºë¼ë½ë¾ë¿ëëëëë ëëëëëëëëëëëëëëëëëëëëëëë¡ë¢ë£ë¥ë¦ë§ë©ëªë«ë¬ëë®ë¯ë²ë´ë¶ë·ë¸ë¹ëºë»ë¾ë¿ëëëë ëëëëëëëëëëëëëë�".split("");for(a=0;a!=t[141].length;++a)if(t[141][a].charCodeAt(0)!==65533){r[t[141][a]]=36096+a;e[36096+a]=t[141][a]}t[142]="�����������������������������������������������������������������ëë¡ë¢ë£ë¤ë¥ë¦ë§ëªë®ë¯ë°ë±ë²ë³ë¶ë·ë¹ëºë»ë¼ë½ë¾ë¿ëë������ëëëë ëëëëëëëëëëëëëëëëëëëëëë������ëëë ë¡ë¢ë£ë¤ë¥ë¦ë§ë¨ë©ëªë«ë®ë¯ë±ë²ë³ëµë¶ë·ë¸ë¹ëºë»ë¾ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ë ¡ë ¢ë £ë ¦ë §ë ©ë ªë «ë ë ®ë ¯ë °ë ±ë ²ë ³ë ¶ë ºë »ë ¼ë ½ë ¾ë ¿ë¡ë¡ë¡ë¡ ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡¡ë¡¢ë¡£ë¡¥ë¡¦ë¡§ë¡¨ë¡©ë¡ªë¡«ë¡®ë¡°ë¡²ë¡³ë¡´ë¡µë¡¶ë¡·ë¡¹ë¡ºë¡»ë¡½ë¡¾ë¡¿ë¢ë¢ë¢ë¢ë¢ï¿½".split("");for(a=0;a!=t[142].length;++a)if(t[142][a].charCodeAt(0)!==65533){r[t[142][a]]=36352+a;e[36352+a]=t[142][a]}t[143]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¢ ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ë¢ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¢ 뢡뢢뢣뢤뢥뢦뢧뢩뢪뢫뢬ë¢ë¢®ë¢¯ë¢±ë¢²ë¢³ë¢µë¢¶ë¢·ë¢¹ë¢ºë¢»ë¢¼ë¢½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¢¾ë¢¿ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ë£ 룢룣룤룥룦룧룪룫ë£ë£®ë£¯ë£±ë£²ë£³ë£´ë£µë£¶ë£·ë£ºë£¼ë£¾ë£¿ë¤ë¤ë¤ë¤ë¤ ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤ë¤¡ë¤¢ë¤£ë¤¤ë¤¥ë¤¦ë¤§ë¤¨ë¤©ë¤ªë¤«ë¤¬ë¤ë¤®ë¤¯ë¤°ë¤±ë¤²ë¤³ë¤´ë¤µë¤¶ë¤·ë¤¸ë¤¹ë¤ºë¤»ë¤¾ë¤¿ë¥ë¥ë¥ë¥ ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ï¿½".split("");for(a=0;a!=t[143].length;++a)if(t[143][a].charCodeAt(0)!==65533){r[t[143][a]]=36608+a;e[36608+a]=t[143][a]}t[144]="�����������������������������������������������������������������ë¥ë¥ë¥ë¥ë¥ë¥¡ë¥¢ë¥£ë¥¤ë¥¥ë¥¦ë¥§ë¥ªë¥¬ë¥®ë¥¯ë¥°ë¥±ë¥²ë¥³ë¥¶ë¥·ë¥¹ë¥ºë¥»ë¥½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¥¾ë¥¿ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ë¦ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¦ë¦ 릡릢릣릤릥릦릧릨릩릪릫릮릯릱릲릳릵릶릷릸릹릺릻릾ë§ë§ë§ë§ë§ ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ 맢맦맧맩맪맫ë§ë§®ë§¯ë§°ë§±ë§²ë§³ë§¶ë§»ë§¼ë§½ë§¾ë§¿ë¨ë¨ë¨ë¨ ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ë¨ 먡먢먣먤먥먦먧먨먩먪먫먬ë¨ë¨®ë¨¯ë¨°ë¨±ë¨²ë¨³ë¨´ë¨µë¨¶ë¨·ë¨ºë¨»ë¨½ë¨¾ë¨¿ë©ë©ë©ë© ë©ï¿½".split("");for(a=0;a!=t[144].length;++a)if(t[144][a].charCodeAt(0)!==65533){r[t[144][a]]=36864+a;e[36864+a]=t[144][a]}t[145]="�����������������������������������������������������������������ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë© 멡멢멣멦멪멫멬ë©ë©®ë©¯ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë©²ë©³ë©µë©¶ë©·ë©¹ë©ºë©»ë©¼ë©½ë©¾ë©¿ëªëªëªëªëªëªëªëªëªëªëªëªëªëªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ëªëªëªëªëªëªëªëªëªëªëªëªëªëª 몡몢몣몤몥몦몧몪ëªëª®ëª¯ëª±ëª³ëª´ëªµëª¶ëª·ëªºëª¼ëª¾ëª¿ë«ë«ë«ë«ë« ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë«ë« 뫡뫢뫣뫤뫥뫦뫧뫨뫩뫪뫫뫬ë«ë«®ë«¯ë«°ë«±ë«²ë«³ë«´ë«µë«¶ë«·ë«¸ë«¹ë«ºë«»ë«½ë«¾ë«¿ë¬ë¬ë¬ë¬ ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬¡ë¬¢ë¬£ë¬¤ë¬¥ë¬¦ë¬§ï¿½".split("");for(a=0;a!=t[145].length;++a)if(t[145][a].charCodeAt(0)!==65533){r[t[145][a]]=37120+a;e[37120+a]=t[145][a]}t[146]="�����������������������������������������������������������������묨묪묬ë¬ë¬®ë¬¯ë¬°ë¬±ë¬²ë¬³ë¬·ë¬¹ë¬ºë¬¿ëëëëëëëëëëëë������ëëëëëëëëëëëë ë¢ë¤ë¥ë¦ë§ë¨ë©ëªë«ëë®ë¯ë°ë±ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë²ë³ë´ëµë¶ë·ë¸ë¹ëºë»ë¼ë½ë¾ë¿ë®ë®ë®ë®ë®ë® ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë®ë® 뮡뮢뮣뮥뮦뮧뮩뮪뮫ë®ë®®ë®¯ë®°ë®±ë®²ë®³ë®µë®¶ë®¸ë®¹ë®ºë®»ë®¼ë®½ë®¾ë®¿ë¯ë¯ë¯ë¯ ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ë¯ 믡믢믣믤믥믦믧믨믩믪믫믬ë¯ë¯®ë¯¯ë¯°ë¯±ë¯²ë¯³ë¯´ë¯µë¯¶ë¯·ë¯ºë¯»ë¯½ë¯¾ë°ï¿½".split("");for(a=0;a!=t[146].length;++a)if(t[146][a].charCodeAt(0)!==65533){r[t[146][a]]=37376+a;e[37376+a]=t[146][a]}t[147]="�����������������������������������������������������������������ë°ë°ë° ë°ë°ë°ë°ë°ë°ë°ë°ë°ë° 밡밢밣밦밨밪밫밬밮밯밲밳밵������밶밷밹밺밻밼밽밾밿ë±ë±ë±ë±ë±ë±ë±ë±ë±ë±ë±ë±ë±ë±ë±ë±ë±ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë±ë±ë±ë±ë±ë± 뱡뱢뱣뱤뱥뱦뱧뱨뱩뱪뱫뱬ë±ë±®ë±¯ë±°ë±±ë±²ë±³ë±´ë±µë±¶ë±·ë±¸ë±¹ë±ºë±»ë±¼ë±½ë±¾ë±¿ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²ë²¢ë²£ë²¥ë²¦ë²©ë²ªë²«ë²¬ë²ë²®ë²¯ë²²ë²¶ë²·ë²¸ë²¹ë²ºë²»ë²¾ë²¿ë³ë³ë³ë³ ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³ 볡볢볣볤볥볦볧볨볩볪볫볬ë³ë³®ë³¯ë³°ë³±ë³²ë³³ë³·ë³¹ë³ºë³»ë³½ï¿½".split("");for(a=0;a!=t[147].length;++a)if(t[147][a].charCodeAt(0)!==65533){r[t[147][a]]=37632+a;e[37632+a]=t[147][a]}t[148]="�����������������������������������������������������������������볾볿ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ë´ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë´ë´ë´ 봡봢봣봥봦봧봨봩봪봫ë´ë´®ë´¯ë´°ë´±ë´²ë´³ë´´ë´µë´¶ë´·ë´¸ë´¹ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë´ºë´»ë´¼ë´½ë´¾ë´¿ëµëµëµëµëµ ëµëµëµëµëµëµëµëµëµëµëµëµëµëµëµëµëµëµëµëµëµ 뵡뵢뵣뵥뵦뵧뵩뵪뵫뵬ëµëµ®ëµ¯ëµ°ëµ±ëµ²ëµ³ëµ´ëµµëµ¶ëµ·ëµ¸ëµ¹ëµºëµ»ëµ¼ëµ½ëµ¾ëµ¿ë¶ë¶ë¶ ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ 붡붢붣붥붦붧붨붩붪붫붬ë¶ë¶®ë¶¯ë¶±ë¶²ë¶³ë¶´ë¶µë¶¶ë¶·ë¶¹ë¶ºë¶»ë¶¼ë¶½ë¶¾ë¶¿ë·ë·ë·ë·ë·ë· ë·ë·ë·ë·ë·ë·ë·ë·ë·ë·ë·ë·ï¿½".split("");for(a=0;a!=t[148].length;++a)if(t[148][a].charCodeAt(0)!==65533){r[t[148][a]]=37888+a;e[37888+a]=t[148][a]}t[149]="�����������������������������������������������������������������ë·ë·ë·ë·ë·ë·ë·ë·ë·ë·ë· 뷡뷢뷣뷤뷥뷦뷧뷨뷪뷫뷬ë·ë·®ë·¯ë·±ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë·²ë·³ë·µë·¶ë··ë·¹ë·ºë·»ë·¼ë·½ë·¾ë·¿ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¸ 븡븢븣븤븥븦븧븨븩븪븫븬ë¸ë¸®ë¸¯ë¸°ë¸±ë¸²ë¸³ë¸´ë¸µë¸¶ë¸·ë¸¸ë¸¹ë¸ºë¸»ë¸¼ë¸½ë¸¾ë¸¿ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹¢ë¹£ë¹¥ë¹¦ë¹§ë¹©ë¹«ë¹¬ë¹ë¹®ë¹¯ë¹²ë¹¶ë¹·ë¹¸ë¹¹ë¹ºë¹¾ë¹¿ëºëºëºëº ëºëºëºëºëºëºëºëºëºëºëºëºëºëºëºëºëºëºëºëº 뺡뺢뺣뺤뺥뺦뺧뺩뺪뺫뺬ëºëº®ëº¯ëº°ëº±ëº²ëº³ëº´ëºµëº¶ëº·ï¿½".split("");for(a=0;a!=t[149].length;++a)if(t[149][a].charCodeAt(0)!==65533){r[t[149][a]]=38144+a;e[38144+a]=t[149][a]}t[150]="�����������������������������������������������������������������뺸뺹뺺뺻뺼뺽뺾뺿ë»ë»ë»ë»ë»ë» ë»ë»ë»ë»ë»ë»ë»ë»ë»ë»ë»ë»ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë»ë»ë»ë»ë»ë»ë»ë»ë»ë»¡ë»¢ë»¦ë»§ë»¨ë»©ë»ªë»«ë»ë»®ë»¯ë»°ë»±ë»²ë»³ë»´ë»µï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë»¶ë»·ë»¸ë»¹ë»ºë»»ë»¼ë»½ë»¾ë»¿ë¼ë¼ë¼ë¼ë¼ ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ 뼡뼢뼣뼤뼥뼦뼧뼨뼩뼪뼫뼬ë¼ë¼®ë¼¯ë¼°ë¼±ë¼²ë¼³ë¼´ë¼µë¼¶ë¼·ë¼¸ë¼¹ë¼ºë¼»ë¼¼ë¼½ë¼¾ë¼¿ë½ë½ë½ ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ë½ 뽡뽢뽣뽤뽥뽦뽧뽨뽩뽪뽫뽬ë½ë½®ë½¯ë½°ë½±ë½²ë½³ë½´ë½µë½¶ë½·ë½¸ë½¹ë½ºë½»ë½¼ë½½ë½¾ë½¿ë¾ë¾ë¾ï¿½".split("");for(a=0;a!=t[150].length;++a)if(t[150][a].charCodeAt(0)!==65533){r[t[150][a]]=38400+a;e[38400+a]=t[150][a]}t[151]="�����������������������������������������������������������������ë¾ë¾ë¾ ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ë¾ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¾ë¾ë¾ 뾡뾢뾣뾤뾥뾦뾧뾨뾩뾪뾫뾬ë¾ë¾®ë¾¯ë¾±ë¾²ë¾³ë¾´ë¾µë¾¶ë¾·ë¾¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¾¹ë¾ºë¾»ë¾¼ë¾½ë¾¾ë¾¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ë¿ 뿢뿣뿤뿥뿦뿧뿨뿩뿪뿫뿬ë¿ë¿®ë¿¯ë¿°ë¿±ë¿²ë¿³ë¿´ë¿µë¿¶ë¿·ë¿¸ë¿¹ë¿ºë¿»ë¿¼ë¿½ë¿¾ë¿¿ìììììì ììììììììììììììììììììììììììì ì¡ì¢ì£ì¤ì¥ì¦ì§ì¨ì©ìªì«ì¬ìì®ì¯ì°ì±ì²ì³ì´ìµì¶ì·ì¸ì¹ìºì»ì½ì¾ì¿ï¿½".split("");for(a=0;a!=t[151].length;++a)if(t[151][a].charCodeAt(0)!==65533){r[t[151][a]]=38656+a;e[38656+a]=t[151][a]}t[152]="�����������������������������������������������������������������ìììììì ìììììììììììììììììììì������ìììì¡ì¢ì£ì¤ì¥ì¦ì§ìªì«ì¬ìì®ì¯ì°ì±ì²ì³ì´ìµì¶ì·ì¸ì¹ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ìºì»ì¼ì½ì¾ì¿ìììììì ììììììììììììììììììììììì¢ì¤ì¦ì§ì¨ì©ìªì«ì®ì±ì²ì·ì¸ì¹ìºì»ì¾ììììììììììììììììììììì ì¡ì¢ì£ì¦ì§ì©ìªì«ìì®ì¯ì°ì±ì²ì³ì¶ì¸ìºì»ì¼ì½ì¾ì¿ìììì ìììììììììììììììììììì¡ì¢ì¥ì¨ì©ìªì«ì®ï¿½".split("");for(a=0;a!=t[152].length;++a)if(t[152][a].charCodeAt(0)!==65533){r[t[152][a]]=38912+a;e[38912+a]=t[152][a]}t[153]="�����������������������������������������������������������������ì²ì³ì´ìµì·ìºì»ì½ì¾ì¿ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ������ì ì ì ì ì ì ì ì ¡ì ¢ì £ì ¦ì ªì «ì ¬ì ì ®ì ¯ì ±ì ²ì ³ì µì ¶ì ·ì ¹ì ºì »ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì ¼ì ½ì ¾ì ¿ììììììììììììììììììììììì ì¢ì£ì¤ì¦ì§ìªì«ìì®ì¯ì±ì²ì³ì´ìµì¶ì·ì¸ì¹ìºì»ì¼ì¾ì¿ììììì ìììììììììììììììììììììì¡ì¢ì£ì¥ì¦ì§ì©ìªì«ì¬ìì®ì¯ì²ì´ìµì¶ì·ì¸ì¹ìºì»ì¾ì¿ìììì ììììììììììììììììììì¡ì¢ì£ï¿½".split("");for(a=0;a!=t[153].length;++a)if(t[153][a].charCodeAt(0)!==65533){r[t[153][a]]=39168+a;e[39168+a]=t[153][a]}t[154]="�����������������������������������������������������������������ì¤ì¥ì¦ì§ìªì¬ì®ì°ì³ìµì¶ì·ì¸ì¹ìºì»ì¼ì½ì¾ì¿ìììììì ������ìììììììììììììììììììììì¡ì¢ì£ì¤ì¦ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì§ì¨ì©ìªì«ì®ì¯ì±ì²ì³ìµì¶ì·ì¸ì¹ìºì»ì¾ììììì ììììììììììììììììììììì ì¡ì¢ì£ì¦ì§ì©ìªì«ì®ì¯ì°ì±ì²ì³ì¶ì¸ìºì»ì¼ì½ì¾ì¿ìììììì ììììììììììììììììììììììììì¡ì¢ì¥ì¦ì§ì¨ì©ìªì®ì°ì²ì³ì´ìµì·ìºì½ì¾ì¿ììììì ìììììì�".split("");for(a=0;a!=t[154].length;++a)if(t[154][a].charCodeAt(0)!==65533){r[t[154][a]]=39424+a;e[39424+a]=t[154][a]}t[155]="�����������������������������������������������������������������ìììììììììììì ì¡ì¢ì£ì¦ì§ìªì«ì¬ìì®ì¯ì°ì±ì²ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì³ì´ìµì¶ì·ì¸ì¹ìºì»ì¼ì½ì¾ì¿ììììììììììììì������ììììììììììììììììììì ì¡ì¢ì£ì¤ì¥ì¦ì§ìªì«ìì®ì¯ì±ì³ì´ìµì¶ì·ìºì»ì¾ì¿ììììì ììììììììììììììììììììììììì ì¡ì¢ì£ì¤ì¥ì¦ì§ì¨ì©ìªì«ì¬ìì®ì¯ì°ì±ì²ì³ì´ìµì¶ì·ì¸ì¹ìºì»ì¼ì½ì¾ì¿ììììì ììììììììììììììììììì�".split("");for(a=0;a!=t[155].length;++a)if(t[155][a].charCodeAt(0)!==65533){r[t[155][a]]=39680+a;e[39680+a]=t[155][a]}t[156]="�����������������������������������������������������������������ìììì¡ì£ì¤ì¥ì¦ì§ìªì«ì¬ì®ì¯ì°ì±ì²ì³ì¶ì·ì¹ìºì»ì¼ì½ì¾ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¿ìììììì ììììììììììììììììììì������ìììììì ì¡ì¢ì£ì¥ì¦ì§ì¨ì©ìªì«ìì®ì¯ì±ì²ì³ìµì¶ì·ì¸ì¹ìºì»ì¾ì¿ìììììì ìììììììììììììììììììììììììì ì¡ì¢ì£ì¦ì§ì©ìªì«ìì®ì¯ì°ì±ì²ì³ì¶ì·ì¸ìºì»ì¼ì½ì¾ì¿ììììì ììììììììììììììììììììììììì ì¡ì¢ì£ì¤ì¥ì¦ì§ì¨ì©ï¿½".split("");for(a=0;a!=t[156].length;++a)if(t[156][a].charCodeAt(0)!==65533){r[t[156][a]]=39936+a;e[39936+a]=t[156][a]}t[157]="�����������������������������������������������������������������ìªì«ì¬ìì®ì¯ì°ì±ì²ì³ì´ìµì¶ì·ì¹ìºì»ì½ì¾ì¿ìììììì ������ìììììììììììììììììììììììììì������ì ì¡ì¢ì£ì¤ì¥ì¦ì§ì¨ìªì«ì¬ìì®ì¯ì²ì³ìµì¶ì·ì¹ì»ì¼ì½ì¾ìììì ììììììììììììììììììììììì ì¡ì¢ì£ì¤ì¥ì¦ì§ìªì«ìì®ì¯ì±ì²ì³ì´ìµì¶ì·ìºì¼ì¾ì¿ììììììììììììììììì¢ì£ì¥ì¦ì§ì©ìªì«ì¬ìì®ì¯ì²ì¶ì·ì¸ì¹ìºì»ì¾ì¿ìììì ìììììììììì�".split("");for(a=0;a!=t[157].length;++a)if(t[157][a].charCodeAt(0)!==65533){r[t[157][a]]=40192+a;e[40192+a]=t[157][a]}t[158]="�����������������������������������������������������������������ìììììììì¡ì¢ì£ì¤ì¥ì¦ì§ì¨ìªì«ì¬ìì®ì¯ì°ì±ì²ì³ì¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì·ìºì¿ìììììììììììììììììììì¢ì¤ì¦ì§ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¨ì©ìªì«ì¯ì±ì²ì³ìµì¸ì¹ìºì»ììììììììììììììììììììì ì¡ì¢ì£ì¦ì§ì©ìªì«ì¯ì±ì²ì¶ì¸ìºì¼ì½ì¾ì¿ììì ììììììììììììììììììì¡ì¢ì£ì¤ì¥ì¦ì§ì¨ì©ìªì«ìì®ì°ì²ì³ì´ìµì¶ì·ìºì»ì½ì¾ì¿ììììì ììììììììììììììììììì ì¡ì¢ì£ì¦ï¿½".split("");for(a=0;a!=t[158].length;++a)if(t[158][a].charCodeAt(0)!==65533){r[t[158][a]]=40448+a;e[40448+a]=t[158][a]}t[159]="�����������������������������������������������������������������ì¨ìªì«ì¬ìì®ì¯ì²ì³ìµì¶ì·ì»ì¼ì½ì¾ì¿ììììììììì������ìììììììììììììì¢ì£ì¤ì¥ì¦ì§ìªì«ìì®ì¯ì±ì²ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì³ì´ìµì¶ì·ìºì»ì¼ì¾ì¿ììììììììììììììììììììììììì¢ì£ì¥ì¦ì§ì©ìªì«ì¬ìì®ì¯ì²ì´ì¶ì¸ì¹ìºì»ì¾ì¿ìììì ìììììììììììììì¡ì¢ì£ì¤ì¥ì¦ì§ì©ìªì¬ìì®ì¯ì°ì±ì²ì³ì¶ì·ì¹ìºì»ì¿ìììììììììììììììììì¢ì§ì¨ì©ìªì«ì®ì¯ì±ì²ì³ìµì¶ì·ï¿½".split("");for(a=0;a!=t[159].length;++a)if(t[159][a].charCodeAt(0)!==65533){r[t[159][a]]=40704+a;e[40704+a]=t[159][a]}t[160]="�����������������������������������������������������������������ì¸ì¹ìºì»ì¾ìììì ììììììììììììììììì������ììì ì¡ì¢ì£ì¥ì¦ì§ì©ìªì«ìì®ì¯ì°ì±ì²ì³ì´ìµì¶ì·ì¸ì¹ìºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì»ì¼ì½ì¾ì¿ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ì ¡ì ¢ì £ì ¥ì ¦ì §ì ¨ì ©ì ªì «ì ®ì °ì ²ì ³ì ´ì µì ¶ì ·ì ¹ì ºì »ì ½ì ¾ì ¿ì¡ì¡ì¡ì¡ì¡ ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ì¡ 졡졢졣졤졥졦졧졨졩졪졫졬ì¡ì¡®ì¡¯ì¡²ì¡³ì¡µì¡¶ì¡·ì¡¹ì¡»ì¡¼ì¡½ì¡¾ì¡¿ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ 좢좣좤�".split("");for(a=0;a!=t[160].length;++a)if(t[160][a].charCodeAt(0)!==65533){r[t[160][a]]=40960+a;e[40960+a]=t[160][a]}t[161]="�����������������������������������������������������������������좥좦좧좩좪좫좬ì¢ì¢®ì¢¯ì¢°ì¢±ì¢²ì¢³ì¢´ì¢µì¢¶ì¢·ì¢¸ì¢¹ì¢ºì¢»ì¢¾ì¢¿ì£ì£ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì£ì£ì£ ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£ì£¢ì££ì£¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì£¦ì£§ì£¨ì£©ì£ªì£«ì£¬ì£ì£®ì£¯ì£°ì£±ì£²ì£³ì£´ì£¶ì£·ì£¸ì£¹ì£ºì£»ì£¾ì£¿ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ããã·â¥â¦Â¨ãÂââ¥ï¼¼â¼ââââãããããããããããã±Ã÷â â¤â¥ââ´Â°â²â³ââ«ï¿ ï¿¡ï¿¥âââ â¥ââââ¡â§â»ââ ââââââ¡â â³â²â½â¼âââââãâªâ«ââ½ââµâ«â¬âââââââªâ©â§â¨ï¿¢ï¿½".split("");for(a=0;a!=t[161].length;++a)if(t[161][a].charCodeAt(0)!==65533){r[t[161][a]]=41216+a;e[41216+a]=t[161][a]}t[162]="�����������������������������������������������������������������ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ì¤ 줡줢줣줤줥줦줧줨줩줪줫������ì¤ì¤®ì¤¯ì¤°ì¤±ì¤²ì¤³ì¤µì¤¶ì¤·ì¤¸ì¤¹ì¤ºì¤»ì¤¼ì¤½ì¤¾ì¤¿ì¥ì¥ì¥ì¥ì¥ì¥ ì¥ì¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥ì¥¢ì¥¤ì¥¥ì¥¦ì¥§ì¥¨ì¥©ì¥ªì¥«ì¥ì¥®ì¥¯ââââ´ï½ËËËË˸ˡ¿Ëâ®ââ¤ââ°âââ·â¶â¤â â¡â¥â§â£âââ£ââââ¤â¥â¨â§â¦â©â¨ââââ¶â â¡âââââââ©âªâ¬ã¿ãâãâ¢ããâ¡â¬Â®ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[162].length;++a)if(t[162][a].charCodeAt(0)!==65533){r[t[162][a]]=41472+a;e[41472+a]=t[162][a]}t[163]="�����������������������������������������������������������������쥱쥲쥳쥵쥶쥷쥸쥹쥺쥻쥽쥾쥿ì¦ì¦ì¦ì¦ì¦ì¦ ì¦ì¦ì¦ì¦ì¦ì¦ì¦ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¦ì¦ì¦ì¦ì¦ì¦ì¦ì¦ì¦ì¦ì¦ì¦ 즡즢즣즤즥즦즧즨즩즪즫즬ì¦ì¦®ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¦¯ì¦°ì¦±ì¦²ì¦³ì¦´ì¦µì¦¶ì¦·ì¦¸ì¦¹ì¦ºì¦»ì¦¼ì¦½ì¦¾ì¦¿ì§ì§ì§ ì§ì§ì§ì§ì§ì§ì§ì§ì§ì§ì§ì§ï¼ï¼ï¼ï¼ï¼ ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ ABCDEFGHIJKLï¼ï¼®ï¼¯ï¼°ï¼±ï¼²ï¼³ï¼´ï¼µï¼¶ï¼·ï¼¸ï¼¹ï¼ºï¼»ï¿¦ï¼½ï¼¾ï¼¿ï½ï½ï½ï½ï½ï½ ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï¿£ï¿½".split("");for(a=0;a!=t[163].length;++a)if(t[163][a].charCodeAt(0)!==65533){r[t[163][a]]=41728+a;e[41728+a]=t[163][a]}t[164]="�����������������������������������������������������������������ì§ì§ì§¡ì§£ì§¥ì§¦ì§¨ì§©ì§ªì§«ì§®ì§²ì§³ì§´ì§µì§¶ì§·ì§ºì§»ì§½ì§¾ì§¿ì¨ì¨ì¨ì¨ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¨ ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ 쨡쨢쨣쨤쨥������쨦쨧쨨쨪쨫쨬ì¨ì¨®ì¨¯ì¨°ì¨±ì¨²ì¨³ì¨´ì¨µì¨¶ì¨·ì¨¸ì¨¹ì¨ºì¨»ì¨¼ì¨½ì¨¾ì¨¿ì©ì©ì©ì©ì©ì© ì©ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã 㠡㠢㠣㠤㠥㠦㠧㠨㠩㠪㠫㠬ã 㠮㠯㠰㠱㠲㠳㠴㠵㠶㠷㠸㠹㠺㠻㠼㠽㠾㠿ãããããã ããããããããã�".split("");for(a=0;a!=t[164].length;++a)if(t[164][a].charCodeAt(0)!==65533){r[t[164][a]]=41984+a;e[41984+a]=t[164][a]}t[165]="�����������������������������������������������������������������ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©ì©¢ì©£ì©¤ì©¥ì©¦ì©§ì©©ì©ªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì©«ì©¬ì©ì©®ì©¯ì©°ì©±ì©²ì©³ì©´ì©µì©¶ì©·ì©¸ì©¹ì©ºì©»ì©¼ì©¾ì©¿ìªìªìªìªìª ìªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìªìª 쪡쪢쪣쪤쪥쪦쪧⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹�����â ⠡⠢⠣⠤⠥⠦⠧⠨⠩�������ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎΠΡΣΤΥΦΧΨΩ��������αβγδεζηθικλμνξοÏÏÏÏÏ ÏÏÏÏ�������".split("");for(a=0;a!=t[165].length;++a)if(t[165][a].charCodeAt(0)!==65533){r[t[165][a]]=42240+a;e[42240+a]=t[165][a]}t[166]="�����������������������������������������������������������������쪨쪩쪪쪫쪬ìªìª®ìª¯ìª°ìª±ìª²ìª³ìª´ìªµìª¶ìª·ìª¸ìª¹ìªºìª»ìª¾ìª¿ì«ì«ì«ì« ������ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«ì«¡ì«¢ì«£ì«¤ì«¥ì«¦ì«§ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì«¨ì«©ì«ªì««ì«ì«®ì«¯ì«°ì«±ì«²ì«³ì«µì«¶ì«·ì«¸ì«¹ì«ºì«»ì«¼ì«½ì«¾ì«¿ì¬ì¬ì¬ì¬ì¬ì¬ ì¬ì¬ì¬ì¬ââââââââ¬â¤â´â¼âââââââ£â³â«â»ââ â¯â¨â·â¿ââ°â¥â¸ââââââââââââ¡â¢â¦â§â©âªââ®â±â²âµâ¶â¹âºâ½â¾âââââ âââââ���������������������������".split("");for(a=0;a!=t[166].length;++a)if(t[166][a].charCodeAt(0)!==65533){r[t[166][a]]=42496+a;e[42496+a]=t[166][a]}t[167]="�����������������������������������������������������������������ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬ì¬¢ì¬£ì¬¤ì¬¥ì¬¦ì¬§ì¬¨ì¬©ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¬ªì¬«ì¬¬ì¬ì¬®ì¬¯ì¬°ì¬±ì¬²ì¬³ì¬´ì¬µì¬¶ì¬·ì¬¸ì¬¹ì¬ºì¬»ì¬¼ì¬½ì¬¾ì¬¿ìììì������ì ìììììììììììììììììììì ì¡ì¢ì£ì¥ì¦ì§ì¨ì©ìªì«ì¬ãããâããã£ã¤ã¥ã¦ãããããããã ã¡ã¢ããããããããã§ã¨ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ããããããºã»ã¼ã½ã¾ã¿ãããããâ¦ããããããã ãã®ã¯ãã©ãªã«ã¬ããããããã����������������".split("");for(a=0;a!=t[167].length;++a)if(t[167][a].charCodeAt(0)!==65533){r[t[167][a]]=42752+a;e[42752+a]=t[167][a]}t[168]="�����������������������������������������������������������������ìì®ì¯ì°ì±ì²ì³ì´ìµì¶ì·ìºì»ì¼ì½ì¾ì¿ì®ì®ì®ì®ì®ì® ì®ì®ì®ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì®ì® 쮡쮢쮣������쮤쮥쮦쮧쮨쮩쮪쮫쮬ì®ì®®ì®¯ì®°ì®±ì®²ì®³ì®´ì®µì®¶ì®·ì®¹ì®ºì®»ì®¼ì®½ì®¾ì®¿ì¯ì¯ì¯ì¯ì¯ÃêĦ�IJ�ĿÅÃźÃŦÅ�ã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»âââââââââââââââââ â¡â¢â£â¤â¥â¦â§â¨â©â â¡â¢â£â¤â¥â¦â§â¨â©âªâ«â¬ââ®Â½â â ¼¾â â â â �".split("");for(a=0;a!=t[168].length;++a)if(t[168][a].charCodeAt(0)!==65533){r[t[168][a]]=43008+a;e[43008+a]=t[168][a]}t[169]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¯ ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ì¯ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¯ 쯡쯢쯣쯥쯦쯨쯪쯫쯬ì¯ì¯®ì¯¯ì¯°ì¯±ì¯²ì¯³ì¯´ì¯µì¯¶ì¯·ì¯¸ì¯¹ì¯ºì¯»ì¯¼ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¯½ì¯¾ì¯¿ì°ì°ì°ì°ì°ì° ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì°ì° 찣찤æÄðħıijĸÅÅøÅÃþŧÅÅãããããã ããããããããããããããããããããããâââââ â¡â¢â£â¤â¥â¦â§â¨â©âªâ«â¬ââ®â¯â°â±â²â³â´âµâ´âµâ¶â·â¸â¹âºâ»â¼â½â¾â¿âââ¹²³â´â¿ââââ�".split("");for(a=0;a!=t[169].length;++a)if(t[169][a].charCodeAt(0)!==65533){r[t[169][a]]=43264+a;e[43264+a]=t[169][a]}t[170]="�����������������������������������������������������������������찥찦찪찫ì°ì°¯ì°±ì°²ì°³ì°´ì°µì°¶ì°·ì°ºì°¿ì±ì±ì±ì±ì±ì±ì±ì±ì±ì±ì±ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì±ì±ì±ì±ì±ì±ì±ì±ì±ì±ì±ì±ì±¡ì±¢ì±£ì±¥ì±§ì±©ì±ªì±«ì±¬ì±ì±®ì±¯ì±±ì±²ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì±³ì±´ì±¶ì±·ì±¸ì±¹ì±ºì±»ì±¼ì±½ì±¾ì±¿ì²ì²ì²ì²ì²ì² ì²ì²ì²ì²ì²ì²ì²ì²ì²ì²ì²ì²ì²ì²ããããã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ãããããã ãããããããããããããã������������".split("");for(a=0;a!=t[170].length;++a)if(t[170][a].charCodeAt(0)!==65533){r[t[170][a]]=43520+a;e[43520+a]=t[170][a]}t[171]="�����������������������������������������������������������������ì²ì²ì²ì²ì²ì²ì²ì²ì²ì²¡ì²¢ì²£ì²¤ì²¥ì²¦ì²§ì²ªì²®ì²¯ì²°ì²±ì²²ì²³ì²¶ì²·ì²¹ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì²ºì²»ì²½ì²¾ì²¿ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ì³ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì³ì³ì³ì³ì³ì³ 쳡쳢쳣쳥쳦쳧쳨쳩쳪쳫ì³ì³®ì³¯ì³±ì³²ì³³ì³´ì³µì³¶ì³·ì³¸ì³¹ì³ºì³»ì³¼ì³½ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ãããããã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[171].length;++a)if(t[171][a].charCodeAt(0)!==65533){r[t[171][a]]=43776+a;e[43776+a]=t[171][a]}t[172]="�����������������������������������������������������������������쳾쳿ì´ì´ì´ì´ì´ ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´ ������촡촢촣촥촦촧촩촪촫ì´ì´®ì´¯ì´°ì´±ì´²ì´³ì´´ì´µì´¶ì´·ì´¸ì´ºì´»ì´¼ì´½ì´¾ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì´¿ìµìµìµìµìµìµ ìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµìµÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐРСТУФХЦЧШЩЪЫЬÐЮЯ���������������абвгдеÑжзийклмнопÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑ��������������".split("");for(a=0;a!=t[172].length;++a)if(t[172][a].charCodeAt(0)!==65533){r[t[172][a]]=44032+a;e[44032+a]=t[172][a]}t[173]="�����������������������������������������������������������������쵡쵢쵣쵥쵦쵧쵨쵩쵪쵫쵮쵰쵲쵳쵴쵵쵶쵷쵹쵺쵻쵼쵽쵾쵿ì¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¶ì¶ì¶ì¶ì¶ ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ì¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¶ 춡춢춣춦춨춪춫춬ì¶ì¶®ì¶¯ì¶±ì¶²ì¶³ì¶´ì¶µì¶¶ì¶·ì¶¸ì¶¹ì¶ºì¶»ì¶¼ì¶½ì¶¾ì¶¿ì·ì·ì·ì·ì· �����������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[173].length;++a)if(t[173][a].charCodeAt(0)!==65533){r[t[173][a]]=44288+a;e[44288+a]=t[173][a]}t[174]="�����������������������������������������������������������������ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì·ì· 췡������췢췣췤췥췦췧췩췪췫ì·ì·®ì·¯ì·±ì·²ì·³ì·´ì·µì·¶ì··ì·ºì·¼ì·¾ì·¿ì¸ì¸ì¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¸ì¸ ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸ì¸¢ì¸£ì¸¥ì¸¦ì¸§ì¸©ì¸ªì¸«ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[174].length;++a)if(t[174][a].charCodeAt(0)!==65533){r[t[174][a]]=44544+a;e[44544+a]=t[174][a]}t[175]="�����������������������������������������������������������������츬ì¸ì¸®ì¸¯ì¸²ì¸´ì¸¶ì¸·ì¸¸ì¸¹ì¸ºì¸»ì¸¼ì¸½ì¸¾ì¸¿ì¹ì¹ì¹ì¹ì¹ì¹ ì¹ì¹ì¹ì¹ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹ì¹¢ì¹£ì¹¤ì¹¥ì¹¦ì¹§ì¹ªì¹¬ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¹®ì¹¯ì¹°ì¹±ì¹²ì¹³ì¹¶ì¹·ì¹¹ì¹ºì¹»ì¹½ì¹¾ì¹¿ìºìºìºìºìºìºìºìºìºìºìºìºìºìºìºìºìºìºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[175].length;++a)if(t[175][a].charCodeAt(0)!==65533){r[t[175][a]]=44800+a;e[44800+a]=t[175][a]}t[176]="�����������������������������������������������������������������ìºìºìºìºìºìºìº¢ìº¦ìº§ìº¨ìº©ìºªìº«ìº®ìº¯ìº°ìº±ìº²ìº³ìº´ìºµìº¶ìº·ìº¸ìº¹ìººï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ìº»ìº¼ìº½ìº¾ìº¿ì»ì»ì»ì»ì» ì»ì»ì»ì»ì»ì»ì»ì»ì»ì»ì»ì»ì»ì»ì»ì»ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì»ì»ì»ì»ì»ì»ì»ì»ì»ì»ì» 컡컢컣컦컧컩컪ì»ì»®ì»¯ì»°ì»±ì»²ì»³ì»¶ì»ºì»»ì»¼ì»½ì»¾ì»¿ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê°ê° 갤갬ê°ê°¯ê°°ê°±ê°¸ê°¹ê°¼ê±ê±ê±ê±ê±ê±ê±°ê±±ê±´ê±·ê±¸ê±ºê²ê²ê²ê²ê² ê²ê²ê²ê²ê²ê²ê²ê²ê²ê²ê² 겡겨격겪견겯결겸겹겻겼경ê³ê³ê³ê³ê³ê³ê³ 곡곤곧골곪곬곯곰곱곳공곶과곽ê´ê´ê´ï¿½".split("");for(a=0;a!=t[176].length;++a)if(t[176][a].charCodeAt(0)!==65533){r[t[176][a]]=45056+a;e[45056+a]=t[176][a]}t[177]="�����������������������������������������������������������������ì¼ì¼ì¼ ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼¡ì¼¢ì¼£ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¼¥ì¼¦ì¼§ì¼¨ì¼©ì¼ªì¼«ì¼®ì¼²ì¼³ì¼´ì¼µì¼¶ì¼·ì¼¹ì¼ºì¼»ì¼¼ì¼½ì¼¾ì¼¿ì½ì½ì½ì½ì½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì½ ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ì½ 콡콢콣콦콨콪콫콬ê´ê´ê´ê´ê´ê´ê´ ê´©ê´¬ê´ê´´ê´µê´¸ê´¼êµêµ êµêµêµêµêµêµ¡êµ£êµ¬êµêµ°êµ³êµ´êµµêµ¶êµ»êµ¼êµ½êµ¿ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶ê¶¤ê¶·ê·ê·ê·ê·ê·ê·ê·ê·ê· 귤그극근귿ê¸ê¸ê¸ê¸ê¸ê¸ê¸ê¸°ê¸±ê¸´ê¸·ê¸¸ê¸ºê¹ê¹ê¹ê¹ ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ê¹ 깡깥깨깩깬깰깸�".split("");for(a=0;a!=t[177].length;++a)if(t[177][a].charCodeAt(0)!==65533){r[t[177][a]]=45312+a;e[45312+a]=t[177][a]}t[178]="�����������������������������������������������������������������ì½ì½®ì½¯ì½²ì½³ì½µì½¶ì½·ì½¹ì½ºì½»ì½¼ì½½ì½¾ì½¿ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ì¾ 쾢쾣쾤쾥쾦쾧쾩������쾪쾫쾬ì¾ì¾®ì¾¯ì¾±ì¾²ì¾³ì¾´ì¾µì¾¶ì¾·ì¾¸ì¾¹ì¾ºì¾»ì¾¼ì¾½ì¾¾ì¾¿ì¿ì¿ì¿ì¿ì¿ ì¿ì¿ì¿ì¿ì¿ì¿ê¹¹ê¹»ê¹¼ê¹½êºêº êºêº¼êº½êº¾ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»ê»¨ê»«ê»ê»´ê»¸ê»¼ê¼ê¼ê¼ê¼ê¼¬ê¼ê¼°ê¼²ê¼´ê¼¼ê¼½ê¼¿ê½ê½ê½ê½ê½ê½ê½ê½ê½¤ê½¥ê½¹ê¾ê¾ê¾ê¾ê¾ê¾ê¾ê¾¸ê¾¹ê¾¼ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿ê¿¨ê¿©ê¿°ê¿±ê¿´ê¿¸ëëëëëëëëë¨ëë ëëëëëëëëë�".split("");for(a=0;a!=t[178].length;++a)if(t[178][a].charCodeAt(0)!==65533){r[t[178][a]]=45568+a;e[45568+a]=t[178][a]}t[179]="�����������������������������������������������������������������ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿ì¿¢ì¿£ì¿¥ì¿¦ì¿§ì¿©ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ì¿ªì¿«ì¿¬ì¿ì¿®ì¿¯ì¿²ì¿´ì¿¶ì¿·ì¿¸ì¿¹ì¿ºì¿»ì¿½ì¿¾ì¿¿íííí ííííí������íííííííííííííííííííí í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬ëë¼ë½ëëëëëëëëëëëë ë¡ë¢ë¨ë©ë«ë¬ëë®ë¯ë±ë³ë´ëµë¸ë¼ëë ëëëëëëëë ë¥ëëëëëëëëëëëëë£ë¤ë¥ë¨ë¬ë´ëµë·ë¸ë¹ë ë ë ë ë ë ë ë ë ë ë ë ¸ë ¹ë ¼ëëëëëëëëëëëë¨ëëëëë�".split("");for(a=0;a!=t[179].length;++a)if(t[179][a].charCodeAt(0)!==65533){r[t[179][a]]=45824+a;e[45824+a]=t[179][a]}t[180]="�����������������������������������������������������������������í®í¯í°í±í²í³í¶í·í¹íºí»í½í¾í¿íííííííííííí������íííííííííííííí¡í¢í£í¤í¥í¦í§í¨í©íªí«í®í¯ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í±í²í³íµí¶í·í¸í¹íºí»í¾í¿ííííí íííííííííííííííëë¨ë©ë¬ë°ë¹ë»ë½ëë ëëëëëëëë ë´ë¼ëëë ë¨ë©ë´ëµë¼ëë ëëëëëëëë ë¡ë£ë¥ë¦ëªë¬ë°ë´ëëëëëëëëëë¢ë¤ë¥ë¦ë¨ë«ë¬ëë®ë¯ë³ë´ëµë·ë¸ë¹ëºë»ë¿ëëëëëëëëëëëëëëëëëëë¤ë¥ï¿½".split("");for(a=0;a!=t[180].length;++a)if(t[180][a].charCodeAt(0)!==65533){r[t[180][a]]=46080+a;e[46080+a]=t[180][a]}t[181]="�����������������������������������������������������������������íííííííííííí í¡í¢í£í¦í§í©íªí«íí®í¯í°í±í²ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í³í¶í¸íºí»í¼í½í¾í¿ííí íííííííííííííí������íííí¡í¢í£í¥í¦í§í¨í©íªí«í®í²í³í´íµí¶í·í¹íºí»í¼í½í¾í¿íííííë§ë©ë«ë®ë°ë±ë´ë¸ëëëëë ëëëë ë¡ë¨ë¬ëë ëëëëëëëëëëëë ë¤ë¨ë¼ëëëë ë¨ë©ë«ë´ëëëëë ë¡ë£ë¥ë¬ëëëë¤ë¨ë¬ëµë·ë¹ëëëëëëëë ë£ë¤ë¦ë¬ëë¯ë±ë¸ëëëëëë¤ë¥ë§ë¨ë©ëªë°ë±ë´ë¸ï¿½".split("");for(a=0;a!=t[181].length;++a)if(t[181][a].charCodeAt(0)!==65533){r[t[181][a]]=46336+a;e[46336+a]=t[181][a]}t[182]="�����������������������������������������������������������������í ííííííííííííííííííííííííí������í í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬íí®í¯í²í³íµí¶í·í¹í»í¼í½í¾ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¿í í í í í í í í í í í í í í í í í í í í í í ¢í £í ¤í ¥í ¦í §í ©í ªí «í ëëëëë ëëëëëëëëë ë¡ë ë¡ë¤ë¨ëªë«ë°ë±ë³ë´ëµë»ë¼ë½ëëëëëëëëë¬ëëëëë¥ë¬ë´ëë¤ë¨ëëë ë¤ë«ë¬ë±ëë°ë´ë¸ëëë ë¨ë©ë¬ë¯ë°ë¸ë¹ë»ëëëëëë ë¤ë¨ë°ë±ë³ëµë¼ë½ëëëëëëëëëë�".split("");for(a=0;a!=t[182].length;++a)if(t[182][a].charCodeAt(0)!==65533){r[t[182][a]]=46592+a;e[46592+a]=t[182][a]}t[183]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í ®í ¯í °í ±í ²í ³í ´í µí ¶í ·í ¸í ¹í ºí »í ½í ¾í ¿ííííí íííí������íííííííííííííííííííííí¢í£í¥í¦í§ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í©íªí«í¬íí®í¯í²í´í¶í·í¸í¹í»í½í¾í¿ííííí ííííííííííëëëë ë¨ë©ë«ë¬ëë´ëµë¸ëëë¬ëë°ë´ë¼ë½ë¿ë ë ë ë ë ë ë ë ë ë ë ë ¤ë ¥ë ¨ë ¬ë ´ë µë ·ë ¸ë ¹ë¡ë¡ë¡ë¡ë¡ë¡ë¡ 롤롬ë¡ë¡¯ë¡±ë¡¸ë¡¼ë¢ë¢¨ë¢°ë¢´ë¢¸ë£ë£ë£ë£ ë£ë£ë£ë£ë£ë£¡ë£¨ë£©ë£¬ë£°ë£¸ë£¹ë£»ë£½ë¤ë¤ë¤ 뤼뤽ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ë¥ 륨륩�".split("");for(a=0;a!=t[183].length;++a)if(t[183][a].charCodeAt(0)!==65533){r[t[183][a]]=46848+a;e[46848+a]=t[183][a]}t[184]="�����������������������������������������������������������������íííííííííííííííí í¡í¢í£í¤í¥í¦í§í¨í©íªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í«í¬íí®í¯í°í±í²í³íµí¶í·í¹íºí»í¼í½í¾í¿íííííí í������ííííííííííííííííííííííí í¡í¢í£í¤í¥í¦í§í¨í©ë¥«ë¥ë¥´ë¥µë¥¸ë¥¼ë¦ë¦ ë¦ë¦ë¦ë¦ë¦ë¦¬ë¦ë¦°ë¦´ë¦¼ë¦½ë¦¿ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§ë§¡ë§£ë§¤ë§¥ë§¨ë§¬ë§´ë§µë§·ë§¸ë§¹ë§ºë¨ë¨ë¨ë¨ë¨¸ë¨¹ë¨¼ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©ë©¤ë©¥ë©§ë©¨ë©©ë©°ë©±ë©´ë©¸ëªëªëª ëªëªëª¨ëª©ëª«ëª¬ëª°ëª²ëª¸ëª¹ëª»ëª½ë«ë«ë«ë«ë«¼ï¿½".split("");for(a=0;a!=t[184].length;++a)if(t[184][a].charCodeAt(0)!==65533){r[t[184][a]]=47104+a;e[47104+a]=t[184][a]}t[185]="�����������������������������������������������������������������íªí«í®í¯í±í²í³íµí¶í·í¸í¹íºí»í¾ííííí íííííí������ííííííííííííííííííí í¡í¢í£í¥í¦í§í¨ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í©íªí«í¬íí®í¯í°í±í²í³í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿ííí ííííííë¬ë¬ë¬ë¬ë¬ë¬ë¬ë¬ 묩묫무묵묶문묻물묽묾ëë ëëëëëëëë¡ë£ë¬ë®ë®ë®ë®¤ë®¨ë®¬ë®´ë®·ë¯ë¯ë¯ë¯ë¯ë¯¸ë¯¹ë¯¼ë¯¿ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°ë°¤ë°¥ë°§ë°©ë°ë°°ë°±ë°´ë°¸ë±ë±ë±ë±ë± ë±ë±ë±ë±ë±ë²ë² ë²ë²ë²ë²ë²ë²ë²ï¿½".split("");for(a=0;a!=t[185].length;++a)if(t[185][a].charCodeAt(0)!==65533){r[t[185][a]]=47360+a;e[47360+a]=t[185][a]}t[186]="�����������������������������������������������������������������íííííííííííííííí¡í¢í£í¥í¦í§í¨í©íªí«í������í®í¯í°í²í³í´íµí¶í·íºí»í½í¾íííí ííííííííí������íííííííííííí í¡í¢í£í¦í§í¨í©íªí«í¬íí®í¯í²í³íµí¶í·í¹íºë²ë²ë² 벡벤벧벨벰벱벳벴벵벼벽ë³ë³ë³ë³ë³ë³ë³ë³ë³ë³´ë³µë³¶ë³¸ë³¼ë´ë´ ë´ë´ë´ë´ë´¤ë´¬ëµëµëµëµëµëµëµëµ¤ëµ¨ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶ë¶¤ë¶°ë¶¸ë·ë·ë·ë·ë·©ë·°ë·´ë·¸ë¸ë¸ë¸ ë¸ë¸ë¸ë¸ë¸ë¸ë¸ë¹ë¹ ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ë¹ 빡빤�".split("");for(a=0;a!=t[186].length;++a)if(t[186][a].charCodeAt(0)!==65533){r[t[186][a]]=47616+a;e[47616+a]=t[186][a]}t[187]="�����������������������������������������������������������������í»í¼í½í¾í¿íííííííííííííííííííí¢í£ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¤í¦í§íªí«íí®í¯í±í²í³í´íµí¶í·íºí¾í¿íííííííí������ííííííííííííííííííííííí í¡í¢í£í¤í¥í¦í§í¨í©ë¹¨ë¹ªë¹°ë¹±ë¹³ë¹´ë¹µë¹»ë¹¼ë¹½ëºëºëºëºëºëºëºëºëºëº¨ë»ë»ë»ë»ë»ë» 뻣뻤뻥뻬ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë¼ë½ë½ë½ë½ë½ë½ë½ë¾ë¾°ë¿ ë¿ë¿ë¿ë¿ë¿ë¿ë¿¡ì¼ìììì ì¨ì©ììììì ì¡ì£ì¥ì¬ìì¯ì°ì³ì´ìµì¶ì¼ì½ì¿ììì ìììììììììì¤ï¿½".split("");for(a=0;a!=t[187].length;++a)if(t[187][a].charCodeAt(0)!==65533){r[t[187][a]]=47872+a;e[47872+a]=t[187][a]}t[188]="�����������������������������������������������������������������íªí«í¬íí®í¯í°í±í²í³í´íµí¶í·í¸í¹íºí»í¾í¿íííí íí������ííííííííííííííííí¡í¢í£í¤í¥í¦í§íªí¬í®ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¯í°í±í²í³íµí¶í·í¹íºí»í½í¾í¿ííííííííííííííííííì¥ì¨ì¬ì´ìµì·ì¹ìììììììììì ì£ì¤ì¦ì§ì¬ìì¯ì°ì±ì¶ì¸ì¹ì¼ì ì ì ì ì ì ì ì ì ì ì ¤ì ¥ì §ì ¨ì ©ì °ì ´ì ¸ì ìììììììììì¡ì¥ì¨ì©ì¬ì°ì½ììììììì ì¤ì¨ì°ì±ì³ì¼ì½ììììììììììì ì¨ì©ì«ì�".split("");for(a=0;a!=t[188].length;++a)if(t[188][a].charCodeAt(0)!==65533){r[t[188][a]]=48128+a;e[48128+a]=t[188][a]}t[189]="�����������������������������������������������������������������ííííííííí í¢í¤í¥í¦í§í¨í©íªí«í®í¯í±í²í³íµí¶í·ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¸í¹íºí»í¾ííííí íííííííííííííííí������ííííííííí í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬íí®í¯í°í±í²í³í´íµí¶í·ì¯ì±ì²ì´ìììììì ì¥ì¬ìì°ì´ì¼ì½ì¿ìììììììì¤ì¥ì¨ì¬ìì´ìµì·ì¹ììì ì£ì¤ì«ì¬ìì¯ì±ì¶ì¸ì¹ì»ì¼ììììììììììì¤ì¥ì¨ì©ì ì¨ì©ì¬ì°ì²ì¸ì¹ì¼ì½ììììììììì ì¢ì¨ì©ìì´ìµì¸ììì¤ì¬ì°ï¿½".split("");for(a=0;a!=t[189].length;++a)if(t[189][a].charCodeAt(0)!==65533){r[t[189][a]]=48384+a;e[48384+a]=t[189][a]}t[190]="�����������������������������������������������������������������í¸í¹íºí»í¼í½í¾í¿íííí íííííííííííííí������íííííííííííí¡í¢í£í¥í¦í§í¨í©íªí«í¬í®í°í±í²ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í³í´íµí¶í·íºí»í½í¾íííí íííííííííííííííííííì´ì¼ì½ìì¤ì¥ì¨ì¬ì´ìµì¹ìììì¸ì¼ì©ì°ì±ì´ì¸ìºì¿ììììììì¨ì©ì¬ì°ì¸ì¹ì»ì½ìì ììììììììììììììì ì¡ì¤ì¨ì°ì±ì³ì´ìµì¼ì½ìììììììììììì ì©ì´ìµì¸ì¹ì»ì¼ì½ì¾ìì ììììììì�".split("");for(a=0;a!=t[190].length;++a)if(t[190][a].charCodeAt(0)!==65533){r[t[190][a]]=48640+a;e[48640+a]=t[190][a]}t[191]="�����������������������������������������������������������������ííí í¡í¢í£í¤í¥í¦í§í¨íªí«í¬íí®í¯í°í±í²í³í´íµí¶í·í¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¹íºí»í¼í½í¾í¿íííííí ííííííííííííí������ííííííííí í¡í¢í£í¤í¥í¦í§í©íªí«íí®í¯í±í²í³í´íµí¶í·í¹íºí¼ììììì ì¡ì£ì¥ì¬ìì®ì°ì´ì¶ì·ì¼ì½ì¾ì¿ììì ìììììììììì¤ì¥ì¨ì¬ìì®ì°ì³ì´ìµì·ì¹ì»ìììììììììììì ì¬ì¯ì±ì¸ì¹ì¼ìììììììììì¤ì¥ì§ì©ì°ì±ì´ì¸ì¹ìºìììì ììììììì ì¡ì¨ï¿½".split("");for(a=0;a!=t[191].length;++a)if(t[191][a].charCodeAt(0)!==65533){r[t[191][a]]=48896+a;e[48896+a]=t[191][a]}t[192]="�����������������������������������������������������������������í¾í¿ííííí ííííííííííííííííííí������ííí í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬íí®í¯í°í±í²í³í´íµí¶í·ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¸í¹íºí»í¾í¿íííí íííííííííííííííííííí¡í¢í£ì©ì¬ì°ì¸ì¹ì½ìì ììììììì ì¡ì¤ì¨ì°ì±ì³ìµì·ì¼ì½ìììììììììììììììì ì¨ì«ì´ìµì¸ì¼ì½ì¾ììì ììììììììììììì ì¡ì£ì¤ì¥ì¦ì¬ìì°ì´ì¼ì½ì¿ìììììììììì¤ì¨ì¬ì ì ì ì ì �".split("");for(a=0;a!=t[192].length;++a)if(t[192][a].charCodeAt(0)!==65533){r[t[192][a]]=49152+a;e[49152+a]=t[192][a]}t[193]="�����������������������������������������������������������������í¤í¦í§íªí¬í®í¯í°í±í²í³í¶í·í¹íºí»í½í¾í¿ííííííí������íííííííííííííííííííí í¡í¢í£í¤í¦í§ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¨í©íªí«í¬íí®í¯í°í±í²í³í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íííííí ííì ì ì ì ì ì ì ì ì ¤ì ¬ì ì ¯ì ±ì ¸ì ¼ì¡ì¡ì¡ì¡ì¡ì¡ì¡°ì¡±ì¡´ì¡¸ì¡ºì¢ì¢ì¢ì¢ ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢ì¢¡ì¢¨ì¢¼ì¢½ì£ì£ì£ì£ì£ì£ì£ì£ 죡죤죵주죽ì¤ì¤ì¤ ì¤ì¤ì¤ì¤ì¤ì¤ì¤¬ì¤´ì¥ì¥ì¥ì¥ì¥ 쥡쥣쥬쥰쥴쥼ì¦ì¦ì¦ì¦ì¦ì¦ì¦ì¦ì§ì§ì§ì§ì§ì§ì§ì§ì§ï¿½".split(""); 64875for(a=0;a!=t[193].length;++a)if(t[193][a].charCodeAt(0)!==65533){r[t[193][a]]=49408+a;e[49408+a]=t[193][a]}t[194]="�����������������������������������������������������������������íííííííííííííííí í¡í¢í£í¦í§í©íªí«íí®ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¯í°í±í²í³í¶í¸íºí»í¼í½í¾í¿ííí íííííííííí������íííííííííí¡í¢í£í¥í¦í§í¨í©íªí«í¬í®í¯í°í±í²í³í´íµí¶í·íºí»ì§ì§ì§ì§ì§ì§ì§ 짢짤짧짬ì§ì§¯ì§°ì§±ì§¸ì§¹ì§¼ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨ì¨©ì©ì©ì©ì©ì©ì©ì©ì© 쩡쩨쩽ìªìªìª¼ìª½ì«ì«ì«ì«ì«ì«ì«ì«ì«ì« 쫬쫴ì¬ì¬ì¬ì¬ì¬ 쬡ììììììììì¤ì¸ì¹ì®ì®¸ì¯ì¯¤ì¯§ì¯©ì°ì°ì°ì°ì°ì°ì°¡ì°¢ì°§ì°¨ì°©ì°¬ì°®ì°°ì°¸ì°¹ì°»ï¿½".split("");for(a=0;a!=t[194].length;++a)if(t[194][a].charCodeAt(0)!==65533){r[t[194][a]]=49664+a;e[49664+a]=t[194][a]}t[195]="�����������������������������������������������������������������í½í¾í¿íííííííííííííííííííííí í¡ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¢í£í¤í¥í¦í¨íªí«í¬íí®í¯í²í³íµí¶í·í¸í¹íºí»í¼í½í¾í¿í������íííííííííííííííííííííííí í¢í£í¤í¥í¦í§í©íªì°¼ì°½ì°¾ì±ì± ì±ì±ì±ì±ì±ì±ì±ì± 챤챦챨챰챵ì²ì²ì²ì² 첨첩첫첬ì²ì²´ì²µì²¸ì²¼ì³ì³ ì³ì³ì³ì³ì³¤ì³¬ì³°ì´ì´ì´ì´ì´ì´ì´ì´ì´ì´¤ì´¨ì´¬ì´¹ìµìµ 쵤쵬ìµìµ¯ìµ±ìµ¸ì¶ì¶ì¶ì¶ì¶ì¶¤ì¶¥ì¶§ì¶©ì¶°ì·ì·ì·ì·¨ì·¬ì·°ì·¸ì·¹ì·»ì·½ì¸ì¸ì¸ì¸ì¸ì¸ 측츤츨츰츱츳층�".split("");for(a=0;a!=t[195].length;++a)if(t[195][a].charCodeAt(0)!==65533){r[t[195][a]]=49920+a;e[49920+a]=t[195][a]}t[196]="�����������������������������������������������������������������í«íí®í¯í±í²í³í´íµí¶í·í¸íºí¼í½í¾í¿ííííííííí������íííííííííííííííí¡í¢í£í¥í¦í§í©íªí«í¬í������í®í¯í±í²í³í´í¶í·í¸í¹íºí»í¾í¿íííí ííííííííííííííì¹ì¹ì¹ì¹ì¹ 칡침칩칫ì¹ì¹´ì¹µì¹¸ì¹¼ìºìº ìºìºìºìºìºìºìº 캡캣캤캥캬ìºì»ì»¤ì»¥ì»¨ì»«ì»¬ì»´ì»µì»·ì»¸ì»¹ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ì¼ 켤켬ì¼ì¼¯ì¼°ì¼±ì¼¸ì½ì½ì½ì½ì½¤ì½¥ì½§ì½©ì½°ì½±ì½´ì½¸ì¾ì¾ ì¾ì¾¡ì¾¨ì¾°ì¿ì¿ 쿡쿤쿨쿰쿱쿳쿵쿼íííííí´íµí¸í¼ï¿½".split("");for(a=0;a!=t[196].length;++a)if(t[196][a].charCodeAt(0)!==65533){r[t[196][a]]=50176+a;e[50176+a]=t[196][a]}t[197]="�����������������������������������������������������������������ííííííííí¡í¢í£í¤í¥í¦í§íªí¬í®í¯í°í±í²í³í¶í·í¹ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½íºí»í½í¾í¿ííííí íííííííííííííííí������íí¢í¤í¦í§í¨íªí«íí®í¯í±í²í³íµí¶í·í¸í¹íºí»í¾í¿ííííí íííííí íííííí í¬íí°í´í¼í½íí¤í¥í¨í¬í´íµí·í¹ííííííííííííí í¤í¬íí¯í°í±í¸íí°í±í´í¸íºí í í í í í í í í í í í í ¡í ¨í ¬í ¼ííí í¡í¤í¨í°í±í³íµíºí¼ííí´í¸íííí¬íí°í´í¼í½í¿ííí�".split("");for(a=0;a!=t[197].length;++a)if(t[197][a].charCodeAt(0)!==65533){r[t[197][a]]=50432+a;e[50432+a]=t[197][a]}t[198]="�����������������������������������������������������������������ííííííííííííííí í¡í¢í£ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½í¤ííííííííí í¤í¬í±í¸í¹í¼í¿ííííííííí¤í¥í°í±í´í¸íííí íííííííííí í¡í¥í¨í©í¬í°í¸í¹í»í¼í½íí í¼í½ííííííííííí í¨í©í«íí´í¸í¼íí ííííí¡í£í¬íí°í´í¼í½í¿í�".split("");for(a=0;a!=t[198].length;++a)if(t[198][a].charCodeAt(0)!==65533){r[t[198][a]]=50688+a;e[50688+a]=t[198][a]}t[199]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������íííííí í¤íí¯í¸í¹í¼í¿íííííííí©íííííí¨í¬í°í¸í»í½ííííííí¼í½íííííííííí í¥í¨í©í«íí´íµí¸í¼íí ííííí¥íííííííííí¤í¥í¨í¬í´íµí·í¹ííííííííííí �".split("");for(a=0;a!=t[199].length;++a)if(t[199][a].charCodeAt(0)!==65533){r[t[199][a]]=50944+a;e[50944+a]=t[199][a]}t[200]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������í¤íí¸í¹í¼íí íííííííííí§í©í°í±í´íí ííííííí¡í¨í¬í°í¹í»íí ííííííí í¤í¨í°íµí¼í½ííííííí í¨í©í«íí´íµí¸í¼ííííííííííí í¡í£í¥í©í¬í°í´í¼í½ííííííííí�".split("");for(a=0;a!=t[200].length;++a)if(t[200][a].charCodeAt(0)!==65533){r[t[200][a]]=51200+a;e[51200+a]=t[200][a]}t[202]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������伽佳åå¹å å¯åµå¥åå«å®¶ææ¶æ·æ¯æçç稼èèè¡è¢è¨¶è³è·è»»è¿¦é§å»å´åæªæ ¤æ®¼çè覺è§é£ä¾åå¢¾å¥¸å§¦å¹²å¹¹ææææ¬æ¡¿æ¾çç磵ç¨ç«¿ç°¡èè®è±è««éä¹«åæ·æ¸´ç¢£ç«èè¤èé¨ååå ªåµææ¾æ¡æ¢ææ©æ¸çç³ç£ç°ç´ºé¯ééé¾ï¿½".split("");for(a=0;a!=t[202].length;++a)if(t[202][a].charCodeAt(0)!==65533){r[t[202][a]]=51712+a;e[51712+a]=t[202][a]}t[203]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å£å²¬ç²èééåå å§å²¡å´åº·å¼ºå½æ ·æ±çºçç³ çµ³ç¶±ç¾è è¡èè¥è¬é¼éé±ä»ä»·åå±å¡æ·æ¾æ ¨æ¹æ§ªæ¼ç¥ççç®è¥èï¤é§éå客åï¤ç²³ç¾¹éµå¨å»å± å·¨ææ®ææ§æ¸ ç¬ç¥è·è¸ï¤é½é é¸ä¹¾ä»¶å¥å·¾å»ºææ¥è ±èè¹éµé¨«ä¹åæ°æ¡åååæª¢ï¿½".split("");for(a=0;a!=t[203].length;++a)if(t[203][a].charCodeAt(0)!==65533){r[t[203][a]]=51968+a;e[51968+a]=t[203][a]}t[204]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç¼éé»å«æ¯è¿²åæ©æææ ¼æªæ¿è覡éå ç½ç¬ççµ¹ç¹è©è¦è´é£éµææ±ºæ½çµç¼ºè¨£å ¼æ ç®è¬éé京ä¿åå¾åååå¿å°å¢åºå¾æ ¶æ¬ææ¬æ¯æ»æ´æ¢æ¶ç ç±çç¥çç硬磬ç«ç«¶çµ ç¶èè¿èèè¦è¼éé¡é é ¸é©é¯¨ä¿åå ºå¥å£å±æ¸ææ¡æ¢°ï¿½".split("");for(a=0;a!=t[204].length;++a)if(t[204][a].charCodeAt(0)!==65533){r[t[204][a]]=52224+a;e[52224+a]=t[204][a]}t[205]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������棨溪çç¸ç£ç¨½ç³»ç¹«ç¹¼è¨èª¡è°¿éé·å¤å©åå±åºå§å¤å°»åº«æ·æ·æ æ²æ æ¯æ§æ²½ç¼çç¾ç¨¿ç¾èè¡èè¦è½è°èè ±è¢´èª¥ï¤è¾é®éé¡§é«é¼åææ²æ¢ç©è°·éµ å°å¤å´ææ¢±æ£æ»¾ç¨è¢é¯¤æ±¨ï¤éª¨ä¾å ¬å ±ååå·¥æææ±æ§æ»ç空è£è²¢é串寡ææç�".split("");for(a=0;a!=t[205].length;++a)if(t[205][a].charCodeAt(0)!==65533){r[t[205][a]]=52480+a;e[52480+a]=t[205][a]}t[206]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç§èèªèª²è·¨ééé¡å»æ§¨è¿éï¤ å å®å¯¬æ £æ£ºæ¬¾çç¯ç管ç½è è§è²«é餍宿æ¬éä¾å å¡å£å»£æ æ´¸ççççè±éå¦æç½«ä¹åå¡å£æªæ§ææ§éå®ç´è±è½äº¤åå¬å¬å¬å¶ å·§æªææ ¡æ©ç¡çç¯çµç¿¹è èèè¼è½éé¤é©é®«ä¸ä¹ ä¹ä»ä¿±å ·å¾ï¿½".split("");for(a=0;a!=t[206].length;++a)if(t[206][a].charCodeAt(0)!==65533){r[t[206][a]]=52736+a;e[52736+a]=t[206][a]}t[207]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������åå£å¥åååµå¢å¯å¶å»æ¼æææ¸æ©æ§ææ¯æ¯¬æ±æºç¸çççç¿ç©ç©¶çµ¿èè¼è èè衢謳購è»éé±é¤é¶é§é© 鳩é·é¾åå±èé é«éº´åçªç¾¤è£è»é¡å 屿çªå®®å¼ç©¹çª®è躬å¦å¸å¸å·åæ³æ²æ¬æ·ç·å¥çè¨è¹¶éæºæ«æ½°è©è»é¥ï¤æ·æ¸è²´ï¿½".split("");for(a=0;a!=t[207].length;++a)if(t[207][a].charCodeAt(0)!==65533){r[t[207][a]]=52992+a;e[52992+a]=t[207][a]}t[208]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������鬼ï¤å«åå¥ææ§»çªç¡ çªºç« ç³¾èµè¦èµ³éµé¨å»åçç èéï¤æ©å ååææ£æ¥µéå å¤å¤ææ¤æ ¹æ§¿ç¾çè¹è«è¦²è¬¹è¿é¥ï¤ä»å¦æææªç´ç¦ç¦½è©è¡¾è¡¿è¥ï¤é¦ä¼åæ¥æ±æ±²ç´çµ¦äºå ¢çè¯ä¼ä¼å ¶ååå¨å»åºå¼å¤å¥å¦å¯å²å´å·±å¹¾å¿æææ£ï¿½".split("");for(a=0;a!=t[208].length;++a)if(t[208][a].charCodeAt(0)!==65533){r[t[208][a]]=53248+a;e[53248+a]=t[208][a]}t[209]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææææ£æ£æ©æ¬ºæ°£æ±½æ²æ·çç¦çªçç£ç¸ç¿ç¢ç£¯ç¥ç¥ç¥ç¥ºç®ç´ç¶ºç¾èèèè¨èè±èµ·é¡é¤é£¢é¥é¨é¨é©¥éºç·ä½¶åæ®æ¡éå«åºï¤ï¤å¨æ¦ï¤ææ¿ï¤ï¤ï¤ï¤ï¤ï¤é£ï¤ï¤ï¤ï¤ï¤è«¾ï¤ï¤ï¤ï¤æï¤ç ï¤ï¤é£ï¤ ææºåï¤¡ææ¥ 湳濫ç·ï¤£ï¤¤ï¤¥ï¿½".split("");for(a=0;a!=t[209].length;++a)if(t[209][a].charCodeAt(0)!==65533){r[t[209][a]]=53504+a;e[53504+a]=t[209][a]}t[210]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç´ï¤¦ï¤§è¡²åå¨ï¤¨ï¤©ï¤ªï¤«ï¤¬ä¹ï¤å §å¥æ°è冷女年æç§å¿µæ¬ææ»å¯§å¯åªï¤¯å¥´å¼©æï¤°ï¤±ï¤²ç盧老蘆虜路露é§ï¤¹ï¤ºï¤»ï¤¼ï¤½ï¤¾ï¤¿ï¥ï¥ï¥ï¥æ¿ï¥ï¥ è¿è¾²æ±ï¥ï¥è ¦ï¥ï¥å°¿ï¥ï¥ï¥ï¥ï¥ï¥ï¥ï¥å«©è¨¥æ»ç´ï¥ï¥ï¥ï¥ï¥ï¥è½ï¥ï¥å°¼æ³¥å¿æººå¤è¶ï¿½".split("");for(a=0;a!=t[210].length;++a)if(t[210][a].charCodeAt(0)!==65533){r[t[210][a]]=53760+a;e[53760+a]=t[210][a]}t[211]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������丹亶ä½å®åå£å½æ·æ¦æªæ®µæ¹ç端ç°ç·èè¢é²éæ»æ¾¾çºç¸éååæºæææ·¡æ¹æ½æ¾¹ç°èè½èè¦è«èéæ²ççè¸éåå å¡å¹¢æææ£ ç¶ç³è³é»¨ä»£åå®å¤§å°å²±å¸¶å¾ æ´æ¡ç³èºè¢è²¸éé»å® å¾·æ³ååå°åå µå¡å°å± å³¶å¶åº¦å¾æ¼ææææ¡ï¿½".split("");for(a=0;a!=t[211].length;++a)if(t[211][a].charCodeAt(0)!==65533){r[t[211][a]]=54016+a;e[54016+a]=t[211][a]}t[212]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ£¹æ«æ·æ¸¡æ»æ¿¤ç¾çç¹ç¦±ç¨»è覩è³è·³è¹éééé½éé¶éæ¯ççç¢ç¨ç£ç¦¿ç¯¤çºè®å¢©ææ¦æ½æ¾æ²ççè±é ä¹çªä»å¬åååæ§æ±æ¡æ£æ´æ½¼ç¼ç³ç«¥è´è£é å æææçç«è³ï¥è±éé 屯èèéé¯éå¾å¶æ©çç»çè¤è¬é§é¨°åæ¶ï¥ç©ç¾ �".split("");for(a=0;a!=t[212].length;++a)if(t[212][a].charCodeAt(0)!==65533){r[t[212][a]]=54272+a;e[54272+a]=t[212][a]}t[213]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������è¿èºè£¸éï¥æ´çç絡è½ï¥é ªé§±ï¥äºåµæ¬æ¬ç¾çèé¸åè¾£åµæ¥æ¬æ¬æ¿«ç±çºè襤覽æèè å»ææµªç¼ç ç¯èéä¾å´å¾ èå·æ ç¥äº®åå ©åæ¢æ¨ç²®ç²±ç³§è¯è«è¼éä¾¶å·åµåå»¬æ ®æ¾æ æ«æ¿¾ç¤ªèè £é驢驪éºé»åææ·çç¤«è½¢éæææ£æ¼£ï¿½".split("");for(a=0;a!=t[213].length;++a)if(t[213][a].charCodeAt(0)!==65533){r[t[213][a]]=54528+a;e[54528+a]=t[213][a]}t[214]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç çç·´è¯è®è¼¦é£éå½å壿´çè£å»ææ®®æ¿ç°¾çµä»¤ä¼¶å¹ï¥å²ºå¶ºæç²ç¬ç¾ç¿èéé´é¶éé 齡便¾§ç¦®é´é·åï¥ æææ«æ½ççç§èèèè·¯è¼ é²é¯é·ºé¹µç¢ç¥¿ç¶ èé鹿éºè«å£å¼æ§ç§çç± è¾å¡ç¨ç¢ç£è³è³è³´é·äºå坮廿çççèè¼ï¿½".split("");for(a=0;a!=t[214].length;++a)if(t[214][a].charCodeAt(0)!==65533){r[t[214][a]]=54784+a;e[54784+a]=t[214][a]}t[215]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é¼é¬§é¾å£å©å±¢æ¨æ·æ¼ç»ç´¯ç¸·è褸é¤éåææ³æ¦´æµæºççç çç¤ç¡«è¬¬é¡å æ®é¸ä¾å«å´æ·ªç¶¸è¼ªå¾æ æ 率éåèå忥ç¨ç¶¾è±éµä¿å©åååå±¥æ§ææ¢¨æµ¬çç¸çç異ç¢ç±¬ç½¹ç¾¸èè£è£¡ééé¢é¯åæ½¾ççèºèºªé£é±éºææ·ç³è¨éç ¬ï¿½".split("");for(a=0;a!=t[215].length;++a)if(t[215][a].charCodeAt(0)!==65533){r[t[215][a]]=55040+a;e[55040+a]=t[215][a]}t[216]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç«ç¬ ç²æ©çªç²ç¢¼ç£¨é¦¬é麻å¯å¹æ¼ èè«éä¸å娩å·å½æ ¢æ½æ©æ¼æ»¿æ¼«ç£çè¬èè »è¼é¥ é°»åæ¹æ«æ²«è襪éºäº¡å¦å¿å¿æç¶²ç½èè«è½è¼éå妹åªå¯æ§ææ¢ æ¯ç ¤ç½µè²·è³£éé èè²éé©éº¥åæ°çç²çèåªè¦å å忣æ²çç ç¶¿ç·¬é¢éºµæ» �".split("");for(a=0;a!=t[216].length;++a)if(t[216][a].charCodeAt(0)!==65533){r[t[216][a]]=55296+a;e[55296+a]=t[216][a]}t[217]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������èå¥åå½æææ¤§æºç¿çèèèé ©éé³´è¢ä¾®ååå§å¸½æ æ¸æ¹æ®ææ¨¡æ¯æ¯çç¡çç¸çèè¼è è¬è¬¨è²æ¨æ²ç§ç®ç¦ç©é¶©æ¿æ²å¤¢æ¦èå¯å¢å¦å»ææ´æ³æ¸ºç«ç«èé¨åå·«æ®ææææ«æ æ¥æ¦æ¯ç¡ç·çç¹èèèªèª£è²¿é§éµ¡å¢¨é»ååå»åæï¿½".split("");for(a=0;a!=t[217].length;++a)if(t[217][a].charCodeAt(0)!==65533){r[t[217][a]]=55552+a;e[55552+a]=t[217][a]}t[218]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������汶ç´ç´èèéé¯å¿æ²ç©å³åªå°¾åµå½å¾®æªæ¢¶æ¥£æ¸¼æ¹çç±³ç¾èè¬è¿·é¡é»´å²·æ¶ææ«ææ»æ¼æ°æ³¯ççç·¡éå¯èè¬ååæææ²æ´æ¨¸æ³ççç®ç²ç¸èè¶èè¿«é¹é§ä¼´åååææ¬æææ§æ³®æ½ççç¢ç¤ç¼ç£ç£»ç¤¬çµè¬è è¿é 飝忿¥æ¸¤æ½ï¿½".split("");for(a=0;a!=t[218].length;++a)if(t[218][a].charCodeAt(0)!==65533){r[t[218][a]]=55808+a;e[55808+a]=t[218][a]}t[219]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç¼è·é±é¢é«®éå£åå妨尨å¹å½·æ¿æ¾æ¹ææææ¦æ»ç£ ç´¡èªèè«è³è¡è訪è¬é¦é²é¾å俳北å¹å¾æææ¯æ¹ççèè裴裵è¤è³ 輩é éªä¼¯ä½°å¸ææ ¢ç½ç¾é幡æ¨ç ©ççªï¥¤ç¹èè©é£ä¼çç½°é¥å¡å¸æ¢µæ°¾æ±æ³ç¯ç¯èæ³çºå»å壿æªç§ç�".split("");for(a=0;a!=t[219].length;++a)if(t[219][a].charCodeAt(0)!==65533){r[t[219][a]]=56064+a;e[56064+a]=t[219][a]}t[220]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������碧èé¢é¹ï¥¥åå¼è®è¾¨è¾¯éå¥ç¥é±é¼ä¸åå µå±å¹·ææºææ£ ç³çç ç§ç«è¼§é¤ é¨ä¿å ¡å ±å¯¶æ®æ¥æ´æ¹ºæ½½ç¤ç«è©è£è¤èè¼ä¼åååå®å¾©æç¦è ¹è¯èè¤è¦è¼¹è¼»é¦¥é°æ¬ä¹¶ä¿¸å¥å°å³¯å³°æ§æ£ç½ç¢ç«ç¸«è¬èé¢éé³³ä¸ä»ä¿¯å åå¯å¦åå 夫婦�".split("");for(a=0;a!=t[220].length;++a)if(t[220][a].charCodeAt(0)!==65533){r[t[220][a]]=56320+a;e[56320+a]=t[220][a]}t[221]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ååµå¯åºï¥¦æ¶æ·æ§æµ®æº¥ç¶ç¬¦ç°¿ç¼¶è è èèèè©è¨è² 賦賻赴趺é¨éééé§é³§ååå©å´å¢³å¥å¥®å¿¿æ¤æ®ææ±¾ççç²ç³ç´è¬è³é°ï¥§ä½å¼å½¿æå´©ææ£ç¡¼ç¹éµ¬ä¸åååªåå¦å©¢åºæ²æææ¹æææ¦§æ¯æ¯æ¯æ¯æ²¸ï¥¨çµçºç ç¢ç§ç§ç²ç·ç¿¡è¥ï¿½".split("");for(a=0;a!=t[221].length;++a)if(t[221][a].charCodeAt(0)!==65533){r[t[221][a]]=56576+a;e[56576+a]=t[221][a]}t[222]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������è¾èè²è裨誹è¬è²»ééé£é¼»å¬å¬ªå½¬ææª³æ®¯æµæ¿±çççè²§è³é »ææ°·èé¨ä¹äºäºä»ä¼ºä¼¼ä½¿ä¿å¿å²å¸åå£å士奢å¨å¯«å¯ºå°å·³å¸«å¾ææ¨ææ¯æ¶æ»æ¢æ»æ²æ³æ¸£çç ç 社ç¥ç¥ ç§ç¯©ç´çµ²èèèèèè£è©è©è¬è³èµ¦è¾éªé£¼é§éºå數æï¥ªï¿½".split("");for(a=0;a!=t[222].length;++a)if(t[222][a].charCodeAt(0)!==65533){r[t[222][a]]=56832+a;e[56832+a]=t[222][a]}t[223]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ååªå±±æ£æ±çç£çç®èé ¸é°ä¹·ææ®ºç è©ä¸ï¥«ææ£®æ¸èèè¡«æ·æ¾é颯ä¸å·ååååªååå°å³ 常åºåº 廿³æ¡æ©¡æ¹ç½ççç¸ç¥¥ç®±ç¿è£³è§´è©³è±¡è³éå¡ç½è³½å塞穡索è²ç²çç¥ï¥ç¬å¢ 壻嶼åºåº¶å¾æææ¿ææææ¸æ 棲ççç®çµ®ç·ç½²ï¿½".split("");for(a=0;a!=t[223].length;++a)if(t[223][a].charCodeAt(0)!==65533){r[t[223][a]]=57088+a;e[57088+a]=t[223][a]}t[224]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������è¥èè¯è¥¿èªéé¤é»é¼ å¤å¥å¸æææ³ææ±æ· æ½ç³ç¢©èéé«ä»åå åå¬å®£ææ¾ææ¸²ç ½çççç¿ç¬ç¦ªç·ç¹ç¾¨è ºè³è¹èè¬è©µè·£é¸éé¥é¥é®®å¨å±æ¥æ³æ´©æ¸«èè褻è¨èªªéªé½§å¡æ¹æ®²çºè¾è´ééææ¶ç®ï¥®åå§å®¬æ§æºæææç©ç¹ççç¬ï¿½".split("");for(a=0;a!=t[224].length;++a)if(t[224][a].charCodeAt(0)!==65533){r[t[224][a]]=57344+a;e[57344+a]=t[224][a]}t[225]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������èè²è ¥èª éä¸å¢æ²æ´ç¨ 笹細說貰å¬å¯å¡å®µå°å°å·¢æææææ¢³æ²¼æ¶æº¯çç¤çç¦çççç¬ç¯ ç°«ç´ ç´¹è¬èè訴éé¡éµé·é¶é¨·ä¿å±¬ææ¶ç²çºè¬è´éå«å·½æèé飡çå®ææ¾æ·è¨èª¦éé å·ï¥°çç¢éè¡°éä¿®åå½åå壽å«å®å²«å³å¸¥æï¿½".split("");for(a=0;a!=t[225].length;++a)if(t[225][a].charCodeAt(0)!==65533){r[t[225][a]]=57600+a;e[57600+a]=t[225][a]}t[226]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æææææ¶æ¸æ¨¹æ®æ°´æ´æ¼±ç§ç©ç¸çç²ç¦ç¡ç§ç©ç«ªç²¹ç¶ç¶¬ç¹¡ç¾è©è±èèèªè¢èª°è®è¼¸ééé ¬éé¹éé§é¨ééé é¦é«é¬å塾å¤å°å®¿æ·æ½çç¡ç¹è è½å·¡å¾å¾ªææ¬æ æ¥¯æ©æ®æ´µæ·³ç£ç¾ç¬çç´è£èèè´è£è©¢è«ééé 馴æè¡è¿°é¥å´å´§ï¿½".split("");for(a=0;a!=t[226].length;++a)if(t[226][a].charCodeAt(0)!==65533){r[t[226][a]]=57856+a;e[57856+a]=t[226][a]}t[227]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������嵩çèè¨æ¿æ¾ç¿è¤¶è¥²ä¸ä¹å§ååæ¿æç¹©è éä¾åå¶å§åª¤å°¸å±å±å¸å¼ææ½æ¯ææ¾æ´çç¢ç¤ºç¿ èèè¦è©¦è©©è«¡è±è±ºå´å¯å¼æ¯ææ¤æ®æ¹çç¯èè軾é£é£¾ä¼¸ä¾ä¿¡å»å¨ å®¸æ¼æ°æ¨ç¼ç³ç¥ç´³è è£èèªèèè¨èº«è¾ï¥±è¿ 失室實æå¯©å°å¿æ²ï¿½".split("");for(a=0;a!=t[227].length;++a)if(t[227][a].charCodeAt(0)!==65533){r[t[227][a]]=58112+a;e[58112+a]=t[227][a]}t[228]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������沈深ççè¯è«¶ä»åï¥³éæ°äºä¿å å娥峨æçè½èªè¾è¡è¨é¿é é¤é´éµå 岳嶽广¡ææ¡æ¨æ¸¥ééé¡é°é½·å®å²¸æææ¡ç¼ééé¡é®æ¡è¬è»é¼åµå²©å·åºµæçè´é壿¼çé´¨ä»°å¤®ææ»æ®ç§§é´¦åååå´æææ¶¯ç¢è¾ééåæ¼ææ¶²ç¸è é¡ï¿½".split("");for(a=0;a!=t[228].length;++a)if(t[228][a].charCodeAt(0)!==65533){r[t[228][a]]=58368+a;e[58368+a]=t[228][a]}t[229]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������櫻ç½é¶¯é¸ä¹å»å¶å¤æ¹æ¶æ¤°çºè¶ï¥´é弱掠略ç´è¥è¯è»è¥èºï¥·ä½¯ï¥¸ï¥¹å£¤åæææææï¥ºæ¥æ¨£æ´çç ¬çç禳穰糧ç¾ï¥¼è¥ï¥½è®éé½ï¥¾é¤åå¾¡æ¼æ¼ç禦èªé¦éé½¬åæ¶ææªèåå °å½¦çè¨è«ºå¼è俺å¼å´å¥æ©æ·¹å¶ªæ¥åäºä½ï¥¿ï¦ï¦å¦ï¦ï¿½".split("");for(a=0;a!=t[229].length;++a)if(t[229][a].charCodeAt(0)!==65533){r[t[229][a]]=58624+a;e[58624+a]=t[229][a]}t[230]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¦ææ±ï¦çµç¤ï¦ èè è¹è¼¿è½ï¦é¤ï¦ï¦ï¦äº¦ï¦åå½¹æï¦ï¦ç«ç¹¹è¯ï¦éé©å¥å §å§¸å¨å®´ï¦å»¶ï¦ï¦ææ»ï¦æ¤½æ²æ²¿æ¶æ¶æ·µæ¼ï¦çç¶ç ï¦ççï¦ç¡ç¡¯ï¦çµç·£ï¦ç¸¯ï¦è¡è»ï¦ï¦ï¦éï¦é³¶ï¦ï¦ï¦æ æ¶ ï¦ç±ï¦ 說é±å廉念捻æï¦¥çç°ç°è¶è�".split("");for(a=0;a!=t[230].length;++a)if(t[230][a].charCodeAt(0)!==65533){r[t[230][a]]=58880+a;e[58880+a]=t[230][a]}t[231]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������簾é»é«¥é¹½æï¦§çè令囹å¡ï¦ªï¦«å¶¸å½±ï¦¬æ ææ¥¹æ¦®æ°¸æ³³æ¸¶æ½æ¿çç¯ç çç°ï¦ç瑩ççç©çºï¦¯ï¦°è±è© è¿ï¦±é零é靈領ä¹åªï¦µå塿³æ±æ¿çç¿ç©¢è®èè禮è£è©£è½è±«ï¦·é³ï¦¸éé äºä¼ä¿å²åå¾å³å塢墺奧å¨å¯¤æï¦¹æææ¿æ¤æ¢§æ±æ¾³ï¿½".split("");for(a=0;a!=t[231].length;++a)if(t[231][a].charCodeAt(0)!==65533){r[t[231][a]]=59136+a;e[59136+a]=t[231][a]}t[232]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������çç¬çç½è誤鰲é¼å±æ²ççéºæº«ç¥çç©©ç¸èå å£ æç®çç°ç¿éé饿¸¦ç¦çª©çªªè¥èè¸è¨å©å®å®æ¢¡æ¤æµ£ç©çç¬ç¢ç·©ç¿«èè èè±é®é æ°å¾æºææ±ªçå卿ªç®å¤åµ¬å·ç¥ç了僚å¥å¹å ¯å¤å¦å§å¯¥ï¦¼ï¦½å¶¢ææææ¾ï¦¾æï¦¿æ©ï§ç¿ç¤ï§ï¿½".split("");for(a=0;a!=t[232].length;++a)if(t[232][a].charCodeAt(0)!==65533){r[t[232][a]]=59392+a;e[59392+a]=t[232][a]}t[233]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������çªçª¯ç¹ç¹èè °ï§è¯è¦è¬ éï§é饿 ¾æ¬²æµ´ç¸è¤¥è¾±ä¿ååååå¢å®¹åº¸æ æ¦æ¶æ¹§æº¶çç¢ç¨ç¬è³è¸èè¸ééï§äºä½å¶åªååå³å®å¯å°¤æææ´ççççç¥ç¦ç¦¹ç´ç¾½èèèè¿ééµéªé é¨é©åå½§ææ±æ ¯ç 稶éé äºï§ æ©æ®æ¾çèè¸è�".split("");for(a=0;a!=t[233].length;++a)if(t[233][a].charCodeAt(0)!==65533){r[t[233][a]]=59648+a;e[59648+a]=t[233][a]}t[234]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ééé²é»è鬱äºçéå åå¡ååå£åªå«å¯æ¨æ¿æ´æ² 洹湲æºç°ç¿çèè¢è½ é ï§é¢é¡é´æè¶éä½ååå±åå§å¨å°æ °ææ¸ç²çç·¯èèè¦è¿èè¡è¤è¬éééä¹³ä¾åå ªï§å¯å©åºå®¥å¹¼å¹½åº¾æ æææææ¸æï§ææï§æ¥¡æ¥¢æ²¹æ´§ï§æ¸¸ï§ï¿½".split("");for(a=0;a!=t[234].length;++a)if(t[234][a].charCodeAt(0)!==65533){r[t[234][a]]=59904+a;e[59904+a]=t[234][a]}t[235]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������濡ç¶ç·ï§çç±ï§çï§ï§ç¶è¾è¸è£èªè«è«è¸°è¹éé¾éºé éé®ï§ï§å ï§æ¯èè²ï§ï§å 奫尹ï§ï§æ½¤ç§è¤è´ï§ééï§ï§ï§ï§è¿æç絨èï§å æ©æ 殷誾éé±ä¹åæ·«èé°é³é£®ææ³£éåæèºé·¹ä¾ååå®ææ¿æ¬æ¤ æ¯ çç£ç¾©è¤èè»è¡£èª¼ï¿½".split("");for(a=0;a!=t[235].length;++a)if(t[235][a].charCodeAt(0)!==65533){r[t[235][a]]=60160+a;e[60160+a]=t[235][a]}t[236]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������è°é«äºä»¥ä¼ï§ï§å¤·å§¨ï§å·²å¼å½æ¡ï§ 李梨泥ç¾ç¥ï§¤ç°ç痢移罹èè³èè¡è裏裡貽貳é里離飴é¤ï§«ï§¬ç·çç¿ç¿ç¿¼è¬äººä»åå°ï§å½å å§»å¯ å¼å¿æ¹®ï§®ï§¯çµªèµï§°èèªï§±éé·ï§²ï§³ä¸ä½ä½¾å£¹æ¥æº¢é¸é°é¦¹ä»»å£¬å¦å§æï§´ï§µç¨ï§¶èè³å ¥å�".split("");for(a=0;a!=t[236].length;++a)if(t[236][a].charCodeAt(0)!==65533){r[t[236][a]]=60416+a;e[60416+a]=t[236][a]}t[237]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������立笠粒ä»å©åè¿ä»åºå¨å§å§¿åååæ£æ æ»çç ®çç·çµç£ç´«è èªè¨èèè«®è³éä½åºå¼æ«æ¨ç¼ç¸çµç¶½èé é鵲屿£§æ®æ½ºç岿«æ½ç®´ç°ªè ¶éä¸ä»å å ´å¢»å£¯å¥¬å°å¸³åºå¼µææ²ææ¨æª£æ¬æ¼¿ç狀ççç« ç²§è ¸èè§èè¬è£èèè£è´é¬é·ï¿½".split("");for(a=0;a!=t[237].length;++a)if(t[237][a].charCodeAt(0)!==65533){r[t[237][a]]=60672+a;e[60672+a]=t[237][a]}t[238]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������éååå¨å®°æææ ½æ¢æ¸½æ»ç½ç¸¡è£è²¡è¼é½é½çç®è«éä½ä½å²åå§åºæµæµæ¥®æ¨æ²®æ¸ççªç½ç®¸ç´µè§è¹èè·è©è²¯èºéé¸éé½å£åå«¡å¯ææµæ»´çï§»çç©ç¬ç±ç¸¾ç¿è»è¬«è³èµ¤è·¡è¹è¿ªè¿¹é©éä½ä½ºå³å ¨å ¸ååªå¡¡å¡¼å¥ å°å±å»ææ°æ æ®¿æ°æ¾±ï¿½".split("");for(a=0;a!=t[238].length;++a)if(t[238][a].charCodeAt(0)!==65533){r[t[238][a]]=60928+a;e[60928+a]=t[238][a]}t[239]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç ç ç°ç¸çç²çç®ç®ç¯çºè©®è¼¾è½é¿éé¢é«é»é¡é¡«é¤åæªææµç¤ç«ç¯çµ¶å å²¾åºæ¼¸ç¹ç²éé®é»æ¥æºè¶ä¸äºäºååµåå§å®å¹åºå»·å¾æ æºæ¿æ´ææ¶æ¸æ¾æ¥¨æªæ£æ±æ·æ·¨æ¸æ¹çç¡çç½çºçç¢ç¦ç¨ç©½ç²¾ç¶èè¨è«ªè²éé éé¦éé éé�".split("");for(a=0;a!=t[239].length;++a)if(t[239][a].charCodeAt(0)!==65533){r[t[239][a]]=61184+a;e[61184+a]=t[239][a]}t[240]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������éé é¼å¶åå¼å ¤å¸å¼æææ¢¯æ¿ç¥ç¬¬èèºè£½è«¸è¹éé¤éé½é¡é½ä¿å åå©å²å¼å½«æªææ©ææºæ¹ææ¢æ£æ§½æ¼æ½®ç §ç¥çªçªçºç¥ç¥ç§ç¨ çªç²ç³çµç¹°èè»è¤è©èª¿è¶èºé éé£é»éé³¥æç°è¶³éåå°åæçå§å®å¾æ°æ «æ£æ·ç®ç¨®çµç¶ç¸±è «ï¿½".split("");for(a=0;a!=t[240].length;++a)if(t[240][a].charCodeAt(0)!==65533){r[t[240][a]]=61440+a;e[61440+a]=t[240][a]}t[241]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������踪踵é¾éä½å左座æ«ç½ªä¸»ä½ä¾åå§èåªå¨å¾å¥å®å·å»ææ±æ±æ ªæ³¨æ´²æ¹æ¾ç·ç çç±ç´ç´¬ç¶¢èèè¨»èª èµ°èºè¼³é±é é éé§ç«¹ç²¥ä¿åååå¯¯å³»ææ¨½æµæºæ¿¬çç¯ç«£è ¢é¡éµéé§¿èä¸ä»²è¡é彿«æ¥«æ±èºå¢ææ¾æ¯çççç¹è¸èè´ä¹åªï¿½".split("");for(a=0;a!=t[241].length;++a)if(t[241][a].charCodeAt(0)!==65533){r[t[241][a]]=61696+a;e[61696+a]=t[241][a]}t[242]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å«å°åå¿æææ¯æ¯æ¨æºææ³æ¢æ± æ²æ¼¬ç¥ç ¥ç¥ç¥ç´è¢èè³èè·èèªï§¼è´è¶¾é²ç´ç¨ç¨·ç¹è·ååå¡µæ¯æ¢æææ¡æ¦æ®æ´¥æº±çç¨ç¡çç¹ç¡çç秦ç¸ç¸è»è¯è¢è¨ºè³è»«è¾°é²éé£é³éä¾å±å§ªå«å¸æ¡çç¾ç§©çªè£è質è·è¿ææï§½å·æ½ç·è¼¯ï¿½".split("");for(a=0;a!=t[242].length;++a)if(t[242][a].charCodeAt(0)!==65533){r[t[242][a]]=61952+a;e[61952+a]=t[242][a]}t[243]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é¶éå¾µæ²æ¾ä¸ä¾ååå嵯差次æ¤ç£ç®ï§¾è¹è»é®ææ¾ççªé¯é¿é½ªæ°æ¾¯ç¦ç¨çç«ç°çºç²²çºè®è´é½é¤é¥å¹å¯æ¦æç´®ååå¡¹æ æ æºæ¬ç«è®è®åå¡åµå±å¨¼å» å½°æ´æææ¶æ¢æ§æ»æ¼²çç¡çªè¹èèè¼åµå°å¯å¯¨å½©æ¡ç ¦ç¶µèè¡ééµåæµç�".split("");for(a=0;a!=t[243].length;++a)if(t[243][a].charCodeAt(0)!==65533){r[t[243][a]]=62208+a;e[62208+a]=t[243][a]}t[244]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������責å妻æ½èåï§¿åå°ºæ ½æææ²æ¥æ»ç èè¹ éé»ä»åå天巿 æ³æ·ºçç©¿èè¦è³¤è¸é·é§é¡é¡éå¸å²åå¾¹æ¤æ¾ç¶´è¼è½éµåå°æ²¾æ·»çç»ç°½ç±¤è©¹è«å 妾叿·ççç«è«è²¼è¼å»³æ´æ·¸è½èè«éé¯ï¨åæ¿æ¶æ»¯ç· 諦é®éé«åå¿å¨ææææ¢¢ï¿½".split("");for(a=0;a!=t[244].length;++a)if(t[244][a].charCodeAt(0)!==65533){r[t[244][a]]=62464+a;e[62464+a]=t[244][a]}t[245]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¤æ¥æ¨µçç¦ç¡ç¤ç¤ç§ç¨èè¸èèèè²è¶ é ¢éé®ä¿åççèè§¸å¯¸å¿æé¨å¢å¡å¯µæ¤ææ 總è°è¥éæ®å¬å´æå¢æ½æ¨æ¤æ¥¸æ¨æ¹«çºç§è»è©è«è¶¨è¿½éé ééééé騶é°ä¸çç¥ç«ºçç¯ç¸®èè¹è¹´è»¸éæ¥æ¤¿çåºæ®é»å å¿ æ²è²è¡è¡·æ´èµè�".split("");for(a=0;a!=t[245].length;++a)if(t[245][a].charCodeAt(0)!==65533){r[t[245][a]]=62720+a;e[62720+a]=t[245][a]}t[246]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è´ åå¹å´å¨¶å°±çç¿ èèèè¶£éé©é·²å´ä»å æ»æ¸¬å±¤ä¾å¤å¤å³å¹æ¥æ¢æ²»æ·ç¾çç´ç¡ç¨ç©ç·ç·»ç½®è´è©è¼é馳é½åå é£è¦ªä¸ææ¼ä¾µå¯¢ææ²æµ¸çç §éé¼è秤稱快ä»å¤å¾å¢®å¦¥æ°æææ¶æ¥èµé馱é§å¬ååå¼ï¨æï¨æ¢æ«ææ¿æ¿¯ç¢ç¸è¨ï¿½".split("");for(a=0;a!=t[246].length;++a)if(t[246][a].charCodeAt(0)!==65533){r[t[246][a]]=62976+a;e[62976+a]=t[246][a]}t[247]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é¸ååå¦å½ææççç¶»èªå¥ªè«æ¢çè½è²ªå¡ææ¦»å®å¸æ¹¯ï¨è©å å°å¤ªæ æ æ®æ±°æ³°ç¬èèè·é°é¢±ï¨ææ¾¤ææå ååè¨æ æ¡¶ï¨ çççµ±éå æ§è ¿è¤ªéé ¹å¸å¥å¦¬æé鬪æ ç¹éå¡å©å·´æææºæ·æ³¢æ´¾ç¬ç¶ç ´ç½·èè·é å¤åæ¿çç£è²©è¾¦é�".split("");for(a=0;a!=t[247].length;++a)if(t[247][a].charCodeAt(0)!==65533){r[t[247][a]]=63232+a;e[63232+a]=t[247][a]}t[248]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������éªå «åæä½©åæææ²æµ¿çç½ç¨è¦è²å½æ¾ç¹è¨æä¾¿åæçç¯ç·¨ç¿©ééé¨è²¶åªå¹³æ°èè©å å¬å¹£å»¢å¼æèºè½ééä½å ååååºåå¸æææ±æï¨æ³¡æµ¦ç±ç ²èè¯èè¡è²è¢è¤ééªé£½é®å¹ æ´æççï¨ä¿µå½å½ªæ ææ¨æ¼ç¢ç¥¨è¡¨è±¹é£é£é©ï¿½".split("");for(a=0;a!=t[248].length;++a)if(t[248][a].charCodeAt(0)!==65533){r[t[248][a]]=63488+a;e[63488+a]=t[248][a]}t[249]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������åç¨æ¥è«·è±é¢¨é¦®å½¼æ«ç²ç®è¢«é¿éå¹å¼¼å¿ æ³çç¢ççè¾é¦ä¹é¼ä¸ä½å¦å¤å»æ°æ²³çè·è¦è³ééé°å£å¸èè¬é¶´å¯æ¨ææ±æ±æ¼¢æ¾£çç½ç¿°ééééå²è½å½å«å¸å£å檻涵ç·è¦éé·é¹¹ååçè¤é¤éé亢ä¼å§®å«¦å··ææææ¡æ²æ¸¯ç¼¸èèªï¿½".split("");for(a=0;a!=t[249].length;++a)if(t[249][a].charCodeAt(0)!==65533){r[t[249][a]]=63744+a;e[63744+a]=t[249][a]}t[250]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ï¨ï¨é 亥åå³åå¥å©å®³ææ¥·æµ·ç£è¹è§£è©²è«§éé§éª¸å¾æ ¸å幸æèè¡äº«åå®ç¦éé¿é¤é¥é¦åå¢èè¨±æ²æ«¶ç»è»æéªé©å¥ç赫é©ä¿å³´å¼¦æ¸ææ³«ç«çç¹ç¾ç©ççµçµ¢ç¸£è·è¡ï¨è³¢é顯åç©´è¡é å«ä¿ åå¤¾å³½æ¾æµ¹ç¹è èè¢éé °äº¨å åå�".split("");for(a=0;a!=t[250].length;++a)if(t[250][a].charCodeAt(0)!==65533){r[t[250][a]]=64e3+a;e[64e3+a]=t[250][a]}t[251]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å½¢æ³æ»ç çç¯çç©ç©èè¢è¡¡éé¢é£é¦¨å ®å½æ æ §æ³èè¹é¯éä¹äºå¼å£å£ºå¥½å²µå¼§æ¶æææ§æ¯«æµ©æ·æ¹æ»¸æ¾æ¿ æ¿©ççç¥çç çç¥ç³ç¸è¡è¦è«è¿èèè´è·è±ªé¬é é¡¥ææé ·å©ææ··æ¸¾ç¿é忽æç¬å弿±æ³æ´ªçç´ è¹è¨é´»ååå¬ æ¨ºç«çµï¿½".split("");for(a=0;a!=t[251].length;++a)if(t[251][a].charCodeAt(0)!==65533){r[t[251][a]]=64256+a;e[64256+a]=t[251][a]}t[252]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç¦ç¦¾è±è¯è©±è貨é´ï¨æ´æ«ç¢ºç¢»ç©«ä¸¸åå¥å®¦å¹»æ£ææ¡æ¥æ¡æ¸ç ¥ç°ç´é驩鰥活æ»ç¾è±éå°å¹å¾¨ææ¶æ°æ æææ¦¥æ³æ¹æ»æ½¢ç ççç¯ç°§èèééé»å¯å廻徿¢ææ·æ¦ææªæ·®æ¾®ç°çªç¹ªè¾è´è誨è³åç²å®æ©«éå®ååææ ææ¢æ¶æ·ï¿½".split("");for(a=0;a!=t[252].length;++a)if(t[252][a].charCodeAt(0)!==65533){r[t[252][a]]=64512+a;e[64512+a]=t[252][a]}t[253]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç»è´é µé©ä¾¯åååå¼åå å¸¿å¾æ½ç ¦çé åå³å¡¤å£ççç»è°è¨æè¨å§æç è±å忝å½å¾½æ®æç 諱è¼éº¾ä¼æºçç¦è§æ¤èé·¸å å¶åæ´¶è¸é»ææ¬£ççåå±¹ç´è¨æ¬ 欽æå¸æ°æ´½ç¿èåååå«å姬å¬å¸æææ±ææ¦çç¹çºç§ç¦§ç¨ç¾²è©°ï¿½".split("");for(a=0;a!=t[253].length;++a)if(t[253][a].charCodeAt(0)!==65533){r[t[253][a]]=64768+a;e[64768+a]=t[253][a]}return{enc:r,dec:e}}();cptable[950]=function(){var e=[],r={},t=[],a;t[0]="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~���������������������������������������������������������������������������������������������������������������������������������".split("");for(a=0;a!=t[0].length;++a)if(t[0][a].charCodeAt(0)!==65533){r[t[0][a]]=0+a;e[0+a]=t[0][a]}t[161]="����������������������������������������������������������������ãï¼ããï¼â§ï¼ï¼ï¼ï¼ï¸°â¦â¥ï¹ï¹ï¹Â·ï¹ï¹ï¹ï¹ï½â︱â︳â´ï¸´ï¹ï¼ï¼ï¸µï¸¶ï½ï½ï¸·ï¸¸ãã︹︺ãã︻︼ãã︽︾ãã︿ï¹ããï¹ï¹ããï¹ï¹ï¹ï¹ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¹ï¹ï¹ï¹ââââããâµâ²ï¼ï¼ï¼â»Â§ãâââ³â²âââ âââ¡â â½â¼ã£â ¯ ̄_Ëï¹ï¹ï¹ï¹ï¹ï¹ï¹ï¹ ﹡ï¼ï¼Ã÷±âï¼ï¼ï¼â¦â§â âââ¡ï¹¢ï¹£ï¹¤ï¹¥ï¹¦ï½â©âªâ¥â ââ¿ããâ«â®âµâ´âââââââââââââ¥â£ï¼ï¿½".split("");for(a=0;a!=t[161].length;++a)if(t[161][a].charCodeAt(0)!==65533){r[t[161][a]]=41216+a;e[41216+a]=t[161][a]}t[162]="����������������������������������������������������������������\â﹨ï¼ï¿¥ãï¿ ï¿¡ï¼ ï¼ ââ﹩﹪﹫ãããããã¡ããã°å å å å å ¡å £å§ç©ç³âââââ âââââââââââ¼â´â¬â¤ââââââââââ����������������������������������â®â°â¯âââªâ¡â¢â£â¥â¤â±â²â³ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼â ⠡⠢⠣⠤⠥⠦⠧⠨⠩ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ååå ABCDEFGHIJKLï¼ï¼®ï¼¯ï¼°ï¼±ï¼²ï¼³ï¼´ï¼µï¼¶ï¼·ï¼¸ï¼¹ï¼ºï½ï½ï½ï½ï½ ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï¿½".split("");for(a=0;a!=t[162].length;++a)if(t[162][a].charCodeAt(0)!==65533){r[t[162][a]]=41472+a;e[41472+a]=t[162][a]}t[163]="����������������������������������������������������������������ï½ï½ï½ï½ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοÏÏÏÏÏ ÏÏÏÏã ãããããããããã����������������������������������ããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ËËËËË���������������������������������â¬ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[163].length;++a)if(t[163][a].charCodeAt(0)!==65533){r[t[163][a]]=41728+a;e[41728+a]=t[163][a]}t[164]="����������������������������������������������������������������ä¸ä¹ä¸ä¸ä¹ä¹äºäºäººå¿å ¥å «å åååååååä¸ä¸ä¸ä¸ä¸«ä¸¸å¡ä¹ ä¹ä¹ä¹äºäº¡å ååºååå£å士å¤å¤§å¥³ååå寸å°å°¢å°¸å±±å·å·¥å·±å·²å·³å·¾å¹²å»¾å¼å¼æï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ä¸ä¸ä¸ä¸ä¸°ä¸¹ä¹å°¹äºäºäºäºäºäº¢ä»ä»ä»ä»ä»ä»ä»ä»ä»å å å §å å ®å ¬åå¶åååå»å¾å¿åå¹ååå ååååå壬天夫太å¤åå°å°¤å°ºå±¯å·´å¹»å»¿å¼å¼å¿ææ¶æææ¯æææ¤æ¹æ¥æ°ææ¨æ¬ æ¢æ¹æ¯æ¯æ¯æ°æ°´ç«çªç¶ç»çççç¬çä¸ï¿½".split("");for(a=0;a!=t[164].length;++a)if(t[164][a].charCodeAt(0)!==65533){r[t[164][a]]=41984+a;e[41984+a]=t[164][a]}t[165]="����������������������������������������������������������������ä¸ä¸ä¸ä¸ä¸»ä¹ä¹ä¹ä»¥ä»ä»ä»ä»ä»ä»£ä»¤ä»ä»å å ååå¬å¹åºå¸åå åå åååä»ååå¡å å¯å®å»å¯å¤å³å¬å®å©å¨å¼å¸åµå«å¦åªå²å±å°å¥åå»ååå¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å¤®å¤±å¥´å¥¶åå®å°¼å·¨å·§å·¦å¸å¸å¹³å¹¼å¼å¼å¼å¿ ææææææ¥æ¦æ®æ¬æªæ«ææ£æ¯æ°æ°æ°¸æ±æ±æ°¾ç¯çççç¦ççç¨ç©ç°ç±ç²ç³çç½ç®ç¿ç®çç¢ç³ç¤ºç¦¾ç©´ç«ä¸ä¸ä¹ä¹ä¹©äºäº¤äº¦äº¥ä»¿ä¼ä¼ä¼ä¼ä¼ä¼ä¼ä¼ä»²ä»¶ä»»ä»°ä»³ä»½ä¼ä¼å å å å å ¨ï¿½".split("");for(a=0;a!=t[165].length;++a)if(t[165][a].charCodeAt(0)!==65533){r[t[165][a]]=42240+a;e[42240+a]=t[165][a]}t[166]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å ±åå°åååååå£åå¡å å°å±åååååååååååååååå ååå³å°å¨åå¬å¯å©å¤å¤å¤·å¤¸å¦å¥¸å¦å¥½å¥¹å¦å¦ååå®å®å® å®å¯ºå°å±¹å·å¸å¹¶å¹´ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å¼å¼å¿å¿æææææ£æææ¶æ©æ¨æ¬ææ²æ³ææ½æ´æ±æµæ¬¡æ¤æ»æ°æ±æ±æ±æ±æ± æ±æ±æ±¡æ±æ±æ±ç°ççç¾ç«¹ç±³ç³¸ç¼¶ç¾ç¾½èèèèè³è¿èèèè£èªè³è¼èèèè®è²è¾è«è¡è¡è¡£è¥¿é¡ä¸²äº¨ä½ä½ä½ä½ä½ä¼´ä½ä½ä¼°ä½ä½ä¼½ä¼ºä¼¸ä½ä½ä¼¼ä½ä½£ï¿½".split("");for(a=0;a!=t[166].length;++a)if(t[166][a].charCodeAt(0)!==65533){r[t[166][a]]=42496+a;e[42496+a]=t[166][a]}t[167]="����������������������������������������������������������������ä½ä½ 伯ä½ä¼¶ä½ä½ä½ä½å å å å µå¶å·å¥å¤å©åªå¨å«å©åªå¬å£å³åµåååå¾å¦åå§ååå³åååå©åå¹å»å¸å®åµå¶å å¼åå±å«åå¬åªå°å¤å«åååå����������������������������������ååå¾ååå»å£¯å¤¾å¦å¦å¦¨å¦å¦£å¦å¦å¦å¦¤å¦å¦å¦¥ååååå®å®å®å°¬å±å±å°¿å°¾å²å²å²å²å·«å¸åºåºåºå»·å¼å¼å½¤å½¢å½·å½¹å¿å¿å¿å¿å¿±å¿«å¿¸å¿ªæææææææ¶ææææ¼æ¾æ¹æ³ææ¯ææ®æææææ¹æ»æ¸æ±æ´æææææææææææ �".split("");for(a=0;a!=t[167].length;++a)if(t[167][a].charCodeAt(0)!==65533){r[t[167][a]]=42752+a;e[42752+a]=t[167][a]}t[168]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æææ¥æ¯æ±æ±æ²æ²æ²æ²æ² æ²æ±ªæ±ºæ²æ±°æ²æ±¨æ²æ²æ±½æ²æ±²æ±¾æ±´æ²æ±¶æ²æ²æ²æ²ç¶ç¼ç½ç¸ç¢ç¡ç çççç¬ç«ç·ç¸çç¯ç£ç§ç§ç¦¿ç©¶ç³»ç½èèèèèèè²è¯è����������������������������������èèè¦è§è¨è°·è±è±è²èµ¤èµ°è¶³èº«è»è¾è¾°è¿è¿è¿ è¿å·¡éé¢éªé¦é£é ééé²é®é±éªé¬ä¸¦ä¹ä¹³äºäºäºäº«äº¬ä½¯ä¾ä¾ä½³ä½¿ä½¬ä¾ä¾ä¾ä¾ä½°ä½µä¾ä½©ä½»ä¾ä½¾ä¾ä¾ä½ºå å å å ©å ·å ¶å ¸å½å½å»å¸å·åºå°å®å¶åå¾å»ååååå¦å·å¸å¹åååå³åµï¿½".split("");for(a=0;a!=t[168].length;++a)if(t[168][a].charCodeAt(0)!==65533){r[t[168][a]]=43008+a;e[43008+a]=t[168][a]}t[169]="����������������������������������������������������������������åå¸ååå»å·åååå¼åå±å¶ååå¢å¨åå½ååºåå·åªå©å¡å¦å¤å¼å¤å¥å¥å¥å¥å¥å¦¾å¦»å§å¦¹å¦®å§å§å§å§å§å§å§å¦¯å¦³å§å§ åå¤å£å®å®å®å®å®å®å°å±å± ����������������������������������å±å²·å²¡å²¸å²©å²«å²±å²³å¸å¸å¸å¸å¸å¸å¹¸åºåºåºåºåºå»¶å¼¦å¼§å¼©å¾å¾å½¿å½¼å¿å¿ å¿½å¿µå¿¿æææ¯æµææªææ¡æ§æ©æ«ææææ¿æ¾ææ¿ææææ¿ææ¹æææ«æææææ¨æ½æ¼æææææµææ±æææææ¬ææ¾æ§æ¼æºææææææææææï¿½".split("");for(a=0;a!=t[169].length;++a)if(t[169][a].charCodeAt(0)!==65533){r[t[169][a]]=43264+a;e[43264+a]=t[169][a]}t[170]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æææææææ±ææ³æ·ææææ¯æ°æ¿ææ¾ææµæææ¼æªæ²æ¬£æ¦æ§æ¿æ°æ°æ³£æ³¨æ³³æ²±æ³æ³¥æ²³æ²½æ²¾æ²¼æ³¢æ²«æ³æ³æ²¸æ³æ²¹æ³æ²®æ³æ³ æ³±æ²¿æ²»æ³¡æ³æ³æ²¬æ³¯æ³æ³æ³ ����������������������������������çççççç¬çç¸çç§ç©çççççç©ç¨çç«ç¥ç½çççççç²ç´ç¥ç½ç¤¾ç¥ç¥ç§ç§ç©ºç©¹ç«ºç³¾ç½ç¾ç¾è èºè¥è¢è±è¡è«è©è´èªè¯è¥è¾èè³èèèè½èè¹è±è¬è¥è¯è¸è£è°è¾è·èè±å表è»è¿è¿è¿éµé¸é±é¶ééé·éééé¿é»é�".split("");for(a=0;a!=t[170].length;++a)if(t[170][a].charCodeAt(0)!==65533){r[t[170][a]]=43520+a;e[43520+a]=t[170][a]}t[171]="����������������������������������������������������������������éé¹é¨ééäºäºäº®ä¿¡ä¾µä¾¯ä¾¿ä¿ ä¿ä¿ä¿ä¿ä¾¶ä¿ä¿ä¿ä¿ä¾®ä¿ä¿ä¿ä¿ä¿ä¿ä¾·å ååå åååååååååååååå»ååå¬åå¨ååå¸å¦å³ååå½åªå����������������������������������ååå¯å«å±å»å©å§å¿å¿ååå å£å¢åå®åå¥å¥å¥å¥å¥å§å§å§¿å§£å§¨å¨å§¥å§ªå§å§¦å¨å§»å©å®£å®¦å®¤å®¢å®¥å°å±å±å±å±å³å³å··å¸å¸¥å¸å¹½åº 度建å¼å¼å½¥å¾å¾ å¾å¾å¾å¾å¾æææ æ¥ææ¨ææ°æ¨æ¢æææ¬æ«æªæ¤æææææ¼æææ®æ½ææ±æ·ï¿½".split("");for(a=0;a!=t[171].length;++a)if(t[171][a].charCodeAt(0)!==65533){r[t[171][a]]=43776+a;e[43776+a]=t[171][a]}t[172]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¯æ¬æ¾æ´æææ¿æ æ«æ½æ¢æ¥ææ æ§æ¯ææ¨æ±æ¤æ·æ¿ææ±æææ¬æ¶æ¯æµæ©æ¯æææ´ææ¥æ¸æææ³æ°ææ¢æææªæ®æ®æ®µæ¯æ¯æ°æ³æ´æ´²æ´ªæµæ´¥æ´æ´±æ´æ´ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ´»æ´½æ´¾æ´¶æ´æ³µæ´¹æ´§æ´¸æ´©æ´®æ´µæ´æ´«ç«çºç³ç¬ç¯çç¸ç®ç¤ç°ç²ç¯ç´ç©ç ç¡ç·çç»ç²ççç³ççççççç«ç¤ç¥ç¢ç£ç¸ççççççç çç¹ç¸ççç¾ç¼ççç ç ç ç ç¥ç¥ç¥ç¥ç¦¹ç¦ºç§ç§ç§ç©¿çªç«¿ç«½ç±½ç´ç´ ç´ç´ç´ç´ç´ç¼¸ç¾ç¾¿è�".split("");for(a=0;a!=t[172].length;++a)if(t[172][a].charCodeAt(0)!==65533){r[t[172][a]]=44032+a;e[44032+a]=t[172][a]}t[173]="����������������������������������������������������������������èèèè¶èè¥èèèèè¡èèèè¤èè´è¢è§èè è£èè¦èè¥èèèèè±èèèèèèèè¯èèè¹è»èºè¡è¡«è¦è§è¨è¨è¨è²è² 赴赳趴è»è»è¿°è¿¦è¿¢è¿ªè¿¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è¿è¿«è¿¤è¿¨ééééé é ééééééé¢é©ééé³é 風é£é£é¦é¦ä¹äº³ååå£ä¿¯å¦å¥ä¿¸å©ååå¼åååå俺ååå¨ä¿±å¡ååå俳修ååªä¿¾å«åå ¼å¤å¥å¢ååååååååååªå¿åååå¨ååå·å¼å¥å²ååºåå©åå¡åå®åªï¿½".split("");for(a=0;a!=t[173].length;++a)if(t[173][a].charCodeAt(0)!==65533){r[t[173][a]]=44288+a;e[44288+a]=t[173][a]}t[174]="����������������������������������������������������������������å¦å§åå½åååååååå å¤å¥å¥å¥å¨å¨å¨å¨å¨å¨å§¬å¨ 娣娩娥å¨å¨å«å±å®°å®³å®¶å®´å®®å®µå®¹å®¸å°å±å±å±å³å³½å³»å³ªå³¨å³°å³¶å´å³´å·®å¸å¸«åº«åºåº§å¼±å¾å¾å¾æï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ£æ¥ææææ©æ¯æææææææ æææ³ææ¿ææ¾æ¯ææææææºææ½æªæ«æ¨æææææææ æææææææ ææ¸ææææ ¡æ ¸æ¡æ¡æ¡æ ¹æ¡æ¡æ ©æ¢³æ æ¡æ¡æ ½æ´æ¡æ¡æ ¼æ¡æ ªæ¡ æ æ æ¡æ®æ®æ®·æ°£æ°§æ°¨æ°¦æ°¤æ³°æµªæ¶æ¶æ¶æµ¦æµ¸æµ·æµæ¶ï¿½".split("");for(a=0;a!=t[174].length;++a)if(t[174][a].charCodeAt(0)!==65533){r[t[174][a]]=44544+a;e[44544+a]=t[174][a]}t[175]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æµ¬æ¶æµ®æµæµ´æµ©æ¶æ¶æµ¹æ¶ æµ¥æ¶ççç¤çççç¹ç¹ç¼ç¹ç½ç¸ç·çççç®ç çªççççççç¾ç çç²ç³ç½ç¼ç¹çç¸çç°çççç©çç ç¨ç©ç °ç §ç ¸ç ç ´ç ·ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç ¥ç ç ç ç ²ç¥ç¥ç¥ ç¥ç¥ç¥ç¥ç¥ç¥ç§¤ç§£ç§§ç§ç§¦ç§©ç§çªçªç«ç¬ç¬ç²ç´¡ç´ç´ç´ç´ ç´¢ç´ç´ç´ç´ç´ç´ç´ç´ç¼ºç½ç¾ç¿ ç¿èèèèèè½è¿è±èè°è èè´èè¸è³èè½èè¼è¯èè¬èèèªè«è¨è¬è»è«èèèè¸èèèµè´èè²è¹è¶èèè±è¨è�".split("");for(a=0;a!=t[175].length;++a)if(t[175][a].charCodeAt(0)!==65533){r[t[175][a]]=44800+a;e[44800+a]=t[175][a]}t[176]="����������������������������������������������������������������èèèªèè¤è©èè£èè¡°è¡·è¢è¢è¡½è¡¹è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è¨è±è±ºè±¹è²¡è²¢èµ·èº¬è»è»è»è¾±ééè¿·é迺迴é追é 迸éé¡éé¢é é é ééééééé¢é£é¡ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ééé¤ééé»é£¢é¦¬éª¨é«é¬¥é¬²é¬¼ä¹¾åºå½ååååååå¥å¶åååµå´å·ååå¯åå åå°åªå¯åååååååå¿åå¾åæ¼ååªå¦ååå¡ååå±åååå¯å¤å¸å®åå¬å£å³ååååååå å å å å¤åºå å µå·å¹å¤ 奢娶å©å©å©¦å©ªå©ï¿½".split("");for(a=0;a!=t[176].length;++a)if(t[176][a].charCodeAt(0)!==65533){r[t[176][a]]=45056+a;e[45056+a]=t[176][a]}t[177]="����������������������������������������������������������������娼婢å©å©å©å°å¯å¯ å¯å¯å®¿å¯å°å°å°å± å±å±å´å´å´å´å´å´¢å´å´©å´å´å´¤å´§å´å·¢å¸¸å¸¶å¸³å¸·åº·åº¸åº¶åºµåº¾å¼µå¼·å½å½¬å½©å½«å¾å¾å¾å¾å¾¡å¾ 徿¿æ£ææ æ¨ææ´æ¦æ½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ æ»æµææ¼æææææ¸ææææææ æ§æ²ææ¢æ¥æ·æ§ææªæ±æ©ææææ«æ¨ææææ¡æ¬ææææ»æ©æ¨æºæææææåæææææææ¬æææææææ¤æ¨æ¦ææ¹åææ¢æ¢¯æ¢¢æ¢æ¢µæ¡¿æ¡¶æ¢±æ¢§æ¢æ¢°æ¢æ£æ¢æ¢æ¢ æ¢æ¢æ¢¨æ¢æ¢¡æ¢æ¬²æ®ºï¿½".split("");for(a=0;a!=t[177].length;++a)if(t[177][a].charCodeAt(0)!==65533){r[t[177][a]]=45312+a;e[45312+a]=t[177][a]}t[178]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¯«æ¯¬æ°«æ¶æ¶¼æ·³æ·æ¶²æ·¡æ·æ·¤æ·»æ·ºæ¸ æ·æ·æ¶¯æ·æ¶®æ·æ·¹æ¶¸æ··æ·µæ· æ·æ¸æ¶µæ·æ·«æ·æ·ªæ·±æ·®æ·¨æ·æ·æ¶ªæ·¬æ¶¿æ·¦ç¹ççç½ç¯ç½ç½çççççççç çççç¾çç ç¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç·çç¢ç¥ç¦ç¢ç°ççççµççççççç·ç¾ç¼ç¶ç¸çºç¡«ç¡ç¡ç¥¥ç¥¨ç¥ç§»çªçªç¬ 笨ç¬ç¬¬ç¬¦ç¬ç¬ç¬®ç²ç²ç²çµçµçµ±ç´®ç´¹ç´¼çµç´°ç´³çµç´¯çµç´²ç´±ç¼½ç¾ç¾ç¿ç¿ç¿èèèè¯èè£è«è©è°è¤èèµè·è¶è¹èèèè¸è¢èè½è«èèèèè è·è»è¼ï¿½".split("");for(a=0;a!=t[178].length;++a)if(t[178][a].charCodeAt(0)!==65533){r[t[178][a]]=45568+a;e[45568+a]=t[178][a]}t[179]="����������������������������������������������������������������èè§è彪èèè¶èèµèèè±è¯èè¡è¢è¢è¢«è¢è¢è¢è¢è¦è¦è¨ªè¨è¨£è¨¥è¨±è¨è¨è¨è¨¢è±è±è²©è²¬è²«è²¨è²ªè²§èµ§èµ¦è¶¾è¶ºè»è»ééééé£éééééé éé¢ééé����������������������������������é¨éé½é ééµé¦é£é§éé©ééªéµé³é¸é°é´é¶é·é¬ééªé©ç« ç«é é é鳥鹵鹿麥麻å¢åå ååååååæå±å²å´åµå©ååååå¥å»åå§å¼ååååååªååååå³å®åå¾å²åå»å¬å±å¾åå«ååå ¯å ªå ´å ¤å °å ±å ¡å å å£¹å£ºå¥ ï¿½".split("");for(a=0;a!=t[179].length;++a)if(t[179][a].charCodeAt(0)!==65533){r[t[179][a]]=45824+a;e[45824+a]=t[179][a]}t[180]="����������������������������������������������������������������婷åªå©¿åªåªåª§å³å±å¯å¯å¯å¯å°å°å°±åµåµå´´åµå·½å¹ 帽å¹å¹å¹¾å»å»å»å»å¼¼å½å¾©å¾ªå¾¨ææ¡æ²æ¶æ ææ£æºææ°æ»æ´æ ¨æ±ææ¶ææææææ£ææææ©æææï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææ£ææ¡æææ®æ¶æ´æªææææ¹ææ¦æ¢æ£æææ¯æ®æ°æ´æ¶æ¯ææºæ¾æ·æ¾æ¿æææ£ºæ£æ£ æ£æ£æ¤ æ£æ£µæ£®æ£§æ£¹æ£æ£²æ££æ£æ£æ¤æ¤æ¤æ£æ£æ¥®æ£»æ¬¾æ¬ºæ¬½æ®æ®æ®¼æ¯¯æ°®æ°¯æ°¬æ¸¯æ¸¸æ¹æ¸¡æ¸²æ¹§æ¹æ¸ æ¸¥æ¸£æ¸æ¹æ¹æ¸¤æ¹æ¹®æ¸æ¸¦æ¹¯æ¸´æ¹æ¸ºæ¸¬æ¹æ¸æ¸¾æ»ï¿½".split("");for(a=0;a!=t[180].length;++a)if(t[180][a].charCodeAt(0)!==65533){r[t[180][a]]=46080+a;e[46080+a]=t[180][a]}t[181]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æºæ¸æ¹æ¹£æ¹æ¹²æ¹©æ¹ççç¦ç°ç¡ç¶ç ®ççççç¶ç¥ç´ç©çºçªç³ç¢ç¥çµç¶ç´ç¯çç¦ç¨ç¥ç¦ç«çªç¢çç£çççç ç»ç¼ççç´çççç¡ç¡¬ç¡¯ç¨ç¨ç¨ç¨ ç¨çªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½çªçªç«¥ç«£ççççççççççç²ç²¥çµçµçµ¨çµç´«çµ®çµ²çµ¡çµ¦çµ¢çµ°çµ³åç¿ç¿èèè è è è è è è¹è è¾è è è ´èèè©èè¸èè è èèè¯è±è´èèè°èèè½è²èè¸èèèèèèèèèèèèè¤èèè¡è£è£è¢±è¦è¦è¨»è© è©è©è¨¼è©ï¿½".split("");for(a=0;a!=t[181].length;++a)if(t[181][a].charCodeAt(0)!==65533){r[t[181][a]]=46336+a;e[46336+a]=t[181][a]}t[182]="����������������������������������������������������������������è©è©è©è©è¨´è¨ºè¨¶è©è±¡è²è²¯è²¼è²³è²½è³è²»è³è²´è²·è²¶è²¿è²¸è¶è¶ è¶è·è·è·è·è·è·è·è·è»»è»¸è»¼è¾é®éµé±é¸é²é¶ééµéé¾é £é ¥éééé£éééééééééé����������������������������������ééééééé½é ééé²ééé éééé¯é²éé é é 飧飪飯飩飲é£é¦®é¦é»é»é»äºååµå²å³å å¾å¬å·å»å¯åå¿å·å½åå¦å¤å¢å£å¯åå¨åå¦ååååå£å¤å¯åå¡å åå¥åååå¡å¡å¡å¡å¡å¡å¡«å¡å¡å¡å¡¢å¡å¡å¥§å«å«å«åª¾åª½åª¼ï¿½".split("");for(a=0;a!=t[182].length;++a)if(t[182][a].charCodeAt(0)!==65533){r[t[182][a]]=46592+a;e[46592+a]=t[182][a]}t[183]="����������������������������������������������������������������媳å«åª²åµ©åµ¯å¹å¹¹å»å»å¼å½å¾¬å¾®æææ ææ³ææ¹æææ æ æ æ æ¾æ´æ§æææ·æ¡æ¢ææ¾ææªææ½æ¬æææææ¶ææææ¬ææ°ææææææææææ¦æ¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¥æ¥·æ¥ æ¥æ¥µæ¤°æ¦æ¥æ¥¨æ¥«æ¥æ¥æ¥¹æ¦æ¥æ¥£æ¥ææ²æ¯æ®¿æ¯æ¯½æº¢æº¯æ»æº¶æ»æºæºæ»æ» æº¥æºæº¼æººæº«æ»æºæºæ»æ»æºªæº§æº´ç ç ç ©ç ¤ç ç §ç ç ¬ç ¦ç ç ¥ç ç ç ¨ç çºçç·ç ç¿ç¾ç¯çççççç¿çççç¶ç¸çç°çç²ç±çºç¿ç´ç³çççç«ç¦çç£ï¿½".split("");for(a=0;a!=t[183].length;++a)if(t[183][a].charCodeAt(0)!==65533){r[t[183][a]]=46848+a;e[46848+a]=t[183][a]}t[184]="����������������������������������������������������������������ç¹çªç¬çç¥ç¨ç¢ç®ç¢ç¢°ç¢ç¢ç¢ç¢ç¡¼ç¢ç¢ç¡¿ç¥ºç¥¿ç¦è¬ç¦½ç¨ç¨ç¨ ç¨ç¨ç¨çªçª ç·ç¯ç ç®ç§ç²±ç²³ç²µç¶çµ¹ç¶ç¶ç¶çµç½®ç½©ç½ªç½²ç¾©ç¾¨ç¾¤èèèèè ±è °è ¸è ¥è ®è ³è «ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è ¹è ºè ¦è èèè·è½è±èµè¦è«èè¬èè¼èµè¡è£è©èèèèèè¹èèèèè¾è»èèèèè¡è£è£è£è£è£è£è£¡è£è£è£è¦è§£è©«è©²è©³è©¦è©©è©°èªè©¼è©£èª è©±èª è©è©¢è©®è©¬è©¹è©»è¨¾è©¨è±¢è²è²è³è³è³è³è²²è³è³è³ è·¡è·è·¨è·¯è·³è·ºè·ªè·¤è·¦èº²è¼è¼è»¾è¼ï¿½".split(""); 64876for(a=0;a!=t[184].length;++a)if(t[184][a].charCodeAt(0)!==65533){r[t[184][a]]=47104+a;e[47104+a]=t[184][a]}t[185]="����������������������������������������������������������������è¾è¾²éééééé¼éééééééé¾éééé ¬é ªé ©éé·éé¸é½éé¾ééé¤éé´ééé é¹é¿éééééééééé·é»é¹é¶éé´é¶é é é é é é 飼飴����������������������������������飽飾馳馱馴髡鳩éºé¼é¼é¼ å§å®å¥ååååååå±åå©å ¢å³ååå±åå¾åååå½åååååå·ååååå¶åå塵塾å¢å¢å¢å¡¹å¢ 塽壽夥夢夤奪奩嫡嫦嫩å«å«å«å«£åµå¯å¯§å¯¡å¯¥å¯¦å¯¨å¯¢å¯¤å¯å°å±¢å¶å¶å¹å¹£å¹å¹å¹å»å»å¼å½å½°å¾¹æ �".split("");for(a=0;a!=t[185].length;++a)if(t[185][a].charCodeAt(0)!==65533){r[t[185][a]]=47360+a;e[47360+a]=t[185][a]}t[186]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¿æ æ ·æ ¢æ £æ æ æ æ µæªææææ¤æ¸ææºææ§æ´ææ»æ²æ¡æææ¢æ¨ææ¦æ¦¨æ¦æ§æ¦®æ§æ§æ¦æ¦·æ¦»æ¦«æ¦´æ§æ§æ¦æ§æ¦¦æ§æ¦£æææ°³æ¼³æ¼æ»¾æ¼æ»´æ¼©æ¼¾æ¼ æ¼¬æ¼æ¼æ¼¢ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ»¿æ»¯æ¼æ¼±æ¼¸æ¼²æ¼£æ¼æ¼«æ¼¯æ¾æ¼ªæ»¬æ¼æ»²æ»æ»·ççç ½çççç¾ççççç¤ç£çªç°çççç§ççççç¡ç£çç½ç¿ç¡ç£ç¢ç¢§ç¢³ç¢©ç¢£ç¦ç¦ç¦ç¨®ç¨±çªªçª©ç«ç«¯ç®¡ç®ç®çµç®ç®ç®ç®ç®¸ç®ç®ç²¹ç²½ç²¾ç¶»ç¶°ç¶ç¶½ç¶¾ç¶ ç·ç¶´ç¶²ç¶±ç¶ºç¶¢ç¶¿ç¶µç¶¸ç¶ç·ç·ç¶¬ï¿½".split("");for(a=0;a!=t[186].length;++a)if(t[186][a].charCodeAt(0)!==65533){r[t[186][a]]=47616+a;e[47616+a]=t[186][a]}t[187]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç½°ç¿ ç¿¡ç¿èèèè èèèèè ¿èè§èºèèèèèè¿èèèèè²èèè¸èèèè¼èèè¿èè»è¢è¥è´èèè·è©è£³è¤è£´è£¹è£¸è£½è£¨è¤è£¯èª¦èªèªèª£èªèª¡èªèª¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½èªªèª¥èª¨èªèªèªèª§è±ªè²è²è³è³è³èµ«è¶è¶è·¼è¼è¼è¼è¼è¾£é ééé£ééé¢éééééé µé ¸é ·é ´é¸éé ééé»ééé¨é¼éé¡é¨é©é£é¥é¤ééééééé¼é é¶é é 颯颱é¤é¤ é¤é¤é§éª¯éª°é«¦éé鳴鳶鳳麼鼻é½ååå»åµå¹åååå å�".split("");for(a=0;a!=t[187].length;++a)if(t[187][a].charCodeAt(0)!==65533){r[t[187][a]]=47872+a;e[47872+a]=t[187][a]}t[188]="����������������������������������������������������������������åååååå°å²å®å»å¹å²å¿å´å©åååå´å¶å¯å°å¢å¢å¢å¢³å¢å¢®å¢©å¢¦å¥å¬å«»å¬å«µå¬å¬å¯®å¯¬å¯©å¯«å±¤å±¥å¶å¶å¹¢å¹å¹¡å»¢å»å»å»å»£å» å½å½±å¾·å¾µæ ¶æ §æ ®æ æ æï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ ¼æ °æ «æ ¾æ§ææ«ææ¬ææ¤ææ®æ®æ©æ¯æ¹ææ²æææ°æ¥æææ©ææ®ææ«ææ¬ææ¢æ³æµæ·æ¸æ®æ«æ´æ±æ¨£æ¨æ§¨æ¨æ¨æ¨æ§½æ¨¡æ¨æ¨æ§³æ¨æ¨ æ§æ¨æææ®¤æ¯ æ¯æ¼¿æ½¼æ¾æ½æ½¦æ½æ¾æ½æ½æ½¸æ½®æ¾æ½ºæ½°æ½¤æ¾æ½æ»æ½¯æ½ æ½çç¬ç±ç¨ççççç©çç�".split("");for(a=0;a!=t[188].length;++a)if(t[188][a].charCodeAt(0)!==65533){r[t[188][a]]=48128+a;e[48128+a]=t[188][a]}t[189]="����������������������������������������������������������������ç¾çç¿ç ç©çç¤ç¦ç¡ç¢ççºç¤çççççç£ç£ 確ç£ç¢¾ç£ç¢¼ç£ç¨¿ç¨¼ç©ç¨½ç¨·ç¨»çª¯çª®ç®ç®±ç¯ç®´ç¯ç¯ç¯ç® ç¯ç³ç· 練緯緻ç·ç·¬ç·ç·¨ç·£ç·ç·ç·©ç¶ç·ç·²ç·¹ç½µç½·ç¾¯ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç¿©è¦èèèè èèèè½èè®è¬èèèè£è¡èè¬è¥è¿èèè´è¶è è¦è¸è¨èèèèè¡è¡è¤è¤è¤è¤è¤è¤èª¼è«è«è«èªè«è«¸èª²è«è«èª¿èª°è«è«èª¶èª¹è«è±è±è±¬è³ è³è³¦è³¤è³¬è³è³¢è³£è³è³ªè³¡èµè¶è¶£è¸«è¸è¸è¸¢è¸è¸©è¸è¸¡è¸èººè¼è¼è¼è¼©è¼¦è¼ªè¼è¼ï¿½".split("");for(a=0;a!=t[189].length;++a)if(t[189][a].charCodeAt(0)!==65533){r[t[189][a]]=48384+a;e[48384+a]=t[189][a]}t[190]="����������������������������������������������������������������輥é©é®é¨éé·é°éé§é±ééééé é»é·éªé¬é¤éé³é¼ééé°é²éé±ééééé éééé ¡é «é 颳é¤é¤é¤é¤é§é§é§é§é§é§é§é§éª·é«®é«¯é¬§é éé·é¯é´é´ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é´éº©éº¾é»å¢¨é½åååååååªåååå³åå«å¹å©å¤å¸åªå¨å¥å±å¯å¬å¢å¶å£å¢¾å£å£ 奮å¬å¬´å¸å¯°å°å½æ²ææ©æææ¶æ¾æææ°æ æææ»æ¼ææææææ¿æææ¾æ´æææ¹æææ¸æ¨½æ¨¸æ¨ºæ©æ©«æ©æ¨¹æ©æ©¢æ©¡æ©æ©æ¨µæ©æ©ææ·æ° æ¿æ¾±æ¾¡ï¿½".split("");for(a=0;a!=t[190].length;++a)if(t[190][a].charCodeAt(0)!==65533){r[t[190][a]]=48640+a;e[48640+a]=t[190][a]}t[191]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¿æ¾¤æ¿æ¾§æ¾³æ¿æ¾¹æ¾¶æ¾¦æ¾ æ¾´ç¾çççççç¹çççççç¨çç£çççç¢ççç´ç¸çºç§ç¥ç ççç¥ç£¨ç£ç£¬ç£§ç¦¦ç©ç©ç©ç©ç©çªºç¯ç°ç¯ç¯¤ç¯ç¯¡ç¯©ç¯¦ç³ç³ç¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç¸ç¸ç¸ç¸£ç¸ç¸ç¸ç¸ç½¹ç¾²ç¿°ç¿±ç¿®è¨è³è©è¨è»èèèèèèè¨è©èèèèªèèèèè¢è衡褪褲褥褫褡親覦諦諺諫諱è¬è«è«§è«®è«¾è¬è¬è«·è«è«³è«¶è«¼è±«è±è²è³´è¹è¸±è¸´è¹è¸¹è¸µè¼»è¼¯è¼¸è¼³è¾¨è¾¦éµé´é¸é²é¼éºé´éé é¶é¸é³é¯é¢é¼é«éé�".split("");for(a=0;a!=t[191].length;++a)if(t[191][a].charCodeAt(0)!==65533){r[t[191][a]]=48896+a;e[48896+a]=t[191][a]}t[192]="����������������������������������������������������������������éé¦é¡éé®éé»é§é¨éªéééééééééé¦éé °é ¸é »é ·é é ¹é ¤é¤é¤¨é¤é¤é¤¡é¤é§é§¢é§±éª¸éª¼é«»é«é¬¨é®é´é´£é´¦é´¨é´é´é»é»é¾é¾åªåå¡å²åµåååå å����������������������������������åå£å£å£å£å¬°å¬ªå¬¤åºå°·å±¨å¶¼å¶ºå¶½å¶¸å¹«å½å¾½ææææ¦ææ²æ´ææææ æ°æ¦æ¬æ±æ¢ææææææªæªæªæª¢æªæ«æª£æ©¾æªæªæª ææ®®æ¯æ°æ¿æ¿±æ¿æ¿ æ¿æ¿¤æ¿«æ¿¯æ¾æ¿¬æ¿¡æ¿©æ¿æ¿®æ¿°ç§çç®ç¦ç¥çç¬ç´ç çµçç°ç²ç©ç°ç¦ç¨ççççªç³çªç°ç¬ï¿½".split("");for(a=0;a!=t[192].length;++a)if(t[192][a].charCodeAt(0)!==65533){r[t[192][a]]=49152+a;e[49152+a]=t[192][a]}t[193]="����������������������������������������������������������������ç§çç¯ç£·ç£ºç£´ç£¯ç¤ç¦§ç¦ªç©çª¿ç°ç°ç¯¾ç¯·ç°ç¯ ç³ ç³ç³ç³¢ç³ç³ç³ç¸®ç¸¾ç¹ç¸·ç¸²ç¹ç¸«ç¸½ç¸±ç¹ ç¹ç¸´ç¸¹ç¹ç¸µç¸¿ç¸¯ç½ç¿³ç¿¼è±è²è°è¯è³èèèºèèè¿è½èè¾è¨èè±èªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½èè¾èèèè¯èèè¨èè§èèè³èèè«è»èºèè褻褶è¥è¤¸è¤½è¦¬è¬è¬è¬è¬è¬è¬ è¬è¬è¬è±è°¿è±³è³ºè³½è³¼è³¸è³»è¶¨è¹è¹è¹è¹è½è¼¾è½è½ 輿é¿é½ééééé¹é£ééééé¨éµéé¥ééé¾é¬éé°éééééééé±é¸éééé éé¡é¢¶é¤µé¨ï¿½".split("");for(a=0;a!=t[193].length;++a)if(t[193][a].charCodeAt(0)!==65533){r[t[193][a]]=49408+a;e[49408+a]=t[193][a]}t[194]="����������������������������������������������������������������駿鮮鮫鮪é®é´»é´¿éºé»é»é»é»é»é¼¾é½å¢åå®å£å£å¬¸å½æ£æ³æ´æ²æ¾ææºæ»æ·æ·ææ¦æª³æª¬æ«æª»æª¸æ«æª®æª¯ææ¸æ®¯ççæ¿¾ç濺ççç»ç¼ç¾ç¸ç·çµç§ç¿ççç����������������������������������çç½ç¿ç»ç¼ç¤ç¦®ç©¡ç©¢ç© ç«ç« ç°«ç°§ç°ªç°ç°£ç°¡ç³§ç¹ç¹ç¹ç¹ç¹¡ç¹ç¹ç½ç¿¹ç¿»è·è¶èèèèè©èèèè°èºè¹è¦è¯è¬è²è è¦è¦²è§´è¬¨è¬¹è¬¬è¬«è±è´ è¹è¹£è¹¦è¹¤è¹è¹è»è½è½éééé«é¬ééééé¢é³é®é¬é°éééééééé¢ééééé¤é£é¦ï¿½".split("");for(a=0;a!=t[194].length;++a)if(t[194][a].charCodeAt(0)!==65533){r[t[194][a]]=49664+a;e[49664+a]=t[194][a]}t[195]="����������������������������������������������������������������éé¹é¡é¡é¡é¡é¡é¢ºé¤¾é¤¿é¤½é¤®é¦¥é¨é«é¬é¬éééé¯é¯é¯½é¯é¯éµéµéµ é» é¼é¼¬å³å¥å£å£å£¢å¯µé¾å»¬æ²æ·æ¶æµæææ ææ«¥æ«æ«æ«ççç¨çççççççç¢ç¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½çºç½çç£çççç¡çç¤ç¦±ç©«ç©©ç°¾ç°¿ç°¸ç°½ç°·ç±ç¹«ç¹ç¹¹ç¹©ç¹ªç¾ 繳羶羹羸èè©èèªèè¤è¥è·è»è è è¹è¾è¥ è¥è¥è¥èèèèèèèèèè´è´è¹¼è¹²èºè¹¶è¹¬è¹ºè¹´è½è½è¾ééé±é®é¡éééééééé¢ééé¤éé¨éé´é£éªé§é¡éé»é¡ï¿½".split("");for(a=0;a!=t[195].length;++a)if(t[195][a].charCodeAt(0)!==65533){r[t[195][a]]=49920+a;e[49920+a]=t[195][a]}t[196]="����������������������������������������������������������������é¡é¡é¢¼é¥ é¥é¨é¨é¬é¯¨é¯§é¯é¯é¶éµ¡éµ²éµªéµ¬éºéºéºéº´å¸å¨å·å¶å´å¼å£¤ååå½å¯¶å·æ¸æºææææ¦æ§æ«¬ç¾ç°ç²çç»çç¢ç¥ç¤¦ç¤ªç¤¬ç¤«ç«ç«¶ç±ç±ç±ç³¯ç³°è¾®ç¹½ç¹¼ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½çºç½èèè¦è»è¹èèºèèèèè è 襤覺觸è°è¬è¦è¯èè«è´è´èºèºèº èºé´éééé½é¡é°é£é¥é¥é¦¨é¨«é¨°é¨·é¨µé°é°é¹¹éºµé»¨é¼¯é½é½£é½¡å·å¸åååå¤å±¬å·æ¼æ¾ææææ©æ«»æ¬æ«ºæ®²ççç§ççç©çç±çºçºç¾¼èèèè £è ¢è ¡è 襪襬覽è´ï¿½".split("");for(a=0;a!=t[196].length;++a)if(t[196][a].charCodeAt(0)!==65533){r[t[196][a]]=50176+a;e[50176+a]=t[196][a]}t[197]="����������������������������������������������������������������è·è½è´èºèºèºè½è¾¯éºé®é³éµéºé¸é²é«é¢é¸é¹é²é¿é¡§é¡¥é¥é© é©é©é¨¾é«ééé°é°¥é¶¯é¶´é·é¶¸éºé»¯é¼é½é½¦é½§å¼å»åååå¿å·å·å½æ¿æ¤æ¬æ¡çççç¤çç®ç¬ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç¦³ç± ç±è¾è½è襲襯觼è®è´è´èºèºè½¡é éééé½é¾ééé¡«é¥é©é©é«é¬é±é°±é°¾é°»é·é·é¼´é½¬é½ªé¾åå·ææ£æ«æªæ¬æ¬çç«ç±¤ç±£ç±¥çºçºçºè¢è¸è¿è ±è®ééé£é é¤é¨é¡¯é¥é©é©é©é«é«é«é±é±é±é·¥éºé»´å壩æ¬çç±ç²çç½ç¾è ¶è ¹è¡¢è®è®ï¿½".split("");for(a=0;a!=t[197].length;++a)if(t[197][a].charCodeAt(0)!==65533){r[t[197][a]]=50432+a;e[50432+a]=t[197][a]}t[198]="����������������������������������������������������������������è®è·è´ééªééééé¡°é©é¬¢éé±é·¹é·ºé¹¼é¹½é¼é½·é½²å»³æ¬ç£ç±¬ç±®è »è§èº¡éé²é°é¡±é¥é«é¬£é»ç¤çè®é·é驢驥çºè®èºªé é½é¾é¼é±·é±¸é»·è±é¿é¸ç¨é©ªé¬±é¸é¸ç±²ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[198].length;++a)if(t[198][a].charCodeAt(0)!==65533){r[t[198][a]]=50688+a;e[50688+a]=t[198][a]}t[201]="����������������������������������������������������������������ä¹ä¹åµååä¸ä¸ä¹äºåï¨å±®å½³ä¸åä¸ä¸®äºä»ä»ä»åå¼å¬å¹å å¤å¤¬å°å·¿æ¡æ®³æ¯æ°ç¿ä¸±ä¸¼ä»¨ä»ä»©ä»¡ä»ä»åååå¢å£å¤å¤¯å®å®å°å°»å±´å±³å¸åºåºå¿æææ°ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ°¶æ±æ°¿æ°»ç®ç°ç禸èéä¼ä¼ä¼¬ä»µä¼ä»±ä¼ä»·ä¼ä¼ä¼ä¼ ä¼¢ä¼ä¼ä»´ä¼å±åååå¦å¢ååååå¡åå®åªå´å¤¼å¦å¥¼å¦ 奻奾奷奿åå°å°¥å±¼å±ºå±»å±¾å·å¹µåºå¼å¼å½´å¿å¿å¿æææ¤æ¡æ¦æ¢ææ ææ¥æ¯æ®æ¾æ¹æ¸æ»æºæ¿æ¼æ³æ°æ±æ±æ±æ±æ±æ±æ±ï¿½".split("");for(a=0;a!=t[201].length;++a)if(t[201][a].charCodeAt(0)!==65533){r[t[201][a]]=51456+a;e[51456+a]=t[201][a]}t[202]="����������������������������������������������������������������æ±ç±çç´çµççªç¿ç©µç½è¸è¼èè½è¿è襾éééééé¢é¤é é£ä½ä¼»ä½¢ä½ä½ä½¤ä¼¾ä½§ä½ä½ä½ä½ä¼ä¼³ä¼¿ä½¡åå¹ååå¡åå®åå£å²ååå°å·åªåå ååå¥å����������������������������������å½ååå¨å¤åå®å§å¥åå ååååå¤å¥å¦¦å¦å¦ å¦å¦å¦¢å¦å¦å¦§å¦¡å®å®å°¨å°ªå²å²å²å²å²å²å²å²å²å²å· å¸å¸åºåºåºåºåºå¼ å¼å½¸å½¶å¿å¿å¿å¿å¿¨å¿®å¿³å¿¡å¿¤å¿£å¿ºå¿¯å¿·å¿»æå¿´æºæææææææ±æ»æºæ°æææ·æ½æ²æ´æ·æ°æ´æ³æ²æµæ æï¿½".split("");for(a=0;a!=t[202].length;++a)if(t[202][a].charCodeAt(0)!==65533){r[t[202][a]]=51712+a;e[51712+a]=t[202][a]}t[203]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æææææææææ¯æ°æ°æ±¸æ±§æ±«æ²æ²æ²æ±±æ±¯æ±©æ²æ±æ²æ²æ²æ±¦æ±³æ±¥æ±»æ²ç´çºç£ç¿ç½ççççºç ççççççºç¹ççç礽è´èèèèèèèè èèè����������������������������������èèè豸è¿è¾¿éé¡é¥éé§é é°é¨é¯é丳ä¾ä½¼ä¾ ä½½ä¾ä¾ä½¶ä½´ä¾ä¾ä½·ä½ä¾ä½ªä¾ä½¹ä¾ä½¸ä¾ä¾ä¾ä¾ä¾ä¾ä¾ä½«ä½®åå¼å¾åµå²å³åå±å¼ååå¼åååå¿ååååå«åºå¾å¥å¬å´å¦åå¯å¡å åå£å§å¤å·å¹å¯å²åå«å±å°å¶ååµå»å³å´å¢ï¿½".split("");for(a=0;a!=t[203].length;++a)if(t[203][a].charCodeAt(0)!==65533){r[t[203][a]]=51968+a;e[51968+a]=t[203][a]}t[204]="����������������������������������������������������������������å¨å½å¤å¥ 妵妺å§å§å¦²å§å§å¦¶å¦¼å§å§å¦±å¦½å§å§å¦´å§å¢å¥å®å®å±å±å²®å²¤å² 岵岯岨岬å²å²£å²å²¢å²ªå²§å²å²¥å²¶å²°å²¦å¸å¸å¸å¼¨å¼¢å¼£å¼¤å½å¾å½¾å½½å¿å¿¥ææ¦ææ²æï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ´æææ³æææ¬æ¢æææ®æææææææ½ææ´ææ¾æªæ¶ææ®æ³æ¯æ»æ©æ°æ¸æ½æ¨æ»ææ¼ææææ»ææææ æ½æææ¶ææ æ¬æææ¶æ»ææææ´æææºæææææ½ææ¸æ¹ææ¬¥æ®æ¾æ¯æ°æ²æ³¬æ³«æ³®æ³æ²¶æ³æ²æ³§æ²·æ³æ³æ²ºæ³æ³æ³æ³²ï¿½".split("");for(a=0;a!=t[204].length;++a)if(t[204][a].charCodeAt(0)!==65533){r[t[204][a]]=52224+a;e[52224+a]=t[204][a]}t[205]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ³æ³æ²´æ²æ²æ²æ³æ³æ´°æ³æ³æ²°æ³¹æ³æ³©æ³ççç çççççççççªççççççççççç¤ç¡çç¦ç¢ç ç¬ççç¨ç¿çç¾ççç¯ç³ç±ç°çµç¸ç¼ç¹ç»çºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç·ç¥ç¤¿ç§ 穸穻竻籵糽èµèè®è£è¸èµèè è èè«èèèèµè§è®è¼èèºè´è¨è¡è©èè¤èè¶è¢è°è¯èè®è±è¿è¿è¿è¿è¿è¿è¿é²é´é¯é³é°é¹é½é¼éºéä¿ä¿ ä¿ä¾²ä¿ä¿ä¿ä¿ä¿ä¿ä¾»ä¾³ä¿ä¿ä¿ä¾ºä¿ä¾¹ä¿¬ååååå½å¼åååååºå¡åå¥å�".split("");for(a=0;a!=t[205].length;++a)if(t[205][a].charCodeAt(0)!==65533){r[t[205][a]]=52480+a;e[52480+a]=t[205][a]}t[206]="����������������������������������������������������������������åèå·å®åå¶å åå å°å¼å¢å¾å²åå°åµååå¤ååååååååå¥åå壴å¤å¥å§¡å§å§®å¨å§±å§å§ºå§½å§¼å§¶å§¤å§²å§·å§å§©å§³å§µå§ 姾姴å§å®¨å±å³å³å³å³å³å³ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å³å³å³å³å³å³å³å³å³å³å³å³å³å³¸å·¹å¸¡å¸¢å¸£å¸ 帤庰庤庢åºåº£åº¥å¼å¼®å½å¾æ·æ¹ææ²ææ æææææææææ¤æææ¦æ®ææææææµæææ«æ¹æææ¸æ¶ææææºææ»æ°æææªæ¿æ¶æ¡æ²æµææ¦æ¢æ³æ«æºææ´æ¹æ®ææææ²ææºï¿½".split("");for(a=0;a!=t[206].length;++a)if(t[206][a].charCodeAt(0)!==65533){r[t[206][a]]=52736+a;e[52736+a]=t[206][a]}t[207]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææ»æ¸æææ·æ æ«æ¤ææµææ³æ·æ¶æ®æ£ææ¹ææ§æ°æ²æ¼ææææ®æ¦ææºææææªææ¬¨æ®æ®æ®¶æ¯æ¯æ¯ æ° æ°¡æ´¨æ´´æ´æ´æ´¼æ´¿æ´æ´æ³æ´³æ´æ´æ´ºæ´æ´æ´æ´æµï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ´æ´æ´·æ´æ´æµæ´æ´ æ´¬æ´æ´¢æ´æ´ç·çç¾ç±ç°ç¡ç´çµç©çççç¬ç°ç³ç®çç¤ç¨ç«ççªç¦ç£ç çççç ç¹ç¶çµç´ç«ç¿çç¾ççç¸çç¬ç®ç®ççç§çªç¹ççççç çç·ç»çºç§ç¨ç ç ç ç ç ç ç ç ç ç ç¥ç¥ç¥ç¥ ç¥ç§ç§ç§ç§ç§çªï¿½".split("");for(a=0;a!=t[207].length;++a)if(t[207][a].charCodeAt(0)!==65533){r[t[207][a]]=52992+a;e[52992+a]=t[207][a]}t[208]="����������������������������������������������������������������穾ç«ç¬ç¬ç±ºç±¸ç±¹ç±¿ç²ç²ç´ç´ç´ç½ç¾ç¾ç¾¾èèèèè·èèè èèèèè è£èèèèèèèè¦èè¿è¡èèè¾è¹èè¨èèèºè«èè´è¬è¡è²èµèè»è¶è°èªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è¤è èºè³èè·è´è¼è³è¡è¡è¡§è¡ªè¡©è§è¨è¨èµ²è¿£è¿¡è¿®è¿ é±é½é¿éé é¾éééééééééééåå ååå¢å°å俵俴å³å·å¬ä¿¶ä¿·ååå å§åµå¯å±åå ååååå ååå¡åååååå¢åååå¦å¢ååå§å³å¤åå¿ååå«åå å±ï¿½".split("");for(a=0;a!=t[208].length;++a)if(t[208][a].charCodeAt(0)!==65533){r[t[208][a]]=53248+a;e[53248+a]=t[208][a]}t[209]="����������������������������������������������������������������åå»å·å¸å ååååååå ²åååºåå½å¼å¸å¶å¿ååå¹åå¤å¥å¨å¨å¨å¨®å¨å¨å¨å¨å¨å¨³å¬å®§å®å®¬å°å±å±å³¬å³¿å³®å³±å³·å´å³¹å¸©å¸¨åº¨åº®åºªåº¬å¼³å¼°å½§æææ§ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ææ¢æææææææææææææææ²æææ¬ææ æ¶ææ¤æ¹æææ¼æ©ææ´ææææææ³æææ¸ææææææææææææææææ æ æ¡æ ²æ ³æ »æ¡æ¡æ æ ±æ æ µæ «æ æ ¯æ¡æ¡æ ´æ æ æ æ ¦æ ¨æ ®æ¡æ ºæ ¥æ æ¬¬æ¬¯æ¬æ¬±æ¬´æèæ®æ¯¦æ¯¤ï¿½".split("");for(a=0;a!=t[209].length;++a)if(t[209][a].charCodeAt(0)!==65533){r[t[209][a]]=53504+a;e[53504+a]=t[209][a]}t[210]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¯¨æ¯£æ¯¢æ¯§æ°¥æµºæµ£æµ¤æµ¶æ´æµ¡æ¶æµæµ¢æµæµ¯æ¶æ¶æ·¯æµ¿æ¶æµæµ§æµ æ¶æµ°æµ¼æµæ¶æ¶æ´¯æµ¨æ¶æµ¾æ¶æ¶æ´æ¶æµ»æµ½æµµæ¶çççççç¼¹ç¢çççç ççç ççççç¡çç¸ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç·ç¶ççºç´ç¾ç¶ç³ç»çççç¥çç¼ç§ç£ç©ççççççççç¨ççç´çµç¡ççç°çç»ççç¿ç¶çºçççççççç£ççççç¢ç§ç £ç ¬ç ¢ç µç ¯ç ¨ç ®ç «ç ¡ç ©ç ³ç ªç ±ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç§«ç§¬ç§ ç§®ç§ç§ªç§ç§ç§çªçªçª çªçªçªçªç«ç¬ï¿½".split("");for(a=0;a!=t[210].length;++a)if(t[210][a].charCodeAt(0)!==65533){r[t[210][a]]=53760+a;e[53760+a]=t[210][a]}t[211]="����������������������������������������������������������������ç¬ç¬ç¬ ç¬ç¬ç¬ç¬ç¬ç¬ç²ç²ç²ç²ç²ç²ç² ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ç´ç½ç½¡ç½ç½ ç½ç½ç¾ç¾ç¿ç¿ç¿èè¾è¹èºè²è¹èµèè»èèè¯è¥è³èèèèè¥èè¿èè¦èè¢ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½èèèèªèè¼èèè¤è è·è¯è©èè èèèè¬èè§èèèè¢è¨èèèèèèèèèè è¥èè¡è§èèèèèèè¡è¡è¡è¡µè¡¶è¡²è¢è¡±è¡¿è¡¯è¢è¡¾è¡´è¡¼è¨è±è±è±»è²¤è²£èµ¶èµ¸è¶µè¶·è¶¶è»è»è¿¾è¿µéè¿¿è¿»é迼迶éé ééé£éé¥ééééé¤é �".split("");for(a=0;a!=t[211].length;++a)if(t[211][a].charCodeAt(0)!==65533){r[t[211][a]]=54016+a;e[54016+a]=t[211][a]}t[212]="����������������������������������������������������������������é é éé¢éééé¼é££é«é¬¯ä¹¿å°åªå¡åå åååå²åååååå¢åå åå©å«å£å¤ååå®å³åååå«åå¬å®åååååµå¶å¼ååå´åªåå¢å¶åµå°åå ����������������������������������åå²å¥åå¹ååå»ååååå»å å¢å¶åå´å åå½å å¸å å³åå å®å£å²å¥å¬å¡å å¼å å§å å å±å©å°å å å¥å© å©å©å©§å©å¨¸å¨µå©å©å©å©¥å©¬å©å©¤å©å©å©å©å©å©å©åªå¨¾å©å¨¹å©å©°å©©å©å©å©å©å©å²å®å¯å¯å±å´å´å´å´å´ å´å´¨å´å´¦å´¥å´ï¿½".split("");for(a=0;a!=t[212].length;++a)if(t[212][a].charCodeAt(0)!==65533){r[t[212][a]]=54272+a;e[54272+a]=t[212][a]}t[213]="����������������������������������������������������������������崰å´å´£å´å´®å¸¾å¸´åº±åº´åº¹åº²åº³å¼¶å¼¸å¾å¾å¾ææææ¾æ°æºææææ¤ææææ±ææ·ææ¿ææææ²æ¥æææ½æ½æææææ«ææ¯æææ®æ¯æµæææ®æ¼æ¤æ»æï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¸æ ææææ°æææ¥æ¡ææææ¢ææ¡¹æ¢æ¢æ¢æ¡æ¡®æ¢®æ¢«æ¥æ¡¯æ¢£æ¢¬æ¢©æ¡µæ¡´æ¢²æ¢æ¡·æ¢æ¡¼æ¡«æ¡²æ¢ªæ¢æ¡±æ¡¾æ¢æ¢æ¢æ¢ æ¢æ¢¤æ¡¸æ¡»æ¢æ¢æ¢æ¡½æ¬¶æ¬³æ¬·æ¬¸æ®æ®æ®æ®æ®æ°ªæ·æ¶«æ¶´æ¶³æ¹´æ¶¬æ·©æ·¢æ¶·æ·¶æ·æ¸æ·æ· æ·æ·æ¶¾æ·¥æ·æ·æ·æ·´æ·æ¶½æ·æ·°æ¶ºæ·æ·æ·æ·ï¿½".split("");for(a=0;a!=t[213].length;++a)if(t[213][a].charCodeAt(0)!==65533){r[t[213][a]]=54528+a;e[54528+a]=t[213][a]}t[214]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ·æ·²æ·æ·½æ·æ·æ·£æ¶»çºçç·çç´çç°çç³çç¼ç¿çççç¸ç¶çççç¾ç»ç¼ç¿çççççççç¿çççç¶ç¸çµççç½çççºç¼ç¿ççç´çç¤ç£ççç����������������������������������çççççççç¹ç¯çç±ç²ç´ç³ç½ç¥ç»çµç¡ç¡ç¡ç¡ç¡ç¡ç ¦ç¡ ç¡ç¥¤ç¥§ç¥©ç¥ªç¥£ç¥«ç¥¡ç¦»ç§ºç§¸ç§¶ç§·çªçªçªç¬µç笴笥笰笢笤笳ç¬ç¬ªç¬ç¬±ç¬«ç¬ç¬¯ç¬²ç¬¸ç¬ç¬£ç²ç²ç²ç²£ç´µç´½ç´¸ç´¶ç´ºçµ 紬紩çµçµç´¾ç´¿çµç´»ç´¨ç½£ç¾ç¾ç¾ç¾ç¿ç¿ç¿ç¿ç¿ç¿ç¿ç¿è�".split("");for(a=0;a!=t[214].length;++a)if(t[214][a].charCodeAt(0)!==65533){r[t[214][a]]=54784+a;e[54784+a]=t[214][a]}t[215]="����������������������������������������������������������������èèèèèèè¥èèèèè¬èè¡èè§èè¢èè¸è³èºè´è²è´èè£è¨èèºè³è¤è´èèèèèµèè©è½èèèèèªèè¾è¥è¯èèè°è¿è¦èè®è¶èèèè¿è·ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½èèè èºè°èè¹è³è¸èè´è»è¼èè½è¾è¡è¢è¢è¢¨è¢¢è¢ªè¢è¢è¢¡è¢è¢è¢§è¢è¢è¢è¢¤è¢¬è¢è¢è¢è¦è§è§è§è¨°è¨§è¨¬è¨è°¹è°»è±è±è±½è²¥èµ½èµ»èµ¹è¶¼è·è¶¹è¶¿è·è»è»è»è»è»è» 軡é¤ééééé¡é¯éªé°é´é²é³éé«é¬é©é é é é é é¬é´é±é³é¸é¤é¹éªï¿½".split("");for(a=0;a!=t[215].length;++a)if(t[215][a].charCodeAt(0)!==65533){r[t[215][a]]=55040+a;e[55040+a]=t[215][a]}t[216]="����������������������������������������������������������������é«é·é¨é®éºééé¼éé«é±é¯é¿éªé 飥é¦åååååå£ååååå¨ååååå åååå¤å§åå¨å¥åå·å å¢ååååµåå£åå¤å½åå¦å¿åå¡ååå ©å ·ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å å å §å £å ¨åµå¡å ¥å å å ³å ¿å ¶å ®å ¹å ¸å å ¬å »å¥¡åª¯åªåªå©ºåª¢åªå©¸åª¦å©¼åª¥åª¬åªåª®å¨·åªåªåªåªåªåª©å©»å©½åªåªåªåªåªå¯ªå¯å¯å¯å¯å¯å¯å°å°°å´·åµåµ«åµåµå´¿å´µåµåµåµå´³å´ºåµå´½å´±åµåµå´¹åµå´¸å´¼å´²å´¶åµåµ å¹å¹å½å¾¦å¾¥å¾«ææ¹ææ¢æææï¿½".split("");for(a=0;a!=t[216].length;++a)if(t[216][a].charCodeAt(0)!==65533){r[t[216][a]]=55296+a;e[55296+a]=t[216][a]}t[217]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ²æææ æµææ¸æ¼æ¾ææææææ¿æææææ±æ°ææ¥æ¨æ¯æææ³ææ æ¶ææ²æµæ¡ææ¾æææææææææææ°æææ²æ§æªæ¤ææ¨æ¥ææææ®ææï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¼æ¬æ»ææ±æ¹æªæ²ææ¤æ£æ¤æ£æ¤ªæ£¬æ£ªæ£±æ¤æ£æ£·æ£«æ£¤æ£¶æ¤æ¤æ£³æ£¡æ¤æ£æ¤æ¥°æ¢´æ¤æ£¯æ£æ¤æ£¸æ£æ£½æ£¼æ£¨æ¤æ¤æ¤æ£æ£æ£æ£æ£¦æ£´æ£æ¤æ£æ£©æ¤æ¤¥æ£æ¬¹æ¬»æ¬¿æ¬¼æ®æ®æ®æ®æ®½æ¯°æ¯²æ¯³æ°°æ·¼æ¹æ¹æ¸æ¹æºæ¸¼æ¸½æ¹ æ¹¢æ¸«æ¸¿æ¹æ¹æ¹³æ¸æ¸³æ¹æ¹æ¹æ¸»æ¸æ¸®æ¹ï¿½".split("");for(a=0;a!=t[217].length;++a)if(t[217][a].charCodeAt(0)!==65533){r[t[217][a]]=55552+a;e[55552+a]=t[217][a]}t[218]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¹¨æ¹æ¹¡æ¸±æ¸¨æ¹ æ¹±æ¹«æ¸¹æ¸¢æ¸°æ¹æ¹¥æ¸§æ¹¸æ¹¤æ¹·æ¹æ¹¹æ¹æ¹¦æ¸µæ¸¶æ¹ç çç¯ç»ç®ç±ç£ç¥ç¢ç²çç¨çºççççççç çççç°ç¢ç±ç³ç§ç²çç¦ç£çµçç®ç¬ç°ç«ç����������������������������������çç¡çç±ç¤ç£çç©ç ç²ç»ç¯ç¯ç¬ç§çç¡ç¦ççç¤ççççççççç çççççç¬ç¡ 硤硥ç¡ç¡ç¡±ç¡ªç¡®ç¡°ç¡©ç¡¨ç¡ç¡¢ç¥´ç¥³ç¥²ç¥°ç¨ç¨ç¨ç¨ç¨çªç«¦ç«¤ç笻ççççççç ç²¢ç²ç²¨ç²¡çµçµ¯çµ£çµçµçµ§çµªçµçµçµçµ«çµçµçµ©çµçµçµç¼¾ç¼¿ç½¥ï¿½".split("");for(a=0;a!=t[218].length;++a)if(t[218][a].charCodeAt(0)!==65533){r[t[218][a]]=55808+a;e[55808+a]=t[218][a]}t[219]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç½¦ç¾¢ç¾ ç¾¡ç¿èèèè¾èè è è è è è½è èºè¦è®è·è¸è¹èè¼è½è¿èµè»èè¹è£èè¨èè§è¤è¼è¶èèèè«è£è¿èèè¥èè¿è¡èèèèµèèèèèèèè³ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½èèºèèèªèèè¬è®èè»èè¢èèè¾èè¢è¦èè£èèªèè«èè¬è©èè¨èè¡è¡è¡è¢ºè£è¢¹è¢¸è£è¢¾è¢¶è¢¼è¢·è¢½è¢²è¤è£è¦è¦è¦è§è§è§è©è©è¨¹è©è©è©è©è©è© è©è©è©è©è©è©è±è²è²è²ºè²¾è²°è²¹è²µè¶è¶è¶è·è·è·è·è·è·è·è·è·è·è·è· 軯軷軺�".split("");for(a=0;a!=t[219].length;++a)if(t[219][a].charCodeAt(0)!==65533){r[t[219][a]]=56064+a;e[56064+a]=t[219][a]}t[220]="����������������������������������������������������������������軹軦軮軥軵軧軨軶軫軱軬軴軩éé´é¯éé¬éé¿é¼éé¹é»éééé éé ¡é ¤é é ¢é ééé¥ééé¦ééééé¿é½ééé§ééé¤ééé éé»ééééé¾é����������������������������������ééééééé±é°é¬é°é®é 颩飫鳦黹äºäºäº¶å½å¿åå®ååå´ååå°ååºå±ååå¶å¸ååºå¸å»å¼ååååååååååå©å¿ååååå¢ååå²ååååå¡å¡¨å¡¤å¡å¡å¡å¡¯å¡å¡å¡å¡å¡¥å¡å ½å¡£å¡±å£¼å«å«å«åªºåª¸åª±åªµåª°åª¿å«åª»å«ï¿½".split("");for(a=0;a!=t[220].length;++a)if(t[220][a].charCodeAt(0)!==65533){r[t[220][a]]=56320+a;e[56320+a]=t[220][a]}t[221]="����������������������������������������������������������������媷å«å«åª´åª¶å«åª¹åªå¯å¯å¯å°å°³åµ±åµ£åµåµ¥åµ²åµ¬åµåµ¨åµ§åµ¢å·°å¹å¹å¹å¹å¹å» å»å»å»å»å½å¾¯å¾æ·æ æ æ«æ æ¶æ²æ®æ æ¯æ æ©æ æ é ¨æ£æ¥æ¤æ æ±æ«ææææ æ¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ³æææææ¹æ·æ¢æ£ææ¦æ°æ¨ææµæ¯ææææ¥æ§ææ§ææ®æ¡ææ¯æææææææææææ¸æ æ¥¦æ¥æ¤¸æ¥æ¥¢æ¥±æ¤¿æ¥ æ¥ªæ¤¹æ¥æ¥æ¥æ¥ºæ¥æ¥æ¤µæ¥¬æ¤³æ¤½æ¥¥æ£°æ¥¸æ¤´æ¥©æ¥æ¥¯æ¥æ¥¶æ¥æ¥æ¥´æ¥æ¤»æ¥æ¤·æ¥æ¥æ¥æ¤²æ¥æ¤¯æ¥»æ¤¼ææ æææææ®ï¨æ¯»æ¯¼ï¿½".split("");for(a=0;a!=t[221].length;++a)if(t[221][a].charCodeAt(0)!==65533){r[t[221][a]]=56576+a;e[56576+a]=t[221][a]}t[222]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¯¹æ¯·æ¯¸æºæ»æ»æºæ»æºæºæºæº æº±æº¹æ»æ»æº½æ»æºæ»æº·æº°æ»æº¦æ»æº²æº¾æ»æ»æ»æºæºæºæºæº¤æº¡æº¿æº³æ»æ»æºæº®æº£ç ç ç ç £ç ç ç ç ¢ç ²ç ¸ç ªç ¡ç ç ç ç ç °ç ç ç ����������������������������������ç ç ç ççççççç¼çç»çºçççççççççççççççççç¡ç¿ç¾ç½çç¹ç·æ¦ç¯ççç·ç¾ç¼ç¹ç¸çç»ç¶ççµç½ççµçççç çççç©ç§çççç ç¢ç¢ç¢ç¢ç¢ç¢ç¢ ç¢ç¢¡ç¢ç¡¹ç¢ç¢ç¢ç¡»ç¥¼ç¦ç¥½ç¥¹ç¨ç¨ç¨ç¨ç¨ç¨ç¨¢ç¨ï¿½".split("");for(a=0;a!=t[222].length;++a)if(t[222][a].charCodeAt(0)!==65533){r[t[222][a]]=56832+a;e[56832+a]=t[222][a]}t[223]="����������������������������������������������������������������ç¨ç¨çª£çª¢çªç««ç¦ç¤çç´ç©ç²ç¥ç³ç±ç°ç¡ç¸ç¶ç£ç²²ç²´ç²¯ç¶ç¶ç¶ç¶çµ¿ç¶ 絺ç¶çµ»ç¶çµ¼ç¶ç¶ç¶çµ½ç¶ç½ç½«ç½§ç½¨ç½¬ç¾¦ç¾¥ç¾§ç¿ç¿è¡è ¤è è ·è è ©è è ¢è ²æ¡è è ¶è §è ¯ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è è ¡èèèèèè è±è¿èè¶è¹èèè¥èèèè§è°èè½èèè´è³èèèè·èºè´èºèè¸è²è è©èèè¯èèèè°è¹èèèè¯è èè»èè¶è³è¨è¾èè«è èè®èèèè·èèºèèµèè¸èèèè¶èè è£è£è£è£è£è£è£è£è£è¦ è¦è§è§¥è§¤ï¿½".split("");for(a=0;a!=t[223].length;++a)if(t[223][a].charCodeAt(0)!==65533){r[t[223][a]]=57088+a;e[57088+a]=t[223][a]}t[224]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è§¡è§ è§¢è§è§¦è©¶èªè©¿è©¡è¨¿è©·èªèªè©µèªèªè©´è©ºè°¼è±è±è±¥è±¤è±¦è²è²è² è³èµ¨èµ©è¶è¶è¶è¶è¶è¶è¶è¶è¶è·°è· 跬跱跮è·è·©è·£è·¢è·§è·²è·«è·´è¼è»¿è¼è¼è¼ è¼è¼è¼è¼éé¿ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ééé½ééééééééé ®é ¯ééé°éºé¦é³é¥ééé®éééé¬éé é§é¯é¶é¡é°é±éé£éé²ééééé²ééééééééééºé½é¸éµé³é·é¸é²é é é 颬飶飹馯馲馰馵éªéª«é鳪é³é³§éºé»½å¦ååå¨å³ååªåå¤åå¬å°å¯å£å �".split("");for(a=0;a!=t[224].length;++a)if(t[224][a].charCodeAt(0)!==65533){r[t[224][a]]=57344+a;e[57344+a]=t[224][a]}t[225]="����������������������������������������������������������������åååå©å«å°å¬å§åååå¼ååååååºååå¿å¹å¢å¡¼å¢å¢å¢å¢å¡¿å¡´å¢å¡ºå¢å¢å¢å¡¶å¢å¢å¡»å¢å¢å£¾å¥«å«å«®å«¥å«å«ªå«å«å««å«³å«¢å« å«å«¬å«å«å«å«¨å«å·å¯ ����������������������������������寣屣å¶å¶åµ½å¶åµºå¶åµ·å¶å¶å¶åµ¾åµ¼å¶åµ¹åµ¿å¹å¹å¹å»å»å»å»å»å»å»å»å»å½å½å½¯å¾¶æ¬æ¨æ æ æ ±æ ³æ æ æ ²æ ¬ææ ´æ æ ºæ æ ¥æ»æ ªæ ¡æ æ©æ§æ«æ«ææææ´æ¶æ²æ³æ½æµæ¦æ¦æææææææ ææ¿æ¿æ¬æ«ææ¥æ·æ³æ æ¡æ ææ ææ¢æ¦±æ¦¶æ§ï¿½".split("");for(a=0;a!=t[225].length;++a)if(t[225][a].charCodeAt(0)!==65533){r[t[225][a]]=57600+a;e[57600+a]=t[225][a]}t[226]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¦ æ§æ¦æ¦°æ¦¬æ¦¼æ¦æ¦æ¦æ¦§æ¦æ¦©æ¦¾æ¦¯æ¦¿æ§æ¦½æ¦¤æ§æ¦¹æ§æ¦æ§æ¦³æ¦æ¦ªæ¦¡æ¦æ§æ¦æ¦æ§æ¦µæ¦¥æ§ææææ®æ®æ® æ¯æ¯æ¯¾æ»æ»µæ»±æ¼æ¼¥æ»¸æ¼·æ»»æ¼®æ¼æ½æ¼æ¼æ¼§æ¼æ¼»æ¼æ»æ¼ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¼¶æ½³æ»¹æ»®æ¼æ½æ¼°æ¼¼æ¼µæ»«æ¼æ¼æ½æ¼ æ»½æ»¶æ¼¹æ¼æ»¼æ¼ºæ¼æ¼æ¼æ¼æ¼¡ççççç ççç »ççççççççççççç¢ç³ç±çµç²ç§ç®çççç½ççççççççç¸çç¼ç çç®çç¯ç¾ç碲碪碴ç¢ç¢¨ç¡¾ç¢«ç¢ç¢¥ç¢ 碬碢碤ç¦ç¦ç¦ç¦ç¦ç¦ç¦ï¿½".split("");for(a=0;a!=t[226].length;++a)if(t[226][a].charCodeAt(0)!==65533){r[t[226][a]]=57856+a;e[57856+a]=t[226][a]}t[227]="����������������������������������������������������������������ç¦ç¦ç¦ç¦ç¨«ç©ç¨°ç¨¯ç¨¨ç¨¦çª¨çª«çª¬ç«®ç®ç®ç®ç®ç®ç®ç®ç®ç®ç®ç® ç®åç®ç®¤ç®ç²»ç²¿ç²¼ç²ºç¶§ç¶·ç·ç¶£ç¶ªç·ç·ç· ç¶ç·ç·ç·ç·ç·ç¶¯ç¶¹ç¶ç¶¼ç¶ç¶¦ç¶®ç¶©ç¶¡ç·ç½³ç¿¢ç¿£ç¿¥ç¿ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è¤èèèèèèèèèèèè¤è¡èèºèèè¬è®è«è¹è´èèèªèè±èèè§è»è¢èèèèè©è¯è¨èèè¶èè èèèèè°èè¡è³è£è¨è«èè®èè¡èèèè¬èè¾èè è²èªèè¼èèºè±èµèè¦è§è¸è¤èè°è裷裧裱裲裺裾裮裼裶裻�".split("");for(a=0;a!=t[227].length;++a)if(t[227][a].charCodeAt(0)!==65533){r[t[227][a]]=58112+a;e[58112+a]=t[227][a]}t[228]="����������������������������������������������������������������裰裬裫è¦è¦¡è¦è¦è§©è§«è§¨èª«èªèªèªèªèªè°½è±¨è±©è³è³è³è¶è¸è¸è·¿è¸è·½è¸è¸è¸è¸è¸ è·¾è¸è¸è¼è¼è¼è¼é£éé é¢éééé¤é¡éé ºé ²é ¹é ³é¥é¤é¶ééºé ééªé����������������������������������é¦éé«é¹éé¿é£é®éééé¢é½éé¡ééééé§é¾éé©ééééé¡é¿éé½éºé¾éééé»ééé¿ééé é¢é¢®é¤é¤é¤é¦é¦é§é¦¹é¦»é¦ºé§é¦½é§éª±é«£é«§é¬¾é¬¿é é¡é鳱鳲鳵麧å¿åå°å¸ååå¶å¾ååå½åååå±å¯ååååµååååå�".split("");for(a=0;a!=t[228].length;++a)if(t[228][a].charCodeAt(0)!==65533){r[t[228][a]]=58368+a;e[58368+a]=t[228][a]}t[229]="����������������������������������������������������������������ååå³å½å¬å¾å¸åªåºå墫å¢å¢±å¢ 墣墯墬墥墡壿嫿嫴嫽嫷嫶å¬å«¸å¬å«¹å¬å¬å¬ å¬å±§å¶å¶å¶å¶å¶¢å¶å¶å¶ å¶å¶¡å¶å¶å¹©å¹å¹ å¹ç·³å»å»å»¡å½å¾²æææ ¹æ±æ°æ¢æï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æææ¯ææææªæ¡ææ ¦æ³ææ®æ°ææ æ æææææææ£ææ¨æ±ææ¶æºæ¹æ»æ²æ³æµæ°æ©æ²æ·æªæ¯æ¨æ¨æ¨æ§¥æ§¸æ¨æ§±æ§¤æ¨ æ§¿æ§¬æ§¢æ¨æ¨æ§¾æ¨§æ§²æ§®æ¨æ§·æ§§æ©æ¨æ§¦æ§»æ¨æ§¼æ§«æ¨æ¨æ¨æ¨¥æ¨æ§¶æ¨¦æ¨æ§´æ¨ææ®¥æ®£æ®¢æ®¦æ°æ°æ¯¿æ°æ½æ¼¦æ½¾æ¾æ¿æ¾ï¿½".split("");for(a=0;a!=t[229].length;++a)if(t[229][a].charCodeAt(0)!==65533){r[t[229][a]]=58624+a;e[58624+a]=t[229][a]}t[230]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¾æ¾æ¾æ½¢æ½æ¾ æ½æ¾æ½¶æ½¬æ¾æ½æ½²æ½æ½æ½æ¾æ¾æ½æ¼æ½¡æ½«æ½½æ½§æ¾æ½æ¾æ½©æ½¿æ¾æ½£æ½·æ½ªæ½»ç²ç¯çç°ç çç©çµçç¥çç¤ç¡çªçç§ç³ççççççç ççç¡çç����������������������������������ç¢çççççç½ç çç¼ç¹ççç¾ç¥ççççç£çç¨çççççççççç£ç¢»ç£ç£ç£ç£ç£ç£ç£ç£ç£ç¦ç¦¡ç¦ ç¦ç¦¢ç¦æ¶ç¨¹çª²çª´çª³ç®·ç¯ç®¾ç®¬ç¯ç®¯ç®¹ç¯ç®µç³ ç³ç³ç³ç··ç·ç·ªç·§ç·ç·¡ç¸ç·ºç·¦ç·¶ç·±ç·°ç·®ç·ç½¶ç¾¬ç¾°ç¾ç¿ç¿«ç¿ªç¿¬ç¿¦ç¿¨è¤è§è£è�".split("");for(a=0;a!=t[230].length;++a)if(t[230][a].charCodeAt(0)!==65533){r[t[230][a]]=58880+a;e[58880+a]=t[230][a]}t[231]="����������������������������������������������������������������èèè¢èèèèèèèèèè¤è»èèè©èèèèèè§èè»è«èºèèè´èªè²èè·è«è³è¼èèªè©èè¾è¨èè®èè½èè¶è±è¦è§è¨è°è¯è¹èè è°èèè¯è¢ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½èè£è¤è·è¡è³èèèèè¡èèèèèªèèèèè¯è¬èºè®èè¥èè»èµè¢è§è©è¡è¤ è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¦¢è¦¤è¦£è§è§°è§¬è«è«èª¸è«è«è«è«èª»è«èª¾è«è« è«è«èªºèª½è«è°¾è±è²è³¥è³è³è³¨è³è³è³§è¶ è¶è¶¡è¶è¸ 踣踥踤踮è¸è¸è¸è¸è¸è¸¦è¸§ï¿½".split("");for(a=0;a!=t[231].length;++a)if(t[231][a].charCodeAt(0)!==65533){r[t[231][a]]=59136+a;e[59136+a]=t[231][a]}t[232]="����������������������������������������������������������������è¸è¸è¸è¸è¸è¸è¸è¼¬è¼¤è¼è¼è¼ è¼£è¼è¼é³é°é¯é§é«é¯é«é©éªé²é¦é®é éééééééééééé¶éé±ééé©éééé¯éé¨éééé¦éééé éé§éé����������������������������������éµé¡éé´é¼é¬é«é®é°é¤é¢éé ééééééééé é é ¦é ©é ¨é é é §é¢²é¤é£ºé¤é¤é¤é¤é¤é§é§é§é§é§é§é§é§é§é§é§é§éª³é«¬é««é«³é«²é«±ééé§é´é±é¦é¶éµé°é¨é¤é¬é³¼é³ºé³½é³¿é³·é´é´é³¹é³»é´é´ é´éºé»é¼é¼ååååååå´å¡å°å å®ï¿½".split("");for(a=0;a!=t[232].length;++a)if(t[232][a].charCodeAt(0)!==65533){r[t[232][a]]=59392+a;e[59392+a]=t[232][a]}t[233]="����������������������������������������������������������������å³å¦å£åå²åå·ååå£å¢½å£å¢¿å¢ºå£å¢¼å£å¬å¬å¬å¬¡å¬å¬å¬å¬å¬¨å¬å¬ å¬å¯¯å¶¬å¶±å¶©å¶§å¶µå¶°å¶®å¶ªå¶¨å¶²å¶å¶¯å¶´å¹§å¹¨å¹¦å¹¯å»©å»§å»¦å»¨å»¥å½å¾¼ææ¨ææ æ´ææææºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¿æ¸æææææææ½ææææ³ææ³æ¿æ¼æ¢ææ¾æææææ½æ»æºææ£æ¨´æ©¦æ©æ©§æ¨²æ©¨æ¨¾æ©æ©æ©¶æ©æ©æ¨¨æ©æ¨»æ¨¿æ©æ©ªæ©¤æ©æ©æ©æ©¯æ©©æ© æ¨¼æ©æ©æ©æ©æ©æ©ææææ®§æ®ªæ®«æ¯æ¯æ°æ°æ°æ¾æ¿æ¾£æ¿æ¾¼æ¿æ¿æ½æ¿æ¾½æ¾æ¿æ¾¨çæ¾¥æ¾®æ¾ºæ¾¬æ¾ªæ¿æ¾¿æ¾¸ï¿½".split("");for(a=0;a!=t[233].length;++a)if(t[233][a].charCodeAt(0)!==65533){r[t[233][a]]=59648+a;e[59648+a]=t[233][a]}t[234]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¾¢æ¿æ¾«æ¿æ¾¯æ¾²æ¾°ç çç¿ç¸ççççççççç½çç¼çççççç©ç¦ç§ç¬ç¥ç«çªç¿çç çççç¡ççç¯çç±ç½ç³ç¼çµç²ç°ç»ç¦ççç¡ççç¢ç£çç����������������������������������çç£ç£©ç£¥ç£ªç£ç££ç£ç£¡ç£¢ç£ç£ç£ 禤ç©ç©ç©çª¶çª¸çªµçª±çª·ç¯ç¯£ç¯§ç¯ç¯ç¯¥ç¯ç¯¨ç¯¹ç¯ç¯ªç¯¢ç¯ç¯«ç¯ç¯ç³ç³ç³ç³ç³ç¸ç¸¡ç¸ç¸ç¸ç¸ ç¸ç¸ç¸ç¸ç¸ç¸¢ç¸ç¸ç¸ç¸ç¸ç¸¥ç¸¤ç½ç½»ç½¼ç½ºç¾±ç¿¯èªè©è¬è±è¦è®è¹èµè«è°è¬è´è²è·è§è²èèèèè è«èèè¡è�".split("");for(a=0;a!=t[234].length;++a)if(t[234][a].charCodeAt(0)!==65533){r[t[234][a]]=59904+a;e[59904+a]=t[234][a]}t[235]="����������������������������������������������������������������èèè¤èè¢èèèè£è¾èè±èè®èµèè§è èè¦èèè¥è¬è£è¥è¤èèèèèèèèèè¹èè£è èèèèèèèèè¤è¤¦è¤°è¤è¤®è¤§è¤±è¤¢è¤©è¤£è¤¯è¤¬è¤è§±è« ����������������������������������諢諲諴諵è«è¬è«¤è«è«°è«è«è«¡è«¨è«¿è«¯è«»è²è²è²è³µè³®è³±è³°è³³èµ¬èµ®è¶¥è¶§è¸³è¸¾è¸¸è¹è¹ 踶踼踽è¹è¸°è¸¿èº½è¼¶è¼®è¼µè¼²è¼¹è¼·è¼´é¶é¹é»ééºé³éµé¶éééééé§ééééééºé¸é¼éé£éééééééééºé¥éé¹é·é´éé¤é¿é©é¹éµéªéé�".split("");for(a=0;a!=t[235].length;++a)if(t[235][a].charCodeAt(0)!==65533){r[t[235][a]]=60160+a;e[60160+a]=t[235][a]}t[236]="����������������������������������������������������������������éé¾ééé»éé¼éé¾é¹éºé¶é¿éµé½é©éééééééé°é¸é µé ¯é ²é¤¤é¤é¤§é¤©é¦é§®é§¬é§¥é§¤é§°é§£é§ªé§©é§§éª¹éª¿éª´éª»é«¶é«ºé«¹é«·é¬³é®é® é®é¼é¾é»é®é®é®é®éºé®ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é½é®é´¥é´é´ é´é´é´©é´é´é´¢é´é´é´éºéºéºéº®éºé»é»é»ºé¼é¼½å¦å¥å¢å¤å å©å´ååååååå¾åå¿åå£å£å£å£å¬å¬¥å¬²å¬£å¬¬å¬§å¬¦å¬¯å¬®å»å¯±å¯²å¶·å¹¬å¹ªå¾¾å¾»ææµæ¼æ§æ æ¥æ¤æ¨ææ¯æ©æ£æ«æ¤æ¨æææ¶æææªæªæªæª¥æªæªæªæª¡æªæªæªæªï¿½".split("");for(a=0;a!=t[236].length;++a)if(t[236][a].charCodeAt(0)!==65533){r[t[236][a]]=60416+a;e[60416+a]=t[236][a]}t[237]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æªæªæª¨æª¤æªæ©¿æª¦æªæª æªæªææ®æ°æ¿æ¾©æ¿´æ¿æ¿£æ¿æ¿æ¿§æ¿¦æ¿æ¿²æ¿æ¿¢æ¿¨ç¡ç±ç¨ç²ç¤ç°ç¢ç³ç®ç¯çç²ç«ççªçç±ç¥ç¯çççççççççç¤ç©çµç«ç²ç·ç¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç´ç±ç¨ç°ç£³ç£½ç¤ç£»ç£¼ç£²ç¤ 磹磾ç¤ç¦«ç¦¨ç©ç©ç©ç©ç©ç©çª¾ç«ç«ç° ç°ç¯²ç°ç¯¿ç¯»ç°ç¯´ç°ç¯³ç°ç°ç°ç°ç¯¸ç¯½ç°ç¯°ç¯±ç°ç°ç³¨ç¸ç¸¼ç¹ç¸³é¡ç¸¸ç¸ªç¹ç¹ç¹ç¸©ç¹ç¸°ç¸»ç¸¶ç¹ç¸ºç½ 罿罾罽翴翲è¬è»èèèè èè¼è©èèèèèèè§èè èè£è»è¤èè�".split("");for(a=0;a!=t[237].length;++a)if(t[237][a].charCodeAt(0)!==65533){r[t[237][a]]=60672+a;e[60672+a]=t[237][a]}t[238]="����������������������������������������������������������������è·è¼èè¡èºè¸èèèèèèèèè¢èèè è¹è¶èèèè¨è¾èªèè è°è¬è¹èµè¼è®èèèèè·è¯èèè´è¶è¿è¸è½èè²è¤µè¤³è¤¼è¤¾è¥è¥è¤·è¥è¦è¦¯è¦®è§²è§³è¬ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è¬è¬è¬è¬ è¬è¬¢è¬è¬è¬è¬è¬è¬è¬è¬è¬è¬è±è±°è±²è±±è±¯è²è²è³¹èµ¯è¹è¹è¹è¹è¹è¹è½è½é é¾é¸éé¢éééé¡éé é¡éé¯é¤ééé¼ééé¶éééé ééééªé¹ééééé±é·é»é¡éé£é§éééééééé é·é®é°é¬é éééééé¡é�".split("");for(a=0;a!=t[238].length;++a)if(t[238][a].charCodeAt(0)!==65533){r[t[238][a]]=60928+a;e[60928+a]=t[238][a]}t[239]="����������������������������������������������������������������ééééé±é¡é¡é¡é¡é¡ é¡é¤¥é¤«é¤¬é¤ªé¤³é¤²é¤¯é¤é¤±é¤°é¦é¦£é¦¡é¨é§ºé§´é§·é§¹é§¸é§¶é§»é§½é§¾é§¼é¨éª¾é«¾é«½é¬é«¼éé®é®¨é®é®é®¦é®¡é®¥é®¤é®é®¢é® 鮯鴳éµéµ§é´¶é´®é´¯é´±é´¸é´°ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½éµ éµéµé´¾é´·éµé´½ç¿µé´éºéºéºéº°é»é»é»»é»¿é¼¤é¼£é¼¢é½é¾ å±åå®åååååå奰嬼屩屪å·å¹å¹®ææææ®æ±æªæ°æ«ææ©æ¿ææ½æ¸æææ¼ææææææ« æª¹æª½æ«¡æ«æªºæª¶æª·æ«æª´æªææ¯æ°ççççç ççæ¿¿çæ¿»ç¦æ¿¼æ¿·ççç¿ç¹çç½ç¶ï¿½".split("");for(a=0;a!=t[239].length;++a)if(t[239][a].charCodeAt(0)!==65533){r[t[239][a]]=61184+a;e[61184+a]=t[239][a]}t[240]="����������������������������������������������������������������ç¸ççµçç¾ç¶ç»ççççç¤çççççç¦ç½ç¬ççºç£¿ç¤ç¤ç¤ç¤ç¤ç¤ç¤ç¦ç¦¬ç©ç°ç°©ç°ç° ç°ç°ç°ç°¦ç°¨ç°¢ç°¥ç°°ç¹ç¹ç¹ç¹£ç¹ç¹¢ç¹ç¹ç¹ ç¹ç¹ç¾µç¾³ç¿·ç¿¸èµèè����������������������������������èèèè´èèèèè³èµè½èèè¿èèèè è±è¶èè¤è¸è·è¾è©è§è¦è¢èè«èªè¥èè³è¤èèèèèè£è¤èèè è´è¨èè¥è¥è¥è¥è¥è¥è¥è¥è¬ªè¬§è¬£è¬³è¬°è¬µè謯謼謾謱謥謷謦謶謮謤謻謽謺è±è±µè²è²è²è³¾è´è´è´è¹è¹¢è¹ è¹è¹è¹è¹¥è¹§ï¿½".split("");for(a=0;a!=t[240].length;++a)if(t[240][a].charCodeAt(0)!==65533){r[t[240][a]]=61440+a;e[61440+a]=t[240][a]}t[241]="����������������������������������������������������������������è¹è¹è¹¡è¹è¹©è¹è½è½è½è½é¨éºé»é¾é¨é¥é§é¯éªéµééé·éééé§ééªéé¦éééééé±éé²é¤é¨é´é£é¥éééé³ééå·éééé£é¢é¥é¬é®é¨é«é¤éªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é¢é¥éééééºé¡é¡é¡é¢¸é¥é¤¼é¤ºé¨é¨é¨é¨é¨é¨é¨é¨ é¨é¨é«é«é¬é¬é¬ 鬩鬵éééé¯é¯é¯é®¿é¯é®µé®¸é¯é®¶é¯é®¹é®½éµéµéµéµéµéµéµéµéµéµéµéµéµéµéµéºéºé»é¼é¼é¼é¼¥é¼«é¼ªé¼©é¼¨é½é½å´åµåå·å´å«åå¦å§åªå¬å£å£å£å¤å¬½å¬¾å¬¿å·å¹°ï¿½".split("");for(a=0;a!=t[241].length;++a)if(t[241][a].charCodeAt(0)!==65533){r[t[241][a]]=61696+a;e[61696+a]=t[241][a]}t[242]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½å¾¿æ»æææææææææææ«§æ« æ«æ«æ«æ«æ«æ«æ«æ««æ«æ«æ«æ æ®°æ°çç§ç çç«ç¡ç¢ç£ç©çç¤ççªççççç ç¥ç¦ç¤ç£ç¡çç ç·ççç çççç±ç¤ç¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç¤¡ç¤ç¤ç¤ç¦°ç©§ç©¨ç°³ç°¼ç°¹ç°¬ç°»ç³¬ç³ªç¹¶ç¹µç¹¸ç¹°ç¹·ç¹¯ç¹ºç¹²ç¹´ç¹¨ç½ç½ç¾ç¾ç¾·ç¿½ç¿¾è¸èèè¤è¡è£è«è±èèè¡è¨èèè¬è²è¸èèè£èèè°è¦è¯èè¢è èºè è¶è·è è è è è¼è è¿è è 襢è¥è¥è¥è¥¡è¥è¥è¥è¥è¦è¦·è¦¶è§¶èèèèèèèèè�".split("");for(a=0;a!=t[242].length;++a)if(t[242][a].charCodeAt(0)!==65533){r[t[242][a]]=61952+a;e[61952+a]=t[242][a]}t[243]="����������������������������������������������������������������èèèèè±è±·è±¶è²è´è´è´è¶¬è¶ªè¶è¶«è¹è¹¸è¹³è¹ªè¹¯è¹»è»è½è½è½è½è½è¾´é é¿é°éééééééé¹é¬ééé©é¦ééé®é£éééééé§é½ééé¡é©é«é¬é¨é¦ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é³é·é¶éééé¡é¡é¡é¡é¢¿é¢½é¢»é¢¾é¥é¥é¥é¦¦é¦§é¨é¨é¨¥é¨é¨¤é¨é¨¢é¨ 騧騣é¨é¨é¨é«é¬é¬é¬é¬é¬·é¯ªé¯«é¯ é¯é¯¤é¯¦é¯¢é¯°é¯é¯é¯¬é¯é¯é¯¥é¯é¯¡é¯éµ·é¶é¶é¶é¶éµ±é¶éµ¸é¶é¶é¶éµ½éµ«éµ´éµµéµ°éµ©é¶ 鵳鵻é¶éµ¯éµ¹éµ¿é¶éµ¨éºéºé»é»¼é¼é½é½é½é½é½é½å·å²ï¿½".split("");for(a=0;a!=t[243].length;++a)if(t[243][a].charCodeAt(0)!==65533){r[t[243][a]]=62208+a;e[62208+a]=t[243][a]}t[244]="����������������������������������������������������������������åµå³å££å å·å·å»®å»¯å¿å¿æ¹ææææææ¨æ£æ¤æ«³æ«°æ«ªæ«¨æ«¹æ«±æ«®æ«¯ç¼çµç¯ç·ç´ç±çç¸ç¿çºç¹çç»ç³çççç¨ç½ç¼çºç«çªç¾çççççç²ç¤¥ç¤£ç¤§ç¤¨ç¤¤ç¤©ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç¦²ç©®ç©¬ç©ç«·ç±ç±ç±ç±ç± 糮繻繾çºçºç¾ºç¿¿è¹èèèè¨è©è¢è¿èè¾èèè¶èèè èè½è è è è è è 襣襦覹觷è èªèè¨è£è¥è§èè¶®èºèºèºè½è½è½è½è½è½éé é é·éµé²é³ééé»é ééé¾ééé¨éééµéé·éééééºéé¸éé¿ï¿½".split("");for(a=0;a!=t[244].length;++a)if(t[244][a].charCodeAt(0)!==65533){r[t[244][a]]=62464+a;e[62464+a]=t[244][a]}t[245]="����������������������������������������������������������������é¼éé¶éééé éé®é¯é¹é»é½é¾é¡ 顢顣é¡é£é£é¥é¥é¥é¥é¥é¥é¨²é¨´é¨±é¨¬é¨ªé¨¶é¨©é¨®é¨¸é¨é«é«é«é¬é¬é¬é°é°é¯·é° é°é¯¸é±é°é°é°é°é°é°é¶é¶é¶¤é¶é¶é¶é¶é¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é¶ é¶é¶é¶ªé¶é¶¡é¶é¶¢é¶¨é¶é¶£é¶¿é¶©é¶é¶¦é¶§éºéºéºé»¥é»¤é»§é»¦é¼°é¼®é½é½ é½é½é½é¾åºå¹åååå½å¾ååå·å·å»±æ½ææ¬æ«¼æ¬æ«¸æ¬çççççç ççççç¾ççªçç¤ç¤±ç¤¯ç±ç±ç³²çºçºçºçºçºçºç½ç¾»è°èèèªè¦èè£èèè§è®è¡è è©èè¥ï¿½".split("");for(a=0;a!=t[245].length;++a)if(t[245][a].charCodeAt(0)!==65533){r[t[245][a]]=62720+a;e[62720+a]=t[245][a]}t[246]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è ©è è è è ¤è è «è¡è¥è¥©è¥®è¥«è§ºè¹è¸è èºè»è´è´è¶¯èºèºè½è½è½é é é é¹é¿é»é¶é©é½é¼é°é¹éªé·é¬éé±é¥é¤é£éµéºé¿é¡é¡¤é£é£é£é¥é¥é¨¹é¨½é©é©é©é©é¨ºï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é¨¿é«é¬é¬é¬é¬é¬ºéé°«é°é°é°¬é°£é°¨é°©é°¤é°¡é¶·é¶¶é¶¼é·é·é·é·é¶¾é· é·é¶»é¶µé·é¶¹é¶ºé¶¬é·é¶±é¶é·é¶³é·é¶²é¹ºéºé»«é»®é»é¼é¼é¼é¼±é½é½¥é½¤é¾äº¹åå å奱ååå·å·å»²æ¡æ æ¦æ¢æ¬æ¬æ¬æ°ççççççç©ç¿çççççç礵禴穰穱ç±ç±ç±ç±ç±ï¿½".split("");for(a=0;a!=t[246].length;++a)if(t[246][a].charCodeAt(0)!==65533){r[t[246][a]]=62976+a;e[62976+a]=t[246][a]}t[247]="����������������������������������������������������������������糴糱çºç½ç¾èè«è´èµè³è¬è²è¶è ¬è ¨è ¦è ªè ¥è¥±è¦¿è¦¾è§»è¾è®è®è®è® è¿è´èºèºèºèºèºèºèºè½ è½¢é ééééééé éééé¿é£é¡ªé¡©é£é¥é¥é©é©é©é©é©é©é©ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é©é©é©é«é¬é¬«é¬»ééé±é±é°¿é±é°¹é°³é±é°¼é°·é°´é°²é°½é°¶é·é·é·é·é·é·é·é·é·é·©é·é·é·é·µé·é·éº¶é»°é¼µé¼³é¼²é½é½«é¾é¾¢å½å壨壧奲åå·è ¯å½ææææ©æ¥ææ«æ¬æ¬æ¬æ¯ççç¢çççç°ç籧籦çºè¬èºèè¹è¼è±è»è¾è °è ²è ®è ³è¥¶è¥´è¥³è§¾ï¿½".split("");for(a=0;a!=t[247].length;++a)if(t[247][a].charCodeAt(0)!==65533){r[t[247][a]]=63232+a;e[63232+a]=t[247][a]}t[248]="����������������������������������������������������������������è®è®è®è®è± è´èºè½¤è½£é¼é¢éééééé é é©é©é¬é¬é¬ é±é±é±é±é±é±é±é±é±é±é·»é··é·¯é·£é·«é·¸é·¤é·¶é·¡é·®é·¦é·²é·°é·¢é·¬é·´é·³é·¨é·é»é»é»²é»³é¼é¼é¼¸é¼·é¼¶é½é½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é½±é½°é½®é½¯åååå±æææ®æ¬çç¡çç ç£çç¥ç礸禷禶籪çºç¾èèè ¸è ·è µè¡è®è®èºèºèº èºé¾é½éé«é¨é©é¥ééééé¥é©é«é鱣鱧鱦鱢é±é± é¸é·¾é¸é¸é¸é¸ é¸é¸é¸é·¿é·½é¸éº é¼é½é½´é½µé½¶åæ®æ¸æ¬æ¬æ¬æ¬ç¢ç¦çªçç礹籩籫糶çºï¿½".split("");for(a=0;a!=t[248].length;++a)if(t[248][a].charCodeAt(0)!==65533){r[t[248][a]]=63488+a;e[63488+a]=t[248][a]}t[249]="����������������������������������������������������������������çºçºçºè è¡èèè襹襺襼襻觿è®è®èº¥èº¤èº£é®éé¯é±é³é顲é¥é±¨é±®é±é¸é¸é¸é¸é¸é¸éº¡é»µé¼é½é½¸é½»é½ºé½¹åç¦ç±¯è ¼è¶²èº¦éé´é¸é¶éµé© 鱴鱳鱱鱵é¸é¸é»¶é¼ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é¾¤ç¨ç¥ç³·èªè ¾è ½è ¿è®è²èº©è»é顳顴é£é¥¡é¦«é©¤é©¦é©§é¬¤é¸é¸é½ææ¬ç§è躨ééé驩驨鬮é¸ç©èè®é鱹麷çµé©«é±ºé¸ç©çªéº¤é½¾é½é¾ç¢é¹è£å¢»æç²§å«ºââ¦ââ â¬â£ââ©âââ¤âââªâ¡ââ§âââ¥âââ«â¢ââ¨âââââ®â°â¯â�".split("");for(a=0;a!=t[249].length;++a)if(t[249][a].charCodeAt(0)!==65533){r[t[249][a]]=63744+a;e[63744+a]=t[249][a]}return{enc:r,dec:e}}();cptable[1250]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½â�ââ¦â â¡ï¿½â°Å â¹ÅŤŽŹ�âââââ¢ââ�â¢Å¡âºÅťžź ËËŤĦ§¨©Å«¬Â®Ż°±ËÅÂ´ÂµÂ¶Â·Â¸Ä Å»ĽËľżÅÃÃÄÃĹÄÃÄÃÄÃÄÃÃÄÄÅÅÃÃÅÃÃÅÅ®ÃŰÃÃÅ¢ÃÅáâÄäĺÄçÄéÄëÄÃîÄÄÅÅóôÅö÷ÅůúűüýţË",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1251]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ÐÐâÑââ¦â â¡â¬â°Ðâ¹ÐÐÐÐÑâââââ¢ââ�â¢ÑâºÑÑÑÑ ÐÑФҦ§Ð©Ð«¬Â®Ð°±ÐÑÒµ¶·ÑâÑ»ÑÐ ÑÑÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмнопÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1252]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½âÆââ¦â â¡Ëâ°Å â¹Å���âââââ¢ââËâ¢Å¡âºÅ�žŸ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÃÃÃÃÃà ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþÿ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1253]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½âÆââ¦â â¡ï¿½â°ï¿½â¹ï¿½ï¿½ï¿½ï¿½ï¿½âââââ¢ââ�â¢ï¿½âºï¿½ï¿½ï¿½ï¿½Â ΠΣ¤¥¦§¨©�«¬Â®â°±²³Îµ¶·ÎÎλνÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎΠΡ�ΣΤΥΦΧΨΩΪΫάÎήίΰαβγδεζηθικλμνξοÏÏÏÏÏÏ ÏÏÏÏÏÏÏÏÏ�",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1254]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½âÆââ¦â â¡Ëâ°Å â¹Å����âââââ¢ââËâ¢Å¡âºÅ��Ÿ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÃÃÃÃÃà ÃÃÃÃÃÃÃÃÃÃÄÃÃÃÃÃÃÃÃÃÃÃÃİÅÃà áâãäåæçèéêëìÃîïÄñòóôõö÷øùúûüıÅÿ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1255]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½âÆââ¦â â¡Ëâ°ï¿½â¹ï¿½ï¿½ï¿½ï¿½ï¿½âââââ¢ââËâ¢ï¿½âºï¿½ï¿½ï¿½ï¿½Â ¡¢£âªÂ¥Â¦Â§Â¨Â©Ã«¬Â®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹ�ֻּֽ־ֿ××××װױײ׳״�������××××××××××××××××× ×¡×¢×£×¤×¥×¦×§×¨×©×ªï¿½ï¿½ââ�",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1256]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬Ù¾âÆââ¦â â¡Ëâ°Ù¹â¹ÅÚÚÚÚ¯âââââ¢ââÚ©â¢ÚâºÅââں ØÂ¢Â£Â¤Â¥Â¦Â§Â¨Â©Ú¾Â«Â¬Â®¯°±²³´µ¶·¸¹ØÂ»Â¼Â½Â¾ØÛØ¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶ÃطظعغÙÙÙÙà Ùâ٠ÙÙÙçèéêëÙÙîïÙÙÙÙôÙÙ÷ÙùÙûüââÛ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1257]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½â�ââ¦â â¡ï¿½â°ï¿½â¹ï¿½Â¨Ë¸�âââââ¢ââ�â¢ï¿½âºï¿½Â¯Ë� �¢£¤�¦§Ã©Å«¬Â®Ã°±²³´µ¶·ø¹Å»¼½¾æÄÄ®ÄÄÃà ÄÄÄÃŹÄĢĶĪĻŠÅÅ ÃÅÃÃÃŲÅÅŪÃŻŽÃÄ Ä¯ÄÄäåÄÄÄéźÄģķīļšÅÅóÅõö÷ųÅÅūüżžË",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1258]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�â¬ï¿½âÆââ¦â â¡Ëâ°ï¿½â¹Å����âââââ¢ââËâ¢ï¿½âºÅ��Ÿ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÃÃÃÄÃà ÃÃÃÃÃÃÌÃÃÃÄÃÌÃÃÆ ÃÃÃÃÃÃÃÆ¯ÌÃà áâÄäåæçèéêëÌÃîïÄṇ̃óôơö÷øùúûüưâ«Ã¿",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[1e4]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Ãà ÃÃÃÃÃáà âäãåçéèêëÃìîïñóòôöõúùûüâ °¢£§â¢Â¶Ã®©â¢Â´Â¨â ÃÃâ±â¤â¥Â¥ÂµâââÏâ«ÂªÂºâ¦Ã¦Ã¸Â¿Â¡Â¬âÆââ«»â¦Â ÃÃÃÅÅââââââ÷âÿŸâ¤â¹âºï¬ï¬â¡Â·âââ°ÃÃÃÃÃÃÃÃÃÃÃ�ÃÃÃÃıË˯ËË˸ËËË",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[10006]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ù²Ã³ÃÃΠà âäΨçéèêë£â¢Ã®Ã¯â¢Â½â°Ã´Ã¶Â¦Âùûüâ ÎÎÎÎÎΠî©ΣΪ§â °Îαâ¤â¥Â¥ÎÎÎÎÎÎÎΦΫΨΩάάÎΡâΤ«»â¦Â ΥΧÎÎÅââââââ÷ÎÎÎÎÎήίÏÎÏαβÏδεÏγηιξκλμνοÏÏÏÏÏθÏÏÏÏ Î¶ÏÏÎΰ�",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[10007]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐРСТУФХЦЧШЩЪЫЬÐЮЯâ °¢£§â¢Â¶Ð®©â¢ÐÑâ ÐÑâ±â¤â¥ÑµâÐÐÑÐÑÐÑÐÑÑР¬âÆââ«»â¦Â ÐÑÐÑÑââââââ÷âÐÑÐÑâÐÑÑабвгдежзийклмнопÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑѤ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[10008]=function(){var e=[],r={},t=[],a;t[0]="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Âï£ï£ï£ï£ï£ï£ï£ï£ï£ ï£ï£®ï£¯ï£°ï£±ï£²ï£³ï£´ï£µï£¶ï£·ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï£¸ï£¹ï£ºï£»ï£¼ï£½ï£¾ï£¿".split("");for(a=0;a!=t[0].length;++a)if(t[0][a].charCodeAt(0)!==65533){r[t[0][a]]=0+a;e[0+a]=t[0][a]}t[161]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ãããã»Ë˨ãã âï½ï¿½â¦ââââãããããããããããããã±Ã÷â¶â§â¨âââªâ©ââ·ââ¥â¥â âââ«â®â¡âââ½ââ â®â¯â¤â¥ââµâ´ââ°â²â³âï¼Â¤ï¿ ï¿¡â°Â§âââ ââââââ¡â â³â²â»ââââã�".split("");for(a=0;a!=t[161].length;++a)if(t[161][a].charCodeAt(0)!==65533){r[t[161][a]]=41216+a;e[41216+a]=t[161][a]}t[162]="���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������âââââââââââââââââââââ´âµâ¶â·â¸â¹âºâ»â¼â½â¾â¿ââââââ âââ â¡â¢â£â¤â¥â¦â§â¨â©ï¿½ï¿½ã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ï¿½ï¿½â ⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫���".split("");for(a=0;a!=t[162].length;++a)if(t[162][a].charCodeAt(0)!==65533){r[t[162][a]]=41472+a;e[41472+a]=t[162][a]}t[163]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ï¼ï¼ï¼ï¿¥ï¼ ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ ABCDEFGHIJKLï¼ï¼®ï¼¯ï¼°ï¼±ï¼²ï¼³ï¼´ï¼µï¼¶ï¼·ï¼¸ï¼¹ï¼ºï¼»ï¼¼ï¼½ï¼¾ï¼¿ï½ï½ï½ï½ï½ï½ ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ï¿£ï¿½".split("");for(a=0;a!=t[163].length;++a)if(t[163][a].charCodeAt(0)!==65533){r[t[163][a]]=41728+a;e[41728+a]=t[163][a]}t[164]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ããããã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ãããããã ãããããããããããããã������������".split("");for(a=0;a!=t[164].length;++a)if(t[164][a].charCodeAt(0)!==65533){r[t[164][a]]=41984+a;e[41984+a]=t[164][a]}t[165]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ã·ã¸ã¹ãºã»ã¼ã½ã¾ã¿ãããããã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ãªã«ã¬ãã®ã¯ã°ã±ã²ã³ã´ãµã¶ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[165].length;++a)if(t[165][a].charCodeAt(0)!==65533){r[t[165][a]]=42240+a;e[42240+a]=t[165][a]}t[166]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎΠΡΣΤΥΦΧΨΩ��������αβγδεζηθικλμνξοÏÏÏÏÏ ÏÏÏÏ���������������������������������������".split("");for(a=0;a!=t[166].length;++a)if(t[166][a].charCodeAt(0)!==65533){ 64877r[t[166][a]]=42496+a;e[42496+a]=t[166][a]}t[167]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐРСТУФХЦЧШЩЪЫЬÐЮЯ���������������абвгдеÑжзийклмнопÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑ��������������".split("");for(a=0;a!=t[167].length;++a)if(t[167][a].charCodeAt(0)!==65533){r[t[167][a]]=42752+a;e[42752+a]=t[167][a]}t[168]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ÄáÇà ÄéÄèīÃÇìÅóÇòūúÇùÇÇÇÇüê����������ã ããããããããããããããããããããããããããã ã¡ã¢ã£ã¤ã¥ã¦ã§ã¨ã©ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½".split("");for(a=0;a!=t[168].length;++a)if(t[168][a].charCodeAt(0)!==65533){r[t[168][a]]=43008+a;e[43008+a]=t[168][a]}t[169]="��������������������������������������������������������������������������������������������������������������������������������������������������������������������ââââââ âââââââââââââââââââââââââââ â¡â¢â£â¤â¥â¦â§â¨â©âªâ«â¬ââ®â¯â°â±â²â³â´âµâ¶â·â¸â¹âºâ»â¼â½â¾â¿ââââââ ââââââ����������������".split("");for(a=0;a!=t[169].length;++a)if(t[169][a].charCodeAt(0)!==65533){r[t[169][a]]=43264+a;e[43264+a]=t[169][a]}t[176]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������åé¿åæ¨åååççè¼ç®è¾ç¢ç±ééæ°¨å®ä¿ºææå²¸èºæ¡è®æç广ç¬ç¿±è¢å²å¥¥ææ¾³èææåå§ç¬å «ç¤å·´æè·é¶æèåé¸ç½¢ç¸ç½æç¾æä½°è´¥æç¨æçæ¬æ³è¬é¢æ¿çæ®æä¼´ç£ååç»é¦å¸®æ¢æ¦èç»æ£ç£ èéåè°¤èèå è¤å¥ï¿½".split("");for(a=0;a!=t[176].length;++a)if(t[176][a].charCodeAt(0)!==65533){r[t[176][a]]=45056+a;e[45056+a]=t[176][a]}t[177]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������èé¹ä¿å ¡é¥±å®æ±æ¥æ´è±¹é²çæ¯ç¢æ²ååè¾èè´é¡åç夿«ç被å¥è¯æ¬ç¬¨å´©ç»·ç泵蹦迸é¼é¼»æ¯éç¬å½¼ç¢§èè½æ¯æ¯æ¯å¸åºç¹éæå¼å¿ è¾å£èé¿ééè¾¹ç¼è´¬æä¾¿ååè¾¨è¾©è¾«éæ å½ªèè¡¨é³æå«çªå½¬ææ¿æ»¨å®¾æå µå°æä¸ç§é¥¼ç³ï¿½".split("");for(a=0;a!=t[177].length;++a)if(t[177][a].charCodeAt(0)!==65533){r[t[177][a]]=45312+a;e[45312+a]=t[177][a]}t[178]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç å¹¶ç»è ææ¨éµæ³¢ååæéç®ä¼¯å¸è¶èèæ¸¤æ³é©³æååºè¡¥å ä¸å¸æ¥ç°¿é¨ææ¦çè£ææè´¢ç¬è¸©é彩èè¡é¤åèæ®ææ¨ç¿èè±ä»æ²§èæç³æ§½æ¹èåçä¾§åæµå±è¹æåè¬è¶æ¥ç¢´æ½å¯å²å·®è¯§ææ´è±ºææºèé¦è°ç¼ é²äº§é颤æç�".split("");for(a=0;a!=t[178].length;++a)if(t[178][a].charCodeAt(0)!==65533){r[t[178][a]]=45568+a;e[45568+a]=t[178][a]}t[179]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������åºå°å¸¸é¿å¿è åæç å±å¡è¶ æéæå²æ½®å·¢åµçè½¦æ¯æ¤æ£å½»æ¾é´è£è¾°å°æ¨å¿±æ²éè¶è¡¬æç§°åæ©æåä¹ç¨æ©æ¾è¯æ¿ééªç§¤åç´æåæ± è¿å¼é©°è»é½¿ä¾å°ºèµ¤ç¿ æ¥ç½å å²è«å´å® æ½é ¬ç´è¸ç¨ æç¹ä»ç»¸ç ä¸èååºæ©±å¨èºé鿻餿¥ï¿½".split("");for(a=0;a!=t[179].length;++a)if(t[179][a].charCodeAt(0)!==65533){r[t[179][a]]=45824+a;e[45824+a]=t[179][a]}t[180]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç¡å¨çæè§¦å¤æ£å·ç©¿æ¤½ä¼ è¹å串ç®çªå¹¢åºé¯åå¹çæ¶é¤åæ¥æ¤¿éåæ·³çº¯è ¢æ³ç»°çµè¨ç£éè¾æ ç·è¯æ¤åºèµæ¬¡èªè±å±åä»ä¸åç²éç°ä¿è¹¿ç¯¡çªæ§å´å¬èçç²¹æ·¬ç¿ æåå¯¸ç£æ®ææªæ«éæè¾¾çç©æå¤§åæ¹å£æ´å¸¦æ®ä»£è´·è¢å¾ é®ï¿½".split("");for(a=0;a!=t[180].length;++a)if(t[180][a].charCodeAt(0)!==65533){r[t[180][a]]=46080+a;e[46080+a]=t[180][a]}t[181]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������æ è½æ 丹å鏿¸èæ¦æ°®ä½æ®æ·¡è¯å¼¹è彿¡å è¡æ¡£åæ£è¹åå²ç¥·å¯¼å°ç¨»æ¼éçå¾·å¾ç蹬ç¯ç»ççªå³éå ¤ä½æ»´è¿ªæç¬ç涤ç¿å«¡æµåºå°è第å¸å¼éç¼é¢ ææ»ç¢ç¹å ¸éå«çµä½ç¸åºæ¦å¥ æ·æ®¿ç¢å¼éååæåéè°è·ç¹ç¢è¶è¿è°å �".split("");for(a=0;a!=t[181].length;++a)if(t[181][a].charCodeAt(0)!==65533){r[t[181][a]]=46336+a;e[46336+a]=t[181][a]}t[182]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ä¸ç¯å®éé¡¶é¼éå®è®¢ä¸¢ä¸å¬è£æå¨æ 便«å»æ´å ææé¡è±éçé½ç£æ¯çç¬è¯»å µç¹èµæéè度渡å¦ç«¯ç黿®µæç¼å å é对墩å¨è¹²æ¦é¡¿å¤éç¾éæåå¤å¤ºå躲æµè·ºèµåæ°å è¾å³¨é¹ ä¿é¢è®¹å¨¥æ¶åæ¼éé饿æ©èå¿è³å°é¥µæ´±äºï¿½".split("");for(a=0;a!=t[182].length;++a)if(t[182][a].charCodeAt(0)!==65533){r[t[182][a]]=46592+a;e[46592+a]=t[182][a]}t[183]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������贰åç½çä¼ä¹éæ³çè©å¸çªç¿»æ¨ç¾éç¹å¡ç¦åè¿èè´©ç¯é¥æ³åè³æ¹èªæ¿é²å¦¨ä»¿è®¿çººæ¾è²éå¡é£è¥åªè¯½å èºåºæ²¸è´¹è¬é 婿°å纷åçæ±¾ç²å¥ä»½å¿¿æ¤ç²ªä¸°å°æ«èå³°éé£ç¯ç½é¢å¯ç¼è®½å¥å¤ä½å¦å¤«æ·è¤åµæ¶æè¾å¹ æ°ç¬¦ä¼ä¿æï¿½".split("");for(a=0;a!=t[183].length;++a)if(t[183][a].charCodeAt(0)!==65533){r[t[183][a]]=46848+a;e[46848+a]=t[183][a]}t[184]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������浮涪ç¦è¢±å¼ç«æè¾ ä¿¯éæ§è¯è åºè èµ´å¯è¦èµå¤å ä»éç¶è ¹è´å¯è®£éå¦ç¼åå¶åè¯¥æ¹æ¦éçæºå¹²çææç«¿èèµ¶æç§æ¢èµ£ååé¢ç¼¸èçº²å²æ¸¯æ ç¯çé«èç¾ç³æé稿å奿ææé¸½è³çå²é©èæ ¼è¤ééé¬ä¸ªåç»æ ¹è·èæ´åºç¾¹ï¿½".split("");for(a=0;a!=t[184].length;++a)if(t[184][a].charCodeAt(0)!==65533){r[t[184][a]]=47104+a;e[47104+a]=t[184][a]}t[185]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������åè¿æ¢å·¥æ»åæé¾ä¾èº¬å ¬å®«å¼å·©æ±æ±è´¡å ±é©å¾æ²èç墿è´å¤è¾èåç®ä¼°æ²½å¤å§é¼å¤èéª¨è°·è¡æ 顾åºéå®çå寡æè¤ä¹ææªæ£ºå ³å®å è§ç®¡é¦ç½æ¯çè´¯å 广éç°è§åç¡ å½é¾éºè½¨é¬¼è¯¡ç¸æ¡æè·ªè´µå½è¾æ»æ£é éå½æè£¹è¿å�".split("");for(a=0;a!=t[185].length;++a)if(t[185][a].charCodeAt(0)!==65533){r[t[185][a]]=47360+a;e[47360+a]=t[185][a]}t[186]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½éª¸å©æµ·æ°¦äº¥å®³éªé £æ¨é¯é©å«æ¶µå¯å½åç½ç¿°æ¼ææ±æ¾æçæ±æ±å¤¯æèªå£å豪毫é好èå·æµ©åµåè·èæ ¸ç¦¾åä½åçè²é河涸赫è¤é¹¤è´ºå¿é»çå¾ç æ¨å¼äº¨æ¨ªè¡¡æè½°åçè¹é¸¿æ´ªå®å¼çº¢å侯ç´å¼åååå¼ä¹å¿½ç壶è«è¡è´çç³æ¹ï¿½".split("");for(a=0;a!=t[186].length;++a)if(t[186][a].charCodeAt(0)!==65533){r[t[186][a]]=47616+a;e[47616+a]=t[186][a]}t[187]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������弧è嬿¤äºæ²ªæ·è±ååç¾æ»ç»ååè¯æ§å¾ææ·®åæ¬¢ç¯æ¡è¿ç¼æ¢æ£å¤çªè±¢çæ¶£å®¦å¹»èæ é»ç£ºèç°§çå°æ¶ç æå¹æè°ç°æ¥è¾å¾½æ¢èåæ¯ææ §åæ æ¦è´¿ç§½ä¼ç©æ±è®³è¯²ç»è¤æå©éæµæ··è±æ´»ä¼ç«è·ææé货祸å»å¾åºæºç¸ç¨½ç§¯ç®ï¿½".split("");for(a=0;a!=t[187].length;++a)if(t[187][a].charCodeAt(0)!==65533){r[t[187][a]]=47872+a;e[47872+a]=t[187][a]}t[188]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������è饥迹æ¿è®¥é¸¡å§¬ç»©ç¼åææ£è¾ç±éåæ¥ç¾æ±²å³å«çº§æ¤å èå·±èæåå£ä¼ç¥åæ¸æµå¯å¯è®¡è®°æ¢å¿é å¦ç»§çºªåæ·å¤¹ä½³å®¶å èé¢è´¾ç²é¾å稼价æ¶é©¾å«æ¼çåå°ç¬ºé´ç å ¼è©è°å¥¸ç¼è§æ£æ¬ç¢±ç¡·æ£æ¡ç®ä¿åªåèæ§é´è·µè´±è§é®ç®ä»¶ï¿½".split("");for(a=0;a!=t[188].length;++a)if(t[188][a].charCodeAt(0)!==65533){r[t[188][a]]=48128+a;e[48128+a]=t[188][a]}t[189]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å¥è°åé¥¯æ¸æº 涧建åµå§å°æµæ±çèæ¡¨å¥è®²å é ±éèæ¤ç¤ç¦è¶äº¤éæµéªå¨å¼æ é°ç«ä¾¥èç¡è§é¥ºç¼´ç»å¿æé µè½¿è¾å«çªææ¥ç秸è¡é¶æªå«èæ¡æ°æ·ç«ç«æ´ç»è§£å§æèè¥çåä»ç¥è¯«å±å·¾çæ¤é仿´¥è¥ç´§é¦ä» è°¨è¿é³æç¦è¿ç¬æµ¸ï¿½".split("");for(a=0;a!=t[189].length;++a)if(t[189][a].charCodeAt(0)!==65533){r[t[189][a]]=48384+a;e[48384+a]=t[189][a]}t[190]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������尽å²èå ¢èçæ¶é²¸äº¬æç²¾ç²³ç»äºè¦æ¯é¢é墿¬éå¾çéç«ç«åç¯çªæªç©¶çº çéä¹ ç¸ä¹é 婿æ§è¼è åå°±çé æçç½å± 驹èå±åç©ä¸¾æ²®èææ®å·¨å ·è·è¸é¯ä¿±å¥æ§ç¬å§æé¹å¨å¦ç·å·ç»¢æ æ«ææåçµè§å³è¯ç»åèé§åå峻�".split("");for(a=0;a!=t[190].length;++a)if(t[190][a].charCodeAt(0)!==65533){r[t[190][a]]=48640+a;e[48640+a]=t[190][a]}t[191]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ä¿ç«£æµé¡éªååå¡å¯å¼æ©æ¥·å¯æ ¨åå ªååç çåº·æ ·ç³ ææäº¢çèæ·ç¤é å·èæ¯æ£µç£é¢ç§å£³å³å¯æ¸´å å»å®¢è¯¾è¯å妿³åå空æåæ§æ 壿£å¯æ¯åçªè¦é ·åºè£¤å¤¸å®æè·¨è¯åç·ä¾©å¿«å®½æ¬¾å¡ççæ¡ç¿ç¶æ·åµäºç岿窥èµå¥éå�".split("");for(a=0;a!=t[191].length;++a)if(t[191][a].charCodeAt(0)!==65533){r[t[191][a]]=48896+a;e[48896+a]=t[191][a]}t[192]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é¦æ§æºå¤ææå°æ¬æ©å»éåæåè¡è è¾£å¦è±æ¥èµèå©ªæ æ¦ç¯®éå °æ¾è°°æ½è§æç¼çæ»¥ç æ¦ç¼å»éææµªæå³ç¢èä½¬å§¥é ªçæ¶åä¹é·éè¾ç£ç´¯å¡åæè类泪棱æ¥å·å梨çé»ç¯±ç¸ç¦»æ¼çæé鲤礼èèåæ ä¸½åå±ç ¾åå©åä¾ä¿ï¿½".split("");for(a=0;a!=t[192].length;++a)if(t[192][a].charCodeAt(0)!==65533){r[t[192][a]]=49152+a;e[49152+a]=t[192][a]}t[193]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç¢ç«ç²æ²¥é¶åçå©ä¿©èè²è¿é°å»ææ¶å¸æè¸é¾æç¼ç»ç²®åæ¢ç²±è¯ä¸¤è¾éæ¾äº®è° æ©èåççå¯¥è¾½æ½¦äºæé£å»æåè£çå£çç³æç£·é临é»é³æ·åèµåæç²è±é¶é¾éä¼¶ç¾åçµéµå²é¢å¦ä»¤æºç榴硫é¦çåç¤æµæ³å é¾èå笼窿�".split("");for(a=0;a!=t[193].length;++a)if(t[193][a].charCodeAt(0)!==65533){r[t[193][a]]=49408+a;e[49408+a]=t[193][a]}t[194]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é忢鿥¼å¨æç¯æ¼éè¦å¢é¢ åºçæ³å¤èé²éºç¢é²è·¯èµé¹¿æ½ç¦å½éæ®é©´åéä¾£æ 履屡ç¼èæ°¯å¾ç滤绿峦æåªæ»¦åµä¹±æ ç¥æ¡è½®ä¼¦ä»æ²¦çº¶è®ºèèºç½é»é£ç®©éª¡è£¸è½æ´éªç»å¦éº»çç è马éªååå买麦åè¿èçé¦è®æ»¡èæ¼æ ¢æ¼«ï¿½".split("");for(a=0;a!=t[194].length;++a)if(t[194][a].charCodeAt(0)!==65533){r[t[194][a]]=49664+a;e[49664+a]=t[194][a]}t[195]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������谩èè«ç²æ°å¿è½ç«è 鿝çéå¯èå帽è²è´¸ä¹ç«ææ¢ é ¶éç ¤æ²¡çåªéæ¯ç¾æ§å¯å¦¹åªé¨é·ä»¬èèæª¬çé°ç梦åç¯éé¡ç³è¿·è°å¼¥ç±³ç§è§ æ³èå¯å¹æ£ç 绵åå åå¨©ç¼ é¢èæçèç§æ¸ºåºå¦èçæ°æ¿ç¿ææ¯é½æè鸣éåå½è°¬æ¸ï¿½".split("");for(a=0;a!=t[195].length;++a)if(t[195][a].charCodeAt(0)!==65533){r[t[195][a]]=49920+a;e[49920+a]=t[195][a]}t[196]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������æ¹è模è磨æ©éæ¹æ«è«å¢¨é»æ²«æ¼ å¯éè°çææç¡äº©å§æ¯å¢æ®å¹åæ æ¨ç®ç¦ç§ç©æ¿åªåé é£å¨çº³æ°ä¹å¥¶èå¥åç·é¾åæ èæ¼é¹æ·å¢é¦å å«©è½å¦®éåªæ³¥å°¼æä½ å¿è »éæººè«æå¹´ç¢¾æµæ»å¿µå¨é ¿é¸å°¿æèå½å®ééæ¶ æ¨æ çåå®ï¿½".split("");for(a=0;a!=t[196].length;++a)if(t[196][a].charCodeAt(0)!==65533){r[t[196][a]]=50176+a;e[50176+a]=t[196][a]}t[197]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ§æ³çæé®çº½èæµåå¼å¥´åªæå¥³æèçæªæ¦ç³¯è¯ºå¦æ¬§é¸¥æ®´èåå¶æ²¤åªè¶´ç¬å¸æç¶ææç徿¹æ´¾ææ½çç£ç¼çå¤åä¹åºæèªèæåå¨ç®è¢è·æ³¡å¸èå¹è£´èµéªé 佩æ²å·çç °æ¨ç¹æ¾å½è¬æ£ç¡¼ç¯·è¨æé¹æ§ç¢°å¯ç 鹿¹æ«åçµæ¯ï¿½".split("");for(a=0;a!=t[197].length;++a)if(t[197][a].charCodeAt(0)!==65533){r[t[197][a]]=50432+a;e[50432+a]=t[197][a]}t[198]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å¤è¾ç²ç®å¹çå»å±è¬ç¯åçéªé£æ¼ç¢ç¥¨æç¥æ¼é¢è´«åèä¹åªè¹èå¹³åç¶è¯å±å¡æ³¼é¢å©ç ´éè¿«ç²åæéºä»èè¡è©è²åæ´åæ®æµ¦è°±æçææ¬ºæ æå¦»ä¸åæ¼ææ²å ¶æ£å¥æ§ç¦å´è齿ç¥ç¥éªèµ·å²ä¹ä¼å¯å¥ç 卿°è¿å¼æ±½æ³£è®«æï¿½".split("");for(a=0;a!=t[198].length;++a)if(t[198][a].charCodeAt(0)!==65533){r[t[198][a]]=50688+a;e[50688+a]=t[198][a]}t[199]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ°æ´½çµæ¦éé åè¿ç¾ä»è°¦ä¹¾é»é±é³åæ½é£æµ è°´å 嵿¬ ææªåè ç¾å¢è·å¼ºæ¢æ©é¹æ²ææ¡¥ç§ä¹ä¾¨å·§éæ¬ç¿å³ä¿çªåè䏿¯çªé¦ä¾µäº²ç§¦ç´å¤è¹æç¦½å¯æ²é轻氢å¾å¿æ¸ ææ´æ°°æ 顷请åºç¼ç©·ç§ä¸é±çæ±åé æ³ è¶åºèæ²èº¯å±é©±æ¸ �".split("");for(a=0;a!=t[199].length;++a)if(t[199][a].charCodeAt(0)!==65533){r[t[199][a]]=50944+a;e[50944+a]=t[199][a]}t[200]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å娶é¾è¶£å»å颧æéæ³å ¨çæ³ç¬å¸å缺çç¸å´é¹æ¦·ç¡®éè£ç¾¤ç¶çåæç¤å£¤æå·è®©é¥¶æ°ç»æ¹ç壬ä»äººå¿é§ä»»è®¤åå¦çº«æä»æ¥æè¸èè£èçæº¶å®¹ç»åææèè¹è ååºå¦è¾±ä¹³æ±å ¥è¤¥è½¯é®èçéé°æ¶¦è¥å¼±ææ´è¨è ®é³å¡èµä¸å�".split("");for(a=0;a!=t[200].length;++a)if(t[200][a].charCodeAt(0)!==65533){r[t[200][a]]=51200+a;e[51200+a]=t[200][a]}t[201]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ä¼æ£æ¡å丧æéªæ«å«çè²æ¶©æ£®å§èç æå¹æ²çº±å»å¥ç çæçè«æå±±å ç ½è¡«éªéæ 赡è³åæ±æç¼®å¢ä¼¤åèµæä¸å°è£³æ¢¢æç¨ç§èåºé¶å°å¨éµç»å¥¢èµèèè赦æå°æ æ¶ç¤¾è®¾ç ·ç³å»ä¼¸èº«æ·±å¨ ç» ç¥æ²å®¡å©¶çè¾æ æ¸å£°çç¥ç²å绳�".split("");for(a=0;a!=t[201].length;++a)if(t[201][a].charCodeAt(0)!==65533){r[t[201][a]]=51456+a;e[51456+a]=t[201][a]}t[202]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ççå©èå£å¸å¤±ç®æ½æ¹¿è¯å°¸è±åç³æ¾æ¶ä»é£èå®è¯å²ç¢ä½¿å±é©¶å§å¼ç¤ºå£«ä¸æ¿äºæèªéå¿æ¯åå¬éä»ä¾é饰æ°å¸æå®¤è§è¯æ¶æé¦å®å¯¿æå®åç¦å ½è¬æ¢æ¢³æ®æè¾åèæ·ç书èµå°çè¯ææç½²èé»é¼ 屿¯è¿°æ ææç«å¢ åº¶æ°æ¼±ï¿½".split("");for(a=0;a!=t[202].length;++a)if(t[202][a].charCodeAt(0)!==65533){r[t[202][a]]=51712+a;e[51712+a]=t[202][a]}t[203]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������æå·èæè¡°ç©å¸ æ æ´éåç½è°æ°´ç¡ç¨å®ç¬é¡ºèè¯´ç¡æçæ¯æå¶æç§å¸ä¸æ»è寺å£å伺似饲巳æ¾è¸æé¢éå®è®¼è¯µæèæå½èé ¥ä¿ç´ éç²å³å¡æº¯å®¿è¯èé ¸èç®è½éé绥é«ç¢å²ç©éé§ç¥åæç¬èæ¢å缩çç´¢éæå¡ä»å®å¥¹å¡ï¿½".split("");for(a=0;a!=t[203].length;++a)if(t[203][a].charCodeAt(0)!==65533){r[t[203][a]]=51968+a;e[51968+a]=t[203][a]}t[204]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������çæè¹è¸èèæ¬å°æ³°é å¤ªææ±°åæè´ªç«æ»©åæªç°æ½è°è°å¦æ¯¯è¢ç¢³æ¢å¹çæ±¤å¡æªå æ£ èåç³å躺æ·è¶ç«ææ¶æ»ç»¦èæ¡éæ·é¶è®¨å¥ç¹è¤è ¾ç¼èªæ¢¯å踢éæé¢è¹å¼ä½æ¿åææ¶åå±å¤©æ·»å¡«ç°çæ¬èè ææ¡è¿¢çºè·³è´´éå¸å å¬ç�".split("");for(a=0;a!=t[204].length;++a)if(t[204][a].charCodeAt(0)!==65533){r[t[204][a]]=52224+a;e[52224+a]=t[204][a]}t[205]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������æ±å»·åäºåºæºèéæ¡é ®ç³åé彤童桶æ çç»ç巿头éå¸ç§çªå¾å¾éæ¶å± ååå æ¹å¢æ¨é¢è ¿è褪éåå±¯èææè±é¸µé驮驼æ¤å¦¥æå¾æåèæ´¼å¨ç¦è¢æªå¤è±å¼¯æ¹¾ç©é¡½ä¸¸ç·å®ç¢æ½æçæå®å©ä¸è 汪ç亡æç½å¾æºæå¿å¦å¨ï¿½".split("");for(a=0;a!=t[205].length;++a)if(t[205][a].charCodeAt(0)!==65533){r[t[205][a]]=52480+a;e[52480+a]=t[205][a]}t[206]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å·å¾®å±é¦è¿æ¡ å´å¯æä¸ºæ½ç»´èèå§ä¼ä¼ªå°¾çº¬æªèå³çèåé使¸è°å°æ °å«ç温èæé»çº¹å»ç¨³ç´é®å¡ç¿ç®æèæ¶¡çªææ¡å§æ¡æ²å·«åé¨ä¹æ±¡è¯¬å±æ èæ¢§å¾å´æ¯æ¦äºæåèä¼ä¾®åæé¾æ¤ç©å¿å¡æè¯¯æçæè¥¿ç¡ç½æ°å»å¸é¡çºï¿½".split("");for(a=0;a!=t[206].length;++a)if(t[206][a].charCodeAt(0)!==65533){r[t[206][a]]=52736+a;e[52736+a]=t[206][a]}t[207]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ç¨æ¯å¸æè夿çç¯æºªæ±çæªè¢å¸ä¹ 媳å飿´ç³»éæç»çè¾å£éè¾æå³¡ä¾ çä¸å¦å¤åæé¨å ä»é²çº¤å¸è´¤è¡è·é²æ¶å¼¦å«æ¾é©ç°ç®å¿è ºé¦ 羡宪é·é线ç¸å¢é¶é¦ç®±è¥æ¹ä¹¡ç¿ç¥¥è¯¦æ³å享项巷橡åå象è§ç¡éåå®å£éæ¶å®µæ·æï¿½".split("");for(a=0;a!=t[207].length;++a)if(t[207][a].charCodeAt(0)!==65533){r[t[207][a]]=52992+a;e[52992+a]=t[207][a]}t[208]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å°åæ ¡èå¸ç¬ææ¥äºæèéåææºéªæèè°å械å¸è¹ææ³æ³»è°¢å±èªè¯éæ¬£è¾æ°å¿»å¿ä¿¡è¡ æè ¥ç©æºå ´ååå½¢é¢è¡éå¹¸ææ§å§å å¶è¸åæ±¹éçä¼ä¿®ç¾æ½å éç§è¢ç»£å¢æéèåé¡»å¾è®¸èé åæåºçæ¤çµ®å©¿ç»ªç»è½©å§å®£æ¬æç�".split("");for(a=0;a!=t[208].length;++a)if(t[208][a].charCodeAt(0)!==65533){r[t[208][a]]=53248+a;e[53248+a]=t[208][a]}t[209]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������éç£ç©ç»é´èå¦ç©´éªè¡åç循æ¬è¯¢å¯»é©¯å·¡æ®æ±è®è®¯éè¿ åæ¼é¸¦é¸å丫è½çèå´è¡æ¶¯é åäºè®¶çå½éçæ·¹ç严ç è岩延è¨é¢éçæ²¿å¥æ©ç¼è¡æ¼è³å °çåç éå彦ç°å®´è°éªæ®å¤®é¸¯ç§§æ¨æ¬ä½¯ç¡ç¾æ´é³æ°§ä»°çå »æ ·æ¼¾éè °å¦ç¶ï¿½".split("");for(a=0;a!=t[209].length;++a)if(t[209][a].charCodeAt(0)!==65533){r[t[209][a]]=53504+a;e[53504+a]=t[209][a]}t[210]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������æå°§é¥çªè°£å§å¬èè¯è¦è椰åè¶ç·éå¶ä¹é¡µæä¸å¶æ³è 夿¶²ä¸å£¹å»æé±ä¾ä¼è¡£é¢å¤·é移仪è°çæ²å®å§¨å½æ¤ èåå·²ä¹ç£ä»¥èºææé屹亿役èé¸èç«äº¦è£ææ¯ å¿ä¹ç溢诣议è°è¯å¼ç¿¼ç¿ç»èµè«å æ®·é³é´å§»åé¶æ·«å¯ 饮尹å¼é�".split("");for(a=0;a!=t[210].length;++a)if(t[210][a].charCodeAt(0)!==65533){r[t[210][a]]=53760+a;e[53760+a]=t[210][a]}t[211]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å°è±æ¨±å©´é¹°åºç¼¨è¹è¤è¥è§èè¿èµ¢çå½±é¢ç¡¬æ 忥佣èç庸éè¸è¹åæ³³æ¶æ°¸æ¿åç¨å¹½ä¼æ å¿§å°¤ç±é®éç¹æ²¹æ¸¸é æåå³ä½é诱åå¹¼è¿æ·¤äºçæ¦èæèä½ä¿é¾é±¼ææ¸æ¸é äºå¨±é¨ä¸å±¿ç¦¹å®è¯ç¾½çåèéåéå»å³ªå¾¡ææ¬²ç±è²èªï¿½".split("");for(a=0;a!=t[211].length;++a)if(t[211][a].charCodeAt(0)!==65533){r[t[211][a]]=54016+a;e[54016+a]=t[211][a]}t[212]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������浴å¯è£é¢è±«é©é¸³æ¸å¤å å£è¢åæ´è¾åååç¿æºç¼è¿èæ¿æ¨é¢æ°çº¦è¶è·é¥å²³ç²¤ææ¦é èäºé§åé¨å è¿è´é æéµååç ¸ææ ½åç¾å®°è½½åå¨å±ææèµèµèè¬éç³å¿è»æ£æ©æ¾¡è¤èºåªé çç¶ç¥è´£æ©å泽贼æå¢ææ¾èµ æå³æ¸£æè½§ï¿½".split("");for(a=0;a!=t[212].length;++a)if(t[212][a].charCodeAt(0)!==65533){r[t[212][a]]=54272+a;e[54272+a]=t[212][a]}t[213]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é¡é¸ç¨æ 榨åä¹ç¸è¯ææå® çªåºå¯¨ç»æ¯¡è©¹ç²æ²¾çæ©è¾å´å±è¸æ å æç«æ¹ç»½æ¨ç« å½°æ¼³å¼ ææ¶¨æä¸å¸è´¦ä»èç´éæææ¾æ²¼èµµç §ç½©å èå¬é®æå²è°è¾è éèè¿æµçæççç §è»è´é侦æç¹è¯éæ¯ééµè¸æ£çå¾ç°äºææ´æ¯æ£æ¿ï¿½".split("");for(a=0;a!=t[213].length;++a)if(t[213][a].charCodeAt(0)!==65533){r[t[213][a]]=54528+a;e[54528+a]=t[213][a]}t[214]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������帧çéè¯èææ¯å±èç¥è¢èæ±ä¹ç»èç´æ¤æ®æ§å¼ä¾åææ¢è¶¾åªæ¨çº¸å¿ææ·è³è´ç½®å¸å³å¶æºç§©ç¨è´¨ççæ»æ²»çªä¸ç å¿ éè¡·ç»ç§è¿é仲ä¼èå¨å·æ´²è¯ç²¥è½´èå¸åç±å®æ¼éª¤ç æ ªèæ±çªè¯¸è¯é竹çç ®æç©å±ä¸»èæ±å©èè´®é¸ç�".split("");for(a=0;a!=t[214].length;++a)if(t[214][a].charCodeAt(0)!==65533){r[t[214][a]]=54784+a;e[54784+a]=t[214][a]}t[215]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ä½æ³¨ç¥é©»æçªæ½ä¸ç 转æ°èµç¯æ¡©åºè£ å¦æå£®ç¶æ¤é¥è¿½èµå ç¼è°åææåæ¡ç¢èé åçç¼æµå ¹å¨èµå§¿æ»æ·åç´«ä»ç±½æ»åèªæ¸å鬿£è¸ªå®ç»¼æ»çºµé¹èµ°å¥æç§è¶³åæç¥è¯ é»ç»é»çºå´éæç½ªå°éµæ¨å·¦ä½æåä½å座������".split("");for(a=0;a!=t[215].length;++a)if(t[215][a].charCodeAt(0)!==65533){r[t[215][a]]=55040+a;e[55040+a]=t[215][a]}t[216]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������äºä¸å ä¸å»¿å ä¸äºä¸é¬²å¬å©ä¸¨ç¦ºä¸¿åä¹å¤ç»å®æ°åè¤é¦æ¯ç¾é¼ä¸¶äºé¼ä¹ä¹©äºèåå¬åä»ååå£å¥å®é¥èµååµå¦å®å¾èµå¦å£ååååå³å¿åååå¡åè¯å½åååååç½äº»ä»ä»ä»ä»¨ä»¡ä»«ä»ä¼ä»³ä¼¢ä½¤ä»µä¼¥ä¼§ä¼ä¼«ä½ä½§æ¸ä½ä½ï¿½".split("");for(a=0;a!=t[216].length;++a)if(t[216][a].charCodeAt(0)!==65533){r[t[216][a]]=55296+a;e[55296+a]=t[216][a]}t[217]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ä½ä½ä¼²ä¼½ä½¶ä½´ä¾ä¾ä¾ä¾ä½¾ä½»ä¾ªä½¼ä¾¬ä¾ä¿¦ä¿¨ä¿ªä¿ ä¿ä¿£ä¿ä¿ä¿ä¿¸å©å俳å¬åå®å俾ååå¥å¨å¾ååååå¬å»å¥å§å©åºåååå¬å¦å®åå仿°½ä½ä½¥ä¿é¾ æ±ç±´å ®å·½é»é¦åå¤å¹åè¨åå«å¤å äº å 亳衮袤亵èè£ç¦å¬´è 羸å«å±å½å¼ï¿½".split("");for(a=0;a!=t[217].length;++a)if(t[217][a].charCodeAt(0)!==65533){r[t[217][a]]=55552+a;e[55552+a]=t[217][a]}t[218]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ååå¢å¥è® 讦讧讪讴讵讷è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯è¯ 诤诨诩诮诰诳诶诹诼诿è°è°è°è°è°è°è°è°è°è°è°è°è°è°è°è°è° 谡谥谧谪谫谮谯谲谳谵谶å©åºéé¢é¡é±éªé½é¼ééééé§é¬é²é´éééé°ééééé¬é¡é´é³é¶éºï¿½".split("");for(a=0;a!=t[218].length;++a)if(t[218][a].charCodeAt(0)!==65533){r[t[218][a]]=55808+a;e[55808+a]=t[218][a]}t[219]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é¸é°éé é¾ééééé¦é¢éééé«é¯é¾éé¢éé£é±é¯é¹é é åå¥å¢å¬åå¾å¿ååå°åç®çå»´åµå¼é¬¯å¶å¼çå·¯åå©å¡å¡¾å¢¼å£ å£å©å¬åªå³å¹å®å¯åå»åå©å å«åå¼å»å¨åå¶å³åå¤åå²åå§å´åå åååååå¸å´å¯å¸å¤å�".split("");for(a=0;a!=t[219].length;++a)if(t[219][a].charCodeAt(0)!==65533){r[t[219][a]]=56064+a;e[56064+a]=t[219][a]}t[220]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å å å½åå å å å¡å 塥塬å¢å¢å¢å¢é¦¨é¼æ¿è¹è½è¿èèè¨èèèèèè«è¸è¾è°èèè£èè·è®èèèè©è´è¡èªèèèè¤è¡èè·è¤èèèè´èèèè»èèèèèèè èèèèèèèè¼è´è±èèè¯èèèèèèè èèºè³è¦è¥ï¿½".split("");for(a=0;a!=t[220].length;++a)if(t[220][a].charCodeAt(0)!==65533){r[t[220][a]]=56320+a;e[56320+a]=t[220][a]}t[221]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������è¨èè©è¬èªèè®è°è¸è³è´è èªèèè è¼è¶è©è½è¸è»èèè¨èºè¼èèè¥èå èèèè½èèè¸èèèèèèè¸è¹èªè èè¦è°è¡èèèèè³èèèºèè¸è¼èè©è¶èèè±èèèèè¦è½èèè¿èºè è¡è¹è´èè¥è£èçè¸è°è¹èèºï¿½".split("");for(a=0;a!=t[221].length;++a)if(t[221][a].charCodeAt(0)!==65533){r[t[221][a]]=56576+a;e[56576+a]=t[221][a]}t[222]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������èè»è¿è¼èèè¨è¤èèºç¢èè²è»è¤è¨èèè¹è®èè è¹è·è°èèèè¿è§è è©èè¼å»¾å¼å¤¼å¥è·å¥å¥å¥åå°¢å°¥å°¬å°´ææªææ»ææææ®æ¢æ¶æ¹ææææ¶æ±æºææ´ææ¬ææ©æ®æ¼æ²æ¸æ æ¿ææææææ¾æ ææææ ææ¦æ¡ææææï¿½".split("");for(a=0;a!=t[222].length;++a)if(t[222][a].charCodeAt(0)!==65533){r[t[222][a]]=56832+a;e[56832+a]=t[222][a]}t[223]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æºæ·æ¸ææºææææ¤æ¢ææ¥æ®å¼å¿çå¼åå±å½å©å¨å»åååååååååå¡ååå£å²ååå·å±å¤åååå¶å¦ååååå´åå§å¦ååå²å£åå»å¿ååååå©åªå¤ååååå§å å½åå³å¢å£ååå§åªå§ååµååååå¿åå¼ï¿½".split("");for(a=0;a!=t[223].length;++a)if(t[223][a].charCodeAt(0)!==65533){r[t[223][a]]=57088+a;e[57088+a]=t[223][a]}t[224]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å·ååµå¶å·å³å°ååååå±å¹åååå¾ååå»åå½å¾åååªå·åååå«å¬åå¦ååå¯å¥å²å³ååå¨åµå¤è¾ååååå¤å£å¾åå§ååå¹åå¬åå¢åååååå¤å±å«å»å¼å åå¯åååå¡åµå«å¹å¿ååååå¸å¸å¸å¸å¸±å¸»å¸¼ï¿½".split("");for(a=0;a!=t[224].length;++a)if(t[224][a].charCodeAt(0)!==65533){r[t[224][a]]=57344+a;e[57344+a]=t[224][a]}t[225]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������帷å¹å¹å¹å¹å¹¡å²å±ºå²å²å²å²å²å²å²å²å²å²µå²¢å²½å²¬å²«å²±å²£å³å²·å³å³å³¤å³å³¥å´å´å´§å´¦å´®å´¤å´å´å´åµå´¾å´´å´½åµ¬åµåµ¯åµåµ«åµåµåµ©åµ´å¶å¶å¶è±³å¶·å· 彳彷å¾å¾å¾å¾å¾å¾å¾å¾¨å¾å¾µå¾¼è¡¢å½¡çç°ç´ç·ç¸çççççç¨ç¯ç©ç²ç´ç·çç³ççºï¿½".split("");for(a=0;a!=t[225].length;++a)if(t[225][a].charCodeAt(0)!==65533){r[t[225][a]]=57600+a;e[57600+a]=t[225][a]}t[226]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç»ççç¡ççççç¢ç¹ç¥ç¬ç¸ç±çççç ç¬ç¯ç¾è夥飧夤å¤é¥£é¥§é¥¨é¥©é¥ªé¥«é¥¬é¥´é¥·é¥½é¦é¦é¦é¦é¦é¦é¦é¦é¦é¦åºåºåºåºåº¥åº 庹庵庾庳èµå»å»å»å»¨å»ªèºå¿å¿å¿å¿æå¿®æå¿¡å¿¤å¿¾æ æå¿ªå¿å¿¸ææµæ¦ææææ©æ«ææ¿æ¡æ¸æ¹æ»æºæï¿½".split("");for(a=0;a!=t[226].length;++a)if(t[226][a].charCodeAt(0)!==65533){r[t[226][a]]=57856+a;e[57856+a]=t[226][a]}t[227]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æªæ½æææææææææ¬æ»æ±æææææ´æ æ¦ææ£æ´æææ«æ æ µæ¬ææ§æ·ææµå¿é³é©é«é±é³éµé¶é¼é¾éééééééééééééééä¸¬ç¿ææ°µæ±æ±æ±æ²£æ² æ²æ²æ²æ±¨æ±©æ±´æ±¶æ²æ²©æ³æ³æ²æ³·æ³¸æ³±æ³æ²²æ³ æ³æ³ºæ³«æ³®æ²±æ³æ³¯æ³¾ï¿½".split("");for(a=0;a!=t[227].length;++a)if(t[227][a].charCodeAt(0)!==65533){r[t[227][a]]=58112+a;e[58112+a]=t[227][a]}t[228]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ´¹æ´§æ´æµæµæ´æ´æ´æ´æ´«æµæ´®æ´µæ´æµæµæµæ´³æ¶æµ¯æ¶æ¶ æµæ¶æ¶æµæµ æµ¼æµ£æ¸æ·æ· æ·æ¸æ¶¿æ· æ¸æ·¦æ·æ·æ¸æ¶«æ¸æ¶®æ¸«æ¹®æ¹æ¹«æº²æ¹æºæ¹æ¹æ¸²æ¸¥æ¹æ»æº±æºæ» æ¼æ»¢æº¥æº§æº½æº»æº·æ»æº´æ»æºæ»æºæ½¢æ½æ½æ¼¤æ¼æ»¹æ¼¯æ¼¶æ½æ½´æ¼ªæ¼æ¼©æ¾æ¾æ¾æ½¸æ½²æ½¼æ½ºæ¿ï¿½".split("");for(a=0;a!=t[228].length;++a)if(t[228][a].charCodeAt(0)!==65533){r[t[228][a]]=58368+a;e[58368+a]=t[228][a]}t[229]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¿æ¾§æ¾¹æ¾¶æ¿æ¿¡æ¿®æ¿æ¿ 濯çç£çç¹çµççå®å®å®å®å®¥å®¸ç¯éªæ´å¯¤å¯®è¤°å¯°è¹è¬è¾¶è¿è¿è¿¥è¿®è¿¤è¿©è¿¦è¿³è¿¨é ééé¦éééé¡éµé¶éé¯ééééé¨éé¢éæ¹é´é½ééééå½å½å½å½å°»å«å±å±å±å±£å±¦ç¾¼å¼ªå¼©å¼è´å¼¼é¬»å±®å¦å¦å¦å¦©å¦ªå¦£ï¿½".split("");for(a=0;a!=t[229].length;++a)if(t[229][a].charCodeAt(0)!==65533){r[t[229][a]]=58624+a;e[58624+a]=t[229][a]}t[230]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������å¦å§å¦«å¦å¦¤å§å¦²å¦¯å§å¦¾å¨ å¨å§å¨å§£å§å§¹å¨å¨å¨²å¨´å¨å¨£å¨å©å©§å©å©å¨¼å©¢å©µè¬åªªåªå©·å©ºåª¾å««åª²å«å«åª¸å« 嫣嫱å«å«¦å«å«å¬å¬å¬å¬²å¬·åå°å°åå¥å³ååå¢é©µé©·é©¸é©ºé©¿é©½éªéªéª éªéªéªéªéªéªéªéªéªéªéªéª 骢骣骥骧çºçº¡çº£çº¥çº¨çº©ï¿½".split("");for(a=0;a!=t[230].length;++a)if(t[230][a].charCodeAt(0)!==65533){r[t[230][a]]=58880+a;e[58880+a]=t[230][a]}t[231]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������çºçº°çº¾ç»ç»ç»ç»ç»ç»ç»ç»ç»ç»ç» 绡绨绫绮绯绱绲ç¼ç»¶ç»ºç»»ç»¾ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼ç¼¡ç¼¢ç¼£ç¼¤ç¼¥ç¼¦ç¼§ç¼ªç¼«ç¼¬ç¼ç¼¯ç¼°ç¼±ç¼²ç¼³ç¼µå¹ºç¿å·ç¾éççç®ç¢ççççç·ç³çççç¥ç顼çç©ç§ççºç²ççªçç¦ç¥ç¨ç°ç®ç¬ï¿½".split("");for(a=0;a!=t[231].length;++a)if(t[231][a].charCodeAt(0)!==65533){r[t[231][a]]=59136+a;e[59136+a]=t[231][a]}t[232]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������çççççççç·çç¾çççççççç¨ç©çç§ççºéªé«é¬æææææ©æ¥ææªæ³ææ§æµæ¨ææææ·æ¼æ°æ ææ æ©æ°æ ææµææ³ææ ææ¸æ¢æ ææ½æ ²æ ³æ¡ æ¡¡æ¡æ¡¢æ¡æ¡¤æ¢æ æ¡æ¡¦æ¡æ¡§æ¡æ ¾æ¡æ¡æ ©æ¢µæ¢æ¡´æ¡·æ¢æ¡«æ£æ¥®æ£¼æ¤æ¤ 棹�".split("");for(a=0;a!=t[232].length;++a)if(t[232][a].charCodeAt(0)!==65533){r[t[232][a]]=59392+a;e[59392+a]=t[232][a]}t[233]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¤¤æ£°æ¤æ¤æ¥æ££æ¤æ¥±æ¤¹æ¥ æ¥æ¥æ¦æ¥«æ¦æ¦æ¥¸æ¤´æ§æ¦æ¦æ§æ¦æ¥¦æ¥£æ¥¹æ¦æ¦§æ¦»æ¦«æ¦æ§æ¦±æ§æ§æ§æ¦æ§ æ¦æ§¿æ¨¯æ§æ¨æ¨æ©¥æ§²æ©æ¨¾æª æ©æ©æ¨µæªæ©¹æ¨½æ¨¨æ©æ©¼æªæªæª©æªæª«ç·çæ®æ®æ®æ®æ®æ®æ®æ®æ®æ®¡æ®ªè½«è½è½±è½²è½³è½µè½¶è½¸è½·è½¹è½ºè½¼è½¾è¾è¾è¾è¾è¾ï¿½".split("");for(a=0;a!=t[233].length;++a)if(t[233][a].charCodeAt(0)!==65533){r[t[233][a]]=59648+a;e[59648+a]=t[233][a]}t[234]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������è¾è¾è¾è¾è¾è»æææææ¢æ¡æ¥æ¤æ¬è§ç¯ç´ç¿çççæ´æ®æ¯æ°æææ²æææç æ·ææ´æ±æ¶æµèææææææ¡ææ·æææ§ææ¾æææ¦æ©è´²è´³è´¶è´»è´½èµèµ èµèµèµèµèµèµèµè§è§è§è§è§è§è§è§ç®ççç¦ç¯ç¾ç¿çççççææ²æ°ï¿½".split("");for(a=0;a!=t[234].length;++a)if(t[234][a].charCodeAt(0)!==65533){r[t[234][a]]=59904+a;e[59904+a]=t[234][a]}t[235]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¿æèæ¯ªæ¯³æ¯½æ¯µæ¯¹æ° æ°æ°æ°æ°æ°æ°æ°æ°¡æ°©æ°¤æ°ªæ°²æµææ«çççç°è¢åèèèè¼æè½è±è«èè´è·è§è¨è©èªèèèèèèæèè«è±è´èèèè²è¼æèè±è¶èè¬èè²è è è è ´è è è ±è è ©è ¼è ½è è §å¡åªµèèèæ»è£èªèæ¦èè»ï¿½".split("");for(a=0;a!=t[235].length;++a)if(t[235][a].charCodeAt(0)!==65533){r[t[235][a]]=60160+a;e[60160+a]=t[235][a]}t[236]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������èè¦æ¬¤æ¬·æ¬¹æææé£é£é£é£é£é£æ®³å½æ¯è§³æé½ææ¼æææææææççççç»çç·ç«ç±ç¨ççççç¯ç±ç ³ç ç ¨ç ç ²ç ç ¸ç ºçç³çµç¨ç ç çç§ç¹çç¨ç¬çç ¦ç¹æ¾æ½æææç¤»ç¥ç¥ç¥ç¥ç¥ç¥ç¥ç¥¢ç¥ç¥ ç¥¯ç¥§ç¥ºç¦ ç¦ç¦ç¦§ç¦³å¿å¿ï¿½".split("");for(a=0;a!=t[236].length;++a)if(t[236][a].charCodeAt(0)!==65533){r[t[236][a]]=60416+a;e[60416+a]=t[236][a]}t[237]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½æ¼æææ§æææ£æ«æææ æ©ææææèè¿æ²æ³¶æ·¼ç¶ç¸ç ç ç ç ç æ«ç ç ç ç ¹ç ºç »ç ç ¼ç ¥ç ¬ç £ç ©ç¡ç¡ç¡ç¡ç ¦ç¡ç¡ç¡ç¡ªç¢ç¢ç¢ç¢ç¢ç¢¡ç¢£ç¢²ç¢¹ç¢¥ç£ç£ç£ç£¬ç£²ç¤ 磴ç¤ç¤¤ç¤ç¤´é¾é»¹é»»é»¼ç±ççç¹çççç¢ççç¦çµç¸çççççç¨ï¿½".split("");for(a=0;a!=t[237].length;++a)if(t[237][a].charCodeAt(0)!==65533){r[t[237][a]]=60672+a;e[60672+a]=t[237][a]}t[238]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç¢ç¥ç¿çç½ççççç ç°çµç½çºçççççç²ç¹çç½ç½¡ç½è©ç½¨ç½´ç½±ç½¹ç¾ç½¾çç¥è ²é ééééééééééééééé£é¤é«éªéé¬é¯é°é²é´é¶é·é¸é¹éºé¼é½é¿éééééééééééééééééééé é¢é¤é¥é§é¨éªï¿½".split("");for(a=0;a!=t[238].length;++a)if(t[238][a].charCodeAt(0)!==65533){r[t[238][a]]=60928+a;e[60928+a]=t[238][a]}t[239]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é©é«é®é¯é³é´éµé·é¹é¼é½é¿éééééééééééééééééééé¢éªé«é©é¬é±é²é´é¶é·é¸é¼é¾é¿ééµéé ééééééééééééééééé¡é¢é¤é¥é¦é§é¨é©éªé«é¬é¯é±é²é³éºç§ç¬éç§ç§ç§£ç§«ç¨åµç¨ç¨ç¨ç¨ï¿½".split("");for(a=0;a!=t[239].length;++a)if(t[239][a].charCodeAt(0)!==65533){r[t[239][a]]=61184+a;e[61184+a]=t[239][a]}t[240]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������稹稷ç©é»é¦¥ç©°ççççç¤çç ç¬é¸ 鸢鸨鸩鸪鸫鸬鸲鸱鸶鸸鸷鸹鸺鸾é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹é¹£é¹¦é¹§é¹¨é¹©é¹ªé¹«é¹¬é¹±é¹é¹³çççç çç¬ç£ç³ç´ç¸çç±ç°ççççç£ç¨ç¦ç¤ç«ç§çç±ç¼ç¿ççç çççç¥ççç�".split("");for(a=0;a!=t[240].length;++a)if(t[240][a].charCodeAt(0)!==65533){r[t[240][a]]=61440+a;e[61440+a]=t[240][a]}t[241]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������çç¼ç¢ç ççç°ç¿çµçç¾ç³çççççç«ç¯ç¿ç«¦ç©¸ç©¹çªçªçªçªçª¦çª 窬窨çªçª³è¡¤è¡©è¡²è¡½è¡¿è¢è¢¢è£è¢·è¢¼è£è£¢è£è££è£¥è£±è¤è£¼è£¨è£¾è£°è¤¡è¤è¤è¤è¤è¤´è¤«è¤¶è¥è¥¦è¥»çè¥ç²ç´çèèèèè è¢è¥è¦è§è©è¨è±èèµèèèèè©è±è¦é¡¸é¢é¢ï¿½".split("");for(a=0;a!=t[241].length;++a)if(t[241][a].charCodeAt(0)!==65533){r[t[241][a]]=61696+a;e[61696+a]=t[241][a]}t[242]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é¢é¢é¢é¢é¢é¢é¢é¢é¢é¢¡é¢¢é¢¥é¢¦èèè¬è®è¿èºè¼è»è¨èèè¬èè§è£èªèè©è¶èèµèè°èºè±è¯èèè´è©è±è²èè³èèèè´èèèèèè¸èèèèè£è»èè¥è®èè¾èè´è±è©è·è¿èè¢è½è¾è»è è°èè®èèè£è¼è¤èè¥èè¯è¨è�".split("");for(a=0;a!=t[242].length;++a)if(t[242][a].charCodeAt(0)!==65533){r[t[242][a]]=61952+a;e[61952+a]=t[242][a]}t[243]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������èèè èèèè«è¥è¬èµè³èèè½èèèèèªè è®è è è¾è è è ¡è ¹è ¼ç¼¶ç½ç½ç½ è竺竽ç¬ç¬ç¬ç¬ç¬ç¬«ç¬ç笸笪ç¬ç¬®ç¬±ç¬ 笥笤笳笾ç¬ççç çµççç ç®ç»ç¢ç²ç±ç®ç®¦ç®§ç®¸ç®¬ç®ç®¨ç® 箪ç®ç®¢ç®«ç®´ç¯ç¯ç¯ç¯ç¯ç¯¥ç¯¦ç¯ªç°ç¯¾ç¯¼ç°ç°ç°ï¿½".split("");for(a=0;a!=t[243].length;++a)if(t[243][a].charCodeAt(0)!==65533){r[t[243][a]]=62208+a;e[62208+a]=t[243][a]}t[244]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������ç°ç°ªç°¦ç°¸ç±ç±è¾èèèè¬è¡è¡è¢è£èè¯è¨è«è¸è»è³è´è¾èèèèèèè¨è¡¾è¢ è¢è£è£è¥ç¾ç¾ç¾§ç¾¯ç¾°ç¾²ç±¼æç²ç²ç²ç²ç²¢ç²²ç²¼ç²½ç³ç³ç³ç³ç³ç³ ç³ç³¨è®æ¨ç¾¿ç¿ç¿ç¿¥ç¿¡ç¿¦ç¿©ç¿®ç¿³ç³¸çµ·ç¶¦ç¶®ç¹çºéº¸éº´èµ³è¶è¶è¶è¶±èµ§èµè±è±é é é é é ¤ï¿½".split("");for(a=0;a!=t[244].length;++a)if(t[244][a].charCodeAt(0)!==65533){r[t[244][a]]=62464+a;e[62464+a]=t[244][a]}t[245]="ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½é ¢é ¡é °é ©é ¯é ½é ¾é ²é ´é ¹éé éééé¢é£éªéé®é¯éµé´éºè±é¹¾è¶¸è·«è¸ è¹è¹©è¶µè¶¿è¶¼è¶ºè·è·è·è·è·è·è·è·è·è·¬è··è·¸è·£è·¹è·»è·¤è¸è·½è¸è¸è¸è¸¬è¸®è¸£è¸¯è¸ºè¹è¸¹è¸µè¸½è¸±è¹è¹è¹è¹è¹è¹è¹°è¹¶è¹¼è¹¯è¹´èº èºèºèºèºèºè±¸è²è²è² è²è²æè§è§è§è§ï¿½".split("");for(a=0;a!=t[245].length;++a)if(t[245][a].charCodeAt(0)!==65533){r[t[245][a]]=62720+a;e[62720+a]=t[245][a]}t[246]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������觥觫觯訾謦éé©é³é¯ééééééªéé°é¾é¾é¾é¾ é¾é¾é¾é¾é¾é¾é»¾é¼é¼é¹é¼é½ééç¿é éé®éé¾éªééé¾é«é±¿é²é² é²é²é²ç¨£é²é²é²é²é²é²é²é²é²é²é²é² 鲡鲢鲣鲥鲦鲧鲨鲩鲫é²é²®é²°é²±é²²é²³é²´é²µé²¶é²·é²ºé²»é²¼é²½é³é³ é³é³é³é³ï¿½".split("");for(a=0;a!=t[246].length;++a)if(t[246][a].charCodeAt(0)!==65533){r[t[246][a]]=62976+a;e[62976+a]=t[246][a]}t[247]="�����������������������������������������������������������������������������������������������������������������������������������������������������������������é³é³é³é³é³é³é³é³é³é³é³é³é³é³é³¢é¼é éééé¯é«é£é²é´éª±éª°éª·é¹éª¶éªºéª¼é«é«é« é«é«é«é«é éééééé飨é¤é¤®é¥é¥é«é«¡é«¦é«¯é««é«»é«é«¹é¬é¬é¬é¬é¬£éº½éº¾ç¸»éºéºéºéºéºééºéºé»é»é»é» é»é»¢é»©é»§é»¥é»ªé»¯é¼¢é¼¬é¼¯é¼¹é¼·é¼½é¼¾é½ï¿½".split("");for(a=0;a!=t[247].length;++a)if(t[247][a].charCodeAt(0)!==65533){r[t[247][a]]=63232+a;e[63232+a]=t[247][a]}return{enc:r,dec:e}}();cptable[10029]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�ÃÄÄÃÄÃÃÃ¡Ä ÄäÄÄÄ鏟ÄÃÄÄÄÄóÄôöõúÄÄüâ °Ä£§â¢Â¶Ã®©â¢Ä¨â ģĮįĪâ¤â¥Ä«Ä¶ââÅĻļĽľĹĺŠÅŬâÅÅâ«»â¦Â ÅÅÃÅÅââââââ÷âÅÅÅÅâ¹âºÅÅÅÅ ââÅ¡ÅÅÃŤťÃŽžŪÃÃūŮÃůŰűŲųÃýķŻÅżĢË",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[10079]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Ãà ÃÃÃÃÃáà âäãåçéèêëÃìîïñóòôöõúùûü𢣧â¢Â¶Ã®©â¢Â´Â¨â ÃÃâ±â¤â¥Â¥ÂµâââÏâ«ÂªÂºâ¦Ã¦Ã¸Â¿Â¡Â¬âÆââ«»â¦Â ÃÃÃÅÅââââââ÷âÿŸâ¤ÃðÃþý·âââ°ÃÃÃÃÃÃÃÃÃÃÃ�ÃÃÃÃıË˯ËË˸ËËË",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[10081]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�Ãà ÃÃÃÃÃáà âäãåçéèêëÃìîïñóòôöõúùûüâ °¢£§â¢Â¶Ã®©â¢Â´Â¨â ÃÃâ±â¤â¥Â¥ÂµâââÏâ«ÂªÂºâ¦Ã¦Ã¸Â¿Â¡Â¬âÆââ«»â¦Â ÃÃÃÅÅââââââ÷âÿŸÄÄİıÅÅâ¡Â·âââ°ÃÃÃÃÃÃÃÃÃÃÃ�ÃÃÃÃ�Ë˯ËË˸ËËË",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();cptable[28591]=function(){var e="\0�������\b\t\n\x0B\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~� Â ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÃÃÃÃÃà ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþÿ",r=[],t={};for(var a=0;a!=e.length;++a){if(e.charCodeAt(a)!==65533)t[e.charAt(a)]=a;r[a]=e.charAt(a)}return{enc:t,dec:r}}();if(typeof module!=="undefined"&&module.exports&&typeof DO_NOT_EXPORT_CODEPAGE==="undefined")module.exports=cptable;(function(e,r){"use strict";if(typeof cptable==="undefined"){if(typeof require!=="undefined"){var t=cptable;if(typeof module!=="undefined"&&module.exports&&typeof DO_NOT_EXPORT_CODEPAGE==="undefined")module.exports=r(t);else e.cptable=r(t)}else throw new Error("cptable not found")}else cptable=r(cptable)})(this,function(e){"use strict";var r={1200:"utf16le",1201:"utf16be",12000:"utf32le",12001:"utf32be",16969:"utf64le",20127:"ascii",65000:"utf7",65001:"utf8"};var t=[874,1250,1251,1252,1253,1254,1255,1256,1e4];var a=[932,936,949,950];var n=[65001];var i={};var s={};var f={};var l={};var o=function D(e){return String.fromCharCode(e)};var c=function P(e){return e.charCodeAt(0)};var h=typeof Buffer!=="undefined";var u=function(){};if(h){var d=!Buffer.from;if(!d)try{Buffer.from("foo","utf8")}catch(v){d=true}u=d?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer);if(!Buffer.allocUnsafe)Buffer.allocUnsafe=function(e){return new Buffer(e)};var p=1024,m=Buffer.allocUnsafe(p);var g=function L(e){var r=Buffer.allocUnsafe(65536);for(var t=0;t<65536;++t)r[t]=0;var a=Object.keys(e),n=a.length;for(var i=0,s=a[i];i<n;++i){if(!(s=a[i]))continue;r[s.charCodeAt(0)]=e[s]}return r};var b=function M(r){var t=g(e[r].enc);return function a(e,r){var a=e.length;var n,i=0,s=0,f=0,l=0;if(typeof e==="string"){n=Buffer.allocUnsafe(a);for(i=0;i<a;++i)n[i]=t[e.charCodeAt(i)]}else if(Buffer.isBuffer(e)){ 64878n=Buffer.allocUnsafe(2*a);s=0;for(i=0;i<a;++i){f=e[i];if(f<128)n[s++]=t[f];else if(f<224){n[s++]=t[((f&31)<<6)+(e[i+1]&63)];++i}else if(f<240){n[s++]=t[((f&15)<<12)+((e[i+1]&63)<<6)+(e[i+2]&63)];i+=2}else{l=((f&7)<<18)+((e[i+1]&63)<<12)+((e[i+2]&63)<<6)+(e[i+3]&63);i+=3;if(l<65536)n[s++]=t[l];else{l-=65536;n[s++]=t[55296+(l>>10&1023)];n[s++]=t[56320+(l&1023)]}}}n=n.slice(0,s)}else{n=Buffer.allocUnsafe(a);for(i=0;i<a;++i)n[i]=t[e[i].charCodeAt(0)]}if(!r||r==="buf")return n;if(r!=="arr")return n.toString("binary");return[].slice.call(n)}};var w=function U(r){var t=e[r].dec;var a=Buffer.allocUnsafe(131072),n=0,i="";for(n=0;n<t.length;++n){if(!(i=t[n]))continue;var s=i.charCodeAt(0);a[2*n]=s&255;a[2*n+1]=s>>8}return function f(e){var r=e.length,t=0,n=0;if(2*r>p){p=2*r;m=Buffer.allocUnsafe(p)}if(Buffer.isBuffer(e)){for(t=0;t<r;t++){n=2*e[t];m[2*t]=a[n];m[2*t+1]=a[n+1]}}else if(typeof e==="string"){for(t=0;t<r;t++){n=2*e.charCodeAt(t);m[2*t]=a[n];m[2*t+1]=a[n+1]}}else{for(t=0;t<r;t++){n=2*e[t];m[2*t]=a[n];m[2*t+1]=a[n+1]}}return m.slice(0,2*r).toString("ucs2")}};var k=function B(r){var t=e[r].enc;var a=Buffer.allocUnsafe(131072);for(var n=0;n<131072;++n)a[n]=0;var i=Object.keys(t);for(var s=0,f=i[s];s<i.length;++s){if(!(f=i[s]))continue;var l=f.charCodeAt(0);a[2*l]=t[f]&255;a[2*l+1]=t[f]>>8}return function o(e,r){var t=e.length,n=Buffer.allocUnsafe(2*t),i=0,s=0,f=0,l=0,o=0;if(typeof e==="string"){for(i=l=0;i<t;++i){s=e.charCodeAt(i)*2;n[l++]=a[s+1]||a[s];if(a[s+1]>0)n[l++]=a[s]}n=n.slice(0,l)}else if(Buffer.isBuffer(e)){for(i=l=0;i<t;++i){o=e[i];if(o<128)s=o;else if(o<224){s=((o&31)<<6)+(e[i+1]&63);++i}else if(o<240){s=((o&15)<<12)+((e[i+1]&63)<<6)+(e[i+2]&63);i+=2}else{s=((o&7)<<18)+((e[i+1]&63)<<12)+((e[i+2]&63)<<6)+(e[i+3]&63);i+=3}if(s<65536){s*=2;n[l++]=a[s+1]||a[s];if(a[s+1]>0)n[l++]=a[s]}else{f=s-65536;s=2*(55296+(f>>10&1023));n[l++]=a[s+1]||a[s];if(a[s+1]>0)n[l++]=a[s];s=2*(56320+(f&1023));n[l++]=a[s+1]||a[s];if(a[s+1]>0)n[l++]=a[s]}}n=n.slice(0,l)}else{for(i=l=0;i<t;i++){s=e[i].charCodeAt(0)*2;n[l++]=a[s+1]||a[s];if(a[s+1]>0)n[l++]=a[s]}}if(!r||r==="buf")return n;if(r!=="arr")return n.toString("binary");return[].slice.call(n)}};var
vendor: 7,025 bytes, line 64878
64878A=function W(r){var t=e[r].dec;var a=Buffer.allocUnsafe(131072),n=0,i,s=0,f=0,l=0;for(l=0;l<65536;++l){a[2*l]=255;a[2*l+1]=253}for(n=0;n<t.length;++n){if(!(i=t[n]))continue;s=i.charCodeAt(0);f=2*n;a[f]=s&255;a[f+1]=s>>8}return function o(e){var r=e.length,t=Buffer.allocUnsafe(2*r),n=0,i=0,s=0;if(Buffer.isBuffer(e)){for(n=0;n<r;n++){i=2*e[n];if(a[i]===255&&a[i+1]===253){i=2*((e[n]<<8)+e[n+1]);++n}t[s++]=a[i];t[s++]=a[i+1]}}else if(typeof e==="string"){for(n=0;n<r;n++){i=2*e.charCodeAt(n);if(a[i]===255&&a[i+1]===253){i=2*((e.charCodeAt(n)<<8)+e.charCodeAt(n+1));++n}t[s++]=a[i];t[s++]=a[i+1]}}else{for(n=0;n<r;n++){i=2*e[n];if(a[i]===255&&a[i+1]===253){i=2*((e[n]<<8)+e[n+1]);++n}t[s++]=a[i];t[s++]=a[i+1]}}return t.slice(0,s).toString("ucs2")}};i[65001]=function z(e){if(typeof e==="string")return z(e.split("").map(c));var r=e.length,t=0,a=0;if(4*r>p){p=4*r;m=Buffer.allocUnsafe(p)}var n=0;if(r>=3&&e[0]==239)if(e[1]==187&&e[2]==191)n=3;for(var i=1,s=0,f=0;n<r;n+=i){i=1;f=e[n];if(f<128)t=f;else if(f<224){t=(f&31)*64+(e[n+1]&63);i=2}else if(f<240){t=((f&15)<<12)+(e[n+1]&63)*64+(e[n+2]&63);i=3}else{t=(f&7)*262144+((e[n+1]&63)<<12)+(e[n+2]&63)*64+(e[n+3]&63);i=4}if(t<65536){m[s++]=t&255;m[s++]=t>>8}else{t-=65536;a=55296+(t>>10&1023);t=56320+(t&1023);m[s++]=a&255;m[s++]=a>>>8;m[s++]=t&255;m[s++]=t>>>8&255}}return m.slice(0,s).toString("ucs2")};s[65001]=function H(e,r){if(h&&Buffer.isBuffer(e)){if(!r||r==="buf")return e;if(r!=="arr")return e.toString("binary");return[].slice.call(e)}var t=e.length,a=0,n=0,i=0;var s=typeof e==="string";if(4*t>p){p=4*t;m=Buffer.allocUnsafe(p)}for(var f=0;f<t;++f){a=s?e.charCodeAt(f):e[f].charCodeAt(0);if(a<=127)m[i++]=a;else if(a<=2047){m[i++]=192+(a>>6);m[i++]=128+(a&63)}else if(a>=55296&&a<=57343){a-=55296;++f;n=(s?e.charCodeAt(f):e[f].charCodeAt(0))-56320+(a<<10);m[i++]=240+(n>>>18&7);m[i++]=144+(n>>>12&63);m[i++]=128+(n>>>6&63);m[i++]=128+(n&63)}else{m[i++]=224+(a>>12);m[i++]=128+(a>>6&63);m[i++]=128+(a&63)}}if(!r||r==="buf")return m.slice(0,i);if(r!=="arr")return m.slice(0,i).toString("binary");return[].slice.call(m,0,i)}}var T=function V(){if(h){if(f[t[0]])return;var r=0,o=0;for(r=0;r<t.length;++r){o=t[r];if(e[o]){f[o]=w(o);l[o]=b(o)}}for(r=0;r<a.length;++r){o=a[r];if(e[o]){f[o]=A(o);l[o]=k(o)}}for(r=0;r<n.length;++r){o=n[r];if(i[o])f[o]=i[o];if(s[o])l[o]=s[o]}}};var y=function(e,r){void r;return""};var E=function $(e){delete f[e];delete l[e]};var C=function X(){if(h){if(!f[t[0]])return;t.forEach(E);a.forEach(E);n.forEach(E)}O=y;I=0};var _={encache:T,decache:C,sbcs:t,dbcs:a};T();var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'(),-./:?";var O=y,I=0;var R=function G(t,a,n){if(t===I&&O){return O(a,n)}if(l[t]){O=l[I=t];return O(a,n)}if(h&&Buffer.isBuffer(a))a=a.toString("utf8");var i=a.length;var s=h?Buffer.allocUnsafe(4*i):[],f=0,c=0,d=0,v=0;var p=e[t],m,g="";var b=typeof a==="string";if(p&&(m=p.enc))for(c=0;c<i;++c,++d){f=m[b?a.charAt(c):a[c]];if(f>255){s[d]=f>>8;s[++d]=f&255}else s[d]=f&255}else if(g=r[t])switch(g){case"utf8":if(h&&b){s=u(a,g);d=s.length;break}for(c=0;c<i;++c,++d){f=b?a.charCodeAt(c):a[c].charCodeAt(0);if(f<=127)s[d]=f;else if(f<=2047){s[d]=192+(f>>6);s[++d]=128+(f&63)}else if(f>=55296&&f<=57343){f-=55296;v=(b?a.charCodeAt(++c):a[++c].charCodeAt(0))-56320+(f<<10);s[d]=240+(v>>>18&7);s[++d]=144+(v>>>12&63);s[++d]=128+(v>>>6&63);s[++d]=128+(v&63)}else{s[d]=224+(f>>12);s[++d]=128+(f>>6&63);s[++d]=128+(f&63)}}break;case"ascii":if(h&&typeof a==="string"){s=u(a,g);d=s.length;break}for(c=0;c<i;++c,++d){f=b?a.charCodeAt(c):a[c].charCodeAt(0);if(f<=127)s[d]=f;else throw new Error("bad ascii "+f)}break;case"utf16le":if(h&&typeof a==="string"){s=u(a,g);d=s.length;break}for(c=0;c<i;++c){f=b?a.charCodeAt(c):a[c].charCodeAt(0);s[d++]=f&255;s[d++]=f>>8}break;case"utf16be":for(c=0;c<i;++c){f=b?a.charCodeAt(c):a[c].charCodeAt(0);s[d++]=f>>8;s[d++]=f&255}break;case"utf32le":for(c=0;c<i;++c){f=b?a.charCodeAt(c):a[c].charCodeAt(0);if(f>=55296&&f<=57343)f=65536+(f-55296<<10)+(a[++c].charCodeAt(0)-56320);s[d++]=f&255;f>>=8;s[d++]=f&255;f>>=8;s[d++]=f&255;f>>=8;s[d++]=f&255}break;case"utf32be":for(c=0;c<i;++c){f=b?a.charCodeAt(c):a[c].charCodeAt(0);if(f>=55296&&f<=57343)f=65536+(f-55296<<10)+(a[++c].charCodeAt(0)-56320);s[d+3]=f&255;f>>=8;s[d+2]=f&255;f>>=8;s[d+1]=f&255;f>>=8;s[d]=f&255;d+=4}break;case"utf7":for(c=0;c<i;c++){var w=b?a.charAt(c):a[c].charAt(0);if(w==="+"){s[d++]=43;s[d++]=45;continue}if(x.indexOf(w)>-1){s[d++]=w.charCodeAt(0);continue}var k=G(1201,w);s[d++]=43;s[d++]=S.charCodeAt(k[0]>>2);s[d++]=S.charCodeAt(((k[0]&3)<<4)+((k[1]||0)>>4));s[d++]=S.charCodeAt(((k[1]&15)<<2)+((k[2]||0)>>6));s[d++]=45}break;default:throw new Error("Unsupported magic: "+t+" "+r[t]);}else throw new Error("Unrecognized CP: "+t);s=s.slice(0,d);if(!h)return n=="str"?s.map(o).join(""):s;if(!n||n==="buf")return s;if(n!=="arr")return s.toString("binary");return[].slice.call(s)};var N=function j(t,a){var n;if(n=f[t])return n(a);if(typeof a==="string")return j(t,a.split("").map(c));var i=a.length,s=new Array(i),l="",o=0,u=0,d=1,v=0,p=0;var m=e[t],g,b="";if(m&&(g=m.dec)){for(u=0;u<i;u+=d){d=2;l=g[(a[u]<<8)+a[u+1]];if(!l){d=1;l=g[a[u]]}if(!l)throw new Error("Unrecognized code: "+a[u]+" "+a[u+d-1]+" "+u+" "+d+" "+g[a[u]]);s[v++]=l}}else if(b=r[t])switch(b){case"utf8":if(i>=3&&a[0]==239)if(a[1]==187&&a[2]==191)u=3;for(;u<i;u+=d){d=1;if(a[u]<128)o=a[u];else if(a[u]<224){o=(a[u]&31)*64+(a[u+1]&63);d=2}else if(a[u]<240){o=((a[u]&15)<<12)+(a[u+1]&63)*64+(a[u+2]&63);d=3}else{o=(a[u]&7)*262144+((a[u+1]&63)<<12)+(a[u+2]&63)*64+(a[u+3]&63);d=4}if(o<65536){s[v++]=String.fromCharCode(o)}else{o-=65536;p=55296+(o>>10&1023);o=56320+(o&1023);s[v++]=String.fromCharCode(p);s[v++]=String.fromCharCode(o)}}break;case"ascii":if(h&&Buffer.isBuffer(a))return a.toString(b);for(u=0;u<i;u++)s[u]=String.fromCharCode(a[u]);v=i;break;case"utf16le":if(i>=2&&a[0]==255)if(a[1]==254)u=2;if(h&&Buffer.isBuffer(a))return a.toString(b);d=2;for(;u+1<i;u+=d){s[v++]=String.fromCharCode((a[u+1]<<8)+a[u])}break;case"utf16be":if(i>=2&&a[0]==254)if(a[1]==255)u=2;d=2;for(;u+1<i;u+=d){s[v++]=String.fromCharCode((a[u]<<8)+a[u+1])}break;case"utf32le":if(i>=4&&a[0]==255)if(a[1]==254&&a[2]===0&&a[3]===0)u=4;d=4;for(;u<i;u+=d){o=(a[u+3]<<24)+(a[u+2]<<16)+(a[u+1]<<8)+a[u];if(o>65535){o-=65536;s[v++]=String.fromCharCode(55296+(o>>10&1023));s[v++]=String.fromCharCode(56320+(o&1023))}else s[v++]=String.fromCharCode(o)}break;case"utf32be":if(i>=4&&a[3]==255)if(a[2]==254&&a[1]===0&&a[0]===0)u=4;d=4;for(;u<i;u+=d){o=(a[u]<<24)+(a[u+1]<<16)+(a[u+2]<<8)+a[u+3];if(o>65535){o-=65536;s[v++]=String.fromCharCode(55296+(o>>10&1023));s[v++]=String.fromCharCode(56320+(o&1023))}else s[v++]=String.fromCharCode(o)}break;case"utf7":if(i>=4&&a[0]==43&&a[1]==47&&a[2]==118){if(i>=5&&a[3]==56&&a[4]==45)u=5;else if(a[3]==56||a[3]==57||a[3]==43||a[3]==47)u=4}for(;u<i;u+=d){if(a[u]!==43){d=1;s[v++]=String.fromCharCode(a[u]);continue}d=1;if(a[u+1]===45){d=2;s[v++]="+";continue}
vendor: 5,612 bytes, line 64878
64878while(String.fromCharCode(a[u+d]).match(/[A-Za-z0-9+\/]/))d++;var w=0;if(a[u+d]===45){++d;w=1}var k=[];var A="";var T=0,y=0,E=0;var C=0,_=0,x=0,O=0;for(var I=1;I<d-w;){C=S.indexOf(String.fromCharCode(a[u+I++]));_=S.indexOf(String.fromCharCode(a[u+I++]));T=C<<2|_>>4;k.push(T);x=S.indexOf(String.fromCharCode(a[u+I++]));if(x===-1)break;y=(_&15)<<4|x>>2;k.push(y);O=S.indexOf(String.fromCharCode(a[u+I++]));if(O===-1)break;E=(x&3)<<6|O;if(O<64)k.push(E)}A=j(1201,k);for(I=0;I<A.length;++I)s[v++]=A.charAt(I)}break;default:throw new Error("Unsupported magic: "+t+" "+r[t]);}else throw new Error("Unrecognized CP: "+t);return s.slice(0,v).join("")};var F=function K(t){return!!(e[t]||r[t])};e.utils={decode:N,encode:R,hascp:F,magic:r,cache:_};return e});var XLSX={};function make_xlsx_lib(e){e.version="0.20.3";var r=1200,t=1252;var a;var n=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4];var i={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969};var s=function(e){if(n.indexOf(e)==-1)return;t=i[0]=e};function f(){s(1252)}var l=function(e){r=e;s(e)};function o(){l(1200);f()}function c(e){var r=[];for(var t=0,a=e.length;t<a;++t)r[t]=e.charCodeAt(t);return r}function h(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return r.join("")}function u(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e[2*t]+(e[2*t+1]<<8));return r.join("")}function d(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return r.join("")}var v=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1);if(r==255&&t==254)return h(e.slice(2));if(r==254&&t==255)return d(e.slice(2));if(r==65279)return e.slice(1);return e};var p=function fA(e){return String.fromCharCode(e)};var m=function lA(e){return String.fromCharCode(e)};function g(e){a=e;l=function(e){r=e;s(e)};v=function(e){if(e.charCodeAt(0)===255&&e.charCodeAt(1)===254){return a.utils.decode(1200,c(e.slice(2)))}return e};p=function n(e){if(r===1200)return String.fromCharCode(e);return a.utils.decode(r,[e&255,e>>8])[0]};m=function i(e){return a.utils.decode(t,[e])[0]};ma()}var b=null;var w=true;var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function A(e){var r="";var t=0,a=0,n=0,i=0,s=0,f=0,l=0;for(var o=0;o<e.length;){t=e.charCodeAt(o++);i=t>>2;a=e.charCodeAt(o++);s=(t&3)<<4|a>>4;n=e.charCodeAt(o++);f=(a&15)<<2|n>>6;l=n&63;if(isNaN(a)){f=l=64}else if(isNaN(n)){l=64}r+=k.charAt(i)+k.charAt(s)+k.charAt(f)+k.charAt(l)}return r}function T(e){var r="";var t=0,a=0,n=0,i=0,s=0,f=0,l=0;for(var o=0;o<e.length;){t=e.charCodeAt(o++);if(t>255)t=95;i=t>>2;a=e.charCodeAt(o++);if(a>255)a=95;s=(t&3)<<4|a>>4;n=e.charCodeAt(o++);if(n>255)n=95;f=(a&15)<<2|n>>6;l=n&63;if(isNaN(a)){f=l=64}else if(isNaN(n)){l=64}r+=k.charAt(i)+k.charAt(s)+k.charAt(f)+k.charAt(l)}return r}function y(e){var r="";var t=0,a=0,n=0,i=0,s=0,f=0,l=0;for(var o=0;o<e.length;){t=e[o++];i=t>>2;a=e[o++];s=(t&3)<<4|a>>4;n=e[o++];f=(a&15)<<2|n>>6;l=n&63;if(isNaN(a)){f=l=64}else if(isNaN(n)){l=64}r+=k.charAt(i)+k.charAt(s)+k.charAt(f)+k.charAt(l)}return r}function E(e){var r="";var t=0,a=0,n=0,i=0,s=0,f=0,l=0;if(e.slice(0,5)=="data:"){var o=e.slice(0,1024).indexOf(";base64,");if(o>-1)e=e.slice(o+8)}e=e.replace(/[^\w\+\/\=]/g,"");for(var o=0;o<e.length;){i=k.indexOf(e.charAt(o++));s=k.indexOf(e.charAt(o++));t=i<<2|s>>4;r+=String.fromCharCode(t);f=k.indexOf(e.charAt(o++));a=(s&15)<<4|f>>2;if(f!==64){r+=String.fromCharCode(a)}l=k.indexOf(e.charAt(o++));n=(f&3)<<6|l;if(l!==64){r+=String.fromCharCode(n)}}return r}var C=function(){return typeof Buffer!=="undefined"&&typeof undefined!=="undefined"&&typeof{}!=="undefined"&&!!{}.node}();var _=function(){if(typeof Buffer!=="undefined"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch(r){e=true}return e?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();var S=function(){if(typeof Buffer==="undefined")return false;var e=_([65,0]);if(!e)return false;var r=e.toString("utf16le");return r.length==1}();function x(e){if(C)return Buffer.alloc?Buffer.alloc(e):new Buffer(e);return typeof Uint8Array!="undefined"?new Uint8Array(e):new Array(e)}function O(e){if(C)return Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e);return typeof Uint8Array!="undefined"?new Uint8Array(e):new Array(e)}var I=function oA(e){if(C)return _(e,"binary");return e.split("").map(function(e){return e.charCodeAt(0)&255})};function R(e){if(typeof ArrayBuffer==="undefined")return I(e);var r=new ArrayBuffer(e.length),t=new Uint8Array(r);for(var a=0;a!=e.length;++a)t[a]=e.charCodeAt(a)&255;return r}function N(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join("");var r=[];for(var t=0;t<e.length;++t)r[t]=String.fromCharCode(e[t]);return r.join("")}function F(e){if(typeof Uint8Array==="undefined")throw new Error("Unsupported");return new Uint8Array(e)}function D(e){if(typeof ArrayBuffer=="undefined")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return D(new Uint8Array(e));var r=new Array(e.length);for(var t=0;t<e.length;++t)r[t]=e[t];return r}var P=C?function(e){return Buffer.concat(e.map(function(e){return Buffer.isBuffer(e)?e:_(e)}))}:function(e){if(typeof Uint8Array!=="undefined"){var r=0,t=0;for(r=0;r<e.length;++r)t+=e[r].length;var a=new Uint8Array(t);var n=0;for(r=0,t=0;r<e.length;t+=n,++r){n=e[r].length;if(e[r]instanceof Uint8Array)a.set(e[r],t);
vendor: 31,698 bytes, lines 64878-64879
64878else if(typeof e[r]=="string")a.set(new Uint8Array(I(e[r])),t);else a.set(new Uint8Array(e[r]),t)}return a}return[].concat.apply([],e.map(function(e){return Array.isArray(e)?e:[].slice.call(e)}))};function L(e){var r=[],t=0,a=e.length+250;var n=x(e.length+255);for(var i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s<128)n[t++]=s;else if(s<2048){n[t++]=192|s>>6&31;n[t++]=128|s&63}else if(s>=55296&&s<57344){s=(s&1023)+64;var f=e.charCodeAt(++i)&1023;n[t++]=240|s>>8&7;n[t++]=128|s>>2&63;n[t++]=128|f>>6&15|(s&3)<<4;n[t++]=128|f&63}else{n[t++]=224|s>>12&15;n[t++]=128|s>>6&63;n[t++]=128|s&63}if(t>a){r.push(n.slice(0,t));t=0;n=x(65535);a=65530}}r.push(n.slice(0,t));return P(r)}var M=/\u0000/g,U=/[\u0001-\u0006]/g;function B(e){var r="",t=e.length-1;while(t>=0)r+=e.charAt(t--);return r}function W(e,r){var t=""+e;return t.length>=r?t:Tr("0",r-t.length)+t}function z(e,r){var t=""+e;return t.length>=r?t:Tr(" ",r-t.length)+t}function H(e,r){var t=""+e;return t.length>=r?t:t+Tr(" ",r-t.length)}function V(e,r){var t=""+Math.round(e);return t.length>=r?t:Tr("0",r-t.length)+t}function X(e,r){var t=""+e;return t.length>=r?t:Tr("0",r-t.length)+t}var G=Math.pow(2,32);function j(e,r){if(e>G||e<-G)return V(e,r);var t=Math.round(e);return X(t,r)}function K(e,r){r=r||0;return e.length>=7+r&&(e.charCodeAt(r)|32)===103&&(e.charCodeAt(r+1)|32)===101&&(e.charCodeAt(r+2)|32)===110&&(e.charCodeAt(r+3)|32)===101&&(e.charCodeAt(r+4)|32)===114&&(e.charCodeAt(r+5)|32)===97&&(e.charCodeAt(r+6)|32)===108}var Y=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]];var Z=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function J(e){if(!e)e={};e[0]="General";e[1]="0";e[2]="0.00";e[3]="#,##0";e[4]="#,##0.00";e[9]="0%";e[10]="0.00%";e[11]="0.00E+00";e[12]="# ?/?";e[13]="# ??/??";e[14]="m/d/yy";e[15]="d-mmm-yy";e[16]="d-mmm";e[17]="mmm-yy";e[18]="h:mm AM/PM";e[19]="h:mm:ss AM/PM";e[20]="h:mm";e[21]="h:mm:ss";e[22]="m/d/yy h:mm";e[37]="#,##0 ;(#,##0)";e[38]="#,##0 ;[Red](#,##0)";e[39]="#,##0.00;(#,##0.00)";e[40]="#,##0.00;[Red](#,##0.00)";e[45]="mm:ss";e[46]="[h]:mm:ss";e[47]="mmss.0";e[48]="##0.0E+0";e[49]="@";e[56]='"ä¸å/ä¸å "hh"æ"mm"å"ss"ç§ "';return e}var q={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"ä¸å/ä¸å "hh"æ"mm"å"ss"ç§ "'};var Q={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0};var ee={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function re(e,r,t){var a=e<0?-1:1;var n=e*a;var i=0,s=1,f=0;var l=1,o=0,c=0;var h=Math.floor(n);while(o<r){h=Math.floor(n);f=h*s+i;c=h*o+l;if(n-h<5e-8)break;n=1/(n-h);i=s;s=f;l=o;o=c}if(c>r){if(o>r){c=l;f=i}else{c=o;f=s}}if(!t)return[0,a*f,c];var u=Math.floor(a*f/c);return[u,a*f-u*c,c]}function te(e){var r=e.toPrecision(16);if(r.indexOf("e")>-1){var t=r.slice(0,r.indexOf("e"));t=t.indexOf(".")>-1?t.slice(0,t.slice(0,2)=="0."?17:16):t.slice(0,15)+Tr("0",t.length-15);return t+r.slice(r.indexOf("e"))}var a=r.indexOf(".")>-1?r.slice(0,r.slice(0,2)=="0."?17:16):r.slice(0,15)+Tr("0",r.length-15);return Number(a)}function ae(e,r,t){if(e>2958465||e<0)return null;e=te(e);var a=e|0,n=Math.floor(86400*(e-a)),i=0;var s=[];var f={D:a,T:n,u:86400*(e-a)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(f.u)<1e-6)f.u=0;if(r&&r.date1904)a+=1462;if(f.u>.9999){f.u=0;if(++n==86400){f.T=n=0;++a;++f.D}}if(a===60){s=t?[1317,10,29]:[1900,2,29];i=3}else if(a===0){s=t?[1317,8,29]:[1900,1,0];i=6}else{if(a>60)--a;var l=new Date(1900,0,1);l.setDate(l.getDate()+a-1);s=[l.getFullYear(),l.getMonth()+1,l.getDate()];i=l.getDay();if(a<60)i=(i+6)%7;if(t)i=ce(l,s)}f.y=s[0];f.m=s[1];f.d=s[2];f.S=n%60;n=Math.floor(n/60);f.M=n%60;n=Math.floor(n/60);f.H=n;f.q=i;return f}function ne(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function ie(e){if(e.indexOf("E")==-1)return e;return e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function se(e){var r=e<0?12:11;var t=ne(e.toFixed(12));if(t.length<=r)return t;t=e.toPrecision(10);if(t.length<=r)return t;return e.toExponential(5)}function fe(e){var r=ne(e.toFixed(11));return r.length>(e<0?12:11)||r==="0"||r==="-0"?e.toPrecision(6):r}function le(e){if(!isFinite(e))return isNaN(e)?"#NUM!":"#DIV/0!";var r=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),t;if(r>=-4&&r<=-1)t=e.toPrecision(10+r);else if(Math.abs(r)<=9)t=se(e);else if(r===10)t=e.toFixed(10).substr(0,12);else t=fe(e);return ne(ie(t.toUpperCase()))}function oe(e,r){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):le(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return ze(14,dr(e,r&&r.date1904),r);}throw new Error("unsupported value in General format: "+e)}function ce(e,r){r[0]-=581;var t=e.getDay();if(e<60)t=(t+6)%7;return t}function he(e,r,t,a){var n="",i=0,s=0,f=t.y,l,o=0;switch(e){case 98:f=t.y+543;case 121:switch(r.length){case 1:;case 2:l=f%100;o=2;break;default:l=f%1e4;o=4;break;}break;case 109:switch(r.length){case 1:;case 2:l=t.m;o=r.length;break;case 3:return Z[t.m-1][1];case 5:return Z[t.m-1][0];default:return Z[t.m-1][2];}break;case 100:switch(r.length){case 1:;case 2:l=t.d;o=r.length;break;case 3:return Y[t.q][0];default:return Y[t.q][1];}break;case 104:switch(r.length){case 1:;case 2:l=1+(t.H+11)%12;o=r.length;break;default:throw"bad hour format: "+r;}break;case 72:switch(r.length){case 1:;case 2:l=t.H;o=r.length;break;default:throw"bad hour format: "+r;}break;case 77:switch(r.length){case 1:;case 2:l=t.M;o=r.length;break;default:throw"bad minute format: "+r;}break;case 115:if(r!="s"&&r!="ss"&&r!=".0"&&r!=".00"&&r!=".000")throw"bad second format: "+r;if(t.u===0&&(r=="s"||r=="ss"))return W(t.S,r.length);if(a>=2)s=a===3?1e3:100;else s=a===1?10:1;i=Math.round(s*(t.S+t.u));if(i>=60*s)i=0;if(r==="s")return i===0?"0":""+i/s;n=W(i,2+a);if(r==="ss")return n.substr(0,2);return"."+n.substr(2,r.length-1);case 90:switch(r){case"[h]":;case"[hh]":l=t.D*24+t.H;break;case"[m]":;case"[mm]":l=(t.D*24+t.H)*60+t.M;break;case"[s]":;case"[ss]":l=((t.D*24+t.H)*60+t.M)*60+(a==0?Math.round(t.S+t.u):t.S);break;default:throw"bad abstime format: "+r;}o=r.length===3?1:2;break;case 101:l=f;o=1;break;}var c=o>0?W(l,o):"";return c}function ue(e){var r=3;if(e.length<=r)return e;var t=e.length%r,a=e.substr(0,t);for(;t!=e.length;t+=r)a+=(a.length>0?",":"")+e.substr(t,r);return a}var de=/%/g;function ve(e,r,t){var a=r.replace(de,""),n=r.length-a.length;return Fe(e,a,t*Math.pow(10,2*n))+Tr("%",n)}function pe(e,r,t){var a=r.length-1;while(r.charCodeAt(a-1)===44)--a;return Fe(e,r.substr(0,a),t/Math.pow(10,3*(r.length-a)))}function me(e,r){var t;var a=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(r==0)return"0.0E+0";else if(r<0)return"-"+me(e,-r);var n=e.indexOf(".");if(n===-1)n=e.indexOf("E");var i=Math.floor(Math.log(r)*Math.LOG10E)%n;if(i<0)i+=n;t=(r/Math.pow(10,i)).toPrecision(a+1+(n+i)%n);if(t.indexOf("e")===-1){var s=Math.floor(Math.log(r)*Math.LOG10E);if(t.indexOf(".")===-1)t=t.charAt(0)+"."+t.substr(1)+"E+"+(s-t.length+i);else t+="E+"+(s-i);while(t.substr(0,2)==="0."){t=t.charAt(0)+t.substr(2,n)+"."+t.substr(2+n);t=t.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.")}t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(e,r,t,a){return r+t+a.substr(0,(n+i)%n)+"."+a.substr(i)+"E"})}else t=r.toExponential(a);if(e.match(/E\+00$/)&&t.match(/e[+-]\d$/))t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1);if(e.match(/E\-/)&&t.match(/e\+/))t=t.replace(/e\+/,"e");return t.replace("e","E")}var ge=/# (\?+)( ?)\/( ?)(\d+)/;function be(e,r,t){var a=parseInt(e[4],10),n=Math.round(r*a),i=Math.floor(n/a);var s=n-i*a,f=a;return t+(i===0?"":""+i)+" "+(s===0?Tr(" ",e[1].length+1+e[4].length):z(s,e[1].length)+e[2]+"/"+e[3]+W(f,e[4].length))}function we(e,r,t){return t+(r===0?"":""+r)+Tr(" ",e[1].length+2+e[4].length)}var ke=/^#*0*\.([0#]+)/;var Ae=/\)[^)]*[0#]/;var Te=/\(###\) ###\\?-####/;function ye(e){var r="",t;for(var a=0;a!=e.length;++a)switch(t=e.charCodeAt(a)){case 35:break;case 63:r+=" ";break;case 48:r+="0";break;default:r+=String.fromCharCode(t);}return r}function Ee(e,r){var t=Math.pow(10,r);return""+Math.round(e*t)/t}function Ce(e,r){var t=e-Math.floor(e),a=Math.pow(10,r);if(r<(""+Math.round(t*a)).length)return 0;return Math.round(t*a)}function _e(e,r){if(r<(""+Math.round((e-Math.floor(e))*Math.pow(10,r))).length){return 1}return 0}function Se(e){if(e<2147483647&&e>-2147483648)return""+(e>=0?e|0:e-1|0);return""+Math.floor(e)}function xe(e,r,t){if(e.charCodeAt(0)===40&&!r.match(Ae)){var a=r.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");if(t>=0)return xe("n",a,t);return"("+xe("n",a,-t)+")"}if(r.charCodeAt(r.length-1)===44)return pe(e,r,t);if(r.indexOf("%")!==-1)return ve(e,r,t);if(r.indexOf("E")!==-1)return me(r,t);if(r.charCodeAt(0)===36)return"$"+xe(e,r.substr(r.charAt(1)==" "?2:1),t);var n;var i,s,f,l=Math.abs(t),o=t<0?"-":"";if(r.match(/^00+$/))return o+j(l,r.length);if(r.match(/^[#?]+$/)){n=j(t,0);if(n==="0")n="";return n.length>r.length?n:ye(r.substr(0,r.length-n.length))+n}if(i=r.match(ge))return be(i,l,o);if(r.match(/^#+0+$/))return o+j(l,r.length-r.indexOf("0"));if(i=r.match(ke)){n=Ee(t,i[1].length).replace(/^([^\.]+)$/,"$1."+ye(i[1])).replace(/\.$/,"."+ye(i[1])).replace(/\.(\d*)$/,function(e,r){return"."+r+Tr("0",ye(i[1]).length-r.length)});return r.indexOf("0.")!==-1?n:n.replace(/^0\./,".")}r=r.replace(/^#+([0.])/,"$1");if(i=r.match(/^(0*)\.(#*)$/)){return o+Ee(l,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".")}if(i=r.match(/^#{1,3},##0(\.?)$/))return o+ue(j(l,0));if(i=r.match(/^#,##0\.([#0]*0)$/)){return t<0?"-"+xe(e,r,-t):ue(""+(Math.floor(t)+_e(t,i[1].length)))+"."+W(Ce(t,i[1].length),i[1].length)}if(i=r.match(/^#,#*,#0/))return xe(e,r.replace(/^#,#*,/,""),t);if(i=r.match(/^([0#]+)(\\?-([0#]+))+$/)){n=B(xe(e,r.replace(/[\\-]/g,""),t));s=0;return B(B(r.replace(/\\/g,"")).replace(/[0#]/g,function(e){return s<n.length?n.charAt(s++):e==="0"?"0":""}))}if(r.match(Te)){n=xe(e,"##########",t);return"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6)}var c="";if(i=r.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/)){s=Math.min(i[4].length,7);f=re(l,Math.pow(10,s)-1,false);n=""+o;c=Fe("n",i[1],f[1]);if(c.charAt(c.length-1)==" ")c=c.substr(0,c.length-1)+"0";n+=c+i[2]+"/"+i[3];c=H(f[2],s);if(c.length<i[4].length)c=ye(i[4].substr(i[4].length-c.length))+c;n+=c;return n}if(i=r.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/)){s=Math.min(Math.max(i[1].length,i[4].length),7);f=re(l,Math.pow(10,s)-1,true);return o+(f[0]||(f[1]?"":"0"))+" "+(f[1]?z(f[1],s)+i[2]+"/"+i[3]+H(f[2],s):Tr(" ",2*s+1+i[2].length+i[3].length))}if(i=r.match(/^[#0?]+$/)){n=j(t,0);if(r.length<=n.length)return n;return ye(r.substr(0,r.length-n.length))+n}if(i=r.match(/^([#0?]+)\.([#0]+)$/)){n=""+t.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1");s=n.indexOf(".");var h=r.indexOf(".")-s,u=r.length-n.length-h;return ye(r.substr(0,h)+n+r.substr(r.length-u))}if(i=r.match(/^00,000\.([#0]*0)$/)){s=Ce(t,i[1].length);return t<0?"-"+xe(e,r,-t):ue(Se(t)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(e){return"00,"+(e.length<3?W(0,3-e.length):"")+e})+"."+W(s,i[1].length)}switch(r){case"###,##0.00":return xe(e,"#,##0.00",t);case"###,###":;case"##,###":;case"#,###":var d=ue(j(l,0));return d!=="0"?o+d:"";case"###,###.00":return xe(e,"###,##0.00",t).replace(/^0\./,".");case"#,###.00":return xe(e,"#,##0.00",t).replace(/^0\./,".");default:;}throw new Error("unsupported format |"+r+"|")}function Oe(e,r,t){var a=r.length-1;while(r.charCodeAt(a-1)===44)--a;return Fe(e,r.substr(0,a),t/Math.pow(10,3*(r.length-a)))}function Ie(e,r,t){var a=r.replace(de,""),n=r.length-a.length;return Fe(e,a,t*Math.pow(10,2*n))+Tr("%",n)}function Re(e,r){var t;var a=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(r==0)return"0.0E+0";else if(r<0)return"-"+Re(e,-r);var n=e.indexOf(".");if(n===-1)n=e.indexOf("E");var i=Math.floor(Math.log(r)*Math.LOG10E)%n;if(i<0)i+=n;t=(r/Math.pow(10,i)).toPrecision(a+1+(n+i)%n);if(!t.match(/[Ee]/)){var s=Math.floor(Math.log(r)*Math.LOG10E);if(t.indexOf(".")===-1)t=t.charAt(0)+"."+t.substr(1)+"E+"+(s-t.length+i);else t+="E+"+(s-i);t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(e,r,t,a){return r+t+a.substr(0,(n+i)%n)+"."+a.substr(i)+"E"})}else t=r.toExponential(a);if(e.match(/E\+00$/)&&t.match(/e[+-]\d$/))t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1);if(e.match(/E\-/)&&t.match(/e\+/))t=t.replace(/e\+/,"e");return t.replace("e","E")}function Ne(e,r,t){if(e.charCodeAt(0)===40&&!r.match(Ae)){var a=r.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");if(t>=0)return Ne("n",a,t);return"("+Ne("n",a,-t)+")"}if(r.charCodeAt(r.length-1)===44)return Oe(e,r,t);if(r.indexOf("%")!==-1)return Ie(e,r,t);if(r.indexOf("E")!==-1)return Re(r,t);if(r.charCodeAt(0)===36)return"$"+Ne(e,r.substr(r.charAt(1)==" "?2:1),t);var n;var i,s,f,l=Math.abs(t),o=t<0?"-":"";if(r.match(/^00+$/))return o+W(l,r.length);if(r.match(/^[#?]+$/)){n=""+t;if(t===0)n="";return n.length>r.length?n:ye(r.substr(0,r.length-n.length))+n}if(i=r.match(ge))return we(i,l,o);if(r.match(/^#+0+$/))return o+W(l,r.length-r.indexOf("0"));if(i=r.match(ke)){n=(""+t).replace(/^([^\.]+)$/,"$1."+ye(i[1])).replace(/\.$/,"."+ye(i[1]));n=n.replace(/\.(\d*)$/,function(e,r){return"."+r+Tr("0",ye(i[1]).length-r.length)});return r.indexOf("0.")!==-1?n:n.replace(/^0\./,".")}r=r.replace(/^#+([0.])/,"$1");if(i=r.match(/^(0*)\.(#*)$/)){return o+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".")}if(i=r.match(/^#{1,3},##0(\.?)$/))return o+ue(""+l);if(i=r.match(/^#,##0\.([#0]*0)$/)){return t<0?"-"+Ne(e,r,-t):ue(""+t)+"."+Tr("0",i[1].length)}if(i=r.match(/^#,#*,#0/))return Ne(e,r.replace(/^#,#*,/,""),t);if(i=r.match(/^([0#]+)(\\?-([0#]+))+$/)){n=B(Ne(e,r.replace(/[\\-]/g,""),t));s=0;return B(B(r.replace(/\\/g,"")).replace(/[0#]/g,function(e){return s<n.length?n.charAt(s++):e==="0"?"0":""}))}if(r.match(Te)){n=Ne(e,"##########",t);return"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6)}var c="";if(i=r.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/)){s=Math.min(i[4].length,7);f=re(l,Math.pow(10,s)-1,false);n=""+o;c=Fe("n",i[1],f[1]);if(c.charAt(c.length-1)==" ")c=c.substr(0,c.length-1)+"0";n+=c+i[2]+"/"+i[3];c=H(f[2],s);if(c.length<i[4].length)c=ye(i[4].substr(i[4].length-c.length))+c;n+=c;return n}if(i=r.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/)){s=Math.min(Math.max(i[1].length,i[4].length),7);f=re(l,Math.pow(10,s)-1,true);return o+(f[0]||(f[1]?"":"0"))+" "+(f[1]?z(f[1],s)+i[2]+"/"+i[3]+H(f[2],s):Tr(" ",2*s+1+i[2].length+i[3].length))}if(i=r.match(/^[#0?]+$/)){n=""+t;if(r.length<=n.length)return n;return ye(r.substr(0,r.length-n.length))+n}if(i=r.match(/^([#0]+)\.([#0]+)$/)){n=""+t.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1");s=n.indexOf(".");var h=r.indexOf(".")-s,u=r.length-n.length-h;return ye(r.substr(0,h)+n+r.substr(r.length-u))}if(i=r.match(/^00,000\.([#0]*0)$/)){return t<0?"-"+Ne(e,r,-t):ue(""+t).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(e){return"00,"+(e.length<3?W(0,3-e.length):"")+e})+"."+W(0,i[1].length)}switch(r){case"###,###":;case"##,###":;case"#,###":var d=ue(""+l);return d!=="0"?o+d:"";default:if(r.match(/\.[0#?]*$/))return Ne(e,r.slice(0,r.lastIndexOf(".")),t)+ye(r.slice(r.lastIndexOf(".")));}throw new Error("unsupported format |"+r+"|")}function Fe(e,r,t){return(t|0)===t?Ne(e,r,t):xe(e,r,t)}function De(e){var r=[];var t=false;for(var a=0,n=0;a<e.length;++a)switch(e.charCodeAt(a)){case 34:t=!t;break;case 95:;case 42:;case 92:++a;break;case 59:r[r.length]=e.substr(n,a-n);n=a+1;}r[r.length]=e.substr(n);if(t===true)throw new Error("Format |"+e+"| unterminated string ");return r}var Pe=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function Le(e){var r=0,t="",a="";while(r<e.length){switch(t=e.charAt(r)){case"G":if(K(e,r))r+=6;r++;break;case'"':for(;e.charCodeAt(++r)!==34&&r<e.length;){}++r;break;case"\\":r+=2;break;case"_":r+=2;break;case"@": 64879++r;break;case"B":;case"b":if(e.charAt(r+1)==="1"||e.charAt(r+1)==="2")return true;case"M":;case"D":;case"Y":;case"H":;case"S":;case"E":;case"m":;case"d":;case"y":;case"h":;case"s":;case"e":;case"g":return true;case"A":;case"a":;case"ä¸":if(e.substr(r,3).toUpperCase()==="A/P")return true;if(e.substr(r,5).toUpperCase()==="AM/PM")return true;if(e.substr(r,5).toUpperCase()==="ä¸å/ä¸å")return true;++r;break;case"[":a=t;while(e.charAt(r++)!=="]"&&r<e.length)a+=e.charAt(r);if(a.match(Pe))return true;break;case".":;case"0":;case"#":while(r<e.length&&("0#?.,E+-%".indexOf(t=e.charAt(++r))>-1||t=="\\"&&e.charAt(r+1)=="-"&&"0#".indexOf(e.charAt(r+2))>-1)){}break;case"?":while(e.charAt(++r)===t){}break;case"*":++r;if(e.charAt(r)==" "||e.charAt(r)=="*")++r;break;case"(":;case")":++r;break;case"1":;case"2":;case"3":;case"4":;case"5":;case"6":;case"7":;case"8":;case"9":while(r<e.length&&"0123456789".indexOf(e.charAt(++r))>-1){}break;case" ":++r;break;default:++r;break;}}return false}function Me(e,r,t,a){var n=[],i="",s=0,f="",l="t",o,c,h;var u="H";while(s<e.length){switch(f=e.charAt(s)){case"G":if(!K(e,s))throw new Error("unrecognized character "+f+" in "+e);n[n.length]={t:"G",v:"General"};s+=7;break;case'"':for(i="";(h=e.charCodeAt(++s))!==34&&s<e.length;)i+=String.fromCharCode(h);n[n.length]={t:"t",v:i};++s;break;case"\\":var d=e.charAt(++s),v=d==="("||d===")"?d:"t";n[n.length]={t:v,v:d};++s;break;case"_":n[n.length]={t:"t",v:" "};s+=2;break;case"@":n[n.length]={t:"T",v:r};++s;break;case"B":;case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(o==null){o=ae(r,t,e.charAt(s+1)==="2");if(o==null)return""}n[n.length]={t:"X",v:e.substr(s,2)};l=f;s+=2;break};case"M":;case"D":;case"Y":;case"H":;case"S":;case"E":f=f.toLowerCase();case"m":;case"d":;case"y":;case"h":;case"s":;case"e":;case"g":if(r<0)return"";if(o==null){o=ae(r,t);if(o==null)return""}i=f;while(++s<e.length&&e.charAt(s).toLowerCase()===f)i+=f;if(f==="m"&&l.toLowerCase()==="h")f="M";if(f==="h")f=u;n[n.length]={t:f,v:i};l=f;break;case"A":;case"a":;case"ä¸":var p={t:f,v:f};if(o==null)o=ae(r,t);if(e.substr(s,3).toUpperCase()==="A/P"){if(o!=null)p.v=o.H>=12?e.charAt(s+2):f;p.t="T";u="h";s+=3}else if(e.substr(s,5).toUpperCase()==="AM/PM"){if(o!=null)p.v=o.H>=12?"PM":"AM";p.t="T";s+=5;u="h"}else if(e.substr(s,5).toUpperCase()==="ä¸å/ä¸å"){if(o!=null)p.v=o.H>=12?"ä¸å":"ä¸å";p.t="T";s+=5;u="h"}else{p.t="t";++s}if(o==null&&p.t==="T")return"";n[n.length]=p;l=f;break;case"[":i=f;while(e.charAt(s++)!=="]"&&s<e.length)i+=e.charAt(s);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(Pe)){if(o==null){o=ae(r,t);if(o==null)return""}n[n.length]={t:"Z",v:i.toLowerCase()};l=i.charAt(1)}else if(i.indexOf("$")>-1){i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$";if(!Le(e))n[n.length]={t:"t",v:i}}break;case".":if(o!=null){i=f;while(++s<e.length&&(f=e.charAt(s))==="0")i+=f;n[n.length]={t:"s",v:i};break};case"0":;case"#":i=f;while(++s<e.length&&"0#?.,E+-%".indexOf(f=e.charAt(s))>-1)i+=f;n[n.length]={t:"n",v:i};break;case"?":i=f;while(e.charAt(++s)===f)i+=f;n[n.length]={t:f,v:i};l=f;break;case"*":++s;if(e.charAt(s)==" "||e.charAt(s)=="*")++s;break;case"(":;case")":n[n.length]={t:a===1?"t":f,v:f};++s;break;case"1":;case"2":;case"3":;case"4":;case"5":;case"6":;case"7":;case"8":;case"9":i=f;while(s<e.length&&"0123456789".indexOf(e.charAt(++s))>-1)i+=e.charAt(s);n[n.length]={t:"D",v:i};break;case" ":n[n.length]={t:f,v:f};++s;break;case"$":n[n.length]={t:"t",v:"$"};++s;break;default:if(",$-+/():!^&'~{}<>=â¬acfijklopqrtuvwxzP".indexOf(f)===-1)throw new Error("unrecognized character "+f+" in "+e);n[n.length]={t:"t",v:f};++s;break;}}var m=0,g=0,b;for(s=n.length-1,l="t";s>=0;--s){switch(n[s].t){case"h":;case"H":n[s].t=u;l="h";if(m<1)m=1;break;case"s":if(b=n[s].v.match(/\.0+$/)){g=Math.max(g,b[0].length-1);m=4}if(m<3)m=3;case"d":;case"y":;case"e":l=n[s].t;break;case"M":l=n[s].t;if(m<2)m=2;break;case"m":if(l==="s"){n[s].t="M";if(m<2)m=2}break;case"X":break;case"Z":if(m<1&&n[s].v.match(/[Hh]/))m=1;if(m<2&&n[s].v.match(/[Mm]/))m=2;if(m<3&&n[s].v.match(/[Ss]/))m=3;}}var w;switch(m){case 0:break;case 1:;case 2:;case 3:if(o.u>=.5){o.u=0;++o.S}if(o.S>=60){o.S=0;++o.M}if(o.M>=60){o.M=0;++o.H}if(o.H>=24){o.H=0;++o.D;w=ae(o.D);w.u=o.u;w.S=o.S;w.M=o.M;w.H=o.H;o=w}break;case 4:switch(g){case 1:o.u=Math.round(o.u*10)/10;break;case 2:o.u=Math.round(o.u*100)/100;break;case 3:o.u=Math.round(o.u*1e3)/1e3;break;}if(o.u>=1){o.u=0;++o.S}if(o.S>=60){o.S=0;++o.M}if(o.M>=60){o.M=0;++o.H}if(o.H>=24){o.H=0;++o.D;w=ae(o.D);w.u=o.u;w.S=o.S;w.M=o.M;w.H=o.H;o=w}break;}var k="",A;for(s=0;s<n.length;++s){switch(n[s].t){case"t":;case"T":;case" ":;case"D":break;case"X":n[s].v="";n[s].t=";";break;case"d":;case"m":;case"y":;case"h":;case"H":;case"M":;case"s":;case"e":;case"b":;case"Z":n[s].v=he(n[s].t.charCodeAt(0),n[s].v,o,g);n[s].t="t";break;case"n":;case"?":A=s+1;while(n[A]!=null&&((f=n[A].t)==="?"||f==="D"||(f===" "||f==="t")&&n[A+1]!=null&&(n[A+1].t==="?"||n[A+1].t==="t"&&n[A+1].v==="/")||n[s].t==="("&&(f===" "||f==="n"||f===")")||f==="t"&&(n[A].v==="/"||n[A].v===" "&&n[A+1]!=null&&n[A+1].t=="?"))){n[s].v+=n[A].v;n[A]={v:"",t:";"};++A}k+=n[s].v;s=A-1;break;case"G":n[s].t="t";n[s].v=oe(r,t);break;}}var T="",y,E;if(k.length>0){if(k.charCodeAt(0)==40){y=r<0&&k.charCodeAt(0)===45?-r:r;E=Fe("n",k,y)}else{y=r<0&&a>1?-r:r;E=Fe("n",k,y);if(y<0&&n[0]&&n[0].t=="t"){E=E.substr(1);n[0].v="-"+n[0].v}}A=E.length-1;var C=n.length;for(s=0;s<n.length;++s)if(n[s]!=null&&n[s].t!="t"&&n[s].v.indexOf(".")>-1){C=s;break}var _=n.length;if(C===n.length&&E.indexOf("E")===-1){for(s=n.length-1;s>=0;--s){if(n[s]==null||"n?".indexOf(n[s].t)===-1)continue;if(A>=n[s].v.length-1){A-=n[s].v.length;n[s].v=E.substr(A+1,n[s].v.length)}else if(A<0)n[s].v="";else{n[s].v=E.substr(0,A+1);A=-1}n[s].t="t";_=s}if(A>=0&&_<n.length)n[_].v=E.substr(0,A+1)+n[_].v}else if(C!==n.length&&E.indexOf("E")===-1){A=E.indexOf(".")-1;for(s=C;s>=0;--s){if(n[s]==null||"n?".indexOf(n[s].t)===-1)continue;c=n[s].v.indexOf(".")>-1&&s===C?n[s].v.indexOf(".")-1:n[s].v.length-1;T=n[s].v.substr(c+1);for(;c>=0;--c){if(A>=0&&(n[s].v.charAt(c)==="0"||n[s].v.charAt(c)==="#"))T=E.charAt(A--)+T}n[s].v=T;n[s].t="t";_=s}if(A>=0&&_<n.length)n[_].v=E.substr(0,A+1)+n[_].v;A=E.indexOf(".")+1;for(s=C;s<n.length;++s){if(n[s]==null||"n?(".indexOf(n[s].t)===-1&&s!==C)continue;c=n[s].v.indexOf(".")>-1&&s===C?n[s].v.indexOf(".")+1:0;T=n[s].v.substr(0,c);for(;c<n[s].v.length;++c){if(A<E.length)T+=E.charAt(A++)}n[s].v=T;n[s].t="t";_=s}}}for(s=0;s<n.length;++s)if(n[s]!=null&&"n?".indexOf(n[s].t)>-1){y=a>1&&r<0&&s>0&&n[s-1].v==="-"?-r:r;n[s].v=Fe(n[s].t,n[s].v,y);n[s].t="t"}var S="";for(s=0;s!==n.length;++s)if(n[s]!=null)S+=n[s].v;return S}var Ue=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Be(e,r){if(r==null)return false;var t=parseFloat(r[2]);switch(r[1]){case"=":if(e==t)return true;break;case">":if(e>t)return true;break;case"<":if(e<t)return true;break;case"<>":if(e!=t)return true;break;case">=":if(e>=t)return true;break;case"<=":if(e<=t)return true;break;}return false}function We(e,r){var t=De(e);var a=t.length,n=t[a-1].indexOf("@");if(a<4&&n>-1)--a;if(t.length>4)throw new Error("cannot find right format for |"+t.join("|")+"|");if(typeof r!=="number")return[4,t.length===4||n>-1?t[t.length-1]:"@"];if(typeof r==="number"&&!isFinite(r))r=0;switch(t.length){case 1:t=n>-1?["General","General","General",t[0]]:[t[0],t[0],t[0],"@"];break;case 2:t=n>-1?[t[0],t[0],t[0],t[1]]:[t[0],t[1],t[0],"@"];break;case 3:t=n>-1?[t[0],t[1],t[0],t[2]]:[t[0],t[1],t[2],"@"];break;case 4:break;}var i=r>0?t[0]:r<0?t[1]:t[2];if(t[0].indexOf("[")===-1&&t[1].indexOf("[")===-1)return[a,i];if(t[0].match(/\[[=<>]/)!=null||t[1].match(/\[[=<>]/)!=null){var s=t[0].match(Ue);var f=t[1].match(Ue);return Be(r,s)?[a,t[0]]:Be(r,f)?[a,t[1]]:[a,t[s!=null&&f!=null?2:1]]}return[a,i]}function ze(e,r,t){if(t==null)t={};var a="";switch(typeof e){case"string":if(e=="m/d/yy"&&t.dateNF)a=t.dateNF;else a=e;break;case"number":if(e==14&&t.dateNF)a=t.dateNF;else a=(t.table!=null?t.table:q)[e];if(a==null)a=t.table&&t.table[Q[e]]||q[Q[e]];if(a==null)a=ee[e]||"General";break;}if(K(a,0))return oe(r,t);if(r instanceof Date)r=dr(r,t.date1904);var n=We(a,r);if(K(n[1]))return oe(r,t);if(r===true)r="TRUE";else if(r===false)r="FALSE";else if(r===""||r==null)return"";else if(isNaN(r)&&n[1].indexOf("0")>-1)return"#NUM!";else if(!isFinite(r)&&n[1].indexOf("0")>-1)return"#DIV/0!";return Me(n[1],r,t,n[0])}function He(e,r){if(typeof r!="number"){r=+r||-1;for(var t=0;t<392;++t){if(q[t]==undefined){if(r<0)r=t;continue}if(q[t]==e){r=t;break}}if(r<0)r=391}q[r]=e;return r}function Ve(e){for(var r=0;r!=392;++r)if(e[r]!==undefined)He(e[r],r)}function $e(){q=J()}var Xe={format:ze,load:He,_table:q,load_table:Ve,parse_date_code:ae,is_date:Le,get_table:function cA(){return Xe._table=q}};var Ge={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"};var je=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function Ke(e){var r=typeof e=="number"?q[e]:e;r=r.replace(je,"(\\d+)");je.lastIndex=0;return new RegExp("^"+r+"$")}function Ye(e,r,t){var a=-1,n=-1,i=-1,s=-1,f=-1,l=-1;(r.match(je)||[]).forEach(function(e,r){var o=parseInt(t[r+1],10);switch(e.toLowerCase().charAt(0)){case"y":a=o;break;case"d":i=o;break;case"h":s=o;break;case"s":l=o;break;case"m":if(s>=0)f=o;else n=o;break;}});je.lastIndex=0;if(l>=0&&f==-1&&n>=0){f=n;n=-1}var o=(""+(a>=0?a:(new Date).getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);if(o.length==7)o="0"+o;if(o.length==8)o="20"+o;var c=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(f>=0?f:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);if(s==-1&&f==-1&&l==-1)return o;if(a==-1&&n==-1&&i==-1)return c;return o+"T"+c}var Ze={"d.m":"d\\.m"};function Je(e,r){return He(Ze[e]||e,r)}var qe=function(){var e={};e.version="1.2.0";function r(){var e=0,r=new Array(256);for(var t=0;t!=256;++t){e=t;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;r[t]=e}return typeof Int32Array!=="undefined"?new Int32Array(r):r}var t=r();function a(e){var r=0,t=0,a=0,n=typeof Int32Array!=="undefined"?new Int32Array(4096):new Array(4096);for(a=0;a!=256;++a)n[a]=e[a];for(a=0;a!=256;++a){t=e[a];for(r=256+a;r<4096;r+=256)t=n[r]=t>>>8^e[t&255]}var i=[];for(a=1;a!=16;++a)i[a-1]=typeof Int32Array!=="undefined"&&typeof n.subarray=="function"?n.subarray(a*256,a*256+256):n.slice(a*256,a*256+256);return i}var n=a(t);var i=n[0],s=n[1],f=n[2],l=n[3],o=n[4];var c=n[5],h=n[6],u=n[7],d=n[8],v=n[9];var p=n[10],m=n[11],g=n[12],b=n[13],w=n[14];function k(e,r){var a=r^-1;for(var n=0,i=e.length;n<i;)a=a>>>8^t[(a^e.charCodeAt(n++))&255];return~a}function A(e,r){var a=r^-1,n=e.length-15,k=0;for(;k<n;)a=w[e[k++]^a&255]^b[e[k++]^a>>8&255]^g[e[k++]^a>>16&255]^m[e[k++]^a>>>24]^p[e[k++]]^v[e[k++]]^d[e[k++]]^u[e[k++]]^h[e[k++]]^c[e[k++]]^o[e[k++]]^l[e[k++]]^f[e[k++]]^s[e[k++]]^i[e[k++]]^t[e[k++]];n+=15;while(k<n)a=a>>>8^t[(a^e[k++])&255];return~a}function T(e,r){var a=r^-1;for(var n=0,i=e.length,s=0,f=0;n<i;){s=e.charCodeAt(n++);if(s<128){a=a>>>8^t[(a^s)&255]}else if(s<2048){a=a>>>8^t[(a^(192|s>>6&31))&255];a=a>>>8^t[(a^(128|s&63))&255]}else if(s>=55296&&s<57344){s=(s&1023)+64;f=e.charCodeAt(n++)&1023;a=a>>>8^t[(a^(240|s>>8&7))&255];a=a>>>8^t[(a^(128|s>>2&63))&255];a=a>>>8^t[(a^(128|f>>6&15|(s&3)<<4))&255];a=a>>>8^t[(a^(128|f&63))&255]}else{a=a>>>8^t[(a^(224|s>>12&15))&255];a=a>>>8^t[(a^(128|s>>6&63))&255];a=a>>>8^t[(a^(128|s&63))&255]}}return~a}e.table=t;e.bstr=k;e.buf=A;e.str=T;return e}();var Qe=function hA(){var e={};e.version="1.2.2";function r(e,r){var t=e.split("/"),a=r.split("/");for(var n=0,i=0,s=Math.min(t.length,a.length);n<s;++n){if(i=t[n].length-a[n].length)return i;if(t[n]!=a[n])return t[n]<a[n]?-1:1}return t.length-a.length}function t(e){if(e.charAt(e.length-1)=="/")return e.slice(0,-1).indexOf("/")===-1?e:t(e.slice(0,-1));var r=e.lastIndexOf("/");return r===-1?e:e.slice(0,r+1)}function a(e){if(e.charAt(e.length-1)=="/")return a(e.slice(0,-1));var r=e.lastIndexOf("/");return r===-1?e:e.slice(r+1)}function n(e,r){if(typeof r==="string")r=new Date(r);var t=r.getHours();t=t<<6|r.getMinutes();t=t<<5|r.getSeconds()>>>1;e._W(2,t);var a=r.getFullYear()-1980;a=a<<4|r.getMonth()+1;a=a<<5|r.getDate();e._W(2,a)}function i(e){var r=e._R(2)&65535;var t=e._R(2)&65535;var a=new Date;var n=t&31;t>>>=5;var i=t&15;t>>>=4;a.setMilliseconds(0);a.setFullYear(t+1980);a.setMonth(i-1);a.setDate(n);var s=r&31;r>>>=5;var f=r&63;r>>>=6;a.setHours(r);a.setMinutes(f);a.setSeconds(s<<1);return a}function s(e){Oa(e,0);var r={};var t=0;while(e.l<=e.length-4){var a=e._R(2);var n=e._R(2),i=e.l+n;var s={};switch(a){case 21589:{t=e._R(1);if(t&1)s.mtime=e._R(4);if(n>5){if(t&2)s.atime=e._R(4);if(t&4)s.ctime=e._R(4)}if(s.mtime)s.mt=new Date(s.mtime*1e3)}break;case 1:{var f=e._R(4),l=e._R(4);s.usz=l*Math.pow(2,32)+f;f=e._R(4);l=e._R(4);s.csz=l*Math.pow(2,32)+f}break;}e.l=i;r[a]=s}return r}var f;function l(){return f||(f=er)}function o(e,r){if(e[0]==80&&e[1]==75)return Re(e,r);if((e[0]|32)==109&&(e[1]|32)==105)return We(e,r);if(e.length<512)throw new Error("CFB file size "+e.length+" < 512");var t=3;var a=512;var n=0;var i=0;var s=0;var f=0;var l=0;var o=[];var v=e.slice(0,512);Oa(v,0);var m=c(v);t=m[0];switch(t){case 3:a=512;break;case 4:a=4096;break;case 0:if(m[1]==0)return Re(e,r);default:throw new Error("Major Version: Expected 3 or 4 saw "+t);}if(a!==512){v=e.slice(0,a);Oa(v,28)}
vendor: 8,670 bytes, line 64879
64879var w=e.slice(0,a);h(v,t);var k=v._R(4,"i");if(t===3&&k!==0)throw new Error("# Directory Sectors: Expected 0 saw "+k);v.l+=4;s=v._R(4,"i");v.l+=4;v.chk("00100000","Mini Stream Cutoff Size: ");f=v._R(4,"i");n=v._R(4,"i");l=v._R(4,"i");i=v._R(4,"i");for(var A=-1,T=0;T<109;++T){A=v._R(4,"i");if(A<0)break;o[T]=A}var y=u(e,a);p(l,i,y,a,o);var E=g(y,s,o,a);if(s<E.length)E[s].name="!Directory";if(n>0&&f!==L)E[f].name="!MiniFAT";E[o[0]].name="!FAT";E.fat_addrs=o;E.ssz=a;var C={},_=[],S=[],x=[];b(s,E,y,_,n,C,S,f);d(S,x,_);_.shift();var O={FileIndex:S,FullPaths:x};if(r&&r.raw)O.raw={header:w,sectors:y};return O}function c(e){if(e[e.l]==80&&e[e.l+1]==75)return[0,0];e.chk(B,"Header Signature: ");e.l+=16;var r=e._R(2,"u");return[e._R(2,"u"),r]}function h(e,r){var t=9;e.l+=2;switch(t=e._R(2)){case 9:if(r!=3)throw new Error("Sector Shift: Expected 9 saw "+t);break;case 12:if(r!=4)throw new Error("Sector Shift: Expected 12 saw "+t);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+t);}e.chk("0600","Mini Sector Shift: ");e.chk("000000000000","Reserved: ")}function u(e,r){var t=Math.ceil(e.length/r)-1;var a=[];for(var n=1;n<t;++n)a[n-1]=e.slice(n*r,(n+1)*r);a[t-1]=e.slice(t*r);return a}function d(e,r,t){var a=0,n=0,i=0,s=0,f=0,l=t.length;var o=[],c=[];for(;a<l;++a){o[a]=c[a]=a;r[a]=t[a]}for(;f<c.length;++f){a=c[f];n=e[a].L;i=e[a].R;s=e[a].C;if(o[a]===a){if(n!==-1&&o[n]!==n)o[a]=o[n];if(i!==-1&&o[i]!==i)o[a]=o[i]}if(s!==-1)o[s]=a;if(n!==-1&&a!=o[a]){o[n]=o[a];if(c.lastIndexOf(n)<f)c.push(n)}if(i!==-1&&a!=o[a]){o[i]=o[a];if(c.lastIndexOf(i)<f)c.push(i)}}for(a=1;a<l;++a)if(o[a]===a){if(i!==-1&&o[i]!==i)o[a]=o[i];else if(n!==-1&&o[n]!==n)o[a]=o[n]}for(a=1;a<l;++a){if(e[a].type===0)continue;f=a;if(f!=o[f])do{f=o[f];r[a]=r[f]+"/"+r[a]}while(f!==0&&-1!==o[f]&&f!=o[f]);o[a]=-1}r[0]+="/";for(a=1;a<l;++a){if(e[a].type!==2)r[a]+="/"}}function v(e,r,t){var a=e.start,n=e.size;var i=[];var s=a;while(t&&n>0&&s>=0){i.push(r.slice(s*D,s*D+D));n-=D;s=Aa(t,s*4)}if(i.length===0)return Ra(0);return P(i).slice(0,e.size)}function p(e,r,t,a,n){var i=L;if(e===L){if(r!==0)throw new Error("DIFAT chain shorter than expected")}else if(e!==-1){var s=t[e],f=(a>>>2)-1;if(!s)return;for(var l=0;l<f;++l){if((i=Aa(s,l*4))===L)break;n.push(i)}if(r>=1)p(Aa(s,a-4),r-1,t,a,n)}}function m(e,r,t,a,n){var i=[],s=[];if(!n)n=[];var f=a-1,l=0,o=0;for(l=r;l>=0;){n[l]=true;i[i.length]=l;s.push(e[l]);var c=t[Math.floor(l*4/a)];o=l*4&f;if(a<4+o)throw new Error("FAT boundary crossed: "+l+" 4 "+a);if(!e[c])break;l=Aa(e[c],o)}return{nodes:i,data:Zt([s])}}function g(e,r,t,a){var n=e.length,i=[];var s=[],f=[],l=[];var o=a-1,c=0,h=0,u=0,d=0;for(c=0;c<n;++c){f=[];u=c+r;if(u>=n)u-=n;if(s[u])continue;l=[];var v=[];for(h=u;h>=0;){v[h]=true;s[h]=true;f[f.length]=h;l.push(e[h]);var p=t[Math.floor(h*4/a)];d=h*4&o;if(a<4+d)throw new Error("FAT boundary crossed: "+h+" 4 "+a);if(!e[p])break;h=Aa(e[p],d);if(v[h])break}i[u]={nodes:f,data:Zt([l])}}return i}function b(e,r,t,a,n,i,s,f){var l=0,o=a.length?2:0;var c=r[e].data;var h=0,u=0,d;for(;h<c.length;h+=128){var p=c.slice(h,h+128);Oa(p,64);u=p._R(2);d=qt(p,0,u-o);a.push(d);var g={name:d,type:p._R(1),color:p._R(1),L:p._R(4,"i"),R:p._R(4,"i"),C:p._R(4,"i"),clsid:p._R(16),state:p._R(4,"i"),start:0,size:0};var b=p._R(2)+p._R(2)+p._R(2)+p._R(2);if(b!==0)g.ct=w(p,p.l-8);var k=p._R(2)+p._R(2)+p._R(2)+p._R(2);if(k!==0)g.mt=w(p,p.l-8);g.start=p._R(4,"i");g.size=p._R(4,"i");if(g.size<0&&g.start<0){g.size=g.type=0;g.start=L;g.name=""}if(g.type===5){l=g.start;if(n>0&&l!==L)r[l].name="!StreamData"}else if(g.size>=4096){g.storage="fat";if(r[g.start]===undefined)r[g.start]=m(t,g.start,r.fat_addrs,r.ssz);r[g.start].name=g.name;g.content=r[g.start].data.slice(0,g.size)}else{g.storage="minifat";if(g.size<0)g.size=0;else if(l!==L&&g.start!==L&&r[l]){g.content=v(g,r[l].data,(r[f]||{}).data)}}if(g.content)Oa(g.content,0);i[d]=g;s.push(g)}}function w(e,r){return new Date((ka(e,r+4)/1e7*Math.pow(2,32)+ka(e,r)/1e7-11644473600)*1e3)}function k(e,r){l();return o(f.readFileSync(e),r)}function T(e,r){var t=r&&r.type;if(!t){if(C&&Buffer.isBuffer(e))t="buffer"}switch(t||"base64"){case"file":return k(e,r);case"base64":return o(I(E(e)),r);case"binary":return o(I(e),r);}return o(e,r)}function y(e,r){var t=r||{},a=t.root||"Root Entry";if(!e.FullPaths)e.FullPaths=[];if(!e.FileIndex)e.FileIndex=[];if(e.FullPaths.length!==e.FileIndex.length)throw new Error("inconsistent CFB structure");if(e.FullPaths.length===0){e.FullPaths[0]=a+"/";e.FileIndex[0]={name:a,type:5}}if(t.CLSID)e.FileIndex[0].clsid=t.CLSID;S(e)}function S(e){var r="�Sh33tJ5";if(Qe.find(e,"/"+r))return;var t=Ra(4);t[0]=55;t[1]=t[3]=50;t[2]=54;e.FileIndex.push({name:r,type:2,content:t,size:4,L:69,R:69,C:69});e.FullPaths.push(e.FullPaths[0]+r);R(e)}function R(e,n){y(e);var i=false,s=false;for(var f=e.FullPaths.length-1;f>=0;--f){var l=e.FileIndex[f];switch(l.type){case 0:if(s)i=true;else{e.FileIndex.pop();e.FullPaths.pop()}break;case 1:;case 2:;case 5:s=true;if(isNaN(l.R*l.L*l.C))i=true;if(l.R>-1&&l.L>-1&&l.R==l.L)i=true;break;default:i=true;break;}}if(!i&&!n)return;var o=new Date(1987,1,19),c=0;var h=Object.create?Object.create(null):{};var u=[];for(f=0;f<e.FullPaths.length;++f){h[e.FullPaths[f]]=true;if(e.FileIndex[f].type===0)continue;u.push([e.FullPaths[f],e.FileIndex[f]])}for(f=0;f<u.length;++f){var d=t(u[f][0]);s=h[d];while(!s){while(t(d)&&!h[t(d)])d=t(d);u.push([d,{name:a(d).replace("/",""),type:1,clsid:z,ct:o,mt:o,content:null}]);h[d]=true;d=t(u[f][0]);s=h[d]}}u.sort(function(e,t){return r(e[0],t[0])});e.FullPaths=[];e.FileIndex=[];for(f=0;f<u.length;++f){e.FullPaths[f]=u[f][0];e.FileIndex[f]=u[f][1]}for(f=0;f<u.length;++f){var v=e.FileIndex[f];var p=e.FullPaths[f];v.name=a(p).replace("/","");v.L=v.R=v.C=-(v.color=1);v.size=v.content?v.content.length:0;v.start=0;v.clsid=v.clsid||z;if(f===0){v.C=u.length>1?1:-1;v.size=0;v.type=5}else if(p.slice(-1)=="/"){for(c=f+1;c<u.length;++c)if(t(e.FullPaths[c])==p)break;v.C=c>=u.length?-1:c;for(c=f+1;c<u.length;++c)if(t(e.FullPaths[c])==t(p))break;v.R=c>=u.length?-1:c;v.type=1}else{if(t(e.FullPaths[f+1]||"")==t(p))v.R=f+1;v.type=2}}}function N(e,r){var t=r||{};if(t.fileType=="mad")return ze(e,t);R(e);switch(t.fileType){case"zip":return Fe(e,t);}var a=function(e){var r=0,t=0;for(var a=0;a<e.FileIndex.length;++a){var n=e.FileIndex[a];if(!n.content)continue;var i=n.content.length;if(i>0){if(i<4096)r+=i+63>>6;else t+=i+511>>9}}var s=e.FullPaths.length+3>>2;var f=r+7>>3;var l=r+127>>7;var o=f+t+s+l;var c=o+127>>7;var h=c<=109?0:Math.ceil((c-109)/127);while(o+c+h+127>>7>c)h=++c<=109?0:Math.ceil((c-109)/127);var u=[1,h,c,l,s,t,r,0];e.FileIndex[0].size=r<<6;u[7]=(e.FileIndex[0].start=u[0]+u[1]+u[2]+u[3]+u[4]+u[5])+(u[6]+7>>3);return u}(e);var n=Ra(a[7]<<9);var i=0,s=0;{for(i=0;i<8;++i)n._W(1,W[i]);for(i=0;i<8;++i)n._W(2,0);n._W(2,62);n._W(2,3);n._W(2,65534);n._W(2,9);n._W(2,6);for(i=0;i<3;++i)n._W(2,0);n._W(4,0);n._W(4,a[2]);n._W(4,a[0]+a[1]+a[2]+a[3]-1);n._W(4,0);n._W(4,1<<12);n._W(4,a[3]?a[0]+a[1]+a[2]-1:L);n._W(4,a[3]);n._W(-4,a[1]?a[0]-1:L);n._W(4,a[1]);for(i=0;i<109;++i)n._W(-4,i<a[2]?a[1]+i:-1)}if(a[1]){for(s=0;s<a[1];++s){for(;i<236+s*127;++i)n._W(-4,i<a[2]?a[1]+i:-1);n._W(-4,s===a[1]-1?L:s+1)}}var f=function(e){for(s+=e;i<s-1;++i)n._W(-4,i+1);if(e){++i;n._W(-4,L)}};s=i=0;for(s+=a[1];i<s;++i)n._W(-4,H.DIFSECT);for(s+=a[2];i<s;++i)n._W(-4,H.FATSECT);f(a[3]);f(a[4]);var l=0,o=0;var c=e.FileIndex[0];for(;l<e.FileIndex.length;++l){c=e.FileIndex[l];if(!c.content)continue;o=c.content.length;if(o<4096)continue;c.start=s;f(o+511>>9)}f(a[6]+7>>3);while(n.l&511)n._W(-4,H.ENDOFCHAIN);s=i=0;for(l=0;l<e.FileIndex.length;++l){c=e.FileIndex[l];if(!c.content)continue;o=c.content.length;if(!o||o>=4096)continue;c.start=s;f(o+63>>6)}while(n.l&511)n._W(-4,H.ENDOFCHAIN);for(i=0;i<a[4]<<2;++i){var h=e.FullPaths[i];if(!h||h.length===0){for(l=0;l<17;++l)n._W(4,0);for(l=0;l<3;++l)n._W(4,-1);for(l=0;l<12;++l)n._W(4,0);continue}c=e.FileIndex[i];if(i===0)c.start=c.size?c.start-1:L;var u=i===0&&t.root||c.name;if(u.length>31){console.error("Name "+u+" will be truncated to "+u.slice(0,31));u=u.slice(0,31)}o=2*(u.length+1);n._W(64,u,"utf16le");n._W(2,o);n._W(1,c.type);n._W(1,c.color);n._W(-4,c.L);n._W(-4,c.R);n._W(-4,c.C);if(!c.clsid)for(l=0;l<4;++l)n._W(4,0);else n._W(16,c.clsid,"hex");n._W(4,c.state||0);n._W(4,0);n._W(4,0);n._W(4,0);n._W(4,0);n._W(4,c.start);n._W(4,c.size);n._W(4,0)}for(i=1;i<e.FileIndex.length;++i){c=e.FileIndex[i];if(c.size>=4096){n.l=c.start+1<<9;if(C&&Buffer.isBuffer(c.content)){c.content.copy(n,n.l,0,c.size);n.l+=c.size+511&-512}else{for(l=0;l<c.size;++l)n._W(1,c.content[l]);for(;l&511;++l)n._W(1,0)}}}for(i=1;i<e.FileIndex.length;++i){c=e.FileIndex[i];if(c.size>
vendor: 5,940 bytes, line 64879
648790&&c.size<4096){if(C&&Buffer.isBuffer(c.content)){c.content.copy(n,n.l,0,c.size);n.l+=c.size+63&-64}else{for(l=0;l<c.size;++l)n._W(1,c.content[l]);for(;l&63;++l)n._W(1,0)}}}if(C){n.l=n.length}else{while(n.l<n.length)n._W(1,0)}return n}function F(e,r){var t=e.FullPaths.map(function(e){return e.toUpperCase()});var a=t.map(function(e){var r=e.split("/");return r[r.length-(e.slice(-1)=="/"?2:1)]});var n=false;if(r.charCodeAt(0)===47){n=true;r=t[0].slice(0,-1)+r}else n=r.indexOf("/")!==-1;var i=r.toUpperCase();var s=n===true?t.indexOf(i):a.indexOf(i);if(s!==-1)return e.FileIndex[s];var f=!i.match(U);i=i.replace(M,"");if(f)i=i.replace(U,"!");for(s=0;s<t.length;++s){if((f?t[s].replace(U,"!"):t[s]).replace(M,"")==i)return e.FileIndex[s];if((f?a[s].replace(U,"!"):a[s]).replace(M,"")==i)return e.FileIndex[s]}return null}var D=64;var L=-2;var B="d0cf11e0a1b11ae1";var W=[208,207,17,224,161,177,26,225];var z="00000000000000000000000000000000";var H={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:L,FREESECT:-1,HEADER_SIGNATURE:B,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:z,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function V(e,r,t){l();var a=N(e,t);f.writeFileSync(r,a)}function $(e){var r=new Array(e.length);for(var t=0;t<e.length;++t)r[t]=String.fromCharCode(e[t]);return r.join("")}function X(e,r){var t=N(e,r);switch(r&&r.type||"buffer"){case"file":l();f.writeFileSync(r.filename,t);return t;case"binary":return typeof t=="string"?t:$(t);case"base64":return A(typeof t=="string"?t:$(t));case"buffer":if(C)return Buffer.isBuffer(t)?t:_(t);case"array":return typeof t=="string"?I(t):t;}return t}var G;function j(e){try{var r=e.InflateRaw;var t=new r;t._processChunk(new Uint8Array([3,0]),t._finishFlushFlag);if(t.bytesRead)G=e;else throw new Error("zlib does not expose bytesRead")}catch(a){console.error("cannot use native zlib: "+(a.message||a))}}function K(e,r){if(!G)return Oe(e,r);var t=G.InflateRaw;var a=new t;var n=a._processChunk(e.slice(e.l),a._finishFlushFlag);e.l+=a.bytesRead;return n}function Y(e){return G?G.deflateRawSync(e):Ae(e)}var Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var J=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258];var q=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function Q(e){var r=(e<<1|e<<11)&139536|(e<<5|e<<15)&558144;return(r>>16|r>>8|r)&255}var ee=typeof Uint8Array!=="undefined";var re=ee?new Uint8Array(1<<8):[];for(var te=0;te<1<<8;++te)re[te]=Q(te);function ae(e,r){var t=re[e&255];if(r<=8)return t>>>8-r;t=t<<8|re[e>>8&255];if(r<=16)return t>>>16-r;t=t<<8|re[e>>16&255];return t>>>24-r}function ne(e,r){var t=r&7,a=r>>>3;return(e[a]|(t<=6?0:e[a+1]<<8))>>>t&3}function ie(e,r){var t=r&7,a=r>>>3;return(e[a]|(t<=5?0:e[a+1]<<8))>>>t&7}function se(e,r){var t=r&7,a=r>>>3;return(e[a]|(t<=4?0:e[a+1]<<8))>>>t&15}function fe(e,r){var t=r&7,a=r>>>3;return(e[a]|(t<=3?0:e[a+1]<<8))>>>t&31}function le(e,r){var t=r&7,a=r>>>3;return(e[a]|(t<=1?0:e[a+1]<<8))>>>t&127}function oe(e,r,t){var a=r&7,n=r>>>3,i=(1<<t)-1;var s=e[n]>>>a;if(t<8-a)return s&i;s|=e[n+1]<<8-a;if(t<16-a)return s&i;s|=e[n+2]<<16-a;if(t<24-a)return s&i;s|=e[n+3]<<24-a;return s&i}function ce(e,r,t){var a=r&7,n=r>>>3;if(a<=5)e[n]|=(t&7)<<a;else{e[n]|=t<<a&255;e[n+1]=(t&7)>>8-a}return r+3}function he(e,r,t){var a=r&7,n=r>>>3;t=(t&1)<<a;e[n]|=t;return r+1}function ue(e,r,t){var a=r&7,n=r>>>3;t<<=a;e[n]|=t&255;t>>>=8;e[n+1]=t;return r+8}function de(e,r,t){var a=r&7,n=r>>>3;t<<=a;e[n]|=t&255;t>>>=8;e[n+1]=t&255;e[n+2]=t>>>8;return r+16}function ve(e,r){var t=e.length,a=2*t>r?2*t:r+5,n=0;if(t>=r)return e;if(C){var i=O(a);if(e.copy)e.copy(i);else for(;n<e.length;++n)i[n]=e[n];return i}else if(ee){var s=new Uint8Array(a);if(s.set)s.set(e);else for(;n<t;++n)s[n]=e[n];return s}e.length=a;return e}function pe(e){var r=new Array(e);for(var t=0;t<e;++t)r[t]=0;return r}function me(e,r,t){var a=1,n=0,i=0,s=0,f=0,l=e.length;var o=ee?new Uint16Array(32):pe(32);for(i=0;i<32;++i)o[i]=0;for(i=l;i<t;++i)e[i]=0;l=e.length;var c=ee?new Uint16Array(l):pe(l);for(i=0;i<l;++i){o[n=e[i]]++;if(a<n)a=n;c[i]=0}o[0]=0;for(i=1;i<=a;++i)o[i+16]=f=f+o[i-1]<<1;for(i=0;i<l;++i){f=e[i];if(f!=0)c[i]=o[f+16]++}var h=0;for(i=0;i<l;++i){h=e[i];if(h!=0){f=ae(c[i],a)>>a-h;for(s=(1<<a+4-h)-1;s>=0;--s)r[f|s<<h]=h&15|i<<4}}return a}var ge=ee?new Uint16Array(512):pe(512);var be=ee?new Uint16Array(32):pe(32);if(!ee){for(var we=0;we<512;++we)ge[we]=0;for(we=0;we<32;++we)be[we]=0}(function(){var e=[];var r=0;for(;r<32;r++)e.push(5);me(e,be,32);var t=[];r=0;for(;r<=143;r++)t.push(8);for(;r<=255;r++)t.push(9);for(;r<=279;r++)t.push(7);for(;r<=287;r++)t.push(8);me(t,ge,288)})();var ke=function je(){var e=ee?new Uint8Array(32768):[];var r=0,t=0;for(;r<q.length-1;++r){for(;t<q[r+1];++t)e[t]=r}for(;t<32768;++t)e[t]=29;var a=ee?new Uint8Array(259):[];for(r=0,t=0;r<J.length-1;++r){for(;t<J[r+1];++t)a[t]=r}function n(e,r){var t=0;while(t<e.length){var a=Math.min(65535,e.length-t);var n=t+a==e.length;r._W(1,+n);r._W(2,a);r._W(2,~a&65535);while(a-- >0)r[r.l++]=e[t++]}return r.l}function i(r,t){var n=0;var i=0;var s=ee?new Uint16Array(32768):[];while(i<r.length){var f=Math.min(65535,r.length-i);if(f<10){n=ce(t,n,+!!(i+f==r.length));if(n&7)n+=8-(n&7);t.l=n/8|0;t._W(2,f);t._W(2,~f&65535);while(f-- >0)t[t.l++]=r[i++];n=t.l*8;continue}n=ce(t,n,+!!(i+f==r.length)+2);var l=0;while(f-- >0){var o=r[i];l=(l<<5^o)&32767;var c=-1,h=0;if(c=s[l]){c|=i&~32767;if(c>i)c-=32768;if(c<i)while(r[c+h]==r[i+h]&&h<250)++h}if(h>2){o=a[h];if(o<=22)n=ue(t,n,re[o+1]>>1)-1;else{ue(t,n,3);n+=5;ue(t,n,re[o-23]>>5);n+=3}var u=o<8?0:o-4>>2;if(u>0){de(t,n,h-J[o]);n+=u}o=e[i-c];n=ue(t,n,re[o]>>3);n-=3;var d=o<4?0:o-2>>1;if(d>0){de(t,n,i-c-q[o]);n+=d}for(var v=0;v<h;++v){s[l]=i&32767;l=(l<<5^r[i])&32767;++i}f-=h-1}else{if(o<=143)o=o+48;else n=he(t,n,1);n=ue(t,n,re[o]);s[l]=i&32767;++i}}n=ue(t,n,0)-1}
vendor: 4,893 bytes, lines 64879-64880
64879t.l=(n+7)/8|0;return t.l}return function s(e,r){if(e.length<8)return n(e,r);return i(e,r)}}();function Ae(e){var r=Ra(50+Math.floor(e.length*1.1));var t=ke(e,r);return r.slice(0,t)}var Te=ee?new Uint16Array(32768):pe(32768);var ye=ee?new Uint16Array(32768):pe(32768);var Ee=ee?new Uint16Array(128):pe(128);var Ce=1,_e=1;function Se(e,r){var t=fe(e,r)+257;r+=5;var a=fe(e,r)+1;r+=5;var n=se(e,r)+4;r+=4;var i=0;var s=ee?new Uint8Array(19):pe(19);var f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var l=1;var o=ee?new Uint8Array(8):pe(8);var c=ee?new Uint8Array(8):pe(8);var h=s.length;for(var u=0;u<n;++u){s[Z[u]]=i=ie(e,r);if(l<i)l=i;o[i]++;r+=3}var d=0;o[0]=0;for(u=1;u<=l;++u)c[u]=d=d+o[u-1]<<1;for(u=0;u<h;++u)if((d=s[u])!=0)f[u]=c[d]++;var v=0;for(u=0;u<h;++u){v=s[u];if(v!=0){d=re[f[u]]>>8-v;for(var p=(1<<7-v)-1;p>=0;--p)Ee[d|p<<v]=v&7|u<<3}}var m=[];l=1;for(;m.length<t+a;){d=Ee[le(e,r)];r+=d&7;switch(d>>>=3){case 16:i=3+ne(e,r);r+=2;d=m[m.length-1];while(i-- >0)m.push(d);break;case 17:i=3+ie(e,r);r+=3;while(i-- >0)m.push(0);break;case 18:i=11+le(e,r);r+=7;while(i-- >0)m.push(0);break;default:m.push(d);if(l<d)l=d;break;}}var g=m.slice(0,t),b=m.slice(t);for(u=t;u<286;++u)g[u]=0;for(u=a;u<30;++u)b[u]=0;Ce=me(g,Te,286);_e=me(b,ye,30);return r}function xe(e,r){if(e[0]==3&&!(e[1]&3)){return[x(r),2]}var t=0;var a=0;var n=O(r?r:1<<18);var i=0;var s=n.length>>>0;var f=0,l=0;while((a&1)==0){a=ie(e,t);t+=3;if(a>>>1==0){if(t&7)t+=8-(t&7);var o=e[t>>>3]|e[(t>>>3)+1]<<8;t+=32;if(o>0){if(!r&&s<i+o){n=ve(n,i+o);s=n.length}while(o-- >0){n[i++]=e[t>>>3];t+=8}}continue}else if(a>>1==1){f=9;l=5}else{t=Se(e,t);f=Ce;l=_e}for(;;){if(!r&&s<i+32767){n=ve(n,i+32767);s=n.length}var c=oe(e,t,f);var h=a>>>1==1?ge[c]:Te[c];t+=h&15;h>>>=4;if((h>>>8&255)===0)n[i++]=h;else if(h==256)break;else{h-=257;var u=h<8?0:h-4>>2;if(u>5)u=0;var d=i+J[h];if(u>0){d+=oe(e,t,u);t+=u}c=oe(e,t,l);h=a>>>1==1?be[c]:ye[c];t+=h&15;h>>>=4;var v=h<4?0:h-2>>1;var p=q[h];if(v>0){p+=oe(e,t,v);t+=v}if(!r&&s<d){n=ve(n,d+100);s=n.length}while(i<d){n[i]=n[i-p];++i}}}}if(r)return[n,t+7>>>3];return[n.slice(0,i),t+7>>>3]}function Oe(e,r){var t=e.slice(e.l||0); 64880var a=xe(t,r);e.l+=a[1];return a[0]}function Ie(e,r){if(e){if(typeof console!=="undefined")console.error(r)}else throw new Error(r)}function Re(e,r){var t=e;Oa(t,0);var a=[],n=[];var i={FileIndex:a,FullPaths:n};y(i,{root:r.root});var f=t.length-4;while((t[f]!=80||t[f+1]!=75||t[f+2]!=5||t[f+3]!=6)&&f>=0)--f;t.l=f+4;t.l+=4;var l=t._R(2);t.l+=6;var o=t._R(4);t.l=o;for(f=0;f<l;++f){t.l+=20;var c=t._R(4);var h=t._R(4);var u=t._R(2);var d=t._R(2);var v=t._R(2);t.l+=8;var p=t._R(4);var m=s(t.slice(t.l+u,t.l+u+d));t.l+=u+d+v;var g=t.l;t.l=p+4;if(m&&m[1]){if((m[1]||{}).usz)h=m[1].usz;if((m[1]||{}).csz)c=m[1].csz}Ne(t,c,h,i,m);t.l=g}return i}function Ne(e,r,t,a,n){e.l+=2;var f=e._R(2);var l=e._R(2);var o=i(e);if(f&8257)throw new Error("Unsupported ZIP encryption");var c=e._R(4);var h=e._R(4);var u=e._R(4);var d=e._R(2);var v=e._R(2);var p="";for(var m=0;m<d;++m)p+=String.fromCharCode(e[e.l++]);if(v){var g=s(e.slice(e.l,e.l+v));if((g[21589]||{}).mt)o=g[21589].mt;if((g[1]||{}).usz)u=g[1].usz;if((g[1]||{}).csz)h=g[1].csz;if(n){if((n[21589]||{}).mt)o=n[21589].mt;if((n[1]||{}).usz)u=n[1].usz;if((n[1]||{}).csz)h=n[1].csz}}e.l+=v;var b=e.slice(e.l,e.l+h);switch(l){case 8:b=K(e,u);break;case 0:e.l+=h;break;default:throw new Error("Unsupported ZIP Compression method "+l);}var w=false;if(f&8){c=e._R(4);if(c==134695760){c=e._R(4);w=true}h=e._R(4);u=e._R(4)}if(h!=r)Ie(w,"Bad compressed size: "+r+" != "+h);if(u!=t)Ie(w,"Bad uncompressed size: "+t+" != "+u);Ve(a,p,b,{unsafe:true,mt:o})}function Fe(e,r){var t=r||{};var a=[],i=[];var s=Ra(1);var f=t.compression?8:0,l=0;var o=false;if(o)l|=8;var c=0,h=0;var u=0,d=0;var v=e.FullPaths[0],p=v,m=e.FileIndex[0];var g=[];var b=0;for(c=1;c<e.FullPaths.length;++c){p=e.FullPaths[c].slice(v.length);m=e.FileIndex[c];if(!m.size||!m.content||Array.isArray(m.content)&&m.content.length==0||p=="�Sh33tJ5")continue;var w=u;var k=Ra(p.length);for(h=0;h<p.length;++h)k._W(1,p.charCodeAt(h)&127);k=k.slice(0,k.l);g[d]=typeof m.content=="string"?qe.bstr(m.content,0):qe.buf(m.content,0);var A=typeof m.content=="string"?I(m.content):m.content;if(f==8)A=Y(A);s=Ra(30);s._W(4,67324752);s._W(2,20);s._W(2,l);s._W(2,f);if(m.mt)n(s,m.mt);else s._W(4,0);s._W(-4,l&8?0:g[d]);s._W(4,l&8?0:A.length);s._W(4,l&8?0:m.content.length);s._W(2,k.length);s._W(2,0);u+=s.length;a.push(s);u+=k.length;a.push(k);u+=A.length;a.push(A);if(l&8){s=Ra(12);s._W(-4,g[d]);s._W(4,A.length);s._W(4,m.content.length);u+=s.l;a.push(s)}s=Ra(46);s._W(4,33639248);s._W(2,0);s._W(2,20);s._W(2,l);s._W(2,f);s._W(4,0);s._W(-4,g[d]);s._W(4,A.length);s._W(4,m.content.length);s._W(2,k.length);s._W(2,0);s._W(2,0);s._W(2,0);s._W(2,0);s._W(4,0);s._W(4,w);b+=s.l;i.push(s);b+=k.length;i.push(k);++d}s=Ra(22);s._W(4,101010256);s._W(2,0);s._W(2,0);s._W(2,d);s._W(2,d);s._W(4,b);
vendor: 4,263 bytes, line 64880
64880s._W(4,u);s._W(2,0);return P([P(a),P(i),s])}var De={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Pe(e,r){if(e.ctype)return e.ctype;var t=e.name||"",a=t.match(/\.([^\.]+)$/);if(a&&De[a[1]])return De[a[1]];if(r){a=(t=r).match(/[\.\\]([^\.\\])+$/);if(a&&De[a[1]])return De[a[1]]}return"application/octet-stream"}function Le(e){var r=A(e);var t=[];for(var a=0;a<r.length;a+=76)t.push(r.slice(a,a+76));return t.join("\r\n")+"\r\n"}function Me(e){var r=e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(e){var r=e.charCodeAt(0).toString(16).toUpperCase();return"="+(r.length==1?"0"+r:r)});r=r.replace(/ $/gm,"=20").replace(/\t$/gm,"=09");if(r.charAt(0)=="\n")r="=0D"+r.slice(1);r=r.replace(/\r(?!\n)/gm,"=0D").replace(/\n\n/gm,"\n=0A").replace(/([^\r\n])\n/gm,"$1=0A");var t=[],a=r.split("\r\n");for(var n=0;n<a.length;++n){var i=a[n];if(i.length==0){t.push("");continue}for(var s=0;s<i.length;){var f=76;var l=i.slice(s,s+f);if(l.charAt(f-1)=="=")f--;else if(l.charAt(f-2)=="=")f-=2;else if(l.charAt(f-3)=="=")f-=3;l=i.slice(s,s+f);s+=f;if(s<i.length)l+="=";t.push(l)}}return t.join("\r\n")}function Ue(e){var r=[];for(var t=0;t<e.length;++t){var a=e[t];while(t<=e.length&&a.charAt(a.length-1)=="=")a=a.slice(0,a.length-1)+e[++t];r.push(a)}for(var n=0;n<r.length;++n)r[n]=r[n].replace(/[=][0-9A-Fa-f]{2}/g,function(e){return String.fromCharCode(parseInt(e.slice(1),16))});return I(r.join("\r\n"))}function Be(e,r,t){var a="",n="",i="",s;var f=0;for(;f<10;++f){var l=r[f];if(!l||l.match(/^\s*$/))break;var o=l.match(/^([^:]*?):\s*([^\s].*)$/);if(o)switch(o[1].toLowerCase()){case"content-location":a=o[2].trim();break;case"content-type":i=o[2].trim();break;case"content-transfer-encoding":n=o[2].trim();break;}}++f;switch(n.toLowerCase()){case"base64":s=I(E(r.slice(f).join("")));break;case"quoted-printable":s=Ue(r.slice(f));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+n);}var c=Ve(e,a.slice(t.length),s,{unsafe:true});if(i)c.ctype=i}function We(e,r){if($(e.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var t=r&&r.root||"";var a=(C&&Buffer.isBuffer(e)?e.toString("binary"):$(e)).split("\r\n");var n=0,i="";for(n=0;n<a.length;++n){i=a[n];if(!/^Content-Location:/i.test(i))continue;i=i.slice(i.indexOf("file"));if(!t)t=i.slice(0,i.lastIndexOf("/")+1);if(i.slice(0,t.length)==t)continue;while(t.length>0){t=t.slice(0,t.length-1);t=t.slice(0,t.lastIndexOf("/")+1);if(i.slice(0,t.length)==t)break}}var s=(a[1]||"").match(/boundary="(.*?)"/);if(!s)throw new Error("MAD cannot find boundary");var f="--"+(s[1]||"");var l=[],o=[];var c={FileIndex:l,FullPaths:o};y(c);var h,u=0;for(n=0;n<a.length;++n){var d=a[n];if(d!==f&&d!==f+"--")continue;if(u++)Be(c,a.slice(h,n),t);h=n}return c}function ze(e,r){var t=r||{};var a=t.boundary||"SheetJS";a="------="+a;var n=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+a.slice(2)+'"',"","",""];var i=e.FullPaths[0],s=i,f=e.FileIndex[0];for(var l=1;l<e.FullPaths.length;++l){s=e.FullPaths[l].slice(i.length);f=e.FileIndex[l];if(!f.size||!f.content||s=="�Sh33tJ5")continue;s=s.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(e){return"_x"+e.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(e){return"_u"+e.charCodeAt(0).toString(16)+"_"});var o=f.content;var c=C&&Buffer.isBuffer(o)?o.toString("binary"):$(o);var h=0,u=Math.min(1024,c.length),d=0;for(var v=0;v<=u;++v)if((d=c.charCodeAt(v))>=32&&d<128)++h;var p=h>=u*4/5;n.push(a);n.push("Content-Location: "+(t.root||"file:///C:/SheetJS/")+s);n.push("Content-Transfer-Encoding: "+(p?"quoted-printable":"base64"));n.push("Content-Type: "+Pe(f,s));n.push("");n.push(p?Me(c):Le(c))}n.push(a+"--\r\n");return n.join("\r\n")}function He(e){var r={};y(r,e);return r}function Ve(e,r,t,n){var i=n&&n.unsafe;if(!i)y(e);var s=!i&&Qe.find(e,r);if(!s){var f=e.FullPaths[0];if(r.slice(0,f.length)==f)f=r;else{if(f.slice(-1)!="/")f+="/";f=(f+r).replace("//","/")}s={name:a(r),type:2};e.FileIndex.push(s);e.FullPaths.push(f);if(!i)Qe.utils.cfb_gc(e)}s.content=t;s.size=t?t.length:0;if(n){if(n.CLSID)s.clsid=n.CLSID;if(n.mt)s.mt=n.mt;
vendor: 8,957 bytes, line 64880
64880if(n.ct)s.ct=n.ct}return s}function $e(e,r){y(e);var t=Qe.find(e,r);if(t)for(var a=0;a<e.FileIndex.length;++a)if(e.FileIndex[a]==t){e.FileIndex.splice(a,1);e.FullPaths.splice(a,1);return true}return false}function Xe(e,r,t){y(e);var n=Qe.find(e,r);if(n)for(var i=0;i<e.FileIndex.length;++i)if(e.FileIndex[i]==n){e.FileIndex[i].name=a(t);e.FullPaths[i]=t;return true}return false}function Ge(e){R(e,true)}e.find=F;e.read=T;e.parse=o;e.write=X;e.writeFile=V;e.utils={cfb_new:He,cfb_add:Ve,cfb_del:$e,cfb_mov:Xe,cfb_gc:Ge,ReadShift:ya,CheckField:xa,prep_blob:Oa,bconcat:P,use_zlib:j,_deflateRaw:Ae,_inflateRaw:Oe,consts:H};return e}();var er;function rr(e){er=e}function tr(e){if(typeof e==="string")return R(e);if(Array.isArray(e))return F(e);return e}function ar(e,r,t){if(typeof er!=="undefined"&&er.writeFileSync)return t?er.writeFileSync(e,r,t):er.writeFileSync(e,r);if(typeof Deno!=="undefined"){if(t&&typeof r=="string")switch(t){case"utf8":r=new TextEncoder(t).encode(r);break;case"binary":r=R(r);break;default:throw new Error("Unsupported encoding "+t);}return Deno.writeFileSync(e,r)}var a=t=="utf8"?Rt(r):r;if(typeof IE_SaveFile!=="undefined")return IE_SaveFile(a,e);if(typeof Blob!=="undefined"){var n=new Blob([tr(a)],{type:"application/octet-stream"});if(typeof navigator!=="undefined"&&navigator.msSaveBlob)return navigator.msSaveBlob(n,e);if(typeof saveAs!=="undefined")return saveAs(n,e);if(typeof URL!=="undefined"&&typeof document!=="undefined"&&document.createElement&&URL.createObjectURL){var i=URL.createObjectURL(n);if(typeof chrome==="object"&&typeof(chrome.downloads||{}).download=="function"){if(URL.revokeObjectURL&&typeof setTimeout!=="undefined")setTimeout(function(){URL.revokeObjectURL(i)},6e4);return chrome.downloads.download({url:i,filename:e,saveAs:true})}var s=document.createElement("a");if(s.download!=null){s.download=e;s.href=i;document.body.appendChild(s);s.click();document.body.removeChild(s);if(URL.revokeObjectURL&&typeof setTimeout!=="undefined")setTimeout(function(){URL.revokeObjectURL(i)},6e4);return i}}else if(typeof URL!=="undefined"&&!URL.createObjectURL&&typeof chrome==="object"){var f="data:application/octet-stream;base64,"+y(new Uint8Array(tr(a)));return chrome.downloads.download({url:f,filename:e,saveAs:true})}}if(typeof $!=="undefined"&&typeof File!=="undefined"&&typeof Folder!=="undefined")try{var l=File(e);l.open("w");l.encoding="binary";if(Array.isArray(r))r=N(r);l.write(r);l.close();return r}catch(o){if(!o.message||o.message.indexOf("onstruct")==-1)throw o}throw new Error("cannot save file "+e)}function nr(e){if(typeof er!=="undefined")return er.readFileSync(e);if(typeof Deno!=="undefined")return Deno.readFileSync(e);if(typeof $!=="undefined"&&typeof File!=="undefined"&&typeof Folder!=="undefined")try{var r=File(e);r.open("r");r.encoding="binary";var t=r.read();r.close();return t}catch(a){if(!a.message||a.message.indexOf("onstruct")==-1)throw a}throw new Error("Cannot access file "+e)}function ir(e){var r=Object.keys(e),t=[];for(var a=0;a<r.length;++a)if(Object.prototype.hasOwnProperty.call(e,r[a]))t.push(r[a]);return t}function sr(e,r){var t=[],a=ir(e);for(var n=0;n!==a.length;++n)if(t[e[a[n]][r]]==null)t[e[a[n]][r]]=a[n];return t}function fr(e){var r=[],t=ir(e);for(var a=0;a!==t.length;++a)r[e[t[a]]]=t[a];return r}function lr(e){var r=[],t=ir(e);for(var a=0;a!==t.length;++a)r[e[t[a]]]=parseInt(t[a],10);return r}function or(e){var r=[],t=ir(e);for(var a=0;a!==t.length;++a){if(r[e[t[a]]]==null)r[e[t[a]]]=[];r[e[t[a]]].push(t[a])}return r}var cr=Date.UTC(1899,11,30,0,0,0);var hr=Date.UTC(1899,11,31,0,0,0);var ur=Date.UTC(1904,0,1,0,0,0);function dr(e,r){var t=e.getTime();var a=(t-cr)/(24*60*60*1e3);if(r){a-=1462;return a<-1402?a-1:a}return a<60?a-1:a}function vr(e){if(e>=60&&e<61)return e;var r=new Date;r.setTime((e>60?e:e+1)*24*60*60*1e3+cr);return r}function pr(e){var r=0,t=0,a=false;var n=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!n)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var i=1;i!=n.length;++i){if(!n[i])continue;t=1;if(i>3)a=true;switch(n[i].slice(n[i].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+n[i].slice(n[i].length-1));case"D":t*=24;case"H":t*=60;case"M":if(!a)throw new Error("Unsupported ISO Duration Field: M");else t*=60;case"S":break;}r+=t*parseInt(n[i],10)}return r}var mr=/^(\d+):(\d+)(:\d+)?(\.\d+)?$/;var gr=/^(\d+)-(\d+)-(\d+)$/;var br=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;function wr(e,r){if(e instanceof Date)return e;var t=e.match(mr);if(t)return new Date((r?ur:hr)+((parseInt(t[1],10)*60+parseInt(t[2],10))*60+(t[3]?parseInt(t[3].slice(1),10):0))*1e3+(t[4]?parseInt((t[4]+"000").slice(1,4),10):0));t=e.match(gr);if(t)return new Date(Date.UTC(+t[1],+t[2]-1,+t[3],0,0,0,0));t=e.match(br);if(t)return new Date(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4],+t[5],t[6]&&parseInt(t[6].slice(1),10)||0,t[7]&&parseInt((t[7]+"0000").slice(1,4),10)||0));var a=new Date(e);return a}function kr(e,r){if(C&&Buffer.isBuffer(e)){if(r&&S){if(e[0]==255&&e[1]==254)return Rt(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return Rt(d(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder!=="undefined")try{if(r){if(e[0]==255&&e[1]==254)return Rt(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return Rt(new TextDecoder("utf-16be").decode(e.slice(2)))}var t={"â¬":"Â","â":"Â","Æ":"Â","â":"Â","â¦":"Â
","â ":"Â","â¡":"Â","Ë":"Â","â°":"Â","Å ":"Â","â¹":"Â","Å":"Â","Ž":"Â","â":"Â","â":"Â","â":"Â","â":"Â","â¢":"Â","â":"Â","â":"Â","Ë":"Â","â¢":"Â","Å¡":"Â","âº":"Â","Å":"Â","ž":"Â","Ÿ":"Â"};if(Array.isArray(e))e=new Uint8Array(e);return new TextDecoder("latin1").decode(e).replace(/[â¬âÆââ¦â â¡Ëâ°Å â¹ÅŽâââââ¢ââËâ¢Å¡âºÅžŸ]/g,function(e){return t[e]||e})}catch(a){}var n=[],i=0;try{for(i=0;i<e.length-65536;i+=65536)n.push(String.fromCharCode.apply(0,e.slice(i,i+65536)));n.push(String.fromCharCode.apply(0,e.slice(i)))}catch(a){try{for(;i<e.length-16384;i+=16384)n.push(String.fromCharCode.apply(0,e.slice(i,i+16384)));n.push(String.fromCharCode.apply(0,e.slice(i)))}catch(a){for(;i!=e.length;++i)n.push(String.fromCharCode(e[i]))}}return n.join("")}function Ar(e){if(typeof JSON!="undefined"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var r={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))r[t]=Ar(e[t]);return r}function Tr(e,r){var t="";while(t.length<r)t+=e;return t}function yr(e){var r=Number(e);if(!isNaN(r))return isFinite(r)?r:NaN;if(!/\d/.test(e))return r;var t=1;var a=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){t*=100;return""});if(!isNaN(r=Number(a)))return r/t;a=a.replace(/[(]([^()]*)[)]/,function(e,r){t=-t;return r});if(!isNaN(r=Number(a)))return r/t;return r}var Er=/^(0?\d|1[0-2])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))\s+([ap])m?$/;var Cr=/^([01]?\d|2[0-3])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))$/;var _r=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)(\.\d+)?[Z]?$/;var Sr=new Date("6/9/69 00:00 UTC").valueOf()==-177984e5;function xr(e){if(!e[2])return new Date(Date.UTC(1899,11,31,+e[1]%12+(e[7]=="p"?12:0),0,0,0));if(e[3]){if(e[4])return new Date(Date.UTC(1899,11,31,+e[1]%12+(e[7]=="p"?12:0),+e[2],+e[4],parseFloat(e[3])*1e3));else return new Date(Date.UTC(1899,11,31,e[7]=="p"?12:0,+e[1],+e[2],parseFloat(e[3])*1e3))}else if(e[5])return new Date(Date.UTC(1899,11,31,+e[1]%12+(e[7]=="p"?12:0),+e[2],+e[5],e[6]?parseFloat(e[6])*1e3:0));else return new Date(Date.UTC(1899,11,31,+e[1]%12+(e[7]=="p"?12:0),+e[2],0,0))}function Or(e){if(!e[2])return new Date(Date.UTC(1899,11,31,+e[1],0,0,0));if(e[3]){if(e[4])return new Date(Date.UTC(1899,11,31,+e[1],+e[2],+e[4],parseFloat(e[3])*1e3));else return new Date(Date.UTC(1899,11,31,0,+e[1],+e[2],parseFloat(e[3])*1e3))}else if(e[5])return new Date(Date.UTC(1899,11,31,+e[1],+e[2],+e[5],e[6]?parseFloat(e[6])*1e3:0));else return new Date(Date.UTC(1899,11,31,+e[1],+e[2],0,0))}var Ir=["january","february","march","april","may","june","july","august","september","october","november","december"];function Rr(e){if(_r.test(e))return e.indexOf("Z")==-1?Dr(new Date(e)):new Date(e);var r=e.toLowerCase();var t=r.replace(/\s+/g," ").trim();var a=t.match(Er);if(a)return xr(a);a=t.match(Cr);if(a)return Or(a);a=t.match(br);if(a)return new Date(Date.UTC(+a[1],+a[2]-1,+a[3],+a[4],+a[5],a[6]&&parseInt(a[6].slice(1),10)||0,a[7]&&parseInt((a[7]+"0000").slice(1,4),10)||0));var n=new Date(Sr&&e.indexOf("UTC")==-1?e+" UTC":e),i=new Date(NaN);var s=n.getYear(),f=n.getMonth(),l=n.getDate();if(isNaN(l))return i;if(r.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){r=r.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,"");if(r.length>3&&I
vendor: 3,334 bytes, line 64880
64880r.indexOf(r)==-1)return i}else if(r.replace(/[ap]m?/,"").match(/[a-z]/))return i;if(s<0||s>8099||e.match(/[^-0-9:,\/\\\ ]/))return i;return n}var Nr=function(){var e="abacaba".split(/(:?b)/i).length==5;return function r(t,a,n){if(e||typeof a=="string")return t.split(a);var i=t.split(a),s=[i[0]];for(var f=1;f<i.length;++f){s.push(n);s.push(i[f])}return s}}();function Fr(e){return new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}function Dr(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}function Pr(e){var r=e.slice(0,1024);var t=r.indexOf("<!DOCTYPE");if(t==-1)return e;var a=e.match(/<[\w]/);if(!a)return e;return e.slice(0,t)+e.slice(a.index)}function Lr(e,r,t){var a=[];var n=e.indexOf(r);while(n>-1){var i=e.indexOf(t,n+r.length);if(i==-1)break;a.push(e.slice(n,i+t.length));n=e.indexOf(r,i+t.length)}return a.length>0?a:null}function Mr(e,r,t){var a=[],n=0;var i=e.indexOf(r);if(i==-1)return e;while(i>-1){a.push(e.slice(n,i));var s=e.indexOf(t,i+r.length);if(s==-1)break;if((i=e.indexOf(r,n=s+t.length))==-1)a.push(e.slice(n))}return a.join("")}var Ur={" ":1,"\t":1,"\r":1,"\n":1,">":1};function Br(e,r){var t=e.indexOf("<"+r),a=r.length+1,n=e.length;while(t>=0&&t<=n-a&&!Ur[e.charAt(t+a)])t=e.indexOf("<"+r,t+1);if(t===-1)return null;var i=e.indexOf(">",t+r.length);if(i===-1)return null;var s="</"+r+">";var f=e.indexOf(s,i);if(f==-1)return null;return[e.slice(t,f+s.length),e.slice(i+1,f)]}var Wr=function(){var e={};return function r(t,a){var n=e[a];if(!n)e[a]=n=[new RegExp("<(?:\\w+:)?"+a+"\\b[^<>]*>","g"),new RegExp("</(?:\\w+:)?"+a+">","g")];n[0].lastIndex=n[1].lastIndex=0;var i=n[0].exec(t);if(!i)return null;var s=i.index;var f=n[0].lastIndex;n[1].lastIndex=n[0].lastIndex;i=n[1].exec(t);if(!i)return null;var l=i.index;var o=n[1].lastIndex;return[t.slice(s,o),t.slice(f,l)]}}();var zr=function(){var e={};return function r(t,a){var n=[];var i=e[a];if(!i)e[a]=i=[new RegExp("<(?:\\w+:)?"+a+"\\b[^<>]*>","g"),new RegExp("</(?:\\w+:)?"+a+">","g")];i[0].lastIndex=i[1].lastIndex=0;var s;while(s=i[0].exec(t)){var f=s.index;i[1].lastIndex=i[0].lastIndex;s=i[1].exec(t);if(!s)return null;var l=i[1].lastIndex;n.push(t.slice(f,l));i[0].lastIndex=i[1].lastIndex}return n.length==0?null:n}}();var Hr=function(){var e={};return function r(t,a){var n=[];var i=e[a];if(!i)e[a]=i=[new RegExp("<(?:\\w+:)?"+a+"\\b[^<>]*>","g"),new RegExp("</(?:\\w+:)?"+a+">","g")];i[0].lastIndex=i[1].lastIndex=0;var s;var f=0,l=0;while(s=i[0].exec(t)){f=s.index;n.push(t.slice(l,f));l=f;i[1].lastIndex=i[0].lastIndex;s=i[1].exec(t);if(!s)return null;l=i[1].lastIndex;i[0].lastIndex=i[1].lastIndex}n.push(t.slice(l));return n.length==0?"":n.join("")}}();var Vr=function(){var e={};return function r(t,a){var n=[];var i=e[a];if(!i)e[a]=i=[new RegExp("<"+a+"\\b[^<>]*>","ig"),new RegExp("</"+a+">","ig")];i[0].lastIndex=i[1].lastIndex=0;var s;while(s=i[0].exec(t)){var f=s.index;i[1].lastIndex=i[0].lastIndex;s=i[1].exec(t);if(!s)return null;var l=i[1].lastIndex;n.push(t.slice(f,l));i[0].lastIndex=i[1].lastIndex}return n.length==0?null:n}}();function $r(e){if(!e)return null;if(e.content&&e.type)return kr(e.content,true);if(e.data)return v(e.data);if(e.asNodeBuffer&&
vendor: 8,942 bytes, line 64880
64880C)return v(e.asNodeBuffer().toString("binary"));if(e.asBinary)return v(e.asBinary());if(e._data&&e._data.getContent)return v(kr(Array.prototype.slice.call(e._data.getContent(),0)));return null}function Xr(e){if(!e)return null;if(e.data)return c(e.data);if(e.asNodeBuffer&&C)return e.asNodeBuffer();if(e._data&&e._data.getContent){var r=e._data.getContent();if(typeof r=="string")return c(r);return Array.prototype.slice.call(r)}if(e.content&&e.type)return e.content;return null}function Gr(e){return e&&e.name.slice(-4)===".bin"?Xr(e):$r(e)}function jr(e,r){var t=e.FullPaths||ir(e.files);var a=r.toLowerCase().replace(/[\/]/g,"\\"),n=a.replace(/\\/g,"/");for(var i=0;i<t.length;++i){var s=t[i].replace(/^Root Entry[\/]/,"").toLowerCase();if(a==s||n==s)return e.files?e.files[t[i]]:e.FileIndex[i]}return null}function Kr(e,r){var t=jr(e,r);if(t==null)throw new Error("Cannot find file "+r+" in zip");return t}function Yr(e,r,t){if(!t)return Gr(Kr(e,r));if(!r)return null;try{return Yr(e,r)}catch(a){return null}}function Zr(e,r,t){if(!t)return $r(Kr(e,r));if(!r)return null;try{return Zr(e,r)}catch(a){return null}}function Jr(e,r,t){if(!t)return Xr(Kr(e,r));if(!r)return null;try{return Jr(e,r)}catch(a){return null}}function qr(e){var r=e.FullPaths||ir(e.files),t=[];for(var a=0;a<r.length;++a)if(r[a].slice(-1)!="/")t.push(r[a].replace(/^Root Entry[\/]/,""));return t.sort()}function Qr(e,r,t){if(e.FullPaths){if(Array.isArray(t)&&typeof t[0]=="string"){t=t.join("")}if(typeof t=="string"){var a;if(C)a=_(t);else a=L(t);return Qe.utils.cfb_add(e,r,a)}Qe.utils.cfb_add(e,r,t)}else e.file(r,t)}function et(){return Qe.utils.cfb_new()}function rt(e,r){switch(r.type){case"base64":return Qe.read(e,{type:"base64"});case"binary":return Qe.read(e,{type:"binary"});case"buffer":;case"array":return Qe.read(e,{type:"buffer"});}throw new Error("Unrecognized type "+r.type)}function tt(e,r){if(e.charAt(0)=="/")return e.slice(1);var t=r.split("/");if(r.slice(-1)!="/")t.pop();var a=e.split("/");while(a.length!==0){var n=a.shift();if(n==="..")t.pop();else if(n!==".")t.push(n)}return t.join("/")}var at='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n';var nt=/\s([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g;var it=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?<>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'"<>\s=]+))*\s*[\/\?]?>/gm,st=/<[^<>]*>/g;var ft=at.match(it)?it:st;var lt=/<\w*:/,ot=/<(\/?)\w+:/;function ct(e,r,t){var a={};var n=0,i=0;for(;n!==e.length;++n)if((i=e.charCodeAt(n))===32||i===10||i===13)break;if(!r)a[0]=e.slice(0,n);if(n===e.length)return a;var s=e.match(nt),f=0,l="",o=0,c="",h="",u=1;if(s)for(o=0;o!=s.length;++o){h=s[o].slice(1);for(i=0;i!=h.length;++i)if(h.charCodeAt(i)===61)break;c=h.slice(0,i).trim();while(h.charCodeAt(i+1)==32)++i;u=(n=h.charCodeAt(i+1))==34||n==39?1:0;l=h.slice(i+1+u,h.length-u);for(f=0;f!=c.length;++f)if(c.charCodeAt(f)===58)break;if(f===c.length){if(c.indexOf("_")>0)c=c.slice(0,c.indexOf("_"));a[c]=l;if(!t)a[c.toLowerCase()]=l}else{var d=(f===5&&c.slice(0,5)==="xmlns"?"xmlns":"")+c.slice(f+1);if(a[d]&&c.slice(f-3,f)=="ext")continue;a[d]=l;if(!t)a[d.toLowerCase()]=l}}return a}function ht(e,r,t){var a={};var n=0,i=0;for(;n!==e.length;++n)if((i=e.charCodeAt(n))===32||i===10||i===13)break;if(!r)a[0]=e.slice(0,n);if(n===e.length)return a;var s=e.match(nt),f=0,l="",o=0,c="",h="",u=1;if(s)for(o=0;o!=s.length;++o){h=s[o].slice(1);for(i=0;i!=h.length;++i)if(h.charCodeAt(i)===61)break;c=h.slice(0,i).trim();while(h.charCodeAt(i+1)==32)++i;u=(n=h.charCodeAt(i+1))==34||n==39?1:0;l=h.slice(i+1+u,h.length-u);if(c.indexOf("_")>0)c=c.slice(0,c.indexOf("_"));a[c]=l;if(!t)a[c.toLowerCase()]=l}return a}function ut(e){return e.replace(ot,"<$1")}var dt={""":'"',"'":"'",">":">","<":"<","&":"&"};var vt=fr(dt);var pt=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/gi,r=/_x([\da-fA-F]{4})_/gi;function t(a){var n=a+"",i=n.indexOf("<![CDATA[");if(i==-1)return n.replace(e,function(e,r){return dt[e]||String.fromCharCode(parseInt(r,e.indexOf("x")>-1?16:10))||e}).replace(r,function(e,r){return String.fromCharCode(parseInt(r,16))});var s=n.indexOf("]]>");return t(n.slice(0,i))+n.slice(i+9,s)+t(n.slice(s+3))}return function a(e,r){var a=t(e);return r?a.replace(/\r\n/g,"\n"):a}}();var mt=/[&<>'"]/g,gt=/[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;function bt(e){var r=e+"";return r.replace(mt,function(e){return vt[e]}).replace(gt,function(e){return"_x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+"_"})}function wt(e){return bt(e).replace(/ /g,"_x0020_")}var kt=/[\u0000-\u001f]/g;function At(e){var r=e+"";return r.replace(mt,function(e){return vt[e]}).replace(/\n/g,"<br/>").replace(kt,function(e){return"&#x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+";"})}function Tt(e){var r=e+"";return r.replace(mt,function(e){return vt[e]}).replace(kt,function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"})}var yt=function(){var e=/&#(\d+);/g;function r(e,r){return String.fromCharCode(parseInt(r,10))}return function t(a){return a.replace(e,r)}}();function Et(e){return e.replace(/(\r\n|[\r\n])/g," ")}function Ct(e){switch(e){case 1:;case true:;case"1":;case"true":return true;case 0:;case false:;case"0":;case"false":return false;}return false}function _t(e){var r="",t=0,a=0,n=0,i=0,s=0,f=0;while(t<e.length){a=e.charCodeAt(t++);if(a<128){r+=String.fromCharCode(a);continue}n=e.charCodeAt(t++);if(a>191&&a<224){s=(a&31)<<6;s|=n&63;r+=String.fromCharCode(s);continue}i=e.charCodeAt(t++);if(a<240){r+=String.fromCharCode((a&15)<<12|(n&63)<<6|i&63);continue}s=e.charCodeAt(t++);f=((a&7)<<18|(n&63)<<12|(i&63)<<6|s&63)-65536;r+=String.fromCharCode(55296+(f>>>10&1023));r+=String.fromCharCode(56320+(f&1023))}return r}function St(e){var r=x(2*e.length),t,a,n=1,i=0,s=0,f;for(a=0;a<e.length;a+=n){n=1;if((f=e.charCodeAt(a))<128)t=f;else if(f<224){t=(f&31)*64+(e.charCodeAt(a+1)&63);n=2}else if(f<240){t=(f&15)*4096+(e.charCodeAt(a+1)&63)*64+(e.charCodeAt(a+2)&63);n=3}else{n=4;t=(f&7)*262144+(e.charCodeAt(a+1)&63)*4096+(e.charCodeAt(a+2)&63)*64+(e.charCodeAt(a+3)&63);t-=65536;s=55296+(t>>>10&1023);t=56320+(t&1023)}if(s!==0){r[i++]=s&255;r[i++]=s>>>8;s=0}r[i++]=t%256;r[i++]=t>>>8}return r.slice(0,i).toString("ucs2")}function xt(e){return _(e,"binary").toString("utf8")}var Ot="foo bar bazâÂÂð£";var It=C&&(xt(Ot)==_t(Ot)&&xt||St(Ot)==_t(Ot)&&St)||_t;var Rt=C?function(e){return _(e,"utf8").toString("binary")}:function(e){var r=[],t=0,a=0,n=0;while(t<e.length){a=e.charCodeAt(t++);switch(true){case a<128:r.push(String.fromCharCode(a));break;case a<2048:r.push(String.fromCharCode(192+(a>>6)));r.push(String.fromCharCode(128+(a&63)));break;case a>=55296&&a<57344:a-=55296;n=e.charCodeAt(t++)-56320+(a<<10);r.push(String.fromCharCode(240+(n>>18&7)));r.push(String.fromCharCode(144+(n>>12&63)));r.push(String.fromCharCode(128+(n>>6&63)));r.push(String.fromCharCode(128+(n&63)));break;default:r.push(String.fromCharCode(224+(a>>12)));r.push(String.fromCharCode(128+(a>>6&63)));r.push(String.fromCharCode(128+(a&63)));}}return r.join("")};var Nt=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(e){return[new RegExp("&"+e[0]+";","ig"),e[1]]});return function r(t){var a=t.replace(/^[\t\n\r ]+/,"").replace(/(^|[^\t\n\r ])[\t\n\r ]+$/,"$1").replace(/>\s+/g,">").replace(/\b\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,"\n").replace(/<[^<>]*>/g,"");for(var n=0;n<e.length;++n)a=a.replace(e[n][0],e[n][1]);return a}}();var Ft=/<\/?(?:vt:)?variant>/g,Dt=/<(?:vt:)([^<"'>]*)>([\s\S]*)</;function Pt(e,r){var t=ct(e);var a=zr(e,t.baseType)||[];var n=[];if(a.length!=t.size){if(r.WTF)throw new Error("unexpected vector length "+a.length+" != "+t.size);return n}a.forEach(function(e){var r=e.replace(Ft,"").match(Dt);if(r)n.push({v:It(r[2]),t:r[1]})});return n}var Lt=/(^\s|\s$|\n)/;function Mt(e,r){return"<"+e+(r.match(Lt)?' xml:space="preserve"':"")+">"+r+"</"+e+">"}function Ut(e){return ir(e).map(function(r){return" "+r+'="'+e[r]+'"'}).join("")}function Bt(e,r,t){return"<"+e+(t!=null?Ut(t):"")+(r!=null?(r.match(Lt)?' xml:space="preserve"':"")+">"+r+"</"+e:"/")+">"}function Wt(e,r){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throw t}return""}function zt(e,r){switch(typeof e){case"string":var t=Bt("vt:lpwstr",bt(e));if(r)t=t.replace(/"/g,"_x0022_");return t;case"number":return Bt((e|0)==e?"vt:i4":"vt:r8",bt(String(e)));case"boolean":return Bt("vt:bool",e?"true":"false");}if(e instanceof Date)return Bt("vt:filetime",Wt(e));throw new Error("Unable to serialize "+e)}function Ht(e){if(C&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e==="string")return e;if(typeof Uint8Array!=="undefined"&&e instanceof Uint8Array)return It(N(D(e)));throw new Error("Bad input format: expected Buffer or string")}var Vt=/<([\/]?)([^\s?><!\/:"]*:|)([^\s?<>:\/"]+)(?:\s+[^<>=?"'\s]+="[^"]*?")*\s*[\/]?>/gm;
vendor: 13,597 bytes, lines 64880-64881
64880var $t={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"};var Xt=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];var Gt={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function jt(e,r){var t=1-2*(e[r+7]>>>7);var a=((e[r+7]&127)<<4)+(e[r+6]>>>4&15);var n=e[r+6]&15;for(var i=5;i>=0;--i)n=n*256+e[r+i];if(a==2047)return n==0?t*Infinity:NaN;if(a==0)a=-1022;else{a-=1023;n+=Math.pow(2,52)}return t*Math.pow(2,a-52)*n}function Kt(e,r,t){var a=(r<0||1/r==-Infinity?1:0)<<7,n=0,i=0;var s=a?-r:r;if(!isFinite(s)){n=2047;i=isNaN(r)?26985:0}else if(s==0)n=i=0;else{n=Math.floor(Math.log(s)/Math.LN2);i=s*Math.pow(2,52-n);if(n<=-1023&&(!isFinite(i)||i<Math.pow(2,52))){n=-1022}else{i-=Math.pow(2,52);n+=1023}}for(var f=0;f<=5;++f,i/=256)e[t+f]=i&255;e[t+6]=(n&15)<<4|i&15;e[t+7]=n>>4|a}var Yt=function(e){var r=[],t=10240;for(var a=0;a<e[0].length;++a)if(e[0][a])for(var n=0,i=e[0][a].length;n<i;n+=t)r.push.apply(r,e[0][a].slice(n,n+t));return r};var Zt=C?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(e){return Buffer.isBuffer(e)?e:_(e)})):Yt(e)}:Yt;var Jt=function(e,r,t){var a=[];for(var n=r;n<t;n+=2)a.push(String.fromCharCode(ba(e,n)));return a.join("").replace(M,"")};var qt=C?function(e,r,t){if(!Buffer.isBuffer(e)||!S)return Jt(e,r,t);return e.toString("utf16le",r,t).replace(M,"")}:Jt;var Qt=function(e,r,t){var a=[];for(var n=r;n<r+t;++n)a.push(("0"+e[n].toString(16)).slice(-2));return a.join("")};var ea=C?function(e,r,t){return Buffer.isBuffer(e)?e.toString("hex",r,r+t):Qt(e,r,t)}:Qt;var ra=function(e,r,t){var a=[];for(var n=r;n<t;n++)a.push(String.fromCharCode(ga(e,n)));return a.join("")};var ta=C?function uA(e,r,t){return Buffer.isBuffer(e)?e.toString("utf8",r,t):ra(e,r,t)}:ra;var aa=function(e,r){var t=ka(e,r);return t>0?ta(e,r+4,r+4+t-1):""};var na=aa;var ia=function(e,r){var t=ka(e,r);return t>0?ta(e,r+4,r+4+t-1):""};var sa=ia;var fa=function(e,r){var t=2*ka(e,r);return t>0?ta(e,r+4,r+4+t-1):""};var la=fa;var oa=function dA(e,r){var t=ka(e,r);return t>0?qt(e,r+4,r+4+t):""};var ca=oa;var ha=function(e,r){ 64881var t=ka(e,r);return t>0?ta(e,r+4,r+4+t):""};var ua=ha;var da=function(e,r){return jt(e,r)};var va=da;var pa=function vA(e){return Array.isArray(e)||typeof Uint8Array!=="undefined"&&e instanceof Uint8Array};if(C){na=function pA(e,r){if(!Buffer.isBuffer(e))return aa(e,r);var t=e.readUInt32LE(r);return t>0?e.toString("utf8",r+4,r+4+t-1):""};sa=function mA(e,r){if(!Buffer.isBuffer(e))return ia(e,r);var t=e.readUInt32LE(r);return t>0?e.toString("utf8",r+4,r+4+t-1):""};la=function gA(e,r){if(!Buffer.isBuffer(e)||!S)return fa(e,r);var t=2*e.readUInt32LE(r);return e.toString("utf16le",r+4,r+4+t-1)};ca=function bA(e,r){if(!Buffer.isBuffer(e)||!S)return oa(e,r);var t=e.readUInt32LE(r);return e.toString("utf16le",r+4,r+4+t)};ua=function wA(e,r){if(!Buffer.isBuffer(e))return ha(e,r);var t=e.readUInt32LE(r);return e.toString("utf8",r+4,r+4+t)};va=function kA(e,r){if(Buffer.isBuffer(e))return e.readDoubleLE(r);return da(e,r)};pa=function AA(e){return Buffer.isBuffer(e)||Array.isArray(e)||typeof Uint8Array!=="undefined"&&e instanceof Uint8Array}}function ma(){qt=function(e,r,t){return a.utils.decode(1200,e.slice(r,t)).replace(M,"")};ta=function(e,r,t){return a.utils.decode(65001,e.slice(r,t))};na=function(e,r){var n=ka(e,r);return n>0?a.utils.decode(t,e.slice(r+4,r+4+n-1)):""};sa=function(e,t){var n=ka(e,t);return n>0?a.utils.decode(r,e.slice(t+4,t+4+n-1)):""};la=function(e,r){var t=2*ka(e,r);return t>0?a.utils.decode(1200,e.slice(r+4,r+4+t-1)):""};ca=function(e,r){var t=ka(e,r);return t>0?a.utils.decode(1200,e.slice(r+4,r+4+t)):""};ua=function(e,r){var t=ka(e,r);return t>0?a.utils.decode(65001,e.slice(r+4,r+4+t)):""}}if(typeof a!=="undefined")ma();var ga=function(e,r){return e[r]};var ba=function(e,r){return e[r+1]*(1<<8)+e[r]};var wa=function(e,r){var t=e[r+1]*(1<<8)+e[r];return t<32768?t:(65535-t+1)*-1};var ka=function(e,r){return e[r+3]*(1<<24)+(e[r+2]<<16)+(e[r+1]<<8)+e[r]};var Aa=function(e,r){return e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]};var Ta=function(e,r){return e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]};function ya(e,t){var n="",i,s,f=[],l,o,c,h;switch(t){case"dbcs":h=this.l;if(C&&Buffer.isBuffer(this)&&S)n=this.slice(this.l,this.l+2*e).toString("utf16le");else for(c=0;c<e;++c){n+=String.fromCharCode(ba(this,h));h+=2}e*=2;break;case"utf8":n=ta(this,this.l,this.l+e);break;case"utf16le":e*=2;n=qt(this,this.l,this.l+e);break;case"wstr":if(typeof a!=="undefined")n=a.utils.decode(r,this.slice(this.l,this.l+2*e));else return ya.call(this,e,"dbcs");e=2*e;break;case"lpstr-ansi":n=na(this,this.l);e=4+ka(this,this.l);break;case"lpstr-cp":n=sa(this,this.l);e=4+ka(this,this.l);break;case"lpwstr":n=la(this,this.l);e=4+2*ka(this,this.l);break;case"lpp4":e=4+ka(this,this.l);n=ca(this,this.l);if(e&2)e+=2;break;case"8lpp4":e=4+ka(this,this.l);n=ua(this,this.l);if(e&3)e+=4-(e&3);break;case"cstr":e=0;n="";while((l=ga(this,this.l+e++))!==0)f.push(p(l));n=f.join("");break;case"_wstr":e=0;n="";while((l=ba(this,this.l+e))!==0){f.push(p(l));e+=2}e+=2;n=f.join("");break;case"dbcs-cont":n="";h=this.l;for(c=0;c<e;++c){if(this.lens&&this.lens.indexOf(h)!==-1){l=ga(this,h);this.l=h+1;o=ya.call(this,e-c,l?"dbcs-cont":"sbcs-cont");return f.join("")+o}f.push(p(ba(this,h)));h+=2}n=f.join("");e*=2;break;case"cpstr":if(typeof a!=="undefined"){n=a.utils.decode(r,this.slice(this.l,this.l+e));break};case"sbcs-cont":n="";h=this.l;for(c=0;c!=e;++c){if(this.lens&&this.lens.indexOf(h)!==-1){l=ga(this,h);this.l=h+1;o=ya.call(this,e-c,l?"dbcs-cont":"sbcs-cont");return f.join("")+o}f.push(p(ga(this,h)));h+=1}n=f.join("");break;default:switch(e){case 1:i=ga(this,this.l);this.l++;return i;case 2:i=(t==="i"?wa:ba)(this,this.l);this.l+=2;return i;case 4:;case-4:if(t==="i"||(this[this.l+3]&128)===0){i=(e>0?Aa:Ta)(this,this.l);this.l+=4;return i}else{s=ka(this,this.l);this.l+=4}return s;case 8:;case-8:if(t==="f"){if(e==8)s=va(this,this.l);else s=va([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0);this.l+=8;return s}else e=8;case 16:n=ea(this,this.l,e);break;};}this.l+=e;return n}var Ea=function(e,r,t){e[t]=r&255;e[t+1]=r>>>8&255;e[t+2]=r>>>16&255;e[t+3]=r>>>24&255};var Ca=function(e,r,t){e[t]=r&255;e[t+1]=r>>8&255;e[t+2]=r>>16&255;e[t+3]=r>>24&255};var _a=function(e,r,t){e[t]=r&255;e[t+1]=r>>>8&255};function Sa(e,n,i){var s=0,f=0;if(i==="dbcs"){for(f=0;f!=n.length;++f)_a(this,n.charCodeAt(f),this.l+2*f);s=2*n.length}else if(i==="sbcs"||i=="cpstr"){if(typeof a!=="undefined"&&t==874){for(f=0;f!=n.length;++f){var l=a.utils.encode(t,n.charAt(f));this[this.l+f]=l[0]}s=n.length}else if(typeof a!=="undefined"&&i=="cpstr"){l=a.utils.encode(r,n);if(l.length==n.length)for(f=0;f<n.length;++f)if(l[f]==0&&n.charCodeAt(f)!=0)l[f]=95;if(l.length==2*n.length)for(f=0;f<n.length;++f)if(l[2*f]==0&&l[2*f+1]==0&&n.charCodeAt(f)!=0)l[2*f]=95;for(f=0;f<l.length;++f)this[this.l+f]=l[f];s=l.length}else{n=n.replace(/[^\x00-\x7F]/g,"_");for(f=0;f!=n.length;++f)this[this.l+f]=n.charCodeAt(f)&255;s=n.length}}else if(i==="hex"){for(;f<e;++f){this[this.l++]=parseInt(n.slice(2*f,2*f+2),16)||0}return this}else if(i==="utf16le"){var o=Math.min(this.l+e,this.length);for(f=0;f<Math.min(n.length,e);++f){var c=n.charCodeAt(f);this[this.l++]=c&255;this[this.l++]=c>>8}while(this.l<o)this[this.l++]=0;return this}else switch(e){case 1:s=1;this[this.l]=n&255;break;case 2:s=2;this[this.l]=n&255;n>>>=8;this[this.l+1]=n&255;break;case 3:s=3;this[this.l]=n&255;n>>>=8;this[this.l+1]=n&255;n>>>=8;this[this.l+2]=n&255;break;case 4:s=4;Ea(this,n,this.l);break;case 8:s=8;if(i==="f"){Kt(this,n,this.l);break};case 16:break;case-4:s=4;Ca(this,n,this.l);break;}this.l+=s;return this}function xa(e,r){var t=ea(this,this.l,e.length>>1);if(t!==e)throw new Error(r+"Expected "+e+" saw "+t);this.l+=e.length>>1}function Oa(e,r){e.l=r;e._R=ya;e.chk=xa;e._W=Sa}function Ia(e,r){e.l+=r}function Ra(e){var r=x(e);Oa(r,0);return r}function Na(e,r,t){if(!e)return;var a,n,i;Oa(e,e.l||0);var s=e.length,f=0,l=0;while(e.l<s){f=e._R(1);if(f&128)f=(f&127)+((e._R(1)&127)<<7);var o=Zg[f]||Zg[65535];a=e._R(1);i=a&127;for(n=1;n<4&&a&128;++n)i+=((a=e._R(1))&127)<<7*n;l=e.l+i;var c=o.f&&o.f(e,i,t);e.l=l;if(r(c,o,f))return}}function Fa(){var e=[],r=C?16384:2048;var t=C&&typeof Ra(r).copy=="function";var a=function c(e){var r=Ra(e);Oa(r,0);return r};var n=a(r);var i=function h(){if(!n)return;if(n.l){if(n.length>n.l){n=n.slice(0,n.l);n.l=n.length}if(n.length>0)e.push(n)}n=null};var s=function u(e){if(n&&e<n.length-n.l)return n;i();return n=a(Math.max(e+1,r))};var f=function d(){i();return P(e)};var l=function(){i();return e};var o=function v(e){i();n=e;if(n.l==null)n.l=n.length;s(r)};return{next:s,push:o,end:f,_bufs:e,end2:l}}function Da(e,r,t,a){var n=+r,i;if(isNaN(n))return;if(!a)a=Zg[n].p||(t||[]).length||0;i=1+(n>=128?1:0)+1;if(a>=128)++i;if(a>=16384)++i;if(a>=2097152)++i;var s=e.next(i);if(n<=127)s._W(1,n);else{s._W(1,(n&127)+128);s._W(1,n>>7)}for(var f=0;f!=4;++f){if(a>=128){s._W(1,(a&127)+128);a>>=7}else{s._W(1,a);break}}if(a>0&&pa(t))e.push(t)}function Pa(e,r,t){var a=Ar(e);if(r.s){if(a.cRel)a.c+=r.s.c;if(a.rRel)a.r+=r.s.r}else{if(a.cRel)a.c+=r.c;if(a.rRel)a.r+=r.r}if(!t||t.biff<12){while(a.c>=256)a.c-=256;while(a.r>=65536)a.r-=65536}return a}function La(e,r,t){var a=Ar(e);a.s=Pa(a.s,r.s,t);a.e=Pa(a.e,r.s,t);return a}function Ma(e,r){if(e.cRel&&e.c<0){e=Ar(e);while(e.c<0)e.c+=r>8?16384:256}if(e.rRel&&e.r<0){e=Ar(e);while(e.r<0)e.r+=r>8?1048576:r>5?65536:16384}var t=Ya(e);if(!e.cRel&&e.cRel!=null)t=Xa(t);if(!e.rRel&&e.rRel!=null)t=za(t);return t}function Ua(e,r){if(e.s.r==0&&!e.s.rRel){if(e.e.r==(r.biff>=12?1048575:r.biff>=8?65536:16384)&&!e.e.rRel){return(e.s.cRel?"":"$")+$a(e.s.c)+":"+(e.e.cRel?"":"$")+$a(e.e.c)}}if(e.s.c==0&&!e.s.cRel){if(e.e.c==(r.biff>=12?16383:255)&&!e.e.cRel){return(e.s.rRel?"":"$")+Wa(e.s.r)+":"+(e.e.rRel?"":"$")+Wa(e.e.r)}}return Ma(e.s,r.biff)+":"+Ma(e.e,r.biff)}if(typeof cptable!=="undefined")g(cptable);else if(typeof module!=="undefined"&&typeof require!=="undefined"){g(undefined)}function Ba(e){return parseInt(Ha(e),10)-1}function Wa(e){return""+(e+1)}function za(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function Ha(e){return e.replace(/\$(\d+)$/,"$1")}function Va(e){var r=Ga(e),t=0,a=0;for(;a!==r.length;++a)t=26*t+r.charCodeAt(a)-64;return t-1}function $a(e){if(e<0)throw new Error("invalid column "+e);var r="";for(++e;e;e=Math.floor((e-1)/26))r=String.fromCharCode((e-1)%26+65)+r;return r}function Xa(e){return e.replace(/^([A-Z])/,"$$$1")}function Ga(e){return e.replace(/^\$([A-Z])/,"$1")}function ja(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function Ka(e){var r=0,t=0;for(var a=0;a<e.length;++a){var n=e.charCodeAt(a);if(n>=48&&n<=57)r=10*r+(n-48);else if(n>=65&&n<=90)t=26*t+(n-64)}return{c:t-1,r:r-1}}function Ya(e){var r=e.c+1;var t="";for(;r;r=(r-1)/26|0)t=String.fromCharCode((r-1)%26+65)+t;return t+(e.r+1)}function Za(e){var r=e.indexOf(":");if(r==-1)return{s:Ka(e),e:Ka(e)};return{s:Ka(e.slice(0,r)),e:Ka(e.slice(r+1))}}function Ja(e,r){if(typeof r==="undefined"||typeof r==="number"){return Ja(e.s,e.e)}if(typeof e!=="string")e=Ya(e);if(typeof r!=="string")r=Ya(r);return e==r?e:e+":"+r}function qa(e){var r=Za(e);return"$"+$a(r.s.c)+"$"+Wa(r.s.r)+":$"+$a(r.e.c)+"$"+Wa(r.e.r)}function Qa(e,r){if(!e&&!(r&&r.biff<=5&&r.biff>=2))throw new Error("empty sheet name");if(/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e))return"'"+e.replace(/'/g,"''")+"'";return e}function en(e){var r={s:{c:0,r:0},e:{c:0,r:0}};var t=0,a=0,n=0;var i=e.length;for(t=0;a<i;++a){if((n=e.charCodeAt(a)-64)<1||n>26)break;t=26*t+n}r.s.c=--t;for(t=0;a<i;++a){if((n=e.charCodeAt(a)-48)<0||n>9)break;t=10*t+n}r.s.r=--t;if(a===i||n!=10){r.e.c=r.s.c;r.e.r=r.s.r;return r}++a;for(t=0;a!=i;++a){if((n=e.charCodeAt(a)-64)<1||n>26)break;t=26*t+n}r.e.c=--t;for(t=0;a!=i;++a){if((n=e.charCodeAt(a)-48)<0||n>9)break;t=10*t+n}r.e.r=--t;return r}function rn(e,r){var t=e.t=="d"&&r instanceof Date;if(e.z!=null)try{return e.w=ze(e.z,t?dr(r):r)}catch(a){}try{return e.w=ze((e.XF||{}).numFmtId||(t?14:0),t?dr(r):r)}catch(a){return""+r}}function tn(e,r,t){if(e==null||e.t==null||e.t=="z")return"";if(e.w!==undefined)return e.w;if(e.t=="d"&&!e.z&&t&&t.dateNF)e.z=t.dateNF;if(e.t=="e")return ci[e.v]||e.v;
vendor: 6,689 bytes, line 64881
64881if(r==undefined)return rn(e,e.v);return rn(e,r)}function an(e,r){var t=r&&r.sheet?r.sheet:"Sheet1";var a={};a[t]=e;return{SheetNames:[t],Sheets:a}}function nn(e){var r={};var t=e||{};if(t.dense)r["!data"]=[];return r}function sn(e,r,t){var a=t||{};var n=e?e["!data"]!=null:a.dense;if(b!=null&&n==null)n=b;var i=e||(n?{"!data":[]}:{});if(n&&!i["!data"])i["!data"]=[];var s=0,f=0;if(i&&a.origin!=null){if(typeof a.origin=="number")s=a.origin;else{var l=typeof a.origin=="string"?Ka(a.origin):a.origin;s=l.r;f=l.c}}var o={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var c=en(i["!ref"]);o.s.c=c.s.c;o.s.r=c.s.r;o.e.c=Math.max(o.e.c,c.e.c);o.e.r=Math.max(o.e.r,c.e.r);if(s==-1)o.e.r=s=i["!ref"]?c.e.r+1:0}else{o.s.c=o.e.c=o.s.r=o.e.r=0}var h=[],u=false;for(var d=0;d!=r.length;++d){if(!r[d])continue;if(!Array.isArray(r[d]))throw new Error("aoa_to_sheet expects an array of arrays");var v=s+d;if(n){if(!i["!data"][v])i["!data"][v]=[];h=i["!data"][v]}var p=r[d];for(var m=0;m!=p.length;++m){if(typeof p[m]==="undefined")continue;var g={v:p[m],t:""};var w=f+m;if(o.s.r>v)o.s.r=v;if(o.s.c>w)o.s.c=w;if(o.e.r<v)o.e.r=v;if(o.e.c<w)o.e.c=w;u=true;if(p[m]&&typeof p[m]==="object"&&!Array.isArray(p[m])&&!(p[m]instanceof Date))g=p[m];else{if(Array.isArray(g.v)){g.f=p[m][1];g.v=g.v[0]}if(g.v===null){if(g.f)g.t="n";else if(a.nullError){g.t="e";g.v=0}else if(!a.sheetStubs)continue;else g.t="z"}else if(typeof g.v==="number"){if(isFinite(g.v))g.t="n";else if(isNaN(g.v)){g.t="e";g.v=15}else{g.t="e";g.v=7}}else if(typeof g.v==="boolean")g.t="b";else if(g.v instanceof Date){g.z=a.dateNF||q[14];if(!a.UTC)g.v=Dr(g.v);if(a.cellDates){g.t="d";g.w=ze(g.z,dr(g.v,a.date1904))}else{g.t="n";g.v=dr(g.v,a.date1904);g.w=ze(g.z,g.v)}}else g.t="s"}if(n){if(h[w]&&h[w].z)g.z=h[w].z;h[w]=g}else{var k=$a(w)+(v+1);if(i[k]&&i[k].z)g.z=i[k].z;i[k]=g}}}if(u&&o.s.c<104e5)i["!ref"]=Ja(o);return i}function fn(e,r){return sn(null,e,r)}function ln(e){return e._R(4,"i")}function on(e,r){if(!r)r=Ra(4);r._W(4,e);return r}function cn(e){var r=e._R(4);return r===0?"":e._R(r,"dbcs")}function hn(e,r){var t=false;if(r==null){t=true;r=Ra(4+2*e.length)}r._W(4,e.length);if(e.length>0)r._W(0,e,"dbcs");return t?r.slice(0,r.l):r}function un(e){return{ich:e._R(2),ifnt:e._R(2)}}function dn(e,r){if(!r)r=Ra(4);r._W(2,e.ich||0);r._W(2,e.ifnt||0);return r}function vn(e,r){var t=e.l;var a=e._R(1);var n=cn(e);var i=[];var s={t:n,h:n};if((a&1)!==0){var f=e._R(4);for(var l=0;l!=f;++l)i.push(un(e));s.r=i}else s.r=[{ich:0,ifnt:0}];e.l=t+r;return s}function pn(e,r){var t=false;if(r==null){t=true;r=Ra(15+4*e.t.length)}r._W(1,0);hn(e.t,r);return t?r.slice(0,r.l):r}var mn=vn;function gn(e,r){var t=false;if(r==null){t=true;r=Ra(23+4*e.t.length)}r._W(1,1);hn(e.t,r);r._W(4,1);dn({ich:0,ifnt:0},r);return t?r.slice(0,r.l):r}function bn(e){var r=e._R(4);var t=e._R(2);t+=e._R(1)<<16;e.l++;return{c:r,iStyleRef:t}}function wn(e,r){if(r==null)r=Ra(8);r._W(-4,e.c);r._W(3,e.iStyleRef||e.s);r._W(1,0);return r}function kn(e){var r=e._R(2);r+=e._R(1)<<16;e.l++;return{c:-1,iStyleRef:r}}function An(e,r){if(r==null)r=Ra(4);r._W(3,e.iStyleRef||e.s);r._W(1,0);return r}var Tn=cn;var yn=hn;function En(e){var r=e._R(4);return r===0||r===4294967295?"":e._R(r,"dbcs")}function Cn(e,r){var t=false;if(r==null){t=true;r=Ra(127)}r._W(4,e.length>0?e.length:4294967295);if(e.length>0)r._W(0,e,"dbcs");return t?r.slice(0,r.l):r}var _n=cn;var Sn=En;var xn=Cn;function On(e){var r=e.slice(e.l,e.l+4);var t=r[0]&1,a=r[0]&2;e.l+=4;var n=a===0?va([0,0,0,0,r[0]&252,r[1],r[2],r[3]],0):Aa(r,0)>>2;return t?n/100:n}function In(e,r){if(r==null)r=Ra(4);var t=0,a=0,n=e*100;if(e==(e|0)&&e>=-(1<<29)&&e<1<<29){a=1}else if(n==(n|0)&&n>=-(1<<29)&&n<1<<29){a=1;t=1}if(a)r._W(-4,((t?n:e)<<2)+(t+2));else throw new Error("unsupported RkNumber "+e)}function Rn(e){var r={s:{},e:{}};r.s.r=e._R(4);r.e.r=e._R(4);r.s.c=e._R(4);r.e.c=e._R(4);return r}function Nn(e,r){if(!r)r=Ra(16);r._W(4,e.s.r);r._W(4,e.e.r);r._W(4,e.s.c);r._W(4,e.e.c);return r}var Fn=Rn;var Dn=Nn;function Pn(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e._R(8,"f")}function Ln(e,r){return(r||Ra(8))._W(8,e,"f")}function Mn(e){var r={};var t=e._R(1);var a=t>>>1;var n=e._R(1);var i=e._R(2,"i");var s=e._R(1);var f=e._R(1);var l=e._R(1);e.l++;switch(a){case 0:r.auto=1;break;case 1:r.index=n;var o=oi[n];if(o)r.rgb=Zo(o);break;case 2:r.rgb=Zo([s,f,l]);break;case 3:r.theme=n;break;}if(i!=0)r.tint=i>0?i/32767:i/32768;return r}function Un(e,r){if(!r)r=Ra(8);if(!e||e.auto){r._W(4,0);r._W(4,0);return r}if(e.index!=null){r._W(1,2);r._W(1,e.index)}else if(e.theme!=null){r._W(1,6);r._W(1,e.theme)}else{r._W(1,5);r._W(1,0)}var t=e.tint||0;if(t>0)t*=32767;else if(t<0)t*=32768;r._W(2,t);if(!e.rgb||e.theme!=null){r._W(2,0);r._W(1,0);r._W(1,0)}else{var a=e.rgb||"FFFFFF";if(typeof a=="number")a=("000000"+a.toString(16)).slice(-6);r._W(1,parseInt(a.slice(0,2),16));r._W(1,parseInt(a.slice(2,4),16));r._W(1,parseInt(a.slice(4,6),16));r._W(1,255)}return r}function Bn(e){var r=e._R(1);e.l++;var t={fBold:r&1,fItalic:r&2,fUnderline:r&4,fStrikeout:r&8,fOutline:r&16,fShadow:r&32,fCondense:r&64,fExtend:r&128};return t}function Wn(e,r){if(!r)r=Ra(2);var t=(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0);r._W(1,t);r._W(1,0);return r}function zn(e,r){var t={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"};var a=e._R(4);switch(a){case 0:return"";case 4294967295:;case 4294967294:return t[e._R(4)]||"";}if(a>400)throw new Error("Unsupported Clipboard: "+a.toString(16));e.l-=4;return e._R(0,r==1?"lpstr":"lpwstr")}function Hn(e){return zn(e,1)}function Vn(e){return zn(e,2)}var $n=2;var Xn=3;var Gn=11;var jn=12;var Kn=19;var Yn=64;var Zn=65;var Jn=71;var qn=4108;var Qn=4126;var ei=80;var ri=81;var ti=[ei,ri];var ai={1:{n:"CodePage",t:$n},2:{n:"Category",t:ei},3:{n:"PresentationFormat",t:ei},4:{n:"ByteCount",t:Xn},5:{n:"LineCount",t:Xn},6:{n:"ParagraphCount",t:Xn},7:{n:"SlideCount",t:Xn},8:{n:"NoteCount",t:Xn},9:{n:"HiddenCount",t:Xn},10:{n:"MultimediaClipCount",t:Xn},11:{n:"ScaleCrop",t:Gn},12:{n:"HeadingPairs",t:qn},13:{n:"TitlesOfParts",t:Qn},14:{n:"Manager",t:ei},15:{n:"Company",t:ei},16:{n:"LinksUpToDate",t:Gn},17:{n:"CharacterCount",t:Xn},19:{n:"SharedDoc",t:Gn},22:{n:"HyperlinksChanged",t:Gn},23:{n:"AppVersion",t:Xn,p:"version"},24:{n:"DigSig",t:Zn},26:{n:"ContentType",t:ei},27:{n:"ContentStatus",t:ei},28:{n:"Language",t:ei},29:{n:"Version",t:ei},255:{},2147483648:{n:"Locale",t:Kn},2147483651:{n:"Behavior",t:Kn},1919054434:{}};var ni={1:{n:"CodePage",t:$n},2:{n:"Title",t:ei},3:{n:"Subject",t:ei},4:{n:"Author",t:ei},5:{n:"Keywords",t:ei},6:{n:"Comments",t:ei},7:{n:"Template",t:ei},8:{n:"LastAuthor",t:ei},9:{n:"RevNumber",t:ei}
vendor: 10,733 bytes, line 64881
64881,10:{n:"EditTime",t:Yn},11:{n:"LastPrinted",t:Yn},12:{n:"CreatedDate",t:Yn},13:{n:"ModifiedDate",t:Yn},14:{n:"PageCount",t:Xn},15:{n:"WordCount",t:Xn},16:{n:"CharCount",t:Xn},17:{n:"Thumbnail",t:Jn},18:{n:"Application",t:ei},19:{n:"DocSecurity",t:Xn},255:{},2147483648:{n:"Locale",t:Kn},2147483651:{n:"Behavior",t:Kn},1919054434:{}};var ii={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"};var si=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function fi(e){return e.map(function(e){return[e>>16&255,e>>8&255,e&255]})}var li=fi([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);var oi=Ar(li);var ci={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"};var hi={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255};var ui=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];var di={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};var vi={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function pi(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function mi(e){var r=pi();if(!e||!e.match)return r;var t={};(e.match(ft)||[]).forEach(function(e){var a=ct(e);switch(a[0].replace(lt,"<")){case"<?xml":break;case"<Types":r.xmlns=a["xmlns"+(a[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":t[a.Extension.toLowerCase()]=a.ContentType;break;case"<Override":if(r[di[a.ContentType]]!==undefined)r[di[a.ContentType]].push(a.PartName);break;}});if(r.xmlns!==$t.CT)throw new Error("Unknown Namespace: "+r.xmlns);r.calcchain=r.calcchains.length>0?r.calcchains[0]:"";r.sst=r.strs.length>0?r.strs[0]:"";r.style=r.styles.length>0?r.styles[0]:"";r.defaults=t;delete r.calcchains;return r}function gi(e,r,t){var a=or(di);var n=[],i;if(!t){n[n.length]=at;n[n.length]=Bt("Types",null,{xmlns:$t.CT,"xmlns:xsd":$t.xsd,"xmlns:xsi":$t.xsi});n=n.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["t
64881if","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(e){return Bt("Default",null,{Extension:e[0],ContentType:e[1]})}))}var s=function(t){if(e[t]&&e[t].length>0){i=e[t][0];n[n.length]=Bt("Override",null,{PartName:(i[0]=="/"?"":"/")+i,ContentType:vi[t][r.bookType]||vi[t]["xlsx"]})}};var f=function(t){(e[t]||[]).forEach(function(e){n[n.length]=Bt("Override",null,{PartName:(e[0]=="/"?"":"/")+e,ContentType:vi[t][r.bookType]||vi[t]["xlsx"]})})};var l=function(r){(e[r]||[]).forEach(function(e){n[n.length]=Bt("Override",null,{PartName:(e[0]=="/"?"":"/")+e,ContentType:a[r][0]})})};s("workbooks");f("sheets");f("charts");l("themes");["strs","styles"].forEach(s);["coreprops","extprops","custprops"].forEach(l);l("vba");l("comments");l("threadedcomments");l("drawings");f("metadata");l("people");if(!t&&n.length>2){n[n.length]="</Types>";n[1]=n[1].replace("/>",">")}return n.join("")}var bi
vendor: 2,568 bytes, line 64881
64881={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",CONN:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function
vendor: 7,907 bytes, lines 64881-64882
64881wi(e){var r=e.lastIndexOf("/");return e.slice(0,r+1)+"_rels/"+e.slice(r+1)+".rels"}function ki(e,r){var t={"!id":{}};if(!e)return t;if(r.charAt(0)!=="/"){ 64882r="/"+r}var a={};(e.match(ft)||[]).forEach(function(e){var n=ct(e);if(n[0]==="<Relationship"){var i={};i.Type=n.Type;i.Target=pt(n.Target);i.Id=n.Id;if(n.TargetMode)i.TargetMode=n.TargetMode;var s=n.TargetMode==="External"?n.Target:tt(n.Target,r);t[s]=i;a[n.Id]=i}});t["!id"]=a;return t}function Ai(e){var r=[at,Bt("Relationships",null,{xmlns:$t.RELS})];ir(e["!id"]).forEach(function(t){r[r.length]=Bt("Relationship",null,e["!id"][t])});if(r.length>2){r[r.length]="</Relationships>";r[1]=r[1].replace("/>",">")}return r.join("")}function Ti(e,r,t,a,n,i){if(!n)n={};if(!e["!id"])e["!id"]={};if(!e["!idx"])e["!idx"]=1;if(r<0)for(r=e["!idx"];e["!id"]["rId"+r];++r){}e["!idx"]=r+1;n.Id="rId"+r;n.Type=a;n.Target=t;if(i)n.TargetMode=i;else if([bi.HLINK,bi.XPATH,bi.XMISS].indexOf(n.Type)>-1)n.TargetMode="External";if(e["!id"][n.Id])throw new Error("Cannot rewrite rId "+r);e["!id"][n.Id]=n;e[("/"+n.Target).replace("//","/")]=n;return r}var yi="application/vnd.oasis.opendocument.spreadsheet";function Ei(e,r){var t=Ht(e);var a;var n;while(a=Vt.exec(t))switch(a[3]){case"manifest":break;case"file-entry":n=ct(a[0],false);if(n.path=="/"&&n.type!==yi)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":;case"algorithm":;case"start-key-generation":;case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(r&&r.WTF)throw a;}}function Ci(e){var r=[at];r.push('<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">\n');r.push(' <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>\n');for(var t=0;t<e.length;++t)r.push(' <manifest:file-entry manifest:full-path="'+e[t][0]+'" manifest:media-type="'+e[t][1]+'"/>\n');r.push("</manifest:manifest>");return r.join("")}function _i(e,r,t){return[' <rdf:Description rdf:about="'+e+'">\n',' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(t||"odf")+"#"+r+'"/>\n'," </rdf:Description>\n"].join("")}function Si(e,r){return[' <rdf:Description rdf:about="'+e+'">\n',' <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+r+'"/>\n'," </rdf:Description>\n"].join("")}function xi(e){var r=[at];r.push('<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n');for(var t=0;t!=e.length;++t){r.push(_i(e[t][0],e[t][1]));r.push(Si("",e[t][0]))}r.push(_i("","Document","pkg"));r.push("</rdf:RDF>");return r.join("")}function Oi(r,t){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+e.version+"</meta:generator></office:meta></office:document-meta>"}var Ii=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function Ri(e){var r={};e=It(e);for(var t=0;t<Ii.length;++t){var a=Ii[t],n=Br(e,a[0]);if(n!=null&&n.length>0)r[a[1]]=pt(n[1]);if(a[2]==="date"&&r[a[1]])r[a[1]]=wr(r[a[1]])}return r}function Ni(e,r,t,a,n){if(n[e]!=null||r==null||r==="")return;n[e]=r;r=bt(r);a[a.length]=t?Bt(e,r,t):Mt(e,r)}function Fi(e,r){var t=r||{};var a=[at,Bt("cp:coreProperties",null,{"xmlns:cp":$t.CORE_PROPS,"xmlns:dc":$t.dc,"xmlns:dcterms":$t.dcterms,"xmlns:dcmitype":$t.dcmitype,"xmlns:xsi":$t.xsi})],n={};if(!e&&!t.Props)return a.join("");if(e){if(e.CreatedDate!=null)Ni("dcterms:created",typeof e.CreatedDate==="string"?e.CreatedDate:Wt(e.CreatedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},a,n);if(e.ModifiedDate!=null)Ni("dcterms:modified",typeof e.ModifiedDate==="string"?e.ModifiedDate:Wt(e.ModifiedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},a,n)}for(var i=0;i!=Ii.length;++i){var s=Ii[i];var f=t.Props&&t.Props[s[1]]!=null?t.Props[s[1]]:e?e[s[1]]:null;if(f===true)f="1";else if(f===false)f="0";else if(typeof f=="number")f=String(f);if(f!=null)Ni(s[0],f,null,a,n)}if(a.length>2){a[a.length]="</cp:coreProperties>";a[1]=a[1].replace("/>",">")}return a.join("")}var Di=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];var Pi=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function Li(e,r,t,a){var n=[];if(typeof e=="string")n=Pt(e,a);else for(var i=0;i<e.length;++i)n=n.concat(e[i].map(function(e){return{v:e}}));var s=typeof r=="string"?Pt(r,a).map(function(e){return e.v}):r;var f=0,l=0;if(s.length>0)for(var o=0;o!==n.length;o+=2){l=+n[o+1].v;switch(n[o].v){case"Worksheets":;case"å·¥ä½è¡¨":;case"ÐиÑÑÑ":;case"Ø£ÙØ±Ø§Ù Ø§ÙØ¹Ù Ù":;case"ã¯ã¼ã¯ã·ã¼ã":;case"××××× ×ת ×¢××××":;case"Arbeitsblätter":;case"ÃalıÅma Sayfaları":;case"Feuilles de calcul":;case"Fogli di lavoro":;case"Folhas de cálculo":;case"Planilhas":;case"Regneark":;case"Hojas de cálculo":;case"Werkbladen":t.Worksheets=l;t.SheetNames=s.slice(f,f+l);break;case"Named Ranges":;case"Rangos con nombre":;case"ååä»ãä¸è¦§":;case"Benannte Bereiche":;case"Navngivne omrÃ¥der":t.NamedRanges=l;t.DefinedNames=s.slice(f,f+l);break;case"Charts":;case"Diagramme":t.Chartsheets=l;t.ChartNames=s.slice(f,f+l);break;}f+=l}}function Mi(e,r,t){var a={};if(!r)r={};e=It(e);Di.forEach(function(t){var n=(Wr(e,t[0])||[])[1];switch(t[2]){case"string":if(n)r[t[1]]=pt(n);break;case"bool":r[t[1]]=n==="true";break;case"raw":var i=Br(e,t[0]);if(i&&i.length>0)a[t[1]]=i[1];break;}});if(a.HeadingPairs&&a.TitlesOfParts)Li(a.HeadingPairs,a.TitlesOfParts,r,t);return r}function Ui(e){var r=[],t=Bt;if(!e)e={};e.Application="SheetJS";r[r.length]=at;r[r.length]=Bt("Properties",null,{xmlns:$t.EXT_PROPS,"xmlns:vt":$t.vt});Di.forEach(function(a){if(e[a[1]]===undefined)return;var n;switch(a[2]){case"string":n=bt(String(e[a[1]]));break;case"bool":n=e[a[1]]?"true":"false";break;}if(n!==undefined)r[r.length]=t(a[0],n)});r[r.length]=t("HeadingPairs",t("vt:vector",t("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+t("vt:variant",t("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"}));r[r.length]=t("TitlesOfParts",t("vt:vector",e.SheetNames.map(function(e){return"<vt:lpstr>"+bt(e)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"}));if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}return r.join("")}var Bi=/<[^<>]+>[^<]*/g;function Wi(e,r){var t={},a="";var n=e.match(Bi);if(n)for(var i=0;i!=n.length;++i){var s=n[i],f=ct(s);switch(ut(f[0])){case"<?xml":break;case"<Properties":break;case"<property":a=pt(f.name);break;case"</property>":a=null;break;default:if(s.indexOf("<vt:")===0){var l=s.split(">");var o=l[0].slice(4),c=l[1];switch(o){case"lpstr":;case"bstr":;case"lpwstr":t[a]=pt(c);break;case"bool":t[a]=Ct(c);break;case"i1":;case"i2":;case"i4":;case"i8":;case"int":;case"uint":t[a]=parseInt(c,10);break;case"r4":;case"r8":;case"decimal":t[a]=parseFloat(c);break;case"filetime":;case"date":t[a]=wr(c);break;case"cy":;case"error":t[a]=pt(c);break;default:if(o.slice(-1)=="/")break;
vendor: 13,386 bytes, line 64882
64882if(r.WTF&&typeof console!=="undefined")console.warn("Unexpected",s,o,l);}}else if(s.slice(0,2)==="</"){}else if(r.WTF)throw new Error(s);}}return t}function zi(e){var r=[at,Bt("Properties",null,{xmlns:$t.CUST_PROPS,"xmlns:vt":$t.vt})];if(!e)return r.join("");var t=1;ir(e).forEach(function a(n){++t;r[r.length]=Bt("property",zt(e[n],true),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:bt(n)})});if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}return r.join("")}var Hi={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};var Vi;function $i(e,r,t){if(!Vi)Vi=fr(Hi);r=Vi[r]||r;e[r]=t}function Xi(e,r){var t=[];ir(Hi).map(function(e){for(var r=0;r<Ii.length;++r)if(Ii[r][1]==e)return Ii[r];for(r=0;r<Di.length;++r)if(Di[r][1]==e)return Di[r];throw e}).forEach(function(a){if(e[a[1]]==null)return;var n=r&&r.Props&&r.Props[a[1]]!=null?r.Props[a[1]]:e[a[1]];switch(a[2]){case"date":n=new Date(n).toISOString().replace(/\.\d*Z/,"Z");break;}if(typeof n=="number")n=String(n);else if(n===true||n===false){n=n?"1":"0"}else if(n instanceof Date)n=new Date(n).toISOString().replace(/\.\d*Z/,"");t.push(Mt(Hi[a[1]]||a[1],n))});return Bt("DocumentProperties",t.join(""),{xmlns:Gt.o})}function Gi(e,r){var t=["Worksheets","SheetNames"];var a="CustomDocumentProperties";var n=[];if(e)ir(e).forEach(function(r){if(!Object.prototype.hasOwnProperty.call(e,r))return;for(var a=0;a<Ii.length;++a)if(r==Ii[a][1])return;for(a=0;a<Di.length;++a)if(r==Di[a][1])return;for(a=0;a<t.length;++a)if(r==t[a])return;var i=e[r];var s="string";if(typeof i=="number"){s="float";i=String(i)}else if(i===true||i===false){s="boolean";i=i?"1":"0"}else i=String(i);n.push(Bt(wt(r),i,{"dt:dt":s}))});if(r)ir(r).forEach(function(t){if(!Object.prototype.hasOwnProperty.call(r,t))return;if(e&&Object.prototype.hasOwnProperty.call(e,t))return;var a=r[t];var i="string";if(typeof a=="number"){i="float";a=String(a)}else if(a===true||a===false){i="boolean";a=a?"1":"0"}else if(a instanceof Date){i="dateTime.tz";a=a.toISOString()}else a=String(a);n.push(Bt(wt(t),a,{"dt:dt":i}))});return"<"+a+' xmlns="'+Gt.o+'">'+n.join("")+"</"+a+">"}function ji(e){var r=e._R(4),t=e._R(4);return new Date((t/1e7*Math.pow(2,32)+r/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function Ki(e){var r=typeof e=="string"?new Date(Date.parse(e)):e;var t=r.getTime()/1e3+11644473600;var a=t%Math.pow(2,32),n=(t-a)/Math.pow(2,32);a*=1e7;n*=1e7;var i=a/Math.pow(2,32)|0;if(i>0){a=a%Math.pow(2,32);n+=i}var s=Ra(8);s._W(4,a);s._W(4,n);return s}function Yi(e,r,t){var a=e.l;var n=e._R(0,"lpstr-cp");if(t)while(e.l-a&3)++e.l;return n}function Zi(e,r,t){var a=e._R(0,"lpwstr");if(t)e.l+=4-(a.length+1&3)&3;return a}function Ji(e,r,t){if(r===31)return Zi(e);return Yi(e,r,t)}function qi(e,r,t){return Ji(e,r,t===false?0:4)}function Qi(e,r){if(!r)throw new Error("VtUnalignedString must have positive length");return Ji(e,r,0)}function es(e){var r=e._R(4);var t=[];for(var a=0;a!=r;++a){var n=e.l;t[a]=e._R(0,"lpwstr").replace(M,"");if(e.l-n&2)e.l+=2}return t}function rs(e){var r=e._R(4);var t=[];for(var a=0;a!=r;++a)t[a]=e._R(0,"lpstr-cp").replace(M,"");return t}function ts(e){var r=e.l;var t=fs(e,ri);if(e[e.l]==0&&e[e.l+1]==0&&e.l-r&2)e.l+=2;var a=fs(e,Xn);return[t,a]}function as(e){var r=e._R(4);var t=[];for(var a=0;a<r/2;++a)t.push(ts(e));return t}function ns(e,r){var t=e._R(4);var a={};for(var n=0;n!=t;++n){var i=e._R(4);var s=e._R(4);a[i]=e._R(s,r===1200?"utf16le":"utf8").replace(M,"").replace(U,"!");if(r===1200&&s%2)e.l+=2}if(e.l&3)e.l=e.l>>2+1<<2;return a}function is(e){var r=e._R(4);var t=e.slice(e.l,e.l+r);e.l+=r;if((r&3)>0)e.l+=4-(r&3)&3;return t}function ss(e){var r={};r.Size=e._R(4);e.l+=r.Size+3-(r.Size-1)%4;return r}function fs(e,r,t){var a=e._R(2),n,i=t||{};e.l+=2;if(r!==jn)if(a!==r&&ti.indexOf(r)===-1&&!((r&65534)==4126&&(a&65534)==4126))throw new Error("Expected type "+r+" saw "+a);switch(r===jn?a:r){case 2:n=e._R(2,"i");if(!i.raw)e.l+=2;return n;case 3:n=e._R(4,"i");return n;case 11:return e._R(4)!==0;case 19:n=e._R(4);return n;case 30:e.l+=4;val=qi(e,e[e.l-4]).replace(/(^|[^\u0000])\u0000+$/,"$1");break;case 31:e.l+=4;val=qi(e,e[e.l-4]).replace(/(^|[^\u0000])\u0000+$/,"$1");break;case 64:return ji(e);case 65:return is(e);case 71:return ss(e);case 80:return qi(e,a,!i.raw).replace(M,"");case 81:return Qi(e,a).replace(M,"");case 4108:return as(e);case 4126:;case 4127:return a==4127?es(e):rs(e);default:throw new Error("TypedPropertyValue unrecognized type "+r+" "+a);}}function ls(e,r){var t=Ra(4),a=Ra(4);t._W(4,e==80?31:e);switch(e){case 3:a._W(-4,r);break;case 5:a=Ra(8);a._W(8,r,"f");break;case 11:a._W(4,r?1:0);break;case 64:a=Ki(r);break;case 31:;case 80:a=Ra(4+2*(r.length+1)+(r.length%2?0:2));a._W(4,r.length+1);a._W(0,r,"dbcs");while(a.l!=a.length)a._W(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+r);}return P([t,a])}function os(e,r){var t=e.l;var a=e._R(4);var n=e._R(4);var i=[],s=0;var f=0;var o=-1,c={};for(s=0;s!=n;++s){var h=e._R(4);var u=e._R(4);i[s]=[h,u+t]}i.sort(function(e,r){return e[1]-r[1]});var d={};for(s=0;s!=n;++s){if(e.l!==i[s][1]){var v=true;if(s>0&&r)switch(r[i[s-1][0]].t){case 2:if(e.l+2===i[s][1]){e.l+=2;v=false}break;case 80:if(e.l<=i[s][1]){e.l=i[s][1];v=false}break;case 4108:if(e.l<=i[s][1]){e.l=i[s][1];v=false}break;}if((!r||s==0)&&e.l<=i[s][1]){v=false;e.l=i[s][1]}if(v)throw new Error("Read Error: Expected address "+i[s][1]+" at "+e.l+" :"+s)}if(r){if(i[s][0]==0&&i.length>s+1&&i[s][1]==i[s+1][1])continue;var p=r[i[s][0]];d[p.n]=fs(e,p.t,{raw:true});if(p.p==="version")d[p.n]=String(d[p.n]>>16)+"."+("0000"+String(d[p.n]&65535)).slice(-4);if(p.n=="CodePage")switch(d[p.n]){case 0:d[p.n]=1252;case 874:;case 932:;case 936:;case 949:;case 950:;case 1250:;case 1251:;case 1253:;case 1254:;case 1255:;case 1256:;case 1257:;case 1258:;case 1e4:;case 1200:;case 1201:;case 1252:;case 65e3:;case-536:;case 65001:;case-535:l(f=d[p.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+d[p.n]);}}else{if(i[s][0]===1){f=d.CodePage=fs(e,$n);l(f);if(o!==-1){var m=e.l;e.l=i[o][1];c=ns(e,f);e.l=m}}else if(i[s][0]===0){if(f===0){o=s;e.l=i[s+1][1];continue}c=ns(e,f)}else{var g=c[i[s][0]];var b;switch(e[e.l]){case 65:e.l+=4;b=is(e);break;case 30:e.l+=4;b=qi(e,e[e.l-4]).replace(/(^|[^\u0000])\u0000+$/,"$1");break;case 31:e.l+=4;b=qi(e,e[e.l-4]).replace(/(^|[^\u0000])\u0000+$/,"$1");break;case 3:e.l+=4;b=e._R(4,"i");break;case 19:e.l+=4;b=e._R(4);break;case 5:e.l+=4;b=e._R(8,"f");break;case 11:e.l+=4;b=bs(e,4);break;case 64:e.l+=4;b=wr(ji(e));break;default:throw new Error("unparsed value: "+e[e.l]);}d[g]=b}}}e.l=t+a;return d}var cs=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function hs(e){switch(typeof e){case"boolean":return 11;case"number":return(e|0)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64;break;}return-1}function us(e,r,t){var a=Ra(8),n=[],i=[];var s=8,f=0;var l=Ra(8),o=Ra(8);l._W(4,2);l._W(4,1200);o._W(4,1);i.push(l);n.push(o);s+=8+l.length;if(!r){o=Ra(8);o._W(4,0);n.unshift(o);var c=[Ra(4)];c[0]._W(4,e.length);for(f=0;f<e.length;++f){var h=e[f][0];l=Ra(4+4+2*(h.length+1)+(h.length%2?0:2));l._W(4,f+2);l._W(4,h.length+1);l._W(0,h,"dbcs");while(l.l!=l.length)l._W(1,0);c.push(l)}l=P(c);i.unshift(l);s+=8+l.length}for(f=0;f<e.length;++f){if(r&&!r[e[f][0]])continue;if(cs.indexOf(e[f][0])>-1||Pi.indexOf(e[f][0])>-1)continue;if(e[f][1]==null)continue;var u=e[f][1],d=0;if(r){d=+r[e[f][0]];var v=t[d];if(v.p=="version"&&typeof u=="string"){var p=u.split(".");u=(+p[0]<<16)+(+p[1]||0)}l=ls(v.t,u)}else{var m=hs(u);if(m==-1){m=31;u=String(u)}l=ls(m,u)}i.push(l);o=Ra(8);o._W(4,!r?2+f:d);n.push(o);s+=8+l.length}var g=8*(i.length+1);for(f=0;f<i.length;++f){n[f]._W(4,g);g+=i[f].length}a._W(4,s);a._W(4,i.length);return P([a].concat(n).concat(i))}function ds(e,r,t){var a=e.content;if(!a)return{};Oa(a,0);var n,i,s,f,l=0;a.chk("feff","Byte Order: ");a._R(2);var o=a._R(4);var c=a._R(16);if(c!==Qe.utils.consts.HEADER_CLSID&&c!==t)throw new Error("Bad PropertySet CLSID "+c);n=a._R(4);if(n!==1&&n!==2)throw new Error("Unrecognized #Sets: "+n);i=a._R(16);f=a._R(4);if(n===1&&f!==a.l)throw new Error("Length mismatch: "+f+" !== "+a.l);else if(n===2){s=a._R(16);l=a._R(4)}var h=os(a,r);var u={SystemIdentifier:o};for(var d in h)u[d]=h[d];u.FMTID=i;if(n===1)return u;if(l-a.l==2)a.l+=2;if(a.l!==l)throw new Error("Length mismatch 2: "+a.l+" !== "+l);var v;try{v=os(a,null)}catch(p){}for(d in v)u[d]=v[d];u.FMTID=[i,s];return u}function vs(e,r,t,a,n,i){var s=Ra(n?68:48);var f=[s];s._W(2,65534);s._W(2,0);s._W(4,842412599);s._W(16,Qe.utils.consts.HEADER_CLSID,"hex");s._W(4,n?2:1);s._W(16,r,"hex");s._W(4,n?68:48);var l=us(e,t,a);f.push(l);if(n){var o=us(n,null,null);s._W(16,i,"hex");s._W(4,68+l.length);f.push(o)}return P(f)}function ps(e,r){e._R(r);return null}function ms(e,r){if(!r)r=Ra(e);for(var t=0;t<e;++t)r._W(1,0);return r}function gs(e,r,t){var a=[],n=e.l+r;while(e.l<n)a.push(t(e,n-e.l));if(n!==e.l)throw new Error("Slurp error");return a}function bs(e,r){return e._R(r)===1}function ws(e,r){if(!r)r=Ra(2);r._W(2,+!!e);return r}function ks(e){return e._R(2,"u")}function As(e,r){if(!r)r=Ra(2);r._W(2,e);return r}function Ts(e,r){return gs(e,r,ks)}function ys(e){var r=e._R(1),t=e._R(1);return t===1?r:r===1}function Es(e,r,t){if(!t)t=Ra(2);t._W(1,r=="e"?+e:+!!e);t._W(1,r=="e"?1:0);return t}function Cs(e,t,a){var n=e._R(a&&a.biff>=12?2:1);var i="sbcs-cont";var s=r;if(a&&a.biff>=8)r=1200;if(!a||a.biff==8){var f=e._R(1);if(f){i="dbcs-cont"}}else if(a.biff==12){i="wstr"}if(a.biff>=2&&a.biff<=5)i="cpstr";var l=n?e._R(n,i):"";r=s;return l}function _s(e){var t=r;r=1200;var a=e._R(2),n=e._R(1);var i=n&4,s=n&8;var f=1+(n&1);var l=0,o;var c={};if(s)l=e._R(2);if(i)o=e._R(4);var h=f==2?"dbcs-cont":"sbcs-cont";var u=a===0?"":e._R(a,h);if(s)e.l+=4*l;if(i)e.l+=o;c.t=u;if(!s){c.raw="<t>"+c.t+"</t>";c.r=c.t}r=t;return c}function Ss(e){var r=e.t||"",t=1;var a=Ra(3+(t>1?2:0));a._W(2,r.length);a._W(1,(t>1?8:0)|1);if(t>1)a._W(2,t);var n=Ra(2*r.length);n._W(2*r.length,r,"utf16le");var i=[a,n];return P(i)}function xs(e,r,t){var a;if(t){if(t.biff>=2&&t.biff<=5)return e._R(r,"cpstr");if(t.biff>=12)return e._R(r,"dbcs-cont")}var n=e._R(1);if(n===0){a=e._R(r,"sbcs-cont")}else{a=e._R(r,"dbcs-cont")}return a}function Os(e,r,t){var a=e._R(t&&t.biff==2?1:2);if(a===0){e.l++;return""}return xs(e,a,t)}function Is(e,r,t){if(t.biff>5)return Os(e,r,t);var a=e._R(1);if(a===0){e.l++;return""}return e._R(a,t.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function Rs(e,r,t){if(!t)t=Ra(3+2*e.length);t._W(2,e.length);t._W(1,1);t._W(31,e,"utf16le");return t}function Ns(e){var r=e._R(1);e.l++;var t=e._R(2);e.l+=2;return[r,t]}function Fs(e){var r=e._R(4),t=e.l;var a=false;if(r>24){e.l+=r-24;if(e._R(16)==="795881f43b1d7f48af2c825dc4852763")a=true;e.l=t}var n=e._R((a?r-24:r)>>1,"utf16le").replace(M,"");if(a)e.l+=24;return n}function Ds(e){var r=e._R(2);var t="";while(r-- >0)t+="../";var a=e._R(0,"lpstr-ansi");e.l+=2;if(e._R(2)!=57005)throw new Error("Bad FileMoniker");var n=e._R(4);if(n===0)return t+a.replace(/\\/g,"/");var i=e._R(4);if(e._R(2)!=3)throw new Error("Bad FileMoniker");var s=e._R(i>>1,"utf16le").replace(M,"");return t+s}function Ps(e,r){var t=e._R(16);r-=16;switch(t){case"e0c9ea79f9bace118c8200aa004ba90b":return Fs(e,r);case"0303000000000000c000000000000046":return Ds(e,r);default:throw new Error("Unsupported Moniker "+t);}}function Ls(e){var r=e._R(4);var t=r>0?e._R(r,"utf16le").replace(M,""):"";return t}function Ms(e,r){if(!r)r=Ra(6+e.length*2);r._W(4,1+e.length);for(var t=0;t<e.length;++t)r._W(2,e.charCodeAt(t));r._W(2,0);return r}function Us(e,r){var t=e.l+r;var a=e._R(4);if(a!==2)throw new Error("Unrecognized streamVersion: "+a);var n=e._R(2);e.l+=2;var i,s,f,l,o="",c,h;if(n&16)i=Ls(e,t-e.l);if(n&128)s=Ls(e,t-e.l);if((n&257)===257)f=Ls(e,t-e.l);if((n&257)===1)l=Ps(e,t-e.l);if(n&8)o=Ls(e,t-e.l);if(n&32)c=e._R(16);if(n&64)h=ji(e);e.l=t;var u=s||f||l||"";if(u&&o)u+="#"+o;if(!u)u="#"+o;if(n&2&&u.charAt(0)=="/"&&u.charAt(1)!="/")u="file://"+u;var d={Target:u};if(c)d.guid=c;if(h)d.time=h;if(i)d.Tooltip=i;return d}function Bs(e){var r=Ra(512),t=0;var a=e.Target;if(a.slice(0,7)=="file://")a=a.slice(7);var n=a.indexOf("#");var i=n>-1?31:23;switch(a.charAt(0)){case"#":i=28;break;case".":i&=~2;break;}r._W(4,2);r._W(4,i);var s=[8,6815827,6619237,4849780,83];for(t=0;t<s.length;++t)r._W(4,s[t]);if(i==28){a=a.slice(1);Ms(a,r)}else if(i&2){s="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" ");for(t=0;t<s.length;++t)r._W(1,parseInt(s[t],16));var f=n>-1?a.slice(0,n):a;r._W(4,2*(f.length+1));for(t=0;t<f.length;++t)r._W(2,f.charCodeAt(t));r._W(2,0);if(i&8)Ms(n>-1?a.slice(n+1):"",r)}else{s="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" ");for(t=0;t<s.length;++t)r._W(1,parseInt(s[t],16));var l=0;while(a.slice(l*3,l*3+3)=="../"||a.slice(l*3,l*3+3)=="..\\")++l;r._W(2,l);r._W(4,a.length-3*l+1);for(t=0;t<a.length-3*l;++t)r._W(1,a.charCodeAt(t+3*l)&255);r._W(1,0);r._W(2,65535);r._W(2,57005);for(t=0;t<6;++t)r._W(4,0)}return r.slice(0,r.l)}
vendor: 45,856 bytes, lines 64882-64884
64882function Ws(e){var r=e._R(1),t=e._R(1),a=e._R(1),n=e._R(1);return[r,t,a,n]}function zs(e,r){var t=Ws(e,r);t[3]=0;return t}function Hs(e,r,t){var a=e._R(2);var n=e._R(2);var i={r:a,c:n,ixfe:0};if(t&&t.biff==2||r==7){var s=e._R(1);i.ixfe=s&63;e.l+=2}else i.ixfe=e._R(2);return i}function Vs(e,r,t,a){if(!a)a=Ra(6);a._W(2,e);a._W(2,r);a._W(2,t||0);return a}function $s(e){var r=e._R(2);var t=e._R(2);e.l+=8;return{type:r,flags:t}}function Xs(e,r,t){return r===0?"":Is(e,r,t)}function Gs(e,r,t){var a=t.biff>8?4:2;var n=e._R(a),i=e._R(a,"i"),s=e._R(a,"i");return[n,i,s]}function js(e){var r=e._R(2);var t=On(e);return[r,t]}function Ks(e,r,t){e.l+=4;r-=4;var a=e.l+r;var n=Cs(e,r,t);var i=e._R(2);a-=e.l;if(i!==a)throw new Error("Malformed AddinUdf: padding = "+a+" != "+i);e.l+=i;return n}function Ys(e){var r=e._R(2);var t=e._R(2);var a=e._R(2);var n=e._R(2);return{s:{c:a,r:r},e:{c:n,r:t}}}function Zs(e,r){if(!r)r=Ra(8);r._W(2,e.s.r);r._W(2,e.e.r);r._W(2,e.s.c);r._W(2,e.e.c);return r}function Js(e){var r=e._R(2);var t=e._R(2);var a=e._R(1);var n=e._R(1);return{s:{c:a,r:r},e:{c:n,r:t}}}var qs=Js;function Qs(e){e.l+=4;var r=e._R(2);var t=e._R(2);var a=e._R(2);e.l+=12;return[t,r,a]}function ef(e){var r={};e.l+=4;e.l+=16;r.fSharedNote=e._R(2);e.l+=4;return r}function rf(e){var r={};e.l+=4;e.cf=e._R(2);return r}function tf(e){e.l+=2;e.l+=e._R(2)}var af={0:tf,4:tf,5:tf,6:tf,7:rf,8:tf,9:tf,10:tf,11:tf,12:tf,13:ef,14:tf,15:tf,16:tf,17:tf,18:tf,19:tf,20:tf,21:Qs};function nf(e,r){var t=e.l+r;var a=[];while(e.l<t){var n=e._R(2);e.l-=2;try{a[n]=af[n](e,t-e.l)}catch(i){e.l=t;return a}}if(e.l!=t)e.l=t;return a}function sf(e,r){var t={BIFFVer:0,dt:0};t.BIFFVer=e._R(2);r-=2;if(r>=2){t.dt=e._R(2);e.l-=2}switch(t.BIFFVer){case 1536:;case 1280:;case 1024:;case 768:;case 512:;case 2:;case 7:break;default:if(r>6)throw new Error("Unexpected BIFF Ver "+t.BIFFVer);}e._R(r);return t}function ff(e,r,t){var a=1536,n=16;switch(t.bookType){case"biff8":break;case"biff5":a=1280;n=8;break;case"biff4":a=4;n=6;break;case"biff3":a=3;n=6;break;case"biff2":a=2;n=4;break;case"xla":break;default:throw new Error("unsupported BIFF version");}var i=Ra(n);i._W(2,a);i._W(2,r);if(n>4)i._W(2,29282);if(n>6)i._W(2,1997);if(n>8){i._W(2,49161);i._W(2,1);i._W(2,1798);i._W(2,0)}return i}function lf(e,r){if(r===0)return 1200;if(e._R(2)!==1200){}return 1200}function of(e,r,t){if(t.enc){e.l+=r;return""}var a=e.l;var n=Is(e,0,t);e._R(r+a-e.l);return n}function cf(e,r){var t=!r||r.biff==8;var a=Ra(t?112:54);a._W(r.biff==8?2:1,7);if(t)a._W(1,0);a._W(4,859007059);a._W(4,5458548|(t?0:536870912));while(a.l<a.length)a._W(1,t?0:32);return a}function hf(e,r,t){var a=t&&t.biff==8||r==2?e._R(2):(e.l+=r,0);return{fDialog:a&16,fBelow:a&64,fRight:a&128}}function uf(e,r,t){var a="";if(t.biff==4){a=Cs(e,0,t);if(a.length===0)a="Sheet1";return{name:a}}var n=e._R(4);var i=e._R(1)&3;var s=e._R(1);switch(s){case 0:s="Worksheet";break;case 1:s="Macrosheet";break;case 2:s="Chartsheet";break;case 6:s="VBAModule";break;}a=Cs(e,0,t);if(a.length===0)a="Sheet1";return{pos:n,hs:i,dt:s,name:a}}function df(e,r){var t=!r||r.biff>=8?2:1;var a=Ra(8+t*e.name.length);a._W(4,e.pos);a._W(1,e.hs||0);a._W(1,e.dt);a._W(1,e.name.length);if(r.biff>=8)a._W(1,1);a._W(t*e.name.length,e.name,r.biff<8?"sbcs":"utf16le");var n=a.slice(0,a.l);n.l=a.l;return n}function vf(e,r){var t=e.l+r;var a=e._R(4);var n=e._R(4);var i=[];for(var s=0;s!=n&&e.l<t;++s){i.push(_s(e))}i.Count=a;i.Unique=n;return i}function pf(e,r){var t=Ra(8);t._W(4,e.Count);t._W(4,e.Unique);var a=[];for(var n=0;n<e.length;++n)a[n]=Ss(e[n],r);var i=P([t].concat(a));i.parts=[t.length].concat(a.map(function(e){return e.length}));return i}function mf(e,r){var t={};t.dsst=e._R(2);e.l+=r-2;return t}function gf(e){var r={};r.r=e._R(2);r.c=e._R(2);r.cnt=e._R(2)-r.c;var t=e._R(2);e.l+=4;var a=e._R(1);e.l+=3;if(a&7)r.level=a&7;if(a&32)r.hidden=true;if(a&64)r.hpt=t/20;return r}function bf(e){var r=$s(e);if(r.type!=2211)throw new Error("Invalid Future Record "+r.type);var t=e._R(4);return t!==0}function wf(e){e._R(2);return e._R(4)}function kf(e,r,t){var a=0;if(!(t&&t.biff==2)){a=e._R(2)}var n=e._R(2);if(t&&t.biff==2){a=1-(n>>15);n&=32767}var i={Unsynced:a&1,DyZero:(a&2)>>1,ExAsc:(a&4)>>2,ExDsc:(a&8)>>3};return[i,n]}function Af(e){var r=e._R(2),t=e._R(2),a=e._R(2),n=e._R(2);var i=e._R(2),s=e._R(2),f=e._R(2);var l=e._R(2),o=e._R(2);return{Pos:[r,t],Dim:[a,n],Flags:i,CurTab:s,FirstTab:f,Selected:l,TabRatio:o}}function Tf(){var e=Ra(18);e._W(2,0);e._W(2,0);e._W(2,29280);e._W(2,17600);e._W(2,56);e._W(2,0);e._W(2,0);e._W(2,1);e._W(2,500);return e}function yf(e,r,t){if(t&&t.biff>=2&&t.biff<5)return{};var a=e._R(2);return{RTL:a&64}}function Ef(e){var r=Ra(18),t=1718;if(e&&e.RTL)t|=64;r._W(2,t);r._W(4,0);r._W(4,64);r._W(4,0);r._W(4,0);return r}function Cf(){}function _f(e,r,t){var a={dyHeight:e._R(2),fl:e._R(2)};switch(t&&t.biff||8){case 2:break;case 3:;case 4:e.l+=2;break;default:e.l+=10;break;}a.name=Cs(e,0,t);return a}function Sf(e,r){var t=e.name||"Arial";var a=r&&r.biff==5,n=a?15+t.length:16+2*t.length;var i=Ra(n);i._W(2,(e.sz||12)*20);i._W(4,0);i._W(2,400);i._W(4,0);i._W(2,0);i._W(1,t.length);if(!a)i._W(1,1);i._W((a?1:2)*t.length,t,a?"sbcs":"utf16le");return i}function xf(e,r,t){var a=Hs(e,r,t);a.isst=e._R(4);return a}function Of(e,r,t,a){var n=Ra(10);Vs(e,r,a,n);n._W(4,t);return n}function If(e,r,t){if(t.biffguess&&t.biff==2)t.biff=5;var a=e.l+r;var n=Hs(e,r,t);var i=Os(e,a-e.l,t);n.val=i;return n}function Rf(e,r,t,a,n){var i=!n||n.biff==8;var s=Ra(6+2+ +i+(1+i)*t.length);Vs(e,r,a,s);s._W(2,t.length);if(i)s._W(1,1);s._W((1+i)*t.length,t,i?"utf16le":"sbcs");return s}function Nf(e,r,t){var a=e._R(2);var n=Is(e,0,t);return[a,n]}function Ff(e,r,t,a){var n=t&&t.biff==5;if(!a)a=Ra(n?3+r.length:5+2*r.length);a._W(2,e);a._W(n?1:2,r.length);if(!n)a._W(1,1);a._W((n?1:2)*r.length,r,n?"sbcs":"utf16le");var i=a.length>a.l?a.slice(0,a.l):a;if(i.l==null)i.l=i.length;return i}var Df=Is;function Pf(e){var r=Ra(1+e.length);r._W(1,e.length);r._W(e.length,e,"sbcs");return r}function Lf(e){var r=Ra(3+e.length);r.l+=2;r._W(1,e.length);r._W(e.length,e,"sbcs");return r}function Mf(e,r,t){var a=e.l+r;var n=t.biff==8||!t.biff?4:2;var i=e._R(n),s=e._R(n);var f=e._R(2),l=e._R(2);e.l=a;return{s:{r:i,c:f},e:{r:s,c:l}}}function Uf(e,r){var t=r.biff==8||!r.biff?4:2;var a=Ra(2*t+6);a._W(t,e.s.r);a._W(t,e.e.r+1);a._W(2,e.s.c);a._W(2,e.e.c+1);a._W(2,0);return a}function Bf(e){var r=e._R(2),t=e._R(2);var a=js(e);return{r:r,c:t,ixfe:a[0],rknum:a[1]}}function Wf(e,r){var t=e.l+r-2;var a=e._R(2),n=e._R(2);var i=[];while(e.l<t)i.push(js(e));if(e.l!==t)throw new Error("MulRK read error");var s=e._R(2);if(i.length!=s-n+1)throw new Error("MulRK length mismatch");return{r:a,c:n,C:s,rkrec:i}}function zf(e,r){var t=e.l+r-2;var a=e._R(2),n=e._R(2);var i=[];while(e.l<t)i.push(e._R(2));if(e.l!==t)throw new Error("MulBlank read error");var s=e._R(2);if(i.length!=s-n+1)throw new Error("MulBlank length mismatch");return{r:a,c:n,C:s,ixfe:i}}function Hf(e,r,t,a){var n={};var i=e._R(4),s=e._R(4);var f=e._R(4),l=e._R(2);n.patternType=si[f>>26];if(!a.cellStyles)return n;n.alc=i&7;n.fWrap=i>>3&1;n.alcV=i>>4&7;n.fJustLast=i>>7&1;n.trot=i>>8&255;n.cIndent=i>>16&15;n.fShrinkToFit=i>>20&1;n.iReadOrder=i>>22&2;n.fAtrNum=i>>26&1;n.fAtrFnt=i>>27&1;n.fAtrAlc=i>>28&1;n.fAtrBdr=i>>29&1;n.fAtrPat=i>>30&1;n.fAtrProt=i>>31&1;n.dgLeft=s&15;n.dgRight=s>>4&15;n.dgTop=s>>8&15;n.dgBottom=s>>12&15;n.icvLeft=s>>16&127;n.icvRight=s>>23&127;n.grbitDiag=s>>30&3;n.icvTop=f&127;n.icvBottom=f>>7&127;n.icvDiag=f>>14&127;n.dgDiag=f>>21&15;n.icvFore=l&127;n.icvBack=l>>7&127;n.fsxButton=l>>14&1;return n}function Vf(e,r,t){var a={};a.ifnt=e._R(2);a.numFmtId=e._R(2);a.flags=e._R(2);a.fStyle=a.flags>>2&1;r-=6;a.data=Hf(e,r,a.fStyle,t);return a}function $f(e,r,t,a){var n=t&&t.biff==5;if(!a)a=Ra(n?16:20);a._W(2,0);if(e.style){a._W(2,e.numFmtId||0);a._W(2,65524)}else{a._W(2,e.numFmtId||0);a._W(2,r<<4)}var i=0;if(e.numFmtId>0&&n)i|=1024;a._W(4,i);a._W(4,0);if(!n)a._W(4,0);a._W(2,0);return a}function Xf(e){var r={};r.ifnt=e._R(1);e.l++;r.flags=e._R(1);r.numFmtId=r.flags&63;r.flags>>=6;r.fStyle=0;r.data={};return r}function Gf(e){var r=Ra(4);r.l+=2;r._W(1,e.numFmtId);r.l++;return r}function jf(e){var r=Ra(12);r.l++;r._W(1,e.numFmtId);r.l+=10;return r}var Kf=jf;function Yf(e){var r={};r.ifnt=e._R(1);r.numFmtId=e._R(1);r.flags=e._R(2);r.fStyle=r.flags>>2&1;r.data={}; 64883return r}function Zf(e){var r={};r.ifnt=e._R(1);r.numFmtId=e._R(1);r.flags=e._R(2);r.fStyle=r.flags>>2&1;r.data={};return r}function Jf(e){e.l+=4;var r=[e._R(2),e._R(2)];if(r[0]!==0)r[0]--;if(r[1]!==0)r[1]--;if(r[0]>7||r[1]>7)throw new Error("Bad Gutters: "+r.join("|"));return r}function qf(e){var r=Ra(8);r._W(4,0);r._W(2,e[0]?e[0]+1:0);r._W(2,e[1]?e[1]+1:0);return r}function Qf(e,r,t){var a=Hs(e,6,t);var n=ys(e,2);a.val=n;a.t=n===true||n===false?"b":"e";return a}function el(e,r,t,a,n,i){var s=Ra(8);Vs(e,r,a,s);Es(t,i,s);return s}function rl(e,r,t){if(t.biffguess&&t.biff==2)t.biff=5;var a=Hs(e,6,t);var n=Pn(e,8);a.val=n;return a}function tl(e,r,t,a){var n=Ra(14);Vs(e,r,a,n);Ln(t,n);return n}var al=Xs;function nl(e,r,t){var a=e.l+r;var n=e._R(2);var i=e._R(2);t.sbcch=i;if(i==1025||i==14849)return[i,n];if(i<1||i>255)throw new Error("Unexpected SupBook type: "+i);var s=xs(e,i);var f=[];while(a>e.l)f.push(Os(e));return[i,n,s,f]}function il(e,r,t){var a=e._R(2);var n;var i={fBuiltIn:a&1,fWantAdvise:a>>>1&1,fWantPict:a>>>2&1,fOle:a>>>3&1,fOleLink:a>>>4&1,cf:a>>>5&1023,fIcon:a>>>15&1};if(t.sbcch===14849)n=Ks(e,r-2,t);i.body=n||e._R(r-2);if(typeof n==="string")i.Name=n;return i}function sl(e,r,t){var a=e.l+r;var n=e._R(2);var i=e._R(1);var s=e._R(1);var f=e._R(t&&t.biff==2?1:2);var l=0;if(!t||t.biff>=5){if(t.biff!=5)e.l+=2;l=e._R(2);if(t.biff==5)e.l+=2;e.l+=4}var o=xs(e,s,t);if(n&32)o=ui[o.charCodeAt(0)];var c=a-e.l;if(t&&t.biff==2)--c;var h=a==e.l||f===0||!(c>0)?[]:Wd(e,c,t,f);return{chKey:i,Name:o,itab:l,rgce:h}}function fl(e,r,t){if(t.biff<8)return ll(e,r,t);if(!(t.biff>8)&&r==e[e.l]+(e[e.l+1]==3?1:0)+1)return ll(e,r,t);var a=[],n=e.l+r,i=e._R(t.biff>8?4:2);while(i--!==0)a.push(Gs(e,t.biff>8?12:6,t));if(e.l!=n)throw new Error("Bad ExternSheet: "+e.l+" != "+n);return a}function ll(e,r,t){if(e[e.l+1]==3)e[e.l]++;var a=Cs(e,r,t);return a.charCodeAt(0)==3?a.slice(1):a}function ol(e,r,t){if(t.biff<8){e.l+=r;return}var a=e._R(2);var n=e._R(2);var i=xs(e,a,t);var s=xs(e,n,t);return[i,s]}function cl(e,r,t){var a=Js(e,6);e.l++;var n=e._R(1);r-=8;return[zd(e,r,t),n,a]}function hl(e,r,t){var a=qs(e,6);switch(t.biff){case 2:e.l++;r-=7;break;case 3:;case 4:e.l+=2;r-=8;break;default:e.l+=6;r-=12;}return[a,Ud(e,r,t,a)]}function ul(e){var r=e._R(4)!==0;var t=e._R(4)!==0;var a=e._R(4);return[r,t,a]}function dl(e,r,t){var a=e._R(2),n=e._R(2);var i=e._R(2),s=e._R(2);var f=Is(e,0,t);return[{r:a,c:n},f,s,i]}function vl(e,r,t){if(t&&t.biff<8){var a=e._R(2),n=e._R(2);if(a==65535||a==-1)return;var i=e._R(2);var s=e._R(Math.min(i,2048),"cpstr");return[{r:a,c:n},s]}return dl(e,r,t)}function pl(e,r,t,a){var n=Ra(6+(a||e.length));n._W(2,r);n._W(2,t);n._W(2,a||e.length);n._W(e.length,e,"sbcs");return n}function ml(e,r){var t=[];var a=e._R(2);while(a--)t.push(Ys(e,r));return t}function gl(e){var r=Ra(2+e.length*8);r._W(2,e.length);for(var t=0;t<e.length;++t)Zs(e[t],r);return r}function bl(e,r,t){if(t&&t.biff<8)return kl(e,r,t);var a=Qs(e,22);var n=nf(e,r-22,a[1]);return{cmo:a,ft:n}}var wl={8:function(e,r){var t=e.l+r;e.l+=10;var a=e._R(2);e.l+=4;e.l+=2;e.l+=2;e.l+=2;e.l+=4;var n=e._R(1);e.l+=n;e.l=t;return{fmt:a}}};function kl(e,r,t){e.l+=4;var a=e._R(2);var n=e._R(2);var i=e._R(2);e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=6;r-=36;var s=[];s.push((wl[a]||Ia)(e,r,t));return{cmo:[n,a,i],ft:s}}function Al(e,r,t){var a=e.l;var n="";try{e.l+=4;var i=(t.lastobj||{cmo:[0,0]}).cmo[1];var s;if([0,5,7,11,12,14].indexOf(i)==-1)e.l+=6;else s=Ns(e,6,t);var f=e._R(2);e._R(2);ks(e,2);var l=e._R(2);e.l+=l;for(var o=1;o<e.lens.length-1;++o){if(e.l-a!=e.lens[o])throw new Error("TxO: bad continue record");var c=e[e.l];var h=xs(e,e.lens[o+1]-e.lens[o]-1);n+=h;if(n.length>=(c?f:2*f))break}if(n.length!==f&&n.length!==f*2){throw new Error("cchText: "+f+" != "+n.length)}e.l=a+r;return{t:n}}catch(u){e.l=a+r;return{t:n}}}function Tl(e,r){var t=Ys(e,8);e.l+=16;var a=Us(e,r-24);return[t,a]}function yl(e){var r=Ra(24);var t=Ka(e[0]);r._W(2,t.r);r._W(2,t.r);r._W(2,t.c);r._W(2,t.c);var a="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" ");for(var n=0;n<16;++n)r._W(1,parseInt(a[n],16));return P([r,Bs(e[1])])}function El(e,r){e._R(2);var t=Ys(e,8);var a=e._R((r-10)/2,"dbcs-cont");a=a.replace(M,"");return[t,a]}function Cl(e){var r=e[1].Tooltip;var t=Ra(10+2*(r.length+1));t._W(2,2048);var a=Ka(e[0]);t._W(2,a.r);t._W(2,a.r);t._W(2,a.c);t._W(2,a.c);for(var n=0;n<r.length;++n)t._W(2,r.charCodeAt(n));t._W(2,0);return t}function _l(e){var r=[0,0],t;t=e._R(2);r[0]=ii[t]||t;t=e._R(2);r[1]=ii[t]||t;return r}function Sl(e){if(!e)e=Ra(4);e._W(2,1);e._W(2,1);return e}function xl(e){var r=e._R(2);var t=[];while(r-- >0)t.push(zs(e,8));return t}function Ol(e){var r=e._R(2);var t=[];while(r-- >0)t.push(zs(e,8));return t}function Il(e){e.l+=2;var r={cxfs:0,crc:0};r.cxfs=e._R(2);r.crc=e._R(4);return r}function Rl(e,r,t){if(!t.cellStyles)return Ia(e,r);var a=t&&t.biff>=12?4:2;var n=e._R(a);var i=e._R(a);var s=e._R(a);var f=e._R(a);var l=e._R(2);if(a==2)e.l+=2;var o={s:n,e:i,w:s,ixfe:f,flags:l};if(t.biff>=5||!t.biff)o.level=l>>8&7;return o}function Nl(e,r){var t=Ra(12);t._W(2,r);t._W(2,r);t._W(2,e.width*256);t._W(2,0);var a=0;if(e.hidden)a|=1;t._W(1,a);a=e.level||0;t._W(1,a);t._W(2,0);return t}function Fl(e,r){var t={};if(r<32)return t;e.l+=16;t.header=Pn(e,8);t.footer=Pn(e,8);e.l+=2;return t}function Dl(e,r,t){var a={area:false};if(t.biff!=5){e.l+=r;return a}var n=e._R(1);e.l+=3;if(n&16)a.area=true;return a}function Pl(e){var r=Ra(2*e);for(var t=0;t<e;++t)r._W(2,t+1);return r}var Ll=Hs;var Ml=Ts;var Ul=Os;function Bl(e){var r=e._R(2);var t=e._R(2);var a=e._R(4);var n={fmt:r,env:t,len:a,data:e.slice(e.l,e.l+a)};e.l+=a;return n}function Wl(e,r,t,a,n){if(!e)e=Ra(7);e._W(2,r);e._W(2,t);e._W(1,a||0);e._W(1,n||0);e._W(1,0);return e}function zl(e,r,t){if(t.biffguess&&t.biff==5)t.biff=2;var a=Hs(e,7,t);var n=Is(e,r-7,t);a.t="str";a.val=n;return a}function Hl(e,r,t){var a=Hs(e,7,t);var n=Pn(e,8);a.t="n";a.val=n;return a}function Vl(e,r,t,a,n){var i=Ra(15);Wl(i,e,r,a||0,n||0);i._W(8,t,"f");return i}function $l(e,r,t){var a=Hs(e,7,t);var n=e._R(2);a.t="n";a.val=n;return a}function Xl(e,r,t,a,n){var i=Ra(9);Wl(i,e,r,a||0,n||0);i._W(2,t);return i}function Gl(e){var r=e._R(1);if(r===0){e.l++;return""}return e._R(r,"sbcs-cont")}function jl(e,r,t){var a=e.l+7;var n=Hs(e,6,t);e.l=a;var i=ys(e,2);n.val=i;n.t=i===true||i===false?"b":"e";return n}function Kl(e,r){e.l+=6;e.l+=2;e.l+=1;e.l+=3;e.l+=1;e.l+=r-13}function Yl(e,r,t){var a=e.l+r;var n=Hs(e,6,t);var i=e._R(2);var s=xs(e,i,t);e.l=a;n.t="str";n.val=s;return n}function Zl(e){var r=e._R(4);var t=e._R(1),a=e._R(t,"sbcs");if(a.length===0)a="Sheet1";return{flags:r,name:a}}var Jl=[2,3,48,49,131,139,140,245];var ql=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969};var n=fr({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function i(r,t){var n=[];var i=x(1);switch(t.type){case"base64":i=I(E(r));break;case"binary":i=I(r);break;case"buffer":;case"array":i=r;break;}Oa(i,0);var s=i._R(1);var f=!!(s&136);var l=false,o=false;switch(s){case 2:break;case 3:break;case 48:l=true;f=true;break;case 49:l=true;f=true;break;case 131:break;case 139:break;case 140:o=true;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+s.toString(16));}var c=0,h=521;if(s==2)c=i._R(2);i.l+=3;if(s!=2)c=i._R(4);if(c>1048576)c=1e6;if(s!=2)h=i._R(2);var u=i._R(2);var d=t.codepage||1252;if(s!=2){i.l+=16;i._R(1);if(i[i.l]!==0)d=e[i[i.l]];i.l+=1;i.l+=2}if(o)i.l+=36;var v=[],p={};var m=Math.min(i.length,s==2?521:h-10-(l?264:0));var g=o?32:11;while(i.l<m&&i[i.l]!=13){p={};p.name=(typeof a!=="undefined"?a.utils.decode(d,i.slice(i.l,i.l+g)):N(i.slice(i.l,i.l+g))).replace(/[\u0000\r\n][\S\s]*$/g,"");i.l+=g;p.type=String.fromCharCode(i._R(1));if(s!=2&&!o)p.offset=i._R(4);p.len=i._R(1);if(s==2)p.offset=i._R(2);p.dec=i._R(1);if(p.name.length)v.push(p);if(s!=2)i.l+=o?13:14;switch(p.type){case"B":if((!l||p.len!=8)&&t.WTF)console.log("Skipping "+p.name+":"+p.type);break;case"G":;case"P":if(t.WTF)console.log("Skipping "+p.name+":"+p.type);break;case"+":;case"0":;case"@":;case"C":;case"D":;case"F":;case"I":;case"L":;case"M":;case"N":;case"O":;case"T":;case"Y":break;default:throw new Error("Unknown Field Type: "+p.type);}}if(i[i.l]!==13)i.l=h-1;if(i._R(1)!==13)throw new Error("DBF Terminator not found "+i.l+" "+i[i.l]);i.l=h;var b=0,w=0;n[0]=[];for(w=0;w!=v.length;++w)n[0][w]=v[w].name;while(c-- >0){if(i[i.l]===42){i.l+=u;continue}++i.l;n[++b]=[];w=0;for(w=0;w!=v.length;++w){var k=i.slice(i.l,i.l+v[w].len);i.l+=v[w].len;Oa(k,0);var A=typeof a!=="undefined"?a.utils.decode(d,k):N(k);switch(v[w].type){case"C":if(A.trim().length)n[b][w]=A.replace(/([^\s])\s+$/,"$1");break;case"D":if(A.length===8){n[b][w]=new Date(Date.UTC(+A.slice(0,4),+A.slice(4,6)-1,+A.slice(6,8),0,0,0,0));if(!(t&&t.UTC)){n[b][w]=Fr(n[b][w])}}else n[b][w]=A;break;case"F":n[b][w]=parseFloat(A.trim());break;case"+":;case"I":n[b][w]=o?k._R(-4,"i")^2147483648:k._R(4,"i");break;case"L":switch(A.trim().toUpperCase()){case"Y":;case"T":n[b][w]=true;break;case"N":;case"F":n[b][w]=false;break;case"":;case"\0":;case"?":break;default:throw new Error("DBF Unrecognized L:|"+A+"|");}break;case"M":if(!f)throw new Error("DBF Unexpected MEMO for type "+s.toString(16));n[b][w]="##MEMO##"+(o?parseInt(A.trim(),10):k._R(4));break;case"N":A=A.replace(/\u0000/g,"").trim();if(A&&A!=".")n[b][w]=+A||0;break;case"@":n[b][w]=new Date(k._R(-8,"f")-621356832e5);break;case"T":{var T=k._R(4),y=k._R(4);if(T==0&&y==0)break;n[b][w]=new Date((T-2440588)*864e5+y);if(!(t&&t.UTC))n[b][w]=Fr(n[b][w])}break;case"Y":n[b][w]=k._R(4,"i")/1e4+k._R(4,"i")/1e4*Math.pow(2,32);break;case"O":n[b][w]=-k._R(-8,"f");break;case"B":if(l&&v[w].len==8){n[b][w]=k._R(8,"f");break};case"G":;case"P":k.l+=v[w].len;break;case"0":if(v[w].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+v[w].type);}}}if(s!=2)if(i.l<i.length&&i[i.l++]!=26)throw new Error("DBF EOF Marker missing "+(i.l-1)+" of "+i.length+" "+i[i.l-1].toString(16));if(t&&t.sheetRows)n=n.slice(0,t.sheetRows);t.DBF=v;return n}function s(e,r){var t=r||{};if(!t.dateNF)t.dateNF="yyyymmdd";var a=fn(i(e,t),t);a["!cols"]=t.DBF.map(function(e){return{wch:e.len,DBF:e}});delete t.DBF;return a}function f(e,r){try{var t=an(s(e,r),r);t.bookType="dbf";return t}catch(a){if(r&&r.WTF)throw a}return{SheetNames:[],Sheets:{}}}var o={B:8,C:250,L:1,D:8,"?":0,"":0};function c(i,s){if(!i["!ref"])throw new Error("Cannot export empty sheet to DBF");var f=s||{};var c=r;if(+f.codepage>=0)l(+f.codepage);if(f.type=="string")throw new Error("Cannot write DBF to JS string");var h=Fa();var u=Dk(i,{header:1,raw:true,cellDates:true});var d=u[0],v=u.slice(1),p=i["!cols"]||[];var m=0,g=0,b=0,w=1;for(m=0;m<d.length;++m){if(((p[m]||{}).DBF||{}).name){d[m]=p[m].DBF.name;++b;continue}if(d[m]==null)continue;++b;if(typeof d[m]==="number")d[m]=d[m].toString(10);if(typeof d[m]!=="string")throw new Error("DBF Invalid column name "+d[m]+" |"+typeof d[m]+"|");if(d.indexOf(d[m])!==m)for(g=0;g<1024;++g)if(d.indexOf(d[m]+"_"+g)==-1){d[m]+="_"+g;break}}var k=en(i["!ref"]);var A=[];var T=[];var y=[];for(m=0;m<=k.e.c-k.s.c;++m){var E="",C="",_=0;var S=[];for(g=0;g<v.length;++g){if(v[g][m]!=null)S.push(v[g][m])}if(S.length==0||d[m]==null){A[m]="?";continue}for(g=0;g<S.length;++g){switch(typeof S[g]){case"number":C="B";break;case"string":C="C";break;case"boolean":C="L";break;case"object":C=S[g]instanceof Date?"D":"C";break;default:C="C";}_=Math.max(_,(typeof a!=="undefined"&&typeof S[g]=="string"?a.utils.encode(t,S[g]):String(S[g])).length);E=E&&E!=C?"C":C}if(_>250)_=250;C=((p[m]||{}).DBF||{}).type;if(C=="C"){if(p[m].DBF.len>_)_=p[m].DBF.len}if(E=="B"&&C=="N"){E="N";y[m]=p[m].DBF.dec;_=p[m].DBF.len}T[m]=E=="C"||C=="N"?_:o[E]||0;w+=T[m];A[m]=E}var x=h.next(32);x._W(4,318902576);x._W(4,v.length);x._W(2,296+32*b);x._W(2,w);for(m=0;m<4;++m)x._W(4,0);var O=+n[r]||3;x._W(4,0|O<<8);if(e[O]!=+f.codepage){if(f.codepage)console.error("DBF Unsupported codepage "+r+", using 1252");r=1252}for(m=0,g=0;m<d.length;++m){if(d[m]==null)continue;var I=h.next(32);var R=(d[m].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);I._W(1,R,"sbcs");I._W(1,A[m]=="?"?"C":A[m],"sbcs");I._W(4,g);I._W(1,T[m]||o[A[m]]||0);I._W(1,y[m]||0);I._W(1,2);I._W(4,0);I._W(1,0);I._W(4,0);I._W(4,0);g+=T[m]||o[A[m]]||0}var N=h.next(264);N._W(4,13);for(m=0;m<65;++m)N._W(4,0);for(m=0;m<v.length;++m){var F=h.next(w);F._W(1,0);for(g=0;g<d.length;++g){if(d[g]==null)continue;switch(A[g]){case"L":F._W(1,v[m][g]==null?63:v[m][g]?84:70);break;case"B":F._W(8,v[m][g]||0,"f");break;case"N":var D="0";if(typeof v[m][g]=="number")D=v[m][g].toFixed(y[g]||0);if(D.length>T[g])D=D.slice(0,T[g]);for(b=0;b<T[g]-D.length;++b)F._W(1,32);F._W(1,D,"sbcs");break;case"D":if(!v[m][g])F._W(8,"00000000","sbcs");else{F._W(4,("0000"+v[m][g].getFullYear()).slice(-4),"sbcs");F._W(2,("00"+(v[m][g].getMonth()+1)).slice(-2),"sbcs");F._W(2,("00"+v[m][g].getDate()).slice(-2),"sbcs")}break;case"C":var P=F.l;var L=String(v[m][g]!=null?v[m][g]:"").slice(0,T[g]);F._W(1,L,"cpstr");P+=T[g]-F.l;for(b=0;b<P;++b)F._W(1,32);break;}}}r=c;h.next(1)._W(1,26);return h.end()}return{to_workbook:f,to_sheet:s,from_sheet:c}}();var Ql=function(){var e={AA:"Ã",BA:"Ã",CA:"Ã",DA:195,HA:"Ã",JA:197,AE:"Ã",BE:"Ã",CE:"Ã",HE:"Ã",AI:"Ã",BI:"Ã",CI:"Ã",HI:"Ã",AO:"Ã",BO:"Ã",CO:"Ã",DO:213,HO:"Ã",AU:"Ã",BU:"Ã",CU:"Ã",HU:"Ã",Aa:"à ",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"Ã",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ã",Kc:"ç",q:"æ",z:"Å",a:"Ã",j:"Å",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223};var r=new RegExp("�N("+ir(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1").replace("{","\\{")+"|\\|)","gm");try{r=new RegExp("�N("+ir(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm")}catch(t){}var n=function(r,t){var a=e[t];return typeof a=="number"?m(a):a};var i=function(e,r,t){var a=r.charCodeAt(0)-32<<4|t.charCodeAt(0)-48;return a==59?e:m(a)};e["|"]=254;var s=function(e){return e.replace(/\n/g,"� :").replace(/\r/g,"� =")};function f(e,r){switch(r.type){case"base64":return o(E(e),r);case"binary":return o(e,r);case"buffer":return o(C&&Buffer.isBuffer(e)?e.toString("binary"):N(e),r);case"array":return o(kr(e),r);}throw new Error("Unrecognized type "+r.type)}function o(e,t){var s=e.split(/[\n\r]+/),f=-1,o=-1,c=0,h=0,u=[];var d=[];var v=null;var p={},m=[],g=[],b=[];var w=0,k;var A={Workbook:{WBProps:{},Names:[]}};if(+t.codepage>=0)l(+t.codepage);for(;c!==s.length;++c){w=0;var T=s[c].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,i).replace(r,n);var y=T.replace(/;;/g,"\0").split(";").map(function(e){return e.replace(/\u0000/g,";")});var E=y[0],C;if(T.length>0)switch(E){case"ID":break;case"E":break;case"B":break;case"O":for(h=1;h<y.length;++h)switch(y[h].charAt(0)){case"V":{var _=parseInt(y[h].slice(1),10);if(_>=1&&_<=4)A.Workbook.WBProps.date1904=true}break;}break;case"W":break;case"P":switch(y[1].charAt(0)){case"P":d.push(T.slice(3).replace(/;;/g,";"));break;}break;case"NN":{var S={Sheet:0};for(h=1;h<y.length;++h)switch(y[h].charAt(0)){case"N":S.Name=y[h].slice(1);break;case"E":S.Ref=(t&&t.sheet||"Sheet1")+"!"+ru(y[h].slice(1));break;}A.Workbook.Names.push(S)}break;case"C":var x=false,O=false,I=false,R=false,N=-1,F=-1,D="",P="z";var L="";for(h=1;h<y.length;++h)switch(y[h].charAt(0)){case"A":L=y[h].slice(1);break;case"X":o=parseInt(y[h].slice(1),10)-1;O=true;break;case"Y":f=parseInt(y[h].slice(1),10)-1;if(!O)o=0;for(k=u.length;k<=f;++k)u[k]=[];break;case"K":C=y[h].slice(1);if(C.charAt(0)==='"'){C=C.slice(1,C.length-1);P="s"}else if(C==="TRUE"||C==="FALSE"){C=C==="TRUE";P="b"}else if(C.charAt(0)=="#"&&hi[C]!=null){P="e";C=hi[C]}else if(!isNaN(yr(C))){C=yr(C);P="n";if(v!==null&&Le(v)&&t.cellDates){C=vr(A.Workbook.WBProps.date1904?C+1462:C);P=typeof C=="number"?"n":"d"}}if(typeof a!=="undefined"&&typeof C=="string"&&(t||{}).type!="string"&&(t||{}).codepage)C=a.utils.decode(t.codepage,C);x=true;break;case"E":R=true;D=ru(y[h].slice(1),{r:f,c:o});break;case"S":I=true;break;case"G":break;case"R":N=parseInt(y[h].slice(1),10)-1;break;case"C":F=parseInt(y[h].slice(1),10)-1;break;default:if(t&&t.WTF)throw new Error("SYLK bad record "+T);}if(x){if(!u[f][o])u[f][o]={t:P,v:C};else{u[f][o].t=P;u[f][o].v=C}if(v)u[f][o].z=v;if(t.cellText!==false&&v)u[f][o].w=ze(u[f][o].z,u[f][o].v,{date1904:A.Workbook.WBProps.date1904});v=null}if(I){if(R)throw new Error("SYLK shared formula cannot have own formula");var M=N>-1&&u[N][F];if(!M||!M[1])throw new Error("SYLK shared formula cannot find base");D=iu(M[1],{r:f-N,c:o-F})}if(D){if(!u[f][o])u[f][o]={t:"n",f:D};else u[f][o].f=D}if(L){if(!u[f][o])u[f][o]={t:"z"};u[f][o].c=[{a:"SheetJSYLK",t:L}]}break;case"F":var U=0;for(h=1;h<y.length;++h)switch(y[h].charAt(0)){case"X":o=parseInt(y[h].slice(1),10)-1;++U;break;case"Y":f=parseInt(y[h].slice(1),10)-1;for(k=u.length;k<=f;++k)u[k]=[];break;case"M":w=parseInt(y[h].slice(1),10)/20;break;case"F":break;case"G":break;case"P":v=d[parseInt(y[h].slice(1),10)];break;case"S":break;case"D":break;case"N":break;case"W":b=y[h].slice(1).split(" ");for(k=parseInt(b[0],10);k<=parseInt(b[1],10);++k){w=parseInt(b[2],10);g[k-1]=w===0?{hidden:true}:{wch:w}}break;case"C":o=parseInt(y[h].slice(1),10)-1;if(!g[o])g[o]={};break;case"R":f=parseInt(y[h].slice(1),10)-1;if(!m[f])m[f]={};if(w>0){m[f].hpt=w;m[f].hpx=dc(w)}else if(w===0)m[f].hidden=true;break;default:if(t&&t.WTF)throw new Error("SYLK bad record "+T);}if(U<1)v=null;break;default:if(t&&t.WTF)throw new Error("SYLK bad record "+T);}}if(m.length>0)p["!rows"]=m;if(g.length>0)p["!cols"]=g;g.forEach(function(e){oc(e)});if(t&&t.sheetRows)u=u.slice(0,t.sheetRows);return[u,p,A]}function c(e,r){var t=f(e,r);var a=t[0],n=t[1],i=t[2];var s=Ar(r);s.date1904=(((i||{}).Workbook||{}).WBProps||{}).date1904;var l=fn(a,s);ir(n).forEach(function(e){l[e]=n[e]});var o=an(l,r);ir(i).forEach(function(e){o[e]=i[e]});o.bookType="sylk";return o}function h(e,r,t,a,n,i){var s="C;Y"+(t+1)+";X"+(a+1)+";K";switch(e.t){case"n":s+=isFinite(e.v)?e.v||0:ci[isNaN(e.v)?36:7];if(e.f&&!e.F)s+=";E"+nu(e.f,{r:t,c:a});break;case"b":s+=e.v?"TRUE":"FALSE";break;case"e":s+=e.w||ci[e.v]||e.v;break;case"d":s+=dr(wr(e.v,i),i);break;case"s":s+='"'+(e.v==null?"":String(e.v)).replace(/"/g,"").replace(/;/g,";;")+'"';break;}return s}function u(e,r,t){var a="C;Y"+(r+1)+";X"+(t+1)+";A";a+=s(e.map(function(e){return e.t}).join(""));return a}function d(e,r){r.forEach(function(r,t){var a="F;W"+(t+1)+" "+(t+1)+" ";if(r.hidden)a+="0";else{if(typeof r.width=="number"&&!r.wpx)r.wpx=nc(r.width);if(typeof r.wpx=="number"&&!r.wch)r.wch=ic(r.wpx);if(typeof r.wch=="number")a+=Math.round(r.wch)}if(a.charAt(a.length-1)!=" ")e.push(a)})}function v(e,r){r.forEach(function(r,t){var a="F;";if(r.hidden)a+="M0;";else if(r.hpt)a+="M"+20*r.hpt+";";else if(r.hpx)a+="M"+20*uc(r.hpx)+";";if(a.length>2)e.push(a+"R"+(t+1))})}function p(e,r,t){if(!r)r={};r._formats=["General"];var a=["ID;PSheetJS;N;E"],n=[];var i=en(e["!ref"]||"A1"),s;var f=e["!data"]!=null;var l="\r\n";var o=(((t||{}).Workbook||{}).WBProps||{}).date1904;var c="General";a.push("P;PGeneral");var p=i.s.r,m=i.s.c,g=[];if(e["!ref"])for(p=i.s.r;p<=i.e.r;++p){if(f&&!e["!data"][p])continue;g=[];for(m=i.s.c;m<=i.e.c;++m){s=f?e["!data"][p][m]:e[$a(m)+Wa(p)];if(!s||!s.c)continue;g.push(u(s.c,p,m))}if(g.length)n.push(g.join(l))}if(e["!ref"])for(p=i.s.r;p<=i.e.r;++p){if(f&&!e["!data"][p])continue;g=[];for(m=i.s.c;m<=i.e.c;++m){s=f?e["!data"][p][m]:e[$a(m)+Wa(p)];if(!s||s.v==null&&(!s.f||s.F))continue;if((s.z||(s.t=="d"?q[14]:"General"))!=c){var b=r._formats.indexOf(s.z);if(b==-1){r._formats.push(s.z);b=r._formats.length-1;a.push("P;P"+s.z.replace(/;/g,";;"))}g.push("F;P"+b+";Y"+(p+1)+";X"+(m+1))}g.push(h(s,e,p,m,r,o))}n.push(g.join(l))}a.push("F;P0;DG0G8;M255");if(e["!cols"])d(a,e["!cols"]);if(e["!rows"])v(a,e["!rows"]);if(e["!ref"])a.push("B;Y"+(i.e.r-i.s.r+1)+";X"+(i.e.c-i.s.c+1)+";D"+[i.s.c,i.s.r,i.e.c,i.e.r].join(" "));a.push("O;L;D;B"+(o?";V4":"")+";K47;G100 0.001");delete r._formats;return a.join(l)+l+n.join(l)+l+"E"+l}return{to_workbook:c,from_sheet:p}}();var eo=function(){function e(e,t){switch(t.type){case"base64":return r(E(e),t);case"binary":return r(e,t);case"buffer":return r(C&&Buffer.isBuffer(e)?e.toString("binary"):N(e),t);case"array":return r(kr(e),t);}throw new Error("Unrecognized type "+t.type)}function r(e,r){var t=e.split("\n"),a=-1,n=-1,i=0,s=[];for(;i!==t.length;++i){if(t[i].trim()==="BOT"){s[++a]=[];n=0;continue}if(a<0)continue;var f=t[i].trim().split(",");var l=f[0],o=f[1];++i;var c=t[i]||"";while((c.match(/["]/g)||[]).length&1&&i<t.length-1)c+="\n"+t[++i];c=c.trim();switch(+l){case-1:if(c==="BOT"){s[++a]=[];n=0;continue}else if(c!=="EOD")throw new Error("Unrecognized DIF special command "+c);break;case 0:if(c==="TRUE")s[a][n]=true;else if(c==="FALSE")s[a][n]=false;else if(!isNaN(yr(o)))s[a][n]=yr(o);else if(!isNaN(Rr(o).getDate())){s[a][n]=wr(o);if(!(r&&r.UTC)){s[a][n]=Fr(s[a][n])}}else s[a][n]=o;++n;break;case 1:c=c.slice(1,c.length-1);c=c.replace(/""/g,'"');if(w&&c&&c.match(/^=".*"$/))c=c.slice(2,-1);s[a][n++]=c!==""?c:null;break;}if(c==="EOD")break}if(r&&r.sheetRows)s=s.slice(0,r.sheetRows);return s}function t(r,t){return fn(e(r,t),t)}function a(e,r){var a=an(t(e,r),r);a.bookType="dif";return a}function n(e,r){return"0,"+String(e)+"\r\n"+r}function i(e){return'1,0\r\n"'+e.replace(/"/g,'""')+'"'}function s(e){var r=w;if(!e["!ref"])throw new Error("Cannot export empty sheet to DIF");var t=en(e["!ref"]);var a=e["!data"]!=null;var s=['TABLE\r\n0,1\r\n"sheetjs"\r\n',"VECTORS\r\n0,"+(t.e.r-t.s.r+1)+'\r\n""\r\n',"TUPLES\r\n0,"+(t.e.c-t.s.c+1)+'\r\n""\r\n','DATA\r\n0,0\r\n""\r\n'];for(var f=t.s.r;f<=t.e.r;++f){var l=a?e["!data"][f]:[];var o="-1,0\r\nBOT\r\n";for(var c=t.s.c;c<=t.e.c;++c){var h=a?l&&l[c]:e[Ya({r:f,c:c})];if(h==null){o+='1,0\r\n""\r\n';continue}switch(h.t){case"n":if(r){if(h.w!=null)o+="0,"+h.w+"\r\nV";else if(h.v!=null)o+=n(h.v,"V");else if(h.f!=null&&!h.F)o+=i("="+h.f);else o+='1,0\r\n""'}else{if(h.v==null)o+='1,0\r\n""';else o+=n(h.v,"V")}break;case"b":o+=h.v?n(1,"TRUE"):n(0,"FALSE");break;case"s":o+=i(!r||isNaN(+h.v)?h.v:'="'+h.v+'"');break;case"d":if(!h.w)h.w=ze(h.z||q[14],dr(wr(h.v)));if(r)o+=n(h.w,"V");else o+=i(h.w);break;default:o+='1,0\r\n""';}o+="\r\n"}s.push(o)}return s.join("")+"-1,0\r\nEOD"}return{to_workbook:a,to_sheet:t,from_sheet:s}}();var ro=function(){function e(e){return e.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,"\n")}function r(e){return e.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function t(r,t){var a=r.split("\n"),n=-1,i=-1,s=0,f=[];for(;s!==a.length;++s){var l=a[s].trim().split(":");if(l[0]!=="cell")continue;var o=Ka(l[1]);if(f.length<=o.r)for(n=f.length;n<=o.r;++n)if(!f[n])f[n]=[];n=o.r;i=o.c;switch(l[2]){case"t":f[n][i]=e(l[3]);break;case"v":f[n][i]=+l[3];break;case"vtf":var c=l[l.length-1];case"vtc":switch(l[3]){case"nl":f[n][i]=+l[4]?true:false;break;default:f[n][i]=l[l.length-1].charAt(0)=="#"?{t:"e",v:hi[l[l.length-1]]}:+l[4];break;}if(l[2]=="vtf")f[n][i]=[f[n][i],c];}}if(t&&t.sheetRows)f=f.slice(0,t.sheetRows);return f}function a(e,r){return fn(t(e,r),r)}function n(e,r){return an(a(e,r),r)}var i=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join("\n");var s=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join("\n")+"\n";var f=["# SocialCalc Spreadsheet Control Save","part:sheet"].join("\n");var l="--SocialCalcSpreadsheetControlSave--";function o(e){if(!e||!e["!ref"])return"";var t=[],a=[],n,i="";var s=Za(e["!ref"]);var f=e["!data"]!=null;for(var l=s.s.r;l<=s.e.r;++l){for(var o=s.s.c;o<=s.e.c;++o){i=Ya({r:l,c:o});n=f?(e["!data"][l]||[])[o]:e[i];if(!n||n.v==null||n.t==="z")continue;a=["cell",i,"t"];switch(n.t){case"s":a.push(r(n.v));break;case"b":a[2]="vt"+(n.f?"f":"c");a[3]="nl";a[4]=n.v?"1":"0";a[5]=r(n.f||(n.v?"TRUE":"FALSE"));break;case"d":var c=dr(wr(n.v));a[2]="vtc";a[3]="nd";a[4]=""+c;a[5]=n.w||ze(n.z||q[14],c);break;case"n":if(isFinite(n.v)){if(!n.f){a[2]="v";a[3]=n.v}else{a[2]="vtf";a[3]="n";a[4]=n.v;a[5]=r(n.f)}}else{a[2]="vt"+(n.f?"f":"c");a[3]="e"+ci[isNaN(n.v)?36:7];a[4]="0";a[5]=n.f||a[3].slice(1);a[6]="e";a[7]=a[3].slice(1)}break;case"e":continue;}t.push(a.join(":"))}}t.push("sheet:c:"+(s.e.c-s.s.c+1)+":r:"+(s.e.r-s.s.r+1)+":tvf:1");t.push("valueformat:1:text-wiki");return t.join("\n")}function c(e){return[i,s,f,s,o(e),l].join("\n")}return{to_workbook:n,to_sheet:a,from_sheet:c}}();var to=function(){function e(e,r,t,a,n){if(n.raw)r[t][a]=e;else if(e===""){}else if(e==="TRUE")r[t][a]=true;else if(e==="FALSE")r[t][a]=false;else if(!isNaN(yr(e)))r[t][a]=yr(e);else if(!isNaN(Rr(e).getDate()))r[t][a]=wr(e);else if(e.charCodeAt(0)==35&&hi[e]!=null)r[t][a]={t:"e",v:hi[e],w:e};else r[t][a]=e}function r(r,t){var a=t||{};var n=[];if(!r||r.length===0)return n;var i=r.split(/[\r\n]/);var s=i.length-1;while(s>=0&&i[s].length===0)--s;var f=10,l=0;var o=0;for(;o<=s;++o){l=i[o].indexOf(" ");if(l==-1)l=i[o].length;else l++;f=Math.max(f,l)}for(o=0;o<=s;++o){n[o]=[];var c=0;e(i[o].slice(0,f).trim(),n,o,c,a);for(c=1;c<=(i[o].length-f)/10+1;++c)e(i[o].slice(f+(c-1)*10,f+c*10).trim(),n,o,c,a)}if(a.sheetRows)n=n.slice(0,a.sheetRows);return n}var t={44:",",9:"\t",59:";",124:"|"};var n={44:3,9:2,59:1,124:0};function i(e){var r={},a=false,i=0,s=0;for(;i<e.length;++i){if((s=e.charCodeAt(i))==34)a=!a;else if(!a&&s in t)r[s]=(r[s]||0)+1}s=[];for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){s.push([r[i],i])}if(!s.length){r=n;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){s.push([r[i],i])}}s.sort(function(e,r){return e[0]-r[0]||n[e[1]]-n[r[1]]});return t[s.pop()[1]]||44}function s(e,r){var t=r||{};var a="";if(b!=null&&t.dense==null)t.dense=b;var n={};if(t.dense)n["!data"]=[];var s={s:{c:0,r:0},e:{c:0,r:0}};if(e.slice(0,4)=="sep="){if(e.charCodeAt(5)==13&&e.charCodeAt(6)==10){a=e.charAt(4);e=e.slice(7)}else if(e.charCodeAt(5)==13||e.charCodeAt(5)==10){a=e.charAt(4);e=e.slice(6)}else a=i(e.slice(0,1024))}else if(t&&t.FS)a=t.FS;else a=i(e.slice(0,1024));var f=0,l=0,o=0;var c=0,h=0,u=a.charCodeAt(0),d=false,v=0,p=e.charCodeAt(0);var m=t.dateNF!=null?Ke(t.dateNF):null;function g(){var r=e.slice(c,h);if(r.slice(-1)=="\r")r=r.slice(0,-1);var a={};if(r.charAt(0)=='"'&&r.charAt(r.length-1)=='"')r=r.slice(1,-1).replace(/""/g,'"');if(t.cellText!==false)a.w=r;if(r.length===0)a.t="z";else if(t.raw){a.t="s";a.v=r}else if(r.trim().length===0){a.t="s";a.v=r}else if(r.charCodeAt(0)==61){if(r.charCodeAt(1)==34&&r.charCodeAt(r.length-1)==34){a.t="s";a.v=r.slice(2,-1).replace(/""/g,'"')}else if(fu(r)){a.t="s";a.f=r.slice(1);a.v=r}else{a.t="s";a.v=r}}else if(r=="TRUE"){a.t="b";a.v=true}else if(r=="FALSE"){a.t="b";a.v=false}else if(!isNaN(o=yr(r))){a.t="n";a.v=o}else if(!isNaN((o=Rr(r)).getDate())||m&&r.match(m)){a.z=t.dateNF||q[14];if(m&&r.match(m)){var i=Ye(r,t.dateNF,r.match(m)||[]);o=wr(i);if(t&&t.UTC===false)o=Fr(o)}else if(t&&t.UTC===false)o=Fr(o);else if(t.cellText!==false&&t.dateNF)a.w=ze(a.z,o);if(t.cellDates){a.t="d";a.v=o}else{a.t="n";a.v=dr(o)}if(!t.cellNF)delete a.z}else if(r.charCodeAt(0)==35&&hi[r]!=null){a.t="e";a.w=r;a.v=hi[r]}else{a.t="s";a.v=r}if(a.t=="z"){}else if(t.dense){if(!n["!data"][f])n["!data"][f]=[];n["!data"][f][l]=a}else n[Ya({c:l,r:f})]=a;c=h+1;p=e.charCodeAt(c);if(s.e.c<l)s.e.c=l;if(s.e.r<f)s.e.r=f;if(v==u)++l;else{l=0;++f;if(t.sheetRows&&t.sheetRows<=f)return true}}e:for(;h<e.length;++h)switch(v=e.charCodeAt(h)){case 34:if(p===34)d=!d;break;case 13:if(d)break;if(e.charCodeAt(h+1)==10)++h;case u:;case 10:if(!d&&g())break e;break;default:break;}if(h-c>0)g();n["!ref"]=Ja(s);return n}function f(e,t){if(!(t&&t.PRN))return s(e,t);if(t.FS)return s(e,t);if(e.slice(0,4)=="sep=")return s(e,t);if(e.indexOf("\t")>=0||e.indexOf(",")>=0||e.indexOf(";")>=0)return s(e,t);return fn(r(e,t),t)}function l(e,r){var t="",n=r.type=="string"?[0,0,0,0]:lk(e,r);switch(r.type){case"base64":t=E(e);break;case"binary":t=e;break;case"buffer":if(r.codepage==65001)t=e.toString("utf8");else if(r.codepage&&typeof a!=="undefined")t=a.utils.decode(r.codepage,e);else t=C&&Buffer.isBuffer(e)?e.toString("binary"):N(e);break;case"array":t=kr(e);break;case"string":t=e;break;default:throw new Error("Unrecognized type "+r.type);}if(n[0]==239&&n[1]==187&&n[2]==191)t=It(t.slice(3));else if(r.type!="string"&&r.type!="buffer"&&r.codepage==65001)t=It(t);else if(r.type=="binary"&&typeof a!=="undefined"&&r.codepage)t=a.utils.decode(r.codepage,a.utils.encode(28591,t));if(t.slice(0,19)=="socialcalc:version:")return ro.to_sheet(r.type=="string"?t:It(t),r);return f(t,r)}function o(e,r){return an(l(e,r),r)}function c(e){var r=[];if(!e["!ref"])return"";var t=en(e["!ref"]),a;var n=e["!data"]!=null;for(var i=t.s.r;i<=t.e.r;++i){var s=[];for(var f=t.s.c;f<=t.e.c;++f){var l=Ya({r:i,c:f});a=n?(e["!data"][i]||[])[f]:e[l];if(!a||a.v==null){s.push(" ");continue}var o=(a.w||(tn(a),a.w)||"").slice(0,10);while(o.length<10)o+=" ";s.push(o+(f===0?" ":""))}r.push(s.join(""))}return r.join("\n")}return{to_workbook:o,to_sheet:l,from_sheet:c}}();function ao(e,r){var t=r||{},a=!!t.WTF;t.WTF=true;try{var n=Ql.to_workbook(e,t);t.WTF=a;return n}catch(i){t.WTF=a;if(i.message.indexOf("SYLK bad record ID")==-1&&a)throw i;return to.to_workbook(e,r)}}var no=function(){function e(e,r,t){if(!e)return;Oa(e,e.l||0);var a=t.Enum||V;while(e.l<e.length){var n=e._R(2);var i=a[n]||a[65535];var s=e._R(2);var f=e.l+s;var l=i.f&&i.f(e,s,t);e.l=f;if(r(l,i,n))return}}function r(e,r){switch(r.type){case"base64":return a(I(E(e)),r);case"binary":return a(I(e),r);case"buffer":;case"array":return a(e,r);}throw"Unsupported type "+r.type}var t=["mmmm","dd-mmm-yyyy","dd-mmm","mmm-yyyy","@","mm/dd","hh:mm:ss AM/PM","hh:mm AM/PM","mm/dd/yyyy","mm/dd","hh:mm:ss","hh:mm"];function a(r,a){if(!r)return r; 64884var n=a||{};if(b!=null&&n.dense==null)n.dense=b;var i={},s="Sheet1",f="",l=0;var o={},c=[],h=[],u=[];if(n.dense)u=i["!data"]=[];var d={s:{r:0,c:0},e:{r:0,c:0}};var v=n.sheetRows||0;var p={};if(r[4]==81&&r[5]==80&&r[6]==87)return j(r,a);if(r[2]==0){if(r[3]==8||r[3]==9){if(r.length>=16&&r[14]==5&&r[15]===108)throw new Error("Unsupported Works 3 for Mac file")}}if(r[2]==2){n.Enum=V;e(r,function(e,r,a){switch(a){case 0:n.vers=e;if(e>=4096)n.qpro=true;break;case 255:n.vers=e;n.works=true;break;case 6:d=e;break;case 204:if(e)f=e;break;case 222:f=e;break;case 15:;case 51:if((!n.qpro&&!n.works||a==51)&&e[1].v.charCodeAt(0)<48)e[1].v=e[1].v.slice(1);if(n.works||n.works2)e[1].v=e[1].v.replace(/\r\n/g,"\n");case 13:;case 14:;case 16:if((e[2]&112)==112&&(e[2]&15)>1&&(e[2]&15)<15){e[1].z=n.dateNF||t[(e[2]&15)-1]||q[14];if(n.cellDates){e[1].v=vr(e[1].v);e[1].t=typeof e[1].v=="number"?"n":"d"}}if(n.qpro){if(e[3]>l){i["!ref"]=Ja(d);o[s]=i;c.push(s);i={};if(n.dense)u=i["!data"]=[];d={s:{r:0,c:0},e:{r:0,c:0}};l=e[3];s=f||"Sheet"+(l+1);f=""}}var h=n.dense?(u[e[0].r]||[])[e[0].c]:i[Ya(e[0])];if(h){h.t=e[1].t;h.v=e[1].v;if(e[1].z!=null)h.z=e[1].z;if(e[1].f!=null)h.f=e[1].f;p=h;break}if(n.dense){if(!u[e[0].r])u[e[0].r]=[];u[e[0].r][e[0].c]=e[1]}else i[Ya(e[0])]=e[1];p=e[1];break;case 21509:n.works2=true;break;case 21506:{if(e==5281){p.z="hh:mm:ss";if(n.cellDates&&p.t=="n"){p.v=vr(p.v);p.t=typeof p.v=="number"?"n":"d"}}}break;}},n)}else if(r[2]==26||r[2]==14){n.Enum=$;if(r[2]==14){n.qpro=true;r.l=0}e(r,function(e,r,t){switch(t){case 204:s=e;break;case 22:if(e[1].v.charCodeAt(0)<48)e[1].v=e[1].v.slice(1);e[1].v=e[1].v.replace(/\x0F./g,function(e){return String.fromCharCode(e.charCodeAt(1)-32)}).replace(/\r\n/g,"\n");case 23:;case 24:;case 25:;case 37:;case 39:;case 40:if(e[3]>l){i["!ref"]=Ja(d);o[s]=i;c.push(s);i={};if(n.dense)u=i["!data"]=[];d={s:{r:0,c:0},e:{r:0,c:0}};l=e[3];s="Sheet"+(l+1)}if(v>0&&e[0].r>=v)break;if(n.dense){if(!u[e[0].r])u[e[0].r]=[];u[e[0].r][e[0].c]=e[1]}else i[Ya(e[0])]=e[1];if(d.e.c<e[0].c)d.e.c=e[0].c;if(d.e.r<e[0].r)d.e.r=e[0].r;break;case 27:if(e[14e3])h[e[14e3][0]]=e[14e3][1];break;case 1537:h[e[0]]=e[1];if(e[0]==l)s=e[1];break;default:break;}},n)}else throw new Error("Unrecognized LOTUS BOF "+r[2]);i["!ref"]=Ja(d);o[f||s]=i;c.push(f||s);if(!h.length)return{SheetNames:c,Sheets:o};var m={},g=[];for(var w=0;w<h.length;++w)if(o[c[w]]){g.push(h[w]||c[w]);m[h[w]]=o[h[w]]||o[c[w]]}else{g.push(h[w]);m[h[w]]={"!ref":"A1"}}return{SheetNames:g,Sheets:m}}function n(e,r){var t=r||{};if(+t.codepage>=0)l(+t.codepage);if(t.type=="string")throw new Error("Cannot write WK1 to JS string");var a=Fa();if(!e["!ref"])throw new Error("Cannot export empty sheet to WK1");var n=en(e["!ref"]);var i=e["!data"]!=null;var f=[];qg(a,0,s(1030));qg(a,6,c(n));var o=Math.min(n.e.r,8191);for(var h=n.s.c;h<=n.e.c;++h)f[h]=$a(h);for(var u=n.s.r;u<=o;++u){var d=Wa(u);for(h=n.s.c;h<=n.e.c;++h){var p=i?(e["!data"][u]||[])[h]:e[f[h]+d];if(!p||p.t=="z")continue;switch(p.t){case"n":if((p.v|0)==p.v&&p.v>=-32768&&p.v<=32767)qg(a,13,g(u,h,p));else qg(a,14,k(u,h,p));break;case"d":var m=dr(p.v);if((m|0)==m&&m>=-32768&&m<=32767)qg(a,13,g(u,h,{t:"n",v:m,z:p.z||q[14]}));else qg(a,14,k(u,h,{t:"n",v:m,z:p.z||q[14]}));break;default:var b=tn(p);qg(a,15,v(u,h,b.slice(0,239)));}}}qg(a,1);return a.end()}function i(e,r){var t=r||{};if(+t.codepage>=0)l(+t.codepage);if(t.type=="string")throw new Error("Cannot write WK3 to JS string");var a=Fa();qg(a,0,f(e));for(var n=0,i=0;n<e.SheetNames.length;++n)if((e.Sheets[e.SheetNames[n]]||{})["!ref"])qg(a,27,H(e.SheetNames[n],i++));var s=0;for(n=0;n<e.SheetNames.length;++n){var o=e.Sheets[e.SheetNames[n]];if(!o||!o["!ref"])continue;var c=en(o["!ref"]);var h=o["!data"]!=null;var u=[];var d=Math.min(c.e.r,8191);for(var v=c.s.r;v<=d;++v){var p=Wa(v);for(var m=c.s.c;m<=c.e.c;++m){if(v===c.s.r)u[m]=$a(m);var g=u[m]+p;var b=h?(o["!data"][v]||[])[m]:o[g];if(!b||b.t=="z")continue;if(b.t=="n"){qg(a,23,F(v,m,s,b.v))}else{var w=tn(b);qg(a,22,O(v,m,s,w.slice(0,239)))}}}++s}qg(a,1);return a.end()}function s(e){var r=Ra(2);r._W(2,e);return r}function f(e){var r=Ra(26);r._W(2,4096);r._W(2,4);r._W(4,0);var t=0,a=0,n=0;for(var i=0;i<e.SheetNames.length;++i){var s=e.SheetNames[i];var f=e.Sheets[s];if(!f||!f["!ref"])continue;++n;var l=Za(f["!ref"]);if(t<l.e.r)t=l.e.r;if(a<l.e.c)a=l.e.c}if(t>8191)t=8191;r._W(2,t);r._W(1,n);r._W(1,a);r._W(2,0);r._W(2,0);r._W(1,1);r._W(1,2);r._W(4,0);r._W(4,0);return r}function o(e,r,t){var a={s:{c:0,r:0},e:{c:0,r:0}};if(r==8&&t.qpro){a.s.c=e._R(1);e.l++;a.s.r=e._R(2);a.e.c=e._R(1);e.l++;a.e.r=e._R(2);return a}a.s.c=e._R(2);a.s.r=e._R(2);if(r==12&&t.qpro)e.l+=2;a.e.c=e._R(2);a.e.r=e._R(2);if(r==12&&t.qpro)e.l+=2;if(a.s.c==65535)a.s.c=a.e.c=a.s.r=a.e.r=0;return a}function c(e){var r=Ra(8);r._W(2,e.s.c);r._W(2,e.s.r);r._W(2,e.e.c);r._W(2,e.e.r);return r}function h(e,r,t){var a=[{c:0,r:0},{t:"n",v:0},0,0];if(t.qpro&&t.vers!=20768){a[0].c=e._R(1);a[3]=e._R(1);a[0].r=e._R(2);e.l+=2}else if(t.works){a[0].c=e._R(2);a[0].r=e._R(2);a[2]=e._R(2)}else{a[2]=e._R(1);a[0].c=e._R(2);a[0].r=e._R(2)}return a}function u(e){if(e.z&&Le(e.z)){return 240|(t.indexOf(e.z)+1||2)}return 255}function d(e,r,t){var a=e.l+r;var n=h(e,r,t);n[1].t="s";if((t.vers&65534)==20768){e.l++;var i=e._R(1);n[1].v=e._R(i,"utf8");return n}if(t.qpro)e.l++;n[1].v=e._R(a-e.l,"cstr");return n}function v(e,r,t){var a=Ra(7+t.length);a._W(1,255);a._W(2,r);a._W(2,e);a._W(1,39);for(var n=0;n<a.length;++n){var i=t.charCodeAt(n);a._W(1,i>=128?95:i)}a._W(1,0);return a}function p(e,r,t){var a=e.l+r;var n=h(e,r,t);n[1].t="s";if(t.vers==20768){var i=e._R(1);n[1].v=e._R(i,"utf8");return n}n[1].v=e._R(a-e.l,"cstr");return n}function m(e,r,t){var a=h(e,r,t);a[1].v=e._R(2,"i");return a}function g(e,r,t){var a=Ra(7);a._W(1,u(t));a._W(2,r);a._W(2,e);a._W(2,t.v,"i");return a}function w(e,r,t){var a=h(e,r,t);a[1].v=e._R(8,"f");return a}function k(e,r,t){var a=Ra(13);a._W(1,u(t));a._W(2,r);a._W(2,e);a._W(8,t.v,"f");return a}function A(e,r,t){var a=e.l+r;var n=h(e,r,t);n[1].v=e._R(8,"f");if(t.qpro)e.l=a;else{var i=e._R(2);_(e.slice(e.l,e.l+i),n);e.l+=i}return n}function T(e,r,t){var a=r&32768;r&=~32768;r=(a?e:0)+(r>=8192?r-16384:r);return(a?"":"$")+(t?$a(r):Wa(r))}var y={31:["NA",0],33:["ABS",1],34:["TRUNC",1],35:["SQRT",1],36:["LOG",1],37:["LN",1],38:["PI",0],39:["SIN",1],40:["COS",1],41:["TAN",1],42:["ATAN2",2],43:["ATAN",1],44:["ASIN",1],45:["ACOS",1],46:["EXP",1],47:["MOD",2],49:["ISNA",1],50:["ISERR",1],51:["FALSE",0],52:["TRUE",0],53:["RAND",0],54:["DATE",3],63:["ROUND",2],64:["TIME",3],68:["ISNUMBER",1],69:["ISTEXT",1],70:["LEN",1],71:["VALUE",1],73:["MID",3],74:["CHAR",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],102:["UPPER",1],103
vendor: 4,817 bytes, line 64884
64884:["LOWER",1],107:["PROPER",1],109:["TRIM",1],111:["T",1]};var C=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function _(e,r){Oa(e,0);var t=[],a=0,n="",i="",s="",f="";while(e.l<e.length){var l=e[e.l++];switch(l){case 0:t.push(e._R(8,"f"));break;case 1:{i=T(r[0].c,e._R(2),true);n=T(r[0].r,e._R(2),false);t.push(i+n)}break;case 2:{var o=T(r[0].c,e._R(2),true);var c=T(r[0].r,e._R(2),false);i=T(r[0].c,e._R(2),true);n=T(r[0].r,e._R(2),false);t.push(o+c+":"+i+n)}break;case 3:if(e.l<e.length){console.error("WK1 premature formula end");return}break;case 4:t.push("("+t.pop()+")");break;case 5:t.push(e._R(2));break;case 6:{var h="";while(l=e[e.l++])h+=String.fromCharCode(l);t.push('"'+h.replace(/"/g,'""')+'"')}break;case 8:t.push("-"+t.pop());break;case 23:t.push("+"+t.pop());break;case 22:t.push("NOT("+t.pop()+")");break;case 20:;case 21:{f=t.pop();s=t.pop();t.push(["AND","OR"][l-20]+"("+s+","+f+")")}break;default:if(l<32&&C[l]){f=t.pop();s=t.pop();t.push(s+C[l]+f)}else if(y[l]){a=y[l][1];if(a==69)a=e[e.l++];if(a>t.length){console.error("WK1 bad formula parse 0x"+l.toString(16)+":|"+t.join("|")+"|");return}var u=t.slice(-a);t.length-=a;t.push(y[l][0]+"("+u.join(",")+")")}else if(l<=7)return console.error("WK1 invalid opcode "+l.toString(16));else if(l<=24)return console.error("WK1 unsupported op "+l.toString(16));else if(l<=30)return console.error("WK1 invalid opcode "+l.toString(16));else if(l<=115)return console.error("WK1 unsupported function opcode "+l.toString(16));else return console.error("WK1 unrecognized opcode "+l.toString(16));}}if(t.length==1)r[1].f=""+t[0];else console.error("WK1 bad formula parse |"+t.join("|")+"|")}function S(e){var r=[{c:0,r:0},{t:"n",v:0},0];r[0].r=e._R(2);r[3]=e[e.l++];r[0].c=e[e.l++];return r}function x(e,r){var t=S(e,r);t[1].t="s";t[1].v=e._R(r-4,"cstr");return t}function O(e,r,t,a){var n=Ra(6+a.length);n._W(2,e);n._W(1,t);n._W(1,r);n._W(1,39);for(var i=0;i<a.length;++i){var s=a.charCodeAt(i);n._W(1,s>=128?95:s)}n._W(1,0);return n}function R(e,r){var t=S(e,r);t[1].v=e._R(2);var a=t[1].v>>1;if(t[1].v&1){switch(a&7){case 0:a=(a>>3)*5e3;break;case 1:a=(a>>3)*500;break;case 2:a=(a>>3)/20;break;case 3:a=(a>>3)/200;break;case 4:a=(a>>3)/2e3;break;case 5:a=(a>>3)/2e4;break;case 6:a=(a>>3)/16;break;case 7:a=(a>>3)/64;break;}}t[1].v=a;return t}function N(e,r){var t=S(e,r);var a=e._R(4);var n=e._R(4);var i=e._R(2);if(i==65535){if(a===0&&n===3221225472){t[1].t="e";t[1].v=15}else if(a===0&&n===3489660928){t[1].t="e";t[1].v=42}else t[1].v=0;return t}var s=i&32768;i=(i&32767)-16446;t[1].v=(1-s*2)*(n*Math.pow(2,i+32)+a*Math.pow(2,i));return t}function F(e,r,t,a){var n=Ra(14);n._W(2,e);n._W(1,t);n._W(1,r);if(a==0){n._W(4,0);n._W(4,0);n._W(2,65535);return n}var i=0,s=0,f=0,l=0;if(a<0){i=1;a=-a}s=Math.log2(a)|0;a/=Math.pow(2,s-31);l=a>>>0;if((l&2147483648)==0){a/=2;++s;l=a>>>0}a-=l;l|=2147483648;l>>>=0;a*=Math.pow(2,32);f=a>>>0;n._W(4,f);n._W(4,l);s+=16383+(i?32768:0);n._W(2,s);return n}function D(e,r){var t=N(e,14);e.l+=r-14;return t}function P(e,r){var t=S(e,r);var a=e._R(4);t[1].v=a>>6;return t}function L(e,r){var t=S(e,r);var a=e._R(8,"f");t[1].v=a;return t}function M(e,r){var t=L(e,12);e.l+=r-12;return t}function U(e,r){return e[e.l+r-1]==0?e._R(r,"cstr"):""}function B(e,r){var t=e[e.l++];if(t>r-1)t=r-1;var a="";while(a.length<t)a+=String.fromCharCode(e[e.l++]);return a}function W(e,r,t){if(!t.qpro||r<21)return;var a=e._R(1);e.l+=17;e.l+=1;e.l+=2;var n=e._R(r-21,"cstr");return[a,n]}function z(e,r){var t={},a=e.l+r;while(e.l<a){var n=e._R(2);if(n==14e3){t[n]=[0,""];t[n][0]=e._R(2);while(e[e.l]){t[n][1]+=String.fromCharCode(e[e.l]);e.l++}e.l++}}return t}function H(e,r){var t=Ra(5+e.length);t._W(2,14e3);t._W(2,r);for(var a=0;a<e.length;++a){var n=e.charCodeAt(a);t[t.l++]=n>127?95:n}t[t.l++]=0;return t}var V={0:{n:"BOF",f:ks},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:o},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:m},14:{n:"NUMBER",f:w},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:A},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:p},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"}
vendor: 29,553 bytes, lines 64884-64885
64884,103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:U},222:{n:"SHEETNAMELP",f:B},255:{n:"BOF",f:ks},21506:{n:"WKSNF",f:ks},65535:{n:""}};var $={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:x},23:{n:"NUMBER17",f:N},24:{n:"NUMBER18",f:R},25:{n:"FORMULA19",f:D},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:z},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:P},38:{n:"??"},39:{n:"NUMBER27",f:L},40:{n:"FORMULA28",f:M},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:U},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:W},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};var X={5:"dd-mmm-yy",6:"dd-mmm",7:"mmm-yy",8:"mm/dd/yy",10:"hh:mm:ss AM/PM",11:"hh:mm AM/PM",14:"dd-mmm-yyyy",15:"mmm-yyyy",34:"0.00",50:"0.00;[Red]0.00",66:"0.00;(0.00)",82:"0.00;[Red](0.00)",162:'"$"#,##0.00;\\("$"#,##0.00\\)',288:"0%",304:"0E+00",320:"# ?/?"};function G(e){var r=e._R(2);var t=e._R(1);if(t!=0)throw"unsupported QPW string type "+t.toString(16);return e._R(r,"sbcs-cont")}function j(e,r){Oa(e,0);var t=r||{};if(b!=null&&t.dense==null)t.dense=b;var a={};if(t.dense)a["!data"]=[];var n=[],i="",s=[];var f={s:{r:-1,c:-1},e:{r:-1,c:-1}};var l=0,o=0,c=0,h=0;var u={SheetNames:[],Sheets:{}};var d=[];e:while(e.l<e.length){var v=e._R(2),p=e._R(2);var m=e.slice(e.l,e.l+p);Oa(m,0);switch(v){case 1:if(m._R(4)!=962023505)throw"Bad QPW9 BOF!";break;case 2:break e;case 8:break;case 10:{var g=m._R(4);var w=(m.length-m.l)/g|0;for(var k=0;k<g;++k){var A=m.l+w;var T={};m.l+=2;T.numFmtId=m._R(2);if(X[T.numFmtId])T.z=X[T.numFmtId];m.l=A;d.push(T)}}break;case 1025:break;case 1026:break;case 1031:{m.l+=12;while(m.l<m.length){l=m._R(2);o=m._R(1);n.push(m._R(l,"cstr"))}}break;case 1032:{}break;case 1537:{var y=m._R(2);a={};if(t.dense)a["!data"]=[];f.s.c=m._R(2);f.e.c=m._R(2);f.s.r=m._R(4);f.e.r=m._R(4);m.l+=4;if(m.l+2<m.length){l=m._R(2);o=m._R(1);i=l==0?"":m._R(l,"cstr")}if(!i)i=$a(y)}break;case 1538:{if(f.s.c>255||f.s.r>999999)break;if(f.e.c<f.s.c)f.e.c=f.s.c;if(f.e.r<f.s.r)f.e.r=f.s.r;a["!ref"]=Ja(f);Xk(u,a,i)}break;case 2561:{c=m._R(2);if(f.e.c<c)f.e.c=c;if(f.s.c>c)f.s.c=c;h=m._R(4);if(f.s.r>h)f.s.r=h;h=m._R(4);if(f.e.r<h)f.e.r=h}break;case 3073:{h=m._R(4),l=m._R(4);if(f.s.r>h)f.s.r=h;if(f.e.r<h+l-1)f.e.r=h+l-1;var E=$a(c);while(m.l<m.length){var C={t:"z"};var _=m._R(1),S=-1;if(_&128)S=m._R(2);var x=_&64?m._R(2)-1:0;switch(_&31){case 0:break;case 1:break;case 2:C={t:"n",v:m._R(2)};break;case 3:C={t:"n",v:m._R(2,"i")};break;case 4:C={t:"n",v:On(m)};break;case 5:C={t:"n",v:m._R(8,"f")};break;case 7:C={t:"s",v:n[o=m._R(4)-1]};break;case 8:C={t:"n",v:m._R(8,"f")};m.l+=2;m.l+=4;if(isNaN(C.v))C={t:"e",v:15};break;default:throw"Unrecognized QPW cell type "+(_&31);}if(S!=-1&&(d[S-1]||{}).z)C.z=d[S-1].z;var O=0;if(_&32)switch(_&31){case 2:O=m._R(2);break;case 3:O=m._R(2,"i");break;case 7:O=m._R(2);break;default:throw"Unsupported delta for QPW cell type "+(_&31);}if(!(!t.sheetStubs&&C.t=="z")){var I=Ar(C);if(C.t=="n"&&C.z&&Le(C.z)&&t.cellDates){I.v=vr(C.v);I.t=typeof I.v=="number"?"n":"d"}if(a["!data"]!=null){if(!a["!data"][h])a["!data"][h]=[];a["!data"][h][c]=I}else a[E+Wa(h)]=I}++h;--l;while(x-- >0&&l>=0){if(_&32)switch(_&31){case 2:C={t:"n",v:C.v+O&65535};break;case 3:C={t:"n",v:C.v+O&65535};if(C.v>32767)C.v-=65536;break;case 7:C={t:"s",v:n[o=o+O>>>0]};break;default:throw"Cannot apply delta for QPW cell type "+(_&31);}else switch(_&31){case 1:C={t:"z"};break;case 2:C={t:"n",v:m._R(2)};break;case 7:C={t:"s",v:n[o=m._R(4)-1]};break;default:throw"Cannot apply repeat for QPW cell type "+(_&31);}if(S!=-1);if(!(!t.sheetStubs&&C.t=="z")){if(a["!data"]!=null){if(!a["!data"][h])a["!data"][h]=[];a["!data"][h][c]=C}else a[E+Wa(h)]=C}++h;--l}}}break;case 3074:{c=m._R(2);h=m._R(4);var R=G(m);if(a["!data"]!=null){if(!a["!data"][h])a["!data"][h]=[];a["!data"][h][c]={t:"s",v:R}}else a[$a(c)+Wa(h)]={t:"s",v:R}}break;default:break;}e.l+=p}return u}return{sheet_to_wk1:n,book_to_wk3:i,to_workbook:r}}();function io(e){var r={},t=e.match(ft),a=0;var n=false;if(t)for(;a!=t.length;++a){var s=ct(t[a]);switch(s[0].replace(/<\w*:/g,"<")){case"<condense":break;case"<extend":break;case"<shadow":if(!s.val)break;case"<shadow>":;case"<shadow/>":r.shadow=1;break;case"</shadow>":break;case"<charset":if(s.val=="1")break;r.cp=i[parseInt(s.val,10)];break;case"<outline":if(!s.val)break;case"<outline>":;case"<outline/>":r.outline=1;break;case"</outline>":break;case"<rFont":r.name=s.val;break;case"<sz":r.sz=s.val;break;case"<strike":if(!s.val)break;case"<strike>":;case"<strike/>":r.strike=1;break;case"</strike>":break;case"<u":if(!s.val)break;switch(s.val){case"double":r.uval="double";break;case"singleAccounting":r.uval="single-accounting";break;case"doubleAccounting":r.uval="double-accounting";break;};case"<u>":;case"<u/>":r.u=1;break;case"</u>":break;case"<b":if(s.val=="0")break;case"<b>":;case"<b/>":r.b=1;break;case"</b>":break;case"<i":if(s.val=="0")break;case"<i>":;case"<i/>":r.i=1;break;case"</i>":break;case"<color":if(s.rgb)r.color=s.rgb.slice(2,8);break;case"<color>":;case"<color/>":;case"</color>":break;case"<family":r.family=s.val;break;case"<family>":;case"<family/>":;case"</family>":break;case"<vertAlign":r.valign=s.val;break;case"<vertAlign>":;case"<vertAlign/>":;case"</vertAlign>":break;case"<scheme":break;case"<scheme>":;case"<scheme/>":;case"</scheme>":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":n=true;break;case"</ext>":n=false;break;default:if(s[0].charCodeAt(1)!==47&&!n)throw new Error("Unrecognized rich format "+s[0]);}}return r}var so=function(){function e(e){var r=Wr(e,"t");if(!r)return{t:"s",v:""};var t={t:"s",v:pt(r[1])};var a=Wr(e,"rPr");if(a)t.s=io(a[1]);return t}var r=/<(?:\w+:)?r>/g,t=/<\/(?:\w+:)?r>/;return function a(n){return n.replace(r,"").split(t).map(e).filter(function(e){return e.v})}}();var fo=function TA(){var e=/(\r\n|\n)/g;function r(e,r,t){var a=[];if(e.u)a.push("text-decoration: underline;");if(e.uval)a.push("text-underline-style:"+e.uval+";");if(e.sz)a.push("font-size:"+e.sz+"pt;");if(e.outline)a.push("text-effect: outline;");if(e.shadow)a.push("text-shadow: auto;");r.push('<span style="'+a.join("")+'">');if(e.b){r.push("<b>");t.push("</b>")}if(e.i){r.push("<i>");t.push("</i>")}if(e.strike){r.push("<s>");t.push("</s>")}var n=e.valign||"";if(n=="superscript"||n=="super")n="sup";else if(n=="subscript")n="sub";if(n!=""){r.push("<"+n+">");t.push("</"+n+">")}t.push("</span>");return e}function t(t){var a=[[],t.v,[]];if(!t.v)return"";if(t.s)r(t.s,a[0],a[2]);return a[0].join("")+a[1].replace(e,"<br/>")+a[2].join("")}return function a(e){return e.map(t).join("")}}();var lo=/<(?:\w+:)?t\b[^<>]*>([^<]*)<\/(?:\w+:)?t>/g,oo=/<(?:\w+:)?r\b[^<>]*>/;function co(e,r){var t=r?r.cellHTML:true;var a={};if(!e)return{t:""};if(e.match(/^\s*<(?:\w+:)?t[^>]*>/)){a.t=pt(It(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||""),true);a.r=It(e);if(t)a.h=At(a.t)}else if(e.match(oo)){a.r=It(e);a.t=pt(It((Hr(e,"rPh").match(lo)||[]).join("").replace(ft,"")),true);if(t)a.h=fo(so(a.r))}return a}var ho=/<(?:\w+:)?(?:si|sstItem)>/g;var uo=/<\/(?:\w+:)?(?:si|sstItem)>/;function vo(e,r){var t=[],a="";if(!e)return t;var n=Wr(e,"sst");if(n){a=n[1].replace(ho,"").split(uo);for(var i=0;i!=a.length;++i){var s=co(a[i].trim(),r);if(s!=null)t[t.length]=s}n=ct(n[0].slice(0,n[0].indexOf(">")));t.Count=n.count;t.Unique=n.uniqueCount}return t}var po=/^\s|\s$|[\t\n\r]/;function mo(e,r){if(!r.bookSST)return"";var t=[at];t[t.length]=Bt("sst",null,{xmlns:Xt[0],count:e.Count,uniqueCount:e.Unique});for(var a=0;a!=e.length;++a){if(e[a]==null)continue;var n=e[a];var i="<si>";if(n.r)i+=n.r;else{i+="<t";if(!n.t)n.t="";if(typeof n.t!=="string")n.t=String(n.t);if(n.t.match(po))i+=' xml:space="preserve"';i+=">"+bt(n.t)+"</t>"}i+="</si>";t[t.length]=i}if(t.length>2){t[t.length]="</sst>";t[1]=t[1].replace("/>",">")}return t.join("")}function go(e){return[e._R(4),e._R(4)]}function bo(e,r){var t=[];var a=false;Na(e,function n(e,i,s){switch(s){case 159:t.Count=e[0];t.Unique=e[1];break;case 19:t.push(e);break;case 160:return true;case 35:a=true;break;case 36:a=false;break;default:if(i.T){}if(!a||r.WTF)throw new Error("Unexpected record 0x"+s.toString(16));}});return t}function wo(e,r){if(!r)r=Ra(8);r._W(4,e.Count);r._W(4,e.Unique);return r}var ko=pn;function Ao(e){var r=Fa();Da(r,159,wo(e));for(var t=0;t<e.length;++t)Da(r,19,ko(e[t]));Da(r,160);return r.end()}function To(e){if(typeof a!=="undefined")return a.utils.encode(t,e);var r=[],n=e.split("");for(var i=0;i<n.length;++i)r[i]=n[i].charCodeAt(0);return r}function yo(e,r){var t={};t.Major=e._R(2);t.Minor=e._R(2);if(r>=4)e.l+=r-4;return t}function Eo(e){var r={};r.id=e._R(0,"lpp4");r.R=yo(e,4);r.U=yo(e,4);r.W=yo(e,4);return r}function Co(e){var r=e._R(4);var t=e.l+r-4;var a={};var n=e._R(4);var i=[];while(n-- >0)i.push({t:e._R(4),v:e._R(0,"lpp4")});a.name=e._R(0,"lpp4");a.comps=i;if(e.l!=t)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+t);return a}function _o(e){var r=[];e.l+=4;var t=e._R(4);while(t-- >0)r.push(Co(e));return r}function So(e){var r=[];e.l+=4;var t=e._R(4);while(t-- >0)r.push(e._R(0,"lpp4"));return r}function xo(e){var r={};e._R(4);e.l+=4;r.id=e._R(0,"lpp4");r.name=e._R(0,"lpp4");r.R=yo(e,4);r.U=yo(e,4);r.W=yo(e,4);return r}function Oo(e){var r=xo(e);r.ename=e._R(0,"8lpp4");r.blksz=e._R(4);r.cmode=e._R(4);if(e._R(4)!=4)throw new Error("Bad !Primary record");return r}function Io(e,r){var t=e.l+r;var a={};a.Flags=e._R(4)&63;e.l+=4;a.AlgID=e._R(4);var n=false;switch(a.AlgID){case 26126:;case 26127:;case 26128:n=a.Flags==36;break;case 26625:n=a.Flags==4;break;case 0:n=a.Flags==16||a.Flags==4||a.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+a.AlgID;}if(!n)throw new Error("Encryption Flags/AlgID mismatch");a.AlgIDHash=e._R(4);a.KeySize=e._R(4);a.ProviderType=e._R(4);e.l+=8;a.CSPName=e._R(t-e.l>>1,"utf16le");e.l=t;return a}function Ro(e,r){var t={},a=e.l+r;e.l+=4;t.Salt=e.slice(e.l,e.l+16);e.l+=16;t.Verifier=e.slice(e.l,e.l+16);e.l+=16;e._R(4);t.VerifierHash=e.slice(e.l,a);e.l=a;return t}function No(e){var r=yo(e);switch(r.Minor){case 2:return[r.Minor,Fo(e,r)];case 3:return[r.Minor,Do(e,r)];case 4:return[r.Minor,Po(e,r)];}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+r.Minor)}function Fo(e){var r=e._R(4);if((r&63)!=36)throw new Error("EncryptionInfo mismatch");var t=e._R(4);var a=Io(e,t);var n=Ro(e,e.length-e.l);return{t:"Std",h:a,v:n}}function Do(){throw new Error("File is password-protected: ECMA-376 Extensible")}function Po(e){var r=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var t=e._R(e.length-e.l,"utf8");var a={};t.replace(ft,function n(e){var t=ct(e);switch(ut(t[0])){case"<?xml":break;case"<encryption":;case"</encryption>":break;case"<keyData":r.forEach(function(e){a[e]=t[e]});break;case"<dataIntegrity":a.encryptedHmacKey=t.encryptedHmacKey;a.encryptedHmacValue=t.encryptedHmacValue;break;case"<keyEncryptors>":;case"<keyEncryptors":a.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":a.uri=t.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":a.encs.push(t);break;default:throw t[0];}});return a}function Lo(e,r){var t={};var a=t.EncryptionVersionInfo=yo(e,4);r-=4;if(a.Minor!=2)throw new Error("unrecognized minor version code: "+a.Minor);if(a.Major>4||a.Major<2)throw new Error("unrecognized major version code: "+a.Major);t.Flags=e._R(4);r-=4;var n=e._R(4);r-=4;t.EncryptionHeader=Io(e,n);r-=n;t.EncryptionVerifier=Ro(e,r);return t}function Mo(e){var r={};var t=r.EncryptionVersionInfo=yo(e,4);if(t.Major!=1||t.Minor!=1)throw"unrecognized version code "+t.Major+" : "+t.Minor;r.Salt=e._R(16);r.EncryptedVerifier=e._R(16);r.EncryptedVerifierHash=e._R(16);return r}function Uo(e){var r=0,t;var a=To(e);var n=a.length+1,i,s;var f,l,o;t=x(n);t[0]=a.length;for(i=1;i!=n;++i)t[i]=a[i-1];for(i=n-1;i>=0;--i){s=t[i];f=(r&16384)===0?0:1;l=r<<1&32767;o=f|l;r=o^s}return r^52811}var Bo=function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0];var r=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163];var t=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628];var a=function(e){return(e/2|e*128)&255};var n=function(e,r){return a(e^r)};var i=function(e){var a=r[e.length-1];var n=104;for(var i=e.length-1;i>=0;--i){var s=e[i];for(var f=0;f!=7;++f){if(s&64)a^=t[n];s*=2;--n}}return a};return function(r){var t=To(r);var a=i(t);var s=t.length;var f=x(16);for(var l=0;l!=16;++l)f[l]=0;var o,c,h;if((s&1)===1){o=a>>8;f[s]=n(e[0],o);--s;o=a&255;c=t[t.length-1];f[s]=n(c,o)}while(s>0){--s;o=a>>8;f[s]=n(t[s],o);--s;o=a&255;f[s]=n(t[s],o)}s=15;h=15-t.length;while(h>0){o=a>>8;f[s]=n(e[h],o);--s;--h;o=a&255;f[s]=n(t[s],o);--s;--h}return f}}();var Wo=function(e,r,t,a,n){if(!n)n=r;if(!a)a=Bo(e);var i,s;for(i=0;i!=r.length;++i){s=r[i];s^=a[t];s=(s>>5|s<<3)&255;n[i]=s;++t}return[n,t,a]};var zo=function(e){var r=0,t=Bo(e);return function(e){var a=Wo("",e,r,t);r=a[1];return a[0]}};function Ho(e,r,t,a){var n={key:ks(e),verificationBytes:ks(e)};if(t.password)n.verifier=Uo(t.password);a.valid=n.verificationBytes===n.verifier;if(a.valid)a.insitu=zo(t.password);return n}function Vo(e,r,t){var a=t||{};a.Info=e._R(2);e.l-=2;if(a.Info===1)a.Data=Mo(e,r);else a.Data=Lo(e,r);return a}function $o(e,r,t){var a={Type:t.biff>=8?e._R(2):0};if(a.Type)Vo(e,r-2,a);else Ho(e,t.biff>=8?r:r-2,t,a);return a}function Xo(e,r){switch(r.type){case"base64":return Go(E(e),r);case"binary":return Go(e,r);case"buffer":return Go(C&&Buffer.isBuffer(e)?e.toString("binary"):N(e),r);case"array":return Go(kr(e),r);}throw new Error("Unrecognized type "+r.type)}function Go(e,r){var t=r||{};var a={};var n=t.dense;if(n)a["!data"]=[];var i=Lr(e,"\\trowd","\\row");if(!i)throw new Error("RTF missing table");var s={s:{c:0,r:0},e:{c:0,r:i.length-1}};var f=[];i.forEach(function(e,r){if(n)f=a["!data"][r]=[];var i=/\\[\w\-]+\b/g;var l=0;var o;var c=-1;var h=[];while((o=i.exec(e))!=null){var u=e.slice(l,i.lastIndex-o[0].length);if(u.charCodeAt(0)==32)u=u.slice(1);if(u.length)h.push(u);switch(o[0]){case"\\cell":++c;if(h.length){var d={v:h.join(""),t:"s"};if(d.v=="TRUE"||d.v=="FALSE"){d.v=d.v=="TRUE";d.t="b"}else if(!isNaN(yr(d.v))){d.t="n";if(t.cellText!==false)d.w=d.v;d.v=yr(d.v)}else if(hi[d.v]!=null){d.t="e";d.w=d.v;d.v=hi[d.v]}if(n)f[c]=d;else a[Ya({r:r,c:c})]=d}h=[];break;case"\\par":h.push("\n");break;}l=i.lastIndex}if(c>s.e.c)s.e.c=c});a["!ref"]=Ja(s);return a}function jo(e,r){var t=an(Xo(e,r),r);t.bookType="rtf";return t}function Ko(e,r){var t=["{\\rtf1\\ansi"];if(!e["!ref"])return t[0]+"}";var a=en(e["!ref"]),n;var i=e["!data"]!=null,s=[];for(var f=a.s.r;f<=a.e.r;++f){t.push("\\trowd\\trautofit1");for(var l=a.s.c;l<=a.e.c;++l)t.push("\\cellx"+(l+1));t.push("\\pard\\intbl");if(i)s=e["!data"][f]||[];for(l=a.s.c;l<=a.e.c;++l){var o=Ya({r:f,c:l});n=i?s[l]:e[o];if(!n||n.v==null&&(!n.f||n.F)){t.push(" \\cell");continue}t.push(" "+(n.w||(tn(n),n.w)||"").replace(/[\r\n]/g,"\\par "));t.push("\\cell")}t.push("\\pard\\intbl\\row")}return t.join("")+"}"}function Yo(e){var r=e.slice(e[0]==="#"?1:0).slice(0,6);return[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16)]}function Zo(e){for(var r=0,t=1;r!=3;++r)t=t*256+(e[r]>255?255:e[r]<0?0:e[r]);return t.toString(16).toUpperCase().slice(1)}function Jo(e){var r=e[0]/255,t=e[1]/255,a=e[2]/255;var n=Math.max(r,t,a),i=Math.min(r,t,a),s=n-i;if(s===0)return[0,0,r];var f=0,l=0,o=n+i;l=s/(o>1?2-o:o);switch(n){case r:f=((t-a)/s+6)%6;break;case t:f=(a-r)/s+2;break;case a:f=(r-t)/s+4;break;}return[f/6,l,o/2]}function qo(e){var r=e[0],t=e[1],a=e[2];var n=t*2*(a<.5?a:1-a),i=a-n/2;var s=[i,i,i],f=6*r;var l;if(t!==0)switch(f|0){case 0:;case 6:l=n*f;s[0]+=n;s[1]+=l;break;case 1:l=n*(2-f);s[0]+=l;s[1]+=n;break;case 2:l=n*(f-2);s[1]+=n;s[2]+=l;break;case 3:l=n*(4-f);s[1]+=l;s[2]+=n;break;case 4:l=n*(f-4);s[2]+=n;s[0]+=l;break;case 5:l=n*(6-f);s[2]+=l;s[0]+=n;break;}for(var o=0;o!=3;++o)s[o]=Math.round(s[o]*255);return s}function Qo(e,r){if(r===0)return e;var t=Jo(Yo(e));if(r<0)t[2]=t[2]*(1+r);else t[2]=1-(1-t[2])*(1-r);return Zo(qo(t))}var ec=6,rc=15,tc=1,ac=ec;function nc(e){return Math.floor((e+Math.round(128/ac)/256)*ac)}function ic(e){return Math.floor((e-5)/ac*100+.5)/100}function sc(e){return Math.round((e*ac+5)/ac*256)/256}function fc(e){return sc(ic(nc(e)))}function lc(e){var r=Math.abs(e-fc(e)),t=ac;if(r>.005)for(ac=tc;ac<rc;++ac)if(Math.abs(e-fc(e))<=r){r=Math.abs(e-fc(e));t=ac}ac=t}function oc(e){if(e.width){e.wpx=nc(e.width);e.wch=ic(e.wpx);e.MDW=ac}else if(e.wpx){e.wch=ic(e.wpx);e.width=sc(e.wch);e.MDW=ac}else if(typeof e.wch=="number"){e.width=sc(e.wch);e.wpx=nc(e.width);e.MDW=ac}if(e.customWidth)delete e.customWidth}var cc=96,hc=cc;function uc(e){return e*96/hc}function dc(e){return e*hc/96}var vc={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal", 64885ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};function pc(e,r,t,a){r.Borders=[];var n={};var i=false;(e.match(ft)||[]).forEach(function(e){var t=ct(e);switch(ut(t[0])){case"<borders":;case"<borders>":;case"</borders>":break;case"<border":;case"<border>":;case"<border/>":n={};if(t.diagonalUp)n.diagonalUp=Ct(t.diagonalUp);if(t.diagonalDown)n.diagonalDown=Ct(t.diagonalDown);r.Borders.push(n);break;case"</border>":break;case"<left/>":break;case"<left":;case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":;case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":;case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":;case"<bottom>":break;case"</bottom>":break;case"<diagonal":;case"<diagonal>":;case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":;case"<horizontal>":;case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":;case"<vertical>":;case"<vertical/>":break;case"</vertical>":break;case"<start":;case"<start>":;case"<start/>":break;case"</start>":break;case"<end":;case"<end>":;case"<end/>":break;case"</end>":break;case"<color":;case"<color>":break;case"<color/>":;case"</color>":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":i=true;break;case"</ext>":i=false;break;default:if(a&&a.WTF){if(!i)throw new Error("unrecognized "+t[0]+" in borders")};}})}function mc(e,r,t,a){r.Fills=[];var n={};var i=false;(e.match(ft)||[]).forEach(function(e){var t=ct(e);switch(ut(t[0])){case"<fills":;case"<fills>":;case"</fills>":break;case"<fill>":;case"<fill":;case"<fill/>":n={};r.Fills.push(n);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":;case"</gradientFill>":r.Fills.push(n);n={};break;case"<patternFill":;case"<patternFill>":if(t.patternType)n.patternType=t.patternType;break;case"<patternFill/>":;case"</patternFill>":break;case"<bgColor":if(!n.bgColor)n.bgColor={};if(t.indexed)n.bgColor.indexed=parseInt(t.indexed,10);if(t.theme)n.bgColor.theme=parseInt(t.theme,10);if(t.tint)n.bgColor.tint=parseFloat(t.tint);if(t.rgb)n.bgColor.rgb=t.rgb.slice(-6);break;case"<bgColor/>":;case"</bgColor>":break;case"<fgColor":if(!n.fgColor)n.fgColor={};if(t.theme)n.fgColor.theme=parseInt(t.theme,10);if(t.tint)n.fgColor.tint=parseFloat(t.tint);if(t.rgb!=null)n.fgColor.rgb=t.rgb.slice(-6);break;case"<fgColor/>":;case"</fgColor>":break;case"<stop":;case"<stop/>":break;case"</stop>":break;case"<color":;case"<color/>":break;case"</color>":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":i=true;break;case"</ext>":i=false;break;default:if(a&&a.WTF){if(!i)throw new Error("unrecognized "+t[0]+" in fills")};}})}function gc(e,r,t,a){r.Fonts=[];var n={};var s=false;(e.match(ft)||[]).forEach(function(e){var f=ct(e);switch(ut(f[0])){case"<fonts":;case"<fonts>":;case"</fonts>":break;case"<font":;case"<font>":break;case"</font>":;case"<font/>":r.Fonts.push(n);n={};break;case"<name":if(f.val)n.name=It(f.val);break;case"<name/>":;case"</name>":break;case"<b":n.bold=f.val?Ct(f.val):1;break;case"<b/>":n.bold=1;break;case"</b>":;case"</b":break;case"<i":n.italic=f.val?Ct(f.val):1;break;case"<i/>":n.italic=1;break;case"</i>":;case"</i":break;case"<u":switch(f.val){case"none":n.underline=0;break;case"single":n.underline=1;break;case"double":n.underline=2;break;case"singleAccounting":n.underline=33;break;case"doubleAccounting":n.underline=34;break;}break;case"<u/>":n.underline=1;break;case"</u>":;case"</u":break;case"<strike":n.strike=f.val?Ct(f.val):1;break;case"<strike/>":n.strike=1;break;case"</strike>":;case"</strike":break;case"<outline":n.outline=f.val?Ct(f.val):1;break;case"<outline/>":n.outline=1;break;case"</outline>":;case"</outline":break;case"<shadow":n.shadow=f.val?Ct(f.val):1;break;case"<shadow/>":n.shadow=1;break;case"</shadow>":;case"</shadow":break;case"<condense":n.condense=f.val?Ct(f.val):1;break;case"<condense/>":n.condense=1;break;case"</condense>":;case"</condense":break;case"<extend":n.extend=f.val?Ct(f.val):1;break;case"<extend/>":n.extend=1;break;case"</extend>":;case"</extend":break;case"<sz":if(f.val)n.sz=+f.val;break;case"<sz/>":;case"</sz>":;case"</sz":break;case"<vertAlign":if(f.val)n.vertAlign=f.val;break;case"<vertAlign/>":;case"</vertAlign>":;case"</vertAlign":break;case"<family":if(f.val)n.family=parseInt(f.val,10);break;case"<family/>":;case"</family>":;case"</family":break;case"<scheme":if(f.val)n.scheme=f.val;break;case"<scheme/>":;case"</scheme>":;case"</scheme":break;case"<charset":if(f.val=="1")break;f.codepage=i[parseInt(f.val,10)];break;case"<charset/>":;case"</charset>":;case"</charset":break;case"<color":if(!n.color)n.color={};if(f.auto)n.color.auto=Ct(f.auto);if(f.rgb)n.color.rgb=f.rgb.slice(-6);else if(f.indexed){n.color.index=parseInt(f.indexed,10);var l=oi[n.color.index];if(n.color.index==81)l=oi[1];if(!l)l=oi[1];n.color.rgb=l[0].toString(16)+l[1].toString(16)+l[2].toString(16)}else if(f.theme){n.color.theme=parseInt(f.theme,10);if(f.tint)n.color.tint=parseFloat(f.tint);if(f.theme&&t.themeElements&&t.themeElements.clrScheme){n.color.rgb=Qo(t.themeElements.clrScheme[n.color.theme].rgb,n.color.tint||0)}}break;case"<color/>":;case"</color>":;case"</color":break;case"<AlternateContent":s=true;break;case"</AlternateContent>":;case"</AlternateContent":s=false;break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":s=true;break;case"</ext>":s=false;break;default:if(a&&a.WTF){if(!s)throw new Error("unrecognized "+f[0]+" in fonts")};}})}function bc(e,r,t){r.NumberFmt=[];var a=ir(q);for(var n=0;n<a.length;++n)r.NumberFmt[a[n]]=q[a[n]];var i=e.match(ft);if(!i)return;for(n=0;n<i.length;++n){var s=ct(i[n]);switch(ut(s[0])){case"<numFmts":;case"</numFmts>":;case"<numFmts/>":;case"<numFmts>":break;case"<numFmt":{var f=pt(It(s.formatCode)),l=parseInt(s.numFmtId,10);r.NumberFmt[l]=f;if(l>0){if(l>392){for(l=392;l>60;--l)if(r.NumberFmt[l]==null)break;r.NumberFmt[l]=f}Je(f,l)}}break;case"</numFmt>":break;default:if(t.WTF)throw new Error("unrecognized "+s[0]+" in numFmts");}}}function wc(e){var r=["<numFmts>"];[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(var a=t[0];a<=t[1];++a)if(e[a]!=null)r[r.length]=Bt("numFmt",null,{numFmtId:a,formatCode:bt(e[a])})});if(r.length===1)return"";r[r.length]="</numFmts>";r[0]=Bt("numFmts",null,{count:r.length-2}).replace("/>",">");return r.join("")}var kc=["numFmtId","fillId","fontId","borderId","xfId"];var Ac=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function Tc(e,r,t){r.CellXf=[];var a;var n=false;(e.match(ft)||[]).forEach(function(e){var i=ct(e),s=0;switch(ut(i[0])){case"<cellXfs":;case"<cellXfs>":;case"<cellXfs/>":;case"</cellXfs>":break;case"<xf":;case"<xf/>":;case"<xf>":a=i;delete a[0];for(s=0;s<kc.length;++s)if(a[kc[s]])a[kc[s]]=parseInt(a[kc[s]],10);for(s=0;s<Ac.length;++s)if(a[Ac[s]])a[Ac[s]]=Ct(a[Ac[s]]);if(r.NumberFmt&&a.numFmtId>392){for(s=392;s>60;--s)if(r.NumberFmt[a.numFmtId]==r.NumberFmt[s]){a.numFmtId=s;break}}r.CellXf.push(a);break;case"</xf>":break;case"<alignment":;case"<alignment/>":;case"<alignment>":var f={};if(i.vertical)f.vertical=i.vertical;if(i.horizontal)f.horizontal=i.horizontal;if(i.textRotation!=null)f.textRotation=i.textRotation;if(i.indent)f.indent=i.indent;if(i.wrapText)f.wrapText=Ct(i.wrapText);a.alignment=f;break;case"</alignment>":break;case"<protection":;case"<protection>":break;case"</protection>":;case"<protection/>":break;case"<AlternateContent":;case"<AlternateContent>":n=true;break;case"</AlternateContent>":n=false;break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":n=true;break;case"</ext>":n=false;break;default:if(t&&t.WTF){if(!n)throw new Error("unrecognized "+i[0]+" in cellXfs")};}})}function yc(e){var r=[];r[r.length]=Bt("cellXfs",null);e.forEach(function(e){r[r.length]=Bt("xf",null,e)});r[r.length]="</cellXfs>";if(r.length===2)return"";r[0]=Bt("cellXfs",null,{count:r.length-2}).replace("/>",">");return r.join("")}var Ec=function yA(){return function e(r,t,a){var n={};if(!r)return n;r=Pr(Mr(r,"<!--","-->"));var i;if(i=Wr(r,"numFmts"))bc(i[0],n,a);if(i=Wr(r,"fonts"))gc(i[0],n,t,a);if(i=Wr(r,"fills"))mc(i[0],n,t,a);if(i=Wr(r,"borders"))pc(i[0],n,t,a);if(i=Wr(r,"cellXfs"))Tc(i[0],n,a);return n}}();function Cc(e,r){var t=[at,Bt("styleSheet",null,{xmlns:Xt[0],"xmlns:vt":$t.vt})],a;if(e.SSF&&(a=wc(e.SSF))!=null)t[t.length]=a;t[t.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>';t[t.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>';t[t.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>';t[t.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>';if(a=yc(r.cellXfs))t[t.length]=a;t[t.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>';t[t.length]='<dxfs count="0"/>';t[t.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>';if(t.length>2){t[t.length]="</styleSheet>";t[1]=t[1].replace("/>",">")}return t.join("")}function _c(e,r){var t=e._R(2);var a=cn(e,r-2);return[t,a]}function Sc(e,r,t){if(!t)t=Ra(6+4*r.length);t._W(2,e);hn(r,t);var a=t.length>t.l?t.slice(0,t.l):t;if(t.l==null)t.l=t.length;return a}function xc(e,r,t){var a={};a.sz=e._R(2)/20;var n=Bn(e,2,t);if(n.fItalic)a.italic=1;if(n.fCondense)a.condense=1;if(n.fExtend)a.extend=1;if(n.fShadow)a.shadow=1;if(n.fOutline)a.outline=1;if(n.fStrikeout)a.strike=1;var i=e._R(2);if(i===700)a.bold=1;switch(e._R(2)){case 1:a.vertAlign="superscript";break;case 2:a.vertAlign="subscript";break;}var s=e._R(1);if(s!=0)a.underline=s;var f=e._R(1);if(f>0)a.family=f;var l=e._R(1);if(l>0)a.charset=l;e.l++;a.color=Mn(e,8);switch(e._R(1)){case 1:a.scheme="major";break;case 2:a.scheme="minor";break;}a.name=cn(e,r-21);return a}function Oc(e,r){if(!r)r=Ra(25+4*32);r._W(2,e.sz*20);Wn(e,r);r._W(2,e.bold?700:400);var t=0;if(e.vertAlign=="superscript")t=1;else if(e.vertAlign=="subscript")t=2;r._W(2,t);r._W(1,e.underline||0);r._W(1,e.family||0);r._W(1,e.charset||0);r._W(1,0);Un(e.color,r);var a=0;if(e.scheme=="major")a=1;if(e.scheme=="minor")a=2;r._W(1,a);hn(e.name,r);return r.length>r.l?r.slice(0,r.l):r}var Ic=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","dar
64885kVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];var Rc;var Nc=Ia;function Fc(e,r){if(!r)r=Ra(4*3+8*7+16*1);if(!Rc)Rc=fr(Ic);var t=Rc[e.patternType];if(t==null)t=40;r._W(4,t);var a=0;if(t!=40){Un({auto:1},r);Un({auto:1},r);for(;a<12;++a)r._W(4,0)}else{for(;a<4;++a)r._W(4,0);for(;a<12;++a)r._W(4,0)}return r.length>r.l?r.slice(0,r.l):r}function Dc(e,r){var t=e.l+r;var a=e._R(2);var n=e._R(2);e.l=t;return{ixfe:a,numFmtId:n}}function Pc(e,r,t){if(!t)t=Ra(16);t._W(2,r||0);t._W(2,e.numFmtId||0);t._W(2,0);t._W(2,0);t._W(2,0);t._W(1,0);t._W(1,0);var a=0;t._W(1,a);t._W(1,0);t._W(1,0);t._W(1,0);return t}function Lc(e,r){if(!r)r=Ra(10);r._W(1,0);r._W(1,0);r._W(4,0);r._W(4,0);return r}var Mc=Ia;function Uc(e,r){if(!r)r=Ra(51);r._W(1,0);Lc(null,r);Lc(null,r);Lc(null,r);Lc(null,r);Lc(null,r);return r.length>r.l?r.slice(0,r.l):r}function Bc(e,r){if(!r)r=Ra(12+4*10);r._W(4,e.xfId);r._W(2,1);r._W(1,+e.builtinId);r._W(1,0);Cn(e.name||"",r);return r.length>r.l?r.slice(0,r.l):r}function Wc(e,r,t){var a=Ra(4+256*2*4);a._W(4,e);Cn(r,a);Cn(t,a);return a.length>a.l?a.slice(0,a.l):a}function zc(e,r,t){var a={};a.NumberFmt=[];for(var n in q)a.NumberFmt[n]=q[n];a.CellXf=[];a.Fonts=[];var i=[];var s=false;Na(e,function f(e,n,l){switch(l){case 44:a.NumberFmt[e[0]]=e[1];Je(e[1],e[0]);break;case 43:a.Fonts.push(e);if(e.color.theme!=null&&r&&r.themeElements&&r.themeElements.clrScheme){e.color.rgb=Qo(r.themeElements.clrScheme[e.color.theme].rgb,e.color.tint||0)}break;case 1025:break;case 45:break;case 46:break;case 47:if(i[i.length-1]==617){a.CellXf.push(e)}break;case 48:;case 507:;case 572:;case 475:break;case 1171:;case 2102:;case 1130:;case 512:;case 2095:;case 3072:break;case 35:s=true;break;case 36:s=false;break;case 37:i.push(l);s=true;break;case 38:i.pop();s=false;break;default:if(n.T>0)i.push(l);else if(n.T<0)i.pop();else if(!s||t.WTF&&i[i.length-1]!=37)throw new Error("Unexpected record 0x"+l.toString(16));}});return a}function Hc(e,r){if(!r)return;var t=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(e){for(var a=e[0];a<=e[1];++a)if(r[a]!=null)++t});if(t==0)return;Da(e,615,on(t));[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(var a=t[0];a<=t[1];++a)if(r[a]!=null)Da(e,44,Sc(a,r[a]))});Da(e,616)}function Vc(e){var r=1;if(r==0)return;Da(e,611,on(r));Da(e,43,Oc({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}));Da(e,612)}function $c(e){var r=2;if(r==0)return;Da(e,603,on(r));Da(e,45,Fc({patternType:"none"}));Da(e,45,Fc({patternType:"gray125"}));Da(e,604)}function Xc(e){var r=1;if(r==0)return;Da(e,613,on(r));Da(e,46,Uc({}));Da(e,614)}function Gc(e){var r=1;Da(e,626,on(r));Da(e,47,Pc({numFmtId:0,fontId:0,fillId:0,borderId:0},65535));Da(e,627)}function jc(e,r){Da(e,617,on(r.length));r.forEach(function(r){Da(e,47,Pc(r,0))});Da(e,618)}function Kc(e){var r=1;Da(e,619,on(r));Da(e,48,Bc({xfId:0,builtinId:0,name:"Normal"}));Da(e,620)}function Yc(e){var r=0;Da(e,505,on(r));Da(e,506)}function Zc(e){var r=0;Da(e,508,Wc(r,"TableStyleMedium9","PivotStyleMedium4"));Da(e,509)}function Jc(){return}function qc(e,r){var t=Fa();Da(t,278);Hc(t,e.SSF);Vc(t,e);$c(t,e);Xc(t,e);Gc(t,e);jc(t,r.cellXfs);Kc(t,e);Yc(t,e);Zc(t,e);Jc(t,e);Da(t,279);return t.end()}var Qc=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function eh(e,r,t){r.themeElements.clrScheme=[];var a={};(e[0].match(ft)||[]).forEach(function(e){var n=ct(e);switch(n[0]){case"<a:clrScheme":;case"</a:clrScheme>":break;case"<a:srgbClr":a.rgb=n.val;break;case"</a:srgbClr>":break;case"<a:sysClr":a.rgb=n.lastClr;break;case"</a:sysClr>":break;case"</a:dk1>":;case"</a:lt1>":;case"<a:dk1>":;case"<a:lt1>":;case"<a:dk2>":;case"</a:dk2>":;case"<a:lt2>":;case"</a:lt2>":;case"<a:accent1>":;case"</a:accent1>":;case"<a:accent2>":;case"</a:accent2>":;case"<a:accent3>":;case"</a:accent3>":;case"<a:accent4>":;case"</a:accent4>":;case"<a:accent5>":;case"</a:accent5>":;case"<a:accent6>":;case"</a:accent6>":;case"<a:hlink>":;case"</a:hlink>":;case"<a:folHlink>":;case"</a:folHlink>
64885":if(n[0].charAt(1)==="/"){r.themeElements.clrScheme[Qc.indexOf(n[0])]=a;a={}}else{a.name=n[0].slice(3,n[0].length-1)}break;default:if(t&&t.WTF)throw new Error("Unrecognized "+n[0]+" in clrScheme");}})}function rh(){}function th(){}function ah(e,r,t){r.themeElements={};var a;if(!(a=Br(e,"a:clrScheme")))throw new Error("clrScheme not found in themeElements");eh(a,r,t);if(!(a=Br(e,"a:fontScheme")))throw new Error("fontScheme not found in themeElements");rh(a,r,t);if(!(a=Br(e,"a:fmtScheme")))throw new Error("fmtScheme not found in themeElements");th(a,r,t)}function nh(e,r){if(!e||e.length===0)e=ih();var t;var a={};if(!(t=Br(e,"a:themeElements")))throw new Error("themeElements not found in theme");ah(t[0],a,r);a.raw=e;return a}function ih
vendor: 10,127 bytes, line 64885
64885(e,r){if(r&&r.themeXLSX)return r.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var t=[at];t[t.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">';t[t.length]="<a:themeElements>";t[t.length]='<a:clrScheme name="Office">';t[t.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>';t[t.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>';t[t.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>';t[t.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>';t[t.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>';t[t.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>';t[t.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>';t[t.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>';t[t.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>';t[t.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>';t[t.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>';t[t.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>';t[t.length]="</a:clrScheme>";t[t.length]='<a:fontScheme name="Office">';t[t.length]="<a:majorFont>";t[t.length]='<a:latin typeface="Cambria"/>';t[t.length]='<a:ea typeface=""/>';t[t.length]='<a:cs typeface=""/>';t[t.length]='<a:font script="Jpan" typeface="ï¼ï¼³ ï¼°ã´ã·ãã¯"/>';t[t.length]='<a:font script="Hang" typeface="ë§ì ê³ ë"/>';t[t.length]='<a:font script="Hans" typeface="å®ä½"/>';t[t.length]='<a:font script="Hant" typeface="æ°ç´°æé«"/>';t[t.length]='<a:font script="Arab" typeface="Times New Roman"/>';t[t.length]='<a:font script="Hebr" typeface="Times New Roman"/>';t[t.length]='<a:font script="Thai" typeface="Tahoma"/>';t[t.length]='<a:font script="Ethi" typeface="Nyala"/>';t[t.length]='<a:font script="Beng" typeface="Vrinda"/>';t[t.length]='<a:font script="Gujr" typeface="Shruti"/>';t[t.length]='<a:font script="Khmr" typeface="MoolBoran"/>';t[t.length]='<a:font script="Knda" typeface="Tunga"/>';t[t.length]='<a:font script="Guru" typeface="Raavi"/>';t[t.length]='<a:font script="Cans" typeface="Euphemia"/>';t[t.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>';t[t.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>';t[t.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>';t[t.length]='<a:font script="Thaa" typeface="MV Boli"/>';t[t.length]='<a:font script="Deva" typeface="Mangal"/>';t[t.length]='<a:font script="Telu" typeface="Gautami"/>';t[t.length]='<a:font script="Taml" typeface="Latha"/>';t[t.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>';t[t.length]='<a:font script="Orya" typeface="Kalinga"/>';t[t.length]='<a:font script="Mlym" typeface="Kartika"/>';t[t.length]='<a:font script="Laoo" typeface="DokChampa"/>';t[t.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>';t[t.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>';t[t.length]='<a:font script="Viet" typeface="Times New Roman"/>';t[t.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>';t[t.length]='<a:font script="Geor" typeface="Sylfaen"/>';t[t.length]="</a:majorFont>";t[t.length]="<a:minorFont>";t[t.length]='<a:latin typeface="Calibri"/>';t[t.length]='<a:ea typeface=""/>';t[t.length]='<a:cs typeface=""/>';t[t.length]='<a:font script="Jpan" typeface="ï¼ï¼³ ï¼°ã´ã·ãã¯"/>';t[t.length]='<a:font script="Hang" typeface="ë§ì ê³ ë"/>';t[t.length]='<a:font script="Hans" typeface="å®ä½"/>';t[t.length]='<a:font script="Hant" typeface="æ°ç´°æé«"/>';t[t.length]='<a:font script="Arab" typeface="Arial"/>';t[t.length]='<a:font script="Hebr" typeface="Arial"/>';t[t.length]='<a:font script="Thai" typeface="Tahoma"/>';t[t.length]='<a:font script="Ethi" typeface="Nyala"/>';t[t.length]='<a:font script="Beng" typeface="Vrinda"/>';t[t.length]='<a:font script="Gujr" typeface="Shruti"/>';t[t.length]='<a:font script="Khmr" typeface="DaunPenh"/>';t[t.length]='<a:font script="Knda" typeface="Tunga"/>';t[t.length]='<a:font script="Guru" typeface="Raavi"/>';t[t.length]='<a:font script="Cans" typeface="Euphemia"/>';t[t.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>';t[t.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>';t[t.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>';t[t.length]='<a:font script="Thaa" typeface="MV Boli"/>';t[t.length]='<a:font script="Deva" typeface="Mangal"/>';t[t.length]='<a:font script="Telu" typeface="Gautami"/>';t[t.length]='<a:font script="Taml" typeface="Latha"/>';t[t.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>';t[t.length]='<a:font script="Orya" typeface="Kalinga"/>';t[t.length]='<a:font script="Mlym" typeface="Kartika"/>';t[t.length]='<a:font script="Laoo" typeface="DokChampa"/>';t[t.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>';t[t.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>';t[t.length]='<a:font script="Viet" typeface="Arial"/>';t[t.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>';t[t.length]='<a:font script="Geor" typeface="Sylfaen"/>';t[t.length]="</a:minorFont>";t[t.length]="</a:fontScheme>";t[t.length]='<a:fmtScheme name="Office">';t[t.length]="<a:fillStyleLst>";t[t.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>';t[t.length]='<a:gradFill rotWithShape="1">';t[t.length]="<a:gsLst>";t[t.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>';t[t.length]="</a:gsLst>";t[t.length]='<a:lin ang="16200000" scaled="1"/>';t[t.length]="</a:gradFill>";t[t.length]='<a:gradFill rotWithShape="1">';t[t.length]="<a:gsLst>";t[t.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>';t[t.length]="</a:gsLst>";t[t.length]='<a:lin ang="16200000" scaled="0"/>';t[t.length]="</a:gradFill>";t[t.length]="</a:fillStyleLst>";t[t.length]="<a:lnStyleLst>";t[t.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>';t[t.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>';t[t.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>';t[t.length]="</a:lnStyleLst>";t[t.length]="<a:effectStyleLst>";t[t.length]="<a:effectStyle>";t[t.length]="<a:effectLst>";t[t.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>';t[t.length]="</a:effectLst>";t[t.length]="</a:effectStyle>";t[t.length]="<a:effectStyle>";t[t.length]="<a:effectLst>";t[t.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>';t[t.length]="</a:effectLst>";t[t.length]="</a:effectStyle>";t[t.length]="<a:effectStyle>";t[t.length]="<a:effectLst>";t[t.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>';t[t.length]="</a:effectLst>";t[t.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>';t[t.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>';t[t.length]="</a:effectStyle>";t[t.length]="</a:effectStyleLst>";t[t.length]="<a:bgFillStyleLst>";t[t.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>';t[t.length]='<a:gradFill rotWithShape="1">';t[t.length]="<a:gsLst>";t[t.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>';t[t.length]="</a:gsLst>";t[t.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>';t[t.length]="</a:gradFill>";t[t.length]='<a:gradFill rotWithShape="1">';t[t.length]="<a:gsLst>";t[t.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>';t[t.length]="</a:gsLst>";t[t.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>';t[t.length]="</a:gradFill>";t[t.length]="</a:bgFillStyleLst>";t[t.length]="</a:fmtScheme>";t[t.length]="</a:themeElements>";t[t.length]="<a:objectDefaults>";t[t.length]="<a:spDef>";t[t.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>';t[t.length]="</a:spDef>";t[t.length]="<a:lnDef>";t[t.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>';t[t.length]="</a:lnDef>";t[t.length]="</a:objectDefaults>";t[t.length]="<a:extraClrSchemeLst/>";t[t.length]="</a:theme>";return t.join("")}function
vendor: 2,583 bytes, line 64885
64885sh(e,r,t){var a=e.l+r;var n=e._R(4);if(n===124226)return;if(!t.cellStyles){e.l=a;return}var i=e.slice(e.l);e.l=a;var s;try{s=rt(i,{type:"array"})}catch(f){return}var l=Zr(s,"theme/theme/theme1.xml",true);if(!l)return;return nh(l,t)}function fh(e){return e._R(4)}function lh(e){var r={};r.xclrType=e._R(2);r.nTintShade=e._R(2);switch(r.xclrType){case 0:e.l+=4;break;case 1:r.xclrValue=oh(e,4);break;case 2:r.xclrValue=Ws(e,4);break;case 3:r.xclrValue=fh(e,4);break;case 4:e.l+=4;break;}e.l+=8;return r}function oh(e,r){return Ia(e,r)}function ch(e,r){return Ia(e,r)}function hh(e){var r=e._R(2);var t=e._R(2)-4;var a=[r];switch(r){case 4:;case 5:;case 7:;case 8:;case 9:;case 10:;case 11:;case 13:a[1]=lh(e,t);break;case 6:a[1]=ch(e,t);break;case 14:;case 15:a[1]=e._R(t===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+r+" "+t);}return a}function uh(e,r){var t=e.l+r;e.l+=2;var a=e._R(2);e.l+=2;var n=e._R(2);var i=[];while(n-- >0)i.push(hh(e,t-e.l));return{ixfe:a,ext:i}}function dh(e,r){r.forEach(function(e){switch(e[0]){case 4:break;case 5:break;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:break;case 13:break;case 14:break;case 15:break;}})}function vh(e,r){return{flags:e._R(4),version:e._R(4),name:cn(e,r-8)}}function ph(e){var r=Ra(12+2*e.name.length);r._W(4,e.flags);r._W(4,e.version);hn(e.name,r);return r.slice(0,r.l)}function mh(e){var r=[];var t=e._R(4);while(t-- >0)r.push([e._R(4),e._R(4)]);return r}function gh(e){var r=Ra(4+8*e.length);r._W(4,e.length);for(var t=0;t<e.length;++t){r._W(4,e[t][0]);r._W(4,e[t][1])}return r}function bh(e,r){var t=Ra(8+2*r.length);t._W(4,e);hn(r,t);return t.slice(0,t.l)}function wh(e){e.l+=4;return e._R(4)!=0}function kh(e,r){var t=Ra(8);t._W(4,e);t._W(4,r?1:0);return t}function Ah(e,r,t){var a={Types:[],Cell:[],Value:[]};var n=t||{};var i=[];var s=false;var f=2;Na(e,function(e,r,t){switch(t){case 335:a.Types.push({name:e.name});break;case 51:e.forEach(function(e){if(f==1)a.Cell.push({type:a.Types[e[0]-1].name,index:e[1]});else if(f==0)a.Value.push({type:a.Types[e[0]-1].name,index:e[1]})});break;case 337:f=e?1:0;break;case 338:f=2;break;case 35:i.push(t);s=true;break;case 36:i.pop();s=false;break;default:if(r.T){}else if(!s||n.WTF&&i[i.length-1]!=35)throw new Error("Unexpected record 0x"+t.toString(16));}});return a}function Th(){var e=Fa();Da(e,332);Da(e,334,on(1));Da(e,335,ph({name:"XLDAPR",version:12e4,flags:3496657072}));Da(e,336);Da(e,339,bh(1,"XLDAPR"));Da(e,52);Da(e,35,on(514));Da(e,4096,on(0));Da(e,4097,As(1));Da(e,36);Da(e,53);Da(e,340);Da(e,337,kh(1,true));
vendor: 20,142 bytes, lines 64885-64886
64885Da(e,51,gh([[1,0]]));Da(e,338);Da(e,333);return e.end()}function yh(e,r,t){var a={Types:[],Cell:[],Value:[]};if(!e)return a;var n=false;var i=2;var s;e.replace(ft,function(e){var r=ct(e);switch(ut(r[0])){case"<?xml":break;case"<metadata":;case"</metadata>":break;case"<metadataTypes":;case"</metadataTypes>":break;case"<metadataType":a.Types.push({name:r.name});break;case"</metadataType>":break;case"<futureMetadata":for(var f=0;f<a.Types.length;++f)if(a.Types[f].name==r.name)s=a.Types[f];break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":if(i==1)a.Cell.push({type:a.Types[r.t-1].name,index:+r.v});else if(i==0)a.Value.push({type:a.Types[r.t-1].name,index:+r.v});break;case"</rc>":break;case"<cellMetadata":i=1;break;case"</cellMetadata>":i=2;break;case"<valueMetadata":i=0;break;case"</valueMetadata>":i=2;break;case"<extLst":;case"<extLst>":;case"</extLst>":;case"<extLst/>":break;case"<ext":n=true;break;case"</ext>":n=false;break;case"<rvb":if(!s)break;if(!s.offsets)s.offsets=[];s.offsets.push(+r.i);break;default:if(!n&&(t==null?void 0:t.WTF))throw new Error("unrecognized "+r[0]+" in metadata");}return e});return a}function Eh(){var e=[at];e.push('<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">\n <metadataTypes count="1">\n <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>\n </metadataTypes>\n <futureMetadata name="XLDAPR" count="1">\n <bk>\n <extLst>\n <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">\n <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>\n </ext>\n </extLst>\n </bk>\n </futureMetadata>\n <cellMetadata count="1">\n <bk>\n <rc t="1" v="0"/>\n </bk>\n </cellMetadata>\n</metadata>');return e.join("")}function Ch(e){var r=[];if(!e)return r;var t=1;(e.match(ft)||[]).forEach(function(e){var a=ct(e);switch(a[0]){case"<?xml":break;case"<calcChain":;case"<calcChain>":;case"</calcChain>":break;case"<c":delete a[0];if(a.i)t=a.i;else a.i=t;r.push(a);break;}});return r}function _h(e){var r={};r.i=e._R(4);var t={};t.r=e._R(4);t.c=e._R(4);r.r=Ya(t);var a=e._R(1);if(a&2)r.l="1";if(a&8)r.a="1";return r}function Sh(e,r,t){var a=[];var n=false;Na(e,function i(e,r,s){switch(s){case 63:a.push(e);break;default:if(r.T){}else if(!n||t.WTF)throw new Error("Unexpected record 0x"+s.toString(16));}});return a}function xh(){}function Oh(e,r,t,a){if(!e)return e;var n=a||{};var i=false,s=false;Na(e,function f(e,r,t){if(s)return;switch(t){case 359:;case 363:;case 364:;case 366:;case 367:;case 368:;case 369:;case 370:;case 371:;case 472:;case 577:;case 578:;case 579:;case 580:;case 581:;case 582:;case 583:;case 584:;case 585:;case 586:;case 587:break;case 35:i=true;break;case 36:i=false;break;default:if(r.T){}else if(!i||n.WTF)throw new Error("Unexpected record 0x"+t.toString(16));}},n)}function Ih(e,r){if(!e)return"??";var t=(e.match(/<c:chart [^<>]*r:id="([^<>"]*)"/)||["",""])[1];return r["!id"][t].Target}function Rh(e,r,t){var a=0; 64886(zr(e,"shape")||[]).forEach(function(e){var n="";var i=true;var s=-1;var f=-1,l=-1;e.replace(ft,function(r,t){var a=ct(r);switch(ut(a[0])){case"<ClientData":if(a.ObjectType)n=a.ObjectType;break;case"<Visible":;case"<Visible/>":i=false;break;case"<Row":;case"<Row>":s=t+r.length;break;case"</Row>":f=+e.slice(s,t).trim();break;case"<Column":;case"<Column>":s=t+r.length;break;case"</Column>":l=+e.slice(s,t).trim();break;}return""});switch(n){case"Note":var o=Hk(r,f>=0&&l>=0?Ya({r:f,c:l}):t[a].ref);if(o.c){o.c.hidden=i}++a;break;}})}function Nh(e,r,t){var a=[21600,21600];var n=["m0,0l0",a[1],a[0],a[1],a[0],"0xe"].join(",");var i=[Bt("xml",null,{"xmlns:v":Gt.v,"xmlns:o":Gt.o,"xmlns:x":Gt.x,"xmlns:mv":Gt.mv}).replace(/\/>/,">"),Bt("o:shapelayout",Bt("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"})];var s=65536*e;var f=r||[];if(f.length>0)i.push(Bt("v:shapetype",[Bt("v:stroke",null,{joinstyle:"miter"}),Bt("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202",coordsize:a.join(","),"o:spt":202,path:n}));f.forEach(function(e){++s;i.push(Fh(e,s))});i.push("</xml>");return i.join("")}function Fh(e,r,t){var a=Ka(e[0]);var n={color2:"#BEFF82",type:"gradient"};if(n.type=="gradient")n.angle="-180";var i=n.type=="gradient"?Bt("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null;var s=Bt("v:fill",i,n);var f={on:"t",obscured:"t"};return["<v:shape"+Ut({id:"_x0000_s"+r,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(e[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",s,Bt("v:shadow",null,f),Bt("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",Mt("x:Anchor",[a.c+1,0,a.r+1,0,a.c+3,20,a.r+5,20].join(",")),Mt("x:AutoFill","False"),Mt("x:Row",String(a.r)),Mt("x:Column",String(a.c)),e[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"].join("")}function Dh(e,r,t,a){var n=e["!data"]!=null;var i;r.forEach(function(r){var s=Ka(r.ref);if(s.r<0||s.c<0)return;if(n){if(!e["!data"][s.r])e["!data"][s.r]=[];i=e["!data"][s.r][s.c]}else i=e[r.ref];if(!i){i={t:"z"};if(n)e["!data"][s.r][s.c]=i;else e[r.ref]=i;var f=en(e["!ref"]||"BDWGO1000001:A1");if(f.s.r>s.r)f.s.r=s.r;if(f.e.r<s.r)f.e.r=s.r;if(f.s.c>s.c)f.s.c=s.c;if(f.e.c<s.c)f.e.c=s.c;var l=Ja(f);e["!ref"]=l}if(!i.c)i.c=[];var o={a:r.author,t:r.t,r:r.r,T:t};if(r.h)o.h=r.h;for(var c=i.c.length-1;c>=0;--c){if(!t&&i.c[c].T)return;if(t&&!i.c[c].T)i.c.splice(c,1)}if(t&&a)for(c=0;c<a.length;++c){if(o.a==a[c].id){o.a=a[c].name||o.a;break}}i.c.push(o)})}function Ph(e,r){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var t=[];var a=[];var n=Wr(e,"authors");if(n&&n[1])n[1].split(/<\/\w*:?author>/).forEach(function(e){if(e===""||e.trim()==="")return;var r=e.match(/<(?:\w+:)?author[^<>]*>(.*)/);if(r)t.push(r[1])});var i=Wr(e,"commentList");if(i&&i[1])i[1].split(/<\/\w*:?comment>/).forEach(function(e){if(e===""||e.trim()==="")return;var n=e.match(/<(?:\w+:)?comment[^<>]*>/);if(!n)return;var i=ct(n[0]);var s={author:i.authorId&&t[i.authorId]||"sheetjsghost",ref:i.ref,guid:i.guid};var f=Ka(i.ref);if(r.sheetRows&&r.sheetRows<=f.r)return;var l=Wr(e,"text");var o=!!l&&!!l[1]&&co(l[1])||{r:"",t:"",h:""};s.r=o.r;if(o.r=="<t></t>")o.t=o.h="";s.t=(o.t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(r.cellHTML)s.h=o.h;a.push(s)});return a}function Lh(e){var r=[at,Bt("comments",null,{xmlns:Xt[0]})];var t=[];r.push("<authors>");e.forEach(function(e){e[1].forEach(function(e){var a=bt(e.a);if(t.indexOf(a)==-1){t.push(a);r.push("<author>"+a+"</author>")}if(e.T&&e.ID&&t.indexOf("tc="+e.ID)==-1){t.push("tc="+e.ID);r.push("<author>"+"tc="+e.ID+"</author>")}})});if(t.length==0){t.push("SheetJ5");r.push("<author>SheetJ5</author>")}r.push("</authors>");r.push("<commentList>");e.forEach(function(e){var a=0,n=[],i=0;if(e[1][0]&&e[1][0].T&&e[1][0].ID)a=t.indexOf("tc="+e[1][0].ID);e[1].forEach(function(e){if(e.a)a=t.indexOf(bt(e.a));if(e.T)++i;n.push(e.t==null?"":bt(e.t))});if(i===0){e[1].forEach(function(a){r.push('<comment ref="'+e[0]+'" authorId="'+t.indexOf(bt(a.a))+'"><text>');r.push(Mt("t",a.t==null?"":bt(a.t)));r.push("</text></comment>")})}else{if(e[1][0]&&e[1][0].T&&e[1][0].ID)a=t.indexOf("tc="+e[1][0].ID);r.push('<comment ref="'+e[0]+'" authorId="'+a+'"><text>');var s="Comment:\n "+n[0]+"\n";for(var f=1;f<n.length;++f)s+="Reply:\n "+n[f]+"\n";r.push(Mt("t",bt(s)));r.push("</text></comment>")}});r.push("</commentList>");if(r.length>2){r[r.length]="</comments>";r[1]=r[1].replace("/>",">")}return r.join("")}function Mh(e,r){var t=[];var a=false,n={},i=0;e.replace(ft,function s(f,l){var o=ct(f);switch(ut(o[0])){case"<?xml":break;case"<ThreadedComments":break;case"</ThreadedComments>":break;case"<threadedComment":n={author:o.personId,guid:o.id,ref:o.ref,T:1};break;case"</threadedComment>":if(n.t!=null)t.push(n);break;case"<text>":;case"<text":i=l+f.length;break;case"</text>":n.t=e.slice(i,l).replace(/\r\n/g,"\n").replace(/\r/g,"\n");break;case"<mentions":;case"<mentions>":a=true;break;case"</mentions>":a=false;break;case"<extLst":;case"<extLst>":;case"</extLst>":;case"<extLst/>":break;case"<ext":a=true;break;case"</ext>":a=false;break;default:if(!a&&r.WTF)throw new Error("unrecognized "+o[0]+" in threaded comments");}return f});return t}function Uh(e,r,t){var a=[at,Bt("ThreadedComments",null,{xmlns:$t.TCMNT}).replace(/[\/]>/,">")];e.forEach(function(e){var n="";(e[1]||[]).forEach(function(i,s){if(!i.T){delete i.ID;return}if(i.a&&r.indexOf(i.a)==-1)r.push(i.a);var f={ref:e[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+t.tcid++).slice(-12)+"}"};if(s==0)n=f.id;else f.parentId=n;i.ID=f.id;if(i.a)f.personId="{54EE7950-7262-4200-6969-"+("000000000000"+r.indexOf(i.a)).slice(-12)+"}";a.push(Bt("threadedComment",Mt("text",i.t||""),f))})});a.push("</ThreadedComments>");return a.join("")}function Bh(e,r){var t=[];var a=false;e.replace(ft,function n(e){var n=ct(e);switch(ut(n[0])){case"<?xml":break;case"<personList":break;case"</personList>":break;case"<person":t.push({name:n.displayname,id:n.id});break;case"</person>":break;case"<extLst":;case"<extLst>":;case"</extLst>":;case"<extLst/>":break;case"<ext":a=true;break;case"</ext>":a=false;break;default:if(!a&&r.WTF)throw new Error("unrecognized "+n[0]+" in threaded comments");}return e});return t}function Wh(e){var r=[at,Bt("personList",null,{xmlns:$t.TCMNT,"xmlns:x":Xt[0]}).replace(/[\/]>/,">")];e.forEach(function(e,t){r.push(Bt("person",null,{displayName:e,id:"{54EE7950-7262-4200-6969-"+("000000000000"+t).slice(-12)+"}",userId:e,providerId:"None"}))});r.push("</personList>");return r.join("")}function zh(e){var r={};r.iauthor=e._R(4);var t=Fn(e,16);r.rfx=t.s;r.ref=Ya(t.s);e.l+=16;return r}function Hh(e,r){if(r==null)r=Ra(36);r._W(4,e[1].iauthor);Dn(e[0],r);r._W(4,0);r._W(4,0);r._W(4,0);r._W(4,0);return r}var Vh=cn;function $h(e){return hn(e.slice(0,54))}function Xh(e,r){var t=[];var a=[];var n={};var i=false;Na(e,function s(e,f,l){switch(l){case 632:a.push(e);break;case 635:n=e;break;case 637:n.t=e.t;n.h=e.h;n.r=e.r;break;case 636:n.author=a[n.iauthor];delete n.iauthor;if(r.sheetRows&&n.rfx&&r.sheetRows<=n.rfx.r)break;if(!n.t)n.t="";delete n.rfx;t.push(n);break;case 3072:break;case 35:i=true;break;case 36:i=false;break;case 37:break;case 38:break;default:if(f.T){}else if(!i||r.WTF)throw new Error("Unexpected record 0x"+l.toString(16));}});return t}function Gh(e){var r=Fa();var t=[];Da(r,628);Da(r,630);e.forEach(function(e){e[1].forEach(function(e){if(t.indexOf(e.a)>-1)return;t.push(e.a.slice(0,54));Da(r,632,$h(e.a));if(e.T&&e.ID&&t.indexOf("tc="+e.ID)==-1){t.push("tc="+e.ID);Da(r,632,$h("tc="+e.ID))}})});Da(r,631);Da(r,633);e.forEach(function(e){e[1].forEach(function(a){var n=-1;if(a.ID)n=t.indexOf("tc="+a.ID);if(n==-1&&e[1][0].T&&e[1][0].ID)n=t.indexOf("tc="+e[1][0].ID);if(n==-1)n=t.indexOf(a.a);a.iauthor=n;var i={s:Ka(e[0]),e:Ka(e[0])};Da(r,635,Hh([i,a]));if(a.t&&a.t.length>0)Da(r,637,gn(a));Da(r,636);delete a.iauthor})});Da(r,634);Da(r,629);return r.end()}var jh="application/vnd.ms-office.vbaProject";function Kh(e){var r=Qe.utils.cfb_new({root:"R"});e.FullPaths.forEach(function(t,a){if(t.slice(-1)==="/"||!t.match(/_VBA_PROJECT_CUR/))return;var n=t.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");Qe.utils.cfb_add(r,n,e.FileIndex[a].content)});return Qe.write(r)}function Yh(e,r){r.FullPaths.forEach(function(t,a){if(a==0)return;var n=t.replace(/^[\/]*[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");if(n.slice(-1)!=="/")Qe.utils.cfb_add(e,n,r.FileIndex[a].content)})}var Zh=["xlsb","xlsm","xlam","biff8","xla"];function Jh(){return{"!type":"dialog"}}function qh(){return{"!type":"dialog"}}function Qh(){return{"!type":"macro"}}function eu(){return{"!type":"macro"}}var ru=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g;var r={r:0,c:0};function t(e,t,a,n){var i=false,s=false;if(a.length==0)s=true;else if(a.charAt(0)=="["){s=true;a=a.slice(1,-1)}if(n.length==0)i=true;else if(n.charAt(0)=="["){i=true;n=n.slice(1,-1)}var f=a.length>0?parseInt(a,10)|0:0,l=n.length>0?parseInt(n,10)|0:0;if(i)l+=r.c;else--l;if(s)f+=r.r;else--f;return t+(i?"":"$")+$a(l)+(s?"":"$")+Wa(f)}return function a(n,i){r=i;return n.replace(e,t)}}();var tu=/(^|[^._A-Z0-9])(\$?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])(\$?)(\d{1,7})(?![_.\(A-Za-z0-9])/g;try{tu=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g}catch(au){}var nu=function(){return function e(r,t){return r.replace(tu,function(e,r,a,n,i,s){var f=Va(n)-(a?0:t.c);var l=Ba(s)-(i?0:t.r);var o=i=="$"?l+1:l==0?"":"["+l+"]";var c=a=="$"?f+1:f==0?"":"["+f+"]";return r+"R"+o+"C"+c})}}();function iu(e,r){return e.replace(tu,function(e,t,a,n,i,s){return t+(a=="$"?a+n:$a(Va(n)+r.c))+(i=="$"?i+s:Wa(Ba(s)+r.r))})}function su(e,r,t){var a=Za(r),n=a.s,i=Ka(t);var s={r:i.r-n.r,c:i.c-n.c};return iu(e,s)}function fu(e){if(e.length==1)return false;return true}function lu(e){return e.replace(/_xlfn\./g,"")}function ou(e){e.l+=1;return}function cu(e,r){var t=e._R(r==1?1:2);return[t&16383,t>>14&1,t>>15&1]}function hu(e,r,t){var a=2;if(t){if(t.biff>=2&&t.biff<=5)return uu(e,r,t);else if(t.biff==12)a=4}var n=e._R(a),i=e._R(a);var s=cu(e,2);var f=cu(e,2);return{s:{r:n,c:s[0],cRel:s[1],rRel:s[2]},e:{r:i,c:f[0],cRel:f[1],rRel:f[2]}}}function uu(e){var r=cu(e,2),t=cu(e,2);var a=e._R(1);var n=e._R(1);return{s:{r:r[0],c:a,cRel:r[1],rRel:r[2]},e:{r:t[0],c:n,cRel:t[1],rRel:t[2]}}}function du(e,r,t){if(t.biff<8)return uu(e,r,t);var a=e._R(t.biff==12?4:2),n=e._R(t.biff==12?4:2);var i=cu(e,2);var s=cu(e,2);return{s:{r:a,c:i[0],cRel:i[1],rRel:i[2]},e:{r:n,c:s[0],cRel:s[1],rRel:s[2]}}}function vu(e,r,t){if(t&&t.biff>=2&&t.biff<=5)return pu(e,r,t);var a=e._R(t&&t.biff==12?4:2);var n=cu(e,2);return{r:a,c:n[0],cRel:n[1],rRel:n[2]}}function pu(e){var r=cu(e,2);var t=e._R(1);return{r:r[0],c:t,cRel:r[1],rRel:r[2]}}function mu(e){var r=e._R(2);var t=e._R(2);return{r:r,c:t&255,fQuoted:!!(t&16384),cRel:t>>15,rRel:t>>15}}function gu(e,r,t){var a=t&&t.biff?t.biff:8;if(a>=2&&a<=5)return bu(e,r,t);var n=e._R(a>=12?4:2);var i=e._R(2);var s=(i&16384)>>14,f=(i&32768)>>15;i&=16383;if(f==1)while(n>524287)n-=1048576;if(s==1)while(i>8191)i=i-16384;return{r:n,c:i,cRel:s,rRel:f}}function bu(e){var r=e._R(2);var t=e._R(1);var a=(r&32768)>>15,n=(r&16384)>>14;r&=16383;if(a==1&&r>=8192)r=r-16384;if(n==1&&t>=128)t=t-256;return{r:r,c:t,cRel:n,rRel:a}}function wu(e,r,t){var a=(e[e.l++]&96)>>5;var n=hu(e,t.biff>=2&&t.biff<=5?6:8,t);return[a,n]}function ku(e,r,t){var a=(e[e.l++]&96)>>5;var n=e._R(2,"i");var i=8;if(t)switch(t.biff){case 5:e.l+=12;i=6;break;case 12:i=12;break;}var s=hu(e,i,t);return[a,n,s]}function Au(e,r,t){var a=(e[e.l++]&96)>>5;e.l+=t&&t.biff>8?12:t.biff<8?6:8;return[a]}function Tu(e,r,t){var a=(e[e.l++]&96)>>5;var n=e._R(2);var i=8;if(t)switch(t.biff){case 5:e.l+=12;i=6;break;case 12:i=12;break;}e.l+=i;return[a,n]}function yu(e,r,t){var a=(e[e.l++]&96)>>5;var n=du(e,r-1,t);return[a,n]}function Eu(e,r,t){var a=(e[e.l++]&96)>>5;e.l+=t.biff==2?6:t.biff==12?14:7;return[a]}function Cu(e){var r=e[e.l+1]&1;var t=1;e.l+=4;return[r,t]}function _u(e,r,t){e.l+=2;var a=e._R(t&&t.biff==2?1:2);var n=[];for(var i=0;i<=a;++i)n.push(e._R(t&&t.biff==2?1:2));return n}function Su(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=2;return[a,e._R(t&&t.biff==2?1:2)]}function xu(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=2;return[a,e._R(t&&t.biff==2?1:2)]}function Ou(e){var r=e[e.l+1]&255?1:0;e.l+=2;return[r,e._R(2)]}function Iu(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=t&&t.biff==2?3:4;return[a]}function Ru(e){var r=e._R(1),t=e._R(1);return[r,t]}function Nu(e){e._R(2);return Ru(e,2)}function Fu(e){e._R(2);return Ru(e,2)}function Du(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=vu(e,0,t);return[a,n]}function Pu(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=gu(e,0,t);return[a,n]}function Lu(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=e._R(2);if(t&&t.biff==5)e.l+=12;var i=vu(e,0,t);return[a,n,i]}function Mu(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=e._R(t&&t.biff<=3?1:2);return[hv[n],cv[n],a]}function Uu(e,r,t){var a=e[e.l++];var n=e._R(1),i=t&&t.biff<=3?[a==88?-1:0,e._R(1)]:Bu(e);return[n,(i[0]===0?cv:ov)[i[1]]]}function Bu(e){return[e[e.l+1]>>7,e._R(2)&32767]}function Wu(e,r,t){e.l+=t&&t.biff==2?3:4;return}function zu(e,r,t){e.l++;if(t&&t.biff==12)return[e._R(4,"i"),0];var a=e._R(2);var n=e._R(t&&t.biff==2?1:2);return[a,n]}function Hu(e){e.l++;return ci[e._R(1)]}function Vu(e){e.l++;return e._R(2)}function $u(e){e.l++;return e._R(1)!==0}function Xu(e){e.l++;return Pn(e,8)}function Gu(e,r,t){e.l++;return Cs(e,r-1,t)}function ju(e,r){var t=[e._R(1)];if(r==12)switch(t[0]){case 2:t[0]=4;break;case 4:t[0]=16;break;case 0:t[0]=1;break;case 1:t[0]=2;break;}switch(t[0]){case 4:t[1]=bs(e,1)?"TRUE":"FALSE";if(r!=12)e.l+=7;break;case 37:;case 16:t[1]=ci[e[e.l]];e.l+=r==12?4:8;break;case 0:e.l+=8;break;case 1:t[1]=Pn(e,8);break;case 2:t[1]=Is(e,0,{biff:r>0&&r<8?2:r});break;default:throw new Error("Bad SerAr: "+t[0]);}return t}function Ku(e,r,t){var a=e._R(t.biff==12?4:2);var n=[];for(var i=0;i!=a;++i)n.push((t.biff==12?Fn:Ys)(e,8));return n}function Yu(e,r,t){var a=0,n=0;if(t.biff==12){a=e._R(4);n=e._R(4)}else{n=1+e._R(1);a=1+e._R(2)}if(t.biff>=2&&t.biff<8){--a;if(--n==0)n=256}for(var i=0,s=[];i!=a&&(s[i]=[]);++i)for(var f=0;f!=n;++f)s[i][f]=ju(e,t.biff);return s}function Zu(e,r,t){var a=e._R(1)>>>5&3;var n=!t||t.biff>=8?4:2;var i=e._R(n);switch(t.biff){case 2:e.l+=5;break;case 3:;case 4:e.l+=8;break;case 5:e.l+=12;break;}return[a,0,i]}function Ju(e,r,t){if(t.biff==5)return qu(e,r,t);var a=e._R(1)>>>5&3;var n=e._R(2);var i=e._R(4);return[a,n,i]}function qu(e){var r=e._R(1)>>>5&3;var t=e._R(2,"i");e.l+=8;var a=e._R(2);e.l+=12;return[r,t,a]}function Qu(e,r,t){var a=e._R(1)>>>5&3;e.l+=t&&t.biff==2?3:4;var n=e._R(t&&t.biff==2?1:2);return[a,n]}function ed(e,r,t){var a=e._R(1)>>>5&3;var n=e._R(t&&t.biff==2?1:2);return[a,n]}function rd(e,r,t){var a=e._R(1)>>>5&3;e.l+=4;if(t.biff<8)e.l--;if(t.biff==12)e.l+=2;return[a]}function td(e,r,t){var a=(e[e.l++]&96)>>5;var n=e._R(2);var i=4;if(t)switch(t.biff){case 5:i=15;break;case 12:i=6;break;}e.l+=i;return[a,n]}var ad=Ia;var nd=Ia;var id=Ia;function sd(e,r,t){e.l+=2;return[mu(e,4,t)]}function fd(e){e.l+=6;return[]}var ld=sd;var od=fd;var cd=fd;var hd=sd;function ud(e){e.l+=2;return[ks(e),e._R(2)&1]}var dd=sd;var vd=ud;var pd=fd;var md=sd;var gd=sd;var bd=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function wd(e){e.l+=2;var r=e._R(2);var t=e._R(2);var a=e._R(4);var n=e._R(2);var i=e._R(2);var s=bd[t>>2&31];return{ixti:r,coltype:t&3,rt:s,idx:a,c:n,C:i}}function kd(e){e.l+=2;return[e._R(4)]}function Ad(e,r,t){e.l+=5;e.l+=2;e.l+=t.biff==2?1:4;return["PTGSHEET"]}function Td(e,r,t){e.l+=t.biff==2?4:5;return["PTGENDSHEET"]}function yd(e){var r=e._R(1)>>>5&3;var t=e._R(2);return[r,t]}function Ed(e){var r=e._R(1)>>>5&3;var t=e._R(2);return[r,t]}function Cd(e){e.l+=4;return[0,0]}var _d={1:{n:"PtgExp",f:zu},2:{n:"PtgTbl",f:id},3:{n:"PtgAdd",f:ou},4:{n:"PtgSub",f:ou},5:{n:"PtgMul",f:ou},6:{n:"PtgDiv",f:ou},7:{n:"PtgPower",f:ou},8:{n:"PtgConcat",f:ou},9:{n:"PtgLt",f:ou},10:{n:"PtgLe",f:ou},11:{n:"PtgEq",f:ou},12:{n:"PtgGe",f:ou},13:{n:"PtgGt",f:ou},14:{n:"PtgNe",f:ou},15:{n:"PtgIsect",f:ou},16:{n:"PtgUnion",f:ou},17:{n:"PtgRange",f:ou},18:{n:"PtgUplus",f:ou},19:{n:"PtgUminus",f:ou},20:{n:"PtgPercent",f:ou},21:{n:"PtgParen",f:ou},22:{n:"PtgMissArg",f:ou},23:{n:"PtgStr",f:Gu},26:{n:"PtgSheet",f:Ad},27:{n:"PtgEndSheet",f:Td},28:{n:"PtgErr",f:Hu},29:{n:"PtgBool",f:$u},30:{n:"PtgInt",f:Vu},31:{n:"PtgNum",f:Xu},32:{n:"PtgArray",f:Eu}
vendor: 5,410 bytes, line 64886
64886,33:{n:"PtgFunc",f:Mu},34:{n:"PtgFuncVar",f:Uu},35:{n:"PtgName",f:Zu},36:{n:"PtgRef",f:Du},37:{n:"PtgArea",f:wu},38:{n:"PtgMemArea",f:Qu},39:{n:"PtgMemErr",f:ad},40:{n:"PtgMemNoMem",f:nd},41:{n:"PtgMemFunc",f:ed},42:{n:"PtgRefErr",f:rd},43:{n:"PtgAreaErr",f:Au},44:{n:"PtgRefN",f:Pu},45:{n:"PtgAreaN",f:yu},46:{n:"PtgMemAreaN",f:yd},47:{n:"PtgMemNoMemN",f:Ed},57:{n:"PtgNameX",f:Ju},58:{n:"PtgRef3d",f:Lu},59:{n:"PtgArea3d",f:ku},60:{n:"PtgRefErr3d",f:td},61:{n:"PtgAreaErr3d",f:Tu},255:{}};var Sd={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61};var xd={1:{n:"PtgElfLel",f:ud},2:{n:"PtgElfRw",f:md},3:{n:"PtgElfCol",f:ld},6:{n:"PtgElfRwV",f:gd},7:{n:"PtgElfColV",f:hd},10:{n:"PtgElfRadical",f:dd},11:{n:"PtgElfRadicalS",f:pd},13:{n:"PtgElfColS",f:od},15:{n:"PtgElfColSV",f:cd},16:{n:"PtgElfRadicalLel",f:vd},25:{n:"PtgList",f:wd},29:{n:"PtgSxName",f:kd},255:{}};var Od={0:{n:"PtgAttrNoop",f:Cd},1:{n:"PtgAttrSemi",f:Iu},2:{n:"PtgAttrIf",f:xu},4:{n:"PtgAttrChoose",f:_u},8:{n:"PtgAttrGoto",f:Su},16:{n:"PtgAttrSum",f:Wu},32:{n:"PtgAttrBaxcel",f:Cu},33:{n:"PtgAttrBaxcel",f:Cu},64:{n:"PtgAttrSpace",f:Nu},65:{n:"PtgAttrSpaceSemi",f:Fu},128:{n:"PtgAttrIfError",f:Ou},255:{}};function Id(e,r,t,a){if(a.biff<8)return Ia(e,r);var n=e.l+r;var i=[];for(var s=0;s!==t.length;++s){switch(t[s][0]){case"PtgArray":t[s][1]=Yu(e,0,a);i.push(t[s][1]);break;case"PtgMemArea":t[s][2]=Ku(e,t[s][1],a);i.push(t[s][2]);break;case"PtgExp":if(a&&a.biff==12){t[s][1][1]=e._R(4);i.push(t[s][1])}break;case"PtgList":;case"PtgElfRadicalS":;case"PtgElfColS":;case"PtgElfColSV":throw"Unsupported "+t[s][0];default:break;}}r=n-e.l;if(r!==0)i.push(Ia(e,r));return i}function Rd(e,r,t){var a=e.l+r;var n,i,s=[];while(a!=e.l){r=a-e.l;i=e[e.l];n=_d[i]||_d[Sd[i]];if(i===24||i===25)n=(i===24?xd:Od)[e[e.l+1]];if(!n||!n.f){Ia(e,r)}else{s.push([n.n,n.f(e,r,t)])}}return s}function Nd(e){var r=[];for(var t=0;t<e.length;++t){var a=e[t],n=[];for(var i=0;i<a.length;++i){var s=a[i];if(s)switch(s[0]){case 2:n.push('"'+s[1].replace(/"/g,'""')+'"');break;default:n.push(s[1]);}else n.push("")}r.push(n.join(","))}return r.join(";")}var Fd={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function Dd(e,r){var t=e.lastIndexOf("!"),a=r.lastIndexOf("!");if(t==-1&&a==-1)return e+":"+r;if(t>0&&a>0&&e.slice(0,t).toLowerCase()==r.slice(0,a).toLowerCase())return e+":"+r.slice(a+1);console.error("Cannot hydrate range",e,r);return e+":"+r}function Pd(e,r,t){if(!e)return"SH33TJSERR0";if(t.biff>8&&(!e.XTI||!e.XTI[r]))return e.SheetNames[r];if(!e.XTI)return"SH33TJSERR6";var a=e.XTI[r];if(t.biff<8){if(r>1e4)r-=65536;if(r<0)r=-r;return r==0?"":e.XTI[r-1]}if(!a)return"SH33TJSERR1";var n="";if(t.biff>8)switch(e[a[0]][0]){case 357:n=a[1]==-1?"#REF":e.SheetNames[a[1]];return a[1]==a[2]?n:n+":"+e.SheetNames[a[2]];case 358:if(t.SID!=null)return e.SheetNames[t.SID];return"SH33TJSSAME"+e[a[0]][0];case 355:;default:return"SH33TJSSRC"+e[a[0]][0];}switch(e[a[0]][0][0]){case 1025:n=a[1]==-1?"#REF":e.SheetNames[a[1]]||"SH33TJSERR3";return a[1]==a[2]?n:n+":"+e.SheetNames[a[2]];case 14849:return e[a[0]].slice(1).map(function(e){return e.Name}).join(";;");default:if(!e[a[0]][0][3])return"SH33TJSERR2";n=a[1]==-1?"#REF":e[a[0]][0][3][a[1]]||"SH33TJSERR4";return a[1]==a[2]?n:n+":"+e[a[0]][0][3][a[2]];}}function Ld(e,r,t){var a=Pd(e,r,t);return a=="#REF"?a:Qa(a,t)}function Md(e,r,t,a,n){var i=n&&n.biff||8;var s={s:{c:0,r:0},e:{c:0,r:0}};var f=[],l,o,c,h=0,u=0,d,v="";if(!e[0]||!e[0][0])return"";var p=-1,m="";for(var g=0,b=e[0].length;g<b;++g){var w=e[0][g];switch(w[0]){case"PtgUminus":f.push("-"+f.pop());break;case"PtgUplus":f.push("+"+f.pop());break;case"PtgPercent":f.push(f.pop()+"%");break;case"PtgAdd":;case"PtgConcat":;case"PtgDiv":;case"PtgEq":;case"PtgGe":;case"PtgGt":;case"PtgLe":;case"PtgLt":;case"PtgMul":;case"PtgNe":;case"PtgPower":;case"PtgSub":l=f.pop();o=f.pop();if(p>=0){switch(e[0][p][1][0]){case 0:m=Tr(" ",e[0][p][1][1]);break;case 1:m=Tr("\r",e[0][p][1][1]);break;default:m="";if(n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][p][1][0]);}o=o+m;p=-1}f.push(o+Fd[w[0]]+l);break;case"PtgIsect":l=f.pop();o=f.pop();f.push(o+" "+l);break;case"PtgUnion":l=f.pop();o=f.pop();f.push(o+","+l);break;case"PtgRange":l=f.pop();o=f.pop();f.push(Dd(o,l));break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":c=Pa(w[1][1],s,n);f.push(Ma(c,i));break;case"PtgRefN":c=t?Pa(w[1][1],t,n):w[1][1];f.push(Ma(c,i));break;case"PtgRef3d":h=w[1][1];c=Pa(w[1][2],s,n);v=Ld(a,h,n);var k=v;f.push(v+"!"+Ma(c,i));break;case"PtgFunc":;case"PtgFuncVar":var A=w[1][0],T=w[1][1];if(!A)A=0;A&=127;var y=A==0?[]:f.slice(-A);f.length-=A;if(T==="User")T=y.shift();f.push(T+"("+y.join(",")+")");break;case"PtgBool":f.push(w[1]?"TRUE":"FALSE");break;case"PtgInt":f.push(w[1]);break;case"PtgNum":f.push(String(w[1]));break;case"PtgStr":f.push('"'+w[1].replace(/"/g,'""')+'"');break;case"PtgErr":f.push(w[1]);break;case"PtgAreaN":d=La(w[1][1],t?{s:t}:s,n);f.push(Ua(d,n));break;case"PtgArea":d=La(w[1][1],s,n);f.push(Ua(d,n));break;case"PtgArea3d":h=w[1][1];d=w[1][2];v=Ld(a,h,n);
vendor: 7,277 bytes, line 64886
64886f.push(v+"!"+Ua(d,n));break;case"PtgAttrSum":f.push("SUM("+f.pop()+")");break;case"PtgAttrBaxcel":;case"PtgAttrSemi":break;case"PtgName":u=w[1][2];var E=(a.names||[])[u-1]||(a[0]||[])[u];var C=E?E.Name:"SH33TJSNAME"+String(u);if(C&&C.slice(0,6)=="_xlfn."&&!n.xlfn)C=C.slice(6);f.push(C);break;case"PtgNameX":var _=w[1][1];u=w[1][2];var S;if(n.biff<=5){if(_<0)_=-_;if(a[_])S=a[_][u]}else{var x="";if(((a[_]||[])[0]||[])[0]==14849){}else if(((a[_]||[])[0]||[])[0]==1025){if(a[_][u]&&a[_][u].itab>0){x=a.SheetNames[a[_][u].itab-1]+"!"}}else x=a.SheetNames[u-1]+"!";if(a[_]&&a[_][u])x+=a[_][u].Name;else if(a[0]&&a[0][u])x+=a[0][u].Name;else{var O=(Pd(a,_,n)||"").split(";;");if(O[u-1])x=O[u-1];else x+="SH33TJSERRX"}f.push(x);break}if(!S)S={Name:"SH33TJSERRY"};f.push(S.Name);break;case"PtgParen":var I="(",R=")";if(p>=0){m="";switch(e[0][p][1][0]){case 2:I=Tr(" ",e[0][p][1][1])+I;break;case 3:I=Tr("\r",e[0][p][1][1])+I;break;case 4:R=Tr(" ",e[0][p][1][1])+R;break;case 5:R=Tr("\r",e[0][p][1][1])+R;break;default:if(n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][p][1][0]);}p=-1}f.push(I+f.pop()+R);break;case"PtgRefErr":f.push("#REF!");break;case"PtgRefErr3d":f.push("#REF!");break;case"PtgExp":c={c:w[1][1],r:w[1][0]};var N={c:t.c,r:t.r};if(a.sharedf[Ya(c)]){var F=a.sharedf[Ya(c)];f.push(Md(F,s,N,a,n))}else{var D=false;for(l=0;l!=a.arrayf.length;++l){o=a.arrayf[l];if(c.c<o[0].s.c||c.c>o[0].e.c)continue;if(c.r<o[0].s.r||c.r>o[0].e.r)continue;f.push(Md(o[1],s,N,a,n));D=true;break}if(!D)f.push(w[1])}break;case"PtgArray":f.push("{"+Nd(w[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":;case"PtgAttrSpaceSemi":p=g;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":f.push("");break;case"PtgAreaErr":f.push("#REF!");break;case"PtgAreaErr3d":f.push("#REF!");break;case"PtgList":f.push("Table"+w[1].idx+"[#"+w[1].rt+"]");break;case"PtgMemAreaN":;case"PtgMemNoMemN":;case"PtgAttrNoop":;case"PtgSheet":;case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":;case"PtgElfColS":;case"PtgElfColSV":;case"PtgElfColV":;case"PtgElfLel":;case"PtgElfRadical":;case"PtgElfRadicalLel":;case"PtgElfRadicalS":;case"PtgElfRw":;case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(w));default:throw new Error("Unrecognized Formula Token: "+String(w));}var P=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(n.biff!=3)if(p>=0&&P.indexOf(e[0][g][0])==-1){w=e[0][p];var L=true;switch(w[1][0]){case 4:L=false;case 0:m=Tr(" ",w[1][1]);break;case 5:L=false;case 1:m=Tr("\r",w[1][1]);break;default:m="";if(n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+w[1][0]);}f.push((L?m:"")+f.pop()+(L?"":m));p=-1}}if(f.length>1&&n.WTF)throw new Error("bad formula stack");if(f[0]=="TRUE")return true;if(f[0]=="FALSE")return false;return f[0]}function Ud(e,r,t){var a=e.l+r,n=t.biff==2?1:2;var i,s=e._R(n);if(s==65535)return[[],Ia(e,r-2)];var f=Rd(e,s,t);if(r!==s+n)i=Id(e,r-s-n,f,t);e.l=a;return[f,i]}function Bd(e,r,t){var a=e.l+r,n=t.biff==2?1:2;var i,s=e._R(n);if(s==65535)return[[],Ia(e,r-2)];var f=Rd(e,s,t);if(r!==s+n)i=Id(e,r-s-n,f,t);e.l=a;return[f,i]}function Wd(e,r,t,a){var n=e.l+r;var i=Rd(e,a,t);var s;if(n!==e.l)s=Id(e,n-e.l,i,t);return[i,s]}function zd(e,r,t){var a=e.l+r;var n,i=e._R(2);var s=Rd(e,i,t);if(i==65535)return[[],Ia(e,r-2)];if(r!==i+2)n=Id(e,a-i-2,s,t);return[s,n]}function Hd(e){var r;if(ba(e,e.l+6)!==65535)return[Pn(e),"n"];switch(e[e.l]){case 0:e.l+=8;return["String","s"];case 1:r=e[e.l+2]===1;e.l+=8;return[r,"b"];case 2:r=e[e.l+2];e.l+=8;return[r,"e"];case 3:e.l+=8;return["","s"];}return[]}function Vd(e){if(e==null){var r=Ra(8);r._W(1,3);r._W(1,0);r._W(2,0);r._W(2,0);r._W(2,65535);return r}else if(typeof e=="number")return Ln(e);return Ln(0)}function $d(e,r,t){var a=e.l+r;var n=Hs(e,6,t);var i=Hd(e,8);var s=e._R(1);if(t.biff!=2){e._R(1);if(t.biff>=5){e._R(4)}}var f=Bd(e,a-e.l,t);return{cell:n,val:i[0],formula:f,shared:s>>3&1,tt:i[1]}}function Xd(e,r,t,a,n){var i=Vs(r,t,n);var s=Vd(e.v);var f=Ra(6);var l=1|32;f._W(2,l);f._W(4,0);var o=Ra(e.bf.length);for(var c=0;c<e.bf.length;++c)o[c]=e.bf[c];var h=P([i,s,f,o]);return h}function Gd(e,r,t){var a=e._R(4);var n=Rd(e,a,t);var i=e._R(4);var s=i>0?Id(e,i,n,t):null;return[n,s]}var jd=Gd;var Kd=Gd;var Yd=Gd;var Zd=Gd;function Jd(e){if((e|0)==e&&e<Math.pow(2,16)&&e>=0){var r=Ra(11);r._W(4,3);r._W(1,30);r._W(2,e);r._W(4,0);return r}var t=Ra(17);t._W(4,11);t._W(1,31);t._W(8,e);t._W(4,0);return t}function qd(e){var r=Ra(10);r._W(4,2);r._W(1,28);r._W(1,e);r._W(4,0);return r}function Qd(e){var r=Ra(10);r._W(4,2);r._W(1,29);r._W(1,e?1:0);r._W(4,0);return r}function ev(e){var r=Ra(7);r._W(4,3+2*e.length);r._W(1,23);r._W(2,e.length);var t=Ra(2*e.length);t._W(2*e.length,e,"utf16le");var a=Ra(4);a._W(4,0);return P([r,t,a])}function rv(e){var r=Ka(e);var t=Ra(15);t._W(4,7);t._W(1,4|1<<5);t._W(4,r.r);t._W(2,r.c|(e.charAt(0)=="$"?0:1)<<14|(e.match(/\$\d/)?0:1)<<15);t._W(4,0);return t}function tv(e,r){var t=e.lastIndexOf("!");var a=e.slice(0,t);e=e.slice(t+1);var n=Ka(e);if(a.charAt(0)=="'")a=a.slice(1,-1).replace(/''/g,"'");var i=Ra(17);i._W(4,9);i._W(1,26|1<<5);i._W(2,2+r.SheetNames.map(function(e){return e.toLowerCase()}).indexOf(a.toLowerCase()));i._W(4,n.r);i._W(2,n.c|(e.charAt(0)=="$"?0:1)<<14|(e.match(/\$\d/)?0:1)<<15);i._W(4,0);return i}function av(e,r){var t=e.lastIndexOf("!");var a=e.slice(0,t);e=e.slice(t+1);if(a.charAt(0)=="'")a=a.slice(1,-1).replace(/''/g,"'");var n=Ra(17);n._W(4,9);n._W(1,28|1<<5);n._W(2,2+r.SheetNames.map(function(e){return e.toLowerCase()}).indexOf(a.toLowerCase()));n._W(4,0);n._W(2,0);n._W(4,0);return n}function nv(e){var r=e.split(":"),t=r[0];var a=Ra(23);a._W(4,15);t=r[0];var n=Ka(t);a._W(1,4|1<<5);a._W(4,n.r);a._W(2,n.c|(t.charAt(0)=="$"?0:1)<<14|(t.match(/\$\d/)?0:1)<<15);a._W(4,0);t=r[1];n=Ka(t);a._W(1,4|1<<5);a._W(4,n.r);a._W(2,n.c|(t.charAt(0)=="$"?0:1)<<14|(t.match(/\$\d/)?0:1)<<15);a._W(4,0);a._W(1,17);a._W(4,0);return a}function iv(e,r){var t=e.lastIndexOf("!");var a=e.slice(0,t);e=e.slice(t+1);if(a.charAt(0)=="'")a=a.slice(1,-1).replace(/''/g,"'");var n=e.split(":");var i=Ra(27);i._W(4,19);var s=n[0],f=Ka(s);i._W(1,26|1<<5);i._W(2,2+r.SheetNames.map(function(e){return e.toLowerCase()}).indexOf(a.toLowerCase()));i._W(4,f.r);i._W(2,f.c|(s.charAt(0)=="$"?0:1)<<14|(s.match(/\$\d/)?0:1)<<15);s=n[1];f=Ka(s);i._W(1,26|1<<5);i._W(2,2+r.SheetNames.map(function(e){return e.toLowerCase()}).indexOf(a.toLowerCase()));i._W(4,f.r);i._W(2,f.c|(s.charAt(0)=="$"?0:1)<<14|(s.match(/\$\d/)?0:1)<<15);i._W(1,17);i._W(4,0);return i}function sv(e,r){var t=e.lastIndexOf("!");var a=e.slice(0,t);e=e.slice(t+1);if(a.charAt(0)=="'")a=a.slice(1,-1).replace(/''/g,"'");var n=Za(e);var i=Ra(23);i._W(4,15);i._W(1,27|1<<5);i._W(2,2+r.SheetNames.map(function(e){return e.toLowerCase()}).indexOf(a.toLowerCase()));i._W(4,n.s.r);i._W(4,n.e.r);i._W(2,n.s.c);i._W(2,n.e.c);i._W(4,0);return i}function fv(e,r){if(typeof e=="number")return Jd(e);if(typeof e=="boolean")return Qd(e);if(/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(e))return qd(+hi[e]);if(e.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return rv(e);
64886if(e.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return nv(e);if(e.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return sv(e,r);if(e.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return tv(e,r);if(e.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return iv(e,r); 64887if(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(e))return av(e,r);if(/^".*"$/.test(e))return ev(e);if(/^[+-]\d+$/.test(e))return Jd(parseInt(e,10));throw"Formula |"+e+"| not supported for XLSB"}var lv=fv;var ov={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.
64887NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"};var cv
vendor: 6,539 bytes, line 64887
64887={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"};var
vendor: 19,154 bytes, lines 64887-64888
64887hv={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function uv(e){if(e.slice(0,3)=="of:")e=e.slice(3);if(e.charCodeAt(0)==61){e=e.slice(1);if(e.charCodeAt(0)==61)e=e.slice(1)}e=e.replace(/COM\.MICROSOFT\./g,"");e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(e,r){return r.replace(/\./g,"")});e=e.replace(/\$'([^']|'')+'/g,function(e){return e.slice(1)});e=e.replace(/\$([^\]\. #$]+)/g,function(e,r){return r.match(/^([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])?(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})?$/)?e:r});e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1");return e.replace(/[;~]/g,",").replace(/\|/g,";")}function dv(e){var r="of:="+e.replace(tu,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return r.replace(/;/g,"|").replace(/,/g,";")}function vv(e){e=e.replace(/\$'([^']|'')+'/g,function(e){return e.slice(1)});e=e.replace(/\$([^\]\. #$]+)/g,function(e,r){return r.match(/^([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])?(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})?$/)?e:r});var r=e.split(":");var t=r[0].split(".")[0];return[t,r[0].split(".")[1]+(r.length>1?":"+(r[1].split(".")[1]||r[1].split(".")[0]):"")]}function pv(e){return e.replace(/!/,".").replace(/:/,":.")}var mv={};var gv={};var bv=typeof Map!=="undefined";function wv(e,r,t){var a=0,n=e.length;if(t){if(bv?t.has(r):Object.prototype.hasOwnProperty.call(t,r)){var i=bv?t.get(r):t[r];for(;a<i.length;++a){if(e[i[a]].t===r){e.Count++;return i[a]}}}}else for(;a<n;++a){if(e[a].t===r){e.Count++;return a}}e[n]={t:r};e.Count++;e.Unique++;if(t){if(bv){if(!t.has(r))t.set(r,[]);t.get(r).push(n)}else{if(!Object.prototype.hasOwnProperty.call(t,r))t[r]=[];t[r].push(n)}}return n}function kv(e,r){var t={min:e+1,max:e+1};var a=-1;if(r.MDW)ac=r.MDW;if(r.width!=null)t.customWidth=1;else if(r.wpx!=null)a=ic(r.wpx);else if(r.wch!=null)a=r.wch;if(a>-1){t.width=sc(a);t.customWidth=1}else if(r.width!=null)t.width=r.width;if(r.hidden)t.hidden=true;if(r.level!=null){t.outlineLevel=t.level=r.level}return t}function Av(e,r){if(!e)return;var t=[.7,.7,.75,.75,.3,.3];if(r=="xlml")t=[1,1,1,1,.5,.5];if(e.left==null)e.left=t[0];if(e.right==null)e.right=t[1];if(e.top==null)e.top=t[2];if(e.bottom==null)e.bottom=t[3];if(e.header==null)e.header=t[4];if(e.footer==null)e.footer=t[5]}function Tv(e,r,t){var a=t.revssf[r.z!=null?r.z:"General"];var n=60,i=e.length;if(a==null&&t.ssf){for(;n<392;++n)if(t.ssf[n]==null){Je(r.z,n);t.ssf[n]=r.z;t.revssf[r.z]=a=n;break}}for(n=0;n!=i;++n)if(e[n].numFmtId===a)return n;e[i]={numFmtId:a,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1};return i}function yv(e,r,t,a,n,i,s){try{if(a.cellNF)e.z=q[r]}catch(f){if(a.WTF)throw f}if(e.t==="z"&&!a.cellStyles)return;if(e.t==="d"&&typeof e.v==="string")e.v=wr(e.v);if((!a||a.cellText!==false)&&e.t!=="z")try{if(q[r]==null)Je(Ge[r]||"General",r);if(e.t==="e")e.w=e.w||ci[e.v];else if(r===0){if(e.t==="n"){if((e.v|0)===e.v)e.w=e.v.toString(10);else e.w=le(e.v)}else if(e.t==="d"){var l=dr(e.v,!!s);if((l|0)===l)e.w=l.toString(10);else e.w=le(l)}else if(e.v===undefined)return"";else e.w=oe(e.v,gv)}else if(e.t==="d")e.w=ze(r,dr(e.v,!!s),gv);else e.w=ze(r,e.v,gv)}catch(f){if(a.WTF)throw f}if(!a.cellStyles)return;if(t!=null)try{e.s=i.Fills[t];if(e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb){e.s.fgColor.rgb=Qo(n.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0);if(a.WTF)e.s.fgColor.raw_rgb=n.themeElements.clrScheme[e.s.fgColor.theme].rgb}if(e.s.bgColor&&e.s.bgColor.theme){e.s.bgColor.rgb=Qo(n.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0);if(a.WTF)e.s.bgColor.raw_rgb=n.themeElements.clrScheme[e.s.bgColor.theme].rgb}}catch(f){if(a.WTF&&i.Fills)throw f}}function Ev(e,r,t){if(e&&e["!ref"]){var a=en(e["!ref"]);if(a.e.c<a.s.c||a.e.r<a.s.r)throw new Error("Bad range ("+t+"): "+e["!ref"])}}function Cv(e,r){var t=en(r);if(t.s.r<=t.e.r&&t.s.c<=t.e.c&&t.s.r>=0&&t.s.c>=0)e["!ref"]=Ja(t)}var _v=/<(?:\w+:)?mergeCell ref=["'][A-Z0-9:]+['"]\s*[\/]?>/g;var Sv=/<(?:\w+:)?hyperlink [^<>]*>/gm;var xv=/"(\w*:\w*)"/;var Ov=/<(?:\w+:)?col\b[^<>]*[\/]?>/g;var Iv=/<(?:\w+:)?autoFilter[^>]*/g;var Rv=/<(?:\w+:)?pageMargins[^<>]*\/>/g;var Nv=/<(?:\w+:)?sheetPr\b[^<>]*?\/>/;function Fv(e,r,t,a,n,i,s){if(!e)return e;if(!a)a={"!id":{}};if(b!=null&&r.dense==null)r.dense=b;var f={};if(r.dense)f["!data"]=[];var l={s:{r:2e6,c:2e6},e:{r:0,c:0}};var o="",c="";var h=Wr(e,"sheetData");if(h){o=e.slice(0,h.index);c=e.slice(h.index+h[0].length)}else o=c=e;var u=o.match(Nv);if(u)Pv(u[0],f,n,t);else if(u=Wr(o,"sheetPr"))Lv(u[0],u[1]||"",f,n,t,s,i);var d=(o.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(d>0){var v=o.slice(d,d+50).match(xv);if(v&&!(r&&r.nodim))Cv(f,v[1])}var p=Wr(o,"sheetViews");if(p&&p[1])Yv(p[1],n);var m=[];if(r.cellStyles){var g=o.match(Ov);if(g)$v(m,g)}if(h)qv(h[1],f,r,l,i,s,n);var w=c.match(Iv);if(w)f["!autofilter"]=Gv(w[0]);var k=[];var A=c.match(_v);if(A)for(d=0;d!=A.length;++d)k[d]=en(A[d].slice(A[d].indexOf("=")+2));var T=c.match(Sv);if(T)zv(f,T,a);var y=c.match(Rv);if(y)f["!margins"]=Hv(ct(y[0]));var E;if(E=c.match(/legacyDrawing r:id="(.*?)"/))f["!legrel"]=E[1];if(r&&r.nodim)l.s.c=l.s.r=0;if(!f["!ref"]&&l.e.c>=l.s.c&&l.e.r>=l.s.r)f["!ref"]=Ja(l);if(r.sheetRows>0&&f["!ref"]){var C=en(f["!ref"]);if(r.sheetRows<=+C.e.r){C.e.r=r.sheetRows-1;if(C.e.r>l.e.r)C.e.r=l.e.r;if(C.e.r<C.s.r)C.s.r=C.e.r;if(C.e.c>l.e.c)C.e.c=l.e.c;if(C.e.c<C.s.c)C.s.c=C.e.c;f["!fullref"]=f["!ref"];f["!ref"]=Ja(C)}}if(m.length>0)f["!cols"]=m;if(k.length>0)f["!merges"]=k;if(a["!id"][f["!legrel"]])f["!legdrawel"]=a["!id"][f["!legrel"]];return f}function Dv(e){if(e.length===0)return"";var r='<mergeCells count="'+e.length+'">';for(var t=0;t!=e.length;++t)r+='<mergeCell ref="'+Ja(e[t])+'"/>';return r+"</mergeCells>"}function Pv(e,r,t,a){var n=ct(e);if(!t.Sheets[a])t.Sheets[a]={};if(n.codeName)t.Sheets[a].CodeName=pt(It(n.codeName))}function Lv(e,r,t,a,n){Pv(e.slice(0,e.indexOf(">")),t,a,n)}function Mv(e,r,t,a,n){var i=false;var s={},f=null;if(a.bookType!=="xlsx"&&r.vbaraw){var l=r.SheetNames[t];try{if(r.Workbook)l=r.Workbook.Sheets[t].CodeName||l}catch(o){}i=true;s.codeName=Rt(bt(l))}if(e&&e["!outline"]){var c={summaryBelow:1,summaryRight:1};if(e["!outline"].above)c.summaryBelow=0;if(e["!outline"].left)c.summaryRight=0;f=(f||"")+Bt("outlinePr",null,c)}if(!i&&!f)return;n[n.length]=Bt("sheetPr",f,s)}var Uv=["objects","scenarios","selectLockedCells","selectUnlockedCells"];var Bv=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function Wv(e){var r={sheet:1};Uv.forEach(function(t){if(e[t]!=null&&e[t])r[t]="1"});Bv.forEach(function(t){if(e[t]!=null&&!e[t])r[t]="0"});if(e.password)r.password=Uo(e.password).toString(16).toUpperCase();return Bt("sheetProtection",null,r)}function zv(e,r,t){var a=e["!data"]!=null;for(var n=0;n!=r.length;++n){var i=ct(It(r[n]),true);if(!i.ref)return;var s=((t||{})["!id"]||[])[i.id];if(s){i.Target=s.Target;if(i.location)i.Target+="#"+pt(i.location)}else{i.Target="#"+pt(i.location);s={Target:i.Target,TargetMode:"Internal"}}i.Rel=s;if(i.tooltip){i.Tooltip=i.tooltip;delete i.tooltip}var f=en(i.ref);for(var l=f.s.r;l<=f.e.r;++l)for(var o=f.s.c;o<=f.e.c;++o){var c=$a(o)+Wa(l);if(a){if(!e["!data"][l])e["!data"][l]=[];if(!e["!data"][l][o])e["!data"][l][o]={t:"z",v:undefined};e["!data"][l][o].l=i}else{if(!e[c])e[c]={t:"z",v:undefined};e[c].l=i}}}}function Hv(e){var r={};["left","right","top","bottom","header","footer"].forEach(function(t){if(e[t])r[t]=parseFloat(e[t])});return r}function Vv(e){Av(e);return Bt("pageMargins",null,e)}function $v(e,r){var t=false;for(var a=0;a!=r.length;++a){var n=ct(r[a],true);if(n.hidden)n.hidden=Ct(n.hidden);var i=parseInt(n.min,10)-1,s=parseInt(n.max,10)-1;if(n.outlineLevel)n.level=+n.outlineLevel||0;delete n.min;delete n.max;n.width=+n.width;if(!t&&n.width){t=true;lc(n.width)}oc(n);while(i<=s)e[i++]=Ar(n)}}function Xv(e,r){var t=["<cols>"],a;for(var n=0;n!=r.length;++n){if(!(a=r[n]))continue;t[t.length]=Bt("col",null,kv(n,a))}t[t.length]="</cols>";return t.join("")}function Gv(e){var r={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return r}function jv(e,r,t,a){var n=typeof e.ref=="string"?e.ref:Ja(e.ref);if(!t.Workbook)t.Workbook={Sheets:[]};if(!t.Workbook.Names)t.Workbook.Names=[];var i=t.Workbook.Names;var s=Za(n);if(s.s.r==s.e.r){s.e.r=Za(r["!ref"]).e.r;n=Ja(s)}for(var f=0;f<i.length;++f){var l=i[f];if(l.Name!="_xlnm._FilterDatabase")continue;if(l.Sheet!=a)continue;l.Ref=Qa(t.SheetNames[a])+"!"+qa(n);break}if(f==i.length)i.push({Name:"_xlnm._FilterDatabase",Sheet:a,Ref:"'"+t.SheetNames[a]+"'!"+n});return Bt("autoFilter",null,{ref:n})}var Kv=/<(?:\w:)?sheetView(?:[^<>a-z][^<>]*)?\/?>/g;function Yv(e,r){if(!r.Views)r.Views=[{}];(e.match(Kv)||[]).forEach(function(e,t){var a=ct(e);if(!r.Views[t])r.Views[t]={};if(+a.zoomScale)r.Views[t].zoom=+a.zoomScale;if(a.rightToLeft&&Ct(a.rightToLeft))r.Views[t].RTL=true})}function Zv(e,r,t,a){var n={workbookViewId:"0"};if((((a||{}).Workbook||{}).Views||[])[0])n.rightToLeft=a.Workbook.Views[0].RTL?"1":"0";return Bt("sheetViews",Bt("sheetView",null,n),{})}function Jv(e,r,t,a,n,i,s){if(e.c)t["!comments"].push([r,e.c]);if((e.v===undefined||e.t==="z"&&!(a||{}).sheetStubs)&&typeof e.f!=="string"&&typeof e.z=="undefined")return"";var f="";var l=e.t,o=e.v;if(e.t!=="z")switch(e.t){case"b":f=e.v?"1":"0";break;case"n":if(isNaN(e.v)){e.t="e";f=ci[e.v=36]}else if(!isFinite(e.v)){e.t="e";f=ci[e.v=7]}else f=""+e.v;break;case"e":f=ci[e.v];break;case"d":if(a&&a.cellDates){var c=wr(e.v,s);f=c.toISOString();if(c.getUTCFullYear()<1900)f=f.slice(f.indexOf("T")+1).replace("Z","")}else{e=Ar(e);e.t="n";f=""+(e.v=dr(wr(e.v,s),s))}if(typeof e.z==="undefined")e.z=q[14];break;default:f=e.v;break;}var h=e.t=="z"||e.v==null?"":Mt("v",bt(f)),u={r:r};var d=Tv(a.cellXfs,e,a);if(d!==0)u.s=d;switch(e.t){case"n":break;case"d":u.t="d";break;case"b":u.t="b";break;case"e":u.t="e";break;case"z":break;default:if(e.v==null){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(a&&a.bookSST){h=Mt("v",""+wv(a.Strings,e.v,a.revStrings));u.t="s";break}else u.t="str";break;}if(e.t!=l){e.t=l;e.v=o}if(typeof e.f=="string"&&e.f){var v=e.F&&e.F.slice(0,r.length)==r?{t:"array",ref:e.F}:null;h=Bt("f",bt(e.f),v)+(e.v!=null?h:"")}if(e.l){e.l.display=bt(f);t["!links"].push([r,e.l])}if(e.D)u.cm=1;return Bt("c",h,u)}var qv=function(){var e=/<(?:\w+:)?c[ \/>]/,r=/<\/(?:\w+:)?row>/;var t=/r=["']([^"']*)["']/;var a=/ref=["']([^"']*)["']/;return function n(i,s,f,l,o,c,h){var u=0,d="",v=[],p=[],m=0,g=0,b=0,w="",k;var A,T=0,y=0;var E,C;var _=0,S=0;var x=Array.isArray(c.CellXf),O;var I=[];var R=[];var N=s["!data"]!=null;var F=[],D={},P=false;var L=!!f.sheetStubs;var M=!!((h||{}).WBProps||{}).date1904;for(var U=i.split(r),B=0,W=U.length;B!=W;++B){d=U[B].trim();var z=d.length;if(z===0)continue;var H=0;e:for(u=0;u<z;++u)switch(d[u]){case">":if(d[u-1]!="/"){++u;break e}if(f&&f.cellStyles){A=ct(d.slice(H,u),true);T=A.r!=null?parseInt(A.r,10):T+1;y=-1;if(f.sheetRows&&f.sheetRows<T)continue;D={};P=false;if(A.ht){P=true;D.hpt=parseFloat(A.ht);D.hpx=dc(D.hpt)}if(A.hidden&&Ct(A.hidden)){P=true;D.hidden=true}if(A.outlineLevel!=null){P=true;D.level=+A.outlineLevel}if(P)F[T-1]=D}break;case"<":H=u;break;}if(H>=u)break;A=ct(d.slice(H,u),true);T=A.r!=null?parseInt(A.r,10):T+1;y=-1;if(f.sheetRows&&f.sheetRows<T)continue;if(!f.nodim){if(l.s.r>T-1)l.s.r=T-1;if(l.e.r<T-1)l.e.r=T-1}if(f&&f.cellStyles){D={};P=false;if(A.ht){P=true;D.hpt=parseFloat(A.ht);D.hpx=dc(D.hpt)}if(A.hidden&&Ct(A.hidden)){P=true;D.hidden=true}if(A.outlineLevel!=null){P=true;D.level=+A.outlineLevel}if(P)F[T-1]=D}v=d.slice(u).split(e);for(var V=0;V!=v.length;++V)if(v[V].trim().charAt(0)!="<")break;v=v.slice(V);for(u=0;u!=v.length;++u){d=v[u].trim();if(d.length===0)continue;p=d.match(t);m=u;g=0;b=0;d="<c "+(d.slice(0,1)=="<"?">":"")+d;if(p!=null&&p.length===2){m=0;w=p[1];for(g=0;g!=w.length;++g){if((b=w.charCodeAt(g)-64)<1||b>26)break;m=26*m+b}--m;y=m}else++y;for(g=0;g!=d.length;++g)if(d.charCodeAt(g)===62)break;++g;A=ct(d.slice(0,g),true);if(!A.r)A.r=Ya({r:T-1,c:y});w=d.slice(g);k={t:""};if((p=Wr(w,"v"))!=null&&p[1]!=="")k.v=pt(p[1]);if(f.cellFormula){if((p=Wr(w,"f"))!=null){if(p[1]==""){if(p[0].indexOf('t="shared"')>-1){C=ct(p[0]);if(R[C.si])k.f=su(R[C.si][1],R[C.si][2],A.r)}}else{k.f=pt(It(p[1]),true);if(!f.xlfn)k.f=lu(k.f);if(p[0].indexOf('t="array"')>-1){k.F=(w.match(a)||[])[1];if(k.F.indexOf(":")>-1)I.push([en(k.F),k.F])}else if(p[0].indexOf('t="shared"')>-1){C=ct(p[0]);var $=pt(It(p[1]));if(!f.xlfn)$=lu($);R[parseInt(C.si,10)]=[C,$,A.r]}}}else if(p=w.match(/<f[^<>]*\/>/)){C=ct(p[0]);if(R[C.si])k.f=su(R[C.si][1],R[C.si][2],A.r)}var X=Ka(A.r);for(g=0;g<I.length;++g)if(X.r>=I[g][0].s.r&&X.r<=I[g][0].e.r)if(X.c>=I[g][0].s.c&&X.c<=I[g][0].e.c)k.F=I[g][1]}if(A.t==null&&k.v===undefined){if(k.f||k.F){k.v=0;k.t="n"}else if(!L)continue;else k.t="z"}else k.t=A.t||"n";if(l.s.c>y)l.s.c=y;if(l.e.c<y)l.e.c=y;switch(k.t){case"n":if(k.v==""||k.v==null){if(!L)continue;k.t="z"}else k.v=parseFloat(k.v);break;case"s":if(typeof k.v=="undefined"){if(!L)continue;k.t="z"}else{E=mv[parseInt(k.v,10)];k.v=E.t;k.r=E.r;if(f.cellHTML)k.h=E.h}break;case"str":k.t="s";k.v=k.v!=null?pt(It(k.v),true):"";if(f.cellHTML)k.h=At(k.v);break;case"inlineStr":p=Wr(w,"is");k.t="s";if(p!=null&&(E=co(p[1]))){k.v=E.t;if(f.cellHTML)k.h=E.h}else k.v="";break;case"b":k.v=Ct(k.v);break;case"d":if(f.cellDates)k.v=wr(k.v,M);else{k.v=dr(wr(k.v,M),M);k.t="n"}break;case"e":if(!f||f.cellText!==false)k.w=k.v;k.v=hi[k.v];break;}_=S=0;O=null;if(x&&A.s!==undefined){O=c.CellXf[A.s];if(O!=null){if(O.numFmtId!=null)_=O.numFmtId;if(f.cellStyles){if(O.fillId!=null)S=O.fillId}}}yv(k,_,S,f,o,c,M);if(f.cellDates&&x&&k.t=="n"&&Le(q[_])){k.v=vr(k.v+(M?1462:0));k.t=typeof k.v=="number"?"n":"d"}if(A.cm&&f.xlmeta){var G=(f.xlmeta.Cell||[])[+A.cm-1];if(G&&G.type=="XLDAPR")k.D=true}var j;if(f.nodim){j=Ka(A.r);if(l.s.r>j.r)l.s.r=j.r;if(l.e.r<j.r)l.e.r=j.r}if(N){j=Ka(A.r);if(!s["!data"][j.r])s["!data"][j.r]=[];s["!data"][j.r][j.c]=k}else s[A.r]=k}}if(F.length>0)s["!rows"]=F}}();function Qv(e,r,t,a){var n=[],i=[],s=en(e["!ref"]),f="",l,o="",c=[],h=0,u=0,d=e["!rows"];var v=e["!data"]!=null,p=v?e["!data"]:[];var m={r:o},g,b=-1;var w=(((a||{}).Workbook||{}).WBProps||{}).date1904;for(u=s.s.c;u<=s.e.c;++u)c[u]=$a(u);for(h=s.s.r;h<=s.e.r;++h){i=[];o=Wa(h);var k=v?p[h]:[];for(u=s.s.c;u<=s.e.c;++u){l=c[u]+o;var A=v?k[u]:e[l];if(A===undefined)continue;if((f=Jv(A,l,e,r,t,a,w))!=null)i.push(f)}if(i.length>0||d&&d[h]){m={r:o};if(d&&d[h]){g=d[h];if(g.hidden)m.hidden=1;b=-1;if(g.hpx)b=uc(g.hpx);else if(g.hpt)b=g.hpt;if(b>-1){m.ht=b;m.customHeight=1}if(g.level){m.outlineLevel=g.level}}n[n.length]=Bt("row",i.join(""),m)}}if(d)for(;h<d.length;++h){if(d&&d[h]){m={r:h+1};g=d[h];if(g.hidden)m.hidden=1;b=-1;if(g.hpx)b=uc(g.hpx);else if(g.hpt)b=g.hpt;if(b>-1){m.ht=b;m.customHeight=1}if(g.level){m.outlineLevel=g.level}n[n.length]=Bt("row","",m)}}return n.join("")}function ep(e,r,t,a){var n=[at,Bt("worksheet",null,{xmlns:Xt[0],"xmlns:r":$t.r})];var i=t.SheetNames[e],s=0,f="";var l=t.Sheets[i];if(l==null)l={};var o=l["!ref"]||"A1";var c=en(o);if(c.e.c>16383||c.e.r>1048575){if(r.WTF)throw new Error("Range "+o+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383);c.e.r=Math.min(c.e.c,1048575);o=Ja(c)}if(!a)a={};l["!comments"]=[];var h=[];Mv(l,t,e,r,n);n[n.length]=Bt("dimension",null,{ref:o});n[n.length]=Zv(l,r,e,t);if(r.sheetFormat)n[n.length]=Bt("sheetFormatPr",null,{defaultRowHeight:r.sheetFormat.defaultRowHeight||"16",baseColWidth:r.sheetFormat.baseColWidth||"10",outlineLevelRow:r.sheetFormat.outlineLevelRow||"7"});if(l["!cols"]!=null&&l["!cols"].length>0)n[n.length]=Xv(l,l["!cols"]);n[s=n.length]="<sheetData/>";l["!links"]=[];if(l["!ref"]!=null){f=Qv(l,r,e,t,a);if(f.length>0)n[n.length]=f}if(n.length>s+1){n[n.length]="</sheetData>";n[s]=n[s].replace("/>",">")}if(l["!protect"])n[n.length]=Wv(l["!protect"]);if(l["!autofilter"]!=null)n[n.length]=jv(l["!autofilter"],l,t,e);if(l["!merges"]!=null&&l["!merges"].length>0)n[n.length]=Dv(l["!merges"]);var u=-1,d,v=-1;if(l["!links"].length>0){n[n.length]="<hyperlinks>";l["!links"].forEach(function(e){if(!e[1].Target)return;d={ref:e[0]};if(e[1].Target.charAt(0)!="#"){v=Ti(a,-1,bt(e[1].Target).replace(/#[\s\S]*$/,""),bi.HLINK);d["r:id"]="rId"+v}if((u=e[1].Target.indexOf("#"))>-1)d.location=bt(e[1].Target.slice(u+1)); 64888if(e[1].Tooltip)d.tooltip=bt(e[1].Tooltip);d.display=e[1].display;n[n.length]=Bt("hyperlink",null,d)});n[n.length]="</hyperlinks>"}delete l["!links"];if(l["!margins"]!=null)n[n.length]=Vv(l["!margins"]);if(!r||r.ignoreEC||r.ignoreEC==void 0)n[n.length]=Mt("ignoredErrors",Bt("ignoredError",null,{numberStoredAsText:1,sqref:o}));if(h.length>0){v=Ti(a,-1,"../drawings/drawing"+(e+1)+".xml",bi.DRAW);n[n.length]=Bt("drawing",null,{"r:id":"rId"+v});l["!drawing"]=h}if(l["!comments"].length>0){v=Ti(a,-1,"../drawings/vmlDrawing"+(e+1)+".vml",bi.VML);n[n.length]=Bt("legacyDrawing",null,{"r:id":"rId"+v});l["!legacy"]=v}if(n.length>1){n[n.length]="</worksheet>";n[1]=n[1].replace("/>",">")}return n.join("")}function rp(e,r){var t={};var a=e.l+r;t.r=e._R(4);e.l+=4;var n=e._R(2);e.l+=1;var i=e._R(1);e.l=a;if(i&7)t.level=i&7;if(i&16)t.hidden=true;if(i&32)t.hpt=n/20;return t}function tp(e,r,t){var a=Ra(17+8*16);var n=(t["!rows"]||[])[e]||{};a._W(4,e);a._W(4,0);var i=320;if(n.hpx)i=uc(n.hpx)*20;else if(n.hpt)i=n.hpt*20;a._W(2,i);a._W(1,0);var s=0;if(n.level)s|=n.level;if(n.hidden)s|=16;if(n.hpx||n.hpt)s|=32;a._W(1,s);a._W(1,0);var f=0,l=a.l;a.l+=4;var o={r:e,c:0};var c=t["!data"]!=null;for(var h=0;h<16;++h){if(r.s.c>h+1<<10||r.e.c<h<<10)continue;var u=-1,d=-1;for(var v=h<<10;v<h+1<<10;
vendor: 5,204 bytes, line 64888
64888++v){o.c=v;var p=c?(t["!data"][o.r]||[])[o.c]:t[Ya(o)];if(p){if(u<0)u=v;d=v}}if(u<0)continue;++f;a._W(4,u);a._W(4,d)}var m=a.l;a.l=l;a._W(4,f);a.l=m;return a.length>a.l?a.slice(0,a.l):a}function ap(e,r,t,a){var n=tp(a,t,r);if(n.length>17||(r["!rows"]||[])[a])Da(e,0,n)}var np=Fn;var ip=Dn;function sp(){}function fp(e,r){var t={};var a=e[e.l];++e.l;t.above=!(a&64);t.left=!(a&128);e.l+=18;t.name=Tn(e,r-19);return t}function lp(e,r,t){if(t==null)t=Ra(84+4*e.length);var a=192;if(r){if(r.above)a&=~64;if(r.left)a&=~128}t._W(1,a);for(var n=1;n<3;++n)t._W(1,0);Un({auto:1},t);t._W(-4,-1);t._W(-4,-1);yn(e,t);return t.slice(0,t.l)}function op(e){var r=bn(e);return[r]}function cp(e,r,t){if(t==null)t=Ra(8);return wn(r,t)}function hp(e){var r=kn(e);return[r]}function up(e,r,t){if(t==null)t=Ra(4);return An(r,t)}function dp(e){var r=bn(e);var t=e._R(1);return[r,t,"b"]}function vp(e,r,t){if(t==null)t=Ra(9);wn(r,t);t._W(1,e.v?1:0);return t}function pp(e){var r=kn(e);var t=e._R(1);return[r,t,"b"]}function mp(e,r,t){if(t==null)t=Ra(5);An(r,t);t._W(1,e.v?1:0);return t}function gp(e){var r=bn(e);var t=e._R(1);return[r,t,"e"]}function bp(e,r,t){if(t==null)t=Ra(9);wn(r,t);t._W(1,e.v);return t}function wp(e){var r=kn(e);var t=e._R(1);return[r,t,"e"]}function kp(e,r,t){if(t==null)t=Ra(8);An(r,t);t._W(1,e.v);t._W(2,0);t._W(1,0);return t}function Ap(e){var r=bn(e);var t=e._R(4);return[r,t,"s"]}function Tp(e,r,t){if(t==null)t=Ra(12);wn(r,t);t._W(4,r.v);return t}function yp(e){var r=kn(e);var t=e._R(4);return[r,t,"s"]}function Ep(e,r,t){if(t==null)t=Ra(8);An(r,t);t._W(4,r.v);return t}function Cp(e){var r=bn(e);var t=Pn(e);return[r,t,"n"]}function _p(e,r,t){if(t==null)t=Ra(16);wn(r,t);Ln(e.v,t);return t}function Sp(e){var r=kn(e);var t=Pn(e);return[r,t,"n"]}function xp(e,r,t){if(t==null)t=Ra(12);An(r,t);Ln(e.v,t);return t}function Op(e){var r=bn(e);var t=On(e);return[r,t,"n"]}function Ip(e,r,t){if(t==null)t=Ra(12);wn(r,t);In(e.v,t);return t}function Rp(e){var r=kn(e);var t=On(e);return[r,t,"n"]}function Np(e,r,t){if(t==null)t=Ra(8);An(r,t);In(e.v,t);return t}function Fp(e){var r=bn(e);var t=vn(e);return[r,t,"is"]}function Dp(e){var r=bn(e);var t=cn(e);return[r,t,"str"]}function Pp(e,r,t){var a=e.v==null?"":String(e.v);if(t==null)t=Ra(12+4*e.v.length);wn(r,t);hn(a,t);return t.length>t.l?t.slice(0,t.l):t}function Lp(e){var r=kn(e);var t=cn(e);return[r,t,"str"]}function Mp(e,r,t){var a=e.v==null?"":String(e.v);if(t==null)t=Ra(8+4*a.length);An(r,t);hn(a,t);return t.length>t.l?t.slice(0,t.l):t}function Up(e,r,t){var a=e.l+r;var n=bn(e);n.r=t["!row"];var i=e._R(1);var s=[n,i,"b"];if(t.cellFormula){e.l+=2;var f=Kd(e,a-e.l,t);s[3]=Md(f,null,n,t.supbooks,t)}else e.l=a;return s}function Bp(e,r,t){var a=e.l+r;var n=bn(e);n.r=t["!row"];var i=e._R(1);var s=[n,i,"e"];if(t.cellFormula){e.l+=2;var f=Kd(e,a-e.l,t);s[3]=Md(f,null,n,t.supbooks,t)}else e.l=a;return s}function Wp(e,r,t){var a=e.l+r;var n=bn(e);n.r=t["!row"];var i=Pn(e);var s=[n,i,"n"];if(t.cellFormula){e.l+=2;var f=Kd(e,a-e.l,t);s[3]=Md(f,null,n,t.supbooks,t)}else e.l=a;return s}function zp(e,r,t){var a=e.l+r;var n=bn(e);n.r=t["!row"];var i=cn(e);var s=[n,i,"str"];if(t.cellFormula){e.l+=2;var f=Kd(e,a-e.l,t);s[3]=Md(f,null,n,t.supbooks,t)}else e.l=a;return s}var Hp=Fn;var Vp=Dn;function $p(e,r){if(r==null)r=Ra(4);r._W(4,e);return r}function Xp(e,r){var t=e.l+r;var a=Fn(e,16);var n=En(e);var i=cn(e);var s=cn(e);var f=cn(e);e.l=t;var l={rfx:a,relId:n,loc:i,display:f};if(s)l.Tooltip=s;return l}function Gp(e,r){var t=Ra(50+4*(e[1].Target.length+(e[1].Tooltip||"").length));Dn({s:Ka(e[0]),e:Ka(e[0])},t);xn("rId"+r,t);var a=e[1].Target.indexOf("#");var n=a==-1?"":e[1].Target.slice(a+1);hn(n||"",t);hn(e[1].Tooltip||"",t);hn("",t);return t.slice(0,t.l)}function jp(){}function Kp(e,r,t){var a=e.l+r;var n=Rn(e,16);var i=e._R(1);var s=[n];s[2]=i;if(t.cellFormula){var f=jd(e,a-e.l,t);s[1]=f}else e.l=a;return s}function Yp(e,r,t){var a=e.l+r;var n=Fn(e,16);var i=[n];if(t.cellFormula){var s=Zd(e,a-e.l,t);i[1]=s;e.l=a}else e.l=a;return i}function Zp(e,r,t){if(t==null)t=Ra(18);var a=kv(e,r);t._W(-4,e);t._W(-4,e);t._W(4,(a.width||10)*256);t._W(4,0);var n=0;if(r.hidden)n|=1;if(typeof a.width=="number")n|=2;if(r.level)n|=r.level<<8;t._W(2,n);return t}var Jp=["left","right","top","bottom","header","footer"];function qp(e){var r={};Jp.forEach(function(t){r[t]=Pn(e,8)});return r}function Qp(e,r){if(r==null)r=Ra(6*8);Av(e);Jp.forEach(function(t){Ln(e[t],r)});return r}function em(e){var r=e._R(2);e.l+=28;return{RTL:r&32}}function rm(e,r,t){if(t==null)t=Ra(30);var a=924;if((((r||{}).Views||[])[0]||{}).RTL)a|=32;t._W(2,a);t._W(4,0);t._W(4,0);t._W(4,0);t._W(1,0);t._W(1,0);t._W(2,0);t._W(2,100);t._W(2,0);t._W(2,0);t._W(2,0);t._W(4,0);return t}function tm(e){var r=Ra(24);r._W(4,4);r._W(4,1);Dn(e,r);return r}function am(e,r){if(r==null)r=Ra(16*4+2);r._W(2,e.password?Uo(e.password):0);r._W(4,1);[["objects",false],["scenarios",false],["formatCells",true],["formatColumns",true],["formatRows",true],["insertColumns",true],["insertRows",true],["insertHyperlinks",true],["deleteColumns",true],["deleteRows",true],["selectLockedCells",false],["sort",true],["autoFilter",true],["pivotTables",true],["selectUnlockedCells",false]].forEac
vendor: 11,672 bytes, line 64888
64888h(function(t){if(t[1])r._W(4,e[t[0]]!=null&&!e[t[0]]?1:0);else r._W(4,e[t[0]]!=null&&e[t[0]]?0:1)});return r}function nm(){}function im(){}function sm(e,r,t,a,n,i,s){if(!e)return e;var f=r||{};if(!a)a={"!id":{}};if(b!=null&&f.dense==null)f.dense=b;var l={};if(f.dense)l["!data"]=[];var o;var c={s:{r:2e6,c:2e6},e:{r:0,c:0}};var h=[];var u=false,d=false;var v,p,m,g,w,k,A,T,y;var E=[];f.biff=12;f["!row"]=0;var C=0,_=false;var S=[];var x={};var O=f.supbooks||n.supbooks||[[]];O.sharedf=x;O.arrayf=S;O.SheetNames=n.SheetNames||n.Sheets.map(function(e){return e.name});if(!f.supbooks){f.supbooks=O;if(n.Names)for(var I=0;I<n.Names.length;++I)O[0][I+1]=n.Names[I]}var R=[],N=[];var F=false;Zg[16]={n:"BrtShortReal",f:Sp};var D,P;var L=1462*+!!((n||{}).WBProps||{}).date1904;Na(e,function U(e,r,b){if(d)return;switch(b){case 148:o=e;break;case 0:v=e;if(f.sheetRows&&f.sheetRows<=v.r)d=true;T=Wa(g=v.r);f["!row"]=v.r;if(e.hidden||e.hpt||e.level!=null){if(e.hpt)e.hpx=dc(e.hpt);N[e.r]=e}break;case 2:;case 3:;case 4:;case 5:;case 6:;case 7:;case 8:;case 9:;case 10:;case 11:;case 13:;case 14:;case 15:;case 16:;case 17:;case 18:;case 62:p={t:e[2]};switch(e[2]){case"n":p.v=e[1];break;case"s":A=mv[e[1]];p.v=A.t;p.r=A.r;break;case"b":p.v=e[1]?true:false;break;case"e":p.v=e[1];if(f.cellText!==false)p.w=ci[p.v];break;case"str":p.t="s";p.v=e[1];break;case"is":p.t="s";p.v=e[1].t;break;}if(m=s.CellXf[e[0].iStyleRef])yv(p,m.numFmtId,null,f,i,s,L>0);w=e[0].c==-1?w+1:e[0].c;if(f.dense){if(!l["!data"][g])l["!data"][g]=[];l["!data"][g][w]=p}else l[$a(w)+T]=p;if(f.cellFormula){_=false;for(C=0;C<S.length;++C){var I=S[C];if(v.r>=I[0].s.r&&v.r<=I[0].e.r)if(w>=I[0].s.c&&w<=I[0].e.c){p.F=Ja(I[0]);_=true}}if(!_&&e.length>3)p.f=e[3]}if(c.s.r>v.r)c.s.r=v.r;if(c.s.c>w)c.s.c=w;if(c.e.r<v.r)c.e.r=v.r;if(c.e.c<w)c.e.c=w;if(f.cellDates&&m&&p.t=="n"&&Le(q[m.numFmtId])){var M=ae(p.v+L);if(M){p.t="d";p.v=new Date(Date.UTC(M.y,M.m-1,M.d,M.H,M.M,M.S,M.u))}}if(D){if(D.type=="XLDAPR")p.D=true;D=void 0}if(P)P=void 0;break;case 1:;case 12:if(!f.sheetStubs||u)break;p={t:"z",v:void 0};w=e[0].c==-1?w+1:e[0].c;if(f.dense){if(!l["!data"][g])l["!data"][g]=[];l["!data"][g][w]=p}else l[$a(w)+T]=p;if(c.s.r>v.r)c.s.r=v.r;if(c.s.c>w)c.s.c=w;if(c.e.r<v.r)c.e.r=v.r;if(c.e.c<w)c.e.c=w;if(D){if(D.type=="XLDAPR")p.D=true;D=void 0}if(P)P=void 0;break;case 176:E.push(e);break;case 49:{D=((f.xlmeta||{}).Cell||[])[e-1]}break;case 494:var U=a["!id"][e.relId];if(U){e.Target=U.Target;if(e.loc)e.Target+="#"+e.loc;e.Rel=U}else if(e.relId==""){e.Target="#"+e.loc}for(g=e.rfx.s.r;g<=e.rfx.e.r;++g)for(w=e.rfx.s.c;w<=e.rfx.e.c;++w){if(f.dense){if(!l["!data"][g])l["!data"][g]=[];if(!l["!data"][g][w])l["!data"][g][w]={t:"z",v:undefined};l["!data"][g][w].l=e}else{k=$a(w)+Wa(g);if(!l[k])l[k]={t:"z",v:undefined};l[k].l=e}}break;case 426:if(!f.cellFormula)break;S.push(e);y=f.dense?l["!data"][g][w]:l[$a(w)+T];y.f=Md(e[1],c,{r:v.r,c:w},O,f);y.F=Ja(e[0]);break;case 427:if(!f.cellFormula)break;x[Ya(e[0].s)]=e[1];y=f.dense?l["!data"][g][w]:l[$a(w)+T];y.f=Md(e[1],c,{r:v.r,c:w},O,f);break;case 60:if(!f.cellStyles)break;while(e.e>=e.s){R[e.e--]={width:e.w/256,hidden:!!(e.flags&1),level:e.level};if(!F){F=true;lc(e.w/256)}oc(R[e.e+1])}break;case 551:if(e)l["!legrel"]=e;break;case 161:l["!autofilter"]={ref:Ja(e)};break;case 476:l["!margins"]=e;break;case 147:if(!n.Sheets[t])n.Sheets[t]={};if(e.name)n.Sheets[t].CodeName=e.name;if(e.above||e.left)l["!outline"]={above:e.above,left:e.left};break;case 137:if(!n.Views)n.Views=[{}];if(!n.Views[0])n.Views[0]={};if(e.RTL)n.Views[0].RTL=true;break;case 485:break;case 64:;case 1053:break;case 151:break;case 152:;case 175:;case 644:;case 625:;case 562:;case 396:;case 1112:;case 1146:;case 471:;case 1050:;case 649:;case 1105:;case 589:;case 607:;case 564:;case 1055:;case 168:;case 174:;case 1180:;case 499:;case 507:;case 550:;case 171:;case 167:;case 1177:;case 169:;case 1181:;case 552:;case 661:;case 639:;case 478:;case 537:;case 477:;case 536:;case 1103:;case 680:;case 1104:;case 1024:;case 663:;case 535:;case 678:;case 504:;case 1043:;case 428:;case 170:;case 3072:;case 50:;case 2070:;case 1045:break;case 35:u=true;break;case 36:u=false;break;case 37:h.push(b);u=true;break;case 38:h.pop();u=false;break;default:if(r.T){}else if(!u||f.WTF)throw new Error("Unexpected record 0x"+b.toString(16));}},f);delete f.supbooks;delete f["!row"];if(!l["!ref"]&&(c.s.r<2e6||o&&(o.e.r>0||o.e.c>0||o.s.r>0||o.s.c>0)))l["!ref"]=Ja(o||c);if(f.sheetRows&&l["!ref"]){var M=en(l["!ref"]);if(f.sheetRows<=+M.e.r){M.e.r=f.sheetRows-1;if(M.e.r>c.e.r)M.e.r=c.e.r;if(M.e.r<M.s.r)M.s.r=M.e.r;if(M.e.c>c.e.c)M.e.c=c.e.c;if(M.e.c<M.s.c)M.s.c=M.e.c;l["!fullref"]=l["!ref"];l["!ref"]=Ja(M)}}if(E.length>0)l["!merges"]=E;if(R.length>0)l["!cols"]=R;if(N.length>0)l["!rows"]=N;if(a["!id"][l["!legrel"]])l["!legdrawel"]=a["!id"][l["!legrel"]];return l}function fm(e,r,t,a,n,i,s,f){var l={r:t,c:a};if(r.c)i["!comments"].push([Ya(l),r.c]);if(r.v===undefined)return false;var o="";switch(r.t){case"b":o=r.v?"1":"0";break;case"d":r=Ar(r);r.z=r.z||q[14];r.v=dr(wr(r.v,f),f);r.t="n";break;case"n":;case"e":o=""+r.v;break;default:o=r.v;break;}l.s=Tv(n.cellXfs,r,n);if(r.l)i["!links"].push([Ya(l),r.l]);switch(r.t){case"s":;case"str":if(n.bookSST){o=wv(n.Strings,r.v==null?"":String(r.v),n.revStrings);l.t="s";l.v=o;if(s)Da(e,18,Ep(r,l));else Da(e,7,Tp(r,l))}else{l.t="str";if(s)Da(e,17,Mp(r,l));else Da(e,6,Pp(r,l))}return true;case"n":if(r.v==(r.v|0)&&r.v>-1e3&&r.v<1e3){if(s)Da(e,13,Np(r,l));else Da(e,2,Ip(r,l))}else if(!isFinite(r.v)){l.t="e";if(isNaN(r.v)){if(s)Da(e,14,kp({t:"e",v:36},l));else Da(e,3,bp({t:"e",v:36},l))}else{if(s)Da(e,14,kp({t:"e",v:7},l));else Da(e,3,bp({t:"e",v:7},l))}}else{if(s)Da(e,16,xp(r,l));else Da(e,5,_p(r,l))}return true;case"b":l.t="b";if(s)Da(e,15,mp(r,l));else Da(e,4,vp(r,l));return true;case"e":l.t="e";if(s)Da(e,14,kp(r,l));else Da(e,3,bp(r,l));return true;}if(s)Da(e,12,up(r,l));else Da(e,1,cp(r,l));return true}function lm(e,r,t,a,n){var i=en(r["!ref"]||"A1"),s="",f=[];var l=(((n||{}).Workbook||{}).WBProps||{}).date1904;Da(e,145);var o=r["!data"]!=null,c=o?r["!data"][i.s.r]:[];var h=i.e.r;if(r["!rows"])h=Math.max(i.e.r,r["!rows"].length-1);for(var u=i.s.r;u<=h;++u){s=Wa(u);if(o)c=r["!data"][u];ap(e,r,i,u);if(o&&!c)continue;var d=false;if(u<=i.e.r)for(var v=i.s.c;v<=i.e.c;++v){if(u===i.s.r)f[v]=$a(v);var p=o?c[v]:r[f[v]+s];if(!p){d=false;continue}d=fm(e,p,u,v,a,r,d,l)}}Da(e,146)}function om(e,r){if(!r||!r["!merges"])return;Da(e,177,$p(r["!merges"].length));r["!merges"].forEach(function(r){Da(e,176,Vp(r))});Da(e,178)}function cm(e,r){if(!r||!r["!cols"])return;Da(e,390);r["!cols"].forEach(function(r,t){if(r)Da(e,60,Zp(t,r))});Da(e,391)}function hm(e,r){if(!r||!r["!ref"])return;Da(e,648);Da(e,649,tm(en(r["!ref"])));Da(e,650)}function um(e,r,t){r["!links"].forEach(function(r){if(!r[1].Target)return;var a=Ti(t,-1,r[1].Target.replace(/#[\s\S]*$/,""),bi.HLINK);Da(e,494,Gp(r,a))});delete r["!links"]}function dm(e,r,t,a){if(r["!comments"].length>0){var n=Ti(a,-1,"../drawings/vmlDrawing"+(t+1)+".vml",bi.VML);Da(e,551,xn("rId"+n));r["!legacy"]=n}}function vm(e,r,t,a){if(!r["!autofilter"])return;var n=r["!autofilter"];var i=typeof n.ref==="string"?n.ref:Ja(n.ref);if(!t.Workbook)t.Workbook={Sheets:[]};if(!t.Workbook.Names)t.Workbook.Names=[];var s=t.Workbook.Names;var f=Za(i);if(f.s.r==f.e.r){f.e.r=Za(r["!ref"]).e.r;i=Ja(f)}for(var l=0;l<s.length;++l){var o=s[l];if(o.Name!="_xlnm._FilterDatabase")continue;if(o.Sheet!=a)continue;o.Ref=Qa(t.SheetNames[a])+"!"+qa(i);break}if(l==s.length)s.push({Name:"_xlnm._FilterDatabase",Sheet:a,Ref:Qa(t.SheetNames[a])+"!"+qa(i)});Da(e,161,Dn(en(i)));Da(e,162)}function pm(e,r,t){Da(e,133);{Da(e,137,rm(r,t));Da(e,138)}Da(e,134)}function mm(){}function gm(e,r){if(!r["!protect"])return;Da(e,535,am(r["!protect"]))}function bm(e,r,t,a){var n=Fa();var i=t.SheetNames[e],s=t.Sheets[i]||{};var f=i;try{if(t&&t.Workbook)f=t.Workbook.Sheets[e].CodeName||f}catch(l){}var o=en(s["!ref"]||"A1");if(o.e.c>16383||o.e.r>1048575){if(r.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");o.e.c=Math.min(o.e.c,16383);o.e.r=Math.min(o.e.c,1048575)}s["!links"]=[];s["!comments"]=[];Da(n,129);if(t.vbaraw||s["!outline"])Da(n,147,lp(f,s["!outline"]));Da(n,148,ip(o));pm(n,s,t.Workbook);mm(n,s);cm(n,s,e,r,t);lm(n,s,e,r,t);gm(n,s);vm(n,s,t,e);om(n,s);um(n,s,a);if(s["!margins"])Da(n,476,Qp(s["!margins"]));if(!r||r.ignoreEC||r.ignoreEC==void 0)hm(n,s);dm(n,s,e,a);Da(n,130);return n.end()}function wm(e){var r=[];var t=e.match(/^<c:numCache>/);var a;(e.match(/<c:pt idx="(\d*)"[^<>\/]*><c:v>([^<])<\/c:v><\/c:pt>/gm)||[]).forEach(function(e){var a=e.match(/<c:pt idx="(\d*)"[^<>\/]*><c:v>([^<]*)<\/c:v><\/c:pt>/);if(!a)return;r[+a[1]]=t?+a[2]:a[2]});var n=pt((Br(e,"c:formatCode")||["","General"])[1]);(Lr(e,"<c:f>","</c:f>")||[]).forEach(function(e){a=e.replace(/<[^<>]*>/g,"")});return[r,n,a]}function km(e,r,t,a,n,i){var s=i||{"!type":"chart"};if(!e)return i;var f=0,l=0,o="A";var c={s:{r:2e6,c:2e6},e:{r:0,c:0}};(Lr(e,"<c:numCache>","</c:numCache>")||[]).forEach(function(e){var r=wm(e);c.s.r=c.s.c=0;c.e.c=f;o=$a(f);r[0].forEach(function(e,t){if(s["!data"]){if(!s["!data"][t])s["!data"][t]=[];s["!data"][t][f]={t:"n",v:e,z:r[1]}}else s[o+Wa(t)]={t:"n",v:e,z:r[1]};l=t});if(c.e.r<l)c.e.r=l;++f});if(f>0)s["!ref"]=Ja(c);return s}function Am(e,r,t,a,n){if(!e)return e;if(!a)a={"!id":{}};var i={"!type":"chart","!drawel":null,"!rel":""};var s;var f=e.match(Nv);if(f)Pv(f[0],i,n,t);if(s=e.match(/drawing r:id="(.*?)"/))i["!rel"]=s[1];if(a["!id"][i["!rel"]])i["!drawel"]=a["!id"][i["!rel"]];return i}function Tm(e,r){e.l+=10;var t=cn(e,r-10);return{name:t}}function ym(e,r,t,a,n){if(!e)return e;if(!a)a={"!id":{}};var i={"!type":"chart","!drawel":null,"!rel":""};var s=[];var f=false;Na(e,function l(e,a,o){switch(o){case 550:i["!rel"]=e;break;case 651:if(!n.Sheets[t])n.Sheets[t]={};if(e.name)n.Sheets[t].CodeName=e.name;break;case 562:;case 652:;case 669:;case 679:;case 551:;case 552:;case 476:;case 3072:break;case 35:f=true;break;case 36:f=false;break;case 37:s.push(o);break;case 38:s.pop();break;default:if(a.T>0)s.push(o);else if(a.T<0)s.pop();else if(!f||r.WTF)throw new Error("Unexpected record 0x"+o.toString(16));}},r);if(a["!id"][i["!rel"]])i["!drawel"]=a["!id"][i["!rel"]];return i}var Em=[["allowRefreshQuery",false,"bool"],["autoCompressPictures",true,"bool"],["backupFile",false,"bool"],["checkCompatibility",false,"bool"],["CodeName",""],["date1904",false,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",false,"bool"],["hidePivotFieldList",false,"bool"],["promptedSolutions",false,"bool"],["publishItems",false,"bool"],["refreshAllConnections",false,"bool"],["saveExternalLinkValues",true,"bool"],["showBorderUnselectedTables",true,"bool"],["showInkAnnotation",true,"bool"],["showObjects","all"],["showPivotChartFilter",false,"bool"],["updateLinks","userSet"]];var Cm=[["activeTab",0,"int"],["autoFilterDateGrouping",true,"bool"],["firstSheet",0,"int"],["minimized",false,"bool"],["showHorizontalScroll",true,"bool"],["showSheetTabs",true,"bool"],["showVerticalScroll",true,"bool"],["tabRatio",600,"int"],["visibility","visible"]];var _m=[];var Sm=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function xm(e,r){for(var t=0;t!=e.length;++t){var a=e[t];for(var n=0;n!=r.length;++n){var i=r[n];if(a[i[0]]==null)a[i[0]]=i[1];else switch(i[2]){case"bool":if(typeof a[i[0]]=="string")a[i[0]]=Ct(a[i[0]]);break;case"int":if(typeof a[i[0]]=="string")a[i[0]]=parseInt(a[i[0]],10);break;}}}}
vendor: 5,243 bytes, line 64888
64888function Om(e,r){for(var t=0;t!=r.length;++t){var a=r[t];if(e[a[0]]==null)e[a[0]]=a[1];else switch(a[2]){case"bool":if(typeof e[a[0]]=="string")e[a[0]]=Ct(e[a[0]]);break;case"int":if(typeof e[a[0]]=="string")e[a[0]]=parseInt(e[a[0]],10);break;}}}function Im(e){Om(e.WBProps,Em);Om(e.CalcPr,Sm);xm(e.WBView,Cm);xm(e.Sheets,_m);gv.date1904=Ct(e.WBProps.date1904)}function Rm(e){if(!e.Workbook)return"false";if(!e.Workbook.WBProps)return"false";return Ct(e.Workbook.WBProps.date1904)?"true":"false"}var Nm=":][*?/\\".split("");function Fm(e,r){try{if(e=="")throw new Error("Sheet name cannot be blank");if(e.length>31)throw new Error("Sheet name cannot exceed 31 chars");if(e.charCodeAt(0)==39||e.charCodeAt(e.length-1)==39)throw new Error("Sheet name cannot start or end with apostrophe (')");if(e.toLowerCase()=="history")throw new Error("Sheet name cannot be 'History'");Nm.forEach(function(r){if(e.indexOf(r)==-1)return;throw new Error("Sheet name cannot contain : \\ / ? * [ ]")})}catch(t){if(r)return false;throw t}return true}function Dm(e,r,t){e.forEach(function(a,n){Fm(a);for(var i=0;i<n;++i)if(a==e[i])throw new Error("Duplicate Sheet Name: "+a);if(t){var s=r&&r[n]&&r[n].CodeName||a;if(s.charCodeAt(0)==95&&s.length>22)throw new Error("Bad Code Name: Worksheet"+s)}})}function Pm(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var r=e.Workbook&&e.Workbook.Sheets||[];Dm(e.SheetNames,r,!!e.vbaraw);for(var t=0;t<e.SheetNames.length;++t)Ev(e.Sheets[e.SheetNames[t]],e.SheetNames[t],t);e.SheetNames.forEach(function(r,t){var a=e.Sheets[r];if(!a||!a["!autofilter"])return;var n;if(!e.Workbook)e.Workbook={};if(!e.Workbook.Names)e.Workbook.Names=[];e.Workbook.Names.forEach(function(e){if(e.Name=="_xlnm._FilterDatabase"&&e.Sheet==t)n=e});var i=Qa(r)+"!"+qa(a["!autofilter"].ref);if(n)n.Ref=i;else e.Workbook.Names.push({Name:"_xlnm._FilterDatabase",Sheet:t,Ref:i})})}var Lm=/<\w+:workbook/;function Mm(e,r){if(!e)throw new Error("Could not find file");var t={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""};var a=false,n="xmlns";var i={},s=0;e.replace(ft,function f(l,o){var c=ct(l);switch(ut(c[0])){case"<?xml":break;case"<workbook":if(l.match(Lm))n="xmlns"+l.match(/<(\w+):/)[1];t.xmlns=c[n];break;case"</workbook>":break;case"<fileVersion":delete c[0];t.AppVersion=c;break;case"<fileVersion/>":;case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":;case"<workbookPr/>":Em.forEach(function(e){if(c[e[0]]==null)return;switch(e[2]){case"bool":t.WBProps[e[0]]=Ct(c[e[0]]);break;case"int":t.WBProps[e[0]]=parseInt(c[e[0]],10);break;default:t.WBProps[e[0]]=c[e[0]];}});if(c.codeName)t.WBProps.CodeName=It(c.codeName);break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":;case"<bookViews>":;case"</bookViews>":break;case"<workbookView":;case"<workbookView/>":delete c[0];t.WBView.push(c);break;case"</workbookView>":break;case"<sheets":;case"<sheets>":;case"</sheets>":break;case"<sheet":switch(c.state){case"hidden":c.Hidden=1;break;case"veryHidden":c.Hidden=2;break;default:c.Hidden=0;}delete c.state;c.name=pt(It(c.name));delete c[0];t.Sheets.push(c);break;case"</sheet>":break;case"<functionGroups":;case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":;case"</externalReferences>":;case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":;case"<definedNames":a=true;break;case"</definedNames>":a=false;break;case"<definedName":{i={};i.Name=It(c.name);if(c.comment)i.Comment=c.comment;if(c.localSheetId)i.Sheet=+c.localSheetId;if(Ct(c.hidden||"0"))i.Hidden=true;s=o+l.length}break;case"</definedName>":{i.Ref=pt(It(e.slice(s,o)));t.Names.push(i)}break;case"<definedName/>":break;case"<calcPr":delete c[0];t.CalcPr=c;break;case"<calcPr/>":delete c[0];t.CalcPr=c;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":;case"</customWorkbookViews>":;case"<customWorkbookViews":break;case"<customWorkbookView":;case"</customWorkbookView>":break;case"<pivotCaches>":;case"</pivotCaches>":;case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":;case"<smartTagPr/>":break;case"<smartTagTypes":;case"<smartTagTypes>":;case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":;case"<webPublishing/>":break;case"<fileRecoveryPr":;case"<fileRecoveryPr/>":break;case"<webPublishObjects>":;case"<webPublishObjects":;case"</webPublishObjects>":break;case"<webPublishObject":break;case"<extLst":;case"<extLst>":;case"</extLst>":;case"<extLst/>":break;case"<ext":a=true;break;case"</ext>":a=false;break;case"<ArchID":break;case"<AlternateContent":;case"<AlternateContent>":a=true;break;case"</AlternateContent>":a=false;break;case"<revisionPtr":break;default:if(!a&&r.WTF)throw new Error("unrecognized "+c[0]+" in workbook");}return l});if(Xt.indexOf(t.xmlns)===-1)throw new Error("Unknown Namespace: "+t.xmlns);Im(t);return t}function Um(e){var r=[at];r[r.length]=Bt("workbook",null,{xmlns:Xt[0],"xmlns:r":$t.r});var t=e.Workbook&&(e.Workbook.Names||[]).length>0;var a={codeName:"ThisWorkbook"};
vendor: 19,325 bytes, lines 64888-64889
64888if(e.Workbook&&e.Workbook.WBProps){Em.forEach(function(r){if(e.Workbook.WBProps[r[0]]==null)return;if(e.Workbook.WBProps[r[0]]==r[1])return;a[r[0]]=e.Workbook.WBProps[r[0]]});if(e.Workbook.WBProps.CodeName){a.codeName=e.Workbook.WBProps.CodeName;delete a.CodeName}}r[r.length]=Bt("workbookPr",null,a);var n=e.Workbook&&e.Workbook.Sheets||[];var i=0;if(n&&n[0]&&!!n[0].Hidden){r[r.length]="<bookViews>";for(i=0;i!=e.SheetNames.length;++i){if(!n[i])break;if(!n[i].Hidden)break}if(i==e.SheetNames.length)i=0;r[r.length]='<workbookView firstSheet="'+i+'" activeTab="'+i+'"/>';r[r.length]="</bookViews>"}r[r.length]="<sheets>";for(i=0;i!=e.SheetNames.length;++i){var s={name:bt(e.SheetNames[i].slice(0,31))};s.sheetId=""+(i+1);s["r:id"]="rId"+(i+1);if(n[i])switch(n[i].Hidden){case 1:s.state="hidden";break;case 2:s.state="veryHidden";break;}r[r.length]=Bt("sheet",null,s)}r[r.length]="</sheets>";if(t){r[r.length]="<definedNames>";if(e.Workbook&&e.Workbook.Names)e.Workbook.Names.forEach(function(e){var t={name:e.Name};if(e.Comment)t.comment=e.Comment;if(e.Sheet!=null)t.localSheetId=""+e.Sheet;if(e.Hidden)t.hidden="1";if(!e.Ref)return;r[r.length]=Bt("definedName",bt(e.Ref),t)});r[r.length]="</definedNames>"}if(r.length>2){r[r.length]="</workbook>";r[1]=r[1].replace("/>",">")}return r.join("")}function Bm(e,r){var t={};t.Hidden=e._R(4);t.iTabID=e._R(4);t.strRelID=Sn(e,r-8);t.name=cn(e);return t}function Wm(e,r){if(!r)r=Ra(127);r._W(4,e.Hidden);r._W(4,e.iTabID);xn(e.strRelID,r);hn(e.name.slice(0,31),r);return r.length>r.l?r.slice(0,r.l):r}function zm(e,r){var t={};var a=e._R(4);t.defaultThemeVersion=e._R(4);var n=r>8?cn(e):"";if(n.length>0)t.CodeName=n;t.autoCompressPictures=!!(a&65536);t.backupFile=!!(a&64);t.checkCompatibility=!!(a&4096);t.date1904=!!(a&1);t.filterPrivacy=!!(a&8);t.hidePivotFieldList=!!(a&1024);t.promptedSolutions=!!(a&16);t.publishItems=!!(a&2048);t.refreshAllConnections=!!(a&262144);t.saveExternalLinkValues=!!(a&128);t.showBorderUnselectedTables=!!(a&4);t.showInkAnnotation=!!(a&32);t.showObjects=["all","placeholders","none"][a>>13&3];t.showPivotChartFilter=!!(a&32768);t.updateLinks=["userSet","never","always"][a>>8&3];return t}function Hm(e,r){if(!r)r=Ra(72);var t=0;if(e){if(e.date1904)t|=1;if(e.filterPrivacy)t|=8}r._W(4,t);r._W(4,0);yn(e&&e.CodeName||"ThisWorkbook",r);return r.slice(0,r.l)}function Vm(e,r){var t={};e._R(4);t.ArchID=e._R(4);e.l+=r-8;return t}function $m(e,r,t){var a=e.l+r;var n=e._R(4);e.l+=1;var i=e._R(4);var s=_n(e);var f;var l="";try{f=Yd(e,0,t);try{l=En(e)}catch(o){}}catch(o){console.error("Could not parse defined name "+s)}if(n&32)s="_xlnm."+s;e.l=a;var c={Name:s,Ptg:f,Flags:n};if(i<268435455)c.Sheet=i;if(l)c.Comment=l;return c}function Xm(e,r){var t=Ra(9);var a=0;var n=e.Name;if(ui.indexOf(n)>-1){a|=32;n=n.slice(6)}t._W(4,a);t._W(1,0);t._W(4,e.Sheet==null?4294967295:e.Sheet);var i=[t,hn(n),lv(e.Ref,r)];if(e.Comment)i.push(Cn(e.Comment));else{var s=Ra(4);s._W(4,4294967295);i.push(s)}return P(i)}function Gm(e,r){var t={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""};var a=[];var n=false;if(!r)r={};r.biff=12;var i=[];var s=[[]];s.SheetNames=[];s.XTI=[];Zg[16]={n:"BrtFRTArchID$",f:Vm};Na(e,function f(e,l,o){switch(o){case 156:s.SheetNames.push(e.name);t.Sheets.push(e);break;case 153:t.WBProps=e;break;case 39:if(e.Sheet!=null)r.SID=e.Sheet;e.Ref=e.Ptg?Md(e.Ptg,null,null,s,r):"#REF!";delete r.SID;delete e.Ptg;i.push(e);break;case 1036:break;case 357:;case 358:;case 355:;case 667:if(!s[0].length)s[0]=[o,e];else s.push([o,e]);s[s.length-1].XTI=[];break;case 362:if(s.length===0){s[0]=[];s[0].XTI=[]}s[s.length-1].XTI=s[s.length-1].XTI.concat(e);s.XTI=s.XTI.concat(e);break;case 361:break;case 2071:;case 158:;case 143:;case 664:;case 353:break;case 3072:;case 3073:;case 534:;case 677:;case 157:;case 610:;case 2050:;case 155:;case 548:;case 676:;case 128:;case 665:;case 2128:;case 2125:;case 549:;case 2053:;case 596:;case 2076:;case 2075:;case 2082:;case 397:;case 154:;case 1117:;case 553:;case 2091:break;case 35:a.push(o);n=true;break;case 36:a.pop();n=false;break;case 37:a.push(o);n=true;break;case 38:a.pop();n=false;break;case 16:break;default:if(l.T){}else if(!n||r.WTF&&a[a.length-1]!=37&&a[a.length-1]!=35)throw new Error("Unexpected record 0x"+o.toString(16));}},r);Im(t);t.Names=i;t.supbooks=s;return t}function jm(e,r){Da(e,143);for(var t=0;t!=r.SheetNames.length;++t){var a=r.Workbook&&r.Workbook.Sheets&&r.Workbook.Sheets[t]&&r.Workbook.Sheets[t].Hidden||0;var n={Hidden:a,iTabID:t+1,strRelID:"rId"+(t+1),name:r.SheetNames[t]};Da(e,156,Wm(n))}Da(e,144)}function Km(r,t){if(!t)t=Ra(127);for(var a=0;a!=4;++a)t._W(4,0);hn("SheetJS",t);hn(e.version,t);hn(e.version,t);hn("7262",t);return t.length>t.l?t.slice(0,t.l):t}function Ym(e,r){if(!r)r=Ra(29);r._W(-4,0);r._W(-4,460);r._W(4,28800);r._W(4,17600);r._W(4,500);r._W(4,e);r._W(4,e);var t=120;r._W(1,t);return r.length>r.l?r.slice(0,r.l):r}function Zm(e,r){if(!r.Workbook||!r.Workbook.Sheets)return;var t=r.Workbook.Sheets;var a=0,n=-1,i=-1;for(;a<t.length;++a){if(!t[a]||!t[a].Hidden&&n==-1)n=a;else if(t[a].Hidden==1&&i==-1)i=a}if(i>n)return;Da(e,135);Da(e,158,Ym(n));Da(e,136)}function Jm(e,r){if(!r.Workbook||!r.Workbook.Names)return;r.Workbook.Names.forEach(function(t){try{if(t.Flags&14)return;Da(e,39,Xm(t,r))}catch(a){console.error("Could not serialize defined name "+JSON.stringify(t))}})}function qm(e){var r=e.SheetNames.length;var t=Ra(12*r+28);t._W(4,r+2);t._W(4,0);t._W(4,-2);t._W(4,-2);t._W(4,0);t._W(4,-1);t._W(4,-1);for(var a=0;a<r;++a){t._W(4,0);t._W(4,a);t._W(4,a)}return t}function Qm(e,r){Da(e,353);Da(e,357);Da(e,362,qm(r,0));Da(e,354)}function eg(e,r){var t=Fa();Da(t,131);Da(t,128,Km());Da(t,153,Hm(e.Workbook&&e.Workbook.WBProps||null));Zm(t,e,r);jm(t,e,r);Qm(t,e);if((e.Workbook||{}).Names)Jm(t,e);Da(t,132);return t.end()}function rg(e,r,t){if(r.slice(-4)===".bin")return Gm(e,t);return Mm(e,t)}function tg(e,r,t,a,n,i,s,f){if(r.slice(-4)===".bin")return sm(e,a,t,n,i,s,f);return Fv(e,a,t,n,i,s,f)}function ag(e,r,t,a,n,i,s,f){if(r.slice(-4)===".bin")return ym(e,a,t,n,i,s,f);return Am(e,a,t,n,i,s,f)}function ng(e,r,t,a,n,i,s,f){if(r.slice(-4)===".bin")return Qh(e,a,t,n,i,s,f);return eu(e,a,t,n,i,s,f)}function ig(e,r,t,a,n,i,s,f){if(r.slice(-4)===".bin")return Jh(e,a,t,n,i,s,f);return qh(e,a,t,n,i,s,f)}function sg(e,r,t,a){if(r.slice(-4)===".bin")return zc(e,t,a);return Ec(e,t,a)}function fg(e,r,t){if(r.slice(-4)===".bin")return bo(e,t);return vo(e,t)}function lg(e,r,t){if(r.slice(-4)===".bin")return Xh(e,t);return Ph(e,t)}function og(e,r,t){if(r.slice(-4)===".bin")return Sh(e,r,t);return Ch(e,r,t)}function cg(e,r,t,a){if(t.slice(-4)===".bin")return Oh(e,r,t,a);return xh(e,r,t,a)}function hg(e,r,t){if(r.slice(-4)===".bin")return Ah(e,r,t);return yh(e,r,t)}var ug=/\b((?:\w+:)?[\w]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g;var dg=/\b((?:\w+:)?[\w]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function vg(e,r){var t=e.split(/\s+/);var a=[];if(!r)a[0]=t[0];if(t.length===1)return a;var n=e.match(ug),i,s,f,l;if(n)for(l=0;l!=n.length;++l){i=n[l].match(dg);if((s=i[1].indexOf(":"))===-1)a[i[1]]=i[2].slice(1,i[2].length-1);else{if(i[1].slice(0,6)==="xmlns:")f="xmlns"+i[1].slice(6);else f=i[1].slice(s+1);a[f]=i[2].slice(1,i[2].length-1)}}return a}function pg(e){var r=e.split(/\s+/);var t={};if(r.length===1)return t;var a=e.match(ug),n,i,s,f;if(a)for(f=0;f!=a.length;++f){n=a[f].match(dg);if((i=n[1].indexOf(":"))===-1)t[n[1]]=n[2].slice(1,n[2].length-1);else{if(n[1].slice(0,6)==="xmlns:")s="xmlns"+n[1].slice(6);else s=n[1].slice(i+1);t[s]=n[2].slice(1,n[2].length-1)}}return t}var mg;function gg(e,r,t){var a=mg[e]||pt(e);if(a==="General")return oe(r);return ze(a,r,{date1904:!!t})}function bg(e,r,t,a){var n=a;switch((t[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean": 64889n=Ct(a);break;case"i2":;case"int":n=parseInt(a,10);break;case"r4":;case"float":n=parseFloat(a);break;case"date":;case"dateTime.tz":n=wr(a);break;case"i8":;case"string":;case"fixed":;case"uuid":;case"bin.base64":break;default:throw new Error("bad custprop:"+t[0]);}e[pt(r)]=n}function wg(e,r,t,a){if(e.t==="z")return;if(!t||t.cellText!==false)try{if(e.t==="e"){e.w=e.w||ci[e.v]}else if(r==="General"){if(e.t==="n"){if((e.v|0)===e.v)e.w=e.v.toString(10);else e.w=le(e.v)}else e.w=oe(e.v)}else e.w=gg(r||"General",e.v,a)}catch(n){if(t.WTF)throw n}try{var i=mg[r]||r||"General";if(t.cellNF)e.z=i;if(t.cellDates&&e.t=="n"&&Le(i)){var s=ae(e.v+(a?1462:0));if(s){e.t="d";e.v=new Date(Date.UTC(s.y,s.m-1,s.d,s.H,s.M,s.S,s.u))}}}catch(n){if(t.WTF)throw n}}function kg(e,r,t){if(t.cellStyles){if(r.Interior){var a=r.Interior;if(a.Pattern)a.patternType=vc[a.Pattern]||a.Pattern}}e[r.ID]=r}function Ag(e,r,t,a,n,i,s,f,l,o,c){var h="General",u=a.StyleID,d={};o=o||{};var v=[];var p=0;if(u===undefined&&f)u=f.StyleID;if(u===undefined&&s)u=s.StyleID;while(i[u]!==undefined){var m=i[u];if(m.nf)h=m.nf;if(m.Interior)v.push(m.Interior);if(!m.Parent)break;u=m.Parent}switch(t.Type){case"Boolean":a.t="b";a.v=Ct(e);break;case"String":a.t="s";a.r=yt(pt(e));a.v=e.indexOf("<")>-1?pt(r||e).replace(/<[^<>]*>/g,""):a.r;break;case"DateTime":if(e.slice(-1)!="Z")e+="Z";a.v=dr(wr(e,c),c);if(a.v!==a.v)a.v=pt(e);if(!h||h=="General")h="yyyy-mm-dd";case"Number":if(a.v===undefined)a.v=+e;if(!a.t)a.t="n";break;case"Error":a.t="e";a.v=hi[e];if(o.cellText!==false)a.w=e;break;default:if(e==""&&r==""){a.t="z"}else{a.t="s";a.v=yt(r||e)}break;}wg(a,h,o,c);if(o.cellFormula!==false){if(a.Formula){var g=pt(a.Formula);if(g.charCodeAt(0)==61)g=g.slice(1);a.f=ru(g,n);delete a.Formula;if(a.ArrayRange=="RC")a.F=ru("RC:RC",n);else if(a.ArrayRange){a.F=ru(a.ArrayRange,n);l.push([en(a.F),a.F])}}else{for(p=0;p<l.length;++p)if(n.r>=l[p][0].s.r&&n.r<=l[p][0].e.r)if(n.c>=l[p][0].s.c&&n.c<=l[p][0].e.c)a.F=l[p][1]}}if(o.cellStyles){v.forEach(function(e){if(!d.patternType&&e.patternType)d.patternType=e.patternType});a.s=d}if(a.StyleID!==undefined)a.ixfe=a.StyleID}function Tg(e){return ui.indexOf("_xlnm."+e)>-1?"_xlnm."+e:e}function yg(e){e.t=e.v||"";e.t=e.t.replace(/\r\n/g,"\n").replace(/\r/g,"\n");e.v=e.w=e.ixfe=undefined}function Eg(e,r){var t=r||{};$e();var n=v(Ht(e));if(t.type=="binary"||t.type=="array"||t.type=="base64"){if(typeof a!=="undefined")n=a.utils.decode(65001,c(n));else n=It(n)}var i=n.slice(0,1024).toLowerCase(),s=false;i=i.replace(/".*?"/g,"");if((i.indexOf(">")&1023)>Math.min(i.indexOf(",")&1023,i.indexOf(";")&1023)){var f=Ar(t);f.type="string";return to.to_workbook(n,f)}if(i.indexOf("<?xml")==-1)["html","table","head","meta","script","style","div"].forEach(function(e){if(i.indexOf("<"+e)>=0)s=true});if(s)return Cb(n,t);mg={"General Number":"General","General Date":q[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":q[15],"Short Date":q[14],"Long Time":q[19],"Medium Time":q[18],"Short Time":q[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:q[2],Standard:q[4],Percent:q[10],Scientific:q[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var l;var o=[],h;if(b!=null&&t.dense==null)t.dense=b;var u={},d=[],p={},m="";if(t.dense)p["!data"]=[];var g={},w={};var k=vg('<Data ss:Type="String">'),A=0;var T=0,y=0;var E={s:{r:2e6,c:2e6},e:{r:0,c:0}};var C={},_={};var S="",x=0;var O=[];var I={},R={},N=0,F=[];var D=[],P={};var L=[],M,U=false;var B=[];var W=[],z={},H=0,V=0;var $={Sheets:[],WBProps:{date1904:false}},X={};Vt.lastIndex=0;n=Mr(n,"<!--","-->");var G="";while(l=Vt.exec(n))switch(l[3]=(G=l[3]).toLowerCase()){case"data":if(G=="data"){if(l[1]==="/"){if((h=o.pop())[0]!==l[3])throw new Error("Bad state: "+h.join("|"))}else if(l[0].charAt(l[0].length-2)!=="/")o.push([l[3],true]);break}if(o[o.length-1][1])break;if(l[1]==="/")Ag(n.slice(A,l.index),S,k,o[o.length-1][0]=="comment"?P:g,{c:T,r:y},C,L[T],w,B,t,$.WBProps.date1904);else{S="";k=vg(l[0]);A=l.index+l[0].length}break;case"cell":if(l[1]==="/"){if(D.length>0)g.c=D;if((!t.sheetRows||t.sheetRows>y)&&g.v!==void 0){if(t.dense){if(!p["!data"][y])p["!data"][y]=[];p["!data"][y][T]=g}else p[$a(T)+Wa(y)]=g}if(g.HRef){g.l={Target:pt(g.HRef)};if(g.HRefScreenTip)g.l.Tooltip=g.HRefScreenTip;delete g.HRef;delete g.HRefScreenTip}if(g.MergeAcross||g.MergeDown){H=T+(parseInt(g.MergeAcross,10)|0);V=y+(parseInt(g.MergeDown,10)|0);if(H>T||V>y)O.push({s:{c:T,r:y},e:{c:H,r:V}})}if(!t.sheetStubs){if(g.MergeAcross)T=H+1;else++T}else if(g.MergeAcross||g.MergeDown){for(var j=T;j<=H;++j){for(var K=y;K<=V;++K){if(j>T||K>y){if(t.dense){if(!p["!data"][K])p["!data"][K]=[];p["!data"][K][j]={t:"z"}}else p[$a(j)+Wa(K)]={t:"z"}}}}T=H+1}else++T}else{g=pg(l[0]);if(g.Index)T=+g.Index-1;if(T<E.s.c)E.s.c=T;if(T>E.e.c)E.e.c=T;if(l[0].slice(-2)==="/>")++T;D=[]}break;case"row":if(l[1]==="/"||l[0].slice(-2)==="/>"){if(y<E.s.r)E.s.r=y;if(y>E.e.r)E.e.r=y;if(l[0].slice(-2)==="/>"){w=vg(l[0]);if(w.Index)y=+w.Index-1}T=0;++y}else{w=vg(l[0]);if(w.Index)y=+w.Index-1;z={};if(w.AutoFitHeight=="0"||w.Height){z.hpx=parseInt(w.Height,10);z.hpt=uc(z.hpx);W[y]=z}if(w.Hidden=="1"){z.hidden=true;W[y]=z}}break;case"worksheet":if(l[1]==="/"){if((h=o.pop())[0]!==l[3])throw new Error("Bad state: "+h.join("|"));d.push(m);if(E.s.r<=E.e.r&&E.s.c<=E.e.c){p["!ref"]=Ja(E);if(t.sheetRows&&t.sheetRows<=E.e.r){p["!fullref"]=p["!ref"];E.e.r=t.sheetRows-1;p["!ref"]=Ja(E)}}if(O.length)p["!merges"]=O;if(L.length>0)p["!cols"]=L;if(W.length>0)p["!rows"]=W;u[m]=p}else{E={s:{r:2e6,c:2e6},e:{r:0,c:0}};y=T=0;o.push([l[3],false]);h=vg(l[0]);m=pt(h.Name);p={};if(t.dense)p["!data"]=[];O=[];B=[];W=[];X={name:m,Hidden:0};$.Sheets.push(X)}break;case"table":if(l[1]==="/"){if((h=o.pop())[0]!==l[3])throw new Error("Bad state: "+h.join("|"))}else if(l[0].slice(-2)=="/>")break;else{o.push([l[3],false]);L=[];U=false}break;case"style":if(l[1]==="/")kg(C,_,t);else _=vg(l[0]);break;case"numberformat":_.nf=pt(vg(l[0]).Format||"General");if(mg[_.nf])_.nf=mg[_.nf];for(var Y=0;Y!=392;++Y)if(q[Y]==_.nf)break;if(Y==392)for(Y=57;Y!=392;++Y)if(q[Y]==null){Je(_.nf,Y);break}break;case"column":if(o[o.length-1][0]!=="table")break;if(l[1]==="/")break;M=vg(l[0]);if(M.Hidden){M.hidden=true;delete M.Hidden}if(M.Width)M.wpx=parseInt(M.Width,10);if(!U&&M.wpx>10){U=true;ac=ec;for(var Z=0;Z<L.length;++Z)if(L[Z])oc(L[Z])}if(U)oc(M);L[M.Index-1||L.length]=M;for(var J=0;J<+M.Span;++J)L[L.length]=Ar(M);break;case"namedrange":if(l[1]==="/")break;if(!$.Names)$.Names=[];var Q=ct(l[0]);var ee={Name:Tg(Q.Name),Ref:ru(Q.RefersTo.slice(1),{r:0,c:0})};if($.Sheets.length>0)ee.Sheet=$.Sheets.length-1;$.Names.push(ee);break;case"namedcell":break;case"b":break;case"i":break;case"u":break;case"s":break;case"em":break;case"h2":break;case"h3":break;case"sub":break;case"sup":break;case"span":break;case"alignment":break;case"borders":break;case"border":break;case"font":if(l[0].slice(-2)==="/>")break;else if(l[1]==="/")S+=n.slice(x,l.index);else x=l.index+l[0].length;break;case"interior":if(!t.cellStyles)break;_.Interior=vg(l[0]);break;case"protection":break;case"author":;case"title":;case"description":;case"created":;case"keywords":;case"subject":;case"category":;case"company":;case"lastauthor":;case"lastsaved":;case"lastprinted":;case"version":;case"revision":;case"totaltime":;case"hyperlinkbase":;case"manager":;case"contentstatus":;case"identifier":;case"language":;case"appname":if(l[0].slice(-2)==="/>")break;else if(l[1]==="/")$i(I,G,n.slice(N,l.index));else N=l.index+l[0].length;break;case"paragraphs":break;case"styles":;case"workbook":if(l[1]==="/"){if((h=o.pop())[0]!==l[3])throw new Error("Bad state: "+h.join("|"))}else o.push([l[3],false]);break;case"comment":if(l[1]==="/"){if((h=o.pop())[0]!==l[3])throw new Error("Bad state: "+h.join("|"));yg(P);D.push(P)}else{o.push([l[3],false]);h=vg(l[0]);if(!Ct(h["ShowAlways"]||"0"))D.hidden=true;P={a:h.Author}}break;case"autofilter":if(l[1]==="/"){if((h=o.pop())[0]!==l[3])throw new Error("Bad state: "+h.join("|"))}else if(l[0].charAt(l[0].length-2)!=="/"){var re=vg(l[0]);p["!autofilter"]={ref:ru(re.Range).replace(/\$/g,"")};o.push([l[3],true])}break;case"name":break;case"datavalidation":if(l[1]==="/"){if((h=o.pop())[0]!==l[3])throw new Error("Bad state: "+h.join("|"))}else{if(l[0].charAt(l[0].length-2)!=="/")o.push([l[3],true])}break;case"pixelsperinch":break;case"componentoptions":;case"documentproperties":;case"customdocumentproperties":;case"officedocumentsettings":;case"pivottable":;case"pivotcache":;case"names":;case"mapinfo":;case"pagebreaks":;case"querytable":;case"sorting":;case"schema":;case"conditionalformatting":;case"smarttagtype":;case"smarttags":;case"excelworkbook":;case"workbookoptions":;case"worksheetoptions":if(l[1]==="/"){if((h=o.pop())[0]!==l[3])throw new Error("Bad state: "+h.join("|"))}else if(l[0].charAt(l[0].length-2)!=="/")o.push([l[3],true]);break;case"null":break;default:if(o.length==0&&l[3]=="document")return Mb(n,t);if(o.length==0&&l[3]=="uof")return Mb(n,t);var te=true;switch(o[o.length-1][0]){case"officedocumentsettings":switch(l[3]){case"allowpng":break;case"removepersonalinformation":break;case"downloadcomponents":break;case"locationofcomponents":break;case"colors":break;case"color":break;case"index":break;case"rgb":break;case"targetscreensize":break;case"readonlyrecommended":break;default:te=false;}break;case"componentoptions":switch(l[3]){case"toolbar":break;case"hideofficelogo":break;case"spreadsheetautofit":break;case"label":break;case"caption":break;case"maxheight":break;case"maxwidth":break;case"nextsheetnumber":break;default:te=false;}break;case"excelworkbook":switch(l[3]){case"date1904":$.WBProps.date1904=true;break;case"hidehorizontalscrollbar":break;case"hideverticalscrollbar":break;case"hideworkbooktabs":break;case"windowheight":break;case"windowwidth":break;case"windowtopx":break;case"windowtopy":break;case"tabratio":break;case"protectstructure":break;case"protectwindow":break;case"protectwindows":break;case"activesheet":break;case"displayinknotes":break;case"firstvisiblesheet":break;case"supbook":break;case"sheetname":break;case"sheetindex":break;case"sheetindexfirst":break;case"sheetindexlast":break;case"dll":break;case"acceptlabelsinformulas":break;case"donotsavelinkvalues":break;case"iteration":break;case"maxiterations":break;case"maxchange":break;case"path":break;case"xct":break;case"count":break;case"selectedsheets":break;case"calculation":break;case"uncalced":break;case"startupprompt":break;case"crn":break;case"externname":break;case"formula":break;case"colfirst":break;case"collast":break;case"wantadvise":break;case"boolean":break;case"error":break;case"text":break;case"ole":break;case"noautorecover":break;case"publishobjects":break;case"donotcalculatebeforesave":break;case"number":break;case"refmoder1c1":break;case"embedsavesmarttags":break;default:te=false;}break;case"workbookoptions":switch(l[3]){case"owcversion":break;case"height":break;case"width":break;default:te=false;}break;case"worksheetoptions":switch(l[3]){case"visible":if(l[0].slice(-2)==="/>"){}else if(l[1]==="/")switch(n.slice(N,l.index)){case"SheetHidden":X.Hidden=1;break;case"SheetVeryHidden":X.Hidden=2;break;}else N=l.index+l[0].length;break;case"header":if(!p["!margins"])Av(p["!margins"]={},"xlml");if(!isNaN(+ct(l[0]).Margin))p["!margins"].header=+ct(l[0]).Margin;break;case"footer":if(!p["!margins"])Av(p["!margins"]={},"xlml");if(!isNaN(+ct(l[0]).Margin))p["!margins"].footer=+ct(l[0]).Margin;break;case"pagemargins":var ae=ct(l[0]);if(!p["!margins"])A
vendor: 6,379 bytes, line 64889
64889v(p["!margins"]={},"xlml");if(!isNaN(+ae.Top))p["!margins"].top=+ae.Top;if(!isNaN(+ae.Left))p["!margins"].left=+ae.Left;if(!isNaN(+ae.Right))p["!margins"].right=+ae.Right;if(!isNaN(+ae.Bottom))p["!margins"].bottom=+ae.Bottom;break;case"displayrighttoleft":if(!$.Views)$.Views=[];if(!$.Views[0])$.Views[0]={};$.Views[0].RTL=true;break;case"freezepanes":break;case"frozennosplit":break;case"splithorizontal":;case"splitvertical":break;case"donotdisplaygridlines":break;case"activerow":break;case"activecol":break;case"toprowbottompane":break;case"leftcolumnrightpane":break;case"unsynced":break;case"print":break;case"printerrors":break;case"panes":break;case"scale":break;case"pane":break;case"number":break;case"layout":break;case"pagesetup":break;case"selected":break;case"protectobjects":break;case"enableselection":break;case"protectscenarios":break;case"validprinterinfo":break;case"horizontalresolution":break;case"verticalresolution":break;case"numberofcopies":break;case"activepane":break;case"toprowvisible":break;case"leftcolumnvisible":break;case"fittopage":break;case"rangeselection":break;case"papersizeindex":break;case"pagelayoutzoom":break;case"pagebreakzoom":break;case"filteron":break;case"fitwidth":break;case"fitheight":break;case"commentslayout":break;case"zoom":break;case"lefttoright":break;case"gridlines":break;case"allowsort":break;case"allowfilter":break;case"allowinsertrows":break;case"allowdeleterows":break;case"allowinsertcols":break;case"allowdeletecols":break;case"allowinserthyperlinks":break;case"allowformatcells":break;case"allowsizecols":break;case"allowsizerows":break;case"nosummaryrowsbelowdetail":if(!p["!outline"])p["!outline"]={};p["!outline"].above=true;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":if(!p["!outline"])p["!outline"]={};p["!outline"].left=true;break;case"blackandwhite":break;case"donotdisplayzeros":break;case"displaypagebreak":break;case"rowcolheadings":break;case"donotdisplayoutline":break;case"noorientation":break;case"allowusepivottables":break;case"zeroheight":break;case"viewablerange":break;case"selection":break;case"protectcontents":break;default:te=false;}break;case"pivottable":;case"pivotcache":switch(l[3]){case"immediateitemsondrop":break;case"showpagemultipleitemlabel":break;case"compactrowindent":break;case"location":break;case"pivotfield":break;case"orientation":break;case"layoutform":break;case"layoutsubtotallocation":break;case"layoutcompactrow":break;case"position":break;case"pivotitem":break;case"datatype":break;case"datafield":break;case"sourcename":break;case"parentfield":break;case"ptlineitems":break;case"ptlineitem":break;case"countofsameitems":break;case"item":break;case"itemtype":break;case"ptsource":break;case"cacheindex":break;case"consolidationreference":break;case"filename":break;case"reference":break;case"nocolumngrand":break;case"norowgrand":break;case"blanklineafteritems":break;case"hidden":break;case"subtotal":break;case"basefield":break;case"mapchilditems":break;case"function":break;case"refreshonfileopen":break;case"printsettitles":break;case"mergelabels":break;case"defaultversion":break;case"refreshname":break;case"refreshdate":break;case"refreshdatecopy":break;case"versionlastrefresh":break;case"versionlastupdate":break;case"versionupdateablemin":break;case"versionrefreshablemin":break;case"calculation":break;default:te=false;}break;case"pagebreaks":switch(l[3]){case"colbreaks":break;case"colbreak":break;case"rowbreaks":break;case"rowbreak":break;case"colstart":break;case"colend":break;case"rowend":break;default:te=false;}break;case"autofilter":switch(l[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:te=false;}break;case"querytable":switch(l[3]){case"id":break;case"autoformatfont":break;case"autoformatpattern":break;case"querysource":break;case"querytype":break;case"enableredirections":break;case"refreshedinxl9":break;case"urlstring":break;case"htmltables":break;case"connection":break;case"commandtext":break;case"refreshinfo":break;case"notitles":break;case"nextid":break;case"columninfo":break;case"overwritecells":break;case"donotpromptforfile":break;case"textwizardsettings":break;case"source":break;case"number":break;case"decimal":break;case"thousandseparator":break;case"trailingminusnumbers":break;case"formatsettings":break;case"fieldtype":break;case"delimiters":break;case"tab":break;case"comma":break;case"autoformatname":break;case"versionlastedit":break;case"versionlastrefresh":break;default:te=false;}break;case"datavalidation":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;case"cellrangelist":break;default:te=false;}break;case"sorting":;case"conditionalformatting":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"cellrangelist":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;default:te=false;}break;case"mapinfo":;case"schema":;case"data":switch(l[3]){case"map":break;case"entry":break;case"range":break;case"xpath":break;case"field":break;case"xsdtype":break;case"filteron":break;case"aggregate":break;case"elementtype":break;case"attributetype":break;case"schema":;case"element":;case"complextype":;case"datatype":;case"all":;case"attribute":;case"extends":break;case"row":break;default:te=false;}break;case"smarttags":break;default:te=false;break;}if(te)break;if(l[3].match(/!\[CDATA/))break;if(!o[o.length-1][1])throw"Unrecognized tag: "+l[3]+"|"+o.join("|");if(o[o.length-1][0]==="customdocumentproperties"){if(l[0].slice(-2)==="/>")break;else if(l[1]==="/")
vendor: 3,293 bytes, line 64889
64889bg(R,G,F,n.slice(N,l.index));else{F=l;N=l.index+l[0].length}break}if(t.WTF)throw"Unrecognized tag: "+l[3]+"|"+o.join("|");}var ne={};if(!t.bookSheets&&!t.bookProps)ne.Sheets=u;ne.SheetNames=d;ne.Workbook=$;ne.SSF=Ar(q);ne.Props=I;ne.Custprops=R;ne.bookType="xlml";return ne}function Cg(e,r){Jw(r=r||{});switch(r.type||"base64"){case"base64":return Eg(E(e),r);case"binary":;case"buffer":;case"file":return Eg(e,r);case"array":return Eg(N(e),r);}}function _g(e,r){var t=[];if(e.Props)t.push(Xi(e.Props,r));if(e.Custprops)t.push(Gi(e.Props,e.Custprops,r));return t.join("")}function Sg(e){if((((e||{}).Workbook||{}).WBProps||{}).date1904)return'<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"><Date1904/></ExcelWorkbook>';return""}function xg(e,r){var t=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];r.cellXfs.forEach(function(e,r){var a=[];a.push(Bt("NumberFormat",null,{"ss:Format":bt(q[e.numFmtId])}));var n={"ss:ID":"s"+(21+r)};t.push(Bt("Style",a.join(""),n))});return Bt("Styles",t.join(""))}function Og(e){return Bt("NamedRange",null,{"ss:Name":e.Name.slice(0,6)=="_xlnm."?e.Name.slice(6):e.Name,"ss:RefersTo":"="+nu(e.Ref,{r:0,c:0})})}function Ig(e){if(!((e||{}).Workbook||{}).Names)return"";var r=e.Workbook.Names;var t=[];for(var a=0;a<r.length;++a){var n=r[a];if(n.Sheet!=null)continue;if(n.Name.match(/^_xlfn\./))continue;t.push(Og(n))}return Bt("Names",t.join(""))}function Rg(e,r,t,a){if(!e)return"";if(!((a||{}).Workbook||{}).Names)return"";var n=a.Workbook.Names;var i=[];for(var s=0;s<n.length;++s){var f=n[s];if(f.Sheet!=t)continue;if(f.Name.match(/^_xlfn\./))continue;i.push(Og(f))}return i.join("")}function Ng(e,r,t,a){if(!e)return"";var n=[];if(e["!margins"]){n.push("<PageSetup>");if(e["!margins"].header)n.push(Bt("Header",null,{"x:Margin":e["!margins"].header}));if(e["!margins"].footer)n.push(Bt("Footer",null,{"x:Margin":e["!margins"].footer}));n.push(Bt("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"}));n.push("</PageSetup>")}if(a&&a.Workbook&&a.Workbook.Sheets&&a.Workbook.Sheets[t]){if(a.Workbook.Sheets[t].Hidden)n.push(Bt("Visible",a.Workbook.Sheets[t].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var i=0;i<t;++i)if(a.Workbook.Sheets[i]&&!a.Workbook.Sheets[i].Hidden)break;if(i==t)n.push("<Selected/>")}}if(((((a||{}).Workbook||{}).Views||[])[0]||{}).RTL)n.push("<DisplayRightToLeft/>");if(e["!protect"]){n.push(Mt("ProtectContents","True"));if(e["!protect"].objects)n.push(Mt("ProtectObjects","True"));if(e["!protect"].scenarios)n.push(Mt("ProtectScenarios","True"));if(e["!protect"].selectLockedCells!=null&&!e["!protect"].selectLockedCells)n.push(Mt("EnableSelection","NoSelection"));else if(e["!protect"].selectUnlockedCells!=null&&!e["!protect"].selectUnlockedCells)n.push(Mt("EnableSelection","UnlockedCells"));[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEac
vendor: 19,130 bytes, lines 64889-64890
64889h(function(r){if(e["!protect"][r[0]])n.push("<"+r[1]+"/>")})}if(n.length==0)return"";return Bt("WorksheetOptions",n.join(""),{xmlns:Gt.x})}function Fg(e){return e.map(function(r){var t=Et(r.t||"");var a=Bt("ss:Data",t,{xmlns:"http://www.w3.org/TR/REC-html40"});var n={};if(r.a)n["ss:Author"]=r.a;if(!e.hidden)n["ss:ShowAlways"]="1";return Bt("Comment",a,n)}).join("")}function Dg(e,r,t,a,n,i,s){if(!e||e.v==undefined&&e.f==undefined)return"";var f={};if(e.f)f["ss:Formula"]="="+bt(nu(e.f,s));if(e.F&&e.F.slice(0,r.length)==r){var l=Ka(e.F.slice(r.length+1));f["ss:ArrayRange"]="RC:R"+(l.r==s.r?"":"["+(l.r-s.r)+"]")+"C"+(l.c==s.c?"":"["+(l.c-s.c)+"]")}if(e.l&&e.l.Target){f["ss:HRef"]=bt(e.l.Target);if(e.l.Tooltip)f["x:HRefScreenTip"]=bt(e.l.Tooltip)}if(t["!merges"]){var o=t["!merges"];for(var c=0;c!=o.length;++c){if(o[c].s.c!=s.c||o[c].s.r!=s.r)continue;if(o[c].e.c>o[c].s.c)f["ss:MergeAcross"]=o[c].e.c-o[c].s.c;if(o[c].e.r>o[c].s.r)f["ss:MergeDown"]=o[c].e.r-o[c].s.r}}var h="",u="";switch(e.t){case"z":if(!a.sheetStubs)return"";break;case"n":{if(!isFinite(e.v)){h="Error";u=ci[isNaN(e.v)?36:7]}else{h="Number";u=String(e.v)}}break;case"b":h="Boolean";u=e.v?"1":"0";break;case"e":h="Error";u=ci[e.v];break;case"d":h="DateTime";u=new Date(e.v).toISOString();if(e.z==null)e.z=e.z||q[14];break;case"s":h="String";u=Tt(e.v||"");break;}var d=Tv(a.cellXfs,e,a);f["ss:StyleID"]="s"+(21+d);f["ss:Index"]=s.c+1;var v=e.v!=null?u:"";var p=e.t=="z"?"":'<Data ss:Type="'+h+'">'+v+"</Data>";if((e.c||[]).length>0)p+=Fg(e.c);return Bt("Cell",p,f)}function Pg(e,r){var t='<Row ss:Index="'+(e+1)+'"';if(r){if(r.hpt&&!r.hpx)r.hpx=dc(r.hpt);if(r.hpx)t+=' ss:AutoFitHeight="0" ss:Height="'+r.hpx+'"';if(r.hidden)t+=' ss:Hidden="1"'}return t+">"}function Lg(e,r,t,a){if(!e["!ref"])return"";var n=en(e["!ref"]);var i=e["!merges"]||[],s=0;var f=[];if(e["!cols"])e["!cols"].forEach(function(e,r){oc(e);var t=!!e.width;var a=kv(r,e);var n={"ss:Index":r+1};if(t)n["ss:Width"]=nc(a.width);if(e.hidden)n["ss:Hidden"]="1";f.push(Bt("Column",null,n))});var l=e["!data"]!=null;var o={r:0,c:0};for(var c=n.s.r;c<=n.e.r;++c){var h=[Pg(c,(e["!rows"]||[])[c])];o.r=c;for(var u=n.s.c;u<=n.e.c;++u){o.c=u;var d=false;for(s=0;s!=i.length;++s){if(i[s].s.c>u)continue;if(i[s].s.r>c)continue;if(i[s].e.c<u)continue;if(i[s].e.r<c)continue;if(i[s].s.c!=u||i[s].s.r!=c)d=true;break}if(d)continue;var v=$a(u)+Wa(c),p=l?(e["!data"][c]||[])[u]:e[v];h.push(Dg(p,v,e,r,t,a,o))}h.push("</Row>");if(h.length>2)f.push(h.join(""))}return f.join("")}function Mg(e,r,t){var a=[];var n=t.SheetNames[e];var i=t.Sheets[n];var s=i?Rg(i,r,e,t):"";if(s.length>0)a.push("<Names>"+s+"</Names>");s=i?Lg(i,r,e,t):"";if(s.length>0)a.push("<Table>"+s+"</Table>");a.push(Ng(i,r,e,t));if(i&&i["!autofilter"])a.push('<AutoFilter x:Range="'+nu(qa(i["!autofilter"].ref),{r:0,c:0})+'" xmlns="urn:schemas-microsoft-com:office:excel"></AutoFilter>');return a.join("")}function Ug(e,r){if(!r)r={};if(!e.SSF)e.SSF=Ar(q);if(e.SSF){$e();Ve(e.SSF);r.revssf=lr(e.SSF);r.revssf[e.SSF[65535]]=0;r.ssf=e.SSF;r.cellXfs=[];Tv(r.cellXfs,{},{revssf:{General:0}})}var t=[];t.push(_g(e,r));t.push(Sg(e,r));t.push("");t.push(Ig(e,r));for(var a=0;a<e.SheetNames.length;++a)t.push(Bt("Worksheet",Mg(a,r,e),{"ss:Name":bt(e.SheetNames[a])}));t[2]=xg(e,r);return at+Bt("Workbook",t.join(""),{xmlns:Gt.ss,"xmlns:o":Gt.o,"xmlns:x":Gt.x,"xmlns:ss":Gt.ss,"xmlns:dt":Gt.dt,"xmlns:html":Gt.html})}function Bg(e){var r={};var t=e.content;t.l=28;r.AnsiUserType=t._R(0,"lpstr-ansi");r.AnsiClipboardFormat=Hn(t);if(t.length-t.l<=4)return r;var a=t._R(4);if(a==0||a>40)return r;t.l-=4;r.Reserved1=t._R(0,"lpstr-ansi");if(t.length-t.l<=4)return r;a=t._R(4);if(a!==1907505652)return r;r.UnicodeClipboardFormat=Vn(t);a=t._R(4);if(a==0||a>40)return r;t.l-=4;r.Reserved2=t._R(0,"lpwstr")}var Wg=[60,1084,2066,2165,2175];function zg(e,r,t,a,n){var i=a;var s=[];var f=t.slice(t.l,t.l+i);if(n&&n.enc&&n.enc.insitu&&f.length>0)switch(e){case 9:;case 521:;case 1033:;case 2057:;case 47:;case 405:;case 225:;case 406:;case 312:;case 404:;case 10:break;case 133:break;default:n.enc.insitu(f);}s.push(f);t.l+=i;var l=ba(t,t.l),o=Jg[l];var c=0;while(o!=null&&Wg.indexOf(l)>-1){i=ba(t,t.l+2);c=t.l+4;if(l==2066)c+=4;else if(l==2165||l==2175){c+=12}f=t.slice(c,t.l+4+i);s.push(f);t.l+=4+i;o=Jg[l=ba(t,t.l)]}var h=P(s);Oa(h,0);var u=0;h.lens=[];for(var d=0;d<s.length;++d){h.lens.push(u);u+=s[d].length}if(h.length<a)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+h.length+" < "+a;return r.f(h,h.length,n)}function Hg(e,r,t){if(e.t==="z")return;if(!e.XF)return;var a=0;try{a=e.z||e.XF.numFmtId||0;if(r.cellNF&&e.z==null)e.z=q[a]}catch(n){if(r.WTF)throw n}if(!r||r.cellText!==false)try{if(e.t==="e"){e.w=e.w||ci[e.v]}else if(a===0||a=="General"){if(e.t==="n"){if((e.v|0)===e.v)e.w=e.v.toString(10);else e.w=le(e.v)}else e.w=oe(e.v)}else e.w=ze(a,e.v,{date1904:!!t,dateNF:r&&r.dateNF})}catch(n){if(r.WTF)throw n}if(r.cellDates&&a&&e.t=="n"&&Le(q[a]||String(a))){var i=ae(e.v+(t?1462:0));if(i){e.t="d";e.v=new Date(Date.UTC(i.y,i.m-1,i.d,i.H,i.M,i.S,i.u))}}}function Vg(e,r,t){return{v:e,ixfe:r,t:t}}function $g(e,r){var t={opts:{}};var a={};if(b!=null&&r.dense==null)r.dense=b;var n={};if(r.dense)n["!data"]=[];var i={};var s={};var f=null;var o=[];var c="";var h={};var u,d="",v,p,m,g;var w={};var k=[];var A;var T;var y=[];var E=[];var C={Sheets:[],WBProps:{date1904:false},Views:[{}]},_={};var S=false;var x=function pe(e){if(e<8)return oi[e];if(e<64)return E[e-8]||oi[e];return oi[e]};var O=function me(e,r){var t=e.XF.data;if(!t||!t.patternType||!r||!r.cellStyles)return;e.s={};e.s.patternType=t.patternType;var a;if(a=Zo(x(t.icvFore))){e.s.fgColor={rgb:a}}if(a=Zo(x(t.icvBack))){e.s.bgColor={rgb:a}}};var I=function ge(e,r,t){if(!S&&W>1)return;if(t.sheetRows&&e.r>=t.sheetRows)return;if(t.cellStyles&&r.XF&&r.XF.data)O(r,t);delete r.ixfe;delete r.XF;u=e;d=Ya(e);if(!s||!s.s||!s.e)s={s:{r:0,c:0},e:{r:0,c:0}};if(e.r<s.s.r)s.s.r=e.r;if(e.c<s.s.c)s.s.c=e.c;if(e.r+1>s.e.r)s.e.r=e.r+1;if(e.c+1>s.e.c)s.e.c=e.c+1;if(t.cellFormula&&r.f){for(var a=0;a<k.length;++a){if(k[a][0].s.c>e.c||k[a][0].s.r>e.r)continue;if(k[a][0].e.c<e.c||k[a][0].e.r<e.r)continue;r.F=Ja(k[a][0]);if(k[a][0].s.c!=e.c||k[a][0].s.r!=e.r)delete r.f;if(r.f)r.f=""+Md(k[a][1],s,e,U,R);break}}{if(t.dense){if(!n["!data"][e.r])n["!data"][e.r]=[];n["!data"][e.r][e.c]=r}else n[d]=r}};var R={enc:false,sbcch:0,snames:[],sharedf:w,arrayf:k,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!r&&!!r.cellStyles,WTF:!!r&&!!r.wtf};if(r.password)R.password=r.password;var N;var F=[];var D=[];var P=[],L=[];var M=false;var U=[];U.SheetNames=R.snames;U.sharedf=R.sharedf;U.arrayf=R.arrayf;U.names=[];U.XTI=[];var B=0;var W=0;var z=0,H=[];var V=[];var $;R.codepage=1200;l(1200);var X=false;while(e.l<e.length-1){var G=e.l;var j=e._R(2);if(j===0&&B===10)break;var K=e.l===e.length?0:e._R(2);var Y=Jg[j];if(W==0&&[9,521,1033,2057].indexOf(j)==-1)break;if(Y&&Y.f){if(r.bookSheets){if(B===133&&j!==133)break}B=j;if(Y.r===2||Y.r==12){var Z=e._R(2);K-=2;if(!R.enc&&Z!==j&&((Z&255)<<8|Z>>8)!==j)throw new Error("rt mismatch: "+Z+"!="+j);if(Y.r==12){e.l+=10;K-=10}}var J={};if(j===10)J=Y.f(e,K,R);else J=zg(j,Y,e,K,R);if(W==0&&[9,521,1033,2057].indexOf(B)===-1)continue;switch(j){case 34:t.opts.Date1904=C.WBProps.date1904=J;break;case 134:t.opts.WriteProtect=true;break;case 47:if(!R.enc)e.l=0;R.enc=J;if(!r.password)throw new Error("File is password-protected");if(J.valid==null)throw new Error("Encryption scheme unsupported");if(!J.valid)throw new Error("Password is incorrect");break;case 92:R.lastuser=J;break;case 66:var Q=Number(J);switch(Q){case 21010:Q=1200;break;case 32768:Q=1e4;break;case 32769:Q=1252;break;}l(R.codepage=Q);X=true;break;case 317:R.rrtabid=J;break;case 25:R.winlocked=J;break;case 439:t.opts["RefreshAll"]=J;break;case 12:t.opts["CalcCount"]=J;break;case 16:t.opts["CalcDelta"]=J;break;case 17:t.opts["CalcIter"]=J;break;case 13:t.opts["CalcMode"]=J;break;case 14:t.opts["CalcPrecision"]=J;break;case 95:t.opts["CalcSaveRecalc"]=J;break;case 15:R.CalcRefMode=J;break;case 2211:t.opts.FullCalc=J;break;case 129:if(J.fDialog)n["!type"]="dialog";if(!J.fBelow)(n["!outline"]||(n["!outline"]={})).above=true;if(!J.fRight)(n["!outline"]||(n["!outline"]={})).left=true;break;case 67:;case 579:;case 1091:;case 224:y.push(J);break;case 430:U.push([J]);U[U.length-1].XTI=[];break;case 35:;case 547:U[U.length-1].push(J);break;case 24:;case 536:$={Name:J.Name,Ref:Md(J.rgce,s,null,U,R)};if(J.itab>0)$.Sheet=J.itab-1;U.names.push($);if(!U[0]){U[0]=[];U[0].XTI=[]}U[U.length-1].push(J);if(J.Name=="_xlnm._FilterDatabase"&&J.itab>0)if(J.rgce&&J.rgce[0]&&J.rgce[0][0]&&J.rgce[0][0][0]=="PtgArea3d")V[J.itab-1]={ref:Ja(J.rgce[0][0][1][2])};break;case 22:R.ExternCount=J;break;case 23:if(U.length==0){U[0]=[];U[0].XTI=[]}U[U.length-1].XTI=U[U.length-1].XTI.concat(J);U.XTI=U.XTI.concat(J);break;case 2196:if(R.biff<8)break;if($!=null)$.Comment=J[1];break;case 18:n["!protect"]=J;break;case 19:if(J!==0&&R.WTF)console.error("Password verifier: "+J);break;case 133:{i[R.biff==4?R.snames.length:J.pos]=J;R.snames.push(J.name)}break;case 10:{if(--W?!S:S)break;if(s.e){if(s.e.r>0&&s.e.c>0){s.e.r--;s.e.c--;n["!ref"]=Ja(s);if(r.sheetRows&&r.sheetRows<=s.e.r){var ee=s.e.r;s.e.r=r.sheetRows-1;n["!fullref"]=n["!ref"];n["!ref"]=Ja(s);s.e.r=ee}s.e.r++;s.e.c++}if(F.length>0)n["!merges"]=F;if(D.length>0)n["!objects"]=D;if(P.length>0)n["!cols"]=P;if(L.length>0)n["!rows"]=L;C.Sheets.push(_)}if(c==="")h=n;else a[c]=n;n={};if(r.dense)n["!data"]=[]}break;case 9:;case 521:;case 1033:;case 2057:{if(R.biff===8)R.biff={9:2,521:3,1033:4}[j]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[J.BIFFVer]||8;R.biffguess=J.BIFFVer==0;if(J.BIFFVer==0&&J.dt==4096){R.biff=5;X=true;l(R.codepage=28591)}if(R.biff==4&&J.dt&256)S=true;if(R.biff==8&&J.BIFFVer==0&&J.dt==16)R.biff=2;if(W++&&!S)break;n={};if(r.dense)n["!data"]=[];if(R.biff<8&&!X){X=true;l(R.codepage=r.codepage||1252)}if(R.biff==4&&S){c=(i[R.snames.indexOf(c)+1]||{name:""}).name}else if(R.biff<5||J.BIFFVer==0&&J.dt==4096){if(c==="")c="Sheet1";s={s:{r:0,c:0},e:{r:0,c:0}};var re={pos:e.l-K,name:c};i[re.pos]=re;R.snames.push(c)}else c=(i[G]||{name:""}).name;if(J.dt==32)n["!type"]="chart";if(J.dt==64)n["!type"]="macro";F=[];D=[];R.arrayf=k=[];P=[];L=[];M=false;_={Hidden:(i[G]||{hs:0}).hs,name:c}}break;case 515:;case 3:;case 2:{if(n["!type"]=="chart")if(r.dense?(n["!data"][J.r]||[])[J.c]:n[$a(J.c)+Wa(J.r)])++J.c;A={ixfe:J.ixfe,XF:y[J.ixfe]||{},v:J.val,t:"n"};if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I({c:J.c,r:J.r},A,r)}break;case 5:;case 517:{A={ixfe:J.ixfe,XF:y[J.ixfe],v:J.val,t:J.t};if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904); 64890I({c:J.c,r:J.r},A,r)}break;case 638:{A={ixfe:J.ixfe,XF:y[J.ixfe],v:J.rknum,t:"n"};if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I({c:J.c,r:J.r},A,r)}break;case 189:{for(var te=J.c;te<=J.C;++te){var ae=J.rkrec[te-J.c][0];A={ixfe:ae,XF:y[ae],v:J.rkrec[te-J.c][1],t:"n"};if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I({c:te,r:J.r},A,r)}}break;case 6:;case 518:;case 1030:{if(J.val=="String"){f=J;break}A=Vg(J.val,J.cell.ixfe,J.tt);A.XF=y[A.ixfe];if(r.cellFormula){var ne=J.formula;if(ne&&ne[0]&&ne[0][0]&&ne[0][0][0]=="PtgExp"){var ie=ne[0][0][1][0],se=ne[0][0][1][1];var fe=Ya({r:ie,c:se});if(w[fe])A.f=""+Md(J.formula,s,J.cell,U,R);else A.F=((r.dense?(n["!data"][ie]||[])[se]:n[fe])||{}).F}else A.f=""+Md(J.formula,s,J.cell,U,R)}if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I(J.cell,A,r);f=J}break;case 7:;case 519:{if(f){f.val=J;A=Vg(J,f.cell.ixfe,"s");A.XF=y[A.ixfe];if(r.cellFormula){A.f=""+Md(f.formula,s,f.cell,U,R)}if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I(f.cell,A,r);f=null}else throw new Error("String record expects Formula")}break;case 33:;case 545:{k.push(J);var le=Ya(J[0].s);v=r.dense?(n["!data"][J[0].s.r]||[])[J[0].s.c]:n[le];if(r.cellFormula&&v){if(!f)break;if(!le||!v)break;v.f=""+Md(J[1],s,J[0],U,R);v.F=Ja(J[0])}}break;case 1212:{if(!r.cellFormula)break;if(d){if(!f)break;w[Ya(f.cell)]=J[0];v=r.dense?(n["!data"][f.cell.r]||[])[f.cell.c]:n[Ya(f.cell)];(v||{}).f=""+Md(J[0],s,u,U,R)}}break;case 253:A=Vg(o[J.isst].t,J.ixfe,"s");if(o[J.isst].h)A.h=o[J.isst].h;A.XF=y[A.ixfe];if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I({c:J.c,r:J.r},A,r);break;case 513:if(r.sheetStubs){A={ixfe:J.ixfe,XF:y[J.ixfe],t:"z"};if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I({c:J.c,r:J.r},A,r)}break;case 190:if(r.sheetStubs){for(var oe=J.c;oe<=J.C;++oe){var ce=J.ixfe[oe-J.c];A={ixfe:ce,XF:y[ce],t:"z"};if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I({c:oe,r:J.r},A,r)}}break;case 214:;case 516:;case 4:A=Vg(J.val,J.ixfe,"s");A.XF=y[A.ixfe];if(z>0)A.z=A.XF&&A.XF.numFmtId&&H[A.XF.numFmtId]||H[A.ixfe>>8&63];Hg(A,r,t.opts.Date1904);I({c:J.c,r:J.r},A,r);break;case 0:;case 512:{if(W===1)s=J}break;case 252:{o=J}break;case 1054:{if(R.biff>=3&&R.biff<=4){H[z++]=J[1];for(var he=0;he<z+163;++he)if(q[he]==J[1])break;if(he>=163)Je(J[1],z+163)}else Je(J[1],J[0])}break;case 30:{H[z++]=J;for(var ue=0;ue<z+163;++ue)if(q[ue]==J)break;if(ue>=163)Je(J,z+163)}break;case 229:F=F.concat(J);break;case 93:D[J.cmo[0]]=R.lastobj=J;break;case 438:R.lastobj.TxO=J;break;case 127:R.lastobj.ImData=J;break;case 440:{for(g=J[0].s.r;g<=J[0].e.r;++g)for(m=J[0].s.c;m<=J[0].e.c;++m){v=r.dense?(n["!data"][g]||[])[m]:n[Ya({c:m,r:g})];if(v)v.l=J[1]}}break;case 2048:{for(g=J[0].s.r;g<=J[0].e.r;++g)for(m=J[0].s.c;m<=J[0].e.c;++m){v=r.dense?(n["!data"][g]||[])[m]:n[Ya({c:m,r:g})];if(v&&v.l)v.l.Tooltip=J[1]}}break;case 28:{v=r.dense?(n["!data"][J[0].r]||[])[J[0].c]:n[Ya(J[0])];if(!v){if(r.dense){if(!n["!data"][J[0].r])n["!data"][J[0].r]=[];v=n["!data"][J[0].r][J[0].c]={t:"z"}}else{v=n[Ya(J[0])]={t:"z"}}s.e.r=Math.max(s.e.r,J[0].r);s.s.r=Math.min(s.s.r,J[0].r);s.e.c=Math.max(s.e.c,J[0].c);s.s.c=Math.min(s.s.c,J[0].c)}if(!v.c)v.c=[];if(R.biff<=5&&R.biff>=2)p={a:"SheetJ5",t:J[1]};else{var de=D[J[2]];p={a:J[1],t:de.TxO.t};if(J[3]!=null&&!(J[3]&2))v.c.hidden=true}v.c.push(p)}break;case 2173:dh(y[J.ixfe],J.ext);break;case 125:{if(!R.cellStyles)break;while(J.e>=J.s){P[J.e--]={width:J.w/256,level:J.level||0,hidden:!!(J.flags&1)};if(!M){M=true;lc(J.w/256)}oc(P[J.e+1])}}break;case 520:{var ve={};if(J.level!=null){L[J.r]=ve;ve.level=J.level}if(J.hidden){L[J.r]=ve;ve.hidden=true}if(J.hpt){L[J.r]=ve;ve.hpt=J.hpt;ve.hpx=dc(J.hpt)}}break;case 38:;case 39:;case 40:;case 41:if(!n["!margins"])Av(n["!margins"]={});n["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[j]]=J;break;case 161:if(!n["!margins"])Av(n["!margins"]={});n["!margins"].header=J.header;n["!margins"].footer=J.footer;break;case 574:if(J.RTL)C.Views[0].RTL=true;break;case 146:E=J;break;case 2198:N=J;break;case 140:T=J;break;case 442:{if(!c)C.WBProps.CodeName=J||"ThisWorkbook";else _.CodeName=J||_.name}break;}}else{if(!Y)console.error("Missing Info for XLS Record 0x"+j.toString(16));e.l+=K}}t.SheetNames=ir(i).sort(function(e,r){return Number(e)-Number(r)}).map(function(e){return i[e].name});if(!r.bookSheets)t.Sheets=a;if(!t.SheetNames.length&&h["!ref"]){t.SheetNames.push("Sheet1");if(t.Sheets)t.Sheets["Sheet1"]=h}else t.Preamble=h;if(t.Sheets)V.forEach(function(e,r){t.Sheets[t.SheetNames[r]]["!autofilter"]=e});t.Strings=o;t.SSF=Ar(q);if(R.enc)t.Encryption=R.enc;if(N)t.Themes=N;t.Metadata={};if(T!==undefined)t.Metadata.Country=T;if(U.names.length>0)C.Names=U.names;t.Workbook=C;return t}var Xg={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function Gg(e,r,t){var a=Qe.find(e,"/!DocumentSummaryInformation");if(a&&a.size>0)try{var n=ds(a,ai,Xg.DSI);for(var i in n)r[i]=n[i]}catch(s){if(t.WTF)throw s}var f=Qe.find(e,"/!SummaryInformation");if(f&&f.size>0)try{var l=ds(f,ni,Xg.SI);for(var o in l)if(r[o]==null)r[o]=l[o]}catch(s){if(t.WTF)throw s}if(r.HeadingPairs&&r.TitlesOfParts){Li(r.HeadingPairs,r.TitlesOfParts,r,t);delete r.HeadingPairs;delete r.TitlesOfParts}}function jg(e,r){var t=[],a=[],n=[];var i=0,s;var f=sr(ai,"n");var l=sr(ni,"n");if(e.Props){s=ir(e.Props);for(i=0;i<s.length;++i)(Object.prototype.hasOwnProperty.call(f,s[i])?t:Object.prototype.hasOwnProperty.call(l,s[i])?a:n).push([s[i],e.Props[s[i]]])}if(e.Custprops){s=ir(e.Custprops);for(i=0;i<s.length;++i)if(!Object.prototype.hasOwnProperty.call(e.Props||{},s[i]))(Object.prototype.hasOwnProperty.call(f,s[i])?t:Object.prototype.hasOwnProperty.call(l,s[i])?a:n).push([s[i],e.Custprops[s[i]]])}var o=[];for(i=0;i<n.length;++i){if(cs.indexOf(n[i][0])>-1||Pi.indexOf(n[i][0])>-1)continue;if(n[i][1]==null)continue;o.push(n[i])}if(a.length)Qe.utils.cfb_add(r,"/�SummaryInformation",vs(a,Xg.SI,l,ni));if(t.length||o.length)Qe.utils.cfb_add(r,"/�DocumentSummaryInformation",vs(t,Xg.DSI,f,ai,o.length?o:null,Xg.UDI))}function Kg(e,r){if(!r)r={};Jw(r);o();if(r.codepage)s(r.codepage);var t,a;if(e.FullPaths){if(Qe.find(e,"/encryption"))throw new Error("File is password-protected");t=Qe.find(e,"!CompObj");a=Qe.find(e,"/Workbook")||Qe.find(e,"/Book")}else{switch(r.type){case"base64":e=I(E(e));break;case"binary":e=I(e);break;case"buffer":break;case"array":if(!Array.isArray(e))e=Array.prototype.slice.call(e);break;}Oa(e,0);a={content:e}}var n;var i;if(t)Bg(t);if(r.bookProps&&!r.bookSheets)n={};else{var f=C?"buffer":"array";if(a&&a.content)n=$g(a.content,r);else if((i=Qe.find(e,"PerfectOffice_MAIN"))&&i.content)n=no.to_workbook(i.content,(r.type=f,r));else if((i=Qe.find(e,"NativeContent_MAIN"))&&i.content)n=no.to_workbook(i.content,(r.type=f,r));else if((i=Qe.find(e,"MN0"))&&i.content)throw new Error("Unsupported Works 4 for Mac file");else throw new Error("Cannot find Workbook stream");if(r.bookVBA&&e.FullPaths&&Qe.find(e,"/_VBA_PROJECT_CUR/VBA/dir"))n.vbaraw=Kh(e)}var l={};if(e.FullPaths)Gg(e,l,r);n.Props=n.Custprops=l;if(r.bookFiles)n.cfb=e;return n}function Yg(e,r){var t=r||{};var a=Qe.utils.cfb_new({root:"R"});var n="/Workbook";switch(t.bookType||"xls"){case"xls":t.bookType="biff8";case"xla":if(!t.bookType)t.bookType="xla";case"biff8":n="/Workbook";t.biff=8;break;case"biff5":n="/Book";t.biff=5;break;default:throw new Error("invalid type "+t.bookType+" for XLS CFB");}Qe.utils.cfb_add(a,n,kb(e,t));if(t.biff==8&&(e.Props||e.Custprops))jg(e,a);if(t.biff==8&&e.vbaraw)Yh(a,Qe.read(e.vbaraw,{type:typeof e.vbaraw=="string"?"binary":"buffer"}));return a}var Zg={0:{f:rp},1:{f:op},2:{f:Op},3:{f:gp},4:{f:dp},5:{f:Cp},6:{f:Dp},7:{f:Ap},8:{f:zp},9:{f:Wp},10:{f:Up},11:{f:Bp},12:{f:hp},13:{f:Rp},14:{f:wp},15:{f:pp},16:{f:Sp},17:{f:Lp},18:{f:yp},19:{f:vn},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:$m},40:{},42:{},43:{f:xc},44:{f:_c},45:{f:Nc},46:{f:Mc},47:{f:Dc},48:{},49:{f:ln},50:{},51:{f:mh},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:Rl},62:{f:Fp}
vendor: 8,035 bytes, line 64890
64890,63:{f:_h},64:{f:nm},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Ia,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:em},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:fp},148:{f:np,p:16},151:{f:jp},152:{},153:{f:zm},154:{},155:{},156:{f:Bm},157:{},158:{},159:{T:1,f:go},160:{T:-1},161:{T:1,f:Fn},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:Hp},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:vh},336:{T:-1},337:{f:wh,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:Sn},357:{},358:{},359:{},360:{T:1},361:{},362:{f:fl},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:Kp},427:{f:Yp},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:qp},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:sp},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:Xp},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:Sn},551:{f:En},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:Vh},633:{T:1},634:{T:-1},635:{T:1,f:zh},636:{T:-1},637:{f:mn},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:Tm},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:im},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};var Jg={6:{f:$d},10:{f:ps},12:{f:ks}
vendor: 4,127 bytes, line 64890
64890,13:{f:ks},14:{f:bs},15:{f:bs},16:{f:Pn},17:{f:bs},18:{f:bs},19:{f:ks},20:{f:al},21:{f:al},23:{f:fl},24:{f:sl},25:{f:bs},26:{},27:{},28:{f:vl},29:{},34:{f:bs},35:{f:il},38:{f:Pn},39:{f:Pn},40:{f:Pn},41:{f:Pn},42:{f:bs},43:{f:bs},47:{f:$o},49:{f:_f},51:{f:ks},60:{},61:{f:Af},64:{f:bs},65:{f:Cf},66:{f:ks},77:{},80:{},81:{},82:{},85:{f:ks},89:{},90:{},91:{},92:{f:of},93:{f:bl},94:{},95:{f:bs},96:{},97:{},99:{f:bs},125:{f:Rl},128:{f:Jf},129:{f:hf},130:{f:ks},131:{f:bs},132:{f:bs},133:{f:uf},134:{},140:{f:_l},141:{f:ks},144:{},146:{f:Ol},151:{},152:{},153:{},154:{},155:{},156:{f:ks},157:{},158:{},160:{f:Ml},161:{f:Fl},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:Wf},190:{f:zf},193:{f:ps},197:{},198:{},199:{},200:{},201:{},202:{f:bs},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:ks},220:{},221:{f:bs},222:{},224:{f:Vf},225:{f:lf},226:{f:ps},227:{},229:{f:ml},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:vf},253:{f:xf},255:{f:mf},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:Ts},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:bs},353:{f:ps},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:nl},431:{f:bs},432:{},433:{},434:{},437:{},438:{f:Al},439:{f:bs},440:{f:Tl},441:{},442:{f:Os},443:{},444:{f:ks},445:{},446:{},448:{f:ps},449:{f:wf,r:2},450:{f:ps},512:{f:Mf},513:{f:Ll},515:{f:rl},516:{f:If},517:{f:Qf},519:{f:Ul},520:{f:gf},523:{},545:{f:hl},549:{f:kf},566:{},574:{f:yf},638:{f:Bf},659:{},1048:{},1054:{f:Nf},1084:{},1212:{f:cl},2048:{f:El},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:sf},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:ps},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:Il,r:12},2173:{f:uh,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:bs,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:ol,r:12},2197:{},2198:{f:sh,r:12},2199:{},2200:{},2201:{},2202:{f:ul,r:12},2203:{f:ps},2204:{},2205:{},2206:{},2207:{},2211:{f:bf},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:ks},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:Dl},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:xl},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:Mf},1:{},2:{f:$l},3:{f:Hl},4:{f:zl},5:{f:jl},7:{f:Gl},8:{},9:{f:sf},11:{},22:{f:ks},30:{f:Df},31:{},32:{},33:{f:hl},36:{},37:{f:kf},50:{f:Kl},62:{},52:{},67:{f:Xf},68:{f:ks},69:{},86:{},126:{},127:{f:Bl},135:{},136:{},137:{},143:{f:Zl},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:Yl},223:{},234:{},354:{},421:{},518:{f:$d},521:{f:sf},536:{f:sl},547:{f:il},561:{},579:{f:Yf},1030:{f:$d},1033:{f:sf},1091:{f:Zf},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},101:{},102:{},105:{},106:{},107:{},109:{},112:{},114:{},29282:{}};function qg(e,r,t,a){var n=r;if(isNaN(n))return;var i=a||(t||[]).length||0;var s=e.next(4);s._W(2,n);s._W(2,i);if(i>0&&pa(t))e.push(t)}function Qg(e,r,t,a){var n=a||(t||[]).length||0;if(n<=8224)return qg(e,r,t,n);var i=r;if(isNaN(i))return;var s=t.parts||[],f=0;var l=0,o=0;while(o+(s[f]||8224)<=8224){o+=s[f]||8224;f++}var c=e.next(4);c._W(2,i);c._W(2,o);e.push(t.slice(l,l+o));l+=o;while(l<n){c=e.next(4);c._W(2,60);o=0;while(o+(s[f]||8224)<=8224){o+=s[f]||8224;f++}c._W(2,o);
vendor: 89,166 bytes, lines 64890-64893
64890e.push(t.slice(l,l+o));l+=o}}function eb(e,r,t,a){var n=Ra(9);Wl(n,e,r);Es(t,a||"b",n);return n}function rb(e,r,t){var a=Ra(8+2*t.length);Wl(a,e,r);a._W(1,t.length);a._W(t.length,t,"sbcs");return a.l<a.length?a.slice(0,a.l):a}function tb(e,r){r.forEach(function(r){var t=r[0].map(function(e){return e.t}).join("");if(t.length<=2048)return qg(e,28,pl(t,r[1],r[2]));qg(e,28,pl(t.slice(0,2048),r[1],r[2],t.length));for(var a=2048;a<t.length;a+=2048)qg(e,28,pl(t.slice(a,Math.min(a+2048,t.length)),-1,-1,Math.min(2048,t.length-a)))})}function ab(e,r,t,a,n,i){var s=0;if(r.z!=null){s=n._BIFF2FmtTable.indexOf(r.z);if(s==-1){n._BIFF2FmtTable.push(r.z);s=n._BIFF2FmtTable.length-1}}var f=0;if(r.z!=null){for(;f<n.cellXfs.length;++f)if(n.cellXfs[f].numFmtId==s)break;if(f==n.cellXfs.length)n.cellXfs.push({numFmtId:s})}if(r.v!=null)switch(r.t){case"d":;case"n":var l=r.t=="d"?dr(wr(r.v,i),i):r.v;if(n.biff==2&&l==(l|0)&&l>=0&&l<65536)qg(e,2,Xl(t,a,l,f,s));else if(isNaN(l))qg(e,5,eb(t,a,36,"e"));else if(!isFinite(l))qg(e,5,eb(t,a,7,"e"));else qg(e,3,Vl(t,a,l,f,s));return;case"b":;case"e":qg(e,5,eb(t,a,r.v,r.t));return;case"s":;case"str":qg(e,4,rb(t,a,r.v==null?"":String(r.v).slice(0,255)));return;}qg(e,1,Wl(null,t,a))}function nb(e,r,t,a,n){var i=r["!data"]!=null;var s=en(r["!ref"]||"A1"),f="",l=[];if(s.e.c>255||s.e.r>16383){if(a.WTF)throw new Error("Range "+(r["!ref"]||"A1")+" exceeds format limit A1:IV16384");s.e.c=Math.min(s.e.c,255);s.e.r=Math.min(s.e.r,16383)}var o=(((n||{}).Workbook||{}).WBProps||{}).date1904;var c=[],h=[];for(var u=s.s.c;u<=s.e.c;++u)l[u]=$a(u);for(var d=s.s.r;d<=s.e.r;++d){if(i)c=r["!data"][d]||[];f=Wa(d);for(u=s.s.c;u<=s.e.c;++u){var v=i?c[u]:r[l[u]+f];if(!v)continue;ab(e,v,d,u,a,o);if(v.c)h.push([v.c,d,u])}}tb(e,h)}function ib(e,r){var t=r||{};var a=Fa();var n=0;for(var i=0;i<e.SheetNames.length;++i)if(e.SheetNames[i]==t.sheet)n=i;if(n==0&&!!t.sheet&&e.SheetNames[0]!=t.sheet)throw new Error("Sheet not found: "+t.sheet);qg(a,t.biff==4?1033:t.biff==3?521:9,ff(e,16,t));if(((e.Workbook||{}).WBProps||{}).date1904)qg(a,34,ws(true));t.cellXfs=[{numFmtId:0}];t._BIFF2FmtTable=["General"];t._Fonts=[];var s=Fa();nb(s,e.Sheets[e.SheetNames[n]],n,t,e);t._BIFF2FmtTable.forEach(function(e){if(t.biff<=3)qg(a,30,Pf(e));else qg(a,1054,Lf(e))});t.cellXfs.forEach(function(e){switch(t.biff){case 2:qg(a,67,Gf(e));break;case 3:qg(a,579,jf(e));break;case 4:qg(a,1091,Kf(e));break;}});delete t._BIFF2FmtTable;delete t.cellXfs;delete t._Fonts;a.push(s.end());qg(a,10);return a.end()}var sb=1,fb=[];function lb(){var e=Ra(82+8*fb.length);e._W(2,15);e._W(2,61440);e._W(4,74+8*fb.length);{e._W(2,0);e._W(2,61446);e._W(4,16+8*fb.length);{e._W(4,sb);e._W(4,fb.length+1);var r=0;for(var t=0;t<fb.length;++t)r+=fb[t]&&fb[t][1]||0;e._W(4,r);e._W(4,fb.length)}fb.forEach(function(r){e._W(4,r[0]);e._W(4,r[2])})}{e._W(2,51);e._W(2,61451);e._W(4,18);e._W(2,191);e._W(4,524296);e._W(2,385);e._W(4,134217793);e._W(2,448);e._W(4,134217792)}{e._W(2,64);e._W(2,61726);e._W(4,16);e._W(4,134217741);e._W(4,134217740);e._W(4,134217751);e._W(4,268435703)}return e}function ob(e,r){var t=[],a=0,n=Fa(),i=sb;var s;r.forEach(function(e,r){var i="";var f=e[0].map(function(e){if(e.a&&!i)i=e.a;return e.t}).join("");++sb;{var l=Ra(150);l._W(2,15);l._W(2,61444);l._W(4,150);{l._W(2,3234);l._W(2,61450);l._W(4,8);l._W(4,sb);l._W(4,2560)}{l._W(2,227);l._W(2,61451);l._W(4,84);l._W(2,128);l._W(4,0);l._W(2,139);l._W(4,2);l._W(2,191);l._W(4,524296);l._W(2,344);l.l+=4;l._W(2,385);l._W(4,134217808);l._W(2,387);l._W(4,134217808);l._W(2,389);l._W(4,268435700);l._W(2,447);l._W(4,1048592);l._W(2,448);l._W(4,134217809);l._W(2,451);l._W(4,268435700);l._W(2,513);l._W(4,134217809);l._W(2,515);l._W(4,268435700);l._W(2,575);l._W(4,196609);l._W(2,959);l._W(4,131072|(e[0].hidden?2:0))}{l.l+=2;l._W(2,61456);l._W(4,18);l._W(2,3);l._W(2,e[2]+2);l.l+=2;l._W(2,e[1]+1);l.l+=2;l._W(2,e[2]+4);l.l+=2;l._W(2,e[1]+5);l.l+=2}{l.l+=2;l._W(2,61457);l.l+=4}l.l=150;if(r==0)s=l;else qg(n,236,l)}a+=150;{var o=Ra(52);o._W(2,21);o._W(2,18);o._W(2,25);o._W(2,sb);o._W(2,0);o.l=22;o._W(2,13);o._W(2,22);o._W(4,1651663474);o._W(4,2503426821);o._W(4,2150634280);o._W(4,1768515844+sb*256);o._W(2,0);o._W(4,0);o.l+=4;qg(n,93,o)}{var c=Ra(8);c.l+=2;c._W(2,61453);c.l+=4;qg(n,236,c)}a+=8;{var h=Ra(18);h._W(2,18);h.l+=8;h._W(2,f.length);h._W(2,16);h.l+=4;qg(n,438,h);{var u=Ra(1+f.length);u._W(1,0);u._W(f.length,f,"sbcs");qg(n,60,u)}{var d=Ra(16);d.l+=8;d._W(2,f.length);d.l+=6;qg(n,60,d)}}{var v=Ra(12+i.length);v._W(2,e[1]);v._W(2,e[2]);v._W(2,0|(e[0].hidden?0:2));v._W(2,sb);v._W(2,i.length);v._W(1,0);v._W(i.length,i,"sbcs");v.l++;t.push(v)}});{var f=Ra(80);f._W(2,15);f._W(2,61442);f._W(4,a+f.length-8);{f._W(2,16);f._W(2,61448);f._W(4,8);f._W(4,r.length+1);f._W(4,sb)}{f._W(2,15);f._W(2,61443);f._W(4,a+48);{f._W(2,15);f._W(2,61444);f._W(4,40);{f._W(2,1);f._W(2,61449);f._W(4,16);f.l+=16}{f._W(2,2);f._W(2,61450);f._W(4,8);f._W(4,i);f._W(4,5)}}}qg(e,236,s?P([f,s]):f)}e.push(n.end());t.forEach(function(r){qg(e,28,r)});fb.push([i,r.length+1,sb]);++sb}function cb(e,r,t){qg(e,49,Sf({sz:12,color:{theme:1},name:"Arial",family:2,scheme:"minor"},t))}function hb(e,r,t){if(!r)return;[[5,8],[23,26],[41,44],[50,392]].forEach(function(a){for(var n=a[0];n<=a[1];++n)if(r[n]!=null)qg(e,1054,Ff(n,r[n],t))})}function ub(e,r){var t=Ra(19);t._W(4,2151);t._W(4,0);t._W(4,0);t._W(2,3);t._W(1,1);t._W(4,0);qg(e,2151,t);t=Ra(39);t._W(4,2152);t._W(4,0);t._W(4,0);t._W(2,3);t._W(1,0);t._W(4,0);t._W(2,1);t._W(4,4);t._W(2,0);Zs(en(r["!ref"]||"A1"),t);t._W(4,4);qg(e,2152,t)}function db(e,r){for(var t=0;t<16;++t)qg(e,224,$f({numFmtId:0,style:true},0,r));r.cellXfs.forEach(function(t){qg(e,224,$f(t,0,r))})}function vb(e,r){for(var t=0;t<r["!links"].length;++t){var a=r["!links"][t];qg(e,440,yl(a));if(a[1].Tooltip)qg(e,2048,Cl(a))}delete r["!links"]}function pb(e,r){if(!r)return;var t=0;r.forEach(function(r,a){if(++t<=256&&r){qg(e,125,Nl(kv(a,r),a))}})}function mb(e,r,t,a,n,i){var s=16+Tv(n.cellXfs,r,n);if(r.v==null&&!r.bf){qg(e,513,Vs(t,a,s));return}if(r.bf)qg(e,6,Xd(r,t,a,n,s));else switch(r.t){case"d":;case"n":var f=r.t=="d"?dr(wr(r.v,i),i):r.v;if(isNaN(f))qg(e,517,el(t,a,36,s,n,"e"));else if(!isFinite(f))qg(e,517,el(t,a,7,s,n,"e"));else qg(e,515,tl(t,a,f,s,n));break;case"b":;case"e":qg(e,517,el(t,a,r.v,s,n,r.t));break;case"s":;case"str":if(n.bookSST){var l=wv(n.Strings,r.v==null?"":String(r.v),n.revStrings);qg(e,253,Of(t,a,l,s,n))}else qg(e,516,Rf(t,a,(r.v==null?"":String(r.v)).slice(0,255),s,n));break;default:qg(e,513,Vs(t,a,s));}}function gb(e,r,t){var a=Fa();var n=t.SheetNames[e],i=t.Sheets[n]||{};var s=(t||{}).Workbook||{};var f=(s.Sheets||[])[e]||{};var l=i["!data"]!=null;var o=r.biff==8;var c,h="",u=[];var d=en(i["!ref"]||"A1");var v=o?65536:16384;if(d.e.c>255||d.e.r>=v){if(r.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV"+v);d.e.c=Math.min(d.e.c,255);d.e.r=Math.min(d.e.r,v-1)}qg(a,2057,ff(t,16,r));qg(a,13,As(1));qg(a,12,As(100));qg(a,15,ws(true));qg(a,17,ws(false));qg(a,16,Ln(.001));qg(a,95,ws(true));qg(a,42,ws(false));qg(a,43,ws(false));qg(a,130,As(1));qg(a,128,qf([0,0]));qg(a,131,ws(false));qg(a,132,ws(false));if(o)pb(a,i["!cols"]);qg(a,512,Uf(d,r));var p=(((t||{}).Workbook||{}).WBProps||{}).date1904;if(o)i["!links"]=[];for(var m=d.s.c;m<=d.e.c;++m)u[m]=$a(m);var g=[];var b=[];for(var w=d.s.r;w<=d.e.r;++w){if(l)b=i["!data"][w]||[];h=Wa(w);for(m=d.s.c;m<=d.e.c;++m){var k=l?b[m]:i[u[m]+h];if(!k)continue;mb(a,k,w,m,r,p);if(o&&k.l)i["!links"].push([u[m]+h,k.l]);if(k.c)g.push([k.c,w,m])}}var A=f.CodeName||f.name||n;if(o)ob(a,g);else tb(a,g);if(o)qg(a,574,Ef((s.Views||[])[0]));if(o&&(i["!merges"]||[]).length)qg(a,229,gl(i["!merges"]));if(o)vb(a,i);qg(a,442,Rs(A,r));if(o)ub(a,i);qg(a,10);return a.end()}function bb(e,r,t){var a=Fa();var n=(e||{}).Workbook||{};var i=n.Sheets||[];var s=n.WBProps||{};var f=t.biff==8,l=t.biff==5;qg(a,2057,ff(e,5,t));if(t.bookType=="xla")qg(a,135);qg(a,225,f?As(1200):null);qg(a,193,ms(2));if(l)qg(a,191);if(l)qg(a,192);qg(a,226);qg(a,92,cf("SheetJS",t));qg(a,66,As(f?1200:1252));if(f)qg(a,353,As(0));if(f)qg(a,448);qg(a,317,Pl(e.SheetNames.length));if(f&&e.vbaraw)qg(a,211);if(f&&e.vbaraw){var o=s.CodeName||"ThisWorkbook";qg(a,442,Rs(o,t))}qg(a,156,As(17));qg(a,25,ws(false));qg(a,18,ws(false));qg(a,19,As(0));if(f)qg(a,431,ws(false));if(f)qg(a,444,As(0));qg(a,61,Tf(t));qg(a,64,ws(false));qg(a,141,As(0));qg(a,34,ws(Rm(e)=="true"));qg(a,14,ws(true));if(f)qg(a,439,ws(false));qg(a,218,As(0));cb(a,e,t);hb(a,e.SSF,t);db(a,t);if(f)qg(a,352,ws(false));var c=a.end();var h=Fa();if(f)qg(h,140,Sl());if(f&&fb.length)qg(h,235,lb());if(f&&t.Strings)Qg(h,252,pf(t.Strings,t));qg(h,10);var u=h.end();var d=Fa();var v=0,p=0;for(p=0;p<e.SheetNames.length;++p)v+=(f?12:11)+(f?2:1)*e.SheetNames[p].length;var m=c.length+v+u.length;for(p=0;p<e.SheetNames.length;++p){var g=i[p]||{};qg(d,133,df({pos:m,hs:g.Hidden||0,dt:0,name:e.SheetNames[p]},t));m+=r[p].length}var b=d.end();if(v!=b.length)throw new Error("BS8 "+v+" != "+b.length);var w=[];if(c.length)w.push(c);if(b.length)w.push(b);if(u.length)w.push(u);return P(w)}function wb(e,r){var t=r||{};var a=[];if(e&&!e.SSF){e.SSF=Ar(q)}if(e&&e.SSF){$e();Ve(e.SSF);t.revssf=lr(e.SSF);t.revssf[e.SSF[65535]]=0;t.ssf=e.SSF}sb=1;fb=[];t.Strings=[];t.Strings.Count=0;t.Strings.Unique=0;qw(t);t.cellXfs=[];Tv(t.cellXfs,{},{revssf:{General:0}});if(!e.Props)e.Props={};for(var n=0;n<e.SheetNames.length;++n)a[a.length]=gb(n,t,e);a.unshift(bb(e,a,t));return P(a)}function kb(e,r){for(var t=0;t<=e.SheetNames.length;++t){var a=e.Sheets[e.SheetNames[t]];if(!a||!a["!ref"])continue;var n=Za(a["!ref"]);if(n.e.c>255){if(typeof console!="undefined"&&console.error)console.error("Worksheet '"+e.SheetNames[t]+"' extends beyond column IV (255). Data may be lost.")}if(n.e.r>65535){if(typeof console!="undefined"&&console.error)console.error("Worksheet '"+e.SheetNames[t]+"' extends beyond row 65536. Data may be lost.")}}var i=r||{};switch(i.biff||2){case 8:;case 5:return wb(e,r);case 4:;case 3:;case 2:return ib(e,r);}throw new Error("invalid type "+i.bookType+" for BIFF")}function Ab(e,r){var t=r||{};var a=t.dense!=null?t.dense:b;var n={}; 64891if(a)n["!data"]=[];e=Mr(e,"<!--","-->");var i=e.match(/<table/i);if(!i)throw new Error("Invalid HTML: could not find <table>");var s=e.match(/<\/table/i);var f=i.index,l=s&&s.index||e.length;var o=Nr(e.slice(f,l),/(:?<tr[^<>]*>)/i,"<tr>");var c=-1,h=0,u=0,d=0;var v={s:{r:1e7,c:1e7},e:{r:0,c:0}};var p=[];for(f=0;f<o.length;++f){var m=o[f].trim();var g=m.slice(0,3).toLowerCase();if(g=="<tr"){++c;if(t.sheetRows&&t.sheetRows<=c){--c;break}h=0;continue}if(g!="<td"&&g!="<th")continue;var w=m.split(/<\/t[dh]>/i);for(l=0;l<w.length;++l){var k=w[l].trim();if(!k.match(/<t[dh]/i))continue;var A=k,T=0;while(A.charAt(0)=="<"&&(T=A.indexOf(">"))>-1)A=A.slice(T+1);for(var y=0;y<p.length;++y){var E=p[y];if(E.s.c==h&&E.s.r<c&&c<=E.e.r){h=E.e.c+1;y=-1}}var C=ct(k.slice(0,k.indexOf(">")));d=C.colspan?+C.colspan:1;if((u=+C.rowspan)>1||d>1)p.push({s:{r:c,c:h},e:{r:c+(u||1)-1,c:h+d-1}});var _=C.t||C["data-t"]||"";if(!A.length){h+=d;continue}A=Nt(A);if(v.s.r>c)v.s.r=c;if(v.e.r<c)v.e.r=c;if(v.s.c>h)v.s.c=h;if(v.e.c<h)v.e.c=h;if(!A.length){h+=d;continue}var S={t:"s",v:A};if(t.raw||!A.trim().length||_=="s"){}else if(A==="TRUE")S={t:"b",v:true};else if(A==="FALSE")S={t:"b",v:false};else if(!isNaN(yr(A)))S={t:"n",v:yr(A)};else if(!isNaN(Rr(A).getDate())){S={t:"d",v:wr(A)};if(t.UTC===false)S.v=Fr(S.v);if(!t.cellDates)S={t:"n",v:dr(S.v)};S.z=t.dateNF||q[14]}else if(A.charCodeAt(0)==35&&hi[A]!=null){S.t="e";S.w=A;S.v=hi[A]}if(S.cellText!==false)S.w=A;if(a){if(!n["!data"][c])n["!data"][c]=[];n["!data"][c][h]=S}else n[Ya({r:c,c:h})]=S;h+=d}}n["!ref"]=Ja(v);if(p.length)n["!merges"]=p;return n}function Tb(e,r,t,a){var n=e["!merges"]||[];var i=[];var s={};var f=e["!data"]!=null;for(var l=r.s.c;l<=r.e.c;++l){var o=0,c=0;for(var h=0;h<n.length;++h){if(n[h].s.r>t||n[h].s.c>l)continue;if(n[h].e.r<t||n[h].e.c<l)continue;if(n[h].s.r<t||n[h].s.c<l){o=-1;break}o=n[h].e.r-n[h].s.r+1;c=n[h].e.c-n[h].s.c+1;break}if(o<0)continue;var u=$a(l)+Wa(t);var d=f?(e["!data"][t]||[])[l]:e[u];if(d&&d.t=="n"&&d.v!=null&&!isFinite(d.v)){if(isNaN(d.v))d={t:"e",v:36,w:ci[36]};else d={t:"e",v:7,w:ci[7]}}var v=d&&d.v!=null&&(d.h||At(d.w||(tn(d),d.w)||""))||"";s={};if(o>1)s.rowspan=o;if(c>1)s.colspan=c;if(a.editable)v='<span contenteditable="true">'+v+"</span>";else if(d){s["data-t"]=d&&d.t||"z";if(d.v!=null)s["data-v"]=At(d.v instanceof Date?d.v.toISOString():d.v);if(d.z!=null)s["data-z"]=d.z;if(d.l&&(d.l.Target||"#").charAt(0)!="#")v='<a href="'+At(d.l.Target)+'">'+v+"</a>"}s.id=(a.id||"sjs")+"-"+u;i.push(Bt("td",v,s))}var p="<tr>";return p+i.join("")+"</tr>"}var yb='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>';var Eb="</body></html>";function Cb(e,r){var t=Vr(e,"table");if(!t||t.length==0)throw new Error("Invalid HTML: could not find <table>");if(t.length==1){var a=an(Ab(t[0],r),r);a.bookType="html";return a}var n=$k();t.forEach(function(e,t){Xk(n,Ab(e,r),"Sheet"+(t+1))});n.bookType="html";return n}function _b(e,r,t){var a=[];return a.join("")+"<table"+(t&&t.id?' id="'+t.id+'"':"")+">"}function Sb(e,r){var t=r||{};var a=t.header!=null?t.header:yb;var n=t.footer!=null?t.footer:Eb;var i=[a];var s=Za(e["!ref"]||"A1");i.push(_b(e,s,t));if(e["!ref"])for(var f=s.s.r;f<=s.e.r;++f)i.push(Tb(e,s,f,t));i.push("</table>"+n);return i.join("")}function xb(e,r,t){var a=r.rows;if(!a){throw"Unsupported origin when "+r.tagName+" is not a TABLE"}var n=t||{};var i=e["!data"]!=null;var s=0,f=0;if(n.origin!=null){if(typeof n.origin=="number")s=n.origin;else{var l=typeof n.origin=="string"?Ka(n.origin):n.origin;s=l.r;f=l.c}}var o=Math.min(n.sheetRows||1e7,a.length);var c={s:{r:0,c:0},e:{r:s,c:f}};if(e["!ref"]){var h=Za(e["!ref"]);c.s.r=Math.min(c.s.r,h.s.r);c.s.c=Math.min(c.s.c,h.s.c);c.e.r=Math.max(c.e.r,h.e.r);c.e.c=Math.max(c.e.c,h.e.c);if(s==-1)c.e.r=s=h.e.r+1}var u=[],d=0;var v=e["!rows"]||(e["!rows"]=[]);var p=0,m=0,g=0,b=0,w=0,k=0;if(!e["!cols"])e["!cols"]=[];for(;p<a.length&&m<o;++p){var A=a[p];if(Rb(A)){if(n.display)continue;v[m]={hidden:true}}var T=A.cells;for(g=b=0;g<T.length;++g){var y=T[g];if(n.display&&Rb(y))continue;var E=y.hasAttribute("data-v")?y.getAttribute("data-v"):y.hasAttribute("v")?y.getAttribute("v"):Nt(y.innerHTML);var C=y.getAttribute("data-z")||y.getAttribute("z");for(d=0;d<u.length;++d){var _=u[d];if(_.s.c==b+f&&_.s.r<m+s&&m+s<=_.e.r){b=_.e.c+1-f;d=-1}}k=+y.getAttribute("colspan")||1;if((w=+y.getAttribute("rowspan")||1)>1||k>1)u.push({s:{r:m+s,c:b+f},e:{r:m+s+(w||1)-1,c:b+f+(k||1)-1}});var S={t:"s",v:E};var x=y.getAttribute("data-t")||y.getAttribute("t")||"";if(E!=null){if(E.length==0)S.t=x||"z";else if(n.raw||E.trim().length==0||x=="s"){}else if(x=="e"&&ci[+E])S={t:"e",v:+E,w:ci[+E]};else if(E==="TRUE")S={t:"b",v:true};else if(E==="FALSE")S={t:"b",v:false};else if(!isNaN(yr(E)))S={t:"n",v:yr(E)};else if(!isNaN(Rr(E).getDate())){S={t:"d",v:wr(E)};if(n.UTC)S.v=Dr(S.v);if(!n.cellDates)S={t:"n",v:dr(S.v)};S.z=n.dateNF||q[14]}else if(E.charCodeAt(0)==35&&hi[E]!=null)S={t:"e",v:hi[E],w:E}}if(S.z===undefined&&C!=null)S.z=C;var O="",I=y.getElementsByTagName("A");if(I&&I.length)for(var R=0;R<I.length;++R)if(I[R].hasAttribute("href")){O=I[R].getAttribute("href");if(O.charAt(0)!="#")break}if(O&&O.charAt(0)!="#"&&O.slice(0,11).toLowerCase()!="javascript:")S.l={Target:O};if(i){if(!e["!data"][m+s])e["!data"][m+s]=[];e["!data"][m+s][b+f]=S}else e[Ya({c:b+f,r:m+s})]=S;if(c.e.c<b+f)c.e.c=b+f;b+=k}++m}if(u.length)e["!merges"]=(e["!merges"]||[]).concat(u);c.e.r=Math.max(c.e.r,m-1+s);e["!ref"]=Ja(c);if(m>=o)e["!fullref"]=Ja((c.e.r=a.length-p+m-1+s,c));return e}function Ob(e,r){var t=r||{};var a={};if(t.dense)a["!data"]=[];return xb(a,e,r)}function Ib(e,r){var t=an(Ob(e,r),r);return t}function Rb(e){var r="";var t=Nb(e);if(t)r=t(e).getPropertyValue("display");if(!r)r=e.style&&e.style.display;return r==="none"}function Nb(e){if(e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle==="function")return e.ownerDocument.defaultView.getComputedStyle;if(typeof getComputedStyle==="function")return getComputedStyle;return null}function Fb(e){var r=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(e,r){return Array(parseInt(r,10)+1).join(" ")}).replace(/<text:tab[^<>]*\/>/g,"\t").replace(/<text:line-break\/>/g,"\n");var t=pt(r.replace(/<[^<>]*>/g,""));return[t]}function Db(e,r,t){var a=t||{};var n=Ht(e);Vt.lastIndex=0;n=Pr(Mr(n,"<!--","-->"));var i,s,f="",l="",o,c=0,h=-1,u=false,d="";while(i=Vt.exec(n)){switch(i[3]=i[3].replace(/_[\s\S]*$/,"")){case"number-style":;case"currency-style":;case"percentage-style":;case"date-style":;case"time-style":;case"text-style":if(i[1]==="/"){u=false;if(s["truncate-on-overflow"]=="false"){if(f.match(/h/))f=f.replace(/h+/,"[$&]");else if(f.match(/m/))f=f.replace(/m+/,"[$&]");else if(f.match(/s/))f=f.replace(/s+/,"[$&]")}a[s.name]=f;f=""}else if(i[0].charAt(i[0].length-2)!=="/"){u=true;f="";s=ct(i[0],false)}break;case"boolean-style":if(i[1]==="/"){u=false;a[s.name]="General";f=""}else if(i[0].charAt(i[0].length-2)!=="/"){u=true;f="";s=ct(i[0],false)}break;case"boolean":f+="General";break;case"text":if(i[1]==="/"){d=n.slice(h,Vt.lastIndex-i[0].length);if(d=="%"&&s[0]=="<number:percentage-style")f+="%";else f+='"'+d.replace(/"/g,'""')+'"'}else if(i[0].charAt(i[0].length-2)!=="/"){h=Vt.lastIndex}break;case"day":{o=ct(i[0],false);switch(o["style"]){case"short":f+="d";break;case"long":f+="dd";break;default:f+="dd";break;}}break;case"day-of-week":{o=ct(i[0],false);switch(o["style"]){case"short":f+="ddd";break;case"long":f+="dddd";break;default:f+="ddd";break;}}break;case"era":{o=ct(i[0],false);switch(o["style"]){case"short":f+="ee";break;case"long":f+="eeee";break;default:f+="eeee";break;}}break;case"hours":{o=ct(i[0],false);switch(o["style"]){case"short":f+="h";break;case"long":f+="hh";break;default:f+="hh";break;}}break;case"minutes":{o=ct(i[0],false);switch(o["style"]){case"short":f+="m";break;case"long":f+="mm";break;default:f+="mm";break;}}break;case"month":{o=ct(i[0],false);if(o["textual"])f+="mm";switch(o["style"]){case"short":f+="m";break;case"long":f+="mm";break;default:f+="m";break;}}break;case"seconds":{o=ct(i[0],false);switch(o["style"]){case"short":f+="s";break;case"long":f+="ss";break;default:f+="ss";break;}if(o["decimal-places"])f+="."+Tr("0",+o["decimal-places"])}break;case"year":{o=ct(i[0],false);switch(o["style"]){case"short":f+="yy";break;case"long":f+="yyyy";break;default:f+="yy";break;}}break;case"am-pm":f+="AM/PM";break;case"week-of-year":;case"quarter":console.error("Excel does not support ODS format token "+i[3]);break;case"fill-character":if(i[1]==="/"){d=n.slice(h,Vt.lastIndex-i[0].length);f+='"'+d.replace(/"/g,'""')+'"*'}else if(i[0].charAt(i[0].length-2)!=="/"){h=Vt.lastIndex}break;case"scientific-number":o=ct(i[0],false);f+="0."+Tr("0",+o["min-decimal-places"]||+o["decimal-places"]||2)+Tr("?",+o["decimal-places"]-+o["min-decimal-places"]||0)+"E"+(Ct(o["forced-exponent-sign"])?"+":"")+Tr("0",+o["min-exponent-digits"]||2);break;case"fraction":o=ct(i[0],false);if(!+o["min-integer-digits"])f+="#";else f+=Tr("0",+o["min-integer-digits"]);f+=" ";f+=Tr("?",+o["min-numerator-digits"]||1);f+="/";if(+o["denominator-value"])f+=o["denominator-value"];else f+=Tr("?",+o["min-denominator-digits"]||1);break;case"currency-symbol":if(i[1]==="/"){f+='"'+n.slice(h,Vt.lastIndex-i[0].length).replace(/"/g,'""')+'"'}else if(i[0].charAt(i[0].length-2)!=="/"){h=Vt.lastIndex}else f+="$";break;case"text-properties":o=ct(i[0],false);switch((o["color"]||"").toLowerCase().replace("#","")){case"ff0000":;case"red":f="[Red]"+f;break;}break;case"text-content":f+="@";break;case"map":o=ct(i[0],false);if(pt(o["condition"])=="value()>=0")f=a[o["apply-style-name"]]+";"+f;else console.error("ODS number format may be incorrect: "+o["condition"]);break;case"number":if(i[1]==="/")break;o=ct(i[0],false);l="";l+=Tr("0",+o["min-integer-digits"]||1);if(Ct(o["grouping"]))l=ue(Tr("#",Math.max(0,4-l.length))+l);if(+o["min-decimal-places"]||+o["decimal-places"])l+=".";if(+o["min-decimal-places"])l+=Tr("0",+o["min-decimal-places"]||1);if(+o["decimal-places"]-(+o["min-decimal-places"]||0))l+=Tr("0",+o["decimal-places"]-(+o["min-decimal-places"]||0));f+=l;break;case"embedded-text":if(i[1]==="/"){if(c==0)f+='"'+n.slice(h,Vt.lastIndex-i[0].length).replace(/"/g,'""')+'"';else f=f.slice(0,c)+'"'+n.slice(h,Vt.lastIndex-i[0].length).replace(/"/g,'""')+'"'+f.slice(c)}else if(i[0].charAt(i[0].length-2)!=="/"){h=Vt.lastIndex;c=-+ct(i[0],false)["position"]||0}break;}}return a}function Pb(e,r,t){var a=r||{};if(b!=null&&a.dense==null)a.dense=b;var n=Ht(e);var i=[],s;var f;var l,o="",c=0;var h;var u;var d={},v=[];var p={};if(a.dense)p["!data"]=[];var m,g;var w={value:""},k={};var A="",T=0,y,E="",C=0;var _=[],S=[];var x=-1,O=-1,I={s:{r:1e6,c:1e7},e:{r:0,c:0}};var R=0;var N=t||{},F={};var D=[],P={},L=0,M=0;var U=[],B=1,W=1;var z=[];var H={Names:[],WBProps:{}};var V={};var $=["",""];var X=[],G={};var j="",K=0;var Y=false,Z=false;var J=0;Vt.lastIndex=0;n=Pr(Mr(n,"<!--","-->"));while(m=Vt.exec(n))switch(m[3]=m[3].replace(/_[\s\S]*$/,"")){case"table":;case"å·¥ä½è¡¨":if(m[1]==="/"){if(I.e.c>=I.s.c&&I.e.r>=I.s.r)p["!ref"]=Ja(I);else p["!ref"]="A1:A1";if(a.sheetRows>0&&a.sheetRows<=I.e.r){p["!fullref"]=p["!ref"];I.e.r=a.sheetRows-1;p["!ref"]=Ja(I)}if(D.length)p["!merges"]=D;if(U.length)p["!rows"]=U;h.name=h["åç§°"]||h.name;if(typeof JSON!=="undefined")JSON.stringify(h);v.push(h.name);d[h.name]=p;Z=false}else if(m[0].charAt(m[0].length-2)!=="/"){h=ct(m[0],false);x=O=-1;I.s.r=I.s.c=1e7;I.e.r=I.e.c=0;p={};if(a.dense)p["!data"]=[];D=[];U=[];Z=true}break;case"table-row-group":if(m[1]==="/")--R;else++R;break;case"table-row":;case"è¡":if(m[1]==="/"){x+=B;B=1;break}u=ct(m[0],false);if(u["è¡å·"])x=u["è¡å·"]-1;else if(x==-1)x=0;B=+u["number-rows-repeated"]||1;if(B<10)for(J=0;J<B;++J)if(R>0)U[x+J]={level:R};O=-1;break;case"covered-table-cell":if(m[1]!=="/"){++O;w=ct(m[0],false);W=parseInt(w["number-columns-repeated"]||"1",10)||1;if(a.sheetStubs){while(W-- >0){if(a.dense){if(!p["!data"][x])p["!data"][x]=[];p["!data"][x][O]={t:"z"}}else p[Ya({r:x,c:O})]={t:"z"};++O}--O}else O+=W-1}A="";_=[];break;case"table-cell":;case"æ°æ®":if(m[0].charAt(m[0].length-2)==="/"){++O;w=ct(m[0],false);W=parseInt(w["number-columns-repeated"]||"1",10)||1;g={t:"z",v:null};if(w.formula&&a.cellFormula!=false)g.f=uv(pt(w.formula));if(w["style-name"]&&F[w["style-name"]])g.z=F[w["style-name"]];if((w["æ°æ®ç±»å"]||w["value-type"])=="string"){g.t="s";g.v=pt(w["string-value"]||"");if(a.dense){if(!p["!data"][x])p["!data"][x]=[];p["!data"][x][O]=g}else{p[$a(O)+Wa(x)]=g}}O+=W-1}else if(m[1]!=="/"){++O;A=E="";T=C=0;_=[];S=[];W=1;var q=B?x+B-1:x;if(O>I.e.c)I.e.c=O;if(O<I.s.c)I.s.c=O;if(x<I.s.r)I.s.r=x;if(q>I.e.r)I.e.r=q;w=ct(m[0],false);k=ht(m[0],true);X=[];G={};g={t:w["æ°æ®ç±»å"]||w["value-type"],v:null};if(w["style-name"]&&F[w["style-name"]])g.z=F[w["style-name"]];if(a.cellFormula){if(w.formula)w.formula=pt(w.formula);if(w["number-matrix-columns-spanned"]&&w["number-matrix-rows-spanned"]){L=parseInt(w["number-matrix-rows-spanned"],10)||0;M=parseInt(w["number-matrix-columns-spanned"],10)||0;P={s:{r:x,c:O},e:{r:x+L-1,c:O+M-1}};g.F=Ja(P);z.push([P,g.F])}if(w.formula)g.f=uv(w.formula);else for(J=0;J<z.length;++J)if(x>=z[J][0].s.r&&x<=z[J][0].e.r)if(O>=z[J][0].s.c&&O<=z[J][0].e.c)g.F=z[J][1]}if(w["number-columns-spanned"]||w["number-rows-spanned"]){L=parseInt(w["number-rows-spanned"]||"1",10)||1;M=parseInt(w["number-columns-spanned"]||"1",10)||1;if(L*M>1){P={s:{r:x,c:O},e:{r:x+L-1,c:O+M-1}};D.push(P)}}if(w["number-columns-repeated"])W=parseInt(w["number-columns-repeated"],10);switch(g.t){case"boolean":g.t="b";g.v=Ct(w["boolean-value"])||+w["boolean-value"]>=1;break;case"float":g.t="n";g.v=parseFloat(w.value);if(a.cellDates&&g.z&&Le(g.z)){g.v=vr(g.v+(H.WBProps.date1904?1462:0));g.t=typeof g.v=="number"?"n":"d"}break;case"percentage":g.t="n";g.v=parseFloat(w.value);break;case"currency":g.t="n";g.v=parseFloat(w.value);break;case"date":g.t="d";g.v=wr(w["date-value"],H.WBProps.date1904);if(!a.cellDates){g.t="n";g.v=dr(g.v,H.WBProps.date1904)}if(!g.z)g.z="m/d/yy";break;case"time":g.t="n";g.v=pr(w["time-value"])/86400;if(a.cellDates){g.v=vr(g.v);g.t=typeof g.v=="number"?"n":"d"}if(!g.z)g.z="HH:MM:SS";break;case"number":g.t="n";g.v=parseFloat(w["æ°æ®æ°å¼"]);break;default:if(g.t==="string"||g.t==="text"||!g.t){g.t="s";if(w["string-value"]!=null){A=pt(w["string-value"]);_=[]}}else throw new Error("Unsupported value type "+g.t);}}else{Y=false;if(k["calcext:value-type"]=="error"&&hi[A]!=null){g.t="e";g.w=A;g.v=hi[A]}if(g.t==="s"){g.v=A||"";if(_.length)g.R=_;Y=T==0}if(V.Target)g.l=V;if(X.length>0){g.c=X;X=[]}if(A&&a.cellText!==false)g.w=A;if(Y){g.t="z";delete g.v}if(!Y||a.sheetStubs){if(!(a.sheetRows&&a.sheetRows<=x)){for(var Q=0;Q<B;++Q){W=parseInt(w["number-columns-repeated"]||"1",10);if(a.dense){if(!p["!data"][x+Q])p["!data"][x+Q]=[];p["!data"][x+Q][O]=Q==0?g:Ar(g);while(--W>0)p["!data"][x+Q][O+W]=Ar(g)}else{p[Ya({r:x+Q,c:O})]=g;while(--W>0)p[Ya({r:x+Q,c:O+W})]=Ar(g)}if(I.e.c<=O)I.e.c=O}}}W=parseInt(w["number-columns-repeated"]||"1",10);O+=W-1;W=0;g={};A="";_=[]}V={};break;case"document":;case"document-content":;case"çµåè¡¨æ ¼ææ¡£":;case"spreadsheet":;case"主ä½":;case"scripts":;case"styles":;case"font-face-decls":;case"master-styles":if(m[1]==="/"){if((s=i.pop())[0]!==m[3])throw"Bad state: "+s}else if(m[0].charAt(m[0].length-2)!=="/")i.push([m[3],true]);break;case"annotation":if(m[1]==="/"){if((s=i.pop())[0]!==m[3])throw"Bad state: "+s;G.t=A;if(_.length)G.R=_;G.a=j;X.push(G);A=E;T=C;_=S}else if(m[0].charAt(m[0].length-2)!=="/"){i.push([m[3],false]);var ee=ct(m[0],true);if(!(ee["display"]&&Ct(ee["display"])))X.hidden=true;E=A;C=T;S=_;A="";T=0;_=[]}j="";K=0;break;case"creator":if(m[1]==="/"){j=n.slice(K,m.index)}else K=m.index+m[0].length;break;case"meta":;case"å æ°æ®":;case"settings":;case"config-item-set":;case"config-item-map-indexed":;case"config-item-map-entry":;case"config-item-map-named":;case"shapes":;case"frame":;case"text-box":;case"image":;case"data-pilot-tables":;case"list-style":;case"form":;case"dde-links":;case"event-listeners":;case"chart":if(m[1]==="/"){if((s=i.pop())[0]!==m[3])throw"Bad state: "+s}else if(m[0].charAt(m[0].length-2)!=="/")i.push([m[3],false]);A="";T=0;_=[];break;case"scientific-number":;case"currency-symbol":;case"fill-character":break;case"text-style":;case"boolean-style":;case"number-style":;case"currency-style":;case"percentage-style":;case"date-style":;case"time-style":if(m[1]==="/"){var re=Vt.lastIndex;Db(n.slice(l,Vt.lastIndex),r,N);Vt.lastIndex=re}else if(m[0].charAt(m[0].length-2)!=="/"){l=Vt.lastIndex-m[0].length}break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":;case"page-layout":break;case"style":{var te=ct(m[0],false);if(te["family"]=="table-cell"&&N[te["data-style-name"]])F[te["name"]]=N[te["data-style-name"]]}break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":break;case"fraction":break;case"day":;case"month":;case"year":;case"era":;case"day-of-week":;case"week-of-year":;case"quarter":;case"hours":;case"minutes":;case"seconds":;case"am-pm":break;case"boolean":break;case"text":if(m[0].slice(-2)==="/>")break;else if(m[1]==="/")switch(i[i.length-1][0]){case"number-style":;case"date-style":;case"time-style":o+=n.slice(c,m.index);break;}else c=m.index+m[0].length;break;case"named-range":f=ct(m[0],false);$=vv(f["cell-range-address"]);var ae={Name:f.name,Ref:$[0]+"!"+$[1]};if(Z)ae.Sheet=v.length;H.Names.push(ae);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":;case"çµåè¡¨æ ¼":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":f=ct(m[0],false);switch(f["date-value"]){case"1904-01-01":H.WBProps.date1904=true;break;}break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":;case"ææ¬ä¸²":if(["master-styles"].indexOf(i[i.length-1][0])>-1)break;if(m[1]==="/"&&(!w||!w["string-value"])){var ne=Fb(n.slice(T,m.index),y);A=(A.length>0?A+"\n":"")+ne[0]}else if(m[0].slice(-2)=="/>"){A+="\n"}else{y=ct(m[0],false);T=m.index+m[0].length}break;case"s":break;case"database-range":if(m[1]==="/")break;try{$=vv(ct(m[0])["target-range-address"]);d[$[0]]["!autofilter"]={ref:$[1]}}catch(ie){}break;case"date":break;case"object":break;case"title":;case"æ é¢":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"filter-set-item":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":;case"sender-lastname":;case"sender-initials":;case"sender-title":;case"sender-position":;case"sender-email":;case"sender-phone-private":;case"sender-fax":;case"sender-company":;case"sender-phone-work":;case"sender-street":;case"sender-city":;case"sender-postal-code":;case"sender-country":;case"sender-state-or-province":;case"author-name":;case"author-initials":;case"chapter":;case"file-name":;case"template-name":;case"sheet-name":break;case"event-listener":break;case"initial-creator":;case"creation-date":;case"print-date":;case"generator":;case"document-statistic":;case"user-defined":;case"editing-duration":;case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":;case"source-cell-range":;case"source-service":;case"data-pilot-field":;case"data-pilot-level":;case"data-pilot-subtotals":;case"data-pilot-subtotal":;case"data-pilot-members":;case"data-pilot-member":;case"data-pilot-display-info":;case"data-pilot-sort-info":;case"data-pilot-layout-info":;case"data-pilot-field-reference":;case"data-pilot-groups":;case"data-pilot-group":;case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":;case"dde-connection-decl":;case"dde-link":;case"dde-source":break;case"properties":break;case"property":break;case"a":if(m[1]!=="/"){V=ct(m[0],false);if(!V.href)break;V.Target=pt(V.href);delete V.href;if(V.Target.charAt(0)=="#"&&V.Target.indexOf(".")>-1){$=vv(V.Target.slice(1));V.Target="#"+$[0]+"!"+$[1]}else if(V.Target.match(/^\.\.[\\\/]/))V.Target=V.Target.slice(3)}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(m[2]){case"dc:":;case"calcext:":;case"loext:":;case"ooo:":;case"chartooo:":;case"draw:":;case"style:":;case"chart:":;case"form:":;case"uof:":;case"表:":;case"å:":break;default:if(a.WTF)throw new Error(m);};}var se={Sheets:d,SheetNames:v,Workbook:H};if(a.bookSheets)delete se.Sheets;return se}function Lb(e,r){r=r||{};if(jr(e,"META-INF/manifest.xml"))Ei(Yr(e,"META-INF/manifest.xml"),r);var t=Zr(e,"styles.xml");var a=t&&Db(It(t),r);var n=Zr(e,"content.xml");if(!n)throw new Error("Missing content.xml in ODS / UOF file");var i=Pb(It(n),r,a);if(jr(e,"meta.xml"))i.Props=Ri(Yr(e,"meta.xml"));i.bookType="ods";return i}function Mb(e,r){var t=Pb(e,r);t.bookType="fods";return t}var Ub=function(){var e=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join("");var r="<office:document-styles "+Ut({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+e+"</office:document-styles>";return function t(){return at+r}}();function Bb(e,r){var t="number",a="",n={"style:name":r},i="",s=0;e=e.replace(/"[$]"/g,"$");e:{if(e.indexOf(";")>-1){console.error("Unsupported ODS Style Map exported. Using first branch of "+e);e=e.slice(0,e.indexOf(";"))}if(e=="@"){t="text";a="<number:text-content/>";break e}if(e.indexOf(/\$/)>-1){t="currency"}if(e[s]=='"'){i="";while(e[++s]!='"'||e[++s]=='"')i+=e[s];--s;if(e[s+1]=="*"){s++;a+="<number:fill-character>"+bt(i.replace(/""/g,'"'))+"</number:fill-character>"}else{a+="<number:text>"+bt(i.replace(/""/g,'"'))+"</number:text>"}e=e.slice(s+1);s=0}var f=e.match(/# (\?+)\/(\?+)/);if(f){a+=Bt("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":f[1].length,"number:max-denominator-value":Math.max(+f[1].replace(/./g,"9"),+f[2].replace(/./g,"9"))});break e}if(f=e.match(/# (\?+)\/(\d+)/)){a+=Bt("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":f[1].length,"number:denominator-value":+f[2]});break e}if(f=e.match(/\b(\d+)(|\.\d+)%/)){t="percentage";a+=Bt("number:number",null,{"number:decimal-places":f[2]&&f.length-1||0,"number:min-decimal-places":f[2]&&f.length-1||0,"number:min-integer-digits":f[1].length})+"<number:text>%</number:text>";break e}var l=false;if(["y","m","d"].indexOf(e[0])>-1){t="date";r:for(;s<e.length;++s)switch(i=e[s].toLowerCase()){case"h":;case"s":l=true;--s;break r;case"m":t:for(var o=s+1;o<e.length;++o)switch(e[o]){case"y":;case"d":break t;case"h":;case"s":l=true;--s;break r;};case"y":;case"d":while((e[++s]||"").toLowerCase()==i[0])i+=i[0];--s;switch(i){case"y":;case"yy":a+="<number:year/>";break;case"yyy":;case"yyyy":a+='<number:year number:style="long"/>';break;case"mmmmm":console.error("ODS has no equivalent of format |mmmmm|");case"m":;case"mm":;case"mmm":;case"mmmm":a+='<number:month number:style="'+(i.length%2?"short":"long")+'" number:textual="'+(i.length>=3?"true":"false")+'"/>';break;case"d":;case"dd":a+='<number:day number:style="'+(i.length%2?"short":"long")+'"/>';break;case"ddd":;case"dddd":a+='<number:day-of-week number:style="'+(i.length%2?"short":"long")+'"/>';break;}break;case'"':while(e[++s]!='"'||e[++s]=='"')i+=e[s];--s;a+="<number:text>"+bt(i.slice(1).replace(/""/g,'"'))+"</number:text>";break;case"\\":i=e[++s];a+="<number:text>"+bt(i)+"</number:text>";break;case"/":;case":":a+="<number:text>"+bt(i)+"</number:text>";break;default:console.error("unrecognized character "+i+" in ODF format "+e);}if(!l)break e;e=e.slice(s+1);s=0}if(e.match(/^\[?[hms]/)){if(t=="number")t="time";if(e.match(/\[/)){e=e.replace(/[\[\]]/g,"");n["number:truncate-on-overflow"]="false"}for(;s<e.length;++s)switch(i=e[s].toLowerCase()){case"h":;case"m":;case"s":while((e[++s]||"").toLowerCase()==i[0])i+=i[0];--s;switch(i){case"h":;case"hh":a+='<number:hours number:style="'+(i.length%2?"short":"long")+'"/>';break;case"m":;case"mm":a+='<number:minutes number:style="'+(i.length%2?"short":"long")+'"/>';break;case"s":;case"ss":if(e[s+1]==".")do{i+=e[s+1];++s}while(e[s+1]=="0");a+='<number:seconds number:style="'+(i.match("ss")?"long":"short")+'"'+(i.match(/\./)?' number:decimal-places="'+(i.match(/0+/)||[""])[0].length+'"':"")+"/>";break;}break;case'"':while(e[++s]!='"'||e[++s]=='"')i+=e[s];--s;a+="<number:text>"+bt(i.slice(1).replace(/""/g,'"'))+"</number:text>";break;case"/":;case":":a+="<number:text>"+bt(i)+"</number:text>";break;case"a":if(e.slice(s,s+3).toLowerCase()=="a/p"){a+="<number:am-pm/>";s+=2;break}if(e.slice(s,s+5).toLowerCase()=="am/pm"){a+="<number:am-pm/>";s+=4;break};default:console.error("unrecognized character "+i+" in ODF format "+e);}break e}if(e.indexOf(/\$/)>-1){t="currency"}if(e[0]=="$"){a+='<number:currency-symbol number:language="en" number:country="US">$</number:currency-symbol>';e=e.slice(1);s=0}s=0;if(e[s]=='"'){while(e[++s]!='"'||e[++s]=='"')i+=e[s];--s;if(e[s+1]=="*"){s++;a+="<number:fill-character>"+bt(i.replace(/""/g,'"'))+"</number:fill-character>"}else{a+="<number:text>"+bt(i.replace(/""/g,'"'))+"</number:text>"}e=e.slice(s+1);s=0}var c=e.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);if(!c||!c[0])console.error("Could not find numeric part of "+e);else{var h=c[1].replace(/,/g,"");a+="<number:"+(c[3]?"scientific-":"")+"number"+' number:min-integer-digits="'+(h.indexOf("0")==-1?"0":h.length-h.indexOf("0"))+'"'+(c[0].indexOf(",")>-1?' number:grouping="true"':"")+(c[2]&&' number:decimal-places="'+(c[2].length-1)+'"'||' number:decimal-places="0"')+(c[3]&&c[3].indexOf("+")>-1?' number:forced-exponent-sign="true"':"")+(c[3]?' number:min-exponent-digits="'+c[3].match(/0+/)[0].length+'"':"")+">"+"</number:"+(c[3]?"scientific-":"")+"number>";s=c.index+c[0].length}if(e[s]=='"'){i="";while(e[++s]!='"'||e[++s]=='"')i+=e[s];--s;a+="<number:text>"+bt(i.replace(/""/g,'"'))+"</number:text>"}}if(!a){console.error("Could not generate ODS number format for |"+e+"|");return""}return Bt("number:"+t+"-style",a,n)}function Wb(e,r,t){var a=[];for(var n=0;n<e.length;++n){var i=e[n];if(!i)continue;if(i.Sheet==(t==-1?null:t))a.push(i)}if(!a.length)return"";return" <table:named-expressions>\n"+a.map(function(e){var r=(t==-1?"$":"")+pv(e.Ref);return" "+Bt("table:named-range",null,{"table:name":e.Name,"table:cell-range-address":r,"table:base-cell-address":r.replace(/[\.][^\.]*$/,".$A$1")})}).join("\n")+"\n </table:named-expressions>\n"}var zb=function(){var e=function(e,r){return bt(e).replace(/ +/g,function(e){return'<text:s text:c="'+e.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,r?"<text:line-break/>":"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")};var r=" <table:table-cell />\n";var t=function(t,a,n,i,s,f){var l=[];l.push(' <table:table table:name="'+bt(a.SheetNames[n])+'" table:style-name="ta1">\n');var o=0,c=0,h=Za(t["!ref"]||"A1");var u=t["!merges"]||[],d=0;var v=t["!data"]!=null;if(t["!cols"]){for(c=0;c<=h.e.c;++c)l.push(" <table:table-column"+(t["!cols"][c]?' table:style-name="co'+t["!cols"][c].ods+'"':"")+"></table:table-column>\n")}var p="",m=t["!rows"]||[];for(o=0;o<h.s.r;++o){p=m[o]?' table:style-name="ro'+m[o].ods+'"':"";l.push(" <table:table-row"+p+"></table:table-row>\n")}for(;o<=h.e.r;++o){p=m[o]?' table:style-name="ro'+m[o].ods+'"':"";l.push(" <table:table-row"+p+">\n");for(c=0;c<h.s.c;++c)l.push(r);for(;c<=h.e.c;++c){var g=false,b={},w="";for(d=0;d!=u.length;++d){if(u[d].s.c>c)continue;if(u[d].s.r>o)continue;if(u[d].e.c<c)continue;if(u[d].e.r<o)continue;if(u[d].s.c!=c||u[d].s.r!=o)g=true;b["table:number-columns-spanned"]=u[d].e.c-u[d].s.c+1;b["table:number-rows-spanned"]=u[d].e.r-u[d].s.r+1;break}if(g){l.push(" <table:covered-table-cell/>\n");continue}var k=Ya({r:o,c:c}),A=v?(t["!data"][o]||[])[c]:t[k];if(A&&A.f){b["table:formula"]=bt(dv(A.f));if(A.F){if(A.F.slice(0,k.length)==k){var T=Za(A.F);b["table:number-matrix-columns-spanned"]=T.e.c-T.s.c+1;b["table:number-matrix-rows-spanned"]=T.e.r-T.s.r+1}}}if(!A){l.push(r);continue}switch(A.t){case"b":w=A.v?"TRUE":"FALSE";b["office:value-type"]="boolean";b["office:boolean-value"]=A.v?"true":"false";break;case"n":if(!isFinite(A.v)){if(isNaN(A.v)){w="#NUM!";b["table:formula"]="of:=#NUM!"}else{w="#DIV/0!";b["table:formula"]="of:="+(A.v<0?"-":"")+"1/0"}b["office:string-value"]="";b["office:value-type"]="string";b["calcext:value-type"]="error"}else{w=A.w||String(A.v||0);b["office:value-type"]="float";b["office:value"]=A.v||0}break;case"s":;case"str":w=A.v==null?"":A.v;b["office:value-type"]="string";break;case"d":w=A.w||wr(A.v,f).toISOString();b["office:value-type"]="date";b["office:date-value"]=wr(A.v,f).toISOString();b["table:style-name"]="ce1";break;default:l.push(r);continue;}var y=e(w);if(A.l&&A.l.Target){var E=A.l.Target;E=E.charAt(0)=="#"?"#"+pv(E.slice(1)):E;if(E.charAt(0)!="#"&&!E.match(/^\w+:/))E="../"+E;y=Bt("text:a",y,{"xlink:href":E.replace(/&/g,"&")})}if(s[A.z])b["table:style-name"]="ce"+s[A.z].slice(1);var C=Bt("text:p",y,{});if(A.c){var _="",S="",x={};for(var O=0;O<A.c.length;++O){if(!_&&A.c[O].a)_=A.c[O].a;S+="<text:p>"+e(A.c[O].t)+"</text:p>"}if(!A.c.hidden)x["office:display"]=true;C=Bt("office:annotation",S,x)+C}l.push(" "+Bt("table:table-cell",C,b)+"\n")}l.push(" </table:table-row>\n")}if((a.Workbook||{}).Names)l.push(Wb(a.Workbook.Names,a.SheetNames,n));l.push(" </table:table>\n");return l.join("")};var a=function(e,r){e.push(" <office:automatic-styles>\n");var t=0;r.SheetNames.map(function(e){return r.Sheets[e]}).forEach(function(r){if(!r)return;if(r["!cols"]){for(var a=0;a<r["!cols"].length;++a)if(r["!cols"][a]){var n=r["!cols"][a];if(n.width==null&&n.wpx==null&&n.wch==null)continue;oc(n);n.ods=t;var i=r["!cols"][a].wpx+"px";e.push(' <style:style style:name="co'+t+'" style:family="table-column">\n');e.push(' <style:table-column-properties fo:break-before="auto" style:column-width="'+i+'"/>\n');e.push(" </style:style>\n");++t}}});var a=0;r.SheetNames.map(function(e){return r.Sheets[e]}).forEach(function(r){if(!r)return;if(r["!rows"]){for(var t=0;t<r["!rows"].length;++t)if(r["!rows"][t]){r["!rows"][t].ods=a;var n=r["!rows"][t].hpx+"px"; 64892e.push(' <style:style style:name="ro'+a+'" style:family="table-row">\n');e.push(' <style:table-row-properties fo:break-before="auto" style:row-height="'+n+'"/>\n');e.push(" </style:style>\n");++a}}});e.push(' <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">\n');e.push(' <style:table-properties table:display="true" style:writing-mode="lr-tb"/>\n');e.push(" </style:style>\n");e.push(' <number:date-style style:name="N37" number:automatic-order="true">\n');e.push(' <number:month number:style="long"/>\n');e.push(" <number:text>/</number:text>\n");e.push(' <number:day number:style="long"/>\n');e.push(" <number:text>/</number:text>\n");e.push(" <number:year/>\n");e.push(" </number:date-style>\n");var n={};var i=69;r.SheetNames.map(function(e){return r.Sheets[e]}).forEach(function(r){if(!r)return;var t=r["!data"]!=null;if(!r["!ref"])return;var a=Za(r["!ref"]);for(var s=0;s<=a.e.r;++s)for(var f=0;f<=a.e.c;++f){var l=t?(r["!data"][s]||[])[f]:r[Ya({r:s,c:f})];if(!l||!l.z||l.z.toLowerCase()=="general")continue;if(!n[l.z]){var o=Bb(l.z,"N"+i);if(o){n[l.z]="N"+i;++i;e.push(o+"\n")}}}});e.push(' <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>\n');ir(n).forEach(function(r){e.push('<style:style style:name="ce'+n[r].slice(1)+'" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="'+n[r]+'"/>\n')});e.push(" </office:automatic-styles>\n");return n};return function n(e,r){var n=[at];var i=Ut({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"});var s=Ut({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});if(r.bookType=="fods"){n.push("<office:document"+i+s+">\n");n.push(Oi().replace(/<office:document-meta[^<>]*?>/,"").replace(/<\/office:document-meta>/,"")+"\n")}else n.push("<office:document-content"+i+">\n");var f=a(n,e);n.push(" <office:body>\n");n.push(" <office:spreadsheet>\n");if(((e.Workbook||{}).WBProps||{}).date1904)n.push(' <table:calculation-settings table:case-sensitive="false" table:search-criteria-must-apply-to-whole-cell="true" table:use-wildcards="true" table:use-regular-expressions="false" table:automatic-find-labels="false">\n <table:null-date table:date-value="1904-01-01"/>\n </table:calculation-settings>\n');for(var l=0;l!=e.SheetNames.length;++l)n.push(t(e.Sheets[e.SheetNames[l]],e,l,r,f,((e.Workbook||{}).WBProps||{}).date1904));if((e.Workbook||{}).Names)n.push(Wb(e.Workbook.Names,e.SheetNames,-1));n.push(" </office:spreadsheet>\n");n.push(" </office:body>\n");if(r.bookType=="fods")n.push("</office:document>");else n.push("</office:document-content>");return n.join("")}}();function Hb(e,r){if(r.bookType=="fods")return zb(e,r);var t=et();var a="";var n=[];var i=[];a="mimetype";Qr(t,a,"application/vnd.oasis.opendocument.spreadsheet");a="content.xml";Qr(t,a,zb(e,r));n.push([a,"text/xml"]);i.push([a,"ContentFile"]);a="styles.xml";Qr(t,a,Ub(e,r));n.push([a,"text/xml"]);i.push([a,"StylesFile"]);a="meta.xml";Qr(t,a,at+Oi());n.push([a,"text/xml"]);i.push([a,"MetadataFile"]);a="manifest.rdf";Qr(t,a,xi(i));n.push([a,"application/rdf+xml"]);a="META-INF/manifest.xml";Qr(t,a,Ci(n));return t}var Vb=function(){try{if(typeof Uint8Array=="undefined")return"slice";if(typeof Uint8Array.prototype.subarray=="undefined")return"slice";if(typeof Buffer!=="undefined"){if(typeof Buffer.prototype.subarray=="undefined")return"slice";if((typeof Buffer.from=="function"?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array)return"subarray";return"slice"}return"subarray"}catch(e){return"slice"}}();function $b(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Xb(e){return typeof TextDecoder!="undefined"?(new TextDecoder).decode(e):It(N(e))}function Gb(e){return typeof TextEncoder!="undefined"?(new TextEncoder).encode(e):I(Rt(e))}function jb(e){var r=0;for(var t=0;t<e.length;++t)r+=e[t].length;var a=new Uint8Array(r);var n=0;for(t=0;t<e.length;++t){var i=e[t],s=i.length;if(s<250){for(var f=0;f<s;++f)a[n++]=i[f]}else{a.set(i,n);n+=s}}return a}function Kb(e){e-=e>>1&1431655765;e=(e&858993459)+(e>>2&858993459);return(e+(e>>4)&252645135)*16843009>>>24}function Yb(e,r){var t=(e[r+15]&127)<<7|e[r+14]>>1;var a=e[r+14]&1;for(var n=r+13;n>=r;--n)a=a*256+e[n];return(e[r+15]&128?-a:a)*Math.pow(10,t-6176)}function Zb(e,r,t){var a=Math.floor(t==0?0:Math.LOG10E*Math.log(Math.abs(t)))+6176-16;var n=t/Math.pow(10,a-6176);e[r+15]|=a>>7;e[r+14]|=(a&127)<<1;for(var i=0;n>=1;++i,n/=256)e[r+i]=n&255;e[r+15]|=t>=0?0:128}function Jb(e,r){var t=r.l;var a=e[t]&127;e:if(e[t++]>=128){a|=(e[t]&127)<<7;if(e[t++]<128)break e;a|=(e[t]&127)<<14;if(e[t++]<128)break e;a|=(e[t]&127)<<21;if(e[t++]<128)break e;a+=(e[t]&127)*Math.pow(2,28);++t;if(e[t++]<128)break e;a+=(e[t]&127)*Math.pow(2,35);++t;if(e[t++]<128)break e;a+=(e[t]&127)*Math.pow(2,42);++t;if(e[t++]<128)break e}r.l=t;return a}function qb(e){var r=new Uint8Array(7);r[0]=e&127;var t=1;e:if(e>127){r[t-1]|=128;r[t]=e>>7&127;++t;if(e<=16383)break e;r[t-1]|=128;r[t]=e>>14&127;++t;if(e<=2097151)break e;r[t-1]|=128;r[t]=e>>21&127;++t;if(e<=268435455)break e;r[t-1]|=128;r[t]=e/256>>>21&127;++t;if(e<=34359738367)break e;r[t-1]|=128;r[t]=e/65536>>>21&127;++t;if(e<=4398046511103)break e;r[t-1]|=128;r[t]=e/16777216>>>21&127;++t}return r[Vb](0,t)}function Qb(e){var r={l:0};var t=[];while(r.l<e.length)t.push(Jb(e,r));return t}function ew(e){return jb(e.map(function(e){return qb(e)}))}function rw(e){var r=0,t=e[r]&127;if(e[r++]<128)return t;t|=(e[r]&127)<<7;if(e[r++]<128)return t;t|=(e[r]&127)<<14;if(e[r++]<128)return t;t|=(e[r]&127)<<21;if(e[r++]<128)return t;t|=(e[r]&15)<<28;return t}function tw(e){var r=0,t=e[r]&127,a=0;e:if(e[r++]>=128){t|=(e[r]&127)<<7;if(e[r++]<128)break e;t|=(e[r]&127)<<14;if(e[r++]<128)break e;t|=(e[r]&127)<<21;if(e[r++]<128)break e;t|=(e[r]&127)<<28;a=e[r]>>4&7;if(e[r++]<128)break e;a|=(e[r]&127)<<3;if(e[r++]<128)break e;a|=(e[r]&127)<<10;if(e[r++]<128)break e;a|=(e[r]&127)<<17;if(e[r++]<128)break e;a|=(e[r]&127)<<24;if(e[r++]<128)break e;a|=(e[r]&127)<<31}return[t>>>0,a>>>0]}function aw(e){var r=[],t={l:0};while(t.l<e.length){var a=t.l;var n=Jb(e,t);var i=n&7;n=n/8|0;var s;var f=t.l;switch(i){case 0:{while(e[f++]>=128);s=e[Vb](t.l,f);t.l=f}break;case 1:{s=e[Vb](f,f+8);t.l=f+8}break;case 2:{var l=Jb(e,t);s=e[Vb](t.l,t.l+l);t.l+=l}break;case 5:{s=e[Vb](f,f+4);t.l=f+4}break;default:throw new Error("PB Type ".concat(i," for Field ").concat(n," at offset ").concat(a));}var o={data:s,type:i};if(r[n]==null)r[n]=[];r[n].push(o)}return r}function nw(e){var r=[];e.forEach(function(e,t){if(t==0)return;e.forEach(function(e){if(!e.data)return;r.push(qb(t*8+e.type));if(e.type==2)r.push(qb(e.data.length));r.push(e.data)})});return jb(r)}function iw(e,r){return(e==null?void 0:e.map(function(e){return r(e.data)}))||[]}function sw(e){var r;var t=[],a={l:0};while(a.l<e.length){var n=Jb(e,a);var i=aw(e[Vb](a.l,a.l+n));a.l+=n;var s={id:rw(i[1][0].data),messages:[]};i[2].forEach(function(r){var t=aw(r.data);var n=rw(t[3][0].data);s.messages.push({meta:t,data:e[Vb](a.l,a.l+n)});a.l+=n});if((r=i[3])==null?void 0:r[0])s.merge=rw(i[3][0].data)>>>0>0;t.push(s)}return t}function fw(e){var r=[];e.forEach(function(e){var t=[[],[{data:qb(e.id),type:0}],[]];if(e.merge!=null)t[3]=[{data:qb(+!!e.merge),type:0}];var a=[];e.messages.forEach(function(e){a.push(e.data);e.meta[3]=[{type:0,data:qb(e.data.length)}];t[2].push({data:nw(e.meta),type:2})});var n=nw(t);r.push(qb(n.length));r.push(n);a.forEach(function(e){return r.push(e)})});return jb(r)}function lw(e,r){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));var t={l:0};var a=Jb(r,t);var n=[];var i=t.l;while(i<r.length){var s=r[i]&3;if(s==0){var f=r[i++]>>2;if(f<60)++f;else{var l=f-59;f=r[i];if(l>1)f|=r[i+1]<<8;if(l>2)f|=r[i+2]<<16;if(l>3)f|=r[i+3]<<24;f>>>=0;f++;i+=l}n.push(r[Vb](i,i+f));i+=f;continue}else{var o=0,c=0;if(s==1){c=(r[i]>>2&7)+4;o=(r[i++]&224)<<3;o|=r[i++]}else{c=(r[i++]>>2)+1;if(s==2){o=r[i]|r[i+1]<<8;i+=2}else{o=(r[i]|r[i+1]<<8|r[i+2]<<16|r[i+3]<<24)>>>0;i+=4}}if(o==0)throw new Error("Invalid offset 0");var h=n.length-1,u=o;while(h>=0&&u>=n[h].length){u-=n[h].length;--h}if(h<0){if(u==0)u=n[h=0].length;else throw new Error("Invalid offset beyond length")}if(c<u)n.push(n[h][Vb](n[h].length-u,n[h].length-u+c));else{if(u>0){n.push(n[h][Vb](n[h].length-u));c-=u}++h;while(c>=n[h].length){n.push(n[h]);c-=n[h].length;++h}if(c)n.push(n[h][Vb](0,c))}if(n.length>25)n=[jb(n)]}}var d=0;for(var v=0;v<n.length;++v)d+=n[v].length;if(d!=a)throw new Error("Unexpected length: ".concat(d," != ").concat(a));return n}function ow(e){if(Array.isArray(e))e=new Uint8Array(e);var r=[];var t=0;while(t<e.length){var a=e[t++];var n=e[t]|e[t+1]<<8|e[t+2]<<16;t+=3;r.push.apply(r,lw(a,e[Vb](t,t+n)));t+=n}if(t!==e.length)throw new Error("data is not a valid framed stream!");return r.length==1?r[0]:jb(r)}function cw(e){var r=[];var t=0;while(t<e.length){var a=Math.min(e.length-t,268435455);var n=new Uint8Array(4);r.push(n);var i=qb(a);var s=i.length;r.push(i);if(a<=60){s++;r.push(new Uint8Array([a-1<<2]))}else if(a<=256){s+=2;r.push(new Uint8Array([240,a-1&255]))}else if(a<=65536){s+=3;r.push(new Uint8Array([244,a-1&255,a-1>>8&255]))}else if(a<=16777216){s+=4;r.push(new Uint8Array([248,a-1&255,a-1>>8&255,a-1>>16&255]))}else if(a<=4294967296){s+=5;r.push(new Uint8Array([252,a-1&255,a-1>>8&255,a-1>>16&255,a-1>>>24&255]))}r.push(e[Vb](t,t+a));s+=a;n[0]=0;n[1]=s&255;n[2]=s>>8&255;n[3]=s>>16&255;t+=a}return jb(r)}var hw=function(){return{sst:[],rsst:[],ofmt:[],nfmt:[],fmla:[],ferr:[],cmnt:[]}};function uw(e,r,t,a,n){var i,s,f,l;var o=r&255,c=r>>8;var h=c>=5?n:a;e:if(t&(c>4?8:4)&&e.t=="n"&&o==7){var u=((i=h[7])==null?void 0:i[0])?rw(h[7][0].data):-1;if(u==-1)break e;var d=((s=h[15])==null?void 0:s[0])?rw(h[15][0].data):-1;var v=((f=h[16])==null?void 0:f[0])?rw(h[16][0].data):-1;var p=((l=h[40])==null?void 0:l[0])?rw(h[40][0].data):-1;var m=e.v,g=m;r:if(p){if(m==0){d=v=2;break r}if(m>=604800)d=1;else if(m>=86400)d=2;else if(m>=3600)d=4;else if(m>=60)d=8;else if(m>=1)d=16;else d=32;if(Math.floor(m)!=m)v=32;else if(m%60)v=16;else if(m%3600)v=8;else if(m%86400)v=4;else if(m%604800)v=2;if(v<d)v=d}if(d==-1||v==-1)break e;var b=[],w=[];if(d==1){g=m/604800;if(v==1){w.push('d"d"')}else{g|=0;m-=604800*g}b.push(g+(u==2?" week"+(g==1?"":"s"):u==1?"w":""))}if(d<=2&&v>=2){g=m/86400;if(v>2){g|=0;m-=86400*g}w.push('d"d"');b.push(g+(u==2?" day"+(g==1?"":"s"):u==1?"d":""))}if(d<=4&&v>=4){g=m/3600;if(v>4){g|=0;m-=3600*g}w.push((d>=4?"[h]":"h")+'"h"');b.push(g+(u==2?" hour"+(g==1?"":"s"):u==1?"h":""))}if(d<=8&&v>=8){g=m/60;if(v>8){g|=0;m-=60*g}w.push((d>=8?"[m]":"m")+'"m"');if(u==0)b.push((d==8&&v==8||g>=10?"":"0")+g);else b.push(g+(u==2?" minute"+(g==1?"":"s"):u==1?"m":""))}if(d<=16&&v>=16){g=m;if(v>16){g|=0;m-=g}w.push((d>=16?"[s]":"s")+'"s"');if(u==0)b.push((v==16&&d==16||g>=10?"":"0")+g);else b.push(g+(u==2?" second"+(g==1?"":"s"):u==1?"s":""))}if(v>=32){g=Math.round(1e3*m);if(d<32)w.push('.000"ms"');if(u==0)b.push((g>=100?"":g>=10?"0":"00")+g);else b.push(g+(u==2?" millisecond"+(g==1?"":"s"):u==1?"ms":""))}e.w=b.join(u==0?":":" ");e.z=w.join(u==0?'":"':" ");if(u==0)e.w=e.w.replace(/:(\d\d\d)$/,".$1")}}function dw(e,r,t,a){var n=$b(e);var i=n.getUint32(4,true);var s=-1,f=-1,l=-1,o=NaN,c=0,h=new Date(Date.UTC(2001,0,1));var u=t>1?12:8;if(i&2){l=n.getUint32(u,true);u+=4}u+=Kb(i&(t>1?3468:396))*4;if(i&512){s=n.getUint32(u,true);u+=4}u+=Kb(i&(t>1?12288:4096))*4;if(i&16){f=n.getUint32(u,true);u+=4}if(i&32){o=n.getFloat64(u,true);u+=8}if(i&64){h.setTime(h.getTime()+(c=n.getFloat64(u,true))*1e3);u+=8}if(t>1){i=n.getUint32(8,true)>>>16;if(i&255){if(l==-1)l=n.getUint32(u,true);u+=4}}var d;var v=e[t>=4?1:2];switch(v){case 0:return void 0;case 2:d={t:"n",v:o};break;case 3:d={t:"s",v:r.sst[f]};break;case 5:{if(a==null?void 0:a.cellDates)d={t:"d",v:h};else d={t:"n",v:c/86400+35430,z:q[14]}}break;case 6:d={t:"b",v:o>0};break;case 7:d={t:"n",v:o};break;case 8:d={t:"e",v:0};break;case 9:{if(s>-1){var p=r.rsst[s];d={t:"s",v:p.v};if(p.l)d.l={Target:p.l}}else throw new Error("Unsupported cell type ".concat(e[Vb](0,4)))}break;default:throw new Error("Unsupported cell type ".concat(e[Vb](0,4)));}if(l>-1)uw(d,v|t<<8,i,r.ofmt[l],r.nfmt[l]);if(v==7)d.v/=86400;return d}function vw(e,r,t){var a=$b(e);var n=a.getUint32(4,true);var i=a.getUint32(8,true);var s=12;var f=-1,l=-1,o=-1,c=NaN,h=NaN,u=0,d=new Date(Date.UTC(2001,0,1)),v=-1,p=-1;if(i&1){c=Yb(e,s);s+=16}if(i&2){h=a.getFloat64(s,true);s+=8}if(i&4){d.setTime(d.getTime()+(u=a.getFloat64(s,true))*1e3);s+=8}if(i&8){l=a.getUint32(s,true);s+=4}if(i&16){f=a.getUint32(s,true);s+=4}s+=Kb(i&480)*4;if(i&512){p=a.getUint32(s,true);s+=4}s+=Kb(i&1024)*4;if(i&2048){v=a.getUint32(s,true);s+=4}var m;var g=e[1];switch(g){case 0:m={t:"z"};break;case 2:m={t:"n",v:c};break;case 3:m={t:"s",v:r.sst[l]};break;case 5:{if(t==null?void 0:t.cellDates)m={t:"d",v:d};else m={t:"n",v:u/86400+35430,z:q[14]}}break;case 6:m={t:"b",v:h>0};break;case 7:m={t:"n",v:h};break;case 8:m={t:"e",v:0};break;case 9:{if(f>-1){var b=r.rsst[f];m={t:"s",v:b.v};if(b.l)m.l={Target:b.l}}else throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(i&31," : ").concat(e[Vb](0,4)))}break;case 10:m={t:"n",v:c};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(i&31," : ").concat(e[Vb](0,4)));}s+=Kb(i&4096)*4;if(i&516096){if(o==-1)o=a.getUint32(s,true);s+=4}if(i&524288){var w=a.getUint32(s,true);s+=4;if(r.cmnt[w])m.c=_w(r.cmnt[w])}if(o>-1)uw(m,g|5<<8,i>>13,r.ofmt[o],r.nfmt[o]);if(g==7)m.v/=86400;return m}function pw(e,r){var t=new Uint8Array(32),a=$b(t),n=12,i=0;t[0]=5;switch(e.t){case"n":if(e.z&&Le(e.z)){t[1]=5;a.setFloat64(n,(vr(e.v+1462).getTime()-Date.UTC(2001,0,1))/1e3,true);i|=4;n+=8;break}else{t[1]=2;Zb(t,n,e.v);i|=1;n+=16}break;case"b":t[1]=6;a.setFloat64(n,e.v?1:0,true);i|=2;n+=8;break;case"s":{var s=e.v==null?"":String(e.v);if(e.l){var f=r.rsst.findIndex(function(r){var t;return r.v==s&&r.l==((t=e.l)==null?void 0:t.Target)});if(f==-1)r.rsst[f=r.rsst.length]={v:s,l:e.l.Target};t[1]=9;a.setUint32(n,f,true);i|=16;n+=4}else{var l=r.sst.indexOf(s);if(l==-1)r.sst[l=r.sst.length]=s;t[1]=3;a.setUint32(n,l,true);i|=8;n+=4}}break;case"d":t[1]=5;a.setFloat64(n,(e.v.getTime()-Date.UTC(2001,0,1))/1e3,true);i|=4;n+=8;break;case"z":t[1]=0;break;default:throw"unsupported cell type "+e.t;}if(e.c){r.cmnt.push(Sw(e.c));a.setUint32(n,r.cmnt.length-1,true);i|=524288;n+=4}a.setUint32(8,i,true);return t[Vb](0,n)}function mw(e,r){var t=new Uint8Array(32),a=$b(t),n=12,i=0,s="";t[0]=4;switch(e.t){case"n":break;case"b":break;case"s":{s=e.v==null?"":String(e.v);if(e.l){var f=r.rsst.findIndex(function(r){var t;return r.v==s&&r.l==((t=e.l)==null?void 0:t.Target)});if(f==-1)r.rsst[f=r.rsst.length]={v:s,l:e.l.Target};t[1]=9;a.setUint32(n,f,true);i|=512;n+=4}else{}}break;case"d":break;case"e":break;case"z":break;default:throw"unsupported cell type "+e.t;}if(e.c){a.setUint32(n,r.cmnt.length-1,true);i|=4096;n+=4}switch(e.t){case"n":t[1]=2;a.setFloat64(n,e.v,true);i|=32;n+=8;break;case"b":t[1]=6;a.setFloat64(n,e.v?1:0,true);i|=32;n+=8;break;case"s":{s=e.v==null?"":String(e.v);if(e.l){}else{var l=r.sst.indexOf(s);if(l==-1)r.sst[l=r.sst.length]=s;t[1]=3;a.setUint32(n,l,true);i|=16;n+=4}}break;case"d":t[1]=5;a.setFloat64(n,(e.v.getTime()-Date.UTC(2001,0,1))/1e3,true);i|=64;n+=8;break;case"z":t[1]=0;break;default:throw"unsupported cell type "+e.t;}a.setUint32(8,i,true);return t[Vb](0,n)}function gw(e,r,t){switch(e[0]){case 0:;case 1:;case 2:;case 3:;case 4:return dw(e,r,e[0],t);case 5:return vw(e,r,t);default:throw new Error("Unsupported payload version ".concat(e[0]));}}function bw(e){var r=aw(e);return rw(r[1][0].data)}function ww(e){return nw([[],[{type:0,data:qb(e)}]])}function kw(e,r){var t;var a=((t=e.messages[0].meta[5])==null?void 0:t[0])?Qb(e.messages[0].meta[5][0].data):[];var n=a.indexOf(r);if(n==-1){a.push(r);e.messages[0].meta[5]=[{type:2,data:ew(a)}]}}function Aw(e,r){var t;var a=((t=e.messages[0].meta[5])==null?void 0:t[0])?Qb(e.messages[0].meta[5][0].data):[];e.messages[0].meta[5]=[{type:2,data:ew(a.filter(function(e){return e!=r}))}]}function Tw(e,r){var t=aw(r.data);var a=rw(t[1][0].data);var n=t[3];var i=[];(n||[]).forEach(function(r){var t,n;var s=aw(r.data);if(!s[1])return;var f=rw(s[1][0].data)>>>0;switch(a){case 1:i[f]=Xb(s[3][0].data);break;case 8:{var l=e[bw(s[9][0].data)][0];var o=aw(l.data);var c=e[bw(o[1][0].data)][0];var h=rw(c.meta[1][0].data);if(h!=2001)throw new Error("2000 unexpected reference to ".concat(h));var u=aw(c.data);var d={v:u[3].map(function(e){return Xb(e.data)}).join("")};i[f]=d;e:if((t=u==null?void 0:u[11])==null?void 0:t[0]){var v=(n=aw(u[11][0].data))==null?void 0:n[1];if(!v)break e;v.forEach(function(r){var t,a,n;var i=aw(r.data);if((t=i[2])==null?void 0:t[0]){var s=e[bw((a=i[2])==null?void 0:a[0].data)][0];var f=rw(s.meta[1][0].data);switch(f){case 2032:var l=aw(s.data);if(((n=l==null?void 0:l[2])==null?void 0:n[0])&&!d.l)d.l=Xb(l[2][0].data);break;case 2039:break;default:console.log("unrecognized ObjectAttribute type ".concat(f));}}})}}break;case 2:i[f]=aw(s[6][0].data);break;case 3:i[f]=aw(s[5][0].data);break;case 10:{var p=e[bw(s[10][0].data)][0];i[f]=Cw(e,p.data)}break;default:throw a;}});return i}function yw(e,r){var t,a,n,i,s,f,l,o,c,h,u,d,v,p;var m=aw(e);var g=rw(m[1][0].data)>>>0;var b=rw(m[2][0].data)>>>0;var w=((a=(t=m[8])==null?void 0:t[0])==null?void 0:a.data)&&rw(m[8][0].data)>0||false;var k,A;if(((i=(n=m[7])==null?void 0:n[0])==null?void 0:i.data)&&r!=0){k=(f=(s=m[7])==null?void 0:s[0])==null?void 0:f.data;A=(o=(l=m[6])==null?void 0:l[0])==null?void 0:o.data}else if(((h=(c=m[4])==null?void 0:c[0])==null?void 0:h.data)&&r!=1){k=(d=(u=m[4])==null?void 0:u[0])==null?void 0:d.data;A=(p=(v=m[3])==null?void 0:v[0])==null?void 0:p.data}else throw"NUMBERS Tile missing ".concat(r," cell storage");var T=w?4:1;var y=$b(k);var E=[];for(var C=0;C<k.length/2;++C){var _=y.getUint16(C*2,true);if(_<65535)E.push([C,_])}if(E.length!=b)throw"Expected ".concat(b," cells, found ").concat(E.length);var S=[];for(C=0;C<E.length-1;++C)S[E[C][0]]=A[Vb](E[C][1]*T,E[C+1][1]*T);if(E.length>=1)S[E[E.length-1][0]]=A[Vb](E[E.length-1][1]*T);return{R:g,cells:S}}function Ew(e,r){var t;var a=aw(r.data);var n=-1;if((t=a==null?void 0:a[7])==null?void 0:t[0]){if(rw(a[7][0].data)>>>0)n=1;else n=0}var i=iw(a[5],function(e){return yw(e,n)});return{nrows:rw(a[4][0].data)>>>0,data:i.reduce(function(e,r){if(!e[r.R])e[r.R]=[];r.cells.forEach(function(t,a){if(e[r.R][a])throw new Error("Duplicate cell r=".concat(r.R," c=").concat(a));e[r.R][a]=t});return e},[])}}function Cw(e,r){var t,a,n,i,s,f,l,o,c,h;var u={t:"",a:""};var d=aw(r);if((a=(t=d==null?void 0:d[1])==null?void 0:t[0])==null?void 0:a.data)u.t=Xb((i=(n=d==null?void 0:d[1])==null?void 0:n[0])==null?void 0:i.data)||"";if((f=(s=d==null?void 0:d[3])==null?void 0:s[0])==null?void 0:f.data){var v=e[bw((o=(l=d==null?void 0:d[3])==null?void 0:l[0])==null?void 0:o.data)][0];var p=aw(v.data);if((h=(c=p[1])==null?void 0:c[0])==null?void 0:h.data)u.a=Xb(p[1][0].data)}if(d==null?void 0:d[4]){u.replies=[];d[4].forEach(function(r){var t=e[bw(r.data)][0];u.replies.push(Cw(e,t.data))})}return u}function _w(e){var r=[];r.push({t:e.t||"",a:e.a,T:e.replies&&e.replies.length>0});if(e.replies)e.replies.forEach(function(e){r.push({t:e.t||"",a:e.a,T:true})});return r}function Sw(e){var r={a:"",t:"",replies:[]};for(var t=0;t<e.length;++t){if(t==0){r.a=e[t].a;r.t=e[t].t}else{r.replies.push({a:e[t].a,t:e[t].t})}}return r}function xw(e,r,t,a){var n,i,s,f,l,o,c,h,u,d,v,p,m,g;var b=aw(r.data);var w={s:{r:0,c:0},e:{r:0,c:0}};w.e.r=(rw(b[6][0].data)>>>0)-1;if(w.e.r<0)throw new Error("Invalid row varint ".concat(b[6][0].data));w.e.c=(rw(b[7][0].data)>>>0)-1;if(w.e.c<0)throw new Error("Invalid col varint ".concat(b[7][0].data));t["!ref"]=Ja(w);var k=t["!data"]!=null,A=t;var T=aw(b[4][0].data);var y=hw();if((n=T[4])==null?void 0:n[0])y.sst=Tw(e,e[bw(T[4][0].data)][0]);if((i=T[6])==null?void 0:i[0])y.fmla=Tw(e,e[bw(T[6][0].data)][0]);if((s=T[11])==null?void 0:s[0])y.ofmt=Tw(e,e[bw(T[11][0].data)][0]);if((f=T[12])==null?void 0:f[0])y.ferr=Tw(e,e[bw(T[12][0].data)][0]);if((l=T[17])==null?void 0:l[0])y.rsst=Tw(e,e[bw(T[17][0].data)][0]);if((o=T[19])==null?void 0:o[0])y.cmnt=Tw(e,e[bw(T[19][0].data)][0]);if((c=T[22])==null?void 0:c[0])y.nfmt=Tw(e,e[bw(T[22][0].data)][0]);var E=aw(T[3][0].data);var C=0;if(!((h=T[9])==null?void 0:h[0]))throw"NUMBERS file missing row tree";var _=aw(T[9][0].data)[1].map(function(e){return aw(e.data)});_.forEach(function(r){C=rw(r[1][0].data);var n=rw(r[2][0].data);var i=E[1][n];if(!i)throw"NUMBERS missing tile "+n;var s=aw(i.data);var f=e[bw(s[2][0].data)][0];var l=rw(f.meta[1][0].data);if(l!=6002)throw new Error("6001 unexpected reference to ".concat(l));var o=Ew(e,f);o.data.forEach(function(e,r){e.forEach(function(e,n){var i=gw(e,y,a);if(i){if(k){if(!A["!data"][C+r])A["!data"][C+r]=[];A["!data"][C+r][n]=i}else{t[$a(n)+Wa(C+r)]=i}}})});C+=o.nrows});if((u=T[13])==null?void 0:u[0]){var S=e[bw(T[13][0].data)][0];var x=rw(S.meta[1][0].data);if(x!=6144)throw new Error("Expected merge type 6144, found ".concat(x));t["!merges"]=(d=aw(S.data))==null?void 0:d[1].map(function(e){var r=aw(e.data);var t=$b(aw(r[1][0].data)[1][0].data),a=$b(aw(r[2][0].data)[1][0].data);return{s:{r:t.getUint16(0,true),c:t.getUint16(2,true)},e:{r:t.getUint16(0,true)+a.getUint16(0,true)-1,c:t.getUint16(2,true)+a.getUint16(2,true)-1}}})}if(!((v=t["!merges"])==null?void 0:v.length)&&((p=b[47])==null?void 0:p[0])){var O=aw(b[47][0].data);if((m=O[2])==null?void 0:m[0]){var I=aw(O[2][0].data);if((g=I[3])==null?void 0:g[0]){t["!merges"]=iw(I[3],function(e){var r,t,a,n,i;var s=aw(e);var f=aw(s[2][0].data);var l=aw(f[1][0].data);if(!((r=l[1])==null?void 0:r[0]))return;var o=aw(l[1][0].data);var c=rw(o[1][0].data);if(c!=67)return;var h=aw(o[40][0].data);if(!((t=h[3])==null?void 0:t[0])||!((a=h[4])==null?void 0:a[0]))return;var u=aw(h[3][0].data);var d=aw(h[4][0].data);var v=rw(u[1][0].data);var p=((n=u[2])==null?void 0:n[0])?rw(u[2][0].data):v;var m=rw(d[1][0].data);var g=((i=d[2])==null?void 0:i[0])?rw(d[2][0].data):m;return{s:{r:m,c:v},e:{r:g,c:p}}}).filter(function(e){return e!=null})}}}}function Ow(e,r,t){var a=aw(r.data);var n={"!ref":"A1"};if(t==null?void 0:t.dense)n["!data"]=[];var i=e[bw(a[2][0].data)];var s=rw(i[0].meta[1][0].data);if(s!=6001)throw new Error("6000 unexpected reference to ".concat(s));xw(e,i[0],n,t);return n}function Iw(e,r,t){var a;var n=aw(r.data);var i={name:((a=n[1])==null?void 0:a[0])?Xb(n[1][0].data):"",sheets:[]};var s=iw(n[2],bw);s.forEach(function(r){e[r].forEach(function(r){var a=rw(r.meta[1][0].data);if(a==6e3)i.sheets.push(Ow(e,r,t))})});return i}function Rw(e,r,t){var a;var n=$k();n.Workbook={WBProps:{date1904:true}};var i=aw(r.data);if((a=i[2])==null?void 0:a[0])throw new Error("Keynote presentations are not supported");var s=iw(i[1],bw);s.forEach(function(r){e[r].forEach(function(r){var a=rw(r.meta[1][0].data);if(a==2){var i=Iw(e,r,t);i.sheets.forEach(function(e,r){Xk(n,e,r==0?i.name:i.name+"_"+r,true)})}})});if(n.SheetNames.length==0)throw new Error("Empty NUMBERS file");n.bookType="numbers";return n}function Nw(e,r){var t,a,n,i,s,f,l;var o={},c=[];e.FullPaths.forEach(function(e){if(e.match(/\.iwpv2/))throw new Error("Unsupported password protection")});e.FileIndex.forEach(function(e){if(!e.name.match(/\.iwa$/))return;if(e.content[0]!=0)return;var r;try{r=ow(e.content)}catch(t){return console.log("?? "+e.content.length+" "+(t.message||t))}var a;try{a=sw(r)}catch(t){return console.log("## "+(t.message||t))}a.forEach(function(e){o[e.id]=e.messages;c.push(e.id)})});if(!c.length)throw new Error("File has no messages");if(((n=(a=(t=o==null?void 0:o[1])==null?void 0:t[0].meta)==null?void 0:a[1])==null?void 0:n[0].data)&&rw(o[1][0].meta[1][0].data)==1e4)throw new Error("Pages documents are not supported");var h=((l=(f=(s=(i=o==null?void 0:o[1])==null?void 0:i[0])==null?void 0:s.meta)==null?void 0:f[1])==null?void 0:l[0].data)&&rw(o[1][0].meta[1][0].data)==1&&o[1][0];if(!h)c.forEach(function(e){o[e].forEach(function(e){var r=rw(e.meta[1][0].data)>>>0;if(r==1){if(!h)h=e;else throw new Error("Document has multiple roots")}})});if(!h)throw new Error("Cannot find Document root");return Rw(o,h,r)}function Fw(e,r,t){var a,n,i;var s=[[],[{type:0,data:qb(0)}],[{type:0,data:qb(0)}],[{type:2,data:new Uint8Array([])}],[{type:2,data:new Uint8Array(Array.from({length:510},function(){return 255}))}],[{type:0,data:qb(5)}],[{type:2,data:new Uint8Array([])}],[{type:2,data:new Uint8Array(Array.from({length:510},function(){return 255}))}],[{type:0,data:qb(1)}]];if(!((a=s[6])==null?void 0:a[0])||!((n=s[7])==null?void 0:n[0]))throw"Mutation only works on post-BNC storages!";var f=0;if(s[7][0].data.length<2*e.length){var l=new Uint8Array(2*e.length);l.set(s[7][0].data);s[7][0].data=l}if(s[4][0].data.length<2*e.length){var o=new Uint8Array(2*e.length);o.set(s[4][0].data);s[4][0].data=o}var c=$b(s[7][0].data),h=0,u=[];var d=$b(s[4][0].data),v=0,p=[];var m=t?4:1;for(var g=0;g<e.length;++g){if(e[g]==null||e[g].t=="z"&&!((i=e[g].c)==null?void 0:i.length)||e[g].t=="e"){c.setUint16(g*2,65535,true);d.setUint16(g*2,65535);continue}c.setUint16(g*2,h/m,true);d.setUint16(g*2,v/m,true);var b,w;switch(e[g].t){case"d":if(e[g].v instanceof Date){b=pw(e[g],r);w=mw(e[g],r);break}b=pw(e[g],r);w=mw(e[g],r);break;case"s":;case"n":;case"b":;case"z":b=pw(e[g],r);w=mw(e[g],r);break;default:throw new Error("Unsupported value "+e[g]);}u.push(b);h+=b.length;{p.push(w);v+=w.length}++f}s[2][0].data=qb(f);s[5][0].data=qb(5);for(;g<s[7][0].data.length/2;++g){c.setUint16(g*2,65535,true);d.setUint16(g*2,65535,true)}s[6][0].data=jb(u);s[3][0].data=jb(p);s[8]=[{type:0,data:qb(t?1:0)}];return s}function Dw(e,r){return{meta:[[],[{type:0,data:qb(e)}]],data:r}}function Pw(e,r){if(!r.last)r.last=927262;for(var t=r.last;t<2e6;++t)if(!r[t]){r[r.last=t]=e;return t}throw new Error("Too many messages")}function Lw(e){var r={};var t=[];e.FileIndex.map(function(r,t){return[r,e.FullPaths[t]]}).forEach(function(e){var a=e[0],n=e[1];if(a.type!=2)return;if(!a.name.match(/\.iwa/))return;if(a.content[0]!=0)return;sw(ow(a.content)).forEach(function(e){t.push(e.id);r[e.id]={deps:[],location:n,type:rw(e.messages[0].meta[1][0].data)}})});e.FileIndex.forEach(function(e){if(!e.name.match(/\.iwa/))return;if(e.content[0]!=0)return;sw(ow(e.content)).forEach(function(e){e.messages.forEach(function(t){[5,6].forEach(function(a){if(!t.meta[a])return;t.meta[a].forEach(function(t){r[e.id].deps.push(rw(t.data))})})})})});return r}function Mw(e,r,t){return nw([[],[{type:0,data:qb(1)}],[],[{type:5,data:new Uint8Array(Float32Array.from([e/255]).buffer)}],[{type:5,data:new Uint8Array(Float32Array.from([r/255]).buffer)}],[{type:5,data:new Uint8Array(Float32Array.from([t/255]).buffer)}],[{type:5,data:new Uint8Array(Float32Array.from([1]).buffer)}],[],[],[],[],[],[{type:0,data:qb(1)}]])}function Uw(e){switch(e){case 0:return Mw(99,222,171);case 1:return Mw(162,197,240);case 2:return Mw(255,189,189);}return Mw(Math.random()*255,Math.random()*255,Math.random()*255)}function Bw(e,r){if(!r||!r.numbers)throw new Error("Must pass a `numbers` option -- check the README");var t=Qe.read(r.numbers,{type:"base64"});var a=Lw(t);var n=zw(t,a,1);if(n==null)throw"Could not find message ".concat(1," in Numbers template");var i=iw(aw(n.messages[0].data)[1],bw);if(i.length>1)throw new Error("Template NUMBERS file must have exactly one sheet");e.SheetNames.forEach(function(r,s){if(s>=1){Gw(t,a,s+1);n=zw(t,a,1);i=iw(aw(n.messages[0].data)[1],bw)}jw(t,a,e.Sheets[r],r,s,i[s])});return t}function Ww(e,r,t,a){var n=Qe.find(e,r[t].location);if(!n)throw"Could not find ".concat(r[t].location," in Numbers template");var i=sw(ow(n.content));var s=i.find(function(e){return e.id==t});a(s,i);n.content=cw(fw(i));n.size=n.content.length}function zw(e,r,t){var a=Qe.find(e,r[t].location);if(!a)throw"Could not find ".concat(r[t].location," in Numbers template");var n=sw(ow(a.content));var i=n.find(function(e){return e.id==t});return i}function Hw(e,r,t){e[3].push({type:2,data:nw([[],[{type:0,data:qb(r)}],[{type:2,data:Gb(t.replace(/-[\s\S]*$/,""))}],[{type:2,data:Gb(t)}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:qb(0)}],[],[{type:0,data:qb(0)}]])});e[1]=[{type:0,data:qb(Math.max(r+1,rw(e[1][0].data)))}]}function Vw(e,r,t,a,n,i){if(!i)i=Pw({deps:[],location:"",type:r},n);var s="".concat(a,"-").concat(i,".iwa");n[i].location="Root Entry"+s;Qe.utils.cfb_add(e,s,cw(fw([{id:i,messages:[Dw(r,nw(t))]}])));var f=s.replace(/^[\/]/,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Ww(e,n,2,function(e){var r=aw(e.messages[0].data);Hw(r,i||0,f);e.messages[0].data=nw(r)});return i}function $w(e,r,t,a){var n=r[t].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");var i=e[3].findIndex(function(e){var r,t;var a=aw(e.data);if((r=a[3])==null?void 0:r[0])return Xb(a[3][0].data)==n;if(((t=a[2])==null?void 0:t[0])&&Xb(a[2][0].data)==n)return true;return false});var s=aw(e[3][i].data);if(!s[6])s[6]=[];(Array.isArray(a)?a:[a]).forEach(function(e){s[6].push({type:2,data:nw([[],[{type:0,data:qb(e)}]])})});e[3][i].data=nw(s)}function Xw(e,r,t,a){var n=r[t].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");var i=e[3].findIndex(function(e){var r,t;var a=aw(e.data);if((r=a[3])==null?void 0:r[0])return Xb(a[3][0].data)==n;if(((t=a[2])==null?void 0:t[0])&&Xb(a[2][0].data)==n)return true;return false});var s=aw(e[3][i].data);if(!s[6])s[6]=[];s[6]=s[6].filter(function(e){return rw(aw(e.data)[1][0].data)!=a});e[3][i].data=nw(s)}function Gw(e,r,t){var a=-1,n=-1;var i={};Ww(e,r,1,function(t,s){var f=aw(t.messages[0].data); 64893a=bw(aw(t.messages[0].data)[1][0].data);n=Pw({deps:[1],location:r[a].location,type:2},r);i[a]=n;kw(t,n);f[1].push({type:2,data:ww(n)});var l=zw(e,r,a);l.id=n;if(r[1].location==r[n].location)s.push(l);else Ww(e,r,n,function(e,r){return r.push(l)});t.messages[0].data=nw(f)});var s=-1;Ww(e,r,n,function(t,a){var f=aw(t.messages[0].data);for(var l=3;l<=69;++l)delete f[l];var o=iw(f[2],bw);o.forEach(function(e){return Aw(t,e)});s=Pw({deps:[n],location:r[o[0]].location,type:r[o[0]].type},r);kw(t,s);i[o[0]]=s;f[2]=[{type:2,data:ww(s)}];var c=zw(e,r,o[0]);c.id=s;if(r[o[0]].location==r[n].location)a.push(c);else{Ww(e,r,2,function(e){var t=aw(e.messages[0].data);$w(t,r,n,s);e.messages[0].data=nw(t)});Ww(e,r,s,function(e,r){return r.push(c)})}t.messages[0].data=nw(f)});var f=-1;Ww(e,r,s,function(t,a){var n=aw(t.messages[0].data);var l=aw(n[1][0].data);for(var o=3;o<=69;++o)delete l[o];var c=bw(l[2][0].data);l[2][0].data=ww(i[c]);n[1][0].data=nw(l);var h=bw(n[2][0].data);Aw(t,h);f=Pw({deps:[s],location:r[h].location,type:r[h].type},r);kw(t,f);i[h]=f;n[2][0].data=ww(f);var u=zw(e,r,h);u.id=f;if(r[s].location==r[f].location)a.push(u);else Ww(e,r,f,function(e,r){return r.push(u)});t.messages[0].data=nw(n)});Ww(e,r,f,function(a,n){var s,l;var o=aw(a.messages[0].data);var c=Xb(o[1][0].data),h=c.replace(/-[A-Z0-9]*/,"-".concat(("0000"+t.toString(16)).slice(-4)));o[1][0].data=Gb(h);[12,13,29,31,32,33,39,44,47,81,82,84].forEach(function(e){return delete o[e]});if(o[45]){var u=aw(o[45][0].data);var d=bw(u[1][0].data);Aw(a,d);delete o[45]}if(o[70]){var v=aw(o[70][0].data);(s=v[2])==null?void 0:s.forEach(function(e){var r=aw(e.data);[2,3].map(function(e){return r[e][0]}).forEach(function(e){var r=aw(e.data);if(!r[8])return;var t=bw(r[8][0].data);Aw(a,t)})});delete o[70]}[46,30,34,35,36,38,48,49,60,61,62,63,64,71,72,73,74,75,85,86,87,88,89].forEach(function(e){if(!o[e])return;var r=bw(o[e][0].data);delete o[e];Aw(a,r)});var p=aw(o[4][0].data);{[2,4,5,6,11,12,13,15,16,17,18,19,20,21,22].forEach(function(t){var s;if(!((s=p[t])==null?void 0:s[0]))return;var l=bw(p[t][0].data);var o=Pw({deps:[f],location:r[l].location,type:r[l].type},r);Aw(a,l);kw(a,o);i[l]=o;var c=zw(e,r,l);c.id=o;if(r[l].location==r[f].location)n.push(c);else{r[o].location=r[l].location.replace(l.toString(),o.toString());if(r[o].location==r[l].location)r[o].location=r[o].location.replace(/\.iwa/,"-".concat(o,".iwa"));Qe.utils.cfb_add(e,r[o].location,cw(fw([c])));var h=r[o].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Ww(e,r,2,function(e){var t=aw(e.messages[0].data);Hw(t,o,h);$w(t,r,f,o);e.messages[0].data=nw(t)})}p[t][0].data=ww(o)});var m=aw(p[1][0].data);{(l=m[2])==null?void 0:l.forEach(function(t){var s=bw(t.data);var l=Pw({deps:[f],location:r[s].location,type:r[s].type},r);Aw(a,s);kw(a,l);i[s]=l;var o=zw(e,r,s);o.id=l;if(r[s].location==r[f].location){n.push(o)}else{r[l].location=r[s].location.replace(s.toString(),l.toString());if(r[l].location==r[s].location)r[l].location=r[l].location.replace(/\.iwa/,"-".concat(l,".iwa"));Qe.utils.cfb_add(e,r[l].location,cw(fw([o])));var c=r[l].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Ww(e,r,2,function(e){var t=aw(e.messages[0].data);Hw(t,l,c);$w(t,r,f,l);e.messages[0].data=nw(t)})}t.data=ww(l)})}p[1][0].data=nw(m);var g=aw(p[3][0].data);{g[1].forEach(function(t){var n=aw(t.data);var s=bw(n[2][0].data);var l=i[s];if(!i[s]){l=Pw({deps:[f],location:"",type:r[s].type},r);r[l].location="Root Entry/Index/Tables/Tile-".concat(l,".iwa");i[s]=l;var o=zw(e,r,s);o.id=l;Aw(a,s);kw(a,l);Qe.utils.cfb_add(e,"/Index/Tables/Tile-".concat(l,".iwa"),cw(fw([o])));Ww(e,r,2,function(e){var t=aw(e.messages[0].data);t[3].push({type:2,data:nw([[],[{type:0,data:qb(l)}],[{type:2,data:Gb("Tables/Tile")}],[{type:2,data:Gb("Tables/Tile-".concat(l))}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:qb(0)}],[],[{type:0,data:qb(0)}]])});t[1]=[{type:0,data:qb(Math.max(l+1,rw(t[1][0].data)))}];$w(t,r,f,l);e.messages[0].data=nw(t)})}n[2][0].data=ww(l);t.data=nw(n)})}p[3][0].data=nw(g)}o[4][0].data=nw(p);a.messages[0].data=nw(o)})}function jw(e,r,t,a,n,i){var s=[];Ww(e,r,i,function(e){var r=aw(e.messages[0].data);{r[1]=[{type:2,data:Gb(a)}];s=iw(r[2],bw)}e.messages[0].data=nw(r)});var f=zw(e,r,s[0]);var l=bw(aw(f.messages[0].data)[2][0].data);Ww(e,r,l,function(a,n){return Yw(e,r,t,a,n,l)})}var Kw=true;function Yw(e,r,t,a,n,i){if(!t["!ref"])throw new Error("Cannot export empty sheet to NUMBERS");var s=Za(t["!ref"]);s.s.r=s.s.c=0;var f=false;if(s.e.c>999){f=true;s.e.c=999}if(s.e.r>999999){f=true;s.e.r=999999}if(f)console.error("Truncating to ".concat(Ja(s)));var l=[];if(t["!data"])l=t["!data"];else{var o=[];for(var c=0;c<=s.e.c;++c)o[c]=$a(c);for(var h=0;h<=s.e.r;++h){l[h]=[];var u=""+(h+1);for(c=0;c<=s.e.c;++c){var d=t[o[c]+u];if(!d)continue;l[h][c]=d}}}var v={cmnt:[{a:"~54ee77S~",t:"... the people who are crazy enough to think they can change the world, are the ones who do."}],ferr:[],fmla:[],nfmt:[],ofmt:[],rsst:[{v:"~54ee77S~",l:"https://sheetjs.com/"}],sst:["~Sh33tJ5~"]};var p=aw(a.messages[0].data);{p[6][0].data=qb(s.e.r+1);p[7][0].data=qb(s.e.c+1);delete p[46];var m=aw(p[4][0].data);{var g=bw(aw(m[1][0].data)[2][0].data);Ww(e,r,g,function(e,r){var t;var a=aw(e.messages[0].data);if((t=a==null?void 0:a[2])==null?void 0:t[0])for(var n=0;n<l.length;++n){var i=aw(a[2][0].data);i[1][0].data=qb(n);i[4][0].data=qb(l[n].length);a[2][n]={type:a[2][0].type,data:nw(i)}}e.messages[0].data=nw(a)});var b=bw(m[2][0].data);Ww(e,r,b,function(e,r){var t=aw(e.messages[0].data);for(var a=0;a<=s.e.c;++a){var n=aw(t[2][0].data);n[1][0].data=qb(a);n[4][0].data=qb(s.e.r+1);t[2][a]={type:t[2][0].type,data:nw(n)}}e.messages[0].data=nw(t)});var w=aw(m[9][0].data);w[1]=[];var k=aw(m[3][0].data);{var A=256;k[2]=[{type:0,data:qb(A)}];var T=bw(aw(k[1][0].data)[2][0].data);var y=function(){var t=zw(e,r,2);var a=aw(t.messages[0].data);var n=a[3].filter(function(e){return rw(aw(e.data)[1][0].data)==T});return(n==null?void 0:n.length)?rw(aw(n[0].data)[12][0].data):0}();{Qe.utils.cfb_del(e,r[T].location);Ww(e,r,2,function(e){var t=aw(e.messages[0].data);t[3]=t[3].filter(function(e){return rw(aw(e.data)[1][0].data)!=T});Xw(t,r,i,T);e.messages[0].data=nw(t)});Aw(a,T)}k[1]=[];var E=Math.ceil((s.e.r+1)/A);for(var C=0;C<E;++C){var _=Pw({deps:[],location:"",type:6002},r);r[_].location="Root Entry/Index/Tables/Tile-".concat(_,".iwa");var S=[[],[{type:0,data:qb(0)}],[{type:0,data:qb(Math.min(s.e.r+1,(C+1)*A))}],[{type:0,data:qb(0)}],[{type:0,data:qb(Math.min((C+1)*A,s.e.r+1)-C*A)}],[],[{type:0,data:qb(5)}],[{type:0,data:qb(1)}],[{type:0,data:qb(Kw?1:0)}]];for(var x=C*A;x<=Math.min(s.e.r,(C+1)*A-1);++x){var O=Fw(l[x],v,Kw);O[1][0].data=qb(x-C*A);S[5].push({data:nw(O),type:2})}k[1].push({type:2,data:nw([[],[{type:0,data:qb(C)}],[{type:2,data:ww(_)}]])});var I={id:_,messages:[Dw(6002,nw(S))]};var R=cw(fw([I]));Qe.utils.cfb_add(e,"/Index/Tables/Tile-".concat(_,".iwa"),R);Ww(e,r,2,function(e){var t=aw(e.messages[0].data);t[3].push({type:2,data:nw([[],[{type:0,data:qb(_)}],[{type:2,data:Gb("Tables/Tile")}],[{type:2,data:Gb("Tables/Tile-".concat(_))}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:qb(0)}],[],[{type:0,data:qb(y)}]])});t[1]=[{type:0,data:qb(Math.max(_+1,rw(t[1][0].data)))}];$w(t,r,i,_);e.messages[0].data=nw(t)});kw(a,_);w[1].push({type:2,data:nw([[],[{type:0,data:qb(C*A)}],[{type:0,data:qb(C)}]])})}}m[3][0].data=nw(k);m[9][0].data=nw(w);m[10]=[{type:2,data:new Uint8Array([])}];if(t["!merges"]){var N=Pw({type:6144,deps:[i],location:r[i].location},r);n.push({id:N,messages:[Dw(6144,nw([[],t["!merges"].map(function(e){return{type:2,data:nw([[],[{type:2,data:nw([[],[{type:5,data:new Uint8Array(new Uint16Array([e.s.r,e.s.c]).buffer)}]])}],[{type:2,data:nw([[],[{type:5,data:new Uint8Array(new Uint16Array([e.e.r-e.s.r+1,e.e.c-e.s.c+1]).buffer)}]])}]])}})]))]});m[13]=[{type:2,data:ww(N)}];Ww(e,r,2,function(e){var t=aw(e.messages[0].data);$w(t,r,i,N);e.messages[0].data=nw(t)});kw(a,N)}else delete m[13];var F=bw(m[4][0].data);Ww(e,r,F,function(e){var r=aw(e.messages[0].data);{r[3]=[];v.sst.forEach(function(e,t){if(t==0)return;r[3].push({type:2,data:nw([[],[{type:0,data:qb(t)}],[{type:0,data:qb(1)}],[{type:2,data:Gb(e)}]])})})}e.messages[0].data=nw(r)});var D=bw(m[17][0].data);Ww(e,r,D,function(t){var a=aw(t.messages[0].data);a[3]=[];var n=[904980,903835,903815,903845];v.rsst.forEach(function(i,s){if(s==0)return;var f=[[],[{type:0,data:new Uint8Array([5])}],[],[{type:2,data:Gb(i.v)}]];f[10]=[{type:0,data:new Uint8Array([1])}];f[19]=[{type:2,data:new Uint8Array([10,6,8,0,18,2,101,110])}];f[5]=[{type:2,data:new Uint8Array([10,8,8,0,18,4,8,155,149,55])}];f[2]=[{type:2,data:new Uint8Array([8,148,158,55])}];f[6]=[{type:2,data:new Uint8Array([10,6,8,0,16,0,24,0])}];f[7]=[{type:2,data:new Uint8Array([10,8,8,0,18,4,8,135,149,55])}];f[8]=[{type:2,data:new Uint8Array([10,8,8,0,18,4,8,165,149,55])}];f[14]=[{type:2,data:new Uint8Array([10,6,8,0,16,0,24,0])}];f[24]=[{type:2,data:new Uint8Array([10,6,8,0,16,0,24,0])}];var l=Pw({deps:[],location:"",type:2001},r);var o=[];if(i.l){var c=Vw(e,2032,[[],[],[{type:2,data:Gb(i.l)}]],"/Index/Tables/DataList",r);f[11]=[];var h=[[],[]];if(!h[1])h[1]=[];h[1].push({type:2,data:nw([[],[{type:0,data:qb(0)}],[{type:2,data:ww(c)}]])});f[11][0]={type:2,data:nw(h)};o.push(c)}Vw(e,2001,f,"/Index/Tables/DataList",r,l);Ww(e,r,l,function(e){n.forEach(function(r){return kw(e,r)});o.forEach(function(r){return kw(e,r)})});var u=Vw(e,6218,[[],[{type:2,data:ww(l)}],[],[{type:2,data:new Uint8Array([13,255,255,255,0,18,10,16,255,255,1,24,255,255,255,255,7])}]],"/Index/Tables/DataList",r);Ww(e,r,u,function(e){return kw(e,l)});a[3].push({type:2,data:nw([[],[{type:0,data:qb(s)}],[{type:0,data:qb(1)}],[],[],[],[],[],[],[{type:2,data:ww(u)}]])});kw(t,u);Ww(e,r,2,function(e){var t=aw(e.messages[0].data);$w(t,r,D,u);$w(t,r,u,l);$w(t,r,l,o);$w(t,r,l,n);e.messages[0].data=nw(t)})});t.messages[0].data=nw(a)});if(v.cmnt.length>1){var P=bw(m[19][0].data);var L={},M=0;Ww(e,r,P,function(t){var a=aw(t.messages[0].data);{a[3]=[];v.cmnt.forEach(function(n,i){if(i==0)return;var s=[];if(n.replies)n.replies.forEach(function(t){if(!L[t.a||""])L[t.a||""]=Vw(e,212,[[],[{type:2,data:Gb(t.a||"")}],[{type:2,data:Uw(++M)}],[],[{type:0,data:qb(0)}]],"/Index/Tables/DataList",r);var a=L[t.a||""];var n=Vw(e,3056,[[],[{type:2,data:Gb(t.t||"")}],[{type:2,data:nw([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:ww(a)}]],"/Index/Tables/DataList",r);Ww(e,r,n,function(e){return kw(e,a)});s.push(n);Ww(e,r,2,function(e){var t=aw(e.messages[0].data);$w(t,r,n,a);e.messages[0].data=nw(t)})});if(!L[n.a||""])L[n.a||""]=Vw(e,212,[[],[{type:2,data:Gb(n.a||"")}],[{type:2,data:Uw(++M)}],[],[{type:0,data:qb(0)}]],"/Index/Tables/DataList",r);var f=L[n.a||""];var l=Vw(e,3056,[[],[{type:2,data:Gb(n.t||"")}],[{type:2,data:nw([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:ww(f)}],s.map(function(e){return{type:2,data:ww(e)}}),[{type:2,data:nw([[],[{type:0,data:qb(i)}],[{type:0,data:qb(0)}]])}]],"/Index/Tables/DataList",r);Ww(e,r,l,function(e){kw(e,f);s.forEach(function(r){return kw(e,r)})});a[3].push({type:2,data:nw([[],[{type:0,data:qb(i)}],[{type:0,data:qb(1)}],[],[],[],[],[],[],[],[{type:2,data:ww(l)}]])});kw(t,l);Ww(e,r,2,function(e){var t=aw(e.messages[0].data);$w(t,r,P,l);$w(t,r,l,f);if(s.length)$w(t,r,l,s);e.messages[0].data=nw(t)})})}a[2][0].data=qb(v.cmnt.length+1);t.messages[0].data=nw(a)})}}p[4][0].data=nw(m)}a.messages[0].data=nw(p)}function Zw(e){return function r(t){for(var a=0;a!=e.length;++a){var n=e[a];if(t[n[0]]===undefined)t[n[0]]=n[1];if(n[2]==="n")t[n[0]]=Number(t[n[0]])}}}function Jw(e){Zw([["cellNF",false],["cellHTML",true],["cellFormula",true],["cellStyles",false],["cellText",true],["cellDates",false],["sheetStubs",false],["sheetRows",0,"n"],["bookDeps",false],["bookSheets",false],["bookProps",false],["bookFiles",false],["bookVBA",false],["password",""],["WTF",false]])(e)}function qw(e){Zw([["cellDates",false],["bookSST",false],["bookType","xlsx"],["compression",false],["WTF",false]])(e)}function Qw(e){if(bi.WS.indexOf(e)>-1)return"sheet";if(bi.CS&&e==bi.CS)return"chart";if(bi.DS&&e==bi.DS)return"dialog";if(bi.MS&&e==bi.MS)return"macro";return e&&e.length?e:"sheet"}function ek(e,r){if(!e)return 0;try{e=r.map(function a(r){if(!r.id)r.id=r.strRelID;return[r.name,e["!id"][r.id].Target,Qw(e["!id"][r.id].Type)]})}catch(t){return null}return!e||e.length===0?null:e}function rk(e,r,t,a,n,i,s,f){if(!e||!e["!legdrawel"])return;var l=tt(e["!legdrawel"].Target,a);var o=Zr(t,l,true);if(o)Rh(It(o),e,f||[])}function tk(e,r,t,a,n,i,s,f,l,o,c,h){try{i[a]=ki(Zr(e,t,true),r);var u=Yr(e,r);var d;switch(f){case"sheet":d=tg(u,r,n,l,i[a],o,c,h);break;case"chart":d=ag(u,r,n,l,i[a],o,c,h);if(!d||!d["!drawel"])break;var v=tt(d["!drawel"].Target,r);var p=wi(v);var m=Ih(Zr(e,v,true),ki(Zr(e,p,true),v));var g=tt(m,v);var b=wi(g);d=km(Zr(e,g,true),g,l,ki(Zr(e,b,true),g),o,d);break;case"macro":d=ng(u,r,n,l,i[a],o,c,h);break;case"dialog":d=ig(u,r,n,l,i[a],o,c,h);break;default:throw new Error("Unrecognized sheet type "+f);}s[a]=d;var w=[],k=[];if(i&&i[a])ir(i[a]).forEach(function(t){var n="";if(i[a][t].Type==bi.CMNT){n=tt(i[a][t].Target,r);w=lg(Yr(e,n,true),n,l);if(!w||!w.length)return;Dh(d,w,false)}if(i[a][t].Type==bi.TCMNT){n=tt(i[a][t].Target,r);k=k.concat(Mh(Yr(e,n,true),l))}});if(k&&k.length)Dh(d,k,true,l.people||[]);rk(d,f,e,r,n,l,o,w)}catch(A){if(l.WTF)throw A}}function ak(e){return e.charAt(0)=="/"?e.slice(1):e}function nk(e,r){$e();r=r||{};Jw(r);if(jr(e,"META-INF/manifest.xml"))return Lb(e,r);if(jr(e,"objectdata.xml"))return Lb(e,r);if(jr(e,"Index/Document.iwa")){if(typeof Uint8Array=="undefined")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof Nw!="undefined"){if(e.FileIndex)return Nw(e,r);var t=Qe.utils.cfb_new();qr(e).forEach(function(r){Qr(t,r,Jr(e,r))});return Nw(t,r)}throw new Error("Unsupported NUMBERS file")}if(!jr(e,"[Content_Types].xml")){if(jr(e,"index.xml.gz"))throw new Error("Unsupported NUMBERS 08 file");if(jr(e,"index.xml"))throw new Error("Unsupported NUMBERS 09 file");var a=Qe.find(e,"Index.zip");if(a){r=Ar(r);delete r.type;if(typeof a.content=="string")r.type="binary";if(typeof Bun!=="undefined"&&Buffer.isBuffer(a.content))return mk(new Uint8Array(a.content),r);return mk(a.content,r)}throw new Error("Unsupported ZIP file")}var n=qr(e);var i=mi(Zr(e,"[Content_Types].xml"));var s=false;var f,l;if(i.workbooks.length===0){l="xl/workbook.xml";if(Yr(e,l,true))i.workbooks.push(l)}if(i.workbooks.length===0){l="xl/workbook.bin";if(!Yr(e,l,true))throw new Error("Could not find workbook");i.workbooks.push(l);s=true}if(i.workbooks[0].slice(-3)=="bin")s=true;var o={};var c={};if(!r.bookSheets&&!r.bookProps){mv=[];
vendor: 8,649 bytes, line 64893
64893if(i.sst)try{mv=fg(Yr(e,ak(i.sst)),i.sst,r)}catch(h){if(r.WTF)throw h}if(r.cellStyles&&i.themes.length)o=nh(Zr(e,i.themes[0].replace(/^\//,""),true)||"",r);if(i.style)c=sg(Yr(e,ak(i.style)),i.style,o,r)}i.links.map(function(t){try{var a=ki(Zr(e,wi(ak(t))),t);return cg(Yr(e,ak(t)),a,t,r)}catch(n){}});var u=rg(Yr(e,ak(i.workbooks[0])),i.workbooks[0],r);var d={},v="";if(i.coreprops.length){v=Yr(e,ak(i.coreprops[0]),true);if(v)d=Ri(v);if(i.extprops.length!==0){v=Yr(e,ak(i.extprops[0]),true);if(v)Mi(v,d,r)}}var p={};if(!r.bookSheets||r.bookProps){if(i.custprops.length!==0){v=Zr(e,ak(i.custprops[0]),true);if(v)p=Wi(v,r)}}var m={};if(r.bookSheets||r.bookProps){if(u.Sheets)f=u.Sheets.map(function N(e){return e.name});else if(d.Worksheets&&d.SheetNames.length>0)f=d.SheetNames;if(r.bookProps){m.Props=d;m.Custprops=p}if(r.bookSheets&&typeof f!=="undefined")m.SheetNames=f;if(r.bookSheets?m.SheetNames:r.bookProps)return m}f={};var g={};if(r.bookDeps&&i.calcchain)g=og(Yr(e,ak(i.calcchain)),i.calcchain,r);var b=0;var w={};var k,A;{var T=u.Sheets;d.Worksheets=T.length;d.SheetNames=[];for(var y=0;y!=T.length;++y){d.SheetNames[y]=T[y].name}}var E=s?"bin":"xml";var C=i.workbooks[0].lastIndexOf("/");var _=(i.workbooks[0].slice(0,C+1)+"_rels/"+i.workbooks[0].slice(C+1)+".rels").replace(/^\//,"");if(!jr(e,_))_="xl/_rels/workbook."+E+".rels";var S=ki(Zr(e,_,true),_.replace(/_rels.*/,"s5s"));if((i.metadata||[]).length>=1){r.xlmeta=hg(Yr(e,ak(i.metadata[0])),i.metadata[0],r)}if((i.people||[]).length>=1){r.people=Bh(Yr(e,ak(i.people[0])),r)}if(S)S=ek(S,u.Sheets);var x=Yr(e,"xl/worksheets/sheet.xml",true)?1:0;e:for(b=0;b!=d.Worksheets;++b){var O="sheet";if(S&&S[b]){k="xl/"+S[b][1].replace(/[\/]?xl\//,"");if(!jr(e,k))k=S[b][1];if(!jr(e,k))k=_.replace(/_rels\/[\S\s]*$/,"")+S[b][1];O=S[b][2]}else{k="xl/worksheets/sheet"+(b+1-x)+"."+E;k=k.replace(/sheet0\./,"sheet.")}A=k.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels");if(r&&r.sheets!=null)switch(typeof r.sheets){case"number":if(b!=r.sheets)continue e;break;case"string":if(d.SheetNames[b].toLowerCase()!=r.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(r.sheets)){var I=false;for(var R=0;R!=r.sheets.length;++R){if(typeof r.sheets[R]=="number"&&r.sheets[R]==b)I=1;if(typeof r.sheets[R]=="string"&&r.sheets[R].toLowerCase()==d.SheetNames[b].toLowerCase())I=1}if(!I)continue e};}tk(e,k,A,d.SheetNames[b],b,w,f,O,r,u,o,c)}m={Directory:i,Workbook:u,Props:d,Custprops:p,Deps:g,Sheets:f,SheetNames:d.SheetNames,Strings:mv,Styles:c,Themes:o,SSF:Ar(q)};if(r&&r.bookFiles){if(e.files){m.keys=n;m.files=e.files}else{m.keys=[];m.files={};e.FullPaths.forEach(function(r,t){r=r.replace(/^Root Entry[\/]/,"");m.keys.push(r);m.files[r]=e.FileIndex[t]})}}if(r&&r.bookVBA){if(i.vba.length>0)m.vbaraw=Yr(e,ak(i.vba[0]),true);else if(i.defaults&&i.defaults.bin===jh)m.vbaraw=Yr(e,"xl/vbaProject.bin",true)}m.bookType=s?"xlsb":"xlsx";return m}function ik(e,r){var t=r||{};var a="Workbook",n=Qe.find(e,a);try{a="/!DataSpaces/Version";n=Qe.find(e,a);if(!n||!n.content)throw new Error("ECMA-376 Encrypted file missing "+a);Eo(n.content);a="/!DataSpaces/DataSpaceMap";n=Qe.find(e,a);if(!n||!n.content)throw new Error("ECMA-376 Encrypted file missing "+a);var i=_o(n.content);if(i.length!==1||i[0].comps.length!==1||i[0].comps[0].t!==0||i[0].name!=="StrongEncryptionDataSpace"||i[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+a);a="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace";n=Qe.find(e,a);if(!n||!n.content)throw new Error("ECMA-376 Encrypted file missing "+a);var s=So(n.content);if(s.length!=1||s[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+a);a="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary";n=Qe.find(e,a);if(!n||!n.content)throw new Error("ECMA-376 Encrypted file missing "+a);Oo(n.content)}catch(f){}a="/EncryptionInfo";n=Qe.find(e,a);if(!n||!n.content)throw new Error("ECMA-376 Encrypted file missing "+a);var l=No(n.content);a="/EncryptedPackage";n=Qe.find(e,a);if(!n||!n.content)throw new Error("ECMA-376 Encrypted file missing "+a);if(l[0]==4&&typeof decrypt_agile!=="undefined")return decrypt_agile(l[1],n.content,t.password||"",t);if(l[0]==2&&typeof decrypt_std76!=="undefined")return decrypt_std76(l[1],n.content,t.password||"",t);throw new Error("File is password-protected")}function sk(e,r){if(e&&!e.SSF){e.SSF=Ar(q)}if(e&&e.SSF){$e();Ve(e.SSF);r.revssf=lr(e.SSF);r.revssf[e.SSF[65535]]=0;r.ssf=e.SSF}r.rels={};r.wbrels={};r.Strings=[];r.Strings.Count=0;r.Strings.Unique=0;if(bv)r.revStrings=new Map;else{r.revStrings={};r.revStrings.foo=[];delete r.revStrings.foo}var t="bin";var a=true;var n=pi();qw(r=r||{});var i=et();var s="",f=0;r.cellXfs=[];Tv(r.cellXfs,{},{revssf:{General:0}});if(!e.Props)e.Props={};s="docProps/core.xml";Qr(i,s,Fi(e.Props,r));n.coreprops.push(s);Ti(r.rels,2,s,bi.CORE_PROPS);s="docProps/app.xml";if(e.Props&&e.Props.SheetNames){}else if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{var l=[];for(var o=0;o<e.SheetNames.length;++o)if((e.Workbook.Sheets[o]||{}).Hidden!=2)l.push(e.SheetNames[o]);e.Props.SheetNames=l}e.Props.Worksheets=e.Props.SheetNames.length;Qr(i,s,Ui(e.Props,r));n.extprops.push(s);Ti(r.rels,3,s,bi.EXT_PROPS);if(e.Custprops!==e.Props&&ir(e.Custprops||{}).length>0){s="docProps/custom.xml";Qr(i,s,zi(e.Custprops,r));n.custprops.push(s);Ti(r.rels,4,s,bi.CUST_PROPS)}var c=["SheetJ5"];r.tcid=0;for(f=1;f<=e.SheetNames.length;++f){var h={"!id":{}};var u=e.Sheets[e.SheetNames[f-1]];var d=(u||{})["!type"]||"sheet";switch(d){case"chart":;default:s="xl/worksheets/sheet"+f+"."+t;Qr(i,s,bm(f-1,r,e,h));n.sheets.push(s);Ti(r.wbrels,-1,"worksheets/sheet"+f+"."+t,bi.WS[0]);}if(u){var v=u["!comments"];var p=false;var m="";if(v&&v.length>0){var g=false;v.forEach(function(e){e[1].forEach(function(e){if(e.T==true)g=true})});if(g){m="xl/threadedComments/threadedComment"+f+".xml";Qr(i,m,Uh(v,c,r));n.threadedcomments.push(m);Ti(h,-1,"../threadedComments/threadedComment"+f+".xml",bi.TCMNT)}m="xl/comments"+f+"."+t;Qr(i,m,Gh(v,r));n.comments.push(m);Ti(h,-1,"../comments"+f+"."+t,bi.CMNT);p=true}if(u["!legacy"]){if(p)Qr(i,"xl/drawings/vmlDrawing"+f+".vml",Nh(f,u["!comments"]))}delete u["!comments"];delete u["!legacy"]}if(h["!id"].rId1)Qr(i,wi(s),Ai(h))}if(r.Strings!=null&&r.Strings.length>0){s="xl/sharedStrings."+t;Qr(i,s,Ao(r.Strings,r));n.strs.push(s);Ti(r.wbrels,-1,"sharedStrings."+t,bi.SST)}s="xl/workbook."+t;Qr(i,s,eg(e,r));n.workbooks.push(s);Ti(r.rels,1,s,bi.WB);s="xl/theme/theme1.xml";var b=ih(e.Themes,r);Qr(i,s,b);n.themes.push(s);Ti(r.wbrels,-1,"theme/theme1.xml",bi.THEME);s="xl/styles."+t;Qr(i,s,qc(e,r));n.styles.push(s);Ti(r.wbrels,-1,"styles."+t,bi.STY);if(e.vbaraw&&a){s="xl/vbaProject.bin";Qr(i,s,e.vbaraw);n.vba.push(s);Ti(r.wbrels,-1,"vbaProject.bin",bi.VBA)}s="xl/metadata."+t;Qr(i,s,Th());n.metadata.push(s);Ti(r.wbrels,-1,"metadata."+t,bi.XLMETA);if(c.length>1){s="xl/persons/person.xml";Qr(i,s,Wh(c,r));n.people.push(s);Ti(r.wbrels,-1,"persons/person.xml",bi.PEOPLE)}Qr(i,"[Content_Types].xml",gi(n,r));Qr(i,"_rels/.rels",Ai(r.rels));Qr(i,"xl/_rels/workbook."+t+".rels",Ai(r.wbrels));delete r.revssf;delete r.ssf;return i}function fk(e,r){if(e&&!e.SSF){e.SSF=Ar(q)}if(e&&e.SSF){$e();Ve(e.SSF);r.revssf=lr(e.SSF);r.revssf[e.SSF[65535]]=0;r.ssf=e.SSF}r.rels={};r.wbrels={};r.Strings=[];r.Strings.Count=0;r.Strings.Unique=0;if(bv)r.revStrings=new Map;else{r.revStrings={};r.revStrings.foo=[];delete r.revStrings.foo}var t="xml";var a=Zh.indexOf(r.bookType)>-1;var n=pi();qw(r=r||{});var i=et();var s="",f=0;r.cellXfs=[];Tv(r.cellXfs,{},{revssf:{General:0}});if(!e.Props)e.Props={};s="docProps/core.xml";Qr(i,s,Fi(e.Props,r));n.coreprops.push(s);Ti(r.rels,2,s,bi.CORE_PROPS);s="docProps/app.xml";if(e.Props&&e.Props.SheetNames){}else if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{var l=[];for(var o=0;o<e.SheetNames.length;++o)if((e.Workbook.Sheets[o]||{}).Hidden!=2)l.push(e.SheetNames[o]);e.Props.SheetNames=l}e.Props.Worksheets=e.Props.SheetNames.length;Qr(i,s,Ui(e.Props,r));n.extprops.push(s);Ti(r.rels,3,s,bi.EXT_PROPS);if(e.Custprops!==e.Props&&ir(e.Custprops||{}).length>0){s="docProps/custom.xml";Qr(i,s,zi(e.Custprops,r));n.custprops.push(s);Ti(r.rels,4,s,bi.CUST_PROPS)}var c=["SheetJ5"];r.tcid=0;for(f=1;f<=e.SheetNames.length;++f){var h={"!id":{}};var u=e.Sheets[e.SheetNames[f-1]];var d=(u||{})["!type"]||"sheet";switch(d){case"chart":;default:s="xl/worksheets/sheet"+f+"."+t;Qr(i,s,ep(f-1,r,e,h));n.sheets.push(s);Ti(r.wbrels,-1,"worksheets/sheet"+f+"."+t,bi.WS[0]);}if(u){var v=u["!comments"];var p=false;var m="";if(v&&v.length>0){var g=false;
vendor: 21,196 bytes, lines 64893-64894
64893v.forEach(function(e){e[1].forEach(function(e){if(e.T==true)g=true})});if(g){m="xl/threadedComments/threadedComment"+f+".xml";Qr(i,m,Uh(v,c,r));n.threadedcomments.push(m);Ti(h,-1,"../threadedComments/threadedComment"+f+".xml",bi.TCMNT)}m="xl/comments"+f+"."+t;Qr(i,m,Lh(v,r));n.comments.push(m);Ti(h,-1,"../comments"+f+"."+t,bi.CMNT);p=true}if(u["!legacy"]){if(p)Qr(i,"xl/drawings/vmlDrawing"+f+".vml",Nh(f,u["!comments"]))}delete u["!comments"];delete u["!legacy"]}if(h["!id"].rId1)Qr(i,wi(s),Ai(h))}if(r.Strings!=null&&r.Strings.length>0){s="xl/sharedStrings."+t;Qr(i,s,mo(r.Strings,r));n.strs.push(s);Ti(r.wbrels,-1,"sharedStrings."+t,bi.SST)}s="xl/workbook."+t;Qr(i,s,Um(e,r));n.workbooks.push(s);Ti(r.rels,1,s,bi.WB);s="xl/theme/theme1.xml";Qr(i,s,ih(e.Themes,r));n.themes.push(s);Ti(r.wbrels,-1,"theme/theme1.xml",bi.THEME);s="xl/styles."+t;Qr(i,s,Cc(e,r));n.styles.push(s);Ti(r.wbrels,-1,"styles."+t,bi.STY);if(e.vbaraw&&a){s="xl/vbaProject.bin";Qr(i,s,e.vbaraw);n.vba.push(s);Ti(r.wbrels,-1,"vbaProject.bin",bi.VBA)}s="xl/metadata."+t;Qr(i,s,Eh());n.metadata.push(s);Ti(r.wbrels,-1,"metadata."+t,bi.XLMETA);if(c.length>1){s="xl/persons/person.xml";Qr(i,s,Wh(c,r));n.people.push(s);Ti(r.wbrels,-1,"persons/person.xml",bi.PEOPLE)}Qr(i,"[Content_Types].xml",gi(n,r));Qr(i,"_rels/.rels",Ai(r.rels));Qr(i,"xl/_rels/workbook."+t+".rels",Ai(r.wbrels));delete r.revssf;delete r.ssf;return i}function lk(e,r){var t="";switch((r||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":t=E(e.slice(0,12));break;case"binary":t=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(r&&r.type||"undefined"));}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3),t.charCodeAt(4),t.charCodeAt(5),t.charCodeAt(6),t.charCodeAt(7)]}function ok(e,r){if(Qe.find(e,"EncryptedPackage"))return ik(e,r);return Kg(e,r)}function ck(e,r){var t,a=e;var n=r||{};if(!n.type)n.type=C&&Buffer.isBuffer(e)?"buffer":"base64";t=rt(a,n);return nk(t,n)}function hk(e,r){var t=0;e:while(t<e.length)switch(e.charCodeAt(t)){case 10:;case 13:;case 32:++t;break;case 60:return Cg(e.slice(t),r);default:break e;}return to.to_workbook(e,r)}function uk(e,r){var t="",a=lk(e,r);switch(r.type){case"base64":t=E(e);break;case"binary":t=e;break;case"buffer":t=e.toString("binary");break;case"array":t=kr(e);break;default:throw new Error("Unrecognized type "+r.type);}if(a[0]==239&&a[1]==187&&a[2]==191)t=It(t);r.type="binary";return hk(t,r)}function dk(e,r){var t=e;if(r.type=="base64")t=E(t);if(typeof ArrayBuffer!=="undefined"&&e instanceof ArrayBuffer)t=new Uint8Array(e);t=typeof a!=="undefined"?a.utils.decode(1200,t.slice(2),"str"):C&&Buffer.isBuffer(e)?e.slice(2).toString("utf16le"):typeof Uint8Array!=="undefined"&&t instanceof Uint8Array?typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le").decode(t.slice(2)):u(t.slice(2)):h(t.slice(2));r.type="binary";return hk(t,r)}function vk(e){return!e.match(/[^\x00-\x7F]/)?e:Rt(e)}function pk(e,r,t,a){if(a){t.type="string";return to.to_workbook(e,t)}return to.to_workbook(r,t)}function mk(e,r){o();var t=r||{};if(t.codepage&&typeof a==="undefined")console.error("Codepage tables are not loaded. Non-ASCII characters may not give expected results");if(typeof ArrayBuffer!=="undefined"&&e instanceof ArrayBuffer)return mk(new Uint8Array(e),(t=Ar(t),t.type="array",t));if(typeof Int8Array!=="undefined"&&e instanceof Int8Array)return mk(new Uint8Array(e.buffer,e.byteOffset,e.length),t);if(typeof Uint8Array!=="undefined"&&e instanceof Uint8Array&&!t.type)t.type=typeof Deno!=="undefined"?"buffer":"array";var n=e,i=[0,0,0,0],s=false;if(t.cellStyles){t.cellNF=true;t.sheetStubs=true}gv={};if(t.dateNF)gv.dateNF=t.dateNF;if(!t.type)t.type=C&&Buffer.isBuffer(e)?"buffer":"base64";if(t.type=="file"){t.type=C?"buffer":"binary";n=nr(e);if(typeof Uint8Array!=="undefined"&&!C)t.type="array"}if(t.type=="string"){s=true;t.type="binary";t.codepage=65001;n=vk(e)}if(t.type=="array"&&typeof Uint8Array!=="undefined"&&e instanceof Uint8Array&&typeof ArrayBuffer!=="undefined"){var f=new ArrayBuffer(3),l=new Uint8Array(f);l.foo="bar";if(!l.foo){t=Ar(t);t.type="array";return mk(D(n),t)}}switch((i=lk(n,t))[0]){case 208:if(i[1]===207&&i[2]===17&&i[3]===224&&i[4]===161&&i[5]===177&&i[6]===26&&i[7]===225)return ok(Qe.read(n,t),t);break;case 9:if(i[1]<=8)return Kg(n,t);break;case 60:return Cg(n,t);case 73:if(i[1]===73&&i[2]===42&&i[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(i[1]===68)return ao(n,t);break;case 84:if(i[1]===65&&i[2]===66&&i[3]===76)return eo.to_workbook(n,t);break;case 80:return i[1]===75&&i[2]<9&&i[3]<9?ck(n,t):pk(e,n,t,s);case 239:return i[3]===60?Cg(n,t):pk(e,n,t,s);case 255:if(i[1]===254){return dk(n,t)}else if(i[1]===0&&i[2]===2&&i[3]===0)return no.to_workbook(n,t);break;case 0:if(i[1]===0){if(i[2]>=2&&i[3]===0)return no.to_workbook(n,t);if(i[2]===0&&(i[3]===8||i[3]===9))return no.to_workbook(n,t)}break;case 3:;case 131:;case 139:;case 140:return ql.to_workbook(n,t);case 123:if(i[1]===92&&i[2]===114&&i[3]===116)return jo(n,t);break;case 10:;case 13:;case 32:return uk(n,t);case 137:if(i[1]===80&&i[2]===78&&i[3]===71)throw new Error("PNG Image File is not a spreadsheet");break;case 8:if(i[1]===231)throw new Error("Unsupported Multiplan 1.x file!");break;case 12:if(i[1]===236)throw new Error("Unsupported Multiplan 2.x file!");if(i[1]===237)throw new Error("Unsupported Multiplan 3.x file!");break;}if(Jl.indexOf(i[0])>-1&&i[2]<=12&&i[3]<=31)return ql.to_workbook(n,t);return pk(e,n,t,s)}function gk(e,r){var t=r||{};t.type="file";return mk(e,t)}function bk(e,r){switch(r.type){case"base64":;case"binary":break;case"buffer":;case"array":r.type="";break;case"file":return ar(r.file,Qe.write(e,{type:C?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+r.bookType+"' files");default:throw new Error("Unrecognized type "+r.type);}return Qe.write(e,r)}function wk(e,r){switch(r.bookType){case"ods":return Hb(e,r);case"numbers":return Bw(e,r);case"xlsb":return sk(e,r);default:return fk(e,r);}}function kk(e,r){var t=Ar(r||{});var a=wk(e,t);return Tk(a,t)}function Ak(e,r){var t=Ar(r||{});var a=fk(e,t);return Tk(a,t)}function Tk(e,r){var t={};var a=C?"nodebuffer":typeof Uint8Array!=="undefined"?"array":"string";if(r.compression)t.compression="DEFLATE";if(r.password)t.type=a;else switch(r.type){case"base64":t.type="base64";break;case"binary":t.type="string";break;case"string":throw new Error("'string' output type invalid for '"+r.bookType+"' files");case"buffer":;case"file":t.type=a;break;default:throw new Error("Unrecognized type "+r.type);}var n=e.FullPaths?Qe.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[t.type]||t.type,compression:!!r.compression}):e.generate(t);if(typeof Deno!=="undefined"){if(typeof n=="string"){if(r.type=="binary"||r.type=="base64")return n;n=new Uint8Array(R(n))}}if(r.password&&typeof encrypt_agile!=="undefined")return bk(encrypt_agile(n,r.password),r);if(r.type==="file")return ar(r.file,n);return r.type=="string"?It(n):n}function yk(e,r){var t=r||{};var a=Yg(e,t);return bk(a,t)}function Ek(e,r,t){if(!t)t="";var a=t+e;switch(r.type){case"base64":return A(Rt(a));case"binary":return Rt(a);case"string":return e;case"file":return ar(r.file,a,"utf8");case"buffer":{if(C)return _(a,"utf8");else if(typeof TextEncoder!=="undefined")return(new TextEncoder).encode(a);else return Ek(a,{type:"binary"}).split("").map(function(e){return e.charCodeAt(0)})};}throw new Error("Unrecognized type "+r.type)}function Ck(e,r){switch(r.type){case"base64":return T(e);case"binary":return e;case"string":return e;case"file":return ar(r.file,e,"binary");case"buffer":{if(C)return _(e,"binary");else return e.split("").map(function(e){return e.charCodeAt(0)})};}throw new Error("Unrecognized type "+r.type)}function _k(e,r){switch(r.type){case"string":;case"base64":;case"binary":var t="";for(var a=0;a<e.length;++a)t+=String.fromCharCode(e[a]);return r.type=="base64"?A(t):r.type=="string"?It(t):t;case"file":return ar(r.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+r.type);}}function Sk(e,r){o();Pm(e);var t=Ar(r||{});if(t.cellStyles){t.cellNF=true;t.sheetStubs=true}if(t.type=="array"){t.type="binary";var a=Sk(e,t);t.type="array";return R(a)}return Ak(e,t)}function xk(e,r){o();Pm(e);var t=Ar(r||{});if(t.cellStyles){t.cellNF=true; 64894t.sheetStubs=true}if(t.type=="array"){t.type="binary";var a=xk(e,t);t.type="array";return R(a)}var n=0;if(t.sheet){if(typeof t.sheet=="number")n=t.sheet;else n=e.SheetNames.indexOf(t.sheet);if(!e.SheetNames[n])throw new Error("Sheet not found: "+t.sheet+" : "+typeof t.sheet)}switch(t.bookType||"xlsb"){case"xml":;case"xlml":return Ek(Ug(e,t),t);case"slk":;case"sylk":return Ek(Ql.from_sheet(e.Sheets[e.SheetNames[n]],t,e),t);case"htm":;case"html":return Ek(Sb(e.Sheets[e.SheetNames[n]],t),t);case"txt":return Ck(Uk(e.Sheets[e.SheetNames[n]],t),t);case"csv":return Ek(Mk(e.Sheets[e.SheetNames[n]],t),t,"\ufeff");case"dif":return Ek(eo.from_sheet(e.Sheets[e.SheetNames[n]],t),t);case"dbf":return _k(ql.from_sheet(e.Sheets[e.SheetNames[n]],t),t);case"prn":return Ek(to.from_sheet(e.Sheets[e.SheetNames[n]],t),t);case"rtf":return Ek(Ko(e.Sheets[e.SheetNames[n]],t),t);case"eth":return Ek(ro.from_sheet(e.Sheets[e.SheetNames[n]],t),t);case"fods":return Ek(Hb(e,t),t);case"wk1":return _k(no.sheet_to_wk1(e.Sheets[e.SheetNames[n]],t),t);case"wk3":return _k(no.book_to_wk3(e,t),t);case"biff2":if(!t.biff)t.biff=2;case"biff3":if(!t.biff)t.biff=3;case"biff4":if(!t.biff)t.biff=4;return _k(kb(e,t),t);case"biff5":if(!t.biff)t.biff=5;case"biff8":;case"xla":;case"xls":if(!t.biff)t.biff=8;return yk(e,t);case"xlsx":;case"xlsm":;case"xlam":;case"xlsb":;case"numbers":;case"ods":return kk(e,t);default:throw new Error("Unrecognized bookType |"+t.bookType+"|");}}function Ok(e){if(e.bookType)return;var r={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"};var t=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();if(t.match(/^\.[a-z]+$/))e.bookType=t.slice(1);e.bookType=r[e.bookType]||e.bookType}function Ik(e,r,t){var a=t||{};a.type="file";a.file=r;Ok(a);return xk(e,a)}function Rk(e,r,t){var a=t||{};a.type="file";a.file=r;Ok(a);return Sk(e,a)}function Nk(e,r,t,a){var n=t||{};n.type="file";n.file=e;Ok(n);n.type="buffer";var i=a;if(!(i instanceof Function))i=t;return er.writeFile(e,xk(r,n),i)}function Fk(e,r,t,a,n,i,s){var f=Wa(t);var l=s.defval,o=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw");var c=true,h=e["!data"]!=null;var u=n===1?[]:{};if(n!==1){if(Object.defineProperty)try{Object.defineProperty(u,"__rowNum__",{value:t,enumerable:false})}catch(d){u.__rowNum__=t}else u.__rowNum__=t}if(!h||e["!data"][t])for(var v=r.s.c;v<=r.e.c;++v){var p=h?(e["!data"][t]||[])[v]:e[a[v]+f];if(p==null||p.t===undefined){if(l===undefined)continue;if(i[v]!=null){u[i[v]]=l}continue}var m=p.v;switch(p.t){case"z":if(m==null)break;continue;case"e":m=m==0?null:void 0;break;case"s":;case"b":;case"n":if(!p.z||!Le(p.z))break;m=vr(m);if(typeof m=="number")break;case"d":if(!(s&&(s.UTC||s.raw===false)))m=Fr(new Date(m));break;default:throw new Error("unrecognized type "+p.t);}if(i[v]!=null){if(m==null){if(p.t=="e"&&m===null)u[i[v]]=null;else if(l!==undefined)u[i[v]]=l;else if(o&&m===null)u[i[v]]=null;else continue}else{u[i[v]]=(p.t==="n"&&typeof s.rawNumbers==="boolean"?s.rawNumbers:o)?m:tn(p,m,s)}if(m!=null)c=false}}return{row:u,isempty:c}}function Dk(e,r){if(e==null||e["!ref"]==null)return[];var t={t:"n",v:0},a=0,n=1,i=[],s=0,f="";var l={s:{r:0,c:0},e:{r:0,c:0}};var o=r||{};var c=o.range!=null?o.range:e["!ref"];if(o.header===1)a=1;else if(o.header==="A")a=2;else if(Array.isArray(o.header))a=3;else if(o.header==null)a=0;switch(typeof c){case"string":l=en(c);break;case"number":l=en(e["!ref"]);l.s.r=c;break;default:l=c;}if(a>0)n=0;var h=Wa(l.s.r);var u=[];var d=[];var v=0,p=0;var m=e["!data"]!=null;var g=l.s.r,b=0;var w={};if(m&&!e["!data"][g])e["!data"][g]=[];var k=o.skipHidden&&e["!cols"]||[];var A=o.skipHidden&&e["!rows"]||[];for(b=l.s.c;b<=l.e.c;++b){if((k[b]||{}).hidden)continue;u[b]=$a(b);t=m?e["!data"][g][b]:e[u[b]+h];switch(a){case 1:i[b]=b-l.s.c;break;case 2:i[b]=u[b];break;case 3:i[b]=o.header[b-l.s.c];break;default:if(t==null)t={w:"__EMPTY",t:"s"};f=s=tn(t,null,o);p=w[s]||0;if(!p)w[s]=1;else{do{f=s+"_"+p++}while(w[f]);w[s]=p;w[f]=1}i[b]=f;}}for(g=l.s.r+n;g<=l.e.r;++g){if((A[g]||{}).hidden)continue;var T=Fk(e,l,g,u,a,i,o);if(T.isempty===false||(a===1?o.blankrows!==false:!!o.blankrows))d[v++]=T.row}d.length=v;return d}var Pk=/"/g;function Lk(e,r,t,a,n,i,s,f,l){var o=true;var c=[],h="",u=Wa(t);var d=e["!data"]!=null;var v=d&&e["!data"][t]||[];for(var p=r.s.c;p<=r.e.c;++p){if(!a[p])continue;var m=d?v[p]:e[a[p]+u];if(m==null)h="";else if(m.v!=null){o=false;h=""+(l.rawNumbers&&m.t=="n"?m.v:tn(m,null,l));for(var g=0,b=0;g!==h.length;++g)if((b=h.charCodeAt(g))===n||b===i||b===34||l.forceQuotes){h='"'+h.replace(Pk,'""')+'"';break}if(h=="ID"&&f==0&&c.length==0)h='"ID"'}else if(m.f!=null&&!m.F){o=false;h="="+m.f;if(h.indexOf(",")>=0)h='"'+h.replace(Pk,'""')+'"'}else h="";c.push(h)}if(l.strip)while(c[c.length-1]==="")--c.length;if(l.blankrows===false&&o)return null;return c.join(s)}function Mk(e,r){var t=[];var a=r==null?{}:r;if(e==null||e["!ref"]==null)return"";var n=en(e["!ref"]);var i=a.FS!==undefined?a.FS:",",s=i.charCodeAt(0);var f=a.RS!==undefined?a.RS:"\n",l=f.charCodeAt(0);var o="",c=[];var h=a.skipHidden&&e["!cols"]||[];var u=a.skipHidden&&e["!rows"]||[];for(var d=n.s.c;d<=n.e.c;++d)if(!(h[d]||{}).hidden)c[d]=$a(d);var v=0;for(var p=n.s.r;p<=n.e.r;++p){if((u[p]||{}).hidden)continue;o=Lk(e,n,p,c,s,l,i,v,a);if(o==null){continue}if(o||a.blankrows!==false)t.push((v++?f:"")+o)}return t.join("")}function Uk(e,r){if(!r)r={};r.FS="\t";r.RS="\n";var t=Mk(e,r);if(typeof a=="undefined"||r.type=="string")return t;var n=a.utils.encode(1200,t,"str");return String.fromCharCode(255)+String.fromCharCode(254)+n}function Bk(e,r){var t="",a,n="";if(e==null||e["!ref"]==null)return[];var i=en(e["!ref"]),s="",f=[],l;var o=[];var c=e["!data"]!=null;for(l=i.s.c;l<=i.e.c;++l)f[l]=$a(l);for(var h=i.s.r;h<=i.e.r;++h){s=Wa(h);for(l=i.s.c;l<=i.e.c;++l){t=f[l]+s;a=c?(e["!data"][h]||[])[l]:e[t];n="";if(a===undefined)continue;else if(a.F!=null){t=a.F;if(!a.f)continue;n=a.f;if(t.indexOf(":")==-1)t=t+":"+t}if(a.f!=null)n=a.f;else if(r&&r.values===false)continue;else if(a.t=="z")continue;else if(a.t=="n"&&a.v!=null)n=""+a.v;else if(a.t=="b")n=a.v?"TRUE":"FALSE";else if(a.w!==undefined)n="'"+a.w;else if(a.v===undefined)continue;else if(a.t=="s")n="'"+a.v;else n=""+a.v;o[o.length]=t+"="+n}}return o}function Wk(e,r,t){var a=t||{};var n=e?e["!data"]!=null:a.dense;if(b!=null&&n==null)n=b;var i=+!a.skipHeader;var s=e||{};if(!e&&n)s["!data"]=[];var f=0,l=0;if(s&&a.origin!=null){if(typeof a.origin=="number")f=a.origin;else{var o=typeof a.origin=="string"?Ka(a.origin):a.origin;f=o.r;l=o.c}}var c={s:{c:0,r:0},e:{c:l,r:f+r.length-1+i}};if(s["!ref"]){var h=en(s["!ref"]);c.e.c=Math.max(c.e.c,h.e.c);c.e.r=Math.max(c.e.r,h.e.r);if(f==-1){f=h.e.r+1;c.e.r=f+r.length-1+i}}else{if(f==-1){f=0;c.e.r=r.length-1+i}}var u=a.header||[],d=0;var v=[];r.forEach(function(e,r){if(n&&!s["!data"][f+r+i])s["!data"][f+r+i]=[];if(n)v=s["!data"][f+r+i];ir(e).forEach(function(t){if((d=u.indexOf(t))==-1)u[d=u.length]=t;var o=e[t];var c="z";var h="";var p=n?"":$a(l+d)+Wa(f+r+i);var m=n?v[l+d]:s[p];if(o&&typeof o==="object"&&!(o instanceof Date)){if(n)v[l+d]=o;else s[p]=o}else{if(typeof o=="number")c="n";else if(typeof o=="boolean")c="b";else if(typeof o=="string")c="s";else if(o instanceof Date){c="d";if(!a.UTC)o=Dr(o);if(!a.cellDates){c="n";o=dr(o)}h=m!=null&&m.z&&Le(m.z)?m.z:a.dateNF||q[14]}else if(o===null&&a.nullError){c="e";o=0}if(!m){if(!n)s[p]=m={t:c,v:o};else v[l+d]=m={t:c,v:o}}else{m.t=c;m.v=o;delete m.w;delete m.R;if(h)m.z=h}if(h)m.z=h}})});c.e.c=Math.max(c.e.c,l+u.length-1);var p=Wa(f);if(n&&!s["!data"][f])s["!data"][f]=[];if(i)for(d=0;d<u.length;++d){if(n)s["!data"][f][d+l]={t:"s",v:u[d]};else s[$a(d+l)+p]={t:"s",v:u[d]}}s["!ref"]=Ja(c);return s}function zk(e,r){return Wk(null,e,r)}function Hk(e,r,t){if(typeof r=="string"){if(e["!data"]!=null){var a=Ka(r);if(!e["!data"][a.r])e["!data"][a.r]=[];return e["!data"][a.r][a.c]||(e["!data"][a.r][a.c]={t:"z"})}return e[r]||(e[r]={t:"z"})}if(typeof r!="number")return Hk(e,Ya(r));return Hk(e,$a(t||0)+Wa(r))}function Vk(e,r){if(typeof r=="number"){if(r>=0&&e.SheetNames.length>r)return r;throw new Error("Cannot find sheet # "+r)}else if(typeof r=="string"){var t=e.SheetNames.indexOf(r);if(t>-1)return t;throw new Error("Cannot find sheet name |"+r+"|")}else throw new Error("Cannot find sheet |"+r+"|")}function $k(e,r){var t={SheetNames:[],Sheets:{}};if(e)Xk(t,e,r||"Sheet1");return t}function Xk(e,r,t,a){var n=1;if(!t)for(;n<=65535;++n,t=undefined)if(e.SheetNames.indexOf(t="Sheet"+n)==-1)break;if(!t||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(a&&e.SheetNames.indexOf(t)>=0&&t.length<32){var i=t.match(/\d+$/);n=i&&+i[0]||0;var s=i&&t.slice(0,i.index)||t;for(++n;n<=65535;++n)if(e.SheetNames.indexOf(t=s+n)==-1)break}Fm(t);if(e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");e.SheetNames.push(t);e.Sheets[t]=r;return t}function Gk(e,r,t){if(!e.Workbook)e.Workbook={};if(!e.Workbook.Sheets)e.Workbook.Sheets=[];var a=Vk(e,r);if(!e.Workbook.Sheets[a])e.Workbook.Sheets[a]={};switch(t){case 0:;case 1:;case 2:break;default:throw new Error("Bad sheet visibility setting "+t);}e.Workbook.Sheets[a].Hidden=t}function jk(e,r){e.z=r;return e}function Kk(e,r,t){if(!r){delete e.l}else{e.l={Target:r};if(t)e.l.Tooltip=t}return e}function Yk(e,r,t){return Kk(e,"#"+r,t)}function Zk(e,r,t){if(!e.c)e.c=[];e.c.push({t:r,a:t||"SheetJS"})}function Jk(e,r,t,a){var n=typeof r!="string"?r:en(r);var i=typeof r=="string"?r:Ja(r);for(var s=n.s.r;s<=n.e.r;++s)for(var f=n.s.c;f<=n.e.c;++f){var l=Hk(e,s,f);l.t="n";l.F=i;delete l.v;if(s==n.s.r&&f==n.s.c){l.f=t;if(a)l.D=true}}var o=Za(e["!ref"]);if(o.s.r>n.s.r)o.s.r=n.s.r;if(o.s.c>n.s.c)o.s.c=n.s.c;if(o.e.r<n.e.r)o.e.r=n.e.r;if(o.e.c<n.e.c)o.e.c=n.e.c;e["!ref"]=Ja(o);return e}var qk={encode_col:$a,encode_row:Wa,encode_cell:Ya,encode_range:Ja,decode_col:Va,decode_row:Ba,split_cell:ja,decode_cell:Ka,decode_range:Za,format_cell:tn,sheet_new:nn,sheet_add_aoa:sn,sheet_add_json:Wk,sheet_add_dom:xb,aoa_to_sheet:fn,json_to_sheet:zk,table_to_sheet:Ob,table_to_book:Ib,sheet_to_csv:Mk,sheet_to_txt:Uk,sheet_to_json:Dk,sheet_to_html:Sb,sheet_to_formulae:Bk,sheet_to_row_object_array:Dk,sheet_get_cell:Hk,book_new:$k,book_append_sheet:Xk,book_set_sheet_visibility:Gk,cell_set_number_format:jk,cell_set_hyperlink:Kk,cell_set_internal_link:Yk,cell_add_comment:Zk,sheet_set_array_formula:Jk,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};var Qk;function eA(e){Qk=e}function rA(e,r){var t=Qk();var a=r==null?{}:r;if(e==null||e["!ref"]==null){t.push(null);return t}var n=en(e["!ref"]);var i=a.FS!==undefined?a.FS:",",s=i.charCodeAt(0);var f=a.RS!==undefined?a.RS:"\n",l=f.charCodeAt(0);var o="",c=[];var h=a.skipHidden&&e["!cols"]||[];var u=a.skipHidden&&e["!rows"]||[];for(var d=n.s.c;d<=n.e.c;++d)if(!(h[d]||{}).hidden)c[d]=$a(d);var v=n.s.r;var p=false,m=0;t._read=function(){if(!p){p=true;return t.push("\ufeff")}while(v<=n.e.r){++v;if((u[v-1]||{}).hidden)continue;o=Lk(e,n,v-1,c,s,l,i,m,a);if(o!=null){if(o||a.blankrows!==false)return t.push((m++?f:"")+o)}}return t.push(null)};return t}function tA(e,r){var t=Qk();var a=r||{};var n=a.header!=null?a.header:yb;var i=a.footer!=null?a.footer:Eb;t.push(n);var s=Za(e["!ref"]);t.push(_b(e,s,a));var f=s.s.r;var l=false;t._read=function(){if(f>s.e.r){if(!l){l=true;t.push("</table>"+i)}return t.push(null)}while(f<=s.e.r){t.push(Tb(e,s,f,a));++f;break}};return t}function aA(e,r){var t=Qk({objectMode:true});if(e==null||e["!ref"]==null){t.push(null);return t}var a={t:"n",v:0},n=0,i=1,s=[],f=0,l="";var o={s:{r:0,c:0},e:{r:0,c:0}};var c=r||{};var h=c.range!=null?c.range:e["!ref"];if(c.header===1)n=1;else if(c.header==="A")n=2;else if(Array.isArray(c.header))n=3;switch(typeof h){case"string":o=en(h);break;case"number":o=en(e["!ref"]);o.s.r=h;break;default:o=h;}if(n>0)i=0;var u=Wa(o.s.r);var d=[];var v=0;var p=e["!data"]!=null;var m=o.s.r,g=0;var b={};if(p&&!e["!data"][m])e["!data"][m]=[];var w=c.skipHidden&&e["!cols"]||[];var k=c.skipHidden&&e["!rows"]||[];for(g=o.s.c;g<=o.e.c;++g){if((w[g]||{}).hidden)continue;d[g]=$a(g);a=p?e["!data"][m][g]:e[d[g]+u];switch(n){case 1:s[g]=g-o.s.c;break;case 2:s[g]=d[g];break;case 3:s[g]=c.header[g-o.s.c];break;default:if(a==null)a={w:"__EMPTY",t:"s"};l=f=tn(a,null,c);v=b[f]||0;if(!v)b[f]=1;else{do{l=f+"_"+v++}while(b[l]);b[f]=v;b[l]=1}s[g]=l;}}m=o.s.r+i;t._read=function(){while(m<=o.e.r){if((k[m-1]||{}).hidden)continue;var r=Fk(e,o,m,d,n,s,c);++m;if(r.isempty===false||(n===1?c.blankrows!==false:!!c.blankrows)){t.push(r.row);return}}return t.push(null)};return t}function nA(e,r){var t=Qk();var a=r==null?{}:r;var n=+a.stride||10;if(!e.SSF)e.SSF=Ar(q);if(e.SSF){$e();Ve(e.SSF);a.revssf=lr(e.SSF);a.revssf[e.SSF[65535]]=0;a.ssf=e.SSF;a.cellXfs=[];Tv(a.cellXfs,{},{revssf:{General:0}})}
64894e.SheetNames.forEach(function(r){var t=e.Sheets[r];if(!t||!t["!ref"])return;var n=Za(t["!ref"]);var i=t["!data"]!=null;var s=i?t["!data"]:[];var f={r:0,c:0};for(var l=n.s.r;l<=n.e.r;++l){f.r=l;if(i&&!s[l])continue;for(var o=n.s.c;o<=n.e.c;++o){f.c=o;var c=i?s[l][o]:t[$a(o)+Wa(l)];if(!c)continue;if(c.t=="d"&&c.z==null){c=Ar(c);c.z=q[14]}void Tv(a.cellXfs,c,a)}}});var i=xg(e,a);var s=0,f=0,l=e.Sheets[e.SheetNames[f]],o=en(l),c=-1,h=false;var u=[],d=0,v=false,p=[],m={r:0,c:0};t._read=function(){switch(s){case 0:{s=1;t.push(at);t.push("<Workbook"+Ut({xmlns:Gt.ss,"xmlns:o":Gt.o,"xmlns:x":Gt.x,"xmlns:ss":Gt.ss,"xmlns:dt":Gt.dt,"xmlns:html":Gt.html})+">")}break;case 1:{s=2;t.push(_g(e,a));t.push(Sg(e,a))}break;case 2:{s=3;t.push(i);t.push(Ig(e,a))}break;case 3:{h=false;if(f>=e.SheetNames.length){s=-1;t.push("");break}t.push("<Worksheet"+Ut({"ss:Name":bt(e.SheetNames[f])})+">");l=e.Sheets[e.SheetNames[f]];if(!l){t.push("</Worksheet>");return void++f}var r=Rg(l,a,f,e);if(r.length)t.push("<Names>"+r+"</Names>");if(!l["!ref"])return s=5;o=en(l["!ref"]);c=o.s.r;s=4}break;case 4:{if(c<0||c>o.e.r){if(h)t.push("</Table>");return void(s=5)}if(c<=o.s.r){if(l["!cols"])l["!cols"].forEach(function(e,r){oc(e);var a=!!e.width;var n=kv(r,e);var i={"ss:Index":r+1};if(a)i["ss:Width"]=nc(n.width);if(e.hidden)i["ss:Hidden"]="1";if(!h){h=true;t.push("<Table>")}t.push(Bt("Column",null,i))});v=l["!data"]!=null;if(v)p=l["!data"];m.r=m.c=0}for(var g=0;c<=o.e.r&&g<n;++c,++g){var b=[Pg(c,(l["!rows"]||[])[c])];m.r=c;if(!(v&&!p[c]))for(var w=o.s.c;w<=o.e.c;++w){m.c=w;var k=false;for(d=0;d!=u.length;++d){if(u[d].s.c>w)continue;if(u[d].s.r>c)continue;if(u[d].e.c<w)continue;if(u[d].e.r<c)continue;if(u[d].s.c!=w||u[d].s.r!=c)k=true;break}if(k)continue;var A=$a(w)+Wa(c),T=v?p[c][w]:l[A];b.push(Dg(T,A,l,a,f,e,m))}b.push("</Row>");if(!h){h=true;t.push("<Table>")}t.push(b.join(""))}}break;case 5:{t.push(Ng(l,a,f,e));if(l&&l["!autofilter"])t.push('<AutoFilter x:Range="'+nu(qa(l["!autofilter"].ref),{r:0,c:0})+'" xmlns="urn:schemas-microsoft-com:office:excel"></AutoFilter>');t.push("</Worksheet>");f++;c=-1;return void(s=3)};case-1:{s=-2;t.push("</Workbook>")}break;case-2:t.push(null);break;}};return t}var iA={to_json:aA,to_html:tA,to_csv:rA,to_xlml:nA,set_readable:eA};if(typeof Kg!=="undefined")e.parse_xlscfb=Kg;e.parse_zip=nk;e.read=mk;e.readFile=gk;e.readFileSync=gk;e.write=xk;e.writeFile=Ik;e.writeFileSync=Ik;e.writeFileAsync=Nk;e.utils=qk;e.writeXLSX=Sk;e.writeFileXLSX=Rk;e.set_fs=rr;e.set_cptable=g;e.SSF=Xe;if(typeof iA!=="undefined")e.stream=iA;if(typeof Qe!=="undefined")e.CFB=Qe;if(typeof require!=="undefined"){var sA=undefined;if((sA||{}).Readable)eA(sA.Readable);try{er=undefined}catch(au){}}}if(typeof exports!=="undefined")make_xlsx_lib(exports);else if(typeof module!=="undefined"&&module.exports)make_xlsx_lib(module.exports);else if(typeof define==="function"&&define.amd)define("xlsx",function(){if(!XLSX.version)make_xlsx_lib(XLSX);return XLSX});else make_xlsx_lib(XLSX);if(typeof window!=="undefined"&&!window.XLSX)try{window.XLSX=XLSX}catch(e){}
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.